Title: [157783] trunk/Source/WebCore
Revision
157783
Author
akl...@apple.com
Date
2013-10-22 03:58:16 -0700 (Tue, 22 Oct 2013)

Log Message

Remove some unnecessary null checks in RenderElement::setStyle().
<https://webkit.org/b/123146>

After assigning the new style to RenderElement::m_style, we know that
it'll be non-null, so remove all the checking for this.

Reviewed by Antti Koivisto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (157782 => 157783)


--- trunk/Source/WebCore/ChangeLog	2013-10-22 10:10:25 UTC (rev 157782)
+++ trunk/Source/WebCore/ChangeLog	2013-10-22 10:58:16 UTC (rev 157783)
@@ -1,3 +1,13 @@
+2013-10-22  Andreas Kling  <akl...@apple.com>
+
+        Remove some unnecessary null checks in RenderElement::setStyle().
+        <https://webkit.org/b/123146>
+
+        After assigning the new style to RenderElement::m_style, we know that
+        it'll be non-null, so remove all the checking for this.
+
+        Reviewed by Antti Koivisto.
+
 2013-10-22  Gyuyoung Kim  <gyuyoung....@samsung.com>
 
         Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (157782 => 157783)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2013-10-22 10:10:25 UTC (rev 157782)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2013-10-22 10:58:16 UTC (rev 157783)
@@ -375,15 +375,15 @@
     RefPtr<RenderStyle> oldStyle = m_style.release();
     m_style = std::move(style);
 
-    updateFillImages(oldStyle ? oldStyle->backgroundLayers() : 0, m_style ? m_style->backgroundLayers() : 0);
-    updateFillImages(oldStyle ? oldStyle->maskLayers() : 0, m_style ? m_style->maskLayers() : 0);
+    updateFillImages(oldStyle ? oldStyle->backgroundLayers() : nullptr, m_style->backgroundLayers());
+    updateFillImages(oldStyle ? oldStyle->maskLayers() : nullptr, m_style->maskLayers());
 
-    updateImage(oldStyle ? oldStyle->borderImage().image() : 0, m_style ? m_style->borderImage().image() : 0);
-    updateImage(oldStyle ? oldStyle->maskBoxImage().image() : 0, m_style ? m_style->maskBoxImage().image() : 0);
+    updateImage(oldStyle ? oldStyle->borderImage().image() : nullptr, m_style->borderImage().image());
+    updateImage(oldStyle ? oldStyle->maskBoxImage().image() : nullptr, m_style->maskBoxImage().image());
 
 #if ENABLE(CSS_SHAPES)
-    updateShapeImage(oldStyle ? oldStyle->shapeInside() : 0, m_style ? m_style->shapeInside() : 0);
-    updateShapeImage(oldStyle ? oldStyle->shapeOutside() : 0, m_style ? m_style->shapeOutside() : 0);
+    updateShapeImage(oldStyle ? oldStyle->shapeInside() : nullptr, m_style->shapeInside());
+    updateShapeImage(oldStyle ? oldStyle->shapeOutside() : nullptr, m_style->shapeOutside());
 #endif
 
     // We need to ensure that view->maximalOutlineSize() is valid for any repaints that happen
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to