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

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

Issue 2431613002: Initial viewport is not the same as FrameView rect. (Closed)
Patch Set: DCHECK that initial viewport size is read from main frame only. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index c1d058d3ad7f28cfc677ed799b0c5128e726c3e1..1a99401fc2b06c315df222627dcd2e2638ddd12a 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -4480,4 +4480,26 @@ bool FrameView::canThrottleRendering() const {
(m_hiddenForThrottling && m_crossOriginForThrottling);
}
+void FrameView::setInitialViewportSize(const IntSize& viewportSize) {
+ if (viewportSize == m_initialViewportSize)
+ return;
+
+ m_initialViewportSize = viewportSize;
+ // TODO(rune@opera.com): Notify the viewport style resolver about the changed
+ // initial viewport:
+ //
+ // if (Document* document = m_frame->document())
+ // document->styleEngine().initialViewportChanged();
+}
+
+int FrameView::initialViewportWidth() const {
+ DCHECK(m_frame->isMainFrame());
+ return m_initialViewportSize.width();
+}
+
+int FrameView::initialViewportHeight() const {
+ DCHECK(m_frame->isMainFrame());
+ return m_initialViewportSize.height();
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698