Summary: | webkit-backface-visibility on a parent element stops background-position from updating | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nathan Stitt <nathan> | ||||||||
Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, dino, esprehn+autocc, glenn, jchaffraix, sam, simon.fraser, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 525.x (Safari 3.2) | ||||||||||
Hardware: | Mac (Intel) | ||||||||||
OS: | OS X 10.8 | ||||||||||
URL: | http://jsfiddle.net/nathanstitt/JcX4g/7/ | ||||||||||
Bug Depends on: | 116397 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Nathan Stitt
2013-05-17 08:24:22 PDT
Forgot to mention, removing the div & re-adding it does force an update to the background-position and it will re-render properly. http://jsfiddle.net/JcX4g/5/ line 28 shows the work-around. I've also prepared a plain javascript version of the test case: http://jsfiddle.net/nathanstitt/JcX4g/7/ The bug occurs when there's both a position change and a background-position change. Created attachment 202210 [details]
Testcase
Not a recent regression. Probably regressed with http://trac.webkit.org/changeset/102952 The optimization added in r102952 is basically incorrect. RenderStyle::diff() returns StyleDifferenceLayoutPositionedMovementOnly, but that doesn't mean that some other property changes don't require repainting. Created attachment 202216 [details]
Patch
Comment on attachment 202216 [details]
Patch
Wrong bug.
Created attachment 204781 [details]
Patch
Comment on attachment 204781 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=204781&action=review > Source/WebCore/rendering/RenderObject.h:1255 > + if (oldStyle && m_style->diffRequiresRepaint(oldStyle)) Is there some other level of the code already doing a diff? Is it bad for performance to do this here too? > Source/WebCore/rendering/style/RenderStyle.cpp:797 > + unsigned contextSensitiveProperties = 0; This should be named changedContextSensitiveProperties. Leaving out the word “changed” makes it hard to understand that this is an out argument and whether 0 is the correct value to initialize to. (In reply to comment #12) > (From update of attachment 204781 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=204781&action=review > > > Source/WebCore/rendering/RenderObject.h:1255 > > + if (oldStyle && m_style->diffRequiresRepaint(oldStyle)) > > Is there some other level of the code already doing a diff? Is it bad for performance to do this here too? There is, but the earlier diff bailed early, never testing the repaint properties. So this isn't another full diff. > > Source/WebCore/rendering/style/RenderStyle.cpp:797 > > + unsigned contextSensitiveProperties = 0; > > This should be named changedContextSensitiveProperties. Leaving out the word “changed” makes it hard to understand that this is an out argument and whether 0 is the correct value to initialize to. Agreedn. |