Summary: | Incorrect position: fixed; rendering when child of position:relative/sticky. | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Rebert <webkit> | ||||||||||||||
Component: | CSS | Assignee: | zalan <zalan> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, hyatt, joepeck, kondapallykalyan, simon.fraser, webkit-bug-importer, zalan | ||||||||||||||
Priority: | P2 | Keywords: | HasReduction, InRadar, W3CTest | ||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||
Hardware: | All | ||||||||||||||||
OS: | All | ||||||||||||||||
URL: | http://jsbin.com/rohemer/edit | ||||||||||||||||
Bug Depends on: | |||||||||||||||||
Bug Blocks: | 159753 | ||||||||||||||||
Attachments: |
|
Description
Chris Rebert
2015-07-24 17:35:32 PDT
Created attachment 257495 [details]
Screenshot of correct rendering from Chrome for comparison
Created attachment 257496 [details]
Copy of testcase webpage (in case JS Bin goes down)
Also filed a Radar for this: <rdar://problem/21993128> Only happens when the position:fixed has 'auto' left. There are now tests for this in the CSS2 test suite: http://test.csswg.org/harness/test/css21_dev/single/left-offset-position-fixed-001/ http://test.csswg.org/harness/test/css21_dev/single/right-offset-position-fixed-001/ Created attachment 268137 [details]
Test reduction
Created attachment 268247 [details]
Patch
Comment on attachment 268247 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268247&action=review > Source/WebCore/rendering/RenderBox.cpp:3358 > + const auto& renderBox = downcast<RenderBox>(*current); > + staticPosition -= renderBox.logicalLeft(); > + if (renderBox.isInFlowPositioned()) > + staticPosition -= renderBox.relativePositionOffset().width(); Would it make sense to have an accessor that return renderBox.logicalLeft() + renderBox.relativePositionOffset().width() for in-flow-positioned? Created attachment 268466 [details]
Patch
Comment on attachment 268466 [details] Patch Clearing flags on attachment: 268466 Committed r194710: <http://trac.webkit.org/changeset/194710> All reviewed patches have been landed. Closing bug. Thank you! Removed the entry from Bootstrap's wall: https://github.com/twbs/bootstrap/commit/6ab9e10efa9b3a195d5df26d9b901deaa3437cad (In reply to comment #12) > Thank you! > Removed the entry from Bootstrap's wall: > https://github.com/twbs/bootstrap/commit/ > 6ab9e10efa9b3a195d5df26d9b901deaa3437cad Thanks for reporting it! |