Changeset 141656 in webkit


Ignore:
Timestamp:
Feb 1, 2013 3:55:46 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
https://bugs.webkit.org/show_bug.cgi?id=108558

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-02-01
Reviewed by Dean Jackson.

.:

  • Source/autotools/symbols.filter:

Source/WebCore:

This is a step torward killing the implicit conversion from String to AtomicString.

The animation name are AtomicString. The API is changed all the way to the callers
to take an AtomicString. When needed, we use explicit conversion.

  • WebCore.exp.in:
  • page/animation/AnimationController.cpp:

(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationController::pauseAnimationAtTime):

  • page/animation/AnimationController.h:

(AnimationController):

  • page/animation/AnimationControllerPrivate.h:

(AnimationControllerPrivate):

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::pauseAnimationAtTime):
We should not null check the name. Getting a null name from the HashMap would be
an error from the tests, and the HashMap would never return a value anyway.

  • testing/Internals.cpp:

(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):

Source/WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:

(WKBundleFramePauseAnimationOnElementWithId):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::pauseAnimationOnElementWithId):

  • WebProcess/WebPage/WebFrame.h:

(WebFrame):

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r141622 r141656  
     12013-02-01  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
     4        https://bugs.webkit.org/show_bug.cgi?id=108558
     5
     6        Reviewed by Dean Jackson.
     7
     8        * Source/autotools/symbols.filter:
     9
    1102013-02-01  Zan Dobersek  <zdobersek@igalia.com>
    211
  • trunk/Source/WebCore/ChangeLog

    r141655 r141656  
     12013-02-01  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
     4        https://bugs.webkit.org/show_bug.cgi?id=108558
     5
     6        Reviewed by Dean Jackson.
     7
     8        This is a step torward killing the implicit conversion from String to AtomicString.
     9
     10        The animation name are AtomicString. The API is changed all the way to the callers
     11        to take an AtomicString. When needed, we use explicit conversion.
     12
     13        * WebCore.exp.in:
     14        * page/animation/AnimationController.cpp:
     15        (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
     16        (WebCore::AnimationController::pauseAnimationAtTime):
     17        * page/animation/AnimationController.h:
     18        (AnimationController):
     19        * page/animation/AnimationControllerPrivate.h:
     20        (AnimationControllerPrivate):
     21        * page/animation/CompositeAnimation.cpp:
     22        (WebCore::CompositeAnimation::pauseAnimationAtTime):
     23        We should not null check the name. Getting a null name from the HashMap would be
     24        an error from the tests, and the HashMap would never return a value anyway.
     25        * testing/Internals.cpp:
     26        (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
     27
    1282013-02-01  Dominic Mazzoni  <dmazzoni@google.com>
    229
  • trunk/Source/WebCore/WebCore.exp.in

    r141635 r141656  
    542542__ZN7WebCore19AnimationController16resumeAnimationsEv
    543543__ZN7WebCore19AnimationController17suspendAnimationsEv
    544 __ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF6StringEd
     544__ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF12AtomicStringEd
    545545__ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd
    546546__ZN7WebCore19BackForwardListImpl10removeItemEPNS_11HistoryItemE
  • trunk/Source/WebCore/page/animation/AnimationController.cpp

    r141578 r141656  
    321321}
    322322
    323 bool AnimationControllerPrivate::pauseAnimationAtTime(RenderObject* renderer, const String& name, double t)
     323bool AnimationControllerPrivate::pauseAnimationAtTime(RenderObject* renderer, const AtomicString& name, double t)
    324324{
    325325    if (!renderer)
     
    562562}
    563563
    564 bool AnimationController::pauseAnimationAtTime(RenderObject* renderer, const String& name, double t)
     564bool AnimationController::pauseAnimationAtTime(RenderObject* renderer, const AtomicString& name, double t)
    565565{
    566566    return m_data->pauseAnimationAtTime(renderer, name, t);
  • trunk/Source/WebCore/page/animation/AnimationController.h

    r137243 r141656  
    5757    void notifyAnimationStarted(RenderObject*, double startTime);
    5858
    59     bool pauseAnimationAtTime(RenderObject*, const String& name, double t); // To be used only for testing
     59    bool pauseAnimationAtTime(RenderObject*, const AtomicString& name, double t); // To be used only for testing
    6060    bool pauseTransitionAtTime(RenderObject*, const String& property, double t); // To be used only for testing
    6161    unsigned numberOfActiveAnimations(Document*) const; // To be used only for testing
  • trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h

    r137243 r141656  
    8888    bool isRunningAcceleratedAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow) const;
    8989
    90     bool pauseAnimationAtTime(RenderObject*, const String& name, double t);
     90    bool pauseAnimationAtTime(RenderObject*, const AtomicString& name, double t);
    9191    bool pauseTransitionAtTime(RenderObject*, const String& property, double t);
    9292    unsigned numberOfActiveAnimations(Document*) const;
  • trunk/Source/WebCore/page/animation/CompositeAnimation.cpp

    r141314 r141656  
    479479bool CompositeAnimation::pauseAnimationAtTime(const AtomicString& name, double t)
    480480{
    481     if (!name)
    482         return false;
    483 
    484481    m_keyframeAnimations.checkConsistency();
    485482
  • trunk/Source/WebCore/testing/Internals.cpp

    r141175 r141656  
    425425    }
    426426
    427     return frame()->animation()->pauseAnimationAtTime(pseudoElement->renderer(), animationName, pauseTime);
     427    return frame()->animation()->pauseAnimationAtTime(pseudoElement->renderer(), AtomicString(animationName), pauseTime);
    428428}
    429429
  • trunk/Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in

    r141637 r141656  
    382382        ?addUserSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z
    383383        ??1StyleSheetContents@WebCore@@QAE@XZ
    384         ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     384        ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVAtomicString@WTF@@N@Z
    385385        ?pseudoElement@Element@WebCore@@QBEPAVPseudoElement@2@W4PseudoId@2@@Z
    386386        ?pauseTransitionAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     
    769769        ?addUserSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z
    770770        ??1StyleSheetContents@WebCore@@QAE@XZ
    771         ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     771        ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVAtomicString@WTF@@N@Z
    772772        ?pseudoElement@Element@WebCore@@QBEPAVPseudoElement@2@W4PseudoId@2@@Z
    773773        ?pauseTransitionAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     
    11551155        ?addUserSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z
    11561156        ??1StyleSheetContents@WebCore@@QAE@XZ
    1157         ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     1157        ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVAtomicString@WTF@@N@Z
    11581158        ?pseudoElement@Element@WebCore@@QBEPAVPseudoElement@2@W4PseudoId@2@@Z
    11591159        ?pauseTransitionAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     
    15471547        ?addUserSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z
    15481548        ??1StyleSheetContents@WebCore@@QAE@XZ
    1549         ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
     1549        ?pauseAnimationAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVAtomicString@WTF@@N@Z
    15501550        ?pseudoElement@Element@WebCore@@QBEPAVPseudoElement@2@W4PseudoId@2@@Z
    15511551        ?pauseTransitionAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
  • trunk/Source/WebKit2/ChangeLog

    r141648 r141656  
     12013-02-01  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
     4        https://bugs.webkit.org/show_bug.cgi?id=108558
     5
     6        Reviewed by Dean Jackson.
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
     9        (WKBundleFramePauseAnimationOnElementWithId):
     10        * WebProcess/WebPage/WebFrame.cpp:
     11        (WebKit::WebFrame::pauseAnimationOnElementWithId):
     12        * WebProcess/WebPage/WebFrame.h:
     13        (WebFrame):
     14
    1152013-02-01  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp

    r139023 r141656  
    100100bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frameRef, WKStringRef animationName, WKStringRef elementID, double time)
    101101{
    102     return toImpl(frameRef)->pauseAnimationOnElementWithId(toWTFString(animationName), toWTFString(elementID), time);
     102    return toImpl(frameRef)->pauseAnimationOnElementWithId(AtomicString(toWTFString(animationName)), toWTFString(elementID), time);
    103103}
    104104
  • trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp

    r141448 r141656  
    431431}
    432432
    433 bool WebFrame::pauseAnimationOnElementWithId(const String& animationName, const String& elementID, double time)
     433bool WebFrame::pauseAnimationOnElementWithId(const AtomicString& animationName, const String& elementID, double time)
    434434{
    435435    if (!m_coreFrame)
  • trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h

    r141448 r141656  
    117117
    118118    unsigned numberOfActiveAnimations() const;
    119     bool pauseAnimationOnElementWithId(const String& animationName, const String& elementID, double time);
     119    bool pauseAnimationOnElementWithId(const AtomicString& animationName, const String& elementID, double time);
    120120    bool pauseTransitionOnElementWithId(const String& propertyName, const String& elementID, double time);
    121121    void suspendAnimations();
  • trunk/Source/autotools/symbols.filter

    r141622 r141656  
    159159_ZN7WebCore19AnimationController17suspendAnimationsEv;
    160160_ZN7WebCore19AnimationController16resumeAnimationsEv;
    161 _ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF6StringEd;
     161_ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF12AtomicStringEd;
    162162_ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd;
    163163_ZN7WebCore19InspectorController18setProfilerEnabledEb;
Note: See TracChangeset for help on using the changeset viewer.