| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 | 1148 |
| 1149 RefPtr<Node> protect(this); | 1149 RefPtr<Node> protect(this); |
| 1150 if (!document().page()->focusController().setFocusedElement(this, document()
.frame(), type)) | 1150 if (!document().page()->focusController().setFocusedElement(this, document()
.frame(), type)) |
| 1151 return; | 1151 return; |
| 1152 | 1152 |
| 1153 // Setting the focused node above might have invalidated the layout due to s
cripts. | 1153 // Setting the focused node above might have invalidated the layout due to s
cripts. |
| 1154 document().updateLayout(); | 1154 document().updateLayout(); |
| 1155 if (!isFocusable()) | 1155 if (!isFocusable()) |
| 1156 return; | 1156 return; |
| 1157 updateFocusAppearance(restorePreviousSelection); | 1157 updateFocusAppearance(restorePreviousSelection); |
| 1158 | |
| 1159 document().page()->chrome().client().showImeIfNeeded(); | |
| 1160 } | 1158 } |
| 1161 | 1159 |
| 1162 void Element::updateFocusAppearance(bool /*restorePreviousSelection*/) | 1160 void Element::updateFocusAppearance(bool /*restorePreviousSelection*/) |
| 1163 { | 1161 { |
| 1164 if (isRootEditableElement()) { | 1162 if (isRootEditableElement()) { |
| 1165 // Taking the ownership since setSelection() may release the last refere
nce to |frame|. | 1163 // Taking the ownership since setSelection() may release the last refere
nce to |frame|. |
| 1166 RefPtr<LocalFrame> frame(document().frame()); | 1164 RefPtr<LocalFrame> frame(document().frame()); |
| 1167 if (!frame) | 1165 if (!frame) |
| 1168 return; | 1166 return; |
| 1169 | 1167 |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 return false; | 1708 return false; |
| 1711 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) | 1709 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) |
| 1712 return true; | 1710 return true; |
| 1713 // Host rules could also have effects. | 1711 // Host rules could also have effects. |
| 1714 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1712 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1715 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); | 1713 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); |
| 1716 return false; | 1714 return false; |
| 1717 } | 1715 } |
| 1718 | 1716 |
| 1719 } // namespace blink | 1717 } // namespace blink |
| OLD | NEW |