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

Unified Diff: third_party/WebKit/Source/core/layout/PaginationTest.cpp

Issue 1662483002: Introduce RenderingTest::getLayoutObjectByElementId(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/LayoutTestHelper.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/core/layout/PaginationTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/PaginationTest.cpp b/third_party/WebKit/Source/core/layout/PaginationTest.cpp
index c779bb9701ca91ad186301fb74e23c7b411ef439..3c1e97d406550b0dae3a5025bf325471bed011dd 100644
--- a/third_party/WebKit/Source/core/layout/PaginationTest.cpp
+++ b/third_party/WebKit/Source/core/layout/PaginationTest.cpp
@@ -14,19 +14,19 @@ class PaginationStrutTest : public RenderingTest {
public:
int strutForBox(const char* blockId)
{
- Node* node = document().getElementById(blockId);
- if (!node || !node->layoutObject() || !node->layoutObject()->isBox())
+ LayoutObject* layoutObject = getLayoutObjectByElementId(blockId);
+ if (!layoutObject || !layoutObject->isBox())
return std::numeric_limits<int>::min();
- LayoutBox* box = toLayoutBox(node->layoutObject());
+ LayoutBox* box = toLayoutBox(layoutObject);
return box->paginationStrut().toInt();
}
int strutForLine(const char* containerId, int lineIndex)
{
- Node* node = document().getElementById(containerId);
- if (!node || !node->layoutObject() || !node->layoutObject()->isLayoutBlockFlow())
+ LayoutObject* layoutObject = getLayoutObjectByElementId(containerId);
+ if (!layoutObject || !layoutObject->isLayoutBlockFlow())
return std::numeric_limits<int>::min();
- LayoutBlockFlow* block = toLayoutBlockFlow(node->layoutObject());
+ LayoutBlockFlow* block = toLayoutBlockFlow(layoutObject);
if (block->multiColumnFlowThread())
block = block->multiColumnFlowThread();
for (RootInlineBox* line = block->firstRootBox(); line; line = line->nextRootBox(), lineIndex--) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTestHelper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698