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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2902133002: Revert of "Implement the inert attribute" (Closed)
Patch Set: Created 3 years, 7 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/dom/Node.h ('k') | third_party/WebKit/Source/core/dom/Text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 21488ccec25880912253e826ccd5dea17217403c..dcdb71f0bed37739deb2b2c0e62b29da6c3c872e 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -755,9 +755,8 @@ void Node::MarkAncestorsWithChildNeedsStyleInvalidation() {
void Node::MarkAncestorsWithChildNeedsDistributionRecalc() {
ScriptForbiddenScope forbid_script_during_raw_iteration;
for (Node* node = this; node && !node->ChildNeedsDistributionRecalc();
- node = node->ParentOrShadowHostNode()) {
+ node = node->ParentOrShadowHostNode())
node->SetChildNeedsDistributionRecalc();
- }
GetDocument().ScheduleLayoutTreeUpdateIfNeeded();
}
@@ -849,27 +848,11 @@ bool Node::ShouldHaveFocusAppearance() const {
}
bool Node::IsInert() const {
- if (!isConnected() || !CanParticipateInFlatTree())
- return true;
-
- DCHECK(!ChildNeedsDistributionRecalc());
-
const HTMLDialogElement* dialog = GetDocument().ActiveModalDialog();
if (dialog && this != GetDocument() &&
- !FlatTreeTraversal::ContainsIncludingPseudoElement(*dialog, *this)) {
+ (!CanParticipateInFlatTree() ||
+ !FlatTreeTraversal::ContainsIncludingPseudoElement(*dialog, *this)))
return true;
- }
-
- if (RuntimeEnabledFeatures::inertAttributeEnabled()) {
- const Element* element = this->IsElementNode()
- ? ToElement(this)
- : FlatTreeTraversal::ParentElement(*this);
- while (element) {
- if (element->hasAttribute(HTMLNames::inertAttr))
- return true;
- element = FlatTreeTraversal::ParentElement(*element);
- }
- }
return GetDocument().LocalOwner() && GetDocument().LocalOwner()->IsInert();
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698