Changeset 24336 in webkit
- Timestamp:
- Jul 16, 2007 4:21:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/page/FocusController.cpp
r24334 r24336 39 39 #include "FrameTree.h" 40 40 #include "HTMLFrameOwnerElement.h" 41 #include "HTMLNames.h" 41 42 #include "KeyboardEvent.h" 42 43 #include "Page.h" … … 51 52 52 53 using namespace EventNames; 54 using namespace HTMLNames; 53 55 54 56 FocusController::FocusController(Page* page) … … 239 241 if (Node* mousePressNode = newFocusedFrame->eventHandler()->mousePressNode()) 240 242 if (mousePressNode->renderer() && mousePressNode->renderer()->style()->userSelect() == SELECT_IGNORE) 241 // Don't do this for textareas and text fields, when they lose focus their selections should be cleared 242 // and then restored when they regain focus, to match other browsers. 243 if (!s->rootEditableElement()->shadowAncestorNode()) 244 return; 243 if (Node* root = s->rootEditableElement()) 244 if (Node* shadowAncestorNode = root->shadowAncestorNode()) 245 // Don't do this for textareas and text fields, when they lose focus their selections should be cleared 246 // and then restored when they regain focus, to match other browsers. 247 if (!shadowAncestorNode->hasTagName(inputTag) && !shadowAncestorNode->hasTagName(textareaTag)) 248 return; 245 249 246 250 s->clear();
Note: See TracChangeset
for help on using the changeset viewer.