[Webkit-unassigned] [Bug 266532] New: Vertical layout repaint issue with overflown themed element due to RenderBox::computeVisibleRectsInContainer()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 16 02:15:27 PST 2023


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

            Bug ID: 266532
           Summary: Vertical layout repaint issue with overflown themed
                    element due to
                    RenderBox::computeVisibleRectsInContainer()
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: annevk at annevk.nl
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Created attachment 469084

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

screenshot

While testing https://github.com/WebKit/WebKit/pull/21741 (bug 266347) I found an issue for this input:

data:text/html,<input%20type=checkbox%20switch%20style=width:10px;height:10px;writing-mode:vertical-rl>

I also tested it with writing-mode set on a parent:

data:text/html,<p%20style=writing-mode:vertical-rl><input%20type=checkbox%20switch%20style=width:10px;height:10px>

In both cases a repaint issue occurs.

This happens because of the flipForWritingModeCall() call in RenderBox::computeVisibleRectsInContainer():

    if (isWritingModeRoot()) {
        if (!isOutOfFlowPositioned() || !context.dirtyRectIsFlipped) {
            flipForWritingMode(adjustedRects);
            context.dirtyRectIsFlipped = true;
        }
    }

It incorrectly adjusts the x offset obtained from RenderThemeMac::adjustRepaintRect() at some earlier point. Removing the call to flipForWritingMode() here fixes the issue. In fact, making flipForWritingMode() a no-op fixes the issue, but I have not run all tests to see if that is the solution. I would appreciate some advice from a layout expert as I'm out of my depth.

I've attached a screenshot from the broken rendering. I'm not sure how to reproduce this without vertical switch support. Perhaps Aditya can think of another themed element with a similar issue.

-- 
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/20231216/f0ea40a7/attachment.htm>


More information about the webkit-unassigned mailing list