Skip to content

HTML renderer produces an exception and stops rendering when receiving an unordered rect #140496

@flar

Description

@flar

The legacy behavior of drawRect, drawOval and clipRect has been established by the implementation of Skia which automatically sorts their rects before executing the operation. As we shift our implementations we should verify this behavior at the Flutter framework level.

The problem was initially observed in #128159 when the engine started using the DisplayList to record operations and fixed for drawRect and drawOval in flutter/engine#42556.

Writing a test case for more coverage of these instances of accepting unordered rects pointed out that we have problems with this in the latest engine as reported in #140490. The native platform code is being patched in flutter/engine#49309, but there is still a problem in the HTML renderer which stops rendering and outputs an exception:

══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following DomException object was thrown during a scheduler callback:
  IndexSizeError: Failed to execute 'ellipse' on 'CanvasRenderingContext2D': The major-axis radius
provided (-15) is negative.

The canvaskit renderer appears to pass just fine, but it should probably have a test to verify the behavior as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: web_htmlHTML rendering backend for Webplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions