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 21 matching lines...) Expand all Loading... |
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/CSSImageValue.h" | 41 #include "core/css/CSSImageValue.h" |
| 42 #include "core/css/CSSFunctionValue.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" |
51 #include "core/dom/Attr.h" | 52 #include "core/dom/Attr.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #include "core/page/SpatialNavigation.h" | 117 #include "core/page/SpatialNavigation.h" |
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" |
| 127 #include "platform/graphics/CompositorMutation.h" |
126 #include "platform/scroll/ScrollableArea.h" | 128 #include "platform/scroll/ScrollableArea.h" |
| 129 #include "platform/transforms/MatrixTransformOperation.h" |
127 #include "wtf/BitVector.h" | 130 #include "wtf/BitVector.h" |
128 #include "wtf/HashFunctions.h" | 131 #include "wtf/HashFunctions.h" |
129 #include "wtf/text/CString.h" | 132 #include "wtf/text/CString.h" |
130 #include "wtf/text/StringBuilder.h" | 133 #include "wtf/text/StringBuilder.h" |
131 #include "wtf/text/TextPosition.h" | 134 #include "wtf/text/TextPosition.h" |
132 | 135 |
133 namespace blink { | 136 namespace blink { |
134 | 137 |
135 namespace { | 138 namespace { |
136 | 139 |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 } | 989 } |
987 | 990 |
988 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) | 991 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) |
989 { | 992 { |
990 ElementRareData& rareData = *elementRareData(); | 993 ElementRareData& rareData = *elementRareData(); |
991 rareData.decrementCompositorProxiedProperties(mutableProperties); | 994 rareData.decrementCompositorProxiedProperties(mutableProperties); |
992 if (!rareData.proxiedPropertyCounts()) | 995 if (!rareData.proxiedPropertyCounts()) |
993 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat
e(StyleChangeReason::CompositorProxy)); | 996 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat
e(StyleChangeReason::CompositorProxy)); |
994 } | 997 } |
995 | 998 |
| 999 void Element::updateFromMutation(const CompositorMutation& mutation) |
| 1000 { |
| 1001 ASSERT(isStyledElement()); |
| 1002 bool needsStyleUpdate = mutation.isOpacityMutated() || mutation.isTransformM
utated(); |
| 1003 TRACE_EVENT0("compositor-worker", "Element::updateFromMutation"); |
| 1004 if (needsStyleUpdate) { |
| 1005 if (mutation.isOpacityMutated()) |
| 1006 setInlineStyleProperty(CSSPropertyOpacity, mutation.opacity(), CSSPr
imitiveValue::UnitType::Number); |
| 1007 if (mutation.isTransformMutated()) { |
| 1008 RefPtrWillBeRawPtr<CSSValueList> valueList(CSSValueList::createSpace
Separated()); |
| 1009 RefPtrWillBeRawPtr<CSSFunctionValue> matrixValue(CSSFunctionValue::c
reate(CSSValueMatrix3d)); |
| 1010 for (int col = 0; col < 4; col++) { |
| 1011 for (int row = 0; row < 4; row++) { |
| 1012 matrixValue->append(cssValuePool().createValue(mutation.tran
sform().get(row, col), CSSPrimitiveValue::UnitType::Pixels)); |
| 1013 } |
| 1014 } |
| 1015 valueList->append(matrixValue.release()); |
| 1016 ensureMutableInlineStyle().setProperty(CSSPropertyTransform, valueLi
st.release()); |
| 1017 inlineStyleChanged(); |
| 1018 } |
| 1019 } |
| 1020 } |
| 1021 |
996 uint32_t Element::compositorMutableProperties() const | 1022 uint32_t Element::compositorMutableProperties() const |
997 { | 1023 { |
998 if (!hasRareData()) | 1024 if (!hasRareData()) |
999 return WebCompositorMutablePropertyNone; | 1025 return CompositorMutablePropertyNone; |
1000 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo
unts()) | 1026 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo
unts()) |
1001 return set->proxiedProperties(); | 1027 return set->proxiedProperties(); |
1002 return WebCompositorMutablePropertyNone; | 1028 return CompositorMutablePropertyNone; |
1003 } | 1029 } |
1004 | 1030 |
1005 bool Element::hasNonEmptyLayoutSize() const | 1031 bool Element::hasNonEmptyLayoutSize() const |
1006 { | 1032 { |
1007 document().updateLayoutIgnorePendingStylesheets(); | 1033 document().updateLayoutIgnorePendingStylesheets(); |
1008 | 1034 |
1009 if (LayoutBoxModelObject* box = layoutBoxModelObject()) | 1035 if (LayoutBoxModelObject* box = layoutBoxModelObject()) |
1010 return box->hasNonEmptyLayoutSize(); | 1036 return box->hasNonEmptyLayoutSize(); |
1011 return false; | 1037 return false; |
1012 } | 1038 } |
(...skipping 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3649 { | 3675 { |
3650 #if ENABLE(OILPAN) | 3676 #if ENABLE(OILPAN) |
3651 if (hasRareData()) | 3677 if (hasRareData()) |
3652 visitor->trace(elementRareData()); | 3678 visitor->trace(elementRareData()); |
3653 visitor->trace(m_elementData); | 3679 visitor->trace(m_elementData); |
3654 #endif | 3680 #endif |
3655 ContainerNode::trace(visitor); | 3681 ContainerNode::trace(visitor); |
3656 } | 3682 } |
3657 | 3683 |
3658 } // namespace blink | 3684 } // namespace blink |
OLD | NEW |