Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bleroux
Copy link
Contributor

@bleroux bleroux commented Sep 19, 2022

Description

Before this PR, the HTML renderer does not render properly borders when width > 0.
(FYI, rendering zeroed width borders was fixed in #34812).

When width > 0, the border is rendered by calling RecordingCanvas.drawRect. The Rect is computed by PathRef._detectRect which might return a Rect with negative width and/or height, this leads to wrong computations when clipping (and the border being not visible).

This PR fixed PathRef._detectRect to return a Rect with positive width and height.

Related Issue

Fixes flutter/flutter#111750

Tests

Adds 2 tests.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Sep 19, 2022
@bleroux bleroux requested a review from yjbanov September 19, 2022 14:03
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yjbanov yjbanov added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 19, 2022
@auto-submit auto-submit bot merged commit 56a9dee into flutter:main Sep 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 19, 2022
@bleroux bleroux deleted the fix_html_does_not_render_non_zeroed_width_borders branch September 19, 2022 18:34
Oleh-Sv pushed a commit to Oleh-Sv/engine that referenced this pull request Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Web] Border bottom rendering bug in html rendering mode.

2 participants