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

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

Issue 2420043002: Stop re-signaling a slotchange event (Closed)
Patch Set: New slotchange behavior Created 4 years, 2 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. 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
7 * (http://www.torchmobile.com/) 7 * (http://www.torchmobile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 enum class CustomElementState { 105 enum class CustomElementState {
106 // https://dom.spec.whatwg.org/#concept-element-custom-element-state 106 // https://dom.spec.whatwg.org/#concept-element-custom-element-state
107 Uncustomized = 0, 107 Uncustomized = 0,
108 Custom = 1 << nodeCustomElementShift, 108 Custom = 1 << nodeCustomElementShift,
109 Undefined = 2 << nodeCustomElementShift, 109 Undefined = 2 << nodeCustomElementShift,
110 Failed = 3 << nodeCustomElementShift, 110 Failed = 3 << nodeCustomElementShift,
111 111
112 NotDefinedFlag = 2 << nodeCustomElementShift, 112 NotDefinedFlag = 2 << nodeCustomElementShift,
113 }; 113 };
114 114
115 enum class SlotChangeType {
116 Initial,
117 Chained,
118 };
kochi 2016/10/31 08:39:13 nit: clang-format seems to prefer fitting in one l
119
115 class NodeRareDataBase { 120 class NodeRareDataBase {
116 public: 121 public:
117 LayoutObject* layoutObject() const { return m_layoutObject; } 122 LayoutObject* layoutObject() const { return m_layoutObject; }
118 void setLayoutObject(LayoutObject* layoutObject) { 123 void setLayoutObject(LayoutObject* layoutObject) {
119 m_layoutObject = layoutObject; 124 m_layoutObject = layoutObject;
120 } 125 }
121 126
122 protected: 127 protected:
123 NodeRareDataBase(LayoutObject* layoutObject) : m_layoutObject(layoutObject) {} 128 NodeRareDataBase(LayoutObject* layoutObject) : m_layoutObject(layoutObject) {}
124 129
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 772
768 void setAlreadySpellChecked(bool flag) { 773 void setAlreadySpellChecked(bool flag) {
769 setFlag(flag, AlreadySpellCheckedFlag); 774 setFlag(flag, AlreadySpellCheckedFlag);
770 } 775 }
771 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } 776 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); }
772 777
773 bool isFinishedParsingChildren() const { 778 bool isFinishedParsingChildren() const {
774 return getFlag(IsFinishedParsingChildrenFlag); 779 return getFlag(IsFinishedParsingChildrenFlag);
775 } 780 }
776 781
777 void checkSlotChange(); 782 void checkSlotChange(SlotChangeType);
778 void checkSlotChangeAfterInserted() { checkSlotChange(); } 783 void checkSlotChangeAfterInserted() {
779 void checkSlotChangeBeforeRemoved() { checkSlotChange(); } 784 checkSlotChange(SlotChangeType::Initial);
785 }
786 void checkSlotChangeBeforeRemoved() {
787 checkSlotChange(SlotChangeType::Initial);
788 }
780 789
781 DECLARE_VIRTUAL_TRACE(); 790 DECLARE_VIRTUAL_TRACE();
782 791
783 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 792 DECLARE_VIRTUAL_TRACE_WRAPPERS();
784 793
785 unsigned lengthOfContents() const; 794 unsigned lengthOfContents() const;
786 795
787 v8::Local<v8::Object> wrap(v8::Isolate*, 796 v8::Local<v8::Object> wrap(v8::Isolate*,
788 v8::Local<v8::Object> creationContext) override; 797 v8::Local<v8::Object> creationContext) override;
789 v8::Local<v8::Object> associateWithWrapper( 798 v8::Local<v8::Object> associateWithWrapper(
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 } // namespace blink 1031 } // namespace blink
1023 1032
1024 #ifndef NDEBUG 1033 #ifndef NDEBUG
1025 // Outside the WebCore namespace for ease of invocation from gdb. 1034 // Outside the WebCore namespace for ease of invocation from gdb.
1026 void showNode(const blink::Node*); 1035 void showNode(const blink::Node*);
1027 void showTree(const blink::Node*); 1036 void showTree(const blink::Node*);
1028 void showNodePath(const blink::Node*); 1037 void showNodePath(const blink::Node*);
1029 #endif 1038 #endif
1030 1039
1031 #endif // Node_h 1040 #endif // Node_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698