Closed
Bug 1490619
Opened 7 years ago
Closed 6 years ago
GetComputedStyle for an inset property on an overconstrained abspos or fixed element returns used value, not absolutized computed value
Categories
(Core :: DOM: CSS Object Model, enhancement, P3)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla67
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Whiteboard: [webcompat?])
Attachments
(5 files)
See the testcase. Every other browser returns 3px, we return 199px.
https://drafts.csswg.org/cssom/#resolved-value-special-case-property-like-top
We should probably make nsComputedDOMStyle::GetAbsoluteOffset more like GetRelativeOffset:
https://searchfox.org/mozilla-central/rev/9e7995b3c384945740985107a4de601b27904718/layout/style/nsComputedDOMStyle.cpp#4142
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(emilio)
Whiteboard: [webcompat?]
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(emilio)
Summary: GetComputedStyle for an inset property on an overconstrained element returns used value, not absolutized computed value → GetComputedStyle for an inset property on an overconstrained abspos or fixed element returns used value, not absolutized computed value
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(emilio)
Assignee | ||
Comment 1•7 years ago
|
||
Per https://drafts.csswg.org/cssom/#resolved-value-special-case-property-like-top
This passes all the tests in
https://github.com/web-platform-tests/wpt/pull/12956, but I don't know if I need
a special-case for grid items in the GetCBPaddingRect and such... Is GridItemCB
what percentages are resolved against?
Assignee | ||
Comment 2•7 years ago
|
||
Mats, do you know if I need a grid-item special-case for this? I assume so. Also, is it right that we're still messing with the paddings with your patch for bug 1478485? I'd expect this test-case to return 0.
Assignee: nobody → emilio
Flags: needinfo?(emilio) → needinfo?(mats)
Updated•7 years ago
|
Attachment #9008392 -
Attachment mime type: text/plain → text/html
Comment 3•7 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
> Created attachment 9008392 [details]
> Grid item testcase.
>
> Mats, do you know if I need a grid-item special-case for this? I assume so.
The grid container isn't the absolute containing block in this test,
the viewport is. So the result (8px) is the margin-left of <body>.
The "static position" in this case is a bit special though:
https://drafts.csswg.org/css-grid/#static-position
It seems to me we should use the "content edges of the grid container",
so I would expect the result to be 18px and the green block positioned
at 10,10 from the top-left of the blue block.
It appears the Grid spec changed just a couple of weeks ago though.
https://github.com/w3c/csswg-drafts/issues/3020
It used to say "padding edges" so our current layout reflects that.
I filed bug 1490730.
> Also, is it right that we're still messing with the paddings with your patch
> for bug 1478485?
Bug 1478485 deals with the other case: when the grid container is
the CB, where we should use the grid area.
Flags: needinfo?(mats)
Updated•7 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Attachment #9008389 -
Attachment description: Fall back to the computed value for overconstrained abspos / fixed pos. → Bug 1490619 - Fall back to the computed value for overconstrained abspos / fixed pos.
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
The resolved percentage values (bottom and right) looks weird to me (being negative), but I haven't investigated what the correct values should be here.
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06e188d40c8d
Fall back to the computed value for overconstrained abspos / fixed pos. r=mats
![]() |
||
Comment 7•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in
before you can comment on or make changes to this bug.
Description
•