Changeset 19595 in webkit
- Timestamp:
- Feb 12, 2007, 8:49:26 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19590 r19595 1 2007-02-12 David Hyatt <hyatt@apple.com> 2 3 Fix for bug 12149 (Radar Bug#4928692), external CSS causes incomplete 4 text field focus. 5 6 Make sure to clear out the focus node in willRemove() rather than in 7 detach(), since detach/attach caused by style recalc should not affect 8 the focused node. 9 10 Reviewed by aroben 11 12 * dom/ContainerNode.cpp: 13 (WebCore::ContainerNode::willRemove): 14 * dom/Document.cpp: 15 (WebCore::Document::focusedNodeRemoved): 16 (WebCore::Document::setFocusedNode): 17 * dom/Document.h: 18 * dom/Element.cpp: 19 (WebCore::Element::updateFocusAppearance): 20 * dom/Node.cpp: 21 (WebCore::Node::willRemove): 22 (WebCore::Node::detach): 23 * html/HTMLInputElement.cpp: 24 (WebCore::HTMLInputElement::updateFocusAppearance): 25 1 26 2007-02-12 Kevin McCullough <kmccullough@apple.com> 2 27 -
trunk/WebCore/dom/ContainerNode.cpp
r19584 r19595 331 331 for (Node *n = m_firstChild; n != 0; n = n->nextSibling()) 332 332 n->willRemove(); 333 EventTargetNode::willRemove(); 333 334 } 334 335 -
trunk/WebCore/dom/Document.cpp
r19584 r19595 2048 2048 } 2049 2049 2050 void Document::focusedNode Detached(Node* node)2050 void Document::focusedNodeRemoved(Node* node) 2051 2051 { 2052 2052 setFocusedNode(0); … … 2169 2169 } 2170 2170 m_focusedNode->setFocus(); 2171 2172 if (m_focusedNode.get() == m_focusedNode->rootEditableElement()) 2173 frame()->editor()->didBeginEditing(); 2174 2171 2175 2172 // eww, I suck. set the qt focus correctly 2176 2173 // ### find a better place in the code for this -
trunk/WebCore/dom/Document.h
r19584 r19595 420 420 Node* activeNode() const { return m_activeNode.get(); } 421 421 422 void focusedNode Detached(Node*);422 void focusedNodeRemoved(Node*); 423 423 void hoveredNodeDetached(Node*); 424 424 void activeChainNodeDetached(Node*); -
trunk/WebCore/dom/Element.cpp
r19400 r19595 29 29 #include "cssstyleselector.h" 30 30 #include "Document.h" 31 #include "Editor.h" 31 32 #include "ExceptionCode.h" 32 33 #include "Frame.h" … … 890 891 return; 891 892 893 frame->editor()->didBeginEditing(); 894 892 895 // FIXME: We should restore the previous selection if there is one. 893 896 Selection newSelection = hasTagName(htmlTag) || hasTagName(bodyTag) ? Selection(Position(this, 0), DOWNSTREAM) : Selection::selectionFromContentsOfNode(this); -
trunk/WebCore/dom/Node.cpp
r19584 r19595 813 813 void Node::willRemove() 814 814 { 815 if (m_focused) 816 document()->focusedNodeRemoved(this); 815 817 } 816 818 … … 824 826 825 827 Document* doc = document(); 826 if (m_focused)827 doc->focusedNodeDetached(this);828 828 if (m_hovered) 829 829 doc->hoveredNodeDetached(this); -
trunk/WebCore/html/HTMLInputElement.cpp
r19579 r19595 30 30 #include "CSSPropertyNames.h" 31 31 #include "Document.h" 32 #include "Editor.h" 32 33 #include "Event.h" 33 34 #include "EventHandler.h" … … 205 206 if (isTextField()) { 206 207 select(); 207 if (document() && document()->frame()) 208 if (document() && document()->frame()) { 209 document()->frame()->editor()->didBeginEditing(); 208 210 document()->frame()->revealSelection(); 211 } 209 212 } else 210 213 HTMLGenericFormElement::updateFocusAppearance();
Note:
See TracChangeset
for help on using the changeset viewer.