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

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

Issue 1941463002: Removes the restriction placed on the role of the accessibility object when calling the next/previo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment and discovered that images don't work. Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
index e9102811b6d94faf676e4c0960f77cea5c87d237..5e179122adadb27cc313979f2123f86f232e0b3c 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1018,18 +1018,19 @@ void AXLayoutObject::loadInlineTextBoxes()
AXObject* AXLayoutObject::nextOnLine() const
{
- if (!m_layoutObject)
- return 0;
+ if (!getLayoutObject())
+ return nullptr;
- InlineBox* inlineBox;
- if (m_layoutObject->isLayoutInline())
- inlineBox = toLayoutInline(m_layoutObject)->lastLineBox();
- else if (m_layoutObject->isText())
- inlineBox = toLayoutText(m_layoutObject)->lastTextBox();
- else
- return 0;
+ InlineBox* inlineBox = nullptr;
+ if (getLayoutObject()->isLayoutInline())
+ inlineBox = toLayoutInline(getLayoutObject())->lastLineBox();
+ else if (getLayoutObject()->isText())
+ inlineBox = toLayoutText(getLayoutObject())->lastTextBox();
+
+ if (!inlineBox)
+ return nullptr;
- AXObject* result = 0;
+ AXObject* result = nullptr;
for (InlineBox* next = inlineBox->nextOnLine(); next; next = next->nextOnLine()) {
LayoutObject* layoutObject = LineLayoutAPIShim::layoutObjectFrom(next->getLineLayoutItem());
result = axObjectCache().getOrCreate(layoutObject);
@@ -1047,18 +1048,19 @@ AXObject* AXLayoutObject::nextOnLine() const
AXObject* AXLayoutObject::previousOnLine() const
{
- if (!m_layoutObject)
- return 0;
+ if (!getLayoutObject())
+ return nullptr;
- InlineBox* inlineBox;
- if (m_layoutObject->isLayoutInline())
- inlineBox = toLayoutInline(m_layoutObject)->firstLineBox();
- else if (m_layoutObject->isText())
- inlineBox = toLayoutText(m_layoutObject)->firstTextBox();
- else
- return 0;
+ InlineBox* inlineBox = nullptr;
+ if (getLayoutObject()->isLayoutInline())
+ inlineBox = toLayoutInline(getLayoutObject())->firstLineBox();
+ else if (getLayoutObject()->isText())
+ inlineBox = toLayoutText(getLayoutObject())->firstTextBox();
+
+ if (!inlineBox)
+ return nullptr;
- AXObject* result = 0;
+ AXObject* result = nullptr;
for (InlineBox* prev = inlineBox->prevOnLine(); prev; prev = prev->prevOnLine()) {
LayoutObject* layoutObject = LineLayoutAPIShim::layoutObjectFrom(prev->getLineLayoutItem());
result = axObjectCache().getOrCreate(layoutObject);
« no previous file with comments | « third_party/WebKit/LayoutTests/accessibility/inline-text-box-next-on-line.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698