<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[191017] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/191017">191017</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-10-13 17:14:29 -0700 (Tue, 13 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add helper funtion for checking pointer equivalency and use it
https://bugs.webkit.org/show_bug.cgi?id=150022
Reviewed by Darin Adler.
Source/WebCore:
A common pattern in WebCore code is to check for equivalency of two pointers,
either both null, or both non-null and with equal values. This was written in
several different ways in different places.
Add arePointingToEqualData() to standardize this pattern.
This obviates the need for StyleImage::imagesEquivalent(), counterDataEquivalent()
etc.
Also change some comparisons of DataRef<> which checked the pointer and then the
values to use DataRef<>::operator== which does the same thing. Comparisons of
m_grid and m_gridItem only checked pointer equality, so this is probably a bug fix there.
* page/animation/CSSPropertyAnimation.cpp: if ((!a && !b) || a == b) is redundant so fix,
and add checks for a and b RenderStyle* first.
(WebCore::PropertyWrapperGetter::equals):
(WebCore::StyleImagePropertyWrapper::equals):
(WebCore::PropertyWrapperShadow::equals):
(WebCore::PropertyWrapperMaybeInvalidColor::equals):
(WebCore::FillLayerPropertyWrapperGetter::equals):
(WebCore::FillLayerStyleImagePropertyWrapper::equals):
(WebCore::FillLayersPropertyWrapper::equals):
(WebCore::ShorthandPropertyWrapper::equals):
(WebCore::PropertyWrapperFlex::equals):
(WebCore::PropertyWrapperSVGPaint::equals):
* platform/network/ResourceRequestBase.cpp:
(WebCore::equalIgnoringHeaderFields):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::operator==):
* rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImageData::operator==):
* rendering/style/RenderStyle.cpp: Some nullptr cleanup.
(WebCore::RenderStyle::getCachedPseudoStyle):
(WebCore::RenderStyle::addCachedPseudoStyle):
(WebCore::RenderStyle::changeAffectsVisualOverflow):
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::setWillChange):
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleShadowSVGData::operator==):
* rendering/style/ShadowData.cpp:
(WebCore::ShadowData::operator==):
* rendering/style/StyleImage.h:
(WebCore::StyleImage::imagesEquivalent): Deleted.
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::operator==):
(WebCore::cursorDataEquivalent): Deleted.
(WebCore::quotesDataEquivalent): Deleted.
(WebCore::StyleRareInheritedData::shadowDataEquivalent): Deleted.
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::counterDataEquivalent): Deleted.
(WebCore::StyleRareNonInheritedData::shadowDataEquivalent): Deleted.
(WebCore::StyleRareNonInheritedData::willChangeDataEquivalent): Deleted.
(WebCore::StyleRareNonInheritedData::reflectionDataEquivalent): Deleted.
(WebCore::StyleRareNonInheritedData::animationDataEquivalent): Deleted.
(WebCore::StyleRareNonInheritedData::transitionDataEquivalent): Deleted.
* rendering/style/StyleRareNonInheritedData.h:
Source/WTF:
Add PointerComparison.h which contains the templated pointer comparison
function.
* WTF.xcodeproj/project.pbxproj:
* wtf/PointerComparison.h: Added.
(WTF::arePointingToEqualData):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFWTFxcodeprojprojectpbxproj">trunk/Source/WTF/WTF.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageanimationCSSPropertyAnimationcpp">trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceRequestBasecpp">trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleFillLayercpp">trunk/Source/WebCore/rendering/style/FillLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleNinePieceImagecpp">trunk/Source/WebCore/rendering/style/NinePieceImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleSVGRenderStyleDefscpp">trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleShadowDatacpp">trunk/Source/WebCore/rendering/style/ShadowData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleImageh">trunk/Source/WebCore/rendering/style/StyleImage.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWTFwtfPointerComparisonh">trunk/Source/WTF/wtf/PointerComparison.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WTF/ChangeLog        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-10-13 Simon Fraser <simon.fraser@apple.com>
+
+ Add helper funtion for checking pointer equivalency and use it
+ https://bugs.webkit.org/show_bug.cgi?id=150022
+
+ Reviewed by Darin Adler.
+
+ Add PointerComparison.h which contains the templated pointer comparison
+ function.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/PointerComparison.h: Added.
+ (WTF::arePointingToEqualData):
+
</ins><span class="cx"> 2015-10-12 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> "A + B" with strings shouldn't copy if A or B is empty.
</span></span></pre></div>
<a id="trunkSourceWTFWTFxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">                 0FEB3DCF1BB5D684009D7AAD /* SharedTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEB3DCE1BB5D684009D7AAD /* SharedTask.h */; };
</span><span class="cx">                 0FEB3DD11BB7366B009D7AAD /* ParallelVectorIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEB3DD01BB7366B009D7AAD /* ParallelVectorIterator.h */; };
</span><span class="cx">                 0FED67B61B22D4D80066CE15 /* TinyPtrSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FED67B51B22D4D80066CE15 /* TinyPtrSet.h */; };
</span><ins>+                0FF860951BCCBD740045127F /* PointerComparison.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF860941BCCBD740045127F /* PointerComparison.h */; };
</ins><span class="cx">                 0FFF19DC1BB334EB00886D91 /* ParallelHelperPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FFF19DA1BB334EB00886D91 /* ParallelHelperPool.cpp */; };
</span><span class="cx">                 0FFF19DD1BB334EB00886D91 /* ParallelHelperPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FFF19DB1BB334EB00886D91 /* ParallelHelperPool.h */; };
</span><span class="cx">                 14022F4118F5C3FC007FF0EB /* libbmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14022F4018F5C3FC007FF0EB /* libbmalloc.a */; };
</span><span class="lines">@@ -344,6 +345,7 @@
</span><span class="cx">                 0FEB3DCE1BB5D684009D7AAD /* SharedTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedTask.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FEB3DD01BB7366B009D7AAD /* ParallelVectorIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParallelVectorIterator.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FED67B51B22D4D80066CE15 /* TinyPtrSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TinyPtrSet.h; sourceTree = "<group>"; };
</span><ins>+                0FF860941BCCBD740045127F /* PointerComparison.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PointerComparison.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0FFF19DA1BB334EB00886D91 /* ParallelHelperPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParallelHelperPool.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0FFF19DB1BB334EB00886D91 /* ParallelHelperPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParallelHelperPool.h; sourceTree = "<group>"; };
</span><span class="cx">                 14022F4018F5C3FC007FF0EB /* libbmalloc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libbmalloc.a; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="lines">@@ -837,6 +839,7 @@
</span><span class="cx">                                 0F824A651B7443A0002E345D /* ParkingLot.h */,
</span><span class="cx">                                 A8A472ED151A825B004123FF /* PassRefPtr.h */,
</span><span class="cx">                                 A876DBD7151816E500DADB95 /* Platform.h */,
</span><ins>+                                0FF860941BCCBD740045127F /* PointerComparison.h */,
</ins><span class="cx">                                 0F9D335D165DBA73005AD387 /* PrintStream.cpp */,
</span><span class="cx">                                 0F9D335E165DBA73005AD387 /* PrintStream.h */,
</span><span class="cx">                                 0FC4488216FE9FE100844BE9 /* ProcessID.h */,
</span><span class="lines">@@ -1208,6 +1211,7 @@
</span><span class="cx">                                 A8A47420151A825B004123FF /* SentinelLinkedList.h in Headers */,
</span><span class="cx">                                 A8A47422151A825B004123FF /* SHA1.h in Headers */,
</span><span class="cx">                                 A8A47423151A825B004123FF /* SimpleStats.h in Headers */,
</span><ins>+                                0FF860951BCCBD740045127F /* PointerComparison.h in Headers */,
</ins><span class="cx">                                 A8A47424151A825B004123FF /* SinglyLinkedList.h in Headers */,
</span><span class="cx">                                 A748745317A0BDAE00FA04CB /* SixCharacterHash.h in Headers */,
</span><span class="cx">                                 A8A47426151A825B004123FF /* Spectrum.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWTFwtfPointerComparisonh"></a>
<div class="addfile"><h4>Added: trunk/Source/WTF/wtf/PointerComparison.h (0 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PointerComparison.h         (rev 0)
+++ trunk/Source/WTF/wtf/PointerComparison.h        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WTF_PointerComparison_h
+#define WTF_PointerComparison_h
+
+namespace WTF {
+
+template<typename T> inline bool arePointingToEqualData(const T& a, const T& b)
+{
+ return a == b || (a && b && *a == *b);
+}
+
+} // namespace WTF
+
+using WTF::arePointingToEqualData;
+
+#endif // WTF_PointerComparison_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/ChangeLog        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -1,3 +1,70 @@
</span><ins>+2015-10-13 Simon Fraser <simon.fraser@apple.com>
+
+ Add helper funtion for checking pointer equivalency and use it
+ https://bugs.webkit.org/show_bug.cgi?id=150022
+
+ Reviewed by Darin Adler.
+
+ A common pattern in WebCore code is to check for equivalency of two pointers,
+ either both null, or both non-null and with equal values. This was written in
+ several different ways in different places.
+
+ Add arePointingToEqualData() to standardize this pattern.
+
+ This obviates the need for StyleImage::imagesEquivalent(), counterDataEquivalent()
+ etc.
+
+ Also change some comparisons of DataRef<> which checked the pointer and then the
+ values to use DataRef<>::operator== which does the same thing. Comparisons of
+ m_grid and m_gridItem only checked pointer equality, so this is probably a bug fix there.
+
+ * page/animation/CSSPropertyAnimation.cpp: if ((!a && !b) || a == b) is redundant so fix,
+ and add checks for a and b RenderStyle* first.
+ (WebCore::PropertyWrapperGetter::equals):
+ (WebCore::StyleImagePropertyWrapper::equals):
+ (WebCore::PropertyWrapperShadow::equals):
+ (WebCore::PropertyWrapperMaybeInvalidColor::equals):
+ (WebCore::FillLayerPropertyWrapperGetter::equals):
+ (WebCore::FillLayerStyleImagePropertyWrapper::equals):
+ (WebCore::FillLayersPropertyWrapper::equals):
+ (WebCore::ShorthandPropertyWrapper::equals):
+ (WebCore::PropertyWrapperFlex::equals):
+ (WebCore::PropertyWrapperSVGPaint::equals):
+ * platform/network/ResourceRequestBase.cpp:
+ (WebCore::equalIgnoringHeaderFields):
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::operator==):
+ * rendering/style/NinePieceImage.cpp:
+ (WebCore::NinePieceImageData::operator==):
+ * rendering/style/RenderStyle.cpp: Some nullptr cleanup.
+ (WebCore::RenderStyle::getCachedPseudoStyle):
+ (WebCore::RenderStyle::addCachedPseudoStyle):
+ (WebCore::RenderStyle::changeAffectsVisualOverflow):
+ (WebCore::RenderStyle::changeRequiresLayout):
+ (WebCore::RenderStyle::changeRequiresLayerRepaint):
+ (WebCore::RenderStyle::setWillChange):
+ * rendering/style/SVGRenderStyleDefs.cpp:
+ (WebCore::StyleShadowSVGData::operator==):
+ * rendering/style/ShadowData.cpp:
+ (WebCore::ShadowData::operator==):
+ * rendering/style/StyleImage.h:
+ (WebCore::StyleImage::imagesEquivalent): Deleted.
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::operator==):
+ (WebCore::cursorDataEquivalent): Deleted.
+ (WebCore::quotesDataEquivalent): Deleted.
+ (WebCore::StyleRareInheritedData::shadowDataEquivalent): Deleted.
+ * rendering/style/StyleRareInheritedData.h:
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::operator==):
+ (WebCore::StyleRareNonInheritedData::counterDataEquivalent): Deleted.
+ (WebCore::StyleRareNonInheritedData::shadowDataEquivalent): Deleted.
+ (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent): Deleted.
+ (WebCore::StyleRareNonInheritedData::reflectionDataEquivalent): Deleted.
+ (WebCore::StyleRareNonInheritedData::animationDataEquivalent): Deleted.
+ (WebCore::StyleRareNonInheritedData::transitionDataEquivalent): Deleted.
+ * rendering/style/StyleRareNonInheritedData.h:
+
</ins><span class="cx"> 2015-10-13 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Split TypesettingFeatures into kerning and ligatures bools
</span></span></pre></div>
<a id="trunkSourceWebCorepageanimationCSSPropertyAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -400,9 +401,7 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><del>- // If the style pointers are the same, don't bother doing the test.
- // If either is null, return false. If both are null, return true.
- if ((!a && !b) || a == b)
</del><ins>+ if (a == b)
</ins><span class="cx"> return true;
</span><span class="cx"> if (!a || !b)
</span><span class="cx"> return false;
</span><span class="lines">@@ -536,8 +535,6 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><del>- // If the style pointers are the same, don't bother doing the test.
- // If either is null, return false. If both are null, return true.
</del><span class="cx"> if (a == b)
</span><span class="cx"> return true;
</span><span class="cx"> if (!a || !b)
</span><span class="lines">@@ -545,7 +542,7 @@
</span><span class="cx">
</span><span class="cx"> StyleImage* imageA = (a->*m_getter)();
</span><span class="cx"> StyleImage* imageB = (b->*m_getter)();
</span><del>- return StyleImage::imagesEquivalent(imageA, imageB);
</del><ins>+ return arePointingToEqualData(imageA, imageB);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -674,6 +671,11 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><ins>+ if (a == b)
+ return true;
+ if (!a || !b)
+ return false;
+
</ins><span class="cx"> const ShadowData* shadowA = (a->*m_getter)();
</span><span class="cx"> const ShadowData* shadowB = (b->*m_getter)();
</span><span class="cx">
</span><span class="lines">@@ -790,6 +792,11 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><ins>+ if (a == b)
+ return true;
+ if (!a || !b)
+ return false;
+
</ins><span class="cx"> Color fromColor = (a->*m_getter)();
</span><span class="cx"> Color toColor = (b->*m_getter)();
</span><span class="cx">
</span><span class="lines">@@ -884,11 +891,9 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const FillLayer* a, const FillLayer* b) const
</span><span class="cx"> {
</span><del>- // If the style pointers are the same, don't bother doing the test.
- // If either is null, return false. If both are null, return true.
- if ((!a && !b) || a == b)
- return true;
- if (!a || !b)
</del><ins>+ if (a == b)
+ return true;
+ if (!a || !b)
</ins><span class="cx"> return false;
</span><span class="cx"> return (a->*m_getter)() == (b->*m_getter)();
</span><span class="cx"> }
</span><span class="lines">@@ -945,8 +950,6 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const FillLayer* a, const FillLayer* b) const
</span><span class="cx"> {
</span><del>- // If the style pointers are the same, don't bother doing the test.
- // If either is null, return false. If both are null, return true.
</del><span class="cx"> if (a == b)
</span><span class="cx"> return true;
</span><span class="cx"> if (!a || !b)
</span><span class="lines">@@ -954,7 +957,7 @@
</span><span class="cx">
</span><span class="cx"> StyleImage* imageA = (a->*m_getter)();
</span><span class="cx"> StyleImage* imageB = (b->*m_getter)();
</span><del>- return StyleImage::imagesEquivalent(imageA, imageB);
</del><ins>+ return arePointingToEqualData(imageA, imageB);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -993,6 +996,11 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><ins>+ if (a == b)
+ return true;
+ if (!a || !b)
+ return false;
+
</ins><span class="cx"> const FillLayer* fromLayer = (a->*m_layersGetter)();
</span><span class="cx"> const FillLayer* toLayer = (b->*m_layersGetter)();
</span><span class="cx">
</span><span class="lines">@@ -1041,6 +1049,11 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><ins>+ if (a == b)
+ return true;
+ if (!a || !b)
+ return false;
+
</ins><span class="cx"> for (auto& wrapper : m_propertyWrappers) {
</span><span class="cx"> if (!wrapper->equals(a, b))
</span><span class="cx"> return false;
</span><span class="lines">@@ -1070,9 +1083,7 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><del>- // If the style pointers are the same, don't bother doing the test.
- // If either is null, return false. If both are null, return true.
- if ((!a && !b) || a == b)
</del><ins>+ if (a == b)
</ins><span class="cx"> return true;
</span><span class="cx"> if (!a || !b)
</span><span class="cx"> return false;
</span><span class="lines">@@ -1101,6 +1112,11 @@
</span><span class="cx">
</span><span class="cx"> virtual bool equals(const RenderStyle* a, const RenderStyle* b) const
</span><span class="cx"> {
</span><ins>+ if (a == b)
+ return true;
+ if (!a || !b)
+ return false;
+
</ins><span class="cx"> if ((a->*m_paintTypeGetter)() != (b->*m_paintTypeGetter)())
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceRequestBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "HTTPHeaderNames.h"
</span><span class="cx"> #include "ResourceRequest.h"
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -500,18 +501,7 @@
</span><span class="cx"> if (a.requester() != b.requester())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- FormData* formDataA = a.httpBody();
- FormData* formDataB = b.httpBody();
-
- if (!formDataA)
- return !formDataB;
- if (!formDataB)
- return !formDataA;
-
- if (*formDataA != *formDataB)
- return false;
-
- return true;
</del><ins>+ return arePointingToEqualData(a.httpBody(), b.httpBody());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ResourceRequestBase::compare(const ResourceRequest& a, const ResourceRequest& b)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleFillLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/FillLayer.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/FillLayer.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/FillLayer.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -22,6 +22,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "FillLayer.h"
</span><span class="cx">
</span><ins>+#include <wtf/PointerComparison.h>
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> struct SameSizeAsFillLayer {
</span><span class="lines">@@ -152,7 +154,7 @@
</span><span class="cx"> {
</span><span class="cx"> // We do not check the "isSet" booleans for each property, since those are only used during initial construction
</span><span class="cx"> // to propagate patterns into layers. All layer comparisons happen after values have all been filled in anyway.
</span><del>- return StyleImage::imagesEquivalent(m_image.get(), o.m_image.get()) && m_xPosition == o.m_xPosition && m_yPosition == o.m_yPosition
</del><ins>+ return arePointingToEqualData(m_image.get(), o.m_image.get()) && m_xPosition == o.m_xPosition && m_yPosition == o.m_yPosition
</ins><span class="cx"> && m_backgroundXOrigin == o.m_backgroundXOrigin && m_backgroundYOrigin == o.m_backgroundYOrigin
</span><span class="cx"> && m_attachment == o.m_attachment && m_clip == o.m_clip && m_composite == o.m_composite
</span><span class="cx"> && m_blendMode == o.m_blendMode && m_origin == o.m_origin && m_repeatX == o.m_repeatX
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleNinePieceImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/NinePieceImage.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/NinePieceImage.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/NinePieceImage.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "LengthFunctions.h"
</span><span class="cx"> #include "RenderStyle.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -252,7 +253,7 @@
</span><span class="cx">
</span><span class="cx"> bool NinePieceImageData::operator==(const NinePieceImageData& other) const
</span><span class="cx"> {
</span><del>- return StyleImage::imagesEquivalent(image.get(), other.image.get())
</del><ins>+ return arePointingToEqualData(image, other.image)
</ins><span class="cx"> && imageSlices == other.imageSlices
</span><span class="cx"> && fill == other.fill
</span><span class="cx"> && borderSlices == other.borderSlices
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include "StyleSelfAlignmentData.h"
</span><span class="cx"> #include "WillChangeData.h"
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> #include <algorithm>
</span><span class="cx">
</span><span class="lines">@@ -310,10 +311,10 @@
</span><span class="cx"> RenderStyle* RenderStyle::getCachedPseudoStyle(PseudoId pid) const
</span><span class="cx"> {
</span><span class="cx"> if (!m_cachedPseudoStyles || !m_cachedPseudoStyles->size())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> if (styleType() != NOPSEUDO)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) {
</span><span class="cx"> RenderStyle* pseudoStyle = m_cachedPseudoStyles->at(i).get();
</span><span class="lines">@@ -321,13 +322,13 @@
</span><span class="cx"> return pseudoStyle;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderStyle* RenderStyle::addCachedPseudoStyle(PassRefPtr<RenderStyle> pseudo)
</span><span class="cx"> {
</span><span class="cx"> if (!pseudo)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> ASSERT(pseudo->styleType() > NOPSEUDO);
</span><span class="cx">
</span><span class="lines">@@ -459,11 +460,11 @@
</span><span class="cx"> inline bool RenderStyle::changeAffectsVisualOverflow(const RenderStyle& other) const
</span><span class="cx"> {
</span><span class="cx"> if (rareNonInheritedData.get() != other.rareNonInheritedData.get()
</span><del>- && !rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedData.get()))
</del><ins>+ && !arePointingToEqualData(rareNonInheritedData->m_boxShadow, other.rareNonInheritedData->m_boxShadow))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (rareInheritedData.get() != other.rareInheritedData.get()
</span><del>- && !rareInheritedData->shadowDataEquivalent(*other.rareInheritedData.get()))
</del><ins>+ && !arePointingToEqualData(rareInheritedData->textShadow, other.rareInheritedData->textShadow))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (inherited_flags._text_decorations != other.inherited_flags._text_decorations
</span><span class="lines">@@ -523,13 +524,12 @@
</span><span class="cx"> return true;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other.rareNonInheritedData->m_deprecatedFlexibleBox.get()
- && *rareNonInheritedData->m_deprecatedFlexibleBox.get() != *other.rareNonInheritedData->m_deprecatedFlexibleBox.get())
</del><ins>+ if (rareNonInheritedData->m_deprecatedFlexibleBox != other.rareNonInheritedData->m_deprecatedFlexibleBox)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (rareNonInheritedData->m_flexibleBox.get() != other.rareNonInheritedData->m_flexibleBox.get()
- && *rareNonInheritedData->m_flexibleBox.get() != *other.rareNonInheritedData->m_flexibleBox.get())
</del><ins>+ if (rareNonInheritedData->m_flexibleBox != other.rareNonInheritedData->m_flexibleBox)
</ins><span class="cx"> return true;
</span><ins>+
</ins><span class="cx"> if (rareNonInheritedData->m_order != other.rareNonInheritedData->m_order
</span><span class="cx"> || rareNonInheritedData->m_alignContent != other.rareNonInheritedData->m_alignContent
</span><span class="cx"> || rareNonInheritedData->m_alignItems != other.rareNonInheritedData->m_alignItems
</span><span class="lines">@@ -539,11 +539,10 @@
</span><span class="cx"> || rareNonInheritedData->m_justifySelf != other.rareNonInheritedData->m_justifySelf)
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (!rareNonInheritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get()))
</del><ins>+ if (!arePointingToEqualData(rareNonInheritedData->m_boxReflect, other.rareNonInheritedData->m_boxReflect))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (rareNonInheritedData->m_multiCol.get() != other.rareNonInheritedData->m_multiCol.get()
- && *rareNonInheritedData->m_multiCol.get() != *other.rareNonInheritedData->m_multiCol.get())
</del><ins>+ if (rareNonInheritedData->m_multiCol != other.rareNonInheritedData->m_multiCol)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (rareNonInheritedData->m_transform != other.rareNonInheritedData->m_transform) {
</span><span class="lines">@@ -556,8 +555,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><del>- if (rareNonInheritedData->m_grid.get() != other.rareNonInheritedData->m_grid.get()
- || rareNonInheritedData->m_gridItem.get() != other.rareNonInheritedData->m_gridItem.get())
</del><ins>+ if (rareNonInheritedData->m_grid != other.rareNonInheritedData->m_grid
+ || rareNonInheritedData->m_gridItem != other.rareNonInheritedData->m_gridItem)
</ins><span class="cx"> return true;
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -567,7 +566,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (!rareNonInheritedData->willChangeDataEquivalent(*other.rareNonInheritedData.get())) {
</del><ins>+ if (!arePointingToEqualData(rareNonInheritedData->m_willChange, other.rareNonInheritedData->m_willChange)) {
</ins><span class="cx"> changedContextSensitiveProperties |= ContextSensitivePropertyWillChange;
</span><span class="cx"> // Don't return; keep looking for another change
</span><span class="cx"> }
</span><span class="lines">@@ -616,7 +615,7 @@
</span><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class="cx"> || rareInheritedData->useTouchOverflowScrolling != other.rareInheritedData->useTouchOverflowScrolling
</span><span class="cx"> #endif
</span><del>- || rareInheritedData->listStyleImage != other.rareInheritedData->listStyleImage)
</del><ins>+ || rareInheritedData->listStyleImage != other.rareInheritedData->listStyleImage) // FIXME: needs arePointingToEqualData()?
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (textStrokeWidth() != other.textStrokeWidth())
</span><span class="lines">@@ -700,9 +699,7 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> // If the counter directives change, trigger a relayout to re-calculate counter values and rebuild the counter node tree.
</span><del>- const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirectives.get();
- const CounterDirectiveMap* mapB = other.rareNonInheritedData->m_counterDirectives.get();
- if (!(mapA == mapB || (mapA && mapB && *mapA == *mapB)))
</del><ins>+ if (!arePointingToEqualData(rareNonInheritedData->m_counterDirectives, other.rareNonInheritedData->m_counterDirectives))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if ((visibility() == COLLAPSE) != (other.visibility() == COLLAPSE))
</span><span class="lines">@@ -725,9 +722,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- const QuotesData* quotesDataA = rareInheritedData->quotes.get();
- const QuotesData* quotesDataB = other.rareInheritedData->quotes.get();
- if (!(quotesDataA == quotesDataB || (quotesDataA && quotesDataB && *quotesDataA == *quotesDataB)))
</del><ins>+ if (!arePointingToEqualData(rareInheritedData->quotes, other.rareInheritedData->quotes))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> if (position() != StaticPosition) {
</span><span class="lines">@@ -784,8 +779,7 @@
</span><span class="cx"> // Don't return; keep looking for another change.
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (rareNonInheritedData->m_filter.get() != other.rareNonInheritedData->m_filter.get()
- && *rareNonInheritedData->m_filter.get() != *other.rareNonInheritedData->m_filter.get()) {
</del><ins>+ if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filter) {
</ins><span class="cx"> changedContextSensitiveProperties |= ContextSensitivePropertyFilter;
</span><span class="cx"> // Don't return; keep looking for another change.
</span><span class="cx"> }
</span><span class="lines">@@ -946,8 +940,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderStyle::setWillChange(PassRefPtr<WillChangeData> willChangeData)
</span><span class="cx"> {
</span><del>- if (rareNonInheritedData->m_willChange == willChangeData
- || (rareNonInheritedData->m_willChange && willChangeData && *rareNonInheritedData->m_willChange == *willChangeData))
</del><ins>+ if (arePointingToEqualData(rareNonInheritedData->m_willChange.get(), willChangeData.get()))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> rareNonInheritedData.access()->m_willChange = WTF::move(willChangeData);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleSVGRenderStyleDefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">
</span><span class="cx"> #include "RenderStyle.h"
</span><span class="cx"> #include "SVGRenderStyle.h"
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -216,11 +217,7 @@
</span><span class="cx">
</span><span class="cx"> bool StyleShadowSVGData::operator==(const StyleShadowSVGData& other) const
</span><span class="cx"> {
</span><del>- if ((!shadow && other.shadow) || (shadow && !other.shadow))
- return false;
- if (shadow && other.shadow && (*shadow != *other.shadow))
- return false;
- return true;
</del><ins>+ return arePointingToEqualData(shadow, other.shadow);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> StyleResourceData::StyleResourceData()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleShadowDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/ShadowData.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/ShadowData.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/ShadowData.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> #include "ShadowData.h"
</span><span class="cx">
</span><span class="cx"> #include "LayoutRect.h"
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -39,8 +40,7 @@
</span><span class="cx">
</span><span class="cx"> bool ShadowData::operator==(const ShadowData& o) const
</span><span class="cx"> {
</span><del>- if ((m_next && !o.m_next) || (!m_next && o.m_next)
- || (m_next && o.m_next && *m_next != *o.m_next))
</del><ins>+ if (!arePointingToEqualData(m_next, o.m_next))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return m_location == o.m_location
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleImage.h (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleImage.h        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/StyleImage.h        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -74,11 +74,6 @@
</span><span class="cx"> ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; }
</span><span class="cx"> ALWAYS_INLINE bool isCachedImageSet() const { return m_isCachedImageSet; }
</span><span class="cx">
</span><del>- static bool imagesEquivalent(StyleImage* image1, StyleImage* image2)
- {
- return image1 == image2 || (image1 && image2 && *image1 == *image2);
- }
-
</del><span class="cx"> protected:
</span><span class="cx"> StyleImage()
</span><span class="cx"> : m_isCachedImage(false)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "ShadowData.h"
</span><span class="cx"> #include "StyleCustomPropertyData.h"
</span><span class="cx"> #include "StyleImage.h"
</span><ins>+#include <wtf/PointerComparison.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -235,24 +236,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static bool cursorDataEquivalent(const CursorList* c1, const CursorList* c2)
-{
- if (c1 == c2)
- return true;
- if ((!c1 && c2) || (c1 && !c2))
- return false;
- return (*c1 == *c2);
-}
-
-static bool quotesDataEquivalent(const QuotesData* q1, const QuotesData* q2)
-{
- if (q1 == q2)
- return true;
- if ((!q1 && q2) || (q1 && !q2))
- return false;
- return (*q1 == *q2);
-}
-
</del><span class="cx"> bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
</span><span class="cx"> {
</span><span class="cx"> return textStrokeColor == o.textStrokeColor
</span><span class="lines">@@ -265,8 +248,8 @@
</span><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> && tapHighlightColor == o.tapHighlightColor
</span><span class="cx"> #endif
</span><del>- && shadowDataEquivalent(o)
- && cursorDataEquivalent(cursorData.get(), o.cursorData.get())
</del><ins>+ && arePointingToEqualData(textShadow, o.textShadow)
+ && arePointingToEqualData(cursorData, o.cursorData)
</ins><span class="cx"> && indent == o.indent
</span><span class="cx"> && m_effectiveZoom == o.m_effectiveZoom
</span><span class="cx"> && widows == o.widows
</span><span class="lines">@@ -307,7 +290,7 @@
</span><span class="cx"> && hyphenationString == o.hyphenationString
</span><span class="cx"> && locale == o.locale
</span><span class="cx"> && textEmphasisCustomMark == o.textEmphasisCustomMark
</span><del>- && quotesDataEquivalent(quotes.get(), o.quotes.get())
</del><ins>+ && arePointingToEqualData(quotes, o.quotes)
</ins><span class="cx"> && m_tabSize == o.m_tabSize
</span><span class="cx"> && m_lineGrid == o.m_lineGrid
</span><span class="cx"> #if ENABLE(CSS_IMAGE_ORIENTATION)
</span><span class="lines">@@ -333,16 +316,7 @@
</span><span class="cx"> && trailingWord == o.trailingWord
</span><span class="cx"> #endif
</span><span class="cx"> && m_customProperties == o.m_customProperties
</span><del>- && StyleImage::imagesEquivalent(listStyleImage.get(), o.listStyleImage.get());
</del><ins>+ && arePointingToEqualData(listStyleImage, o.listStyleImage);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
-{
- if ((!textShadow && o.textShadow) || (textShadow && !o.textShadow))
- return false;
- if (textShadow && o.textShadow && (*textShadow != *o.textShadow))
- return false;
- return true;
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -58,7 +58,6 @@
</span><span class="cx"> {
</span><span class="cx"> return !(*this == o);
</span><span class="cx"> }
</span><del>- bool shadowDataEquivalent(const StyleRareInheritedData&) const;
</del><span class="cx">
</span><span class="cx"> RefPtr<StyleImage> listStyleImage;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -31,6 +31,8 @@
</span><span class="cx"> #include "StyleImage.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="cx"> #include "StyleScrollSnapPoints.h"
</span><ins>+#include <wtf/PointerComparison.h>
+#include <wtf/RefPtr.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -233,21 +235,21 @@
</span><span class="cx"> && m_scrollSnapPoints == o.m_scrollSnapPoints
</span><span class="cx"> #endif
</span><span class="cx"> && contentDataEquivalent(o)
</span><del>- && counterDataEquivalent(o)
- && shadowDataEquivalent(o)
- && willChangeDataEquivalent(o)
- && reflectionDataEquivalent(o)
- && animationDataEquivalent(o)
- && transitionDataEquivalent(o)
</del><ins>+ && arePointingToEqualData(m_counterDirectives, o.m_counterDirectives)
+ && arePointingToEqualData(m_boxShadow, o.m_boxShadow)
+ && arePointingToEqualData(m_willChange, o.m_willChange)
+ && arePointingToEqualData(m_boxReflect, o.m_boxReflect)
+ && arePointingToEqualData(m_animations, o.m_animations)
+ && arePointingToEqualData(m_transitions, o.m_transitions)
</ins><span class="cx"> && m_mask == o.m_mask
</span><span class="cx"> && m_maskBoxImage == o.m_maskBoxImage
</span><span class="cx"> && m_pageSize == o.m_pageSize
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><del>- && shapeOutsideDataEquivalent(o)
</del><ins>+ && arePointingToEqualData(m_shapeOutside, o.m_shapeOutside)
</ins><span class="cx"> && m_shapeMargin == o.m_shapeMargin
</span><span class="cx"> && m_shapeImageThreshold == o.m_shapeImageThreshold
</span><span class="cx"> #endif
</span><del>- && clipPathOperationsEquivalent(o)
</del><ins>+ && arePointingToEqualData(m_clipPath, o.m_clipPath)
</ins><span class="cx"> && m_textDecorationColor == o.m_textDecorationColor
</span><span class="cx"> && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColor
</span><span class="cx"> && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
</span><span class="lines">@@ -305,84 +307,6 @@
</span><span class="cx"> return !a && !b;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool StyleRareNonInheritedData::counterDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if (m_counterDirectives.get() == o.m_counterDirectives.get())
- return true;
-
- if (m_counterDirectives && o.m_counterDirectives && *m_counterDirectives == *o.m_counterDirectives)
- return true;
-
- return false;
-}
-
-bool StyleRareNonInheritedData::shadowDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if ((!m_boxShadow && o.m_boxShadow) || (m_boxShadow && !o.m_boxShadow))
- return false;
- if (m_boxShadow && o.m_boxShadow && (*m_boxShadow != *o.m_boxShadow))
- return false;
- return true;
-}
-
-bool StyleRareNonInheritedData::willChangeDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if (m_willChange != o.m_willChange) {
- if (!m_willChange || !o.m_willChange)
- return false;
- return *m_willChange == *o.m_willChange;
- }
- return true;
-}
-
-bool StyleRareNonInheritedData::reflectionDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if (m_boxReflect != o.m_boxReflect) {
- if (!m_boxReflect || !o.m_boxReflect)
- return false;
- return *m_boxReflect == *o.m_boxReflect;
- }
- return true;
-}
-
-bool StyleRareNonInheritedData::animationDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if ((!m_animations && o.m_animations) || (m_animations && !o.m_animations))
- return false;
- if (m_animations && o.m_animations && (*m_animations != *o.m_animations))
- return false;
- return true;
-}
-
-bool StyleRareNonInheritedData::transitionDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if ((!m_transitions && o.m_transitions) || (m_transitions && !o.m_transitions))
- return false;
- if (m_transitions && o.m_transitions && (*m_transitions != *o.m_transitions))
- return false;
- return true;
-}
-
-bool StyleRareNonInheritedData::clipPathOperationsEquivalent(const StyleRareNonInheritedData& o) const
-{
- if ((!m_clipPath && o.m_clipPath) || (m_clipPath && !o.m_clipPath))
- return false;
- if (m_clipPath && o.m_clipPath && (*m_clipPath != *o.m_clipPath))
- return false;
- return true;
-}
-
-#if ENABLE(CSS_SHAPES)
-bool StyleRareNonInheritedData::shapeOutsideDataEquivalent(const StyleRareNonInheritedData& o) const
-{
- if ((!m_shapeOutside && o.m_shapeOutside) || (m_shapeOutside && !o.m_shapeOutside))
- return false;
- if (m_shapeOutside && o.m_shapeOutside && (*m_shapeOutside != *o.m_shapeOutside))
- return false;
- return true;
-}
-#endif
-
</del><span class="cx"> bool StyleRareNonInheritedData::hasFilters() const
</span><span class="cx"> {
</span><span class="cx"> return m_filter.get() && !m_filter->m_operations.isEmpty();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (191016 => 191017)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2015-10-14 00:12:18 UTC (rev 191016)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2015-10-14 00:14:29 UTC (rev 191017)
</span><span class="lines">@@ -92,16 +92,7 @@
</span><span class="cx"> bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); }
</span><span class="cx">
</span><span class="cx"> bool contentDataEquivalent(const StyleRareNonInheritedData&) const;
</span><del>- bool counterDataEquivalent(const StyleRareNonInheritedData&) const;
- bool shadowDataEquivalent(const StyleRareNonInheritedData&) const;
- bool willChangeDataEquivalent(const StyleRareNonInheritedData&) const;
- bool reflectionDataEquivalent(const StyleRareNonInheritedData&) const;
- bool animationDataEquivalent(const StyleRareNonInheritedData&) const;
- bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
- bool clipPathOperationsEquivalent(const StyleRareNonInheritedData&) const;
-#if ENABLE(CSS_SHAPES)
- bool shapeOutsideDataEquivalent(const StyleRareNonInheritedData&) const;
-#endif
</del><ins>+
</ins><span class="cx"> bool hasFilters() const;
</span><span class="cx"> #if ENABLE(FILTERS_LEVEL_2)
</span><span class="cx"> bool hasBackdropFilters() const;
</span></span></pre>
</div>
</div>
</body>
</html>