Changeset 294618 in webkit


Ignore:
Timestamp:
May 21, 2022 7:34:32 PM (2 years ago)
Author:
Alan Bujtas
Message:

Invisible border should not trigger Repaint diff when currentColor changes
https://bugs.webkit.org/show_bug.cgi?id=240763

Reviewed by Simon Fraser.

Let's check if the border is visible to decide if the currentColor should trigger Repaint diff.

Test: fast/repaint/currentColorChange-with-non-visible-border.html

  • Source/WebCore/rendering/style/BorderData.cpp:

(WebCore::BorderData::isEquivalentForPainting const):

  • LayoutTests/fast/repaint/currentColorChange-with-non-visible-border-expected.txt: Added.
  • LayoutTests/fast/repaint/currentColorChange-with-non-visible-border.html: Added.

Canonical link: https://commits.webkit.org/250844@main

Location:
trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/style/BorderData.cpp

    r294195 r294618  
    4141        return true;
    4242
    43     auto borderHasCurrentColor = RenderStyle::isCurrentColor(m_top.color()) || RenderStyle::isCurrentColor(m_right.color()) || RenderStyle::isCurrentColor(m_bottom.color()) || RenderStyle::isCurrentColor(m_left.color());
    44     return !borderHasCurrentColor;
     43    auto visibleBorderHasCurrentColor = (m_top.isVisible() && RenderStyle::isCurrentColor(m_top.color()))
     44        || (m_right.isVisible() && RenderStyle::isCurrentColor(m_right.color()))
     45        || (m_bottom.isVisible() && RenderStyle::isCurrentColor(m_bottom.color()))
     46        || (m_left.isVisible() && RenderStyle::isCurrentColor(m_left.color()));
     47    return !visibleBorderHasCurrentColor;
    4548}
    4649
Note: See TracChangeset for help on using the changeset viewer.