| 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 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1788 { | 1788 { |
| 1789 return m_devToolsAgent.get(); | 1789 return m_devToolsAgent.get(); |
| 1790 } | 1790 } |
| 1791 | 1791 |
| 1792 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() | 1792 WebLocalFrameImpl* WebLocalFrameImpl::localRoot() |
| 1793 { | 1793 { |
| 1794 // This can't use the LocalFrame::localFrameRoot, since it may be called | 1794 // This can't use the LocalFrame::localFrameRoot, since it may be called |
| 1795 // when the WebLocalFrame exists but the core LocalFrame does not. | 1795 // when the WebLocalFrame exists but the core LocalFrame does not. |
| 1796 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. | 1796 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. |
| 1797 WebLocalFrameImpl* localRoot = this; | 1797 WebLocalFrameImpl* localRoot = this; |
| 1798 while (!localRoot->frameWidget()) | 1798 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame()) |
| 1799 localRoot = toWebLocalFrameImpl(localRoot->parent()); | 1799 localRoot = toWebLocalFrameImpl(localRoot->parent()); |
| 1800 return localRoot; | 1800 return localRoot; |
| 1801 } | 1801 } |
| 1802 | 1802 |
| 1803 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const | 1803 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const |
| 1804 { | 1804 { |
| 1805 WebFrame* previousLocalFrame = this->traversePrevious(wrap); | 1805 WebFrame* previousLocalFrame = this->traversePrevious(wrap); |
| 1806 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame()) | 1806 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame()) |
| 1807 previousLocalFrame = previousLocalFrame->traversePrevious(wrap); | 1807 previousLocalFrame = previousLocalFrame->traversePrevious(wrap); |
| 1808 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr; | 1808 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 return WebSandboxFlags::None; | 2092 return WebSandboxFlags::None; |
| 2093 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2093 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2094 } | 2094 } |
| 2095 | 2095 |
| 2096 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2096 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
| 2097 { | 2097 { |
| 2098 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2098 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2099 } | 2099 } |
| 2100 | 2100 |
| 2101 } // namespace blink | 2101 } // namespace blink |
| OLD | NEW |