OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 virtual float deviceScaleFactor() const override; | 105 virtual float deviceScaleFactor() const override; |
106 virtual void setDeviceScaleFactor(float) override; | 106 virtual void setDeviceScaleFactor(float) override; |
107 | 107 |
108 virtual WebHitTestResult hitTestResultAt(const WebPoint&) override; | 108 virtual WebHitTestResult hitTestResultAt(const WebPoint&) override; |
109 virtual void spellingMarkers(WebVector<uint32_t>* markers) override; | 109 virtual void spellingMarkers(WebVector<uint32_t>* markers) override; |
110 virtual void removeSpellingMarkersUnderWords(const WebVector<WebString>& wor
ds) override; | 110 virtual void removeSpellingMarkersUnderWords(const WebVector<WebString>& wor
ds) override; |
111 | 111 |
112 virtual void setShowPaintRects(bool) override; | 112 virtual void setShowPaintRects(bool) override; |
113 void setShowDebugBorders(bool); | 113 void setShowDebugBorders(bool); |
114 virtual void setShowScrollBottleneckRects(bool) override; | |
115 | 114 |
116 virtual void acceptLanguagesChanged() override; | 115 virtual void acceptLanguagesChanged() override; |
117 | 116 |
118 // WebViewImpl | 117 // WebViewImpl |
119 HitTestResult coreHitTestResultAt(const WebPoint&); | 118 HitTestResult coreHitTestResultAt(const WebPoint&); |
120 | 119 |
121 void setBackgroundColorOverride(WebColor); | 120 void setBackgroundColorOverride(WebColor); |
122 | 121 |
123 Color baseBackgroundColor() const { return m_baseBackgroundColor; } | 122 Color baseBackgroundColor() const { return m_baseBackgroundColor; } |
124 | 123 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); | 169 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); |
171 | 170 |
172 // Exposed for tests. | 171 // Exposed for tests. |
173 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 172 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
174 | 173 |
175 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 174 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
176 | 175 |
177 private: | 176 private: |
178 IntSize contentsSize() const; | 177 IntSize contentsSize() const; |
179 | 178 |
180 void resetSavedScrollAndScaleState(); | |
181 | |
182 void performResize(); | 179 void performResize(); |
183 | 180 |
184 friend class WebView; // So WebView::Create can call our constructor | 181 friend class WebView; // So WebView::Create can call our constructor |
185 friend class WTF::RefCounted<WebViewImpl>; | 182 friend class WTF::RefCounted<WebViewImpl>; |
186 friend void setCurrentInputEventForTest(const WebInputEvent*); | 183 friend void setCurrentInputEventForTest(const WebInputEvent*); |
187 | 184 |
188 enum DragAction { | 185 enum DragAction { |
189 DragEnter, | 186 DragEnter, |
190 DragOver | 187 DragOver |
191 }; | 188 }; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // associated WM_CHAR event if the keydown was handled. We emulate | 229 // associated WM_CHAR event if the keydown was handled. We emulate |
233 // this behavior by setting this flag if the keyDown was handled. | 230 // this behavior by setting this flag if the keyDown was handled. |
234 bool m_suppressNextKeypressEvent; | 231 bool m_suppressNextKeypressEvent; |
235 | 232 |
236 // Represents whether or not this object should process incoming IME events. | 233 // Represents whether or not this object should process incoming IME events. |
237 bool m_imeAcceptEvents; | 234 bool m_imeAcceptEvents; |
238 | 235 |
239 // Whether the webview is rendering transparently. | 236 // Whether the webview is rendering transparently. |
240 bool m_isTransparent; | 237 bool m_isTransparent; |
241 | 238 |
242 IntRect m_rootLayerScrollDamage; | |
243 WebLayer* m_rootLayer; | 239 WebLayer* m_rootLayer; |
244 bool m_matchesHeuristicsForGpuRasterization; | 240 bool m_matchesHeuristicsForGpuRasterization; |
245 // If true, the graphics context is being restored. | 241 // If true, the graphics context is being restored. |
246 bool m_recreatingGraphicsContext; | 242 bool m_recreatingGraphicsContext; |
247 static const WebInputEvent* m_currentInputEvent; | 243 static const WebInputEvent* m_currentInputEvent; |
248 | 244 |
249 WebPoint m_positionOnFlingStart; | 245 WebPoint m_positionOnFlingStart; |
250 WebPoint m_globalPositionOnFlingStart; | 246 WebPoint m_globalPositionOnFlingStart; |
251 int m_flingModifier; | 247 int m_flingModifier; |
252 bool m_flingSourceDevice; | 248 bool m_flingSourceDevice; |
253 | 249 |
254 bool m_showPaintRects; | 250 bool m_showPaintRects; |
255 bool m_showDebugBorders; | 251 bool m_showDebugBorders; |
256 bool m_showScrollBottleneckRects; | |
257 WebColor m_baseBackgroundColor; | 252 WebColor m_baseBackgroundColor; |
258 WebColor m_backgroundColorOverride; | 253 WebColor m_backgroundColorOverride; |
259 }; | 254 }; |
260 | 255 |
261 // We have no ways to check if the specified WebView is an instance of | 256 // We have no ways to check if the specified WebView is an instance of |
262 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 257 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
263 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 258 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
264 | 259 |
265 } // namespace blink | 260 } // namespace blink |
266 | 261 |
267 #endif // SKY_ENGINE_WEB_WEBVIEWIMPL_H_ | 262 #endif // SKY_ENGINE_WEB_WEBVIEWIMPL_H_ |
OLD | NEW |