OLD | NEW |
---|---|
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 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1810 toRemoteFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginWidth); | 1810 toRemoteFrameOwner(owner)->setMarginWidth(frameOwnerProperties.marginWidth); |
1811 toRemoteFrameOwner(owner)->setMarginHeight(frameOwnerProperties.marginHeight ); | 1811 toRemoteFrameOwner(owner)->setMarginHeight(frameOwnerProperties.marginHeight ); |
1812 } | 1812 } |
1813 | 1813 |
1814 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() | 1814 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() |
1815 { | 1815 { |
1816 // This can't use the LocalFrame::localFrameRoot, since it may be called | 1816 // This can't use the LocalFrame::localFrameRoot, since it may be called |
1817 // when the WebLocalFrame exists but the core LocalFrame does not. | 1817 // when the WebLocalFrame exists but the core LocalFrame does not. |
1818 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. | 1818 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. |
1819 WebLocalFrameImpl* localRoot = this; | 1819 WebLocalFrameImpl* localRoot = this; |
1820 while (!localRoot->frameWidget()) | 1820 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame()) |
dcheng
2016/05/24 20:38:24
Why do we have to change this line?
lfg
2016/05/24 23:33:51
After the renderer receives a ViewMsg_Close, the W
| |
1821 localRoot = toWebLocalFrameImpl(localRoot->parent()); | 1821 localRoot = toWebLocalFrameImpl(localRoot->parent()); |
1822 return localRoot; | 1822 return localRoot; |
1823 } | 1823 } |
1824 | 1824 |
1825 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const | 1825 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const |
1826 { | 1826 { |
1827 WebFrame* previousLocalFrame = this->traversePrevious(wrap); | 1827 WebFrame* previousLocalFrame = this->traversePrevious(wrap); |
1828 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame()) | 1828 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame()) |
1829 previousLocalFrame = previousLocalFrame->traversePrevious(wrap); | 1829 previousLocalFrame = previousLocalFrame->traversePrevious(wrap); |
1830 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr; | 1830 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2106 return WebSandboxFlags::None; | 2106 return WebSandboxFlags::None; |
2107 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); | 2107 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); |
2108 } | 2108 } |
2109 | 2109 |
2110 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2110 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
2111 { | 2111 { |
2112 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2112 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2113 } | 2113 } |
2114 | 2114 |
2115 } // namespace blink | 2115 } // namespace blink |
OLD | NEW |