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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 return; | 1634 return; |
1635 | 1635 |
1636 if (Range* activeMatch = m_textFinder->activeMatch()) { | 1636 if (Range* activeMatch = m_textFinder->activeMatch()) { |
1637 // If the user has set the selection since the match was found, we | 1637 // If the user has set the selection since the match was found, we |
1638 // don't focus anything. | 1638 // don't focus anything. |
1639 VisibleSelection selection(frame()->selection().selection()); | 1639 VisibleSelection selection(frame()->selection().selection()); |
1640 if (!selection.isNone()) | 1640 if (!selection.isNone()) |
1641 return; | 1641 return; |
1642 | 1642 |
1643 // Need to clean out style and layout state before querying Element::isF
ocusable(). | 1643 // Need to clean out style and layout state before querying Element::isF
ocusable(). |
1644 frame()->document()->updateLayoutIgnorePendingStylesheets(); | 1644 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
1645 | 1645 |
1646 // Try to find the first focusable node up the chain, which will, for | 1646 // Try to find the first focusable node up the chain, which will, for |
1647 // example, focus links if we have found text within the link. | 1647 // example, focus links if we have found text within the link. |
1648 Node* node = activeMatch->firstNode(); | 1648 Node* node = activeMatch->firstNode(); |
1649 if (node && node->isInShadowTree()) { | 1649 if (node && node->isInShadowTree()) { |
1650 if (Node* host = node->shadowHost()) { | 1650 if (Node* host = node->shadowHost()) { |
1651 if (isHTMLInputElement(*host) || isHTMLTextAreaElement(*host)) | 1651 if (isHTMLInputElement(*host) || isHTMLTextAreaElement(*host)) |
1652 node = host; | 1652 node = host; |
1653 } | 1653 } |
1654 } | 1654 } |
(...skipping 451 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 |