Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
116 #include "core/page/scrolling/ScrollCustomizationCallbacks.h" 117 #include "core/page/scrolling/ScrollCustomizationCallbacks.h"
117 #include "core/page/scrolling/ScrollState.h" 118 #include "core/page/scrolling/ScrollState.h"
118 #include "core/page/scrolling/ScrollStateCallback.h" 119 #include "core/page/scrolling/ScrollStateCallback.h"
119 #include "core/paint/PaintLayer.h" 120 #include "core/paint/PaintLayer.h"
120 #include "core/svg/SVGDocumentExtensions.h" 121 #include "core/svg/SVGDocumentExtensions.h"
121 #include "core/svg/SVGElement.h" 122 #include "core/svg/SVGElement.h"
122 #include "platform/EventDispatchForbiddenScope.h" 123 #include "platform/EventDispatchForbiddenScope.h"
123 #include "platform/RuntimeEnabledFeatures.h" 124 #include "platform/RuntimeEnabledFeatures.h"
124 #include "platform/UserGestureIndicator.h" 125 #include "platform/UserGestureIndicator.h"
125 #include "platform/scroll/ScrollableArea.h" 126 #include "platform/scroll/ScrollableArea.h"
127 #include "platform/transforms/MatrixTransformOperation.h"
128 #include "public/platform/WebMutation.h"
126 #include "wtf/BitVector.h" 129 #include "wtf/BitVector.h"
127 #include "wtf/HashFunctions.h" 130 #include "wtf/HashFunctions.h"
128 #include "wtf/text/CString.h" 131 #include "wtf/text/CString.h"
129 #include "wtf/text/StringBuilder.h" 132 #include "wtf/text/StringBuilder.h"
130 #include "wtf/text/TextPosition.h" 133 #include "wtf/text/TextPosition.h"
131 134
132 namespace blink { 135 namespace blink {
133 136
134 namespace { 137 namespace {
135 138
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 } 988 }
986 989
987 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties) 990 void Element::decrementCompositorProxiedProperties(uint32_t mutableProperties)
988 { 991 {
989 ElementRareData& rareData = *elementRareData(); 992 ElementRareData& rareData = *elementRareData();
990 rareData.decrementCompositorProxiedProperties(mutableProperties); 993 rareData.decrementCompositorProxiedProperties(mutableProperties);
991 if (!rareData.proxiedPropertyCounts()) 994 if (!rareData.proxiedPropertyCounts())
992 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::CompositorProxy)); 995 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::creat e(StyleChangeReason::CompositorProxy));
993 } 996 }
994 997
998 void Element::updateFromMutation(const WebMutation& mutation)
999 {
1000 ASSERT(isStyledElement());
1001 bool needsStyleUpdate = mutation.isOpacityMutated() || mutation.isTransformM utated();
1002 TRACE_EVENT0("compositor-worker", "Element::updateFromMutation");
1003 if (needsStyleUpdate) {
1004 if (mutation.isOpacityMutated())
1005 setInlineStyleProperty(CSSPropertyOpacity, mutation.opacity(), CSSPr imitiveValue::UnitType::Number);
1006 if (mutation.isTransformMutated()) {
1007 RefPtrWillBeRawPtr<CSSValueList> valueList(CSSValueList::createSpace Separated());
1008 RefPtrWillBeRawPtr<CSSFunctionValue> matrixValue(CSSFunctionValue::c reate(CSSValueMatrix3d));
1009 for (int col = 0; col < 4; col++) {
1010 for (int row = 0; row < 4; row++) {
1011 matrixValue->append(cssValuePool().createValue(mutation.tran sform().get(row, col), CSSPrimitiveValue::UnitType::Pixels));
1012 }
1013 }
1014 valueList->append(matrixValue.release());
1015 ensureMutableInlineStyle().setProperty(CSSPropertyTransform, valueLi st.release());
1016 inlineStyleChanged();
1017 }
1018 }
1019 }
1020
995 uint32_t Element::compositorMutableProperties() const 1021 uint32_t Element::compositorMutableProperties() const
996 { 1022 {
997 if (!hasRareData()) 1023 if (!hasRareData())
998 return WebCompositorMutablePropertyNone; 1024 return WebCompositorMutablePropertyNone;
999 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo unts()) 1025 if (CompositorProxiedPropertySet* set = elementRareData()->proxiedPropertyCo unts())
1000 return set->proxiedProperties(); 1026 return set->proxiedProperties();
1001 return WebCompositorMutablePropertyNone; 1027 return WebCompositorMutablePropertyNone;
1002 } 1028 }
1003 1029
1004 bool Element::hasNonEmptyLayoutSize() const 1030 bool Element::hasNonEmptyLayoutSize() const
(...skipping 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after
3620 { 3646 {
3621 #if ENABLE(OILPAN) 3647 #if ENABLE(OILPAN)
3622 if (hasRareData()) 3648 if (hasRareData())
3623 visitor->trace(elementRareData()); 3649 visitor->trace(elementRareData());
3624 visitor->trace(m_elementData); 3650 visitor->trace(m_elementData);
3625 #endif 3651 #endif
3626 ContainerNode::trace(visitor); 3652 ContainerNode::trace(visitor);
3627 } 3653 }
3628 3654
3629 } // namespace blink 3655 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698