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

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

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: Rebasing... 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 404c948143b6b552ed5f8d69c243392a8b768766..1e0d49cf6464375085e1751955f3003cc39e530d 100644
--- a/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp
+++ b/third_party/WebKit/Source/web/tests/LayoutGeometryMapTest.cpp
@@ -42,6 +42,8 @@
#include "public/platform/WebURLLoaderMockFactory.h"
#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 +68,12 @@ class LayoutGeometryMapTest
static LayoutBox* GetFrameElement(const char* iframe_name,
WebView* web_view,
const WTF::AtomicString& element_id) {
- WebLocalFrameBase* iframe = ToWebLocalFrameBase(
- 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)
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698