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

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

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: Addressed CR feedback Created 3 years, 7 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/web/tests/LayoutGeometryMapTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp b/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp
index de6d7918fc3d9527043b77253d598947ef73d23c..e481c8c9cc092941ebe179c5bc4375b6207a98ee 100644
--- a/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp
+++ b/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp
@@ -42,6 +42,7 @@
#include "public/web/WebFrameClient.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "web/WebLocalFrameImpl.h"
+#include "web/WebViewImpl.h"
#include "web/tests/FrameTestHelpers.h"
namespace blink {
@@ -66,11 +67,12 @@ class LayoutGeometryMapTest
static LayoutBox* GetFrameElement(const char* iframe_name,
WebView* web_view,
const WTF::AtomicString& element_id) {
- WebLocalFrameImpl* iframe = ToWebLocalFrameImpl(
- web_view->FindFrameByName(WebString::FromUTF8(iframe_name)));
- if (!iframe)
+ WebFrame* iframe =
+ static_cast<WebViewImpl*>(web_view)->MainFrameImpl()->FindFrameByName(
+ WebString::FromUTF8(iframe_name));
+ if (!iframe || !iframe->IsWebLocalFrame())
return nullptr;
- LocalFrame* frame = iframe->GetFrame();
+ LocalFrame* frame = ToWebLocalFrameImpl(iframe)->GetFrame();
Document* doc = frame->GetDocument();
Element* element = doc->getElementById(element_id);
if (!element)

Powered by Google App Engine
This is Rietveld 408576698