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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTestHelper.h

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
Index: third_party/WebKit/Source/core/layout/LayoutTestHelper.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.h b/third_party/WebKit/Source/core/layout/LayoutTestHelper.h
index b27abacce30511ef9d65fa87ecc815ef2973faf7..d18c49b53d5babc63a8c6cf6ee5e52f7628b8865 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.h
@@ -50,6 +50,12 @@ protected:
document().view()->updateAllLifecyclePhases();
}
+ LayoutObject* getLayoutObjectByElementId(const char* id) const
+ {
+ Node* node = document().getElementById(id);
+ return node ? node->layoutObject() : nullptr;
+ }
+
private:
RefPtrWillBePersistent<LocalFrame> m_subframe;
OwnPtrWillBePersistent<FrameLoaderClient> m_frameLoaderClient;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp ('k') | third_party/WebKit/Source/core/layout/PaginationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698