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

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

Issue 1125673004: Makes AXNodeObject test if it's a table cell or row before calling isPresentationalInTable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « 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/AXNodeObject.cpp
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
index d0b033a36e26e356bb0b60c266aab2918a3498f5..bd262bfd24e02e428502035830bb3a1a5633e826 100644
--- a/Source/modules/accessibility/AXNodeObject.cpp
+++ b/Source/modules/accessibility/AXNodeObject.cpp
@@ -261,9 +261,17 @@ const AXObject* AXNodeObject::inheritsPresentationalRoleFrom() const
HTMLElement* element = nullptr;
if (node() && node()->isHTMLElement())
element = toHTMLElement(node());
- if (!parent->hasInheritedPresentationalRole()
- && !isPresentationalInTable(parent, element))
- return 0;
+ if (!parent->hasInheritedPresentationalRole()) {
+ if (!layoutObject() || !layoutObject()->isBoxModelObject())
+ return 0;
+
+ LayoutBoxModelObject* cssBox = toLayoutBoxModelObject(layoutObject());
+ if (!cssBox->isTableCell() && !cssBox->isTableRow())
+ return 0;
+
+ if (!isPresentationalInTable(parent, element))
+ return 0;
+ }
// ARIA spec says that when a parent object is presentational and this object
// is a required owned element of that parent, then this object is also presentational.
if (isRequiredOwnedElement(parent, roleValue(), element))
« 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