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

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

Issue 2805493002: Boolean properties for Accessibility Object Model Phase 1 (Closed)
Patch Set: Address feedback Created 3 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
Index: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
index c3d401cc382253f24112e48fc60d3f8fbac00ab0..afcf9ef64931b8f88165f283a3c5d0a7376688ba 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -30,6 +30,7 @@
#include "core/HTMLNames.h"
#include "core/InputTypeNames.h"
+#include "core/dom/AccessibleNode.h"
#include "core/dom/Document.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/editing/EditingUtilities.h"
@@ -101,7 +102,7 @@ AXObjectCacheImpl::AXObjectCacheImpl(Document& document)
AXObjectCacheImpl::~AXObjectCacheImpl() {
#if DCHECK_IS_ON()
- DCHECK(has_been_disposed_);
+ DCHECK(m_hasBeenDisposed);
#endif
}
@@ -115,7 +116,7 @@ void AXObjectCacheImpl::Dispose() {
}
#if DCHECK_IS_ON()
- has_been_disposed_ = true;
+ m_hasBeenDisposed = true;
#endif
}
@@ -635,11 +636,11 @@ void AXObjectCacheImpl::NotificationPostTimerFired(TimerBase*) {
#if DCHECK_IS_ON()
// Make sure none of the layout views are in the process of being layed out.
// Notifications should only be sent after the layoutObject has finished
- if (obj->IsAXLayoutObject()) {
- AXLayoutObject* layout_obj = ToAXLayoutObject(obj);
- LayoutObject* layout_object = layout_obj->GetLayoutObject();
- if (layout_object && layout_object->View())
- DCHECK(!layout_object->View()->GetLayoutState());
+ if (obj->isAXLayoutObject()) {
+ AXLayoutObject* layoutObj = toAXLayoutObject(obj);
+ LayoutObject* layoutObject = layoutObj->getLayoutObject();
+ if (layoutObject && layoutObject->view())
+ DCHECK(!layoutObject->view()->layoutState());
}
#endif
@@ -1094,8 +1095,10 @@ bool IsNodeAriaVisible(Node* node) {
if (!node->IsElementNode())
return false;
- return EqualIgnoringASCIICase(ToElement(node)->getAttribute(aria_hiddenAttr),
- "false");
+ bool is_null = true;
+ bool hidden = AccessibleNode::GetProperty(
+ ToElement(node), AOMBooleanProperty::kHidden, is_null);
+ return !is_null && !hidden;
}
void AXObjectCacheImpl::PostPlatformNotification(AXObject* obj,

Powered by Google App Engine
This is Rietveld 408576698