[Webkit-unassigned] [Bug 39280] New: Wrong ternary in CSSStyleSelector::SelectorChecker::checkOneSelector

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 18 03:29:03 PDT 2010


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

           Summary: Wrong ternary in
                    CSSStyleSelector::SelectorChecker::checkOneSelector
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Trivial
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yhayashi at google.com


In CSSStyleSelector::SelectorChecker::checkOneSelector and checkSelector in WebCore/css/CSSStyleSelector.cpp, there are multiple occurrence of ternary that looks like:
RenderStyle* parentStyle = elementStyle ? elementParentStyle : e->parentNode()->renderStyle();
where it should look like:
RenderStyle* parentStyle = elementParentStyle ? elementParentStyle : e->parentNode()->renderStyle();

If I'm reading the code correctly, elementStyle and elementParentStyle are either both NULL or both non-NULL so there isn't any visible problem because of this code.  However, I think it's worth fixing so I'm going to attach a patch to fix it.

Thanks,

-- 
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