| Summary: | offsetParent is wrong for a nested element | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Kanaru Sato <i.am.kanaru.sato> | ||||
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | ahmad.saleem792, mike, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Mac (Apple Silicon) | ||||||
| OS: | macOS 13 | ||||||
| URL: | https://jsfiddle.net/xjsm5489/show | ||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=19923 https://bugs.webkit.org/show_bug.cgi?id=253147 |
||||||
| Attachments: |
|
||||||
|
Description
Kanaru Sato
2023-07-05 08:41:08 PDT
I've already checked chrome and firefox correctly recognize the offsetParent...! I am able to reproduce this bug on WebKit ToT (265772@main) and Safari 16.5.1, so it might not be recent regression. This is caused by the continuation tree structure (caused by the inline level element's block level child <span><div>) where we fail to follow the continuation chain for our containing block. (In reply to zalan from comment #3) > This is caused by the continuation tree structure (caused by the inline > level element's block level child <span><div>) where we fail to follow the > continuation chain for our containing block. By any chance, is this relevant WPT? http://wpt.live/css/cssom-view/offsetParent-block-in-inline.html yeah(In reply to Ahmad Saleem from comment #4) > (In reply to zalan from comment #3) > > This is caused by the continuation tree structure (caused by the inline > > level element's block level child <span><div>) where we fail to follow the > > continuation chain for our containing block. > > By any chance, is this relevant WPT? > > http://wpt.live/css/cssom-view/offsetParent-block-in-inline.html yah, it's all about continuation. :/ Thank you for giving replies :) I'd like to debug and fix it. Could I try that? According to your guess, I will take a look on the below parts of WebKit. - `RenderObject::offsetParent()` - `RenderElement::canContainAbsolutelyPositionedObjects()` BTW, should I refer to the below page for how to debug webkit? https://webkit.org/debugging-webkit/ Actually, I'd tried to build and run webkit on local before according to this link, and didn't succeed...TT If there was the better or latest document, could you please give me that?? (In reply to Kanaru Sato from comment #6) > Thank you for giving replies :) > > I'd like to debug and fix it. Could I try that? > According to your guess, I will take a look on the below parts of WebKit. > - `RenderObject::offsetParent()` > - `RenderElement::canContainAbsolutelyPositionedObjects()` > > BTW, should I refer to the below page for how to debug webkit? > https://webkit.org/debugging-webkit/ > Actually, I'd tried to build and run webkit on local before according to > this link, and didn't succeed...TT > > If there was the better or latest document, could you please give me that?? I think you can try bug 253147, which has more details in where the culprit code is and also potential Blink merge candidate. Also can you share your steps and what error you faced? Also join WebKit Slack Channel to get more help and support on how to build local WebKit test environment. |