Minor style tweak on StyleResolveTree
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Aug 2014 00:01:12 +0000 (00:01 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Aug 2014 00:01:12 +0000 (00:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136233

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-26
Reviewed by Sam Weinig.

* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
Clang likely optimized it away, but I find that explicit style cleaner.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/style/StyleResolveTree.cpp

index 1f60de3..1f4bc29 100644 (file)
@@ -1,3 +1,14 @@
+2014-08-26  Benjamin Poulain  <bpoulain@apple.com>
+
+        Minor style tweak on StyleResolveTree
+        https://bugs.webkit.org/show_bug.cgi?id=136233
+
+        Reviewed by Sam Weinig.
+
+        * style/StyleResolveTree.cpp:
+        (WebCore::Style::resolveTree):
+        Clang likely optimized it away, but I find that explicit style cleaner.
+
 2014-08-26  Brian J. Burg  <burg@cs.washington.edu>
 
         Web Inspector: put feature flags for Inspector domains in the protocol specification
index 50d97ec..0f65bbc 100644 (file)
@@ -931,8 +931,8 @@ void resolveTree(Element& current, RenderStyle& inheritedStyle, RenderTreePositi
         bool forceCheckOfNextElementSibling = false;
         bool forceCheckOfAnyElementSibling = false;
         for (Node* child = current.firstChild(); child; child = child->nextSibling()) {
-            if (child->renderer())
-                childRenderTreePosition.invalidateNextSibling(*child->renderer());
+            if (RenderObject* childRenderer = child->renderer())
+                childRenderTreePosition.invalidateNextSibling(*childRenderer);
             if (child->isTextNode() && child->needsStyleRecalc()) {
                 resolveTextNode(*toText(child), childRenderTreePosition);
                 continue;