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

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

Issue 2689713003: Don't clear 'web animations dirty' flag if we have no rare data (Closed)
Patch Set: Use testharness Created 3 years, 10 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/Source/core/svg/SVGElement.cpp ('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/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 2e9b20e6a8035cd0d300595e0428bb40c482abc3..6f074286088b6063a842fdcb80589590306b4608 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -724,14 +724,17 @@ bool AXObject::isHiddenForTextAlternativeCalculation() const {
// aria-labelledby. So we need to explicitly call the style resolver to check
// whether it's invisible or display:none, rather than relying on the style
// cached in the LayoutObject.
- Document* doc = getDocument();
- if (doc && doc->frame() && getNode() && getNode()->isElementNode()) {
- RefPtr<ComputedStyle> style =
- doc->ensureStyleResolver().styleForElement(toElement(getNode()));
- return style->display() == EDisplay::None ||
- style->visibility() != EVisibility::kVisible;
+ Document* document = getDocument();
+ if (!document || !document->frame())
+ return false;
+ if (Node* node = getNode()) {
+ if (node->isConnected() && node->isElementNode()) {
+ RefPtr<ComputedStyle> style =
+ document->ensureStyleResolver().styleForElement(toElement(node));
+ return style->display() == EDisplay::None ||
+ style->visibility() != EVisibility::kVisible;
+ }
}
-
return false;
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698