Changeset 73984 in webkit
- Timestamp:
- Dec 13, 2010 4:24:48 PM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r73983 r73984 1 2010-12-13 Emil Eklund <eae@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 Change SelectionController::setFocusedNodeIfNeeded to traverse the DOM 6 tree instead of the render tree. 7 https://bugs.webkit.org/show_bug.cgi?id=50989 8 9 * editing/SelectionController.cpp: 10 (WebCore::SelectionController::setFocusedNodeIfNeeded): 11 Walk up DOM/hosted tree rather than render tree and remove FIXME comment 12 that does't apply (SelectionController and EventHandler needs different 13 checks). 14 1 15 2010-12-13 Chris Fleizach <cfleizach@apple.com> 2 16 -
trunk/WebCore/editing/SelectionController.cpp
r73942 r73984 1552 1552 1553 1553 if (Node* target = rootEditableElement()) { 1554 RenderObject* renderer = target->renderer(); 1555 1556 // Walk up the render tree to search for a node to focus. 1557 // Walking up the DOM tree wouldn't work for shadow trees, like those behind the engine-based text fields. 1558 // FIXME: Combine with the same traversal code in EventHandle::dispatchMouseEvent. 1559 while (renderer) { 1554 // Walk up the DOM tree to search for a node to focus. 1555 while (target) { 1560 1556 // We don't want to set focus on a subframe when selecting in a parent frame, 1561 1557 // so add the !isFrameElement check here. There's probably a better way to make this … … 1565 1561 return; 1566 1562 } 1567 renderer = renderer->parent(); 1568 if (renderer) 1569 target = renderer->node(); 1563 target = target->parentOrHostNode(); 1570 1564 } 1571 1565 m_frame->document()->setFocusedNode(0);
Note: See TracChangeset
for help on using the changeset viewer.