Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 139273007: Web Animations: Remove legacy animations engine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 30 matching lines...) Expand all
41 #include "core/html/HTMLElement.h" 41 #include "core/html/HTMLElement.h"
42 #include "core/html/HTMLHtmlElement.h" 42 #include "core/html/HTMLHtmlElement.h"
43 #include "core/html/HTMLTableElement.h" 43 #include "core/html/HTMLTableElement.h"
44 #include "core/page/AutoscrollController.h" 44 #include "core/page/AutoscrollController.h"
45 #include "core/page/EventHandler.h" 45 #include "core/page/EventHandler.h"
46 #include "core/frame/Frame.h" 46 #include "core/frame/Frame.h"
47 #include "core/frame/FrameView.h" 47 #include "core/frame/FrameView.h"
48 #include "core/page/Page.h" 48 #include "core/page/Page.h"
49 #include "core/frame/Settings.h" 49 #include "core/frame/Settings.h"
50 #include "core/frame/UseCounter.h" 50 #include "core/frame/UseCounter.h"
51 #include "core/frame/animation/AnimationController.h"
52 #include "core/rendering/CompositedLayerMapping.h" 51 #include "core/rendering/CompositedLayerMapping.h"
53 #include "core/rendering/FlowThreadController.h" 52 #include "core/rendering/FlowThreadController.h"
54 #include "core/rendering/HitTestResult.h" 53 #include "core/rendering/HitTestResult.h"
55 #include "core/rendering/LayoutRectRecorder.h" 54 #include "core/rendering/LayoutRectRecorder.h"
56 #include "core/rendering/RenderCounter.h" 55 #include "core/rendering/RenderCounter.h"
57 #include "core/rendering/RenderDeprecatedFlexibleBox.h" 56 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
58 #include "core/rendering/RenderFlexibleBox.h" 57 #include "core/rendering/RenderFlexibleBox.h"
59 #include "core/rendering/RenderGeometryMap.h" 58 #include "core/rendering/RenderGeometryMap.h"
60 #include "core/rendering/RenderGrid.h" 59 #include "core/rendering/RenderGrid.h"
61 #include "core/rendering/RenderImage.h" 60 #include "core/rendering/RenderImage.h"
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 else { 1785 else {
1787 // An anonymous block must be made to wrap this inline. 1786 // An anonymous block must be made to wrap this inline.
1788 RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock() ; 1787 RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock() ;
1789 RenderObjectChildList* childlist = parent()->virtualChildren(); 1788 RenderObjectChildList* childlist = parent()->virtualChildren();
1790 childlist->insertChildNode(parent(), block, this); 1789 childlist->insertChildNode(parent(), block, this);
1791 block->children()->appendChildNode(block, childlist->removeChildNode (parent(), this)); 1790 block->children()->appendChildNode(block, childlist->removeChildNode (parent(), this));
1792 } 1791 }
1793 } 1792 }
1794 } 1793 }
1795 1794
1796 void RenderObject::setAnimatableStyle(PassRefPtr<RenderStyle> style)
1797 {
1798 if (!isText() && style && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() ) {
1799 setStyle(animation().updateAnimations(*this, *style));
1800 return;
1801 }
1802 setStyle(style);
1803 }
1804
1805 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign ed contextSensitiveProperties) const 1795 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign ed contextSensitiveProperties) const
1806 { 1796 {
1807 // If transform changed, and the layer does not paint into its own separate backing, then we need to do a layout. 1797 // If transform changed, and the layer does not paint into its own separate backing, then we need to do a layout.
1808 // FIXME: The comment above is what the code does, but it is technically not following spec. This means we will 1798 // FIXME: The comment above is what the code does, but it is technically not following spec. This means we will
1809 // not to layout for 3d transforms, but we should be invoking a simplified r elayout. Is it possible we are avoiding 1799 // not to layout for 3d transforms, but we should be invoking a simplified r elayout. Is it possible we are avoiding
1810 // doing this for some performance reason at this time? 1800 // doing this for some performance reason at this time?
1811 if (contextSensitiveProperties & ContextSensitivePropertyTransform) { 1801 if (contextSensitiveProperties & ContextSensitivePropertyTransform) {
1812 // Text nodes share style with their parents but transforms don't apply to them, 1802 // Text nodes share style with their parents but transforms don't apply to them,
1813 // hence the !isText() check. 1803 // hence the !isText() check.
1814 // FIXME: when transforms are taken into account for overflow, we will n eed to do a layout. 1804 // FIXME: when transforms are taken into account for overflow, we will n eed to do a layout.
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 { 2541 {
2552 // Destroy any leftover anonymous children. 2542 // Destroy any leftover anonymous children.
2553 RenderObjectChildList* children = virtualChildren(); 2543 RenderObjectChildList* children = virtualChildren();
2554 if (children) 2544 if (children)
2555 children->destroyLeftoverChildren(); 2545 children->destroyLeftoverChildren();
2556 2546
2557 // If this renderer is being autoscrolled, stop the autoscrolling. 2547 // If this renderer is being autoscrolled, stop the autoscrolling.
2558 if (Frame* frame = this->frame()) { 2548 if (Frame* frame = this->frame()) {
2559 if (frame->page()) 2549 if (frame->page())
2560 frame->page()->autoscrollController().stopAutoscrollIfNeeded(this); 2550 frame->page()->autoscrollController().stopAutoscrollIfNeeded(this);
2561 frame->animation().cancelAnimations(this);
2562 } 2551 }
2563 2552
2564 // For accessibility management, notify the parent of the imminent change to its child set. 2553 // For accessibility management, notify the parent of the imminent change to its child set.
2565 // We do it now, before remove(), while the parent pointer is still availabl e. 2554 // We do it now, before remove(), while the parent pointer is still availabl e.
2566 if (AXObjectCache* cache = document().existingAXObjectCache()) 2555 if (AXObjectCache* cache = document().existingAXObjectCache())
2567 cache->childrenChanged(this->parent()); 2556 cache->childrenChanged(this->parent());
2568 2557
2569 remove(); 2558 remove();
2570 2559
2571 // The remove() call above may invoke axObjectCache()->childrenChanged() on the parent, which may require the AX render 2560 // The remove() call above may invoke axObjectCache()->childrenChanged() on the parent, which may require the AX render
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 { 3107 {
3119 int outlineSize = outlineStyleForRepaint()->outlineSize(); 3108 int outlineSize = outlineStyleForRepaint()->outlineSize();
3120 if (const ShadowList* boxShadow = style()->boxShadow()) { 3109 if (const ShadowList* boxShadow = style()->boxShadow()) {
3121 boxShadow->adjustRectForShadow(rect, outlineSize); 3110 boxShadow->adjustRectForShadow(rect, outlineSize);
3122 return; 3111 return;
3123 } 3112 }
3124 3113
3125 rect.inflate(outlineSize); 3114 rect.inflate(outlineSize);
3126 } 3115 }
3127 3116
3128 AnimationController& RenderObject::animation() const
3129 {
3130 return frame()->animation();
3131 }
3132
3133 bool RenderObject::isInert() const 3117 bool RenderObject::isInert() const
3134 { 3118 {
3135 const RenderObject* renderer = this; 3119 const RenderObject* renderer = this;
3136 while (!renderer->node()) 3120 while (!renderer->node())
3137 renderer = renderer->parent(); 3121 renderer = renderer->parent();
3138 return renderer->node()->isInert(); 3122 return renderer->node()->isInert();
3139 } 3123 }
3140 3124
3141 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect) 3125 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect)
3142 { 3126 {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 { 3362 {
3379 if (object1) { 3363 if (object1) {
3380 const WebCore::RenderObject* root = object1; 3364 const WebCore::RenderObject* root = object1;
3381 while (root->parent()) 3365 while (root->parent())
3382 root = root->parent(); 3366 root = root->parent();
3383 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3367 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3384 } 3368 }
3385 } 3369 }
3386 3370
3387 #endif 3371 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698