| 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 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1802 if (webView->shouldAutoResize() && frame()->isLocalRoot()) | 1802 if (webView->shouldAutoResize() && frame()->isLocalRoot()) |
| 1803 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), webView->max
AutoSize()); | 1803 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), webView->max
AutoSize()); |
| 1804 | 1804 |
| 1805 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffsetForE
mulation, m_inputEventsScaleFactorForEmulation); | 1805 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffsetForE
mulation, m_inputEventsScaleFactorForEmulation); |
| 1806 frame()->view()->setDisplayMode(webView->displayMode()); | 1806 frame()->view()->setDisplayMode(webView->displayMode()); |
| 1807 } | 1807 } |
| 1808 | 1808 |
| 1809 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) | 1809 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) |
| 1810 { | 1810 { |
| 1811 if (!frame) | 1811 if (!frame) |
| 1812 return 0; | 1812 return nullptr; |
| 1813 return fromFrame(*frame); | 1813 return fromFrame(*frame); |
| 1814 } | 1814 } |
| 1815 | 1815 |
| 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 nullptr; |
| 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)) | 1827 return nullptr; |
| 1828 return 0; | 1828 return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(element)->contentFrame
())); |
| 1829 return fromFrame(toLocalFrame(toHTMLFrameElementBase(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 nullptr; |
| 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 |
| 1840 { | 1839 { |
| 1841 return m_devToolsAgent.get(); | 1840 return m_devToolsAgent.get(); |
| 1842 } | 1841 } |
| 1843 | 1842 |
| 1844 WebDataSourceImpl* WebLocalFrameImpl::dataSourceImpl() const | 1843 WebDataSourceImpl* WebLocalFrameImpl::dataSourceImpl() const |
| 1845 { | 1844 { |
| (...skipping 371 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 |