Fixed position element is truncated if moved onscreen by a transform
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Apr 2015 17:55:07 +0000 (17:55 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Apr 2015 17:55:07 +0000 (17:55 +0000)
commit05a536134f814e69bb05ce5b7d95c835063339fc
tree7194bb134d154b8a8c39ce762e4f527332fa084e
parent8f0bf34c3f52bfda03518a1c6727a89a4fdf81a2
Fixed position element is truncated if moved onscreen by a transform
https://bugs.webkit.org/show_bug.cgi?id=143655
Source/WebCore:

rdar://problem/15020044

Reviewed by Darin Adler.

Our "don't do layout if transform changes" code was too aggressive.
If an element changes between having a transform and not having one, we
really need to do a layout since so much else depends on transforms. In
this particular case, we clip position:fixed elements to the viewport if
they are not transformed, and were failing to re-evaluate this when a
transform was added. Doing a layout fixes this.

Test: compositing/geometry/fixed-transformed.html

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/StyleTransformData.h:
(WebCore::StyleTransformData::hasTransform):

LayoutTests:

Reviewed by Darin Adler.

Test that moves a position:fixed element on-screen using a transform.

* compositing/geometry/fixed-transformed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/geometry/fixed-transformed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleTransformData.h