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

Side by Side Diff: Source/core/dom/Node.h

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review: Revert changes in Source/devtools/Inspector-1.1.json Created 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // since those elements will never have class names, inline style, or other things that 258 // since those elements will never have class names, inline style, or other things that
259 // this apparently guards against. 259 // this apparently guards against.
260 bool isStyledElement() const { return isHTMLElement() || isSVGElement(); } 260 bool isStyledElement() const { return isHTMLElement() || isSVGElement(); }
261 261
262 bool isDocumentNode() const; 262 bool isDocumentNode() const;
263 bool isTreeScope() const { return &treeScope().rootNode() == this; } 263 bool isTreeScope() const { return &treeScope().rootNode() == this; }
264 bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); } 264 bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); }
265 bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); } 265 bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); }
266 bool isInsertionPoint() const { return getFlag(IsInsertionPointFlag); } 266 bool isInsertionPoint() const { return getFlag(IsInsertionPointFlag); }
267 267
268 bool inNamedFlow() const { return getFlag(InNamedFlowFlag); }
269 bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallback sFlag); } 268 bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallback sFlag); }
270 269
271 bool isRegisteredWithNamedFlow() const;
272
273 bool hasSyntheticAttrChildNodes() const { return getFlag(HasSyntheticAttrChi ldNodesFlag); } 270 bool hasSyntheticAttrChildNodes() const { return getFlag(HasSyntheticAttrChi ldNodesFlag); }
274 void setHasSyntheticAttrChildNodes(bool flag) { setFlag(flag, HasSyntheticAt trChildNodesFlag); } 271 void setHasSyntheticAttrChildNodes(bool flag) { setFlag(flag, HasSyntheticAt trChildNodesFlag); }
275 272
276 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns 0. 273 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns 0.
277 Element* shadowHost() const; 274 Element* shadowHost() const;
278 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns this. 275 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns this.
279 // Deprecated. Should use shadowHost() and check the return value. 276 // Deprecated. Should use shadowHost() and check the return value.
280 Node* deprecatedShadowAncestorNode() const; 277 Node* deprecatedShadowAncestorNode() const;
281 ShadowRoot* containingShadowRoot() const; 278 ShadowRoot* containingShadowRoot() const;
282 ShadowRoot* youngestShadowRoot() const; 279 ShadowRoot* youngestShadowRoot() const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 void markAncestorsWithChildNeedsStyleInvalidation(); 374 void markAncestorsWithChildNeedsStyleInvalidation();
378 bool needsStyleInvalidation() { return getFlag(NeedsStyleInvalidation); } 375 bool needsStyleInvalidation() { return getFlag(NeedsStyleInvalidation); }
379 void setNeedsStyleInvalidation(); 376 void setNeedsStyleInvalidation();
380 377
381 void recalcDistribution(); 378 void recalcDistribution();
382 379
383 bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(Notify RendererWithIdenticalStyles); } 380 bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(Notify RendererWithIdenticalStyles); }
384 381
385 void setIsLink(bool f); 382 void setIsLink(bool f);
386 383
387 void setInNamedFlow() { setFlag(InNamedFlowFlag); }
388 void clearInNamedFlow() { clearFlag(InNamedFlowFlag); }
389
390 bool hasScopedHTMLStyleChild() const { return getFlag(HasScopedHTMLStyleChil dFlag); } 384 bool hasScopedHTMLStyleChild() const { return getFlag(HasScopedHTMLStyleChil dFlag); }
391 void setHasScopedHTMLStyleChild(bool flag) { setFlag(flag, HasScopedHTMLStyl eChildFlag); } 385 void setHasScopedHTMLStyleChild(bool flag) { setFlag(flag, HasScopedHTMLStyl eChildFlag); }
392 386
393 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } 387 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); }
394 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); } 388 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); }
395 389
396 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); } 390 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); }
397 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); } 391 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); }
398 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); } 392 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); }
399 393
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 IsFinishedParsingChildrenFlag = 1 << 12, // Element 695 IsFinishedParsingChildrenFlag = 1 << 12, // Element
702 696
703 AlreadySpellCheckedFlag = 1 << 13, 697 AlreadySpellCheckedFlag = 1 << 13,
704 698
705 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), 699 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1),
706 700
707 SelfOrAncestorHasDirAutoFlag = 1 << 16, 701 SelfOrAncestorHasDirAutoFlag = 1 << 16,
708 702
709 HasNameOrIsEditingTextFlag = 1 << 17, 703 HasNameOrIsEditingTextFlag = 1 << 17,
710 704
711 InNamedFlowFlag = 1 << 18, 705 HasSyntheticAttrChildNodesFlag = 1 << 18,
712 HasSyntheticAttrChildNodesFlag = 1 << 19, 706 HasCustomStyleCallbacksFlag = 1 << 19,
713 HasCustomStyleCallbacksFlag = 1 << 20, 707 HasScopedHTMLStyleChildFlag = 1 << 20,
714 HasScopedHTMLStyleChildFlag = 1 << 21, 708 HasEventTargetDataFlag = 1 << 21,
715 HasEventTargetDataFlag = 1 << 22, 709 V8CollectableDuringMinorGCFlag = 1 << 22,
716 V8CollectableDuringMinorGCFlag = 1 << 23, 710 IsInsertionPointFlag = 1 << 23,
717 IsInsertionPointFlag = 1 << 24, 711 IsInShadowTreeFlag = 1 << 24,
718 IsInShadowTreeFlag = 1 << 25,
719 712
720 NotifyRendererWithIdenticalStyles = 1 << 26, 713 NotifyRendererWithIdenticalStyles = 1 << 25,
721 714
722 CustomElement = 1 << 27, 715 CustomElement = 1 << 26,
723 CustomElementUpgraded = 1 << 28, 716 CustomElementUpgraded = 1 << 27,
724 717
725 ChildNeedsStyleInvalidation = 1 << 29, 718 ChildNeedsStyleInvalidation = 1 << 28,
726 NeedsStyleInvalidation = 1 << 30, 719 NeedsStyleInvalidation = 1 << 29,
eseidel 2014/02/14 11:44:23 I probably wouldn't have bothered to re-sort these
mstensho (USE GERRIT) 2014/02/14 12:06:13 Done.
727 720
728 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 721 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange
729 }; 722 };
730 723
731 // 2 bits remaining. 724 // 3 bits remaining.
732 725
733 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 726 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
734 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); } 727 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); }
735 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; } 728 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; }
736 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; } 729 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
737 730
738 protected: 731 protected:
739 enum ConstructionType { 732 enum ConstructionType {
740 CreateOther = DefaultNodeFlags, 733 CreateOther = DefaultNodeFlags,
741 CreateText = DefaultNodeFlags | IsTextFlag, 734 CreateText = DefaultNodeFlags | IsTextFlag,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 906
914 } // namespace WebCore 907 } // namespace WebCore
915 908
916 #ifndef NDEBUG 909 #ifndef NDEBUG
917 // Outside the WebCore namespace for ease of invocation from gdb. 910 // Outside the WebCore namespace for ease of invocation from gdb.
918 void showTree(const WebCore::Node*); 911 void showTree(const WebCore::Node*);
919 void showNodePath(const WebCore::Node*); 912 void showNodePath(const WebCore::Node*);
920 #endif 913 #endif
921 914
922 #endif 915 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698