[Webkit-unassigned] [Bug 190245] New: [WPE] Text incorrectly rendered when using SimpleLineLayout

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 3 03:38:27 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=190245

            Bug ID: 190245
           Summary: [WPE] Text incorrectly rendered when using
                    SimpleLineLayout
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit WPE
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: magomez at igalia.com
                CC: bugs-noreply at webkitgtk.org

Created attachment 351505

  --> https://bugs.webkit.org/attachment.cgi?id=351505&action=review

Patch

I'm attaching a simple testcase to reproduce this problem.

In the test, we have a div with its own GraphicsLayer, and inside that div there's a text element. Then the text is changed at the same time than the style of the layer is changed. This should cause that both the div and the text were repainted but that's not happening (unless we're always using complex text). What happens is:

- RenderText::setText is called because of the changed text, and it invalidates its simpleLineLayout
- RenderLayerCompositor::layerStyleChanged is called because of the div style change. This calls RenderLayerBacking::updateAfterDescendants which calls RenderLayerBacking::updateDrawsContent. This one traverses the children to check whether its children are visible. As the child RenderText can't provide a simpleLineLayout (it won't be recreated until the layout happens), the boundingBox gotten for the text is empty, so RenderLayerBacking thinks that it doesn't have anything to paint and call GraphicsLayer::setDrawsContent with false.
- The layout happens, and it requests a display of the layer contents through RenderLayerBacking::setContentsNeedDisplay, but as the associated GraphicsLayer has drawsContent to false, it's discarded
- then the layout properly calculates the size for the new text and sets the GraphicsLayer drawsContent to true, but it's too late cause there isn't any new call to RenderLayerBacking::setContentsNeedDisplay
- in the end, the GraphicsLayer is not repainted because it wasn't set a dirty rectangle to repaint.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181003/59f4d553/attachment.html>


More information about the webkit-unassigned mailing list