Changeset 249085 in webkit
- Timestamp:
- Aug 24, 2019, 6:34:50 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
layout/layouttree/LayoutBox.cpp (modified) (1 diff)
-
layout/layouttree/LayoutBox.h (modified) (3 diffs)
-
layout/layouttree/LayoutTreeBuilder.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249084 r249085 1 2019-08-24 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Box::isAnonymous() can not rely on the lack of ElementType. 4 https://bugs.webkit.org/show_bug.cgi?id=201106 5 <rdar://problem/54660287> 6 7 Reviewed by Antti Koivisto. 8 9 Add bool m_isAnonymous member to mark anonymous layout boxes. Anonymous boxes are not rare enough to include this variable in RareData. 10 11 * layout/layouttree/LayoutBox.h: 12 (WebCore::Layout::Box::setIsAnonymous): 13 * layout/layouttree/LayoutTreeBuilder.cpp: 14 (WebCore::Layout::TreeBuilder::createLayoutBox): 15 1 16 2019-08-24 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp
r249081 r249085 44 44 , m_baseTypeFlags(baseTypeFlags) 45 45 , m_hasRareData(false) 46 , m_isAnonymous(false) 46 47 { 47 48 if (isReplaced()) -
trunk/Source/WebCore/layout/layouttree/LayoutBox.h
r249081 r249085 46 46 Document, 47 47 Body, 48 TableWrapperBox, // The table generates a principal block container box called the table wrapper box that contains the table box and any caption boxes. 48 TableWrapperBox, // The table generates a principal block container box called the table wrapper box that contains the table box and any caption boxes. 49 49 TableBox, // The table box is a block-level box that contains the table's internal table boxes. 50 50 TableColumn, … … 160 160 void setPreviousSibling(Box& previousSibling) { m_previousSibling = &previousSibling; } 161 161 162 void setIsAnonymous() { m_isAnonymous = true; } 163 162 164 protected: 163 165 Box(Optional<ElementAttributes>, RenderStyle&&, BaseTypeFlags); … … 196 198 unsigned m_baseTypeFlags : 6; 197 199 bool m_hasRareData : 1; 200 bool m_isAnonymous : 1; 198 201 }; 199 202 -
trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
r249082 r249085 132 132 else 133 133 childLayoutBox = makeUnique<Box>(downcast<RenderText>(childRenderer).originalText(), RenderStyle::createAnonymousStyleWithDisplay(parentRenderer.style(), DisplayType::Inline)); 134 childLayoutBox->setIsAnonymous(); 134 135 return childLayoutBox; 135 136 } … … 143 144 // Construct the principal table wrapper box (and not the table box itself). 144 145 childLayoutBox = makeUnique<Container>(Box::ElementAttributes { Box::ElementType::TableWrapperBox }, RenderStyle::clone(renderer.style())); 146 childLayoutBox->setIsAnonymous(); 145 147 } else if (is<RenderReplaced>(renderer)) { 146 148 if (displayType == DisplayType::Block) … … 190 192 childLayoutBox->setColumnSpan(columnSpan); 191 193 } 194 195 if (childRenderer.isAnonymous()) 196 childLayoutBox->setIsAnonymous(); 192 197 193 198 return childLayoutBox;
Note:
See TracChangeset
for help on using the changeset viewer.