| 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 11 matching lines...) Expand all Loading... |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #include "config.h" | 24 #include "config.h" |
| 25 #include "core/css/CSSComputedStyleDeclaration.h" | 25 #include "core/css/CSSComputedStyleDeclaration.h" |
| 26 | 26 |
| 27 #include "CSSPropertyNames.h" | 27 #include "CSSPropertyNames.h" |
| 28 #include "FontFamilyNames.h" | 28 #include "FontFamilyNames.h" |
| 29 #include "RuntimeEnabledFeatures.h" | 29 #include "RuntimeEnabledFeatures.h" |
| 30 #include "StylePropertyShorthand.h" | 30 #include "StylePropertyShorthand.h" |
| 31 #include "bindings/v8/ExceptionState.h" | 31 #include "bindings/v8/ExceptionState.h" |
| 32 #include "core/animation/ActiveAnimations.h" |
| 33 #include "core/animation/AnimationClock.h" |
| 34 #include "core/animation/DocumentTimeline.h" |
| 32 #include "core/css/BasicShapeFunctions.h" | 35 #include "core/css/BasicShapeFunctions.h" |
| 33 #include "core/css/CSSArrayFunctionValue.h" | 36 #include "core/css/CSSArrayFunctionValue.h" |
| 34 #include "core/css/CSSAspectRatioValue.h" | 37 #include "core/css/CSSAspectRatioValue.h" |
| 35 #include "core/css/CSSBorderImage.h" | 38 #include "core/css/CSSBorderImage.h" |
| 36 #include "core/css/CSSFilterValue.h" | 39 #include "core/css/CSSFilterValue.h" |
| 37 #include "core/css/CSSFontFeatureValue.h" | 40 #include "core/css/CSSFontFeatureValue.h" |
| 38 #include "core/css/CSSFontValue.h" | 41 #include "core/css/CSSFontValue.h" |
| 39 #include "core/css/CSSFunctionValue.h" | 42 #include "core/css/CSSFunctionValue.h" |
| 40 #include "core/css/CSSGridTemplateValue.h" | 43 #include "core/css/CSSGridTemplateValue.h" |
| 41 #include "core/css/CSSLineBoxContainValue.h" | 44 #include "core/css/CSSLineBoxContainValue.h" |
| (...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 { | 1616 { |
| 1614 Node* styledNode = this->styledNode(); | 1617 Node* styledNode = this->styledNode(); |
| 1615 if (!styledNode) | 1618 if (!styledNode) |
| 1616 return 0; | 1619 return 0; |
| 1617 RenderObject* renderer = styledNode->renderer(); | 1620 RenderObject* renderer = styledNode->renderer(); |
| 1618 RefPtr<RenderStyle> style; | 1621 RefPtr<RenderStyle> style; |
| 1619 | 1622 |
| 1620 if (updateLayout) { | 1623 if (updateLayout) { |
| 1621 Document& document = styledNode->document(); | 1624 Document& document = styledNode->document(); |
| 1622 | 1625 |
| 1626 // If a compositor animation is running we may need to service animation
s |
| 1627 // in order to generate an up to date value. |
| 1628 if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && styledNode->isE
lementNode()) { |
| 1629 const Element* element = toElement(styledNode); |
| 1630 if (const ActiveAnimations* activeAnimations = element->activeAnimat
ions()) { |
| 1631 if (activeAnimations->hasActiveAnimationsOnCompositor(propertyID
)) |
| 1632 document.serviceAnimations(monotonicallyIncreasingTime()); |
| 1633 } |
| 1634 } |
| 1635 |
| 1623 document.updateStyleForNodeIfNeeded(styledNode); | 1636 document.updateStyleForNodeIfNeeded(styledNode); |
| 1624 | 1637 |
| 1625 // The style recalc could have caused the styled node to be discarded or
replaced | 1638 // The style recalc could have caused the styled node to be discarded or
replaced |
| 1626 // if it was a PseudoElement so we need to update it. | 1639 // if it was a PseudoElement so we need to update it. |
| 1627 styledNode = this->styledNode(); | 1640 styledNode = this->styledNode(); |
| 1628 renderer = styledNode->renderer(); | 1641 renderer = styledNode->renderer(); |
| 1629 | 1642 |
| 1630 style = computeRenderStyle(propertyID); | 1643 style = computeRenderStyle(propertyID); |
| 1631 | 1644 |
| 1632 bool forceFullLayout = isLayoutDependent(propertyID, style, renderer) | 1645 bool forceFullLayout = isLayoutDependent(propertyID, style, renderer) |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3215 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3228 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
| 3216 CSSPropertyB
ackgroundClip }; | 3229 CSSPropertyB
ackgroundClip }; |
| 3217 | 3230 |
| 3218 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3231 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
| 3219 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3232 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
| 3220 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3233 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
| 3221 return list.release(); | 3234 return list.release(); |
| 3222 } | 3235 } |
| 3223 | 3236 |
| 3224 } // namespace WebCore | 3237 } // namespace WebCore |
| OLD | NEW |