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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2907663004: FrameTree::Find only searches relative to local frames. (Closed)
Patch Set: Rebasing... Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 WebLocalFrameImpl* WebLocalFrameImpl::LocalRoot() { 2024 WebLocalFrameImpl* WebLocalFrameImpl::LocalRoot() {
2025 // This can't use the LocalFrame::localFrameRoot, since it may be called 2025 // This can't use the LocalFrame::localFrameRoot, since it may be called
2026 // when the WebLocalFrame exists but the core LocalFrame does not. 2026 // when the WebLocalFrame exists but the core LocalFrame does not.
2027 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. 2027 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place.
2028 WebLocalFrameImpl* local_root = this; 2028 WebLocalFrameImpl* local_root = this;
2029 while (local_root->Parent() && local_root->Parent()->IsWebLocalFrame()) 2029 while (local_root->Parent() && local_root->Parent()->IsWebLocalFrame())
2030 local_root = ToWebLocalFrameImpl(local_root->Parent()); 2030 local_root = ToWebLocalFrameImpl(local_root->Parent());
2031 return local_root; 2031 return local_root;
2032 } 2032 }
2033 2033
2034 WebFrame* WebLocalFrameImpl::FindFrameByName(const WebString& name) {
2035 Frame* result = GetFrame()->Tree().Find(name);
2036 return WebFrame::FromFrame(result);
2037 }
2038
2034 void WebLocalFrameImpl::SendPings(const WebURL& destination_url) { 2039 void WebLocalFrameImpl::SendPings(const WebURL& destination_url) {
2035 DCHECK(GetFrame()); 2040 DCHECK(GetFrame());
2036 DCHECK(context_menu_node_.Get()); 2041 DCHECK(context_menu_node_.Get());
2037 Element* anchor = context_menu_node_->EnclosingLinkEventParentOrSelf(); 2042 Element* anchor = context_menu_node_->EnclosingLinkEventParentOrSelf();
2038 if (isHTMLAnchorElement(anchor)) 2043 if (isHTMLAnchorElement(anchor))
2039 toHTMLAnchorElement(anchor)->SendPings(destination_url); 2044 toHTMLAnchorElement(anchor)->SendPings(destination_url);
2040 } 2045 }
2041 2046
2042 bool WebLocalFrameImpl::DispatchBeforeUnloadEvent(bool is_reload) { 2047 bool WebLocalFrameImpl::DispatchBeforeUnloadEvent(bool is_reload) {
2043 if (!GetFrame()) 2048 if (!GetFrame())
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { 2602 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const {
2598 return *text_checker_client_; 2603 return *text_checker_client_;
2599 } 2604 }
2600 2605
2601 void WebLocalFrameImpl::SetTextCheckClient( 2606 void WebLocalFrameImpl::SetTextCheckClient(
2602 WebTextCheckClient* text_check_client) { 2607 WebTextCheckClient* text_check_client) {
2603 text_check_client_ = text_check_client; 2608 text_check_client_ = text_check_client;
2604 } 2609 }
2605 2610
2606 } // namespace blink 2611 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698