Chromium Code Reviews| 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 65 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 TRACE_EVENT0("compositor-worker", "Element::updateFromMutation"); | |
|
flackr
2016/01/22 14:34:41
We should have a comment that the scroll offset is
| |
| 1003 if (mutation.isOpacityMutated()) | |
| 1004 setInlineStyleProperty(CSSPropertyOpacity, mutation.opacity(), CSSPrimit iveValue::UnitType::Number); | |
| 1005 if (mutation.isTransformMutated()) { | |
| 1006 RefPtrWillBeRawPtr<CSSValueList> valueList(CSSValueList::createSpaceSepa rated()); | |
| 1007 RefPtrWillBeRawPtr<CSSFunctionValue> matrixValue(CSSFunctionValue::creat e(CSSValueMatrix3d)); | |
| 1008 for (int col = 0; col < 4; col++) { | |
| 1009 for (int row = 0; row < 4; row++) { | |
| 1010 matrixValue->append(cssValuePool().createValue(mutation.transfor m().get(row, col), CSSPrimitiveValue::UnitType::Pixels)); | |
| 1011 } | |
| 1012 } | |
| 1013 valueList->append(matrixValue.release()); | |
| 1014 ensureMutableInlineStyle().setProperty(CSSPropertyTransform, valueList.r elease()); | |
| 1015 inlineStyleChanged(); | |
| 1016 } | |
| 1017 } | |
| 1018 | |
| 996 uint32_t Element::compositorMutableProperties() const | 1019 uint32_t Element::compositorMutableProperties() const |
| 997 { | 1020 { |
| 998 if (!hasRareData()) | 1021 if (!hasRareData()) |
| 999 return CompositorMutablePropertyNone; | 1022 return CompositorMutablePropertyNone; |
| 1000 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo unts()) | 1023 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo unts()) |
| 1001 return set->proxiedProperties(); | 1024 return set->proxiedProperties(); |
| 1002 return CompositorMutablePropertyNone; | 1025 return CompositorMutablePropertyNone; |
| 1003 } | 1026 } |
| 1004 | 1027 |
| 1005 bool Element::hasNonEmptyLayoutSize() const | 1028 bool Element::hasNonEmptyLayoutSize() const |
| (...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3650 { | 3673 { |
| 3651 #if ENABLE(OILPAN) | 3674 #if ENABLE(OILPAN) |
| 3652 if (hasRareData()) | 3675 if (hasRareData()) |
| 3653 visitor->trace(elementRareData()); | 3676 visitor->trace(elementRareData()); |
| 3654 visitor->trace(m_elementData); | 3677 visitor->trace(m_elementData); |
| 3655 #endif | 3678 #endif |
| 3656 ContainerNode::trace(visitor); | 3679 ContainerNode::trace(visitor); |
| 3657 } | 3680 } |
| 3658 | 3681 |
| 3659 } // namespace blink | 3682 } // namespace blink |
| OLD | NEW |