OLD | NEW |
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) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
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 20 matching lines...) Expand all Loading... |
31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
32 #include "bindings/core/v8/V8DOMActivityLogger.h" | 32 #include "bindings/core/v8/V8DOMActivityLogger.h" |
33 #include "bindings/core/v8/V8DOMWrapper.h" | 33 #include "bindings/core/v8/V8DOMWrapper.h" |
34 #include "bindings/core/v8/V8PerContextData.h" | 34 #include "bindings/core/v8/V8PerContextData.h" |
35 #include "core/CSSValueKeywords.h" | 35 #include "core/CSSValueKeywords.h" |
36 #include "core/SVGNames.h" | 36 #include "core/SVGNames.h" |
37 #include "core/XLinkNames.h" | 37 #include "core/XLinkNames.h" |
38 #include "core/XMLNames.h" | 38 #include "core/XMLNames.h" |
39 #include "core/animation/AnimationTimeline.h" | 39 #include "core/animation/AnimationTimeline.h" |
40 #include "core/animation/css/CSSAnimations.h" | 40 #include "core/animation/css/CSSAnimations.h" |
| 41 #include "core/css/CSSFunctionValue.h" |
41 #include "core/css/CSSImageValue.h" | 42 #include "core/css/CSSImageValue.h" |
42 #include "core/css/CSSStyleSheet.h" | 43 #include "core/css/CSSStyleSheet.h" |
43 #include "core/css/CSSValuePool.h" | 44 #include "core/css/CSSValuePool.h" |
44 #include "core/css/PropertySetCSSStyleDeclaration.h" | 45 #include "core/css/PropertySetCSSStyleDeclaration.h" |
45 #include "core/css/StylePropertySet.h" | 46 #include "core/css/StylePropertySet.h" |
46 #include "core/css/parser/CSSParser.h" | 47 #include "core/css/parser/CSSParser.h" |
47 #include "core/css/resolver/StyleResolver.h" | 48 #include "core/css/resolver/StyleResolver.h" |
48 #include "core/css/resolver/StyleResolverParentScope.h" | 49 #include "core/css/resolver/StyleResolverParentScope.h" |
49 #include "core/css/resolver/StyleResolverStats.h" | 50 #include "core/css/resolver/StyleResolverStats.h" |
50 #include "core/dom/AXObjectCache.h" | 51 #include "core/dom/AXObjectCache.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" | 118 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" |
118 #include "core/page/scrolling/ScrollState.h" | 119 #include "core/page/scrolling/ScrollState.h" |
119 #include "core/page/scrolling/ScrollStateCallback.h" | 120 #include "core/page/scrolling/ScrollStateCallback.h" |
120 #include "core/paint/PaintLayer.h" | 121 #include "core/paint/PaintLayer.h" |
121 #include "core/svg/SVGDocumentExtensions.h" | 122 #include "core/svg/SVGDocumentExtensions.h" |
122 #include "core/svg/SVGElement.h" | 123 #include "core/svg/SVGElement.h" |
123 #include "platform/EventDispatchForbiddenScope.h" | 124 #include "platform/EventDispatchForbiddenScope.h" |
124 #include "platform/RuntimeEnabledFeatures.h" | 125 #include "platform/RuntimeEnabledFeatures.h" |
125 #include "platform/UserGestureIndicator.h" | 126 #include "platform/UserGestureIndicator.h" |
126 #include "platform/graphics/CompositorMutableProperties.h" | 127 #include "platform/graphics/CompositorMutableProperties.h" |
| 128 #include "platform/graphics/CompositorMutation.h" |
127 #include "platform/scroll/ScrollableArea.h" | 129 #include "platform/scroll/ScrollableArea.h" |
| 130 #include "platform/transforms/MatrixTransformOperation.h" |
128 #include "wtf/BitVector.h" | 131 #include "wtf/BitVector.h" |
129 #include "wtf/HashFunctions.h" | 132 #include "wtf/HashFunctions.h" |
130 #include "wtf/text/CString.h" | 133 #include "wtf/text/CString.h" |
131 #include "wtf/text/StringBuilder.h" | 134 #include "wtf/text/StringBuilder.h" |
132 #include "wtf/text/TextPosition.h" | 135 #include "wtf/text/TextPosition.h" |
133 | 136 |
134 namespace blink { | 137 namespace blink { |
135 | 138 |
136 namespace { | 139 namespace { |
137 | 140 |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 } | 990 } |
988 | 991 |
989 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) | 992 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) |
990 { | 993 { |
991 ElementRareData& rareData = *elementRareData(); | 994 ElementRareData& rareData = *elementRareData(); |
992 rareData.decrementCompositorProxiedProperties(mutableProperties); | 995 rareData.decrementCompositorProxiedProperties(mutableProperties); |
993 if (!rareData.proxiedPropertyCounts()) | 996 if (!rareData.proxiedPropertyCounts()) |
994 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat
e(StyleChangeReason::CompositorProxy)); | 997 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat
e(StyleChangeReason::CompositorProxy)); |
995 } | 998 } |
996 | 999 |
| 1000 void Element::updateFromMutation(const CompositorMutation& mutation) |
| 1001 { |
| 1002 ASSERT(isStyledElement()); |
| 1003 TRACE_EVENT0("compositor-worker", "Element::updateFromMutation"); |
| 1004 // Apply opacity and transform by updating inline style. scroll{Top,Left} |
| 1005 // are updated as part of layer tree sync during the commit. |
| 1006 if (mutation.isOpacityMutated()) |
| 1007 setInlineStyleProperty(CSSPropertyOpacity, mutation.opacity(), CSSPrimit
iveValue::UnitType::Number); |
| 1008 if (mutation.isTransformMutated()) { |
| 1009 RefPtrWillBeRawPtr<CSSValueList> valueList(CSSValueList::createSpaceSepa
rated()); |
| 1010 RefPtrWillBeRawPtr<CSSFunctionValue> matrixValue(CSSFunctionValue::creat
e(CSSValueMatrix3d)); |
| 1011 for (int col = 0; col < 4; col++) { |
| 1012 for (int row = 0; row < 4; row++) { |
| 1013 matrixValue->append(cssValuePool().createValue(mutation.transfor
m().get(row, col), CSSPrimitiveValue::UnitType::Pixels)); |
| 1014 } |
| 1015 } |
| 1016 valueList->append(matrixValue.release()); |
| 1017 ensureMutableInlineStyle().setProperty(CSSPropertyTransform, valueList.r
elease()); |
| 1018 inlineStyleChanged(); |
| 1019 } |
| 1020 } |
| 1021 |
997 uint32_t Element::compositorMutableProperties() const | 1022 uint32_t Element::compositorMutableProperties() const |
998 { | 1023 { |
999 if (!hasRareData()) | 1024 if (!hasRareData()) |
1000 return CompositorMutableProperty::kNone; | 1025 return CompositorMutableProperty::kNone; |
1001 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo
unts()) | 1026 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo
unts()) |
1002 return set->proxiedProperties(); | 1027 return set->proxiedProperties(); |
1003 return CompositorMutableProperty::kNone; | 1028 return CompositorMutableProperty::kNone; |
1004 } | 1029 } |
1005 | 1030 |
1006 bool Element::hasNonEmptyLayoutSize() const | 1031 bool Element::hasNonEmptyLayoutSize() const |
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3652 { | 3677 { |
3653 #if ENABLE(OILPAN) | 3678 #if ENABLE(OILPAN) |
3654 if (hasRareData()) | 3679 if (hasRareData()) |
3655 visitor->trace(elementRareData()); | 3680 visitor->trace(elementRareData()); |
3656 visitor->trace(m_elementData); | 3681 visitor->trace(m_elementData); |
3657 #endif | 3682 #endif |
3658 ContainerNode::trace(visitor); | 3683 ContainerNode::trace(visitor); |
3659 } | 3684 } |
3660 | 3685 |
3661 } // namespace blink | 3686 } // namespace blink |
OLD | NEW |