Changeset 30117 in webkit


Ignore:
Timestamp:
Feb 9, 2008 4:16:39 PM (16 years ago)
Author:
mitz@apple.com
Message:

Reviewed by Sam Weinig.

  • dom/Element.cpp: (WebCore::Element::recalcStyle): Removed unneeded null checks. styleForElement() can never return null.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r30116 r30117  
     12008-02-09  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=17259
     6          Element::recalcStyle() needlessly null-checks the result of styleForElement()
     7
     8        * dom/Element.cpp:
     9        (WebCore::Element::recalcStyle): Removed unneeded null checks.
     10        styleForElement() can never return null.
     11
    1122008-02-09  David Hyatt  <hyatt@apple.com>
    213
  • trunk/WebCore/dom/Element.cpp

    r30112 r30117  
    731731        }
    732732
    733         if (currentStyle && newStyle) {
     733        if (currentStyle) {
    734734            // Preserve "affected by" bits that were propagated to us from descendants in the case where we didn't do a full
    735735            // style change (e.g., only inline style changed).
     
    750750        }
    751751
    752         if (ch != NoChange) {
    753             if (newStyle)
    754                 setRenderStyle(newStyle);
    755         } else if (changed() && newStyle && (document()->usesSiblingRules() || document()->usesDescendantRules())) {
     752        if (ch != NoChange)
     753            setRenderStyle(newStyle);
     754        else if (changed() && (document()->usesSiblingRules() || document()->usesDescendantRules())) {
    756755            // Although no change occurred, we use the new style so that the cousin style sharing code won't get
    757756            // fooled into believing this style is the same.  This is only necessary if the document actually uses
Note: See TracChangeset for help on using the changeset viewer.