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

Unified Diff: Source/core/page/FrameView.cpp

Issue 15927026: Enabled using viewport on desktop browsers behind experimental flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/page/FrameView.cpp
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index 8ff98d3bef09f7fdc669210827a202239ef35394..858724603bfe62c4c5df3ef28ebd873588303e5c 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -474,6 +474,24 @@ void FrameView::setMarginHeight(LayoutUnit h)
m_margins.setHeight(h);
}
+IntSize FrameView::layoutSize(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
+{
+ if (m_layoutSize.isEmpty())
+ return ScrollView::layoutSize(scrollbarInclusion);
aelias_OOO_until_Jul13 2013/07/31 22:31:21 I don't think we should keep using the ScrollView:
+
+ return m_layoutSize;
+}
+
+void FrameView::setLayoutSize(const IntSize& newSize)
aelias_OOO_until_Jul13 2013/07/31 22:31:21 Could you just layout() when this is called and re
+{
+ if (m_layoutSize == newSize)
+ return;
+
+ m_layoutSize = newSize;
+ updateScrollbars(scrollOffset());
+ contentsResized();
+}
+
void FrameView::setCanHaveScrollbars(bool canHaveScrollbars)
{
m_canHaveScrollbars = canHaveScrollbars;
@@ -1712,7 +1730,7 @@ void FrameView::visibleContentsResized()
if (!frame()->view())
return;
- if (!useFixedLayout() && needsLayout())
+ if (m_layoutSize.isEmpty() && needsLayout())
layout();
if (RenderView* renderView = this->renderView()) {

Powered by Google App Engine
This is Rietveld 408576698