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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2053113003: [Layout API] Use Document::layoutViewItem in WebFrameTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index f51dc9513aa3c459ea4399572efde15cfbd67a52..5e2a8e8d2d80d4cd14d1ab6fc73cdb2e0e075496 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -881,11 +881,11 @@ void enableViewportSettings(WebSettings* settings)
bool setTextAutosizingMultiplier(Document* document, float multiplier)
{
bool multiplierSet = false;
- for (LayoutObject* layoutObject = document->layoutView(); layoutObject; layoutObject = layoutObject->nextInPreOrder()) {
- if (layoutObject->style()) {
- layoutObject->mutableStyleRef().setTextAutosizingMultiplier(multiplier);
+ for (LayoutItem layoutItem = document->layoutViewItem(); !layoutItem.isNull(); layoutItem = layoutItem.nextInPreOrder()) {
+ if (layoutItem.style()) {
+ layoutItem.mutableStyleRef().setTextAutosizingMultiplier(multiplier);
- EXPECT_EQ(multiplier, layoutObject->style()->textAutosizingMultiplier());
+ EXPECT_EQ(multiplier, layoutItem.style()->textAutosizingMultiplier());
multiplierSet = true;
}
}
@@ -896,9 +896,9 @@ bool setTextAutosizingMultiplier(Document* document, float multiplier)
bool checkTextAutosizingMultiplier(Document* document, float multiplier)
{
bool multiplierChecked = false;
- for (LayoutObject* layoutObject = document->layoutView(); layoutObject; layoutObject = layoutObject->nextInPreOrder()) {
- if (layoutObject->style() && layoutObject->isText()) {
- EXPECT_EQ(multiplier, layoutObject->style()->textAutosizingMultiplier());
+ for (LayoutItem layoutItem = document->layoutViewItem(); !layoutItem.isNull(); layoutItem = layoutItem.nextInPreOrder()) {
+ if (layoutItem.style() && layoutItem.isText()) {
+ EXPECT_EQ(multiplier, layoutItem.style()->textAutosizingMultiplier());
multiplierChecked = true;
}
}
@@ -977,9 +977,9 @@ TEST_P(ParameterizedWebFrameTest, VisualViewportSetSizeInvalidatesTextAutosizing
if (!frame->isLocalFrame())
continue;
EXPECT_TRUE(setTextAutosizingMultiplier(toLocalFrame(frame)->document(), 2));
- for (LayoutObject* layoutObject = toLocalFrame(frame)->document()->layoutView(); layoutObject; layoutObject = layoutObject->nextInPreOrder()) {
- if (layoutObject->isText())
- EXPECT_FALSE(layoutObject->needsLayout());
+ for (LayoutItem layoutItem = toLocalFrame(frame)->document()->layoutViewItem(); !layoutItem.isNull(); layoutItem = layoutItem.nextInPreOrder()) {
+ if (layoutItem.isText())
+ EXPECT_FALSE(layoutItem.needsLayout());
}
}
@@ -988,9 +988,9 @@ TEST_P(ParameterizedWebFrameTest, VisualViewportSetSizeInvalidatesTextAutosizing
for (Frame* frame = mainFrame; frame; frame = frame->tree().traverseNext()) {
if (!frame->isLocalFrame())
continue;
- for (LayoutObject* layoutObject = toLocalFrame(frame)->document()->layoutView(); layoutObject; layoutObject = layoutObject->nextInPreOrder()) {
- if (layoutObject->isText())
- EXPECT_TRUE(layoutObject->needsLayout());
+ for (LayoutItem layoutItem = toLocalFrame(frame)->document()->layoutViewItem(); !layoutItem.isNull(); layoutItem = layoutItem.nextInPreOrder()) {
+ if (layoutItem.isText())
+ EXPECT_TRUE(layoutItem.needsLayout());
}
}
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/LayoutItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698