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

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: Rebase master 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
« no previous file with comments | « Source/core/dom/NamedFlowCollection.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // since those elements will never have class names, inline style, or other things that 255 // since those elements will never have class names, inline style, or other things that
256 // this apparently guards against. 256 // this apparently guards against.
257 bool isStyledElement() const { return isHTMLElement() || isSVGElement(); } 257 bool isStyledElement() const { return isHTMLElement() || isSVGElement(); }
258 258
259 bool isDocumentNode() const; 259 bool isDocumentNode() const;
260 bool isTreeScope() const { return &treeScope().rootNode() == this; } 260 bool isTreeScope() const { return &treeScope().rootNode() == this; }
261 bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); } 261 bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); }
262 bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); } 262 bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); }
263 bool isInsertionPoint() const { return getFlag(IsInsertionPointFlag); } 263 bool isInsertionPoint() const { return getFlag(IsInsertionPointFlag); }
264 264
265 bool inNamedFlow() const { return getFlag(InNamedFlowFlag); }
266 bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallback sFlag); } 265 bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallback sFlag); }
267 266
268 bool isRegisteredWithNamedFlow() const;
269
270 bool hasSyntheticAttrChildNodes() const { return getFlag(HasSyntheticAttrChi ldNodesFlag); } 267 bool hasSyntheticAttrChildNodes() const { return getFlag(HasSyntheticAttrChi ldNodesFlag); }
271 void setHasSyntheticAttrChildNodes(bool flag) { setFlag(flag, HasSyntheticAt trChildNodesFlag); } 268 void setHasSyntheticAttrChildNodes(bool flag) { setFlag(flag, HasSyntheticAt trChildNodesFlag); }
272 269
273 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns 0. 270 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns 0.
274 Element* shadowHost() const; 271 Element* shadowHost() const;
275 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns this. 272 // If this node is in a shadow tree, returns its shadow host. Otherwise, ret urns this.
276 // Deprecated. Should use shadowHost() and check the return value. 273 // Deprecated. Should use shadowHost() and check the return value.
277 Node* deprecatedShadowAncestorNode() const; 274 Node* deprecatedShadowAncestorNode() const;
278 ShadowRoot* containingShadowRoot() const; 275 ShadowRoot* containingShadowRoot() const;
279 ShadowRoot* youngestShadowRoot() const; 276 ShadowRoot* youngestShadowRoot() const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 void markAncestorsWithChildNeedsStyleInvalidation(); 371 void markAncestorsWithChildNeedsStyleInvalidation();
375 bool needsStyleInvalidation() { return getFlag(NeedsStyleInvalidation); } 372 bool needsStyleInvalidation() { return getFlag(NeedsStyleInvalidation); }
376 void setNeedsStyleInvalidation(); 373 void setNeedsStyleInvalidation();
377 374
378 void recalcDistribution(); 375 void recalcDistribution();
379 376
380 bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(Notify RendererWithIdenticalStyles); } 377 bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(Notify RendererWithIdenticalStyles); }
381 378
382 void setIsLink(bool f); 379 void setIsLink(bool f);
383 380
384 void setInNamedFlow() { setFlag(InNamedFlowFlag); }
385 void clearInNamedFlow() { clearFlag(InNamedFlowFlag); }
386
387 bool hasScopedHTMLStyleChild() const { return getFlag(HasScopedHTMLStyleChil dFlag); } 381 bool hasScopedHTMLStyleChild() const { return getFlag(HasScopedHTMLStyleChil dFlag); }
388 void setHasScopedHTMLStyleChild(bool flag) { setFlag(flag, HasScopedHTMLStyl eChildFlag); } 382 void setHasScopedHTMLStyleChild(bool flag) { setFlag(flag, HasScopedHTMLStyl eChildFlag); }
389 383
390 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } 384 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); }
391 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); } 385 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); }
392 386
393 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); } 387 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); }
394 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); } 388 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); }
395 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); } 389 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); }
396 390
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 IsFinishedParsingChildrenFlag = 1 << 12, // Element 692 IsFinishedParsingChildrenFlag = 1 << 12, // Element
699 693
700 AlreadySpellCheckedFlag = 1 << 13, 694 AlreadySpellCheckedFlag = 1 << 13,
701 695
702 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), 696 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1),
703 697
704 SelfOrAncestorHasDirAutoFlag = 1 << 16, 698 SelfOrAncestorHasDirAutoFlag = 1 << 16,
705 699
706 HasNameOrIsEditingTextFlag = 1 << 17, 700 HasNameOrIsEditingTextFlag = 1 << 17,
707 701
708 InNamedFlowFlag = 1 << 18, 702 // Bit 18 is available
703
709 HasSyntheticAttrChildNodesFlag = 1 << 19, 704 HasSyntheticAttrChildNodesFlag = 1 << 19,
710 HasCustomStyleCallbacksFlag = 1 << 20, 705 HasCustomStyleCallbacksFlag = 1 << 20,
711 HasScopedHTMLStyleChildFlag = 1 << 21, 706 HasScopedHTMLStyleChildFlag = 1 << 21,
712 HasEventTargetDataFlag = 1 << 22, 707 HasEventTargetDataFlag = 1 << 22,
713 V8CollectableDuringMinorGCFlag = 1 << 23, 708 V8CollectableDuringMinorGCFlag = 1 << 23,
714 IsInsertionPointFlag = 1 << 24, 709 IsInsertionPointFlag = 1 << 24,
715 IsInShadowTreeFlag = 1 << 25, 710 IsInShadowTreeFlag = 1 << 25,
716 711
717 NotifyRendererWithIdenticalStyles = 1 << 26, 712 NotifyRendererWithIdenticalStyles = 1 << 26,
718 713
719 CustomElement = 1 << 27, 714 CustomElement = 1 << 27,
720 CustomElementUpgraded = 1 << 28, 715 CustomElementUpgraded = 1 << 28,
721 716
722 ChildNeedsStyleInvalidation = 1 << 29, 717 ChildNeedsStyleInvalidation = 1 << 29,
723 NeedsStyleInvalidation = 1 << 30, 718 NeedsStyleInvalidation = 1 << 30,
724 719
725 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 720 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange
726 }; 721 };
727 722
728 // 2 bits remaining. 723 // 3 bits remaining.
729 724
730 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 725 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
731 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); } 726 void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~m ask) | (-(int32_t)f & mask); }
732 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; } 727 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; }
733 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; } 728 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
734 729
735 protected: 730 protected:
736 enum ConstructionType { 731 enum ConstructionType {
737 CreateOther = DefaultNodeFlags, 732 CreateOther = DefaultNodeFlags,
738 CreateText = DefaultNodeFlags | IsTextFlag, 733 CreateText = DefaultNodeFlags | IsTextFlag,
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 905
911 } // namespace WebCore 906 } // namespace WebCore
912 907
913 #ifndef NDEBUG 908 #ifndef NDEBUG
914 // Outside the WebCore namespace for ease of invocation from gdb. 909 // Outside the WebCore namespace for ease of invocation from gdb.
915 void showTree(const WebCore::Node*); 910 void showTree(const WebCore::Node*);
916 void showNodePath(const WebCore::Node*); 911 void showNodePath(const WebCore::Node*);
917 #endif 912 #endif
918 913
919 #endif 914 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/NamedFlowCollection.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698