[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 18:34:11 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9db66b60ca724198415e53ba78d3c167310fb3c7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 14 00:24:48 2010 +0000
2010-12-13 Emil Eklund <eae at chromium.org>
Reviewed by Dimitri Glazkov.
Change SelectionController::setFocusedNodeIfNeeded to traverse the DOM
tree instead of the render tree.
https://bugs.webkit.org/show_bug.cgi?id=50989
* editing/SelectionController.cpp:
(WebCore::SelectionController::setFocusedNodeIfNeeded):
Walk up DOM/hosted tree rather than render tree and remove FIXME comment
that does't apply (SelectionController and EventHandler needs different
checks).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4021eaa..3bfeeff 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-13 Emil Eklund <eae at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Change SelectionController::setFocusedNodeIfNeeded to traverse the DOM
+ tree instead of the render tree.
+ https://bugs.webkit.org/show_bug.cgi?id=50989
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::setFocusedNodeIfNeeded):
+ Walk up DOM/hosted tree rather than render tree and remove FIXME comment
+ that does't apply (SelectionController and EventHandler needs different
+ checks).
+
2010-12-13 Chris Fleizach <cfleizach at apple.com>
Reviewed by Beth Dakin.
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index bc00442..4fc6bbe 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -1551,12 +1551,8 @@ void SelectionController::setFocusedNodeIfNeeded()
}
if (Node* target = rootEditableElement()) {
- RenderObject* renderer = target->renderer();
-
- // Walk up the render tree to search for a node to focus.
- // Walking up the DOM tree wouldn't work for shadow trees, like those behind the engine-based text fields.
- // FIXME: Combine with the same traversal code in EventHandle::dispatchMouseEvent.
- while (renderer) {
+ // Walk up the DOM tree to search for a node to focus.
+ while (target) {
// We don't want to set focus on a subframe when selecting in a parent frame,
// so add the !isFrameElement check here. There's probably a better way to make this
// work in the long term, but this is the safest fix at this time.
@@ -1564,9 +1560,7 @@ void SelectionController::setFocusedNodeIfNeeded()
m_frame->page()->focusController()->setFocusedNode(target, m_frame);
return;
}
- renderer = renderer->parent();
- if (renderer)
- target = renderer->node();
+ target = target->parentOrHostNode();
}
m_frame->document()->setFocusedNode(0);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list