Index: third_party/WebKit/Source/core/dom/CompositorProxy.cpp |
diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp |
index f45d7ccd873781ab03c0e2647bde0a0d21b72021..eaec0ae6173d73458fafcc463686b63126018192 100644 |
--- a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp |
+++ b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp |
@@ -10,8 +10,8 @@ |
#include "core/dom/ExceptionCode.h" |
#include "core/dom/ExecutionContext.h" |
#include "platform/ThreadSafeFunctional.h" |
+#include "platform/graphics/CompositorMutableProperties.h" |
#include "public/platform/Platform.h" |
-#include "public/platform/WebCompositorMutableProperties.h" |
#include "public/platform/WebTraceLocation.h" |
#include <algorithm> |
@@ -19,21 +19,21 @@ namespace blink { |
static const struct { |
const char* name; |
- WebCompositorMutableProperty property; |
+ CompositorMutableProperty property; |
} allowedProperties[] = { |
- { "opacity", WebCompositorMutablePropertyOpacity }, |
- { "scrollleft", WebCompositorMutablePropertyScrollLeft }, |
- { "scrolltop", WebCompositorMutablePropertyScrollTop }, |
- { "transform", WebCompositorMutablePropertyTransform }, |
+ { "opacity", CompositorMutablePropertyOpacity }, |
+ { "scrollleft", CompositorMutablePropertyScrollLeft }, |
+ { "scrolltop", CompositorMutablePropertyScrollTop }, |
+ { "transform", CompositorMutablePropertyTransform }, |
}; |
-static WebCompositorMutableProperty compositorMutablePropertyForName(const String& attributeName) |
+static CompositorMutableProperty compositorMutablePropertyForName(const String& attributeName) |
{ |
for (const auto& mapping : allowedProperties) { |
if (equalIgnoringCase(mapping.name, attributeName)) |
return mapping.property; |
} |
- return WebCompositorMutablePropertyNone; |
+ return CompositorMutablePropertyNone; |
} |
static bool isControlThread() |
@@ -152,7 +152,7 @@ double CompositorProxy::opacity(ExceptionState& exceptionState) const |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return 0.0; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyOpacity), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyOpacity), exceptionState)) |
return 0.0; |
return m_opacity; |
} |
@@ -161,7 +161,7 @@ double CompositorProxy::scrollLeft(ExceptionState& exceptionState) const |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return 0.0; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyScrollLeft), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyScrollLeft), exceptionState)) |
return 0.0; |
return m_scrollLeft; |
} |
@@ -170,7 +170,7 @@ double CompositorProxy::scrollTop(ExceptionState& exceptionState) const |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return 0.0; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyScrollTop), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyScrollTop), exceptionState)) |
return 0.0; |
return m_scrollTop; |
} |
@@ -179,7 +179,7 @@ DOMMatrix* CompositorProxy::transform(ExceptionState& exceptionState) const |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return nullptr; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyTransform), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyTransform), exceptionState)) |
return nullptr; |
return m_transform; |
} |
@@ -188,40 +188,40 @@ void CompositorProxy::setOpacity(double opacity, ExceptionState& exceptionState) |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyOpacity), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyOpacity), exceptionState)) |
return; |
m_opacity = std::min(1., std::max(0., opacity)); |
- m_mutatedProperties |= static_cast<uint32_t>(WebCompositorMutablePropertyTransform); |
+ m_mutatedProperties |= static_cast<uint32_t>(CompositorMutablePropertyTransform); |
} |
void CompositorProxy::setScrollLeft(double scrollLeft, ExceptionState& exceptionState) |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyScrollLeft), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyScrollLeft), exceptionState)) |
return; |
m_scrollLeft = scrollLeft; |
- m_mutatedProperties |= static_cast<uint32_t>(WebCompositorMutablePropertyScrollLeft); |
+ m_mutatedProperties |= static_cast<uint32_t>(CompositorMutablePropertyScrollLeft); |
} |
void CompositorProxy::setScrollTop(double scrollTop, ExceptionState& exceptionState) |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyScrollTop), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyScrollTop), exceptionState)) |
return; |
m_scrollTop = scrollTop; |
- m_mutatedProperties |= static_cast<uint32_t>(WebCompositorMutablePropertyScrollTop); |
+ m_mutatedProperties |= static_cast<uint32_t>(CompositorMutablePropertyScrollTop); |
} |
void CompositorProxy::setTransform(DOMMatrix* transform, ExceptionState& exceptionState) |
{ |
if (raiseExceptionIfMutationNotAllowed(exceptionState)) |
return; |
- if (raiseExceptionIfNotMutable(static_cast<uint32_t>(WebCompositorMutablePropertyTransform), exceptionState)) |
+ if (raiseExceptionIfNotMutable(static_cast<uint32_t>(CompositorMutablePropertyTransform), exceptionState)) |
return; |
m_transform = transform; |
- m_mutatedProperties |= static_cast<uint32_t>(WebCompositorMutablePropertyTransform); |
+ m_mutatedProperties |= static_cast<uint32_t>(CompositorMutablePropertyTransform); |
} |
bool CompositorProxy::raiseExceptionIfNotMutable(uint32_t property, ExceptionState& exceptionState) const |