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

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

Issue 1995203002: Rewrite Shadow DOM distribution engine to support partial synchronous distribution for v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 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
Index: third_party/WebKit/Source/core/dom/Node.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index acd595fb9729ad9112a3489c70eeabbbe650027f..63a82f328d5bf810a6a0d51022e119f0dc38db7a 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -295,11 +295,10 @@ public:
bool canParticipateInFlatTree() const;
bool isSlotOrActiveInsertionPoint() const;
- bool slottable() const { return isElementNode() || isTextNode(); }
+ // A re-distribution across v0 and v1 shadow trees is not supported.
+ bool isSlotable() const { return isTextNode() || (isElementNode() && !isInsertionPoint()); }
AtomicString slotName() const;
- static AtomicString normalizeSlotName(const AtomicString&);
-
bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallbacksFlag); }
// If this node is in a shadow tree, returns its shadow host. Otherwise, returns nullptr.
@@ -490,7 +489,7 @@ public:
bool isInV0ShadowTree() const;
bool isChildOfV1ShadowHost() const;
bool isChildOfV0ShadowHost() const;
- bool isSlotAssignable() const { return isTextNode() || isElementNode(); }
+ ShadowRoot* v1ShadowRootOfParent() const;
bool isDocumentTypeNode() const { return getNodeType() == DOCUMENT_TYPE_NODE; }
virtual bool childTypeAllowed(NodeType) const { return false; }
@@ -676,7 +675,8 @@ public:
bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChildrenFlag); }
- void updateAssignmentForInsertedInto(ContainerNode*);
+ void checkSlotChangeAfterInserted() { checkSlotChange(); }
+ void checkSlotChangeBeforeRemoved() { checkSlotChange(); }
DECLARE_VIRTUAL_TRACE();
@@ -797,6 +797,8 @@ private:
// per-thread.
virtual String debugNodeName() const;
+ void checkSlotChange();
+
enum EditableLevel { Editable, RichlyEditable };
bool hasEditableStyle(EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable) const;
bool isEditableToAccessibility(EditableLevel) const;

Powered by Google App Engine
This is Rietveld 408576698