Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: Source/web/WebViewImpl.h

Issue 584833003: Made double-tap zoom work in pinch virtual viewport mode. (Blink-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix assert Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE; 108 virtual void paint(WebCanvas*, const WebRect&) OVERRIDE;
109 #if OS(ANDROID) 109 #if OS(ANDROID)
110 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) OVERRIDE; 110 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) OVERRIDE;
111 #endif 111 #endif
112 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* ) OVERRIDE; 112 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* ) OVERRIDE;
113 virtual bool isTrackingRepaints() const OVERRIDE; 113 virtual bool isTrackingRepaints() const OVERRIDE;
114 virtual void themeChanged() OVERRIDE; 114 virtual void themeChanged() OVERRIDE;
115 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; 115 virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
116 virtual void setCursorVisibilityState(bool isVisible) OVERRIDE; 116 virtual void setCursorVisibilityState(bool isVisible) OVERRIDE;
117 virtual bool hasTouchEventHandlersAt(const WebPoint&) OVERRIDE; 117 virtual bool hasTouchEventHandlersAt(const WebPoint&) OVERRIDE;
118
119 // FIXME(bokan): Old pinch path only - This should be removed once old pinch
120 // is removed.
118 virtual void applyViewportDeltas( 121 virtual void applyViewportDeltas(
119 const WebSize& scrollDelta, 122 const WebSize& scrollDelta,
120 float pageScaleDelta, 123 float pageScaleDelta,
121 float topControlsDelta) OVERRIDE; 124 float topControlsDelta) OVERRIDE;
122 virtual void applyViewportDeltas( 125 virtual void applyViewportDeltas(
123 const WebSize& pinchViewportDelta, 126 const WebSize& pinchViewportDelta,
124 const WebSize& mainFrameDelta, 127 const WebSize& mainFrameDelta,
125 float pageScaleDelta, 128 float pageScaleDelta,
126 float topControlsDelta) OVERRIDE; 129 float topControlsDelta) OVERRIDE;
127 virtual void mouseCaptureLost() OVERRIDE; 130 virtual void mouseCaptureLost() OVERRIDE;
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 486
484 // Exposed for tests. 487 // Exposed for tests.
485 unsigned numLinkHighlights() { return m_linkHighlights.size(); } 488 unsigned numLinkHighlights() { return m_linkHighlights.size(); }
486 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); } 489 LinkHighlight* linkHighlight(int i) { return m_linkHighlights[i].get(); }
487 490
488 WebSettingsImpl* settingsImpl(); 491 WebSettingsImpl* settingsImpl();
489 492
490 // Returns the bounding box of the block type node touched by the WebRect. 493 // Returns the bounding box of the block type node touched by the WebRect.
491 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping); 494 WebRect computeBlockBounds(const WebRect&, bool ignoreClipping);
492 495
496 // FIXME(bokan): Replace with PinchViewport::clampDocumentOffsetAtScale once
497 // old-path is gone.
493 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); 498 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale);
494 499
495 // Exposed for tests. 500 // Exposed for tests.
496 WebVector<WebCompositionUnderline> compositionUnderlines() const; 501 WebVector<WebCompositionUnderline> compositionUnderlines() const;
497 502
498 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; } 503 WebLayerTreeView* layerTreeView() const { return m_layerTreeView; }
499 504
500 bool pinchVirtualViewportEnabled() const; 505 bool pinchVirtualViewportEnabled() const;
501 506
502 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; } 507 bool matchesHeuristicsForGpuRasterizationForTesting() const { return m_match esHeuristicsForGpuRasterization; }
503 508
504 virtual void setTopControlsLayoutHeight(float) OVERRIDE; 509 virtual void setTopControlsLayoutHeight(float) OVERRIDE;
505 510
506 private: 511 private:
507 void didUpdateTopControls(); 512 void didUpdateTopControls();
508 void setTopControlsContentOffset(float); 513 void setTopControlsContentOffset(float);
509 514
510 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to 515 // TODO(bokan): Remains for legacy pinch. Remove once it's gone. Made privat e to
511 // prevent external usage 516 // prevent external usage
512 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE; 517 virtual void setPageScaleFactor(float scaleFactor, const WebPoint& origin) O VERRIDE;
518 void setPageScaleFactorAndLocation(float, const FloatPoint&);
513 519
514 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO rigin, const FloatPoint& pinchViewportOrigin); 520 void scrollAndRescaleViewports(float scaleFactor, const IntPoint& mainFrameO rigin, const FloatPoint& pinchViewportOrigin);
515 521
516 IntRect visibleRectInDocument() const; 522 IntRect visibleRectInDocument() const;
517 523
518 float legibleScale() const; 524 float legibleScale() const;
519 void refreshPageScaleFactorAfterLayout(); 525 void refreshPageScaleFactorAfterLayout();
520 void resumeTreeViewCommits(); 526 void resumeTreeViewCommits();
521 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); 527 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints);
522 float clampPageScaleFactorToLimits(float) const; 528 float clampPageScaleFactorToLimits(float) const;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 float m_topControlsLayoutHeight; 754 float m_topControlsLayoutHeight;
749 }; 755 };
750 756
751 // We have no ways to check if the specified WebView is an instance of 757 // We have no ways to check if the specified WebView is an instance of
752 // WebViewImpl because WebViewImpl is the only implementation of WebView. 758 // WebViewImpl because WebViewImpl is the only implementation of WebView.
753 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 759 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
754 760
755 } // namespace blink 761 } // namespace blink
756 762
757 #endif 763 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698