Changeset 177269 in webkit


Ignore:
Timestamp:
Dec 14, 2014 6:50:22 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r177238 and r177244.
https://bugs.webkit.org/show_bug.cgi?id=139632

Introduced memory corruption (Requested by ap on #webkit).

Reverted changesets:

"REGRESSION (r168217): Images are cropped out during animation
at jetblue.com"
https://bugs.webkit.org/show_bug.cgi?id=136410
http://trac.webkit.org/changeset/177238

https://bugs.webkit.org/show_bug.cgi?id=139596
http://trac.webkit.org/changeset/177244

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r177266 r177269  
     12014-12-14  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r177238 and r177244.
     4        https://bugs.webkit.org/show_bug.cgi?id=139632
     5
     6        Introduced memory corruption (Requested by ap on #webkit).
     7
     8        Reverted changesets:
     9
     10        "REGRESSION (r168217): Images are cropped out during animation
     11        at jetblue.com"
     12        https://bugs.webkit.org/show_bug.cgi?id=136410
     13        http://trac.webkit.org/changeset/177238
     14
     15        https://bugs.webkit.org/show_bug.cgi?id=139596
     16        http://trac.webkit.org/changeset/177244
     17
    1182014-12-14  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r177266 r177269  
    17061706
    17071707    if (renderer && renderer->isComposited() && AnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) {
     1708        AnimationUpdateBlock animationUpdateBlock(&renderer->animation());
    17081709        RefPtr<RenderStyle> style = renderer->animation().getAnimatedStyleForRenderer(downcast<RenderElement>(*renderer));
    17091710        if (pseudoElementSpecifier && !styledNode->isPseudoElement()) {
  • trunk/Source/WebCore/dom/Document.cpp

    r177259 r177269  
    17661766
    17671767    RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView());
    1768     AnimationUpdateBlock animationUpdateBlock(&m_frame->animation());
    17691768
    17701769    // FIXME: We should update style on our ancestor chain before proceeding (especially for seamless),
     
    18391838        return;
    18401839
     1840    AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : nullptr);
    18411841    recalcStyle(Style::NoChange);
    18421842}
  • trunk/Source/WebCore/page/FrameView.cpp

    r177266 r177269  
    11541154
    11551155    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout(&frame());
    1156     AnimationUpdateBlock animationUpdateBlock(&frame().animation());
    1157    
     1156
    11581157    if (!allowSubtree && m_layoutRoot) {
    11591158        m_layoutRoot->markContainingBlocksForLayout(false);
     
    39403939    // when it lays out.
    39413940
    3942     AnimationUpdateBlock animationUpdateBlock(&frame().animation());
    3943 
    39443941    frame().document()->updateStyleIfNeeded();
    39453942
  • trunk/Source/WebCore/page/animation/AnimationController.cpp

    r177259 r177269  
    5252static const double cBeginAnimationUpdateTimeNotSet = -1;
    5353
    54 class AnimationPrivateUpdateBlock {
    55 public:
    56     AnimationPrivateUpdateBlock(AnimationControllerPrivate& animationController)
    57         : m_animationController(animationController)
    58     {
    59         m_animationController.beginAnimationUpdate();
    60     }
    61    
    62     ~AnimationPrivateUpdateBlock()
    63     {
    64         m_animationController.endAnimationUpdate();
    65     }
    66    
    67     AnimationControllerPrivate& m_animationController;
    68 };
    69 
    7054AnimationControllerPrivate::AnimationControllerPrivate(Frame& frame)
    7155    : m_animationTimer(*this, &AnimationControllerPrivate::animationTimerFired)
     
    7559    , m_animationsWaitingForStyle()
    7660    , m_animationsWaitingForStartTimeResponse()
    77     , m_beginAnimationUpdateCount(0)
    7861    , m_waitingForAsyncStartNotification(false)
    7962    , m_isSuspended(false)
     
    248231    // Make sure animationUpdateTime is updated, so that it is current even if no
    249232    // styleChange has happened (e.g. accelerated animations)
    250     AnimationPrivateUpdateBlock updateBlock(*this);
     233    setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
    251234
    252235    // When the timer fires, all we do is call setChanged on all DOM nodes with running animations and then do an immediate
     
    305288void AnimationControllerPrivate::suspendAnimationsForDocument(Document* document)
    306289{
    307     AnimationPrivateUpdateBlock updateBlock(*this);
     290    setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
    308291
    309292    for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) {
     
    317300void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document)
    318301{
    319     AnimationPrivateUpdateBlock updateBlock(*this);
     302    setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
    320303
    321304    for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) {
     
    370353double AnimationControllerPrivate::beginAnimationUpdateTime()
    371354{
    372     ASSERT(m_beginAnimationUpdateCount);
    373355    if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet)
    374356        m_beginAnimationUpdateTime = monotonicallyIncreasingTime();
    375 
    376357    return m_beginAnimationUpdateTime;
    377358}
    378359
    379 void AnimationControllerPrivate::beginAnimationUpdate()
    380 {
    381     if (!m_beginAnimationUpdateCount)
    382         setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
    383     ++m_beginAnimationUpdateCount;
    384 }
    385 
    386360void AnimationControllerPrivate::endAnimationUpdate()
    387361{
    388     ASSERT(m_beginAnimationUpdateCount > 0);
    389     if (m_beginAnimationUpdateCount == 1) {
    390         styleAvailable();
    391         if (!m_waitingForAsyncStartNotification)
    392             startTimeResponse(beginAnimationUpdateTime());
    393     }
    394     --m_beginAnimationUpdateCount;
     362    styleAvailable();
     363    if (!m_waitingForAsyncStartNotification)
     364        startTimeResponse(beginAnimationUpdateTime());
    395365}
    396366
     
    403373PassRefPtr<RenderStyle> AnimationControllerPrivate::getAnimatedStyleForRenderer(RenderElement& renderer)
    404374{
    405     AnimationPrivateUpdateBlock animationUpdateBlock(*this);
    406 
    407375    ASSERT(renderer.isCSSAnimating());
    408376    ASSERT(m_compositeAnimations.contains(&renderer));
     
    502470AnimationController::AnimationController(Frame& frame)
    503471    : m_data(std::make_unique<AnimationControllerPrivate>(frame))
     472    , m_beginAnimationUpdateCount(0)
    504473{
    505474}
     
    577546void AnimationController::notifyAnimationStarted(RenderElement&, double startTime)
    578547{
    579     AnimationUpdateBlock animationUpdateBlock(this);
    580548    m_data->receivedStartTimeResponse(startTime);
    581549}
     
    583551bool AnimationController::pauseAnimationAtTime(RenderElement* renderer, const AtomicString& name, double t)
    584552{
    585     AnimationUpdateBlock animationUpdateBlock(this);
    586553    return m_data->pauseAnimationAtTime(renderer, name, t);
    587554}
     
    594561bool AnimationController::pauseTransitionAtTime(RenderElement* renderer, const String& property, double t)
    595562{
    596     AnimationUpdateBlock animationUpdateBlock(this);
    597563    return m_data->pauseTransitionAtTime(renderer, property, t);
    598564}
     
    651617{
    652618    LOG(Animations, "resuming animations for document %p", document);
    653     AnimationUpdateBlock animationUpdateBlock(this);
    654619    m_data->resumeAnimationsForDocument(document);
    655620}
     
    658623{
    659624    LOG(Animations, "animations may start for document %p", document);
    660 
    661     AnimationUpdateBlock animationUpdateBlock(this);
    662625    m_data->startAnimationsIfNotSuspended(document);
    663626}
     
    665628void AnimationController::beginAnimationUpdate()
    666629{
    667     m_data->beginAnimationUpdate();
     630    if (!m_beginAnimationUpdateCount)
     631        m_data->setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);
     632    ++m_beginAnimationUpdateCount;
    668633}
    669634
    670635void AnimationController::endAnimationUpdate()
    671636{
    672     m_data->endAnimationUpdate();
     637    ASSERT(m_beginAnimationUpdateCount > 0);
     638    --m_beginAnimationUpdateCount;
     639    if (!m_beginAnimationUpdateCount)
     640        m_data->endAnimationUpdate();
    673641}
    674642
  • trunk/Source/WebCore/page/animation/AnimationController.h

    r177259 r177269  
    8383private:
    8484    const std::unique_ptr<AnimationControllerPrivate> m_data;
     85    int m_beginAnimationUpdateCount;
    8586};
    8687
  • trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h

    r177259 r177269  
    9898    double beginAnimationUpdateTime();
    9999    void setBeginAnimationUpdateTime(double t) { m_beginAnimationUpdateTime = t; }
    100    
    101     void beginAnimationUpdate();
    102100    void endAnimationUpdate();
    103101    void receivedStartTimeResponse(double);
     
    144142    WaitingAnimationsSet m_animationsWaitingForStyle;
    145143    WaitingAnimationsSet m_animationsWaitingForStartTimeResponse;
    146 
    147     int m_beginAnimationUpdateCount;
    148 
    149144    bool m_waitingForAsyncStartNotification;
    150145    bool m_isSuspended;
Note: See TracChangeset for help on using the changeset viewer.