[Webkit-unassigned] [Bug 190106] New: Style::determineChange() does a full RenderStyle compare when it needs !=

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 28 20:42:23 PDT 2018


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

            Bug ID: 190106
           Summary: Style::determineChange() does a full RenderStyle
                    compare when it needs !=
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon.fraser at apple.com

Style::determineChange() has:

    if (s1 != s2) {
        if (s1.inheritedNotEqual(&s2))
            return Inherit;

        if (s1.alignItems() != s2.alignItems() || s1.justifyItems() != s2.justifyItems())
            return Inherit;

        return NoInherit;
    }

That s1 != s2 is a deep, full compare since:

    bool operator!=(const RenderStyle& other) const { return !(*this == other); }

We should probably implement operator != for the common types, which early returns.

-- 
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/20180929/b75d600e/attachment.html>


More information about the webkit-unassigned mailing list