diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-01-11 10:03:25 +0100 |
commit | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (patch) | |
tree | b318cf594dc1da2fa48224005945c9157f35bb41 /Source/WebCore/editing | |
parent | 6300a96eca9f152b379f1bcf3d9efdc5572d989a (diff) | |
download | qtwebkit-d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9.tar.gz |
Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681)
Diffstat (limited to 'Source/WebCore/editing')
-rw-r--r-- | Source/WebCore/editing/gtk/FrameSelectionGtk.cpp | 11 | ||||
-rw-r--r-- | Source/WebCore/editing/visible_units.cpp | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/Source/WebCore/editing/gtk/FrameSelectionGtk.cpp b/Source/WebCore/editing/gtk/FrameSelectionGtk.cpp index a327e0699..a63787023 100644 --- a/Source/WebCore/editing/gtk/FrameSelectionGtk.cpp +++ b/Source/WebCore/editing/gtk/FrameSelectionGtk.cpp @@ -80,20 +80,17 @@ void FrameSelection::notifyAccessibilityForSelectionChange() if (!AXObjectCache::accessibilityEnabled()) return; - // Reset lastFocuseNode and return for no valid selections. + // Return for no valid selections. if (!m_selection.start().isNotNull() || !m_selection.end().isNotNull()) return; - RenderObject* focusedNode = m_selection.end().deprecatedNode()->renderer(); - AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCache()->getOrCreate(focusedNode); - - // Need to check this as getOrCreate could return 0, + // Look for the accessibility object for the Frame. + AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCache()->rootObjectForFrame(m_frame); if (!accessibilityObject) return; int offset; - // Always report the events w.r.t. the non-linked unignored parent. (i.e. ignoreLinks == true). - RefPtr<AccessibilityObject> object = objectAndOffsetUnignored(accessibilityObject, offset, true); + RefPtr<AccessibilityObject> object = objectFocusedAndCaretOffsetUnignored(accessibilityObject, offset); if (!object) return; diff --git a/Source/WebCore/editing/visible_units.cpp b/Source/WebCore/editing/visible_units.cpp index 338127801..509fa1d19 100644 --- a/Source/WebCore/editing/visible_units.cpp +++ b/Source/WebCore/editing/visible_units.cpp @@ -88,7 +88,7 @@ static VisiblePosition previousBoundary(const VisiblePosition& c, BoundarySearch searchRange->setStart(start.deprecatedNode(), start.deprecatedEditingOffset(), ec); searchRange->setEnd(end.deprecatedNode(), end.deprecatedEditingOffset(), ec); - + ASSERT(!ec); if (ec) return VisiblePosition(); |