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

Unified Diff: Source/web/tests/ViewportTest.cpp

Issue 219123002: Read the default min-width value from the UA style sheets (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ViewportTest.cpp
diff --git a/Source/web/tests/ViewportTest.cpp b/Source/web/tests/ViewportTest.cpp
index 3ad4aeeeba81dc6bc67b945f7936fbf83d68ebad..36c0e045eff378281bee90de565c880bc1236321 100644
--- a/Source/web/tests/ViewportTest.cpp
+++ b/Source/web/tests/ViewportTest.cpp
@@ -37,12 +37,13 @@
#include "WebScriptSource.h"
#include "WebSettings.h"
#include "WebViewClient.h"
-#include "core/dom/ViewportDescription.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/page/InjectedStyleSheets.h"
#include "core/page/Page.h"
#include "core/page/PageScaleConstraints.h"
#include "core/frame/Settings.h"
+#include "platform/Length.h"
#include "platform/geometry/IntPoint.h"
#include "platform/geometry/IntRect.h"
#include "platform/geometry/IntSize.h"
@@ -127,9 +128,8 @@ static PageScaleConstraints runViewportTest(Page* page, int initialWidth, int in
{
IntSize initialViewportSize(initialWidth, initialHeight);
page->mainFrame()->view()->setFrameRect(IntRect(IntPoint::zero(), initialViewportSize));
-
ViewportDescription description = page->viewportDescription();
- PageScaleConstraints constraints = description.resolve(initialViewportSize);
+ PageScaleConstraints constraints = description.resolve(initialViewportSize, WebCore::Length(980, WebCore::Fixed));
constraints.fitToContentsWidth(constraints.layoutSize.width(), initialWidth);
return constraints;
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698