Bug 117474 - Fix regression with dynamically sized replaced elements
Summary: Fix regression with dynamically sized replaced elements
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: BlinkMergeCandidate
Depends on: 109859
  Show dependency treegraph
Reported: 2013-06-10 20:37 PDT by Ryosuke Niwa
Modified: 2024-03-30 20:07 PDT (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-06-10 20:37:15 PDT
Consider merging http://src.chromium.org/viewvc/blink?view=rev&revision=142931

fixed a bug where we treat have the minPreferredLogicalWidth
of percentage height replaced elements be 0. This exposed
a bug where we were not marking the preferred width as dirty.
Specifically, a percentage height replaced element that maintains
aspect ratio needs preferred widths recalculated if the height
of it's containingBlock changes.

Also, rolled hasViewportPercentageLogicalHeight into
hasRelativeLogicalHeight. The two were always called together.
There's a slight change in behavior here where we won't
mark children of the RenderView that have viewport relative heights
as needing layout where we used to, but I don't think that
was needed anyways.
Comment 1 Ahmad Saleem 2023-05-25 05:43:23 PDT
Chrome bug had this testcase: https://jsfiddle.net/v3epa76k/

^ it is passing even in Safari 16.5.

Original merge commit was - https://src.chromium.org/viewvc/blink?view=revision&revision=151805

Seems to be done: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBlock.cpp#840

RenderBox::hasViewportPercentageLogicalHeight() <- Not able to find.

Already done - https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderReplaced.cpp#845

Although since the test is passing, I think, we are fine.

CCing - Alan..