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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dcheng's comment addressed Created 6 years, 6 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 | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 51c45460b378c2f15239fceba6f3b17969307127..f898592623922f2590c45cf466a97f077760f89a 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2488,11 +2488,14 @@ WebFrame* WebViewImpl::mainFrame()
WebFrame* WebViewImpl::findFrameByName(
const WebString& name, WebFrame* relativeToFrame)
{
+ // FIXME: Either this should only deal with WebLocalFrames or it should move to WebFrame.
if (!relativeToFrame)
relativeToFrame = mainFrame();
- LocalFrame* frame = toWebLocalFrameImpl(relativeToFrame)->frame();
+ Frame* frame = toWebLocalFrameImpl(relativeToFrame)->frame();
frame = frame->tree().find(name);
- return WebLocalFrameImpl::fromFrame(frame);
+ if (!frame->isLocalFrame())
+ return 0;
+ return WebLocalFrameImpl::fromFrame(toLocalFrame(frame));
}
WebFrame* WebViewImpl::focusedFrame()
@@ -3280,8 +3283,10 @@ void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint,
void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers)
{
Vector<uint32_t> result;
- for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- const WillBeHeapVector<DocumentMarker*>& documentMarkers = frame->document()->markers().markers();
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (!frame->isLocalFrame())
+ continue;
+ const WillBeHeapVector<DocumentMarker*>& documentMarkers = toLocalFrame(frame)->document()->markers().markers();
for (size_t i = 0; i < documentMarkers.size(); ++i)
result.append(documentMarkers[i]->hash());
}
@@ -3479,9 +3484,10 @@ void WebViewImpl::hidePopups()
void WebViewImpl::setIsTransparent(bool isTransparent)
{
// Set any existing frames to be transparent.
- LocalFrame* frame = m_page->mainFrame();
+ Frame* frame = m_page->mainFrame();
while (frame) {
- frame->view()->setTransparent(isTransparent);
+ if (frame->isLocalFrame())
+ toLocalFrame(frame)->view()->setTransparent(isTransparent);
frame = frame->tree().traverseNext();
}
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698