Changeset 269921 in webkit
- Timestamp:
- Nov 17, 2020 1:14:04 PM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269918 r269921 1 2020-11-17 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][Integration] Disable percentage type min/max-width/height 4 https://bugs.webkit.org/show_bug.cgi?id=219045 5 6 Reviewed by Antti Koivisto. 7 8 The integration layer code does not support them yet. 9 10 * layout/integration/LayoutIntegrationCoverage.cpp: 11 (WebCore::LayoutIntegration::canUseForChild): 12 1 13 2020-11-17 Sihui Liu <sihui_liu@apple.com> 2 14 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
r269836 r269921 580 580 } 581 581 582 #if ALLOW_IMAGES || ALLOW_ALL_REPLACED || ALLOW_INLINE_BLOCK 583 auto isSupportedStyle = [] (const auto& style) { 584 if (style.verticalAlign() == VerticalAlign::Sub || style.verticalAlign() == VerticalAlign::Super) 585 return false; 586 auto& width = style.width(); 587 auto& height = style.height(); 588 if (width.isPercent() || height.isPercent()) 589 return false; 590 if (width.isAuto() && (style.minWidth().isPercent() || style.maxWidth().isPercent())) 591 return false; 592 if (height.isAuto() && (style.minHeight().isPercent() || style.maxHeight().isPercent())) 593 return false; 594 return true; 595 }; 596 #endif 582 597 #if ALLOW_IMAGES || ALLOW_ALL_REPLACED 583 598 if (is<RenderReplaced>(child)) { … … 589 604 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons); 590 605 591 auto& style = replaced.style(); 592 if (style.width().isPercent() || style.height().isPercent()) 593 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons); 594 595 if (style.verticalAlign() == VerticalAlign::Sub || style.verticalAlign() == VerticalAlign::Super) 606 if (!isSupportedStyle(replaced.style())) 596 607 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons); 597 608 … … 620 631 621 632 auto& style = block.style(); 622 if ( block.style().display() != DisplayType::InlineBlock)633 if (!isSupportedStyle(style)) 623 634 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons) 624 if (style.verticalAlign() == VerticalAlign::Sub || style.verticalAlign() == VerticalAlign::Super) 625 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons); 626 if (style.width().isPercent() || style.height().isPercent()) 627 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons); 635 if (style.display() != DisplayType::InlineBlock) 636 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons) 628 637 629 638 return reasons;
Note: See TracChangeset
for help on using the changeset viewer.