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; |