Bug 34505 - RenderLayer::convertToLayerCoords() is called through transformed layers
Summary: RenderLayer::convertToLayerCoords() is called through transformed layers
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-02 16:39 PST by James Robinson
Modified: 2010-04-26 09:30 PDT (History)
2 users (show)

See Also:


Attachments
Testcase (111 bytes, text/html)
2010-04-26 09:30 PDT, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2010-02-02 16:39:45 PST
The comments in RenderLayer.cpp indicate that RenderLayer::convertToLayerCoords() is never used to map between transformed layers.  This seems to not actually be the case - in particular adding the assertion:

    ASSERT(!parentLayer->hasTransform());

at http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderLayer.cpp#L1081 trips on lots of tests.  Some of the tests that trip this are:

  fast/repaint/block-selection-gap-in-composited-layer.html
  fast/repaint/reflection-repaint-test.html
  fast/repaint/subtree-layoutstate-transform.html
  fast/repaint/transform-absolute-child.html
  fast/repaint/transform-repaint-descendants.html
  fast/transforms/overflow-with-transform.html
  fast/transforms/transform-positioned-ancestor.html
  fast/transforms/transformed-focused-text-input.html
  fast/transforms/transforms-with-opacity.html

I don't know if the assertion is incorrect, the comments are incorrect, or the code is wrong.
Comment 1 James Robinson 2010-02-02 16:55:42 PST
The following HTML snippet is sufficient to cause an assertion failure:

<!DOCTYPE html>
<div style="-webkit-transform: rotate(0deg);">
  <div style="position:absolute">.</div>
</div>

The callstack is:

FrameView::layout()
RenderLayer::updateLayerPositions()
RenderLayer::updateLayerPositions()
RenderLayer::updateLayerPositions()
RenderLayer::updateLayerPositions()
RenderLayer::convertToLayerCoords()

At a glance, I don't see any code that checks for transforms before calling convertToLayerCoords().
Comment 2 Simon Fraser (smfr) 2010-04-26 09:30:48 PDT
Created attachment 54306 [details]
Testcase