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

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

Issue 310443002: Remove scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase for CQ Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Element.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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 void setNeedsStyleInvalidation(); 371 void setNeedsStyleInvalidation();
372 372
373 void recalcDistribution(); 373 void recalcDistribution();
374 374
375 bool needsLayerUpdate() const { return getFlag(NeedsLayerUpdateFlag); } 375 bool needsLayerUpdate() const { return getFlag(NeedsLayerUpdateFlag); }
376 void setNeedsLayerUpdate() { setFlag(NeedsLayerUpdateFlag); } 376 void setNeedsLayerUpdate() { setFlag(NeedsLayerUpdateFlag); }
377 void clearNeedsLayerUpdate() { clearFlag(NeedsLayerUpdateFlag); } 377 void clearNeedsLayerUpdate() { clearFlag(NeedsLayerUpdateFlag); }
378 378
379 void setIsLink(bool f); 379 void setIsLink(bool f);
380 380
381 bool hasScopedHTMLStyleChild() const { return getFlag(HasScopedHTMLStyleChil dFlag); }
382 void setHasScopedHTMLStyleChild(bool flag) { setFlag(flag, HasScopedHTMLStyl eChildFlag); }
383
384 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); } 381 bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); }
385 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); } 382 void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag ); }
386 383
387 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); } 384 bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuri ngMinorGCFlag); }
388 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); } 385 void markV8CollectableDuringMinorGC() { setFlag(true, V8CollectableDuringMin orGCFlag); }
389 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); } 386 void clearV8CollectableDuringMinorGC() { setFlag(false, V8CollectableDuringM inorGCFlag); }
390 387
391 virtual void setFocus(bool flag); 388 virtual void setFocus(bool flag);
392 virtual void setActive(bool flag = true); 389 virtual void setActive(bool flag = true);
393 virtual void setHovered(bool flag = true); 390 virtual void setHovered(bool flag = true);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 virtual EventTargetData* eventTargetData() OVERRIDE; 645 virtual EventTargetData* eventTargetData() OVERRIDE;
649 virtual EventTargetData& ensureEventTargetData() OVERRIDE; 646 virtual EventTargetData& ensureEventTargetData() OVERRIDE;
650 647
651 void getRegisteredMutationObserversOfType(WillBeHeapHashMap<RawPtrWillBeMemb er<MutationObserver>, MutationRecordDeliveryOptions>&, MutationObserver::Mutatio nType, const QualifiedName* attributeName); 648 void getRegisteredMutationObserversOfType(WillBeHeapHashMap<RawPtrWillBeMemb er<MutationObserver>, MutationRecordDeliveryOptions>&, MutationObserver::Mutatio nType, const QualifiedName* attributeName);
652 void registerMutationObserver(MutationObserver&, MutationObserverOptions, co nst HashSet<AtomicString>& attributeFilter); 649 void registerMutationObserver(MutationObserver&, MutationObserverOptions, co nst HashSet<AtomicString>& attributeFilter);
653 void unregisterMutationObserver(MutationObserverRegistration*); 650 void unregisterMutationObserver(MutationObserverRegistration*);
654 void registerTransientMutationObserver(MutationObserverRegistration*); 651 void registerTransientMutationObserver(MutationObserverRegistration*);
655 void unregisterTransientMutationObserver(MutationObserverRegistration*); 652 void unregisterTransientMutationObserver(MutationObserverRegistration*);
656 void notifyMutationObserversNodeWillDetach(); 653 void notifyMutationObserversNodeWillDetach();
657 654
658 virtual void registerScopedHTMLStyleChild();
659 virtual void unregisterScopedHTMLStyleChild();
660 size_t numberOfScopedHTMLStyleChildren() const;
661
662 unsigned connectedSubframeCount() const; 655 unsigned connectedSubframeCount() const;
663 void incrementConnectedSubframeCount(unsigned amount = 1); 656 void incrementConnectedSubframeCount(unsigned amount = 1);
664 void decrementConnectedSubframeCount(unsigned amount = 1); 657 void decrementConnectedSubframeCount(unsigned amount = 1);
665 void updateAncestorConnectedSubframeCountForRemoval() const; 658 void updateAncestorConnectedSubframeCountForRemoval() const;
666 void updateAncestorConnectedSubframeCountForInsertion() const; 659 void updateAncestorConnectedSubframeCountForInsertion() const;
667 660
668 PassRefPtrWillBeRawPtr<NodeList> getDestinationInsertionPoints(); 661 PassRefPtrWillBeRawPtr<NodeList> getDestinationInsertionPoints();
669 662
670 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl ag); } 663 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl ag); }
671 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } 664 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 HasNameOrIsEditingTextFlag = 1 << 23, 710 HasNameOrIsEditingTextFlag = 1 << 23,
718 HasWeakReferencesFlag = 1 << 24, 711 HasWeakReferencesFlag = 1 << 24,
719 V8CollectableDuringMinorGCFlag = 1 << 25, 712 V8CollectableDuringMinorGCFlag = 1 << 25,
720 HasSyntheticAttrChildNodesFlag = 1 << 26, 713 HasSyntheticAttrChildNodesFlag = 1 << 26,
721 HasEventTargetDataFlag = 1 << 27, 714 HasEventTargetDataFlag = 1 << 27,
722 AlreadySpellCheckedFlag = 1 << 28, 715 AlreadySpellCheckedFlag = 1 << 28,
723 716
724 // HTML dir=auto. 717 // HTML dir=auto.
725 SelfOrAncestorHasDirAutoFlag = 1 << 29, 718 SelfOrAncestorHasDirAutoFlag = 1 << 29,
726 719
727 // FIXME: Remove <style scoped> support.
728 HasScopedHTMLStyleChildFlag = 1 << 30,
729
730 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange 720 DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalc Flag | NeedsReattachStyleChange
731 }; 721 };
732 722
733 // 1 bits remaining. 723 // 2 bits remaining.
734 724
735 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 725 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
736 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); }
737 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; } 727 void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; }
738 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; } 728 void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
739 729
740 protected: 730 protected:
741 enum ConstructionType { 731 enum ConstructionType {
742 CreateOther = DefaultNodeFlags, 732 CreateOther = DefaultNodeFlags,
743 CreateText = DefaultNodeFlags | IsTextFlag, 733 CreateText = DefaultNodeFlags | IsTextFlag,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 } // namespace WebCore 895 } // namespace WebCore
906 896
907 #ifndef NDEBUG 897 #ifndef NDEBUG
908 // Outside the WebCore namespace for ease of invocation from gdb. 898 // Outside the WebCore namespace for ease of invocation from gdb.
909 void showNode(const WebCore::Node*); 899 void showNode(const WebCore::Node*);
910 void showTree(const WebCore::Node*); 900 void showTree(const WebCore::Node*);
911 void showNodePath(const WebCore::Node*); 901 void showNodePath(const WebCore::Node*);
912 #endif 902 #endif
913 903
914 #endif 904 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698