Chromium Code Reviews

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 24921002: Make compositingState explicit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed first round of reviewer comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 1596 matching lines...)
1607 default: 1607 default:
1608 return false; 1608 return false;
1609 } 1609 }
1610 } 1610 }
1611 1611
1612 PassRefPtr<RenderStyle> CSSComputedStyleDeclaration::computeRenderStyle(CSSPrope rtyID propertyID) const 1612 PassRefPtr<RenderStyle> CSSComputedStyleDeclaration::computeRenderStyle(CSSPrope rtyID propertyID) const
1613 { 1613 {
1614 Node* styledNode = this->styledNode(); 1614 Node* styledNode = this->styledNode();
1615 ASSERT(styledNode); 1615 ASSERT(styledNode);
1616 RenderObject* renderer = styledNode->renderer(); 1616 RenderObject* renderer = styledNode->renderer();
1617 if (renderer && renderer->isComposited() && !RuntimeEnabledFeatures::webAnim ationsCSSEnabled() && AnimationController::supportsAcceleratedAnimationOfPropert y(propertyID)) { 1617 if (renderer && renderer->compositingState() == PaintsIntoOwnBacking
1618 && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() && AnimationContro ller::supportsAcceleratedAnimationOfProperty(propertyID)) {
1618 AnimationUpdateBlock animationUpdateBlock(renderer->animation()); 1619 AnimationUpdateBlock animationUpdateBlock(renderer->animation());
1619 if (m_pseudoElementSpecifier && !styledNode->isPseudoElement()) { 1620 if (m_pseudoElementSpecifier && !styledNode->isPseudoElement()) {
1620 // FIXME: This cached pseudo style will only exist if the animation has been run at least once. 1621 // FIXME: This cached pseudo style will only exist if the animation has been run at least once.
1621 return renderer->animation()->getAnimatedStyleForRenderer(renderer)- >getCachedPseudoStyle(m_pseudoElementSpecifier); 1622 return renderer->animation()->getAnimatedStyleForRenderer(renderer)- >getCachedPseudoStyle(m_pseudoElementSpecifier);
1622 } 1623 }
1623 return renderer->animation()->getAnimatedStyleForRenderer(renderer); 1624 return renderer->animation()->getAnimatedStyleForRenderer(renderer);
1624 } 1625 }
1625 return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO : m_pseudoElementSpecifier); 1626 return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO : m_pseudoElementSpecifier);
1626 } 1627 }
1627 1628
(...skipping 1601 matching lines...)
3229 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3230 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3230 CSSPropertyB ackgroundClip }; 3231 CSSPropertyB ackgroundClip };
3231 3232
3232 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3233 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3233 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3234 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3234 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3235 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3235 return list.release(); 3236 return list.release();
3236 } 3237 }
3237 3238
3238 } // namespace WebCore 3239 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorLayerTreeAgent.cpp » ('j') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('J')

Powered by Google App Engine