Diff
Modified: trunk/Source/WebCore/ChangeLog (208970 => 208971)
--- trunk/Source/WebCore/ChangeLog 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/ChangeLog 2016-11-24 12:54:00 UTC (rev 208971)
@@ -1,3 +1,30 @@
+2016-11-24 Antti Koivisto <[email protected]>
+
+ Remove unused bool return from Element::willRecalcStyle
+ https://bugs.webkit.org/show_bug.cgi?id=165059
+
+ Reviewed by Andreas Kling.
+
+ It is always true.
+
+ * dom/Element.cpp:
+ (WebCore::Element::willRecalcStyle):
+ * dom/Element.h:
+ * html/HTMLFrameSetElement.cpp:
+ (WebCore::HTMLFrameSetElement::willRecalcStyle):
+ * html/HTMLFrameSetElement.h:
+ * html/HTMLPlugInImageElement.cpp:
+ (WebCore::HTMLPlugInImageElement::willRecalcStyle):
+ * html/HTMLPlugInImageElement.h:
+ * style/StyleTreeResolver.cpp:
+ (WebCore::Style::TreeResolver::resolveComposedTree):
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::willRecalcStyle):
+ * svg/SVGElement.h:
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::willRecalcStyle):
+ * svg/SVGUseElement.h:
+
2016-11-22 Antti Koivisto <[email protected]>
CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::ExtensionStyleSheets::pageUserSheet + 14
Modified: trunk/Source/WebCore/dom/Element.cpp (208970 => 208971)
--- trunk/Source/WebCore/dom/Element.cpp 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/dom/Element.cpp 2016-11-24 12:54:00 UTC (rev 208971)
@@ -3463,10 +3463,9 @@
document().userActionElements().didDetach(this);
}
-bool Element::willRecalcStyle(Style::Change)
+void Element::willRecalcStyle(Style::Change)
{
ASSERT(hasCustomStyleResolveCallbacks());
- return true;
}
void Element::didRecalcStyle(Style::Change)
Modified: trunk/Source/WebCore/dom/Element.h (208970 => 208971)
--- trunk/Source/WebCore/dom/Element.h 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/dom/Element.h 2016-11-24 12:54:00 UTC (rev 208971)
@@ -512,7 +512,7 @@
WEBCORE_EXPORT bool dispatchMouseForceWillBegin();
- virtual bool willRecalcStyle(Style::Change);
+ virtual void willRecalcStyle(Style::Change);
virtual void didRecalcStyle(Style::Change);
virtual void willResetComputedStyle();
virtual void willAttachRenderers();
Modified: trunk/Source/WebCore/html/HTMLFrameSetElement.cpp (208970 => 208971)
--- trunk/Source/WebCore/html/HTMLFrameSetElement.cpp 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/html/HTMLFrameSetElement.cpp 2016-11-24 12:54:00 UTC (rev 208971)
@@ -200,11 +200,10 @@
HTMLElement::defaultEventHandler(event);
}
-bool HTMLFrameSetElement::willRecalcStyle(Style::Change)
+void HTMLFrameSetElement::willRecalcStyle(Style::Change)
{
if (needsStyleRecalc() && renderer())
renderer()->setNeedsLayout();
- return true;
}
Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNode& insertionPoint)
Modified: trunk/Source/WebCore/html/HTMLFrameSetElement.h (208970 => 208971)
--- trunk/Source/WebCore/html/HTMLFrameSetElement.h 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/html/HTMLFrameSetElement.h 2016-11-24 12:54:00 UTC (rev 208971)
@@ -59,7 +59,7 @@
void defaultEventHandler(Event&) final;
- bool willRecalcStyle(Style::Change) final;
+ void willRecalcStyle(Style::Change) final;
InsertionNotificationRequest insertedInto(ContainerNode&) final;
void removedFrom(ContainerNode&) final;
Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (208970 => 208971)
--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp 2016-11-24 12:54:00 UTC (rev 208971)
@@ -236,17 +236,16 @@
return HTMLPlugInElement::childShouldCreateRenderer(child);
}
-bool HTMLPlugInImageElement::willRecalcStyle(Style::Change change)
+void HTMLPlugInImageElement::willRecalcStyle(Style::Change change)
{
// Make sure style recalcs scheduled by a child shadow tree don't trigger reconstruction and cause flicker.
if (change == Style::NoChange && styleValidity() == Style::Validity::Valid)
- return true;
+ return;
// FIXME: There shoudn't be need to force render tree reconstruction here.
// It is only done because loading and load event dispatching is tied to render tree construction.
if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageType() && (displayState() != DisplayingSnapshot))
invalidateStyleAndRenderersForSubtree();
- return true;
}
void HTMLPlugInImageElement::didAttachRenderers()
Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.h (208970 => 208971)
--- trunk/Source/WebCore/html/HTMLPlugInImageElement.h 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.h 2016-11-24 12:54:00 UTC (rev 208971)
@@ -117,7 +117,7 @@
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
bool childShouldCreateRenderer(const Node&) const override;
- bool willRecalcStyle(Style::Change) final;
+ void willRecalcStyle(Style::Change) final;
void didAttachRenderers() final;
void willDetachRenderers() final;
Modified: trunk/Source/WebCore/style/StyleTreeResolver.cpp (208970 => 208971)
--- trunk/Source/WebCore/style/StyleTreeResolver.cpp 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/style/StyleTreeResolver.cpp 2016-11-24 12:54:00 UTC (rev 208971)
@@ -406,12 +406,8 @@
if (shouldResolve) {
element.resetComputedStyle();
- if (element.hasCustomStyleResolveCallbacks()) {
- if (!element.willRecalcStyle(parent.change)) {
- it.traverseNextSkippingChildren();
- continue;
- }
- }
+ if (element.hasCustomStyleResolveCallbacks())
+ element.willRecalcStyle(parent.change);
auto elementUpdate = resolveElement(element);
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (208970 => 208971)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2016-11-24 12:54:00 UTC (rev 208971)
@@ -299,15 +299,14 @@
return -1;
}
-bool SVGElement::willRecalcStyle(Style::Change change)
+void SVGElement::willRecalcStyle(Style::Change change)
{
if (!m_svgRareData || styleResolutionShouldRecompositeLayer())
- return true;
+ return;
// If the style changes because of a regular property change (not induced by SMIL animations themselves)
// reset the "computed style without SMIL style properties", so the base value change gets reflected.
if (change > Style::NoChange || needsStyleRecalc())
m_svgRareData->setNeedsOverrideComputedStyleUpdate();
- return true;
}
SVGElementRareData& SVGElement::ensureSVGRareData()
Modified: trunk/Source/WebCore/svg/SVGElement.h (208970 => 208971)
--- trunk/Source/WebCore/svg/SVGElement.h 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/svg/SVGElement.h 2016-11-24 12:54:00 UTC (rev 208971)
@@ -170,7 +170,7 @@
void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
- bool willRecalcStyle(Style::Change) override;
+ void willRecalcStyle(Style::Change) override;
class InstanceInvalidationGuard;
Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (208970 => 208971)
--- trunk/Source/WebCore/svg/SVGUseElement.cpp 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp 2016-11-24 12:54:00 UTC (rev 208971)
@@ -179,12 +179,12 @@
SVGGraphicsElement::svgAttributeChanged(attrName);
}
-bool SVGUseElement::willRecalcStyle(Style::Change change)
+void SVGUseElement::willRecalcStyle(Style::Change change)
{
// FIXME: Shadow tree should be updated before style recalc.
if (m_shadowTreeNeedsUpdate)
updateShadowTree();
- return SVGGraphicsElement::willRecalcStyle(change);
+ SVGGraphicsElement::willRecalcStyle(change);
}
static HashSet<AtomicString> createAllowedElementSet()
Modified: trunk/Source/WebCore/svg/SVGUseElement.h (208970 => 208971)
--- trunk/Source/WebCore/svg/SVGUseElement.h 2016-11-23 09:37:58 UTC (rev 208970)
+++ trunk/Source/WebCore/svg/SVGUseElement.h 2016-11-24 12:54:00 UTC (rev 208971)
@@ -62,7 +62,7 @@
void buildPendingResource() override;
void parseAttribute(const QualifiedName&, const AtomicString&) override;
void svgAttributeChanged(const QualifiedName&) override;
- bool willRecalcStyle(Style::Change) override;
+ void willRecalcStyle(Style::Change) override;
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
void toClipPath(Path&) override;
bool haveLoadedRequiredResources() override;