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

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: No longer FAIL: imported/wpt/shadow-dom/HTMLSlotElement-interface.html 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/Node.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.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index acd595fb9729ad9112a3489c70eeabbbe650027f..a9ee2d12e383f75c545bde438b64b46baec4f808 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.
@@ -376,9 +375,7 @@ public:
void setNeedsStyleRecalc(StyleChangeType, const StyleChangeReasonForTracing&);
void clearNeedsStyleRecalc();
-#if DCHECK_IS_ON()
bool needsDistributionRecalc() const;
-#endif
bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistributionRecalcFlag); }
void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionRecalcFlag); }
@@ -490,7 +487,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 +673,8 @@ public:
bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChildrenFlag); }
- void updateAssignmentForInsertedInto(ContainerNode*);
+ void checkSlotChangeAfterInserted() { checkSlotChange(); }
+ void checkSlotChangeBeforeRemoved() { checkSlotChange(); }
DECLARE_VIRTUAL_TRACE();
@@ -797,6 +795,8 @@ private:
// per-thread.
virtual String debugNodeName() const;
+ void checkSlotChange();
+
enum EditableLevel { Editable, RichlyEditable };
bool hasEditableStyle(EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable) const;
bool isEditableToAccessibility(EditableLevel) const;
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698