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 { | 1810 { |
1811 // This can't use the LocalFrame::localFrameRoot, since it may be called | 1811 // This can't use the LocalFrame::localFrameRoot, since it may be called |
1812 // when the WebLocalFrame exists but the core LocalFrame does not. | 1812 // when the WebLocalFrame exists but the core LocalFrame does not. |
1813 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. | 1813 // TODO(alexmos, dcheng): Clean this up to only calculate this in one place. |
1814 WebLocalFrameImpl* localRoot = this; | 1814 WebLocalFrameImpl* localRoot = this; |
1815 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame()) | 1815 while (localRoot->parent() && localRoot->parent()->isWebLocalFrame()) |
1816 localRoot = toWebLocalFrameImpl(localRoot->parent()); | 1816 localRoot = toWebLocalFrameImpl(localRoot->parent()); |
1817 return localRoot; | 1817 return localRoot; |
1818 } | 1818 } |
1819 | 1819 |
1820 WebLocalFrame* WebLocalFrameImpl::traversePreviousLocal(bool wrap) const | |
1821 { | |
1822 WebFrame* previousLocalFrame = this->traversePrevious(wrap); | |
1823 while (previousLocalFrame && !previousLocalFrame->isWebLocalFrame()) | |
1824 previousLocalFrame = previousLocalFrame->traversePrevious(wrap); | |
1825 return previousLocalFrame ? previousLocalFrame->toWebLocalFrame() : nullptr; | |
1826 } | |
1827 | |
1828 WebLocalFrame* WebLocalFrameImpl::traverseNextLocal(bool wrap) const | |
1829 { | |
1830 WebFrame* nextLocalFrame = this->traverseNext(wrap); | |
1831 while (nextLocalFrame && !nextLocalFrame->isWebLocalFrame()) | |
1832 nextLocalFrame = nextLocalFrame->traverseNext(wrap); | |
1833 return nextLocalFrame ? nextLocalFrame->toWebLocalFrame() : nullptr; | |
1834 } | |
1835 | |
1836 void WebLocalFrameImpl::sendPings(const WebURL& destinationURL) | 1820 void WebLocalFrameImpl::sendPings(const WebURL& destinationURL) |
1837 { | 1821 { |
1838 DCHECK(frame()); | 1822 DCHECK(frame()); |
1839 DCHECK(m_contextMenuNode.get()); | 1823 DCHECK(m_contextMenuNode.get()); |
1840 Element* anchor = m_contextMenuNode->enclosingLinkEventParentOrSelf(); | 1824 Element* anchor = m_contextMenuNode->enclosingLinkEventParentOrSelf(); |
1841 if (isHTMLAnchorElement(anchor)) | 1825 if (isHTMLAnchorElement(anchor)) |
1842 toHTMLAnchorElement(anchor)->sendPings(destinationURL); | 1826 toHTMLAnchorElement(anchor)->sendPings(destinationURL); |
1843 } | 1827 } |
1844 | 1828 |
1845 bool WebLocalFrameImpl::dispatchBeforeUnloadEvent(bool isReload) | 1829 bool WebLocalFrameImpl::dispatchBeforeUnloadEvent(bool isReload) |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 { | 2145 { |
2162 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2146 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2163 } | 2147 } |
2164 | 2148 |
2165 void WebLocalFrameImpl::clearActiveFindMatch() | 2149 void WebLocalFrameImpl::clearActiveFindMatch() |
2166 { | 2150 { |
2167 ensureTextFinder().clearActiveFindMatch(); | 2151 ensureTextFinder().clearActiveFindMatch(); |
2168 } | 2152 } |
2169 | 2153 |
2170 } // namespace blink | 2154 } // namespace blink |
OLD | NEW |