[Webkit-unassigned] [Bug 66135] New: CSSMutableStyleDeclaration should not add a property if there is already a existing same property

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 12 06:10:51 PDT 2011


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

           Summary: CSSMutableStyleDeclaration should not add a property
                    if there is already a existing same property
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jnd at chromium.org


When debugging some webpages, I found current CSSMutableStyleDeclaration add a property (removed it at first) regardless whether there is already existing same property in the CSSMutableStyleDeclaration.

For example, Some pages may repeatedly set element.style.display="" to ensure the element displayed as default display style in a timer, the script author may not intend to set the value repeatedly but it happens. A small investigation (nytimes 30+,msnbc 20+, abc 140+,espn 150+) shows it is common observation(only tests home page).

I understand the style changes only call scheduleStyleRecalc, and the real style calculation is done in styleRecalcTimer. I also understand reflow will not be happened since style recalculation can identify a property change is replaced by same value. But we can skip scheduleStyleRecalc and unnecessary style recalculation if we find out they are equal in the beginning in CSSMutableStyleDeclaration::setProperty, which help improve rendering performance even it's just a tiny improvement.

A patch will be provided to fix this issue, but I want to get some inputs at first.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list