equal
deleted
inserted
replaced
22 */ |
22 */ |
23 |
23 |
24 #include "config.h" |
24 #include "config.h" |
25 #include "Element.h" |
25 #include "Element.h" |
26 |
26 |
|
27 #include "Chrome.h" |
|
28 #include "ChromeClient.h" |
27 #include "CSSStyleSelector.h" |
29 #include "CSSStyleSelector.h" |
28 #include "Document.h" |
30 #include "Document.h" |
29 #include "Editor.h" |
31 #include "Editor.h" |
30 #include "ExceptionCode.h" |
32 #include "ExceptionCode.h" |
31 #include "FocusController.h" |
33 #include "FocusController.h" |
992 doc->updateLayoutIgnorePendingStylesheets(); |
994 doc->updateLayoutIgnorePendingStylesheets(); |
993 |
995 |
994 if (!supportsFocus()) |
996 if (!supportsFocus()) |
995 return; |
997 return; |
996 |
998 |
997 if (Page* page = doc->page()) |
999 if (Page* page = doc->page()) { |
998 page->focusController()->setFocusedNode(this, doc->frame()); |
1000 page->focusController()->setFocusedNode(this, doc->frame()); |
|
1001 } |
999 |
1002 |
1000 if (!isFocusable()) { |
1003 if (!isFocusable()) { |
1001 createRareData()->m_needsFocusAppearanceUpdateSoonAfterAttach = true; |
1004 createRareData()->m_needsFocusAppearanceUpdateSoonAfterAttach = true; |
1002 return; |
1005 return; |
1003 } |
1006 } |
1004 |
1007 |
1005 cancelFocusAppearanceUpdate(); |
1008 cancelFocusAppearanceUpdate(); |
1006 updateFocusAppearance(restorePreviousSelection); |
1009 updateFocusAppearance(restorePreviousSelection); |
|
1010 |
|
1011 if (Page* page = doc->page()) { |
|
1012 // must be last thing we do here |
|
1013 page->chrome()->client()->focusedElementChanged(this); |
|
1014 } |
1007 } |
1015 } |
1008 |
1016 |
1009 void Element::updateFocusAppearance(bool restorePreviousSelection) |
1017 void Element::updateFocusAppearance(bool restorePreviousSelection) |
1010 { |
1018 { |
1011 if (this == rootEditableElement()) { |
1019 if (this == rootEditableElement()) { |