| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 static bool mapKeyCodeForScroll(int keyCode, | 519 static bool mapKeyCodeForScroll(int keyCode, |
| 520 WebCore::ScrollDirection* scrollDirection, | 520 WebCore::ScrollDirection* scrollDirection, |
| 521 WebCore::ScrollGranularity* scrollGranularity
); | 521 WebCore::ScrollGranularity* scrollGranularity
); |
| 522 | 522 |
| 523 // Called by a full frame plugin inside this view to inform it that its | 523 // Called by a full frame plugin inside this view to inform it that its |
| 524 // zoom level has been updated. The plugin should only call this function | 524 // zoom level has been updated. The plugin should only call this function |
| 525 // if the zoom change was triggered by the browser, it's only needed in case | 525 // if the zoom change was triggered by the browser, it's only needed in case |
| 526 // a plugin can update its own zoom, say because of its own UI. | 526 // a plugin can update its own zoom, say because of its own UI. |
| 527 void fullFramePluginZoomLevelChanged(double zoomLevel); | 527 void fullFramePluginZoomLevelChanged(double zoomLevel); |
| 528 | 528 |
| 529 void computeScaleAndScrollForBlockRect(const WebRect& blockRect, float paddi
ng, float& scale, WebPoint& scroll, bool& doubleTapShouldZoomOut); | 529 void computeScaleAndScrollForBlockRect(const WebRect& blockRect, float paddi
ng, float defaultScaleWhenAlreadyLegible, float& scale, WebPoint& scroll); |
| 530 WebCore::Node* bestTapNode(const WebCore::PlatformGestureEvent& tapEvent); | 530 WebCore::Node* bestTapNode(const WebCore::PlatformGestureEvent& tapEvent); |
| 531 void enableTapHighlight(const WebCore::PlatformGestureEvent& tapEvent); | 531 void enableTapHighlight(const WebCore::PlatformGestureEvent& tapEvent); |
| 532 void computeScaleAndScrollForFocusedNode(WebCore::Node* focusedNode, float&
scale, WebCore::IntPoint& scroll, bool& needAnimation); | 532 void computeScaleAndScrollForFocusedNode(WebCore::Node* focusedNode, float&
scale, WebCore::IntPoint& scroll, bool& needAnimation); |
| 533 | 533 |
| 534 void animateDoubleTapZoom(const WebCore::IntPoint&); | 534 void animateDoubleTapZoom(const WebCore::IntPoint&); |
| 535 | 535 |
| 536 void enableFakePageScaleAnimationForTesting(bool); | 536 void enableFakePageScaleAnimationForTesting(bool); |
| 537 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo
mPending; } | 537 bool fakeDoubleTapAnimationPendingForTesting() const { return m_doubleTapZoo
mPending; } |
| 538 WebCore::IntPoint fakePageScaleAnimationTargetPositionForTesting() const { r
eturn m_fakePageScaleAnimationTargetPosition; } | 538 WebCore::IntPoint fakePageScaleAnimationTargetPositionForTesting() const { r
eturn m_fakePageScaleAnimationTargetPosition; } |
| 539 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS
caleAnimationPageScaleFactor; } | 539 float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageS
caleAnimationPageScaleFactor; } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 566 | 566 |
| 567 // Returns the bounding box of the block type node touched by the WebRect. | 567 // Returns the bounding box of the block type node touched by the WebRect. |
| 568 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); | 568 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); |
| 569 | 569 |
| 570 WebCore::IntPoint clampOffsetAtScale(const WebCore::IntPoint& offset, float
scale); | 570 WebCore::IntPoint clampOffsetAtScale(const WebCore::IntPoint& offset, float
scale); |
| 571 | 571 |
| 572 // Exposed for tests. | 572 // Exposed for tests. |
| 573 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 573 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
| 574 | 574 |
| 575 private: | 575 private: |
| 576 float legibleScale() const; |
| 576 void refreshPageScaleFactorAfterLayout(); | 577 void refreshPageScaleFactorAfterLayout(); |
| 577 void setUserAgentPageScaleConstraints(WebCore::PageScaleConstraints newConst
raints); | 578 void setUserAgentPageScaleConstraints(WebCore::PageScaleConstraints newConst
raints); |
| 578 float clampPageScaleFactorToLimits(float) const; | 579 float clampPageScaleFactorToLimits(float) const; |
| 579 WebCore::IntSize contentsSize() const; | 580 WebCore::IntSize contentsSize() const; |
| 580 | 581 |
| 581 void resetSavedScrollAndScaleState(); | 582 void resetSavedScrollAndScaleState(); |
| 582 | 583 |
| 583 void updateMainFrameScrollPosition(const WebCore::IntPoint& scrollPosition,
bool programmaticScroll); | 584 void updateMainFrameScrollPosition(const WebCore::IntPoint& scrollPosition,
bool programmaticScroll); |
| 584 | 585 |
| 585 friend class WebView; // So WebView::Create can call our constructor | 586 friend class WebView; // So WebView::Create can call our constructor |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 inline WebViewImpl* toWebViewImpl(WebView* webView) | 842 inline WebViewImpl* toWebViewImpl(WebView* webView) |
| 842 { | 843 { |
| 843 // We have no ways to check if the specified WebView is an instance of | 844 // We have no ways to check if the specified WebView is an instance of |
| 844 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 845 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 845 return static_cast<WebViewImpl*>(webView); | 846 return static_cast<WebViewImpl*>(webView); |
| 846 } | 847 } |
| 847 | 848 |
| 848 } // namespace WebKit | 849 } // namespace WebKit |
| 849 | 850 |
| 850 #endif | 851 #endif |
| OLD | NEW |