Changeset 277325 in webkit
- Timestamp:
- May 11, 2021, 8:33:13 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/inline/incorrect-middle-baseline-alignment-with-line-height-expected.html (modified) (1 diff)
-
LayoutTests/fast/inline/line-height-in-non-standards-mode-expected.html (added)
-
LayoutTests/fast/inline/line-height-in-non-standards-mode.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContextQuirks.cpp (modified) (1 diff)
-
Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r277321 r277325 1 2021-05-11 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION(r275515): wpt/quirks/blocks-ignore-line-height.html 4 https://bugs.webkit.org/show_bug.cgi?id=225591 5 <rdar://problem/77766308> 6 7 Reviewed by Antti Koivisto. 8 9 * fast/inline/incorrect-middle-baseline-alignment-with-line-height-expected.html: progression. 10 * fast/inline/line-height-in-non-standards-mode-expected.html: Added. 11 * fast/inline/line-height-in-non-standards-mode.html: Added. 12 1 13 2021-05-11 Cathie Chen <cathiechen@igalia.com> 2 14 -
trunk/LayoutTests/fast/inline/incorrect-middle-baseline-alignment-with-line-height-expected.html
r276767 r277325 4 4 font-size: 20px; 5 5 background-color: green; 6 height: 11 2px;6 height: 110px; 7 7 padding-top: 90px; 8 8 } -
trunk/Source/WebCore/ChangeLog
r277323 r277325 1 2021-05-11 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION(r275515): wpt/quirks/blocks-ignore-line-height.html 4 https://bugs.webkit.org/show_bug.cgi?id=225591 5 <rdar://problem/77766308> 6 7 Reviewed by Antti Koivisto. 8 9 Replace the generic line height quirk with a list-item specific one. 10 The original quirk was added to cover fast/lists/list-item-line-height.html but it looks like 11 it only needs a list-item specific quirk. This is copied from legacy line layout (see InlineFlowBox c'tor). 12 13 Test: fast/inline/line-height-in-non-standards-mode.html 14 15 * layout/formattingContexts/inline/InlineFormattingContextQuirks.cpp: 16 (WebCore::Layout::InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox const): 17 * layout/integration/LayoutIntegrationBoxTree.cpp: 18 (WebCore::LayoutIntegration::rootBoxStyle): 19 * rendering/style/RenderStyle.h: 20 (WebCore::RenderStyle::isOriginalDisplayListItemType const): 21 (WebCore::RenderStyle::isDisplayListItemType): 22 1 23 2021-05-11 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContextQuirks.cpp
r276886 r277325 74 74 return true; 75 75 if (inlineLevelBox.isRootInlineBox()) { 76 auto shouldRootInlineBoxWithNoContentStretchLineBox = [&] { 77 if (inlineLevelBox.layoutBox().style().lineHeight().isNegative()) 78 return false; 79 // The root inline box with non-initial line height value stretches the line box even when root has no content 80 // but there's at least one inline box with content. 81 // e.g. <div style="line-height: 100px;"><span>content</span></div> 82 if (!lineBox.hasInlineBox()) 83 return false; 84 for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) { 85 if (!inlineLevelBox.isInlineBox()) 86 continue; 87 if (inlineLevelBox.hasContent()) 88 return true; 89 } 90 return false; 91 }; 92 return shouldRootInlineBoxWithNoContentStretchLineBox(); 76 // This root inline box has no direct text content and we are in non-standards mode. 77 // Now according to legacy line layout, we need to apply the following list-item specific quirk: 78 // We do not create markers for list items when the list-style-type is none, while other browsers do. 79 // The side effect of having no marker is that in quirks mode we have to specifically check for list-item 80 // and make sure it is treated as if it had content and stretched the line. 81 // see InlineFlowBox c'tor. 82 return inlineLevelBox.layoutBox().style().isOriginalDisplayListItemType(); 93 83 } 94 84 // Non-root inline boxes (e.g. <span>). -
trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
r276216 r277325 47 47 { 48 48 auto clonedStyle = RenderStyle::clone(style); 49 clonedStyle.set Display(DisplayType::Block);49 clonedStyle.setEffectiveDisplay(DisplayType::Block); 50 50 return clonedStyle; 51 51 } -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r277321 r277325 1501 1501 bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleOrGridBox(display()); } 1502 1502 bool isDisplayRegionType() const; 1503 bool isOriginalDisplayListItemType() const { return isDisplayListItemType(originalDisplay()); } 1503 1504 1504 1505 bool setWritingMode(WritingMode); … … 1966 1967 static bool isDisplayGridBox(DisplayType); 1967 1968 static bool isDisplayFlexibleOrGridBox(DisplayType); 1969 static bool isDisplayListItemType(DisplayType); 1968 1970 1969 1971 static LayoutBoxExtent shadowExtent(const ShadowData*); … … 2369 2371 } 2370 2372 2373 inline bool RenderStyle::isDisplayListItemType(DisplayType display) 2374 { 2375 return display == DisplayType::ListItem; 2376 } 2377 2371 2378 inline bool RenderStyle::hasAnyPublicPseudoStyles() const 2372 2379 {
Note:
See TracChangeset
for help on using the changeset viewer.