| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) ove
rride; | 133 virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) ove
rride; |
| 134 virtual void setOpenedByDOM() override; | 134 virtual void setOpenedByDOM() override; |
| 135 virtual WebFrame* mainFrame() override; | 135 virtual WebFrame* mainFrame() override; |
| 136 virtual WebFrame* focusedFrame() override; | 136 virtual WebFrame* focusedFrame() override; |
| 137 virtual void setFocusedFrame(WebFrame*) override; | 137 virtual void setFocusedFrame(WebFrame*) override; |
| 138 virtual void setInitialFocus(bool reverse) override; | 138 virtual void setInitialFocus(bool reverse) override; |
| 139 virtual void clearFocusedElement() override; | 139 virtual void clearFocusedElement() override; |
| 140 virtual void scrollFocusedNodeIntoRect(const WebRect&) override; | 140 virtual void scrollFocusedNodeIntoRect(const WebRect&) override; |
| 141 virtual void zoomToFindInPageRect(const WebRect&) override; | 141 virtual void zoomToFindInPageRect(const WebRect&) override; |
| 142 virtual void advanceFocus(bool reverse) override; | 142 virtual void advanceFocus(bool reverse) override; |
| 143 virtual double zoomLevel() override; | |
| 144 virtual double setZoomLevel(double) override; | |
| 145 virtual void zoomLimitsChanged(double minimumZoomLevel, double maximumZoomLe
vel) override; | |
| 146 virtual float textZoomFactor() override; | |
| 147 virtual float setTextZoomFactor(float) override; | |
| 148 virtual bool zoomToMultipleTargetsRect(const WebRect&) override; | 143 virtual bool zoomToMultipleTargetsRect(const WebRect&) override; |
| 149 virtual void setMainFrameScrollOffset(const WebPoint&) override; | 144 virtual void setMainFrameScrollOffset(const WebPoint&) override; |
| 150 virtual void resetScrollAndScaleState() override; | 145 virtual void resetScrollAndScaleState() override; |
| 151 virtual WebSize contentsPreferredMinimumSize() override; | 146 virtual WebSize contentsPreferredMinimumSize() override; |
| 152 | 147 |
| 153 virtual float deviceScaleFactor() const override; | 148 virtual float deviceScaleFactor() const override; |
| 154 virtual void setDeviceScaleFactor(float) override; | 149 virtual void setDeviceScaleFactor(float) override; |
| 155 | 150 |
| 156 virtual void setFixedLayoutSize(const WebSize&) override; | 151 virtual void setFixedLayoutSize(const WebSize&) override; |
| 157 | 152 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 179 virtual void acceptLanguagesChanged() override; | 174 virtual void acceptLanguagesChanged() override; |
| 180 | 175 |
| 181 // WebViewImpl | 176 // WebViewImpl |
| 182 | 177 |
| 183 HitTestResult coreHitTestResultAt(const WebPoint&); | 178 HitTestResult coreHitTestResultAt(const WebPoint&); |
| 184 void suppressInvalidations(bool enable); | 179 void suppressInvalidations(bool enable); |
| 185 void invalidateRect(const IntRect&); | 180 void invalidateRect(const IntRect&); |
| 186 | 181 |
| 187 void setIgnoreInputEvents(bool newValue); | 182 void setIgnoreInputEvents(bool newValue); |
| 188 void setBackgroundColorOverride(WebColor); | 183 void setBackgroundColorOverride(WebColor); |
| 189 void setZoomFactorOverride(float); | |
| 190 | 184 |
| 191 Color baseBackgroundColor() const { return m_baseBackgroundColor; } | 185 Color baseBackgroundColor() const { return m_baseBackgroundColor; } |
| 192 | 186 |
| 193 void setOverlayLayer(GraphicsLayer*); | 187 void setOverlayLayer(GraphicsLayer*); |
| 194 | 188 |
| 195 const WebPoint& lastMouseDownPoint() const | 189 const WebPoint& lastMouseDownPoint() const |
| 196 { | 190 { |
| 197 return m_lastMouseDownPoint; | 191 return m_lastMouseDownPoint; |
| 198 } | 192 } |
| 199 | 193 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 388 |
| 395 // The point relative to the client area where the mouse was last pressed | 389 // The point relative to the client area where the mouse was last pressed |
| 396 // down. This is used by the drag client to determine what was under the | 390 // down. This is used by the drag client to determine what was under the |
| 397 // mouse when the drag was initiated. We need to track this here in | 391 // mouse when the drag was initiated. We need to track this here in |
| 398 // WebViewImpl since DragClient::startDrag does not pass the position the | 392 // WebViewImpl since DragClient::startDrag does not pass the position the |
| 399 // mouse was at when the drag was initiated, only the current point, which | 393 // mouse was at when the drag was initiated, only the current point, which |
| 400 // can be misleading as it is usually not over the element the user actually | 394 // can be misleading as it is usually not over the element the user actually |
| 401 // dragged by the time a drag is initiated. | 395 // dragged by the time a drag is initiated. |
| 402 WebPoint m_lastMouseDownPoint; | 396 WebPoint m_lastMouseDownPoint; |
| 403 | 397 |
| 404 // Keeps track of the current zoom level. 0 means no zoom, positive numbers | |
| 405 // mean zoom in, negative numbers mean zoom out. | |
| 406 double m_zoomLevel; | |
| 407 | |
| 408 double m_minimumZoomLevel; | |
| 409 | |
| 410 double m_maximumZoomLevel; | |
| 411 | |
| 412 bool m_doingDragAndDrop; | 398 bool m_doingDragAndDrop; |
| 413 | 399 |
| 414 bool m_ignoreInputEvents; | 400 bool m_ignoreInputEvents; |
| 415 | 401 |
| 416 float m_compositorDeviceScaleFactorOverride; | 402 float m_compositorDeviceScaleFactorOverride; |
| 417 WebSize m_rootLayerOffset; | 403 WebSize m_rootLayerOffset; |
| 418 float m_rootLayerScale; | 404 float m_rootLayerScale; |
| 419 | 405 |
| 420 // Webkit expects keyPress events to be suppressed if the associated keyDown | 406 // Webkit expects keyPress events to be suppressed if the associated keyDown |
| 421 // event was handled. Safari implements this behavior by peeking out the | 407 // event was handled. Safari implements this behavior by peeking out the |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 bool m_flingSourceDevice; | 443 bool m_flingSourceDevice; |
| 458 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; | 444 Vector<OwnPtr<LinkHighlight> > m_linkHighlights; |
| 459 | 445 |
| 460 bool m_showFPSCounter; | 446 bool m_showFPSCounter; |
| 461 bool m_showPaintRects; | 447 bool m_showPaintRects; |
| 462 bool m_showDebugBorders; | 448 bool m_showDebugBorders; |
| 463 bool m_continuousPaintingEnabled; | 449 bool m_continuousPaintingEnabled; |
| 464 bool m_showScrollBottleneckRects; | 450 bool m_showScrollBottleneckRects; |
| 465 WebColor m_baseBackgroundColor; | 451 WebColor m_baseBackgroundColor; |
| 466 WebColor m_backgroundColorOverride; | 452 WebColor m_backgroundColorOverride; |
| 467 float m_zoomFactorOverride; | |
| 468 | 453 |
| 469 bool m_userGestureObserved; | 454 bool m_userGestureObserved; |
| 470 }; | 455 }; |
| 471 | 456 |
| 472 // We have no ways to check if the specified WebView is an instance of | 457 // We have no ways to check if the specified WebView is an instance of |
| 473 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 458 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 474 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 459 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 475 | 460 |
| 476 } // namespace blink | 461 } // namespace blink |
| 477 | 462 |
| 478 #endif | 463 #endif |
| OLD | NEW |