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

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

Issue 1057603002: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use callback interface and callback function. Broken. Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/animation/ElementAnimations.h" 25 #include "core/animation/ElementAnimations.h"
26 #include "core/dom/Attr.h" 26 #include "core/dom/Attr.h"
27 #include "core/dom/DatasetDOMStringMap.h" 27 #include "core/dom/DatasetDOMStringMap.h"
28 #include "core/dom/NamedNodeMap.h" 28 #include "core/dom/NamedNodeMap.h"
29 #include "core/dom/NodeRareData.h" 29 #include "core/dom/NodeRareData.h"
30 #include "core/dom/PseudoElement.h" 30 #include "core/dom/PseudoElement.h"
31 #include "core/dom/custom/CustomElementDefinition.h" 31 #include "core/dom/custom/CustomElementDefinition.h"
32 #include "core/dom/shadow/ElementShadow.h" 32 #include "core/dom/shadow/ElementShadow.h"
33 #include "core/html/ClassList.h" 33 #include "core/html/ClassList.h"
34 #include "core/page/scrolling/ScrollStateCallback.h"
34 #include "core/style/StyleInheritedData.h" 35 #include "core/style/StyleInheritedData.h"
35 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
36 #include "wtf/OwnPtr.h" 37 #include "wtf/OwnPtr.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 class HTMLElement; 41 class HTMLElement;
41 42
42 class ElementRareData : public NodeRareData { 43 class ElementRareData : public NodeRareData {
43 public: 44 public:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 uint32_t decrementProxyCount() 115 uint32_t decrementProxyCount()
115 { 116 {
116 ASSERT(m_proxyCount); 117 ASSERT(m_proxyCount);
117 return --m_proxyCount; 118 return --m_proxyCount;
118 } 119 }
119 uint32_t proxyCount() const { return m_proxyCount; } 120 uint32_t proxyCount() const { return m_proxyCount; }
120 121
121 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti on> definition) { m_customElementDefinition = definition; } 122 void setCustomElementDefinition(PassRefPtrWillBeRawPtr<CustomElementDefiniti on> definition) { m_customElementDefinition = definition; }
122 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); } 123 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); }
123 124
125 void setDistributeScroll(PassRefPtrWillBeRawPtr<ScrollStateCallback> scrollS tateCallback)
126 {
127 m_distributeScroll = scrollStateCallback;
128 }
129
130 ScrollStateCallback* getDistributeScroll() { return m_distributeScroll.get() ; }
131
132 void setApplyScroll(PassRefPtrWillBeRawPtr<ScrollStateCallback> scrollStateC allback)
133 {
134 m_applyScroll = scrollStateCallback;
135 }
136
137 ScrollStateCallback* getApplyScroll() { return m_applyScroll.get(); }
138
124 AttrNodeList& ensureAttrNodeList(); 139 AttrNodeList& ensureAttrNodeList();
125 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } 140 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); }
126 void removeAttrNodeList() { m_attrNodeList.clear(); } 141 void removeAttrNodeList() { m_attrNodeList.clear(); }
127 142
128 DECLARE_TRACE_AFTER_DISPATCH(); 143 DECLARE_TRACE_AFTER_DISPATCH();
129 144
130 private: 145 private:
131 short m_tabindex; 146 short m_tabindex;
132 // As m_proxyCount usually doesn't exceed 10bits (1024), if you want to add some booleans you 147 // As m_proxyCount usually doesn't exceed 10bits (1024), if you want to add some booleans you
133 // can steal some bits from m_proxyCount by using bitfields to prevent Eleme ntRareData bloat. 148 // can steal some bits from m_proxyCount by using bitfields to prevent Eleme ntRareData bloat.
(...skipping 11 matching lines...) Expand all
145 OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper; 160 OwnPtrWillBeMember<InlineCSSStyleDeclaration> m_cssomWrapper;
146 161
147 RefPtr<ComputedStyle> m_computedStyle; 162 RefPtr<ComputedStyle> m_computedStyle;
148 RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition; 163 RefPtrWillBeMember<CustomElementDefinition> m_customElementDefinition;
149 164
150 RefPtrWillBeMember<PseudoElement> m_generatedBefore; 165 RefPtrWillBeMember<PseudoElement> m_generatedBefore;
151 RefPtrWillBeMember<PseudoElement> m_generatedAfter; 166 RefPtrWillBeMember<PseudoElement> m_generatedAfter;
152 RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter; 167 RefPtrWillBeMember<PseudoElement> m_generatedFirstLetter;
153 RefPtrWillBeMember<PseudoElement> m_backdrop; 168 RefPtrWillBeMember<PseudoElement> m_backdrop;
154 169
170 RefPtrWillBeMember<ScrollStateCallback> m_applyScroll;
171 RefPtrWillBeMember<ScrollStateCallback> m_distributeScroll;
haraken 2015/06/27 08:09:33 You can make Oilpan the default for ScrollStateCal
tdresser 2015/06/29 20:59:33 Thanks, I'd tried that earlier, but had been missi
172
155 explicit ElementRareData(LayoutObject*); 173 explicit ElementRareData(LayoutObject*);
156 }; 174 };
157 175
158 inline LayoutSize defaultMinimumSizeForResizing() 176 inline LayoutSize defaultMinimumSizeForResizing()
159 { 177 {
160 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); 178 return LayoutSize(LayoutUnit::max(), LayoutUnit::max());
161 } 179 }
162 180
163 inline ElementRareData::ElementRareData(LayoutObject* layoutObject) 181 inline ElementRareData::ElementRareData(LayoutObject* layoutObject)
164 : NodeRareData(layoutObject) 182 : NodeRareData(layoutObject)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 case FIRST_LETTER: 251 case FIRST_LETTER:
234 return m_generatedFirstLetter.get(); 252 return m_generatedFirstLetter.get();
235 default: 253 default:
236 return 0; 254 return 0;
237 } 255 }
238 } 256 }
239 257
240 } // namespace 258 } // namespace
241 259
242 #endif // ElementRareData_h 260 #endif // ElementRareData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698