Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCompute value of float according to position value #8111
Conversation
|
There's a moratorium on creating new old-style reftests. Instead, you can use |
7d602dd
to
bd471a7
|
I updated the pull request. |
| var computed_style = getComputedStyle(document.querySelector("div"))["float"]; | ||
| assert_equals(computed_style, "none"); | ||
|
|
||
| document.querySelector("div").setAttribute("position", "absolute"); |
This comment has been minimized.
This comment has been minimized.
eefriedman
Oct 22, 2015
Contributor
The position attribute on <div> has no meaning. Did you mean to set the style attribute?
The fact that you could make this mistake and have the test still pass indicates that it's not ideal... maybe add a stylesheet with a style like div { float: left }, have the test check that float is left, then change the position using the style attribute.
|
Review status: 0 of 3 files reviewed at latest revision, all discussions resolved, some commit checks pending. tests/wpt/mozilla/tests/css/float_relative_to_position.html, line 17 [r1] (raw file): Comments from the review on Reviewable.io |
|
|
|
@jdm and @eefriedman Would you rather I rebase now (because of the changes mentioned by bors) and loose history in the review or would you rather I wait until the review is finished? |
|
Rebasing doesn't lose history. Reviewable is very permissive about these things. |
|
r? @SimonSapin |
87f8f71
to
595f11d
|
I know you guys are busy and this isn't urgent but I'm just pinging this to make it doesn't fall into the cracks :) |
|
@bors-servo r+ |
|
|
|
(Sorry about the delay! I was away the last two weeks.) |
Compute value of float according to position value According to CSS2 Section 9.7, if 'position' has a value of 'absolute' or 'fixed' the computed value of 'float' should be 'none'. This changes the float to a single_keyword_computed which checks the positioned value of the element to compute the float value. Fixes #8002 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8111) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
|
|
|
|
|
Since it failed twice, I'll run it locally to check the result. |
|
@bors-servo retry @gilles-leblanc, the failures are on different tests, both known to fail intermittently. |
Compute value of float according to position value According to CSS2 Section 9.7, if 'position' has a value of 'absolute' or 'fixed' the computed value of 'float' should be 'none'. This changes the float to a single_keyword_computed which checks the positioned value of the element to compute the float value. Fixes #8002 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8111) <!-- Reviewable:end -->
|
|
gilles-leblanc commentedOct 21, 2015
According to CSS2 Section 9.7, if 'position' has a value of 'absolute'
or 'fixed' the computed value of 'float' should be 'none'.
This changes the float to a single_keyword_computed which checks the
positioned value of the element to compute the float value.
Fixes #8002