Bug 123795 - [CSS Regions] Percent-sized floats are sized relative to the size of the NamedFlowThread instead of the region they are rendered in
Summary: [CSS Regions] Percent-sized floats are sized relative to the size of the Name...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: AdobeTracked
Depends on:
Blocks: 124706
  Show dependency treegraph
Reported: 2013-11-05 02:27 PST by Mihai Balan
Modified: 2022-07-12 17:19 PDT (History)
5 users (show)

See Also:

HTML file highlighting the problem (1.74 KB, text/html)
2013-11-05 02:27 PST, Mihai Balan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Balan 2013-11-05 02:27:28 PST
Created attachment 216017 [details]
HTML file highlighting the problem

When a float that has the size specified with percents is flowed through a region chain with multiple regions, the size of the float is computed relative to the sum of the sizes of the regions instead of the size of the region the float is rendered in.
Comment 1 Mihai Balan 2013-11-05 04:43:23 PST
Must double check for width, too and non-floats, too.
Comment 2 Alan Stearns 2013-11-05 06:31:58 PST
And we should check that when a float is fragmented, each fragment is sized relative to its individual region
Comment 3 Andrei Bucur 2014-05-15 00:16:09 PDT
I've investigated this a bit and it's not very straightforward to implement. The problem here is that the top position of a float depends on the width of a float.

For example, a left float will be positioned alongside other left floats as long as it still fits. This means you first need to determine the width and if the float doesn't fit, reposition it below the other floats. This is doable with regions but it implies a multi-step layout and important changes in the code. Instead of computing the width and the positioning the float you:
- first need to estimate the top
- compute the width in the region at that top offset
- if it doesn't fit, move it below the other floats
- recompute the width at the new top
Comment 4 Brent Fulgham 2022-07-12 17:19:14 PDT
CSS Regions were removed in Bug 174978.