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

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

Issue 423823004: Add support for SVG Clip paths in HTML (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed LayoutTests and Aligned with review comments Created 6 years, 4 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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInv alidationFlag); } 374 bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInv alidationFlag); }
375 void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation Flag); } 375 void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation Flag); }
376 void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalida tionFlag); } 376 void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalida tionFlag); }
377 void markAncestorsWithChildNeedsStyleInvalidation(); 377 void markAncestorsWithChildNeedsStyleInvalidation();
378 bool needsStyleInvalidation() const { return getFlag(NeedsStyleInvalidationF lag); } 378 bool needsStyleInvalidation() const { return getFlag(NeedsStyleInvalidationF lag); }
379 void clearNeedsStyleInvalidation() { clearFlag(NeedsStyleInvalidationFlag); } 379 void clearNeedsStyleInvalidation() { clearFlag(NeedsStyleInvalidationFlag); }
380 void setNeedsStyleInvalidation(); 380 void setNeedsStyleInvalidation();
381 381
382 void recalcDistribution(); 382 void recalcDistribution();
383 383
384 bool svgFilterNeedsLayerUpdate() const { return getFlag(SVGFilterNeedsLayerU pdateFlag); } 384 bool svgEffectsNeedLayerUpdate() const
385 void setSVGFilterNeedsLayerUpdate() { setFlag(SVGFilterNeedsLayerUpdateFlag) ; } 385 {
386 void clearSVGFilterNeedsLayerUpdate() { clearFlag(SVGFilterNeedsLayerUpdateF lag); } 386 return getFlag(SVGEffectsNeedLayerUpdateFlag);
387 }
388 void setSVGEffectsNeedLayerUpdate()
389 {
390 setFlag(SVGEffectsNeedLayerUpdateFlag);
391 }
392 void clearSVGEffectsNeedLayerUpdate()
393 {
394 clearFlag(SVGEffectsNeedLayerUpdateFlag);
395 }
387 396
388 void setIsLink(bool f); 397 void setIsLink(bool f);
389 398
390 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } 399 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); }
391 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); } 400 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); }
392 401
393 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); } 402 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); }
394 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); } 403 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); }
395 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); } 404 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); }
396 405
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 709
701 // Tree state flags. These change when the element is added/removed 710 // Tree state flags. These change when the element is added/removed
702 // from a DOM tree. 711 // from a DOM tree.
703 InDocumentFlag = 1 << 10, 712 InDocumentFlag = 1 << 10,
704 IsInShadowTreeFlag = 1 << 11, 713 IsInShadowTreeFlag = 1 << 11,
705 714
706 // Set by the parser when the children are done parsing. 715 // Set by the parser when the children are done parsing.
707 IsFinishedParsingChildrenFlag = 1 << 12, 716 IsFinishedParsingChildrenFlag = 1 << 12,
708 717
709 // Flags related to recalcStyle. 718 // Flags related to recalcStyle.
710 SVGFilterNeedsLayerUpdateFlag = 1 << 13, 719 SVGEffectsNeedLayerUpdateFlag = 1 << 13,
esprehn 2014/08/06 17:25:09 You could make this change separately. this patch
711 HasCustomStyleCallbacksFlag = 1 << 14, 720 HasCustomStyleCallbacksFlag = 1 << 14,
712 ChildNeedsStyleInvalidationFlag = 1 << 15, 721 ChildNeedsStyleInvalidationFlag = 1 << 15,
713 NeedsStyleInvalidationFlag = 1 << 16, 722 NeedsStyleInvalidationFlag = 1 << 16,
714 ChildNeedsDistributionRecalcFlag = 1 << 17, 723 ChildNeedsDistributionRecalcFlag = 1 << 17,
715 ChildNeedsStyleRecalcFlag = 1 << 18, 724 ChildNeedsStyleRecalcFlag = 1 << 18,
716 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1), 725 StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1),
717
718 CustomElementFlag = 1 << 21, 726 CustomElementFlag = 1 << 21,
719 CustomElementUpgradedFlag = 1 << 22, 727 CustomElementUpgradedFlag = 1 << 22,
720
721 HasNameOrIsEditingTextFlag = 1 << 23, 728 HasNameOrIsEditingTextFlag = 1 << 23,
722 HasWeakReferencesFlag = 1 << 24, 729 HasWeakReferencesFlag = 1 << 24,
723 V8CollectableDuringMinorGCFlag = 1 << 25, 730 V8CollectableDuringMinorGCFlag = 1 << 25,
724 HasSyntheticAttrChildNodesFlag = 1 << 26, 731 HasSyntheticAttrChildNodesFlag = 1 << 26,
725 HasEventTargetDataFlag = 1 << 27, 732 HasEventTargetDataFlag = 1 << 27,
726 AlreadySpellCheckedFlag = 1 << 28, 733 AlreadySpellCheckedFlag = 1 << 28,
727 734
728 // HTML dir=auto. 735 // HTML dir=auto.
729 SelfOrAncestorHasDirAutoFlag = 1 << 29, 736 SelfOrAncestorHasDirAutoFlag = 1 << 29,
730
731 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 737 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange
732 }; 738 };
733 739
734 // 2 bits remaining. 740 // 2 bits remaining.
735 741
736 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 742 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
737 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); } 743 void setFlag(bool f, NodeFlags mask) { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
738 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } 744 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; }
739 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } 745 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; }
740 746
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } // namespace blink 914 } // namespace blink
909 915
910 #ifndef NDEBUG 916 #ifndef NDEBUG
911 // Outside the WebCore namespace for ease of invocation from gdb. 917 // Outside the WebCore namespace for ease of invocation from gdb.
912 void showNode(const blink::Node*); 918 void showNode(const blink::Node*);
913 void showTree(const blink::Node*); 919 void showTree(const blink::Node*);
914 void showNodePath(const blink::Node*); 920 void showNodePath(const blink::Node*);
915 #endif 921 #endif
916 922
917 #endif 923 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698