setting 'will-change: transform' creates new offsetParent

RESOLVED INVALID

Status

()

Core
DOM: CSS Object Model
P3
normal
RESOLVED INVALID
a year ago
a year ago

People

(Reporter: tomlongmate, Unassigned)

Tracking

47 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36

Steps to reproduce:

a containing element, with the CSS will-change property set to 'transform', steals the offsetParent from any parent divs with a positional value ('relative/absolute') set.


Actual results:

see above


Expected results:

the parent with the position value set should have been defined as the offset parent, rather than the child div with 'will-change'..
Can you provide a standalone testcase?
Flags: needinfo?(tomlongmate)
(Reporter)

Comment 2

a year ago
Sure: https://www.dropbox.com/s/ssm414fjkzlb9kc/index.html?dl=0
Created attachment 8781141 [details]
testcase with will-change: transform
Created attachment 8781142 [details]
testcase without will-change: transform

I confirm the behavior difference with those 2 testcases
Status: UNCONFIRMED → NEW
QA Whiteboard: [bugday-20160815]
Component: Untriaged → Layout
Ever confirmed: true
Flags: needinfo?(tomlongmate)
Product: Firefox → Core
It is a bug of CSSOM, and the behavior is defined in CSSOM View spec [1]. And I think the behavior defined there doesn't make sense. offsetParent should return the first stacking context ancestor rather than just basing on the computed value of position property.

[1] https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetparent
Component: Layout → DOM: CSS Object Model
Filed https://github.com/w3c/csswg-drafts/issues/409
Priority: -- → P3
Created attachment 8781553 [details]
testcase for comparing behavior with different styles
https://lists.w3.org/Archives/Public/www-style/2016Sep/0000.html
"
Algorithm of `Element.offsetParent`
-----------------------------------

  - RESOLVED: Adopt the Gecko/Edge behavior and specify that
              .offsetParent is based on the nearest abspos
              containing block or table cell
"

So it seems to me this bug is invalid.
Flags: needinfo?(xidorn+moz)
Yes.
Status: NEW → RESOLVED
Last Resolved: a year ago
Flags: needinfo?(xidorn+moz)
Resolution: --- → INVALID
Actually I usually prefer closing this kind of bug when I see the change to spec... But given the working group has resolved on that, I think we can close it now.
You need to log in before you can comment on or make changes to this bug.