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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 | 474 |
475 // Exposed for tests. | 475 // Exposed for tests. |
476 unsigned numLinkHighlights() { return m_linkHighlights.size(); } | 476 unsigned numLinkHighlights() { return m_linkHighlights.size(); } |
477 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } | 477 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } |
478 | 478 |
479 WebSettingsImpl* settingsImpl(); | 479 WebSettingsImpl* settingsImpl(); |
480 | 480 |
481 // Returns the bounding box of the block type node touched by the WebRect. | 481 // Returns the bounding box of the block type node touched by the WebRect. |
482 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); | 482 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); |
483 | 483 |
| 484 // FIXME(bokan): Replace with PinchViewport::clampDocumentOffsetAtScale once |
| 485 // old-path is gone. |
484 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); | 486 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); |
485 | 487 |
486 // Exposed for tests. | 488 // Exposed for tests. |
487 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 489 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
488 | 490 |
489 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } | 491 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } |
490 | 492 |
491 bool pinchVirtualViewportEnabled() const; | 493 bool pinchVirtualViewportEnabled() const; |
492 | 494 |
493 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } | 495 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match
esHeuristicsForGpuRasterization; } |
494 | 496 |
495 private: | 497 private: |
496 void setTopControlsContentOffset(float); | 498 void setTopControlsContentOffset(float); |
497 | 499 |
498 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to | 500 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat
e to |
499 // prevent external usage | 501 // prevent external usage |
500 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; | 502 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O
VERRIDE; |
| 503 void setPageScaleFactorFromImpl(float); |
501 | 504 |
502 float legibleScale() const; | 505 float legibleScale() const; |
503 void refreshPageScaleFactorAfterLayout(); | 506 void refreshPageScaleFactorAfterLayout(); |
504 void resumeTreeViewCommits(); | 507 void resumeTreeViewCommits(); |
505 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); | 508 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); |
506 float clampPageScaleFactorToLimits(float) const; | 509 float clampPageScaleFactorToLimits(float) const; |
507 IntSize contentsSize() const; | 510 IntSize contentsSize() const; |
508 | 511 |
509 void resetSavedScrollAndScaleState(); | 512 void resetSavedScrollAndScaleState(); |
510 | 513 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 float m_topControlsContentOffset; | 730 float m_topControlsContentOffset; |
728 }; | 731 }; |
729 | 732 |
730 // We have no ways to check if the specified WebView is an instance of | 733 // We have no ways to check if the specified WebView is an instance of |
731 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 734 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
732 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 735 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
733 | 736 |
734 } // namespace blink | 737 } // namespace blink |
735 | 738 |
736 #endif | 739 #endif |
OLD | NEW |