OLD | NEW |
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 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 PassRefPtr<RenderStyle> CSSComputedStyleDeclaration::computeRenderStyle(CSSPrope
rtyID propertyID) const | 1616 PassRefPtr<RenderStyle> CSSComputedStyleDeclaration::computeRenderStyle(CSSPrope
rtyID propertyID) const |
1617 { | 1617 { |
1618 Node* styledNode = this->styledNode(); | 1618 Node* styledNode = this->styledNode(); |
1619 ASSERT(styledNode); | 1619 ASSERT(styledNode); |
1620 RenderObject* renderer = styledNode->renderer(); | 1620 RenderObject* renderer = styledNode->renderer(); |
1621 if (renderer && renderer->compositingState() == PaintsIntoOwnBacking | 1621 if (renderer && renderer->compositingState() == PaintsIntoOwnBacking |
1622 && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() && AnimationContro
ller::supportsAcceleratedAnimationOfProperty(propertyID)) { | 1622 && !RuntimeEnabledFeatures::webAnimationsCSSEnabled() && AnimationContro
ller::supportsAcceleratedAnimationOfProperty(propertyID)) { |
1623 AnimationUpdateBlock animationUpdateBlock(renderer->animation()); | 1623 AnimationUpdateBlock animationUpdateBlock(renderer->animation()); |
1624 if (m_pseudoElementSpecifier && !styledNode->isPseudoElement()) { | 1624 if (m_pseudoElementSpecifier && !styledNode->isPseudoElement()) { |
1625 // FIXME: This cached pseudo style will only exist if the animation
has been run at least once. | 1625 // FIXME: This cached pseudo style will only exist if the animation
has been run at least once. |
1626 return renderer->animation()->getAnimatedStyleForRenderer(renderer)-
>getCachedPseudoStyle(m_pseudoElementSpecifier); | 1626 return renderer->animation().getAnimatedStyleForRenderer(renderer)->
getCachedPseudoStyle(m_pseudoElementSpecifier); |
1627 } | 1627 } |
1628 return renderer->animation()->getAnimatedStyleForRenderer(renderer); | 1628 return renderer->animation().getAnimatedStyleForRenderer(renderer); |
1629 } | 1629 } |
1630 return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO :
m_pseudoElementSpecifier); | 1630 return styledNode->computedStyle(styledNode->isPseudoElement() ? NOPSEUDO :
m_pseudoElementSpecifier); |
1631 } | 1631 } |
1632 | 1632 |
1633 Node* CSSComputedStyleDeclaration::styledNode() const | 1633 Node* CSSComputedStyleDeclaration::styledNode() const |
1634 { | 1634 { |
1635 if (!m_node) | 1635 if (!m_node) |
1636 return 0; | 1636 return 0; |
1637 if (m_node->isElementNode()) { | 1637 if (m_node->isElementNode()) { |
1638 if (PseudoElement* element = toElement(m_node.get())->pseudoElement(m_ps
eudoElementSpecifier)) | 1638 if (PseudoElement* element = toElement(m_node.get())->pseudoElement(m_ps
eudoElementSpecifier)) |
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3244 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3244 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3245 CSSPropertyB
ackgroundClip }; | 3245 CSSPropertyB
ackgroundClip }; |
3246 | 3246 |
3247 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3247 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3248 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3248 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
3249 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3249 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
3250 return list.release(); | 3250 return list.release(); |
3251 } | 3251 } |
3252 | 3252 |
3253 } // namespace WebCore | 3253 } // namespace WebCore |
OLD | NEW |