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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/css/CSSValueList.h" 52 #include "core/css/CSSValueList.h"
53 #include "core/css/CSSValuePool.h" 53 #include "core/css/CSSValuePool.h"
54 #include "core/css/Pair.h" 54 #include "core/css/Pair.h"
55 #include "core/css/Rect.h" 55 #include "core/css/Rect.h"
56 #include "core/css/RuntimeCSSEnabled.h" 56 #include "core/css/RuntimeCSSEnabled.h"
57 #include "core/css/StylePropertySet.h" 57 #include "core/css/StylePropertySet.h"
58 #include "core/css/resolver/StyleResolver.h" 58 #include "core/css/resolver/StyleResolver.h"
59 #include "core/dom/Document.h" 59 #include "core/dom/Document.h"
60 #include "core/dom/ExceptionCode.h" 60 #include "core/dom/ExceptionCode.h"
61 #include "core/dom/PseudoElement.h" 61 #include "core/dom/PseudoElement.h"
62 #include "core/frame/animation/AnimationController.h"
63 #include "core/rendering/RenderBox.h" 62 #include "core/rendering/RenderBox.h"
64 #include "core/rendering/RenderGrid.h" 63 #include "core/rendering/RenderGrid.h"
65 #include "core/rendering/style/ContentData.h" 64 #include "core/rendering/style/ContentData.h"
66 #include "core/rendering/style/CounterContent.h" 65 #include "core/rendering/style/CounterContent.h"
67 #include "core/rendering/style/CursorList.h" 66 #include "core/rendering/style/CursorList.h"
68 #include "core/rendering/style/RenderStyle.h" 67 #include "core/rendering/style/RenderStyle.h"
69 #include "core/rendering/style/ShadowList.h" 68 #include "core/rendering/style/ShadowList.h"
70 #include "core/rendering/style/ShapeValue.h" 69 #include "core/rendering/style/ShapeValue.h"
71 #include "platform/fonts/FontFeatureSettings.h" 70 #include "platform/fonts/FontFeatureSettings.h"
72 #include "wtf/text/StringBuilder.h" 71 #include "wtf/text/StringBuilder.h"
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 return renderer && renderer->isBox() && (!style || !style->paddingTop(). isFixed()); 1487 return renderer && renderer->isBox() && (!style || !style->paddingTop(). isFixed());
1489 default: 1488 default:
1490 return false; 1489 return false;
1491 } 1490 }
1492 } 1491 }
1493 1492
1494 PassRefPtr<RenderStyle> CSSComputedStyleDeclaration::computeRenderStyle(CSSPrope rtyID propertyID) const 1493 PassRefPtr<RenderStyle> CSSComputedStyleDeclaration::computeRenderStyle(CSSPrope rtyID propertyID) const
1495 { 1494 {
1496 Node* styledNode = this->styledNode(); 1495 Node* styledNode = this->styledNode();
1497 ASSERT(styledNode); 1496 ASSERT(styledNode);
1498 RenderObject* renderer = styledNode->renderer();
1499 if (renderer && renderer->compositingState() == PaintsIntoOwnBacking
1500 && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() && AnimationContro ller::supportsAcceleratedAnimationOfProperty(propertyID)) {
1501 AnimationUpdateBlock animationUpdateBlock(renderer->animation());
1502 if (m_pseudoElementSpecifier && !styledNode->isPseudoElement()) {
1503 // FIXME: This cached pseudo style will only exist if the animation has been run at least once.
1504 return renderer->animation().getAnimatedStyleForRenderer(renderer)-> getCachedPseudoStyle(m_pseudoElementSpecifier);
1505 }
1506 return renderer->animation().getAnimatedStyleForRenderer(renderer);
1507 }
1508 return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO : m_pseudoElementSpecifier); 1497 return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO : m_pseudoElementSpecifier);
1509 } 1498 }
1510 1499
1511 Node* CSSComputedStyleDeclaration::styledNode() const 1500 Node* CSSComputedStyleDeclaration::styledNode() const
1512 { 1501 {
1513 if (!m_node) 1502 if (!m_node)
1514 return 0; 1503 return 0;
1515 if (m_node->isElementNode()) { 1504 if (m_node->isElementNode()) {
1516 if (PseudoElement* element = toElement(m_node)->pseudoElement(m_pseudoEl ementSpecifier)) 1505 if (PseudoElement* element = toElement(m_node)->pseudoElement(m_pseudoEl ementSpecifier))
1517 return element; 1506 return element;
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
3146 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3135 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3147 CSSPropertyB ackgroundClip }; 3136 CSSPropertyB ackgroundClip };
3148 3137
3149 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3138 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3150 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3139 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3151 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3140 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3152 return list.release(); 3141 return list.release();
3153 } 3142 }
3154 3143
3155 } // namespace WebCore 3144 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698