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

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: Fix TestExpectations. 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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 else { 1791 else {
1793 // An anonymous block must be made to wrap this inline. 1792 // An anonymous block must be made to wrap this inline.
1794 RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock() ; 1793 RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock() ;
1795 RenderObjectChildList* childlist = parent()->virtualChildren(); 1794 RenderObjectChildList* childlist = parent()->virtualChildren();
1796 childlist->insertChildNode(parent(), block, this); 1795 childlist->insertChildNode(parent(), block, this);
1797 block->children()->appendChildNode(block, childlist->removeChildNode (parent(), this)); 1796 block->children()->appendChildNode(block, childlist->removeChildNode (parent(), this));
1798 } 1797 }
1799 } 1798 }
1800 } 1799 }
1801 1800
1802 void RenderObject::setAnimatableStyle(PassRefPtr<RenderStyle> style)
1803 {
1804 if (!isText() && style && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() ) {
1805 setStyle(animation().updateAnimations(*this, *style));
1806 return;
1807 }
1808 setStyle(style);
1809 }
1810
1811 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign ed contextSensitiveProperties) const 1801 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign ed contextSensitiveProperties) const
1812 { 1802 {
1813 // If transform changed, and the layer does not paint into its own separate backing, then we need to do a layout. 1803 // If transform changed, and the layer does not paint into its own separate backing, then we need to do a layout.
1814 // FIXME: The comment above is what the code does, but it is technically not following spec. This means we will 1804 // FIXME: The comment above is what the code does, but it is technically not following spec. This means we will
1815 // not to layout for 3d transforms, but we should be invoking a simplified r elayout. Is it possible we are avoiding 1805 // not to layout for 3d transforms, but we should be invoking a simplified r elayout. Is it possible we are avoiding
1816 // doing this for some performance reason at this time? 1806 // doing this for some performance reason at this time?
1817 if (contextSensitiveProperties & ContextSensitivePropertyTransform) { 1807 if (contextSensitiveProperties & ContextSensitivePropertyTransform) {
1818 // Text nodes share style with their parents but transforms don't apply to them, 1808 // Text nodes share style with their parents but transforms don't apply to them,
1819 // hence the !isText() check. 1809 // hence the !isText() check.
1820 // FIXME: when transforms are taken into account for overflow, we will n eed to do a layout. 1810 // FIXME: when transforms are taken into account for overflow, we will n eed to do a layout.
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
2559 { 2549 {
2560 // Destroy any leftover anonymous children. 2550 // Destroy any leftover anonymous children.
2561 RenderObjectChildList* children = virtualChildren(); 2551 RenderObjectChildList* children = virtualChildren();
2562 if (children) 2552 if (children)
2563 children->destroyLeftoverChildren(); 2553 children->destroyLeftoverChildren();
2564 2554
2565 // If this renderer is being autoscrolled, stop the autoscrolling. 2555 // If this renderer is being autoscrolled, stop the autoscrolling.
2566 if (Frame* frame = this->frame()) { 2556 if (Frame* frame = this->frame()) {
2567 if (frame->page()) 2557 if (frame->page())
2568 frame->page()->autoscrollController().stopAutoscrollIfNeeded(this); 2558 frame->page()->autoscrollController().stopAutoscrollIfNeeded(this);
2569 frame->animation().cancelAnimations(this);
2570 } 2559 }
2571 2560
2572 // For accessibility management, notify the parent of the imminent change to its child set. 2561 // For accessibility management, notify the parent of the imminent change to its child set.
2573 // We do it now, before remove(), while the parent pointer is still availabl e. 2562 // We do it now, before remove(), while the parent pointer is still availabl e.
2574 if (AXObjectCache* cache = document().existingAXObjectCache()) 2563 if (AXObjectCache* cache = document().existingAXObjectCache())
2575 cache->childrenChanged(this->parent()); 2564 cache->childrenChanged(this->parent());
2576 2565
2577 remove(); 2566 remove();
2578 2567
2579 // The remove() call above may invoke axObjectCache()->childrenChanged() on the parent, which may require the AX render 2568 // The remove() call above may invoke axObjectCache()->childrenChanged() on the parent, which may require the AX render
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 { 3119 {
3131 int outlineSize = outlineStyleForRepaint()->outlineSize(); 3120 int outlineSize = outlineStyleForRepaint()->outlineSize();
3132 if (const ShadowList* boxShadow = style()->boxShadow()) { 3121 if (const ShadowList* boxShadow = style()->boxShadow()) {
3133 boxShadow->adjustRectForShadow(rect, outlineSize); 3122 boxShadow->adjustRectForShadow(rect, outlineSize);
3134 return; 3123 return;
3135 } 3124 }
3136 3125
3137 rect.inflate(outlineSize); 3126 rect.inflate(outlineSize);
3138 } 3127 }
3139 3128
3140 AnimationController& RenderObject::animation() const
3141 {
3142 return frame()->animation();
3143 }
3144
3145 bool RenderObject::isInert() const 3129 bool RenderObject::isInert() const
3146 { 3130 {
3147 const RenderObject* renderer = this; 3131 const RenderObject* renderer = this;
3148 while (!renderer->node()) 3132 while (!renderer->node())
3149 renderer = renderer->parent(); 3133 renderer = renderer->parent();
3150 return renderer->node()->isInert(); 3134 return renderer->node()->isInert();
3151 } 3135 }
3152 3136
3153 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect) 3137 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect)
3154 { 3138 {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3390 { 3374 {
3391 if (object1) { 3375 if (object1) {
3392 const WebCore::RenderObject* root = object1; 3376 const WebCore::RenderObject* root = object1;
3393 while (root->parent()) 3377 while (root->parent())
3394 root = root->parent(); 3378 root = root->parent();
3395 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3379 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3396 } 3380 }
3397 } 3381 }
3398 3382
3399 #endif 3383 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/animation/WebAnimationProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698