Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1288)

Unified Diff: Source/modules/accessibility/AXLayoutObject.cpp

Issue 1300113006: Fixed AXLayoutObject::getSelection() so that it doesn't return nullptr for anchor and focus objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp
index d5141f8e53803331c34e88a0f8b489efec35fedb..be1f4ba8709c377066ea9ce7f890d7fd6bfd36a1 100644
--- a/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1865,7 +1865,8 @@ AXObject::AXRange AXLayoutObject::selection() const
// Find the closest node that has a corresponding AXObject.
// This is because some nodes may be aria hidden or might not even have
// a layout object if they are part of the shadow DOM.
- while (anchorNode && !getUnignoredObjectFromNode(*anchorNode)) {
+ while (anchorNode
+ && !(anchorObject = getUnignoredObjectFromNode(*anchorNode))) {
if (anchorNode->nextSibling())
anchorNode = anchorNode->nextSibling();
else
@@ -1878,7 +1879,8 @@ AXObject::AXRange AXLayoutObject::selection() const
ASSERT(focusNode);
RefPtrWillBeRawPtr<AXObject> focusObject = nullptr;
- while (focusNode && !getUnignoredObjectFromNode(*focusNode)) {
+ while (focusNode
+ && !(focusObject = getUnignoredObjectFromNode(*focusNode))) {
if (focusNode->previousSibling())
focusNode = focusNode->previousSibling();
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698