WebKit Bugzilla
Attachment 349110 Details for
Bug 189395
: [LFC] Inline replaced height calculation should use "used value"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189395-20180906211719.patch (text/plain), 2.68 KB, created by
zalan
on 2018-09-06 21:17:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-09-06 21:17:22 PDT
Size:
2.68 KB
patch
obsolete
>Subversion Revision: 235773 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 764bfd04fa71018b4b02b1052b9a3705c7c02abf..90d6c12ac740594258f7c503e0cb2774f4ebe8e1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-09-06 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Inline replaced height calculation should use "used value" >+ https://bugs.webkit.org/show_bug.cgi?id=189395 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Use the already assigned width value (aka used value) instead of the computed value when computing the inline's height. >+ see https://www.w3.org/TR/CSS22/cascade.html#value-stages for "used" and "computed" value. >+ >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin): >+ > 2018-09-06 Zalan Bujtas <zalan@apple.com> > > [LFC] Add support for min/max-height percentage values. >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index 81634d03bee39126c2579e4afb2a5228f2ff474b..dc836fa98e3dca8e79dfb17f9d874a37620286ee 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -788,22 +788,21 @@ HeightAndMargin FormattingContext::Geometry::inlineReplacedHeightAndMargin(const > > auto& style = layoutBox.style(); > auto replaced = layoutBox.replaced(); >- auto& containingBlockDisplayBox = layoutContext.displayBoxForLayoutBox(*layoutBox.containingBlock()); >- auto containingBlockWidth = containingBlockDisplayBox.width(); > > auto height = fixedValue(precomputedHeight ? Length { precomputedHeight.value(), Fixed } : style.logicalHeight()); >- auto heightIsAuto = style.logicalHeight().isAuto(); >- auto width = computedValueIfNotAuto(style.logicalWidth(), containingBlockWidth); >+ auto heightIsAuto = !precomputedHeight && style.logicalHeight().isAuto(); >+ auto widthIsAuto = style.logicalWidth().isAuto(); > > if (!height && !heightIsAuto) > ASSERT_NOT_IMPLEMENTED_YET(); > >- if (heightIsAuto && !width && replaced->hasIntrinsicHeight()) { >+ if (heightIsAuto && widthIsAuto && replaced->hasIntrinsicHeight()) { > // #2 > height = replaced->intrinsicHeight(); > } else if (heightIsAuto && replaced->hasIntrinsicRatio()) { > // #3 >- height = *width / replaced->intrinsicRatio(); >+ auto usedWidth = layoutContext.displayBoxForLayoutBox(layoutBox).width(); >+ height = usedWidth / replaced->intrinsicRatio(); > } else if (heightIsAuto && replaced->hasIntrinsicHeight()) { > // #4 > height = replaced->intrinsicHeight();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189395
: 349110