Changeset 194417 in webkit
- Timestamp:
- Dec 24, 2015, 9:37:22 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r194416 r194417 1 2015-12-24 Simon Fraser <simon.fraser@apple.com> 2 3 Use an enum for RenderElement's baseTypeFlags 4 https://bugs.webkit.org/show_bug.cgi?id=152553 5 6 Reviewed by Zalan Bujtas. 7 8 Use an enum, rather than unsigned, for the BaseTypeFlags bit mask. 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::RenderBlock): 12 * rendering/RenderBlock.h: 13 * rendering/RenderBox.cpp: 14 (WebCore::RenderBox::RenderBox): 15 * rendering/RenderBox.h: 16 * rendering/RenderBoxModelObject.cpp: 17 (WebCore::RenderBoxModelObject::RenderBoxModelObject): 18 * rendering/RenderBoxModelObject.h: 19 * rendering/RenderElement.cpp: 20 (WebCore::RenderElement::RenderElement): 21 * rendering/RenderElement.h: 22 * rendering/RenderLayerModelObject.cpp: 23 (WebCore::RenderLayerModelObject::RenderLayerModelObject): 24 * rendering/RenderLayerModelObject.h: 25 1 26 2015-12-24 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r194143 r194417 182 182 }; 183 183 184 RenderBlock::RenderBlock(Element& element, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)184 RenderBlock::RenderBlock(Element& element, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 185 185 : RenderBox(element, WTF::move(style), baseTypeFlags | RenderBlockFlag) 186 186 { 187 187 } 188 188 189 RenderBlock::RenderBlock(Document& document, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)189 RenderBlock::RenderBlock(Document& document, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 190 190 : RenderBox(document, WTF::move(style), baseTypeFlags | RenderBlockFlag) 191 191 { -
trunk/Source/WebCore/rendering/RenderBlock.h
r192054 r194417 61 61 62 62 protected: 63 RenderBlock(Element&, Ref<RenderStyle>&&, unsigned baseTypeFlags);64 RenderBlock(Document&, Ref<RenderStyle>&&, unsigned baseTypeFlags);63 RenderBlock(Element&, Ref<RenderStyle>&&, BaseTypeFlags); 64 RenderBlock(Document&, Ref<RenderStyle>&&, BaseTypeFlags); 65 65 virtual ~RenderBlock(); 66 66 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r194405 r194417 118 118 } 119 119 120 RenderBox::RenderBox(Element& element, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)120 RenderBox::RenderBox(Element& element, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 121 121 : RenderBoxModelObject(element, WTF::move(style), baseTypeFlags) 122 122 , m_minPreferredLogicalWidth(-1) … … 127 127 } 128 128 129 RenderBox::RenderBox(Document& document, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)129 RenderBox::RenderBox(Document& document, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 130 130 : RenderBoxModelObject(document, WTF::move(style), baseTypeFlags) 131 131 , m_minPreferredLogicalWidth(-1) -
trunk/Source/WebCore/rendering/RenderBox.h
r194404 r194417 629 629 630 630 protected: 631 RenderBox(Element&, Ref<RenderStyle>&&, unsigned baseTypeFlags);632 RenderBox(Document&, Ref<RenderStyle>&&, unsigned baseTypeFlags);631 RenderBox(Element&, Ref<RenderStyle>&&, BaseTypeFlags); 632 RenderBox(Document&, Ref<RenderStyle>&&, BaseTypeFlags); 633 633 634 634 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) override; -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r194025 r194417 167 167 } 168 168 169 RenderBoxModelObject::RenderBoxModelObject(Element& element, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)169 RenderBoxModelObject::RenderBoxModelObject(Element& element, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 170 170 : RenderLayerModelObject(element, WTF::move(style), baseTypeFlags | RenderBoxModelObjectFlag) 171 171 { 172 172 } 173 173 174 RenderBoxModelObject::RenderBoxModelObject(Document& document, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)174 RenderBoxModelObject::RenderBoxModelObject(Document& document, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 175 175 : RenderLayerModelObject(document, WTF::move(style), baseTypeFlags | RenderBoxModelObjectFlag) 176 176 { -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r191049 r194417 237 237 238 238 protected: 239 RenderBoxModelObject(Element&, Ref<RenderStyle>&&, unsigned baseTypeFlags);240 RenderBoxModelObject(Document&, Ref<RenderStyle>&&, unsigned baseTypeFlags);239 RenderBoxModelObject(Element&, Ref<RenderStyle>&&, BaseTypeFlags); 240 RenderBoxModelObject(Document&, Ref<RenderStyle>&&, BaseTypeFlags); 241 241 242 242 virtual void willBeDestroyed() override; -
trunk/Source/WebCore/rendering/RenderElement.cpp
r194002 r194417 82 82 } 83 83 84 inline RenderElement::RenderElement(ContainerNode& elementOrDocument, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)84 inline RenderElement::RenderElement(ContainerNode& elementOrDocument, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 85 85 : RenderObject(elementOrDocument) 86 86 , m_baseTypeFlags(baseTypeFlags) … … 104 104 } 105 105 106 RenderElement::RenderElement(Element& element, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)106 RenderElement::RenderElement(Element& element, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 107 107 : RenderElement(static_cast<ContainerNode&>(element), WTF::move(style), baseTypeFlags) 108 108 { 109 109 } 110 110 111 RenderElement::RenderElement(Document& document, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)111 RenderElement::RenderElement(Document& document, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 112 112 : RenderElement(static_cast<ContainerNode&>(document), WTF::move(style), baseTypeFlags) 113 113 { -
trunk/Source/WebCore/rendering/RenderElement.h
r192966 r194417 219 219 220 220 protected: 221 enum BaseTypeFlag s{222 RenderLayerModelObjectFlag = 1 << 0,223 RenderBoxModelObjectFlag = 1 << 1,224 RenderInlineFlag = 1 << 2,225 RenderReplacedFlag = 1 << 3,226 RenderBlockFlag = 1 << 4,227 RenderBlockFlowFlag = 1 << 5,221 enum BaseTypeFlag { 222 RenderLayerModelObjectFlag = 1 << 0, 223 RenderBoxModelObjectFlag = 1 << 1, 224 RenderInlineFlag = 1 << 2, 225 RenderReplacedFlag = 1 << 3, 226 RenderBlockFlag = 1 << 4, 227 RenderBlockFlowFlag = 1 << 5, 228 228 }; 229 230 RenderElement(Element&, Ref<RenderStyle>&&, unsigned baseTypeFlags); 231 RenderElement(Document&, Ref<RenderStyle>&&, unsigned baseTypeFlags); 229 230 typedef unsigned BaseTypeFlags; 231 232 RenderElement(Element&, Ref<RenderStyle>&&, BaseTypeFlags); 233 RenderElement(Document&, Ref<RenderStyle>&&, BaseTypeFlags); 232 234 233 235 bool layerCreationAllowedForSubtree() const; … … 277 279 278 280 private: 279 RenderElement(ContainerNode&, Ref<RenderStyle>&&, unsigned baseTypeFlags);281 RenderElement(ContainerNode&, Ref<RenderStyle>&&, BaseTypeFlags); 280 282 void node() const = delete; 281 283 void nonPseudoNode() const = delete; -
trunk/Source/WebCore/rendering/RenderLayerModelObject.cpp
r190834 r194417 37 37 bool RenderLayerModelObject::s_layerWasSelfPainting = false; 38 38 39 RenderLayerModelObject::RenderLayerModelObject(Element& element, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)39 RenderLayerModelObject::RenderLayerModelObject(Element& element, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 40 40 : RenderElement(element, WTF::move(style), baseTypeFlags | RenderLayerModelObjectFlag) 41 41 { 42 42 } 43 43 44 RenderLayerModelObject::RenderLayerModelObject(Document& document, Ref<RenderStyle>&& style, unsignedbaseTypeFlags)44 RenderLayerModelObject::RenderLayerModelObject(Document& document, Ref<RenderStyle>&& style, BaseTypeFlags baseTypeFlags) 45 45 : RenderElement(document, WTF::move(style), baseTypeFlags | RenderLayerModelObjectFlag) 46 46 { -
trunk/Source/WebCore/rendering/RenderLayerModelObject.h
r177259 r194417 53 53 54 54 protected: 55 RenderLayerModelObject(Element&, Ref<RenderStyle>&&, unsigned baseTypeFlags);56 RenderLayerModelObject(Document&, Ref<RenderStyle>&&, unsigned baseTypeFlags);55 RenderLayerModelObject(Element&, Ref<RenderStyle>&&, BaseTypeFlags); 56 RenderLayerModelObject(Document&, Ref<RenderStyle>&&, BaseTypeFlags); 57 57 58 58 void createLayer();
Note:
See TracChangeset
for help on using the changeset viewer.