Closed
Bug 946273
Opened 12 years ago
Closed 12 years ago
Add unit tests for -moz-box-sizing:border-box on a flex container and/or flex items
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(3 files)
7.30 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
2.51 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
9.14 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
Per bug 939901 comment 18, we should add some unit tests with -moz-box-sizing: border-box on flex containers, as well as on flex items.
Assignee | ||
Updated•12 years ago
|
Summary: Add unit tests for -moz-box-sizing:border-box on a flex container → Add unit tests for -moz-box-sizing:border-box on a flex container and/or flex items
Assignee | ||
Comment 1•12 years ago
|
||
In my local tests so far (w/ "-moz-box-sizing: border-box" on flex container & also on items, in some simple situations), things seem to be working correctly here.
Diego, would you mind posting a testcase (ideally as an attachment on this bug) that demonstrates the issues you were hitting in bug 939901 comment 51?
Flags: needinfo?(diegobfernandez)
Comment 2•12 years ago
|
||
As soon as multiline landed I started a small project to demonstrate flexbox to my company partners
https://github.com/diegobfernandez/HolyGrailFlexbox
can be viewed in https://c9.io/diegobf/github_holygrailflexbox/workspace/index.html
After your request I tried to reproduce it but now I can't.
Maybe I have just missed something.
Sorry.
Flags: needinfo?(diegobfernandez)
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to diegobfernandez from comment #2)
> As soon as multiline landed I started a small project to demonstrate flexbox
> to my company partners
Looks nice!
> After your request I tried to reproduce it but now I can't.
> Maybe I have just missed something.
>
> Sorry.
No worries. I'll take that as good news. :) Please do file a bug (or mention here) if you end up being able to reproduce later, though.
Assignee | ||
Comment 4•12 years ago
|
||
This patch adds 2 reftests:
- one with "box-sizing:border-box" on a horizontal container
- one with "box-sizing:border-box" on flex items *in* a horizontal container, in 4 different configurations.
In both cases, we do (what I believe is) the right thing -- we behave just as if the "width" had been specified as being a bit less (smaller by the amount of the border in that axis). Conveniently, this "just works" due to how nsHTMLReflowState sets up mComputedWidth and mComputedHeight. (This didn't require any special code in nsFlexContainerFrame.)
Attachment #8350186 -
Flags: review?(matspal)
Assignee | ||
Comment 5•12 years ago
|
||
> - one with "box-sizing:border-box" on flex items *in* a horizontal
> container, in 4 different configurations.
This adds a "hg cp" variant of that ^^ test, with the flex items' sizing coming from "flex-basis" instead of "width"
Attachment #8350189 -
Flags: review?(matspal)
Assignee | ||
Comment 6•12 years ago
|
||
...and this patch adds vertical variants of all of these tests (using hg cp + tweaks).
Attachment #8350190 -
Flags: review?(matspal)
Updated•12 years ago
|
Attachment #8350186 -
Flags: review?(matspal) → review+
Updated•12 years ago
|
Attachment #8350189 -
Flags: review?(matspal) → review+
Comment 7•12 years ago
|
||
Comment on attachment 8350190 [details] [diff] [review]
part 3: add testcases with vertical flex containers
r=mats
Attachment #8350190 -
Flags: review?(matspal) → review+
Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2e4b4a2ccced
https://hg.mozilla.org/mozilla-central/rev/48a4eaba1894
https://hg.mozilla.org/mozilla-central/rev/9ed07b8d7939
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•