Changeset 177269 in webkit
- Timestamp:
- Dec 14, 2014 6:50:22 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r177266 r177269 1 2014-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 1 18 2014-12-14 Commit Queue <commit-queue@webkit.org> 2 19 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r177266 r177269 1706 1706 1707 1707 if (renderer && renderer->isComposited() && AnimationController::supportsAcceleratedAnimationOfProperty(propertyID)) { 1708 AnimationUpdateBlock animationUpdateBlock(&renderer->animation()); 1708 1709 RefPtr<RenderStyle> style = renderer->animation().getAnimatedStyleForRenderer(downcast<RenderElement>(*renderer)); 1709 1710 if (pseudoElementSpecifier && !styledNode->isPseudoElement()) { -
trunk/Source/WebCore/dom/Document.cpp
r177259 r177269 1766 1766 1767 1767 RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView()); 1768 AnimationUpdateBlock animationUpdateBlock(&m_frame->animation());1769 1768 1770 1769 // FIXME: We should update style on our ancestor chain before proceeding (especially for seamless), … … 1839 1838 return; 1840 1839 1840 AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : nullptr); 1841 1841 recalcStyle(Style::NoChange); 1842 1842 } -
trunk/Source/WebCore/page/FrameView.cpp
r177266 r177269 1154 1154 1155 1155 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLayout(&frame()); 1156 AnimationUpdateBlock animationUpdateBlock(&frame().animation()); 1157 1156 1158 1157 if (!allowSubtree && m_layoutRoot) { 1159 1158 m_layoutRoot->markContainingBlocksForLayout(false); … … 3940 3939 // when it lays out. 3941 3940 3942 AnimationUpdateBlock animationUpdateBlock(&frame().animation());3943 3944 3941 frame().document()->updateStyleIfNeeded(); 3945 3942 -
trunk/Source/WebCore/page/animation/AnimationController.cpp
r177259 r177269 52 52 static const double cBeginAnimationUpdateTimeNotSet = -1; 53 53 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 70 54 AnimationControllerPrivate::AnimationControllerPrivate(Frame& frame) 71 55 : m_animationTimer(*this, &AnimationControllerPrivate::animationTimerFired) … … 75 59 , m_animationsWaitingForStyle() 76 60 , m_animationsWaitingForStartTimeResponse() 77 , m_beginAnimationUpdateCount(0)78 61 , m_waitingForAsyncStartNotification(false) 79 62 , m_isSuspended(false) … … 248 231 // Make sure animationUpdateTime is updated, so that it is current even if no 249 232 // styleChange has happened (e.g. accelerated animations) 250 AnimationPrivateUpdateBlock updateBlock(*this);233 setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet); 251 234 252 235 // When the timer fires, all we do is call setChanged on all DOM nodes with running animations and then do an immediate … … 305 288 void AnimationControllerPrivate::suspendAnimationsForDocument(Document* document) 306 289 { 307 AnimationPrivateUpdateBlock updateBlock(*this);290 setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet); 308 291 309 292 for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) { … … 317 300 void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document) 318 301 { 319 AnimationPrivateUpdateBlock updateBlock(*this);302 setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet); 320 303 321 304 for (auto it = m_compositeAnimations.begin(), end = m_compositeAnimations.end(); it != end; ++it) { … … 370 353 double AnimationControllerPrivate::beginAnimationUpdateTime() 371 354 { 372 ASSERT(m_beginAnimationUpdateCount);373 355 if (m_beginAnimationUpdateTime == cBeginAnimationUpdateTimeNotSet) 374 356 m_beginAnimationUpdateTime = monotonicallyIncreasingTime(); 375 376 357 return m_beginAnimationUpdateTime; 377 358 } 378 359 379 void AnimationControllerPrivate::beginAnimationUpdate()380 {381 if (!m_beginAnimationUpdateCount)382 setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet);383 ++m_beginAnimationUpdateCount;384 }385 386 360 void AnimationControllerPrivate::endAnimationUpdate() 387 361 { 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()); 395 365 } 396 366 … … 403 373 PassRefPtr<RenderStyle> AnimationControllerPrivate::getAnimatedStyleForRenderer(RenderElement& renderer) 404 374 { 405 AnimationPrivateUpdateBlock animationUpdateBlock(*this);406 407 375 ASSERT(renderer.isCSSAnimating()); 408 376 ASSERT(m_compositeAnimations.contains(&renderer)); … … 502 470 AnimationController::AnimationController(Frame& frame) 503 471 : m_data(std::make_unique<AnimationControllerPrivate>(frame)) 472 , m_beginAnimationUpdateCount(0) 504 473 { 505 474 } … … 577 546 void AnimationController::notifyAnimationStarted(RenderElement&, double startTime) 578 547 { 579 AnimationUpdateBlock animationUpdateBlock(this);580 548 m_data->receivedStartTimeResponse(startTime); 581 549 } … … 583 551 bool AnimationController::pauseAnimationAtTime(RenderElement* renderer, const AtomicString& name, double t) 584 552 { 585 AnimationUpdateBlock animationUpdateBlock(this);586 553 return m_data->pauseAnimationAtTime(renderer, name, t); 587 554 } … … 594 561 bool AnimationController::pauseTransitionAtTime(RenderElement* renderer, const String& property, double t) 595 562 { 596 AnimationUpdateBlock animationUpdateBlock(this);597 563 return m_data->pauseTransitionAtTime(renderer, property, t); 598 564 } … … 651 617 { 652 618 LOG(Animations, "resuming animations for document %p", document); 653 AnimationUpdateBlock animationUpdateBlock(this);654 619 m_data->resumeAnimationsForDocument(document); 655 620 } … … 658 623 { 659 624 LOG(Animations, "animations may start for document %p", document); 660 661 AnimationUpdateBlock animationUpdateBlock(this);662 625 m_data->startAnimationsIfNotSuspended(document); 663 626 } … … 665 628 void AnimationController::beginAnimationUpdate() 666 629 { 667 m_data->beginAnimationUpdate(); 630 if (!m_beginAnimationUpdateCount) 631 m_data->setBeginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet); 632 ++m_beginAnimationUpdateCount; 668 633 } 669 634 670 635 void AnimationController::endAnimationUpdate() 671 636 { 672 m_data->endAnimationUpdate(); 637 ASSERT(m_beginAnimationUpdateCount > 0); 638 --m_beginAnimationUpdateCount; 639 if (!m_beginAnimationUpdateCount) 640 m_data->endAnimationUpdate(); 673 641 } 674 642 -
trunk/Source/WebCore/page/animation/AnimationController.h
r177259 r177269 83 83 private: 84 84 const std::unique_ptr<AnimationControllerPrivate> m_data; 85 int m_beginAnimationUpdateCount; 85 86 }; 86 87 -
trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h
r177259 r177269 98 98 double beginAnimationUpdateTime(); 99 99 void setBeginAnimationUpdateTime(double t) { m_beginAnimationUpdateTime = t; } 100 101 void beginAnimationUpdate();102 100 void endAnimationUpdate(); 103 101 void receivedStartTimeResponse(double); … … 144 142 WaitingAnimationsSet m_animationsWaitingForStyle; 145 143 WaitingAnimationsSet m_animationsWaitingForStartTimeResponse; 146 147 int m_beginAnimationUpdateCount;148 149 144 bool m_waitingForAsyncStartNotification; 150 145 bool m_isSuspended;
Note: See TracChangeset
for help on using the changeset viewer.