WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
70795
Need to figure out how flexboxes interact with column breaks, page breaks, etc.
https://bugs.webkit.org/show_bug.cgi?id=70795
Summary
Need to figure out how flexboxes interact with column breaks, page breaks, etc.
Ojan Vafai
Reported
2011-10-24 19:33:36 PDT
http://dev.w3.org/csswg/css3-flexbox/#pagination
Attachments
Add attachment
proposed patch, testcase, etc.
Ojan Vafai
Comment 1
2012-08-28 14:06:23 PDT
12:24 PM <TabAtkins> ojan: Yes, there's an entire section in the spec marked as "non-normative" detailing exactly how we think flexbox pagination should work. It's non-normative because we want feedback on it from implementors. ... 12:30 PM <TabAtkins> If the answer ends up being "they're atomic for breaking purposes", that would be sad but acceptable. 12:30 PM <TabAtkins> ojan: Though, what happens when you try to print a webpage laid out using flexbox? 12:30 PM <dhyatt> that's my concern. i doubt anyone even knows. :) 12:30 PM <dhyatt> probably something terrible 12:31 PM <ojan> dhyatt: does CSS pagination and printing use the same logic? 12:34 PM <dhyatt> ojan: all pagination is sharing breaking logic right now 12:34 PM <dhyatt> ojan: what i'm working on now is bringing columns/pages/regions painting and hit testing and that sort of thing even closer together also 12:34 PM <dhyatt> but for the purposes of a layout system like flex box or grid 12:35 PM <dhyatt> "paginating" you don't really have to think about regions/columns/pages 12:35 PM <dhyatt> you just care about "breaks" 12:35 PM <ojan> dhyatt: i see...making sure printing flexboxes works reasonably seems higher priority than CSS columns/pages IMO. i didn't realize it used the same logic. 12:36 PM <dhyatt> really the big thing to know 12:36 PM <dhyatt> is that you want to set your correct block progression position before laying out 12:36 PM <dhyatt> i.e., y position in horizontal text 12:36 PM <dhyatt> if you can't do that 12:36 PM <dhyatt> e.g., because flexing pushes you 12:36 PM <dhyatt> then you have to relayout 12:36 PM <dhyatt> because how you have to paginate may change 12:37 PM <dhyatt> flex boxes are probably very difficult to paginate (like tables) 12:38 PM <dhyatt> well i don't really get how flexing works 12:38 PM <dhyatt> like do you lay out unflexed and paginate? 12:38 PM <dhyatt> and then flex and re-paginate? 12:38 PM <dhyatt> that could get weird 12:38 PM <TabAtkins> dhyatt: Not *quite*. 12:39 PM <TabAtkins> I forget details now, but it tries to be as close to normal flex layout as possible, without being expensive or crazy. 12:40 PM <dhyatt> ojan: well the big thing to know is just that there's a relayout you need to do if your position moves in such a way that pagination has to be redone 12:40 PM <dhyatt> that and try to set the correct position in advance 12:40 PM <dhyatt> since if you do, pagination will just work. 12:40 PM <TabAtkins> And it has substantially different behavior for the four cases of row/column and single-line/multi-line, with multi-line columns being the craziest. 12:41 PM <dhyatt> TabAtkins: well it's cool you wrote something down at least! :) 12:41 PM <ojan> taking a quick look at the spec, i think it tries to set the correct position in advance 12:41 PM <ojan> assuming i understand what you mean by that :) 12:41 PM <dhyatt> yeah i just mean e.g., block layout makes a y-estimation for example 12:42 PM <dhyatt> and tries to lay out at the correct y position 12:42 PM <dhyatt> if it ends up being wrong and has to move 12:42 PM <dhyatt> then it will relayout 12:42 PM <dhyatt> because being paginated requires that 12:42 PM <dhyatt> markForPaginationRelayoutIfNeeded 12:42 PM <dhyatt> is the function that handles it ... 12:44 PM <dhyatt> ojan: i mean, the one thing i'd suggest is we just make sure it doesn't go toes up 12:44 PM <dhyatt> ojan: since crashes would be bad 12:44 PM <ojan> dhyatt: yeah, we should at least add tests showing that we are doing something sane or insane 12:44 PM <dhyatt> for unflexing flex boxes 12:44 PM <dhyatt> as long as you place them as you go 12:44 PM <dhyatt> they should paginate correctly 12:44 PM <ojan> dhyatt: although, i expect our fuzzer would catch most crashes in this area 12:45 PM <dhyatt> for flexing it depends on if you relayout if you flex 12:45 PM <dhyatt> if you do, then they might kinda work too
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug