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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 1447273003: Make the FloatSize constructor from an IntSize explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index 0eedd1699e2d17d1c695d81937ea8a16270a0ce0..b13c3b0c43bfa85d046121437ee380efda5b999e 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -106,7 +106,7 @@ void VisualViewport::setSize(const IntSize& size)
m_size = size;
if (m_innerViewportContainerLayer) {
- m_innerViewportContainerLayer->setSize(m_size);
+ m_innerViewportContainerLayer->setSize(FloatSize(m_size));
// Need to re-compute sizes for the overlay scrollbars.
initializeScrollbars();
@@ -130,7 +130,7 @@ void VisualViewport::mainFrameDidChangeSize()
// In unit tests we may not have initialized the layer tree.
if (m_innerViewportScrollLayer)
- m_innerViewportScrollLayer->setSize(contentsSize());
+ m_innerViewportScrollLayer->setSize(FloatSize(contentsSize()));
clampToBoundaries();
}
@@ -319,7 +319,7 @@ void VisualViewport::attachToLayerTree(GraphicsLayer* currentLayerTreeRoot, Grap
// Set masks to bounds so the compositor doesn't clobber a manually
// set inner viewport container layer size.
m_innerViewportContainerLayer->setMasksToBounds(frameHost().settings().mainFrameClipsContent());
- m_innerViewportContainerLayer->setSize(m_size);
+ m_innerViewportContainerLayer->setSize(FloatSize(m_size));
m_innerViewportScrollLayer->platformLayer()->setScrollClipLayer(
m_innerViewportContainerLayer->platformLayer());
@@ -389,7 +389,7 @@ void VisualViewport::setupScrollbar(WebScrollbar::Orientation orientation)
// Use the GraphicsLayer to position the scrollbars.
scrollbarGraphicsLayer->setPosition(IntPoint(xPosition, yPosition));
- scrollbarGraphicsLayer->setSize(IntSize(width, height));
+ scrollbarGraphicsLayer->setSize(FloatSize(width, height));
scrollbarGraphicsLayer->setContentsRect(IntRect(0, 0, width, height));
}
@@ -484,7 +484,7 @@ DoublePoint VisualViewport::maximumScrollPositionDouble() const
}
frameViewSize.scale(m_scale);
- frameViewSize = flooredIntSize(frameViewSize);
+ frameViewSize = FloatSize(flooredIntSize(frameViewSize));
FloatSize viewportSize(m_size);
viewportSize.expand(0, m_topControlsAdjustment);
« no previous file with comments | « third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698