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 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame& frame) | 1816 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame& frame) |
1817 { | 1817 { |
1818 FrameLoaderClient* client = frame.loader().client(); | 1818 FrameLoaderClient* client = frame.loader().client(); |
1819 if (!client || !client->isFrameLoaderClientImpl()) | 1819 if (!client || !client->isFrameLoaderClientImpl()) |
1820 return 0; | 1820 return 0; |
1821 return toFrameLoaderClientImpl(client)->webFrame(); | 1821 return toFrameLoaderClientImpl(client)->webFrame(); |
1822 } | 1822 } |
1823 | 1823 |
1824 WebLocalFrameImpl* WebLocalFrameImpl::fromFrameOwnerElement(Element* element) | 1824 WebLocalFrameImpl* WebLocalFrameImpl::fromFrameOwnerElement(Element* element) |
1825 { | 1825 { |
1826 // FIXME: Why do we check specifically for <iframe> and <frame> here? Why ca
n't we get the WebLocalFrameImpl from an <object> element, for example. | 1826 if (!element->isFrameOwnerElement()) |
1827 if (!isHTMLFrameElementBase(element)) | |
1828 return 0; | 1827 return 0; |
1829 return fromFrame(toLocalFrame(toHTMLFrameElementBase(element)->contentFrame(
))); | 1828 return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(element)->contentFrame
())); |
1830 } | 1829 } |
1831 | 1830 |
1832 WebViewImpl* WebLocalFrameImpl::viewImpl() const | 1831 WebViewImpl* WebLocalFrameImpl::viewImpl() const |
1833 { | 1832 { |
1834 if (!frame()) | 1833 if (!frame()) |
1835 return 0; | 1834 return 0; |
1836 return WebViewImpl::fromPage(frame()->page()); | 1835 return WebViewImpl::fromPage(frame()->page()); |
1837 } | 1836 } |
1838 | 1837 |
1839 WebDevToolsAgentImpl* WebLocalFrameImpl::devToolsAgentImpl() const | 1838 WebDevToolsAgentImpl* WebLocalFrameImpl::devToolsAgentImpl() const |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 } | 2216 } |
2218 | 2217 |
2219 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2218 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
2220 { | 2219 { |
2221 if (!frame()) | 2220 if (!frame()) |
2222 return WebSandboxFlags::None; | 2221 return WebSandboxFlags::None; |
2223 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2222 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2224 } | 2223 } |
2225 | 2224 |
2226 } // namespace blink | 2225 } // namespace blink |
OLD | NEW |