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

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

Issue 2036403002: Always use the WebFrameWidget when attaching the root graphics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 { 1786 {
1787 return m_devToolsAgent.get(); 1787 return m_devToolsAgent.get();
1788 } 1788 }
1789 1789
1790 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() 1790 WebLocalFrameImpl* WebLocalFrameImpl::localRoot()
1791 { 1791 {
1792 // This can't use the LocalFrame::localFrameRoot, since it may be called 1792 // This can't use the LocalFrame::localFrameRoot, since it may be called
1793 // when the WebLocalFrame exists but the core LocalFrame does not. 1793 // when the WebLocalFrame exists but the core LocalFrame does not.
1794 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. 1794 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place.
1795 WebLocalFrameImpl* localRoot = this; 1795 WebLocalFrameImpl* localRoot = this;
1796 while (!localRoot->frameWidget()) 1796 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame())
1797 localRoot = toWebLocalFrameImpl(localRoot->parent()); 1797 localRoot = toWebLocalFrameImpl(localRoot->parent());
1798 return localRoot; 1798 return localRoot;
1799 } 1799 }
1800 1800
1801 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const 1801 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const
1802 { 1802 {
1803 WebFrame* previousLocalFrame = this->traversePrevious(wrap); 1803 WebFrame* previousLocalFrame = this->traversePrevious(wrap);
1804 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame()) 1804 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame())
1805 previousLocalFrame = previousLocalFrame->traversePrevious(wrap); 1805 previousLocalFrame = previousLocalFrame->traversePrevious(wrap);
1806 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr; 1806 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr;
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 return WebSandboxFlags::None; 2090 return WebSandboxFlags::None;
2091 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2091 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2092 } 2092 }
2093 2093
2094 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2094 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2095 { 2095 {
2096 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2096 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2097 } 2097 }
2098 2098
2099 } // namespace blink 2099 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698