Changeset 208971 in webkit


Ignore:
Timestamp:
Nov 24, 2016 4:54:00 AM (7 years ago)
Author:
Antti Koivisto
Message:

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:
Location:
trunk/Source/WebCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r208967 r208971  
     12016-11-24  Antti Koivisto  <antti@apple.com>
     2
     3        Remove unused bool return from Element::willRecalcStyle
     4        https://bugs.webkit.org/show_bug.cgi?id=165059
     5
     6        Reviewed by Andreas Kling.
     7
     8        It is always true.
     9
     10        * dom/Element.cpp:
     11        (WebCore::Element::willRecalcStyle):
     12        * dom/Element.h:
     13        * html/HTMLFrameSetElement.cpp:
     14        (WebCore::HTMLFrameSetElement::willRecalcStyle):
     15        * html/HTMLFrameSetElement.h:
     16        * html/HTMLPlugInImageElement.cpp:
     17        (WebCore::HTMLPlugInImageElement::willRecalcStyle):
     18        * html/HTMLPlugInImageElement.h:
     19        * style/StyleTreeResolver.cpp:
     20        (WebCore::Style::TreeResolver::resolveComposedTree):
     21        * svg/SVGElement.cpp:
     22        (WebCore::SVGElement::willRecalcStyle):
     23        * svg/SVGElement.h:
     24        * svg/SVGUseElement.cpp:
     25        (WebCore::SVGUseElement::willRecalcStyle):
     26        * svg/SVGUseElement.h:
     27
    1282016-11-22  Antti Koivisto  <antti@apple.com>
    229
  • trunk/Source/WebCore/dom/Element.cpp

    r208828 r208971  
    34643464}
    34653465
    3466 bool Element::willRecalcStyle(Style::Change)
     3466void Element::willRecalcStyle(Style::Change)
    34673467{
    34683468    ASSERT(hasCustomStyleResolveCallbacks());
    3469     return true;
    34703469}
    34713470
  • trunk/Source/WebCore/dom/Element.h

    r208875 r208971  
    513513    WEBCORE_EXPORT bool dispatchMouseForceWillBegin();
    514514
    515     virtual bool willRecalcStyle(Style::Change);
     515    virtual void willRecalcStyle(Style::Change);
    516516    virtual void didRecalcStyle(Style::Change);
    517517    virtual void willResetComputedStyle();
  • trunk/Source/WebCore/html/HTMLFrameSetElement.cpp

    r207458 r208971  
    201201}
    202202
    203 bool HTMLFrameSetElement::willRecalcStyle(Style::Change)
     203void HTMLFrameSetElement::willRecalcStyle(Style::Change)
    204204{
    205205    if (needsStyleRecalc() && renderer())
    206206        renderer()->setNeedsLayout();
    207     return true;
    208207}
    209208
  • trunk/Source/WebCore/html/HTMLFrameSetElement.h

    r208179 r208971  
    6060    void defaultEventHandler(Event&) final;
    6161
    62     bool willRecalcStyle(Style::Change) final;
     62    void willRecalcStyle(Style::Change) final;
    6363
    6464    InsertionNotificationRequest insertedInto(ContainerNode&) final;
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp

    r208828 r208971  
    237237}
    238238
    239 bool HTMLPlugInImageElement::willRecalcStyle(Style::Change change)
     239void HTMLPlugInImageElement::willRecalcStyle(Style::Change change)
    240240{
    241241    // Make sure style recalcs scheduled by a child shadow tree don't trigger reconstruction and cause flicker.
    242242    if (change == Style::NoChange && styleValidity() == Style::Validity::Valid)
    243         return true;
     243        return;
    244244
    245245    // FIXME: There shoudn't be need to force render tree reconstruction here.
     
    247247    if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageType() && (displayState() != DisplayingSnapshot))
    248248        invalidateStyleAndRenderersForSubtree();
    249     return true;
    250249}
    251250
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.h

    r208828 r208971  
    118118    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
    119119    bool childShouldCreateRenderer(const Node&) const override;
    120     bool willRecalcStyle(Style::Change) final;
     120    void willRecalcStyle(Style::Change) final;
    121121    void didAttachRenderers() final;
    122122    void willDetachRenderers() final;
  • trunk/Source/WebCore/style/StyleTreeResolver.cpp

    r208743 r208971  
    407407            element.resetComputedStyle();
    408408
    409             if (element.hasCustomStyleResolveCallbacks()) {
    410                 if (!element.willRecalcStyle(parent.change)) {
    411                     it.traverseNextSkippingChildren();
    412                     continue;
    413                 }
    414             }
     409            if (element.hasCustomStyleResolveCallbacks())
     410                element.willRecalcStyle(parent.change);
    415411
    416412            auto elementUpdate = resolveElement(element);
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r208001 r208971  
    300300}
    301301
    302 bool SVGElement::willRecalcStyle(Style::Change change)
     302void SVGElement::willRecalcStyle(Style::Change change)
    303303{
    304304    if (!m_svgRareData || styleResolutionShouldRecompositeLayer())
    305         return true;
     305        return;
    306306    // If the style changes because of a regular property change (not induced by SMIL animations themselves)
    307307    // reset the "computed style without SMIL style properties", so the base value change gets reflected.
    308308    if (change > Style::NoChange || needsStyleRecalc())
    309309        m_svgRareData->setNeedsOverrideComputedStyleUpdate();
    310     return true;
    311310}
    312311
  • trunk/Source/WebCore/svg/SVGElement.h

    r207458 r208971  
    171171    void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
    172172
    173     bool willRecalcStyle(Style::Change) override;
     173    void willRecalcStyle(Style::Change) override;
    174174
    175175    class InstanceInvalidationGuard;
  • trunk/Source/WebCore/svg/SVGUseElement.cpp

    r208705 r208971  
    180180}
    181181
    182 bool SVGUseElement::willRecalcStyle(Style::Change change)
     182void SVGUseElement::willRecalcStyle(Style::Change change)
    183183{
    184184    // FIXME: Shadow tree should be updated before style recalc.
    185185    if (m_shadowTreeNeedsUpdate)
    186186        updateShadowTree();
    187     return SVGGraphicsElement::willRecalcStyle(change);
     187    SVGGraphicsElement::willRecalcStyle(change);
    188188}
    189189
  • trunk/Source/WebCore/svg/SVGUseElement.h

    r206903 r208971  
    6363    void parseAttribute(const QualifiedName&, const AtomicString&) override;
    6464    void svgAttributeChanged(const QualifiedName&) override;
    65     bool willRecalcStyle(Style::Change) override;
     65    void willRecalcStyle(Style::Change) override;
    6666    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
    6767    void toClipPath(Path&) override;
Note: See TracChangeset for help on using the changeset viewer.