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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 1424593002: Update layout tests to use internals.visualViewport APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo delete test that depends on "inert-visual-viewport" flag Created 5 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 2f5acf4b3614df6ed73dc8bb2eb2f47fa20021bb..d124861ed419e3e543b309228fa97fa55e802566 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -2458,6 +2458,26 @@ void Internals::setVisualViewportOffset(int x, int y)
frame()->host()->visualViewport().setLocation(FloatPoint(x, y));
}
+int Internals::visualViewportHeight()
+{
+ return expandedIntSize(frame()->host()->visualViewport().visibleRect().size()).height();
+}
+
+int Internals::visualViewportWidth()
+{
+ return expandedIntSize(frame()->host()->visualViewport().visibleRect().size()).width();
+}
+
+double Internals::visualViewportScrollX()
+{
+ return frame()->view()->scrollableArea()->scrollPositionDouble().x();
+}
+
+double Internals::visualViewportScrollY()
+{
+ return frame()->view()->scrollableArea()->scrollPositionDouble().y();
+}
+
ValueIterable<int>::IterationSource* Internals::startIteration(ScriptState*, ExceptionState&)
{
return new InternalsIterationSource();
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698