Chromium Code Reviews| Index: third_party/WebKit/Source/web/WebViewImpl.cpp |
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| index b5481838464c7a5f293401b00d00f0f4d9783db6..7cc19315d5af09f5980311b6285b52620207ef32 100644 |
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp |
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp |
| @@ -34,6 +34,7 @@ |
| #include "core/HTMLNames.h" |
| #include "core/InputTypeNames.h" |
| #include "core/clipboard/DataObject.h" |
| +#include "core/dom/DOMNodeIds.h" |
| #include "core/dom/Document.h" |
| #include "core/dom/Fullscreen.h" |
| #include "core/dom/LayoutTreeBuilderTraversal.h" |
| @@ -111,6 +112,7 @@ |
| #include "platform/exported/WebActiveGestureAnimation.h" |
| #include "platform/fonts/FontCache.h" |
| #include "platform/graphics/Color.h" |
| +#include "platform/graphics/CompositorMutation.h" |
| #include "platform/graphics/FirstPaintInvalidationTracking.h" |
| #include "platform/graphics/GraphicsContext.h" |
| #include "platform/graphics/Image.h" |
| @@ -4450,6 +4452,19 @@ void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t |
| } |
| } |
| +void WebViewImpl::applyMutations(const WebCompositorMutations& mutations) |
| +{ |
| + TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), "WebViewImpl::applyMutations"); |
| + for (const auto& entry : static_cast<const CompositorMutations&>(mutations).map) { |
| + int elementId = entry.key; |
| + const CompositorMutation& mutation = *entry.value; |
| + Node* node = DOMNodeIds::nodeForId(elementId); |
| + if (!node || !toElement(node)) |
|
jbroman
2016/01/23 23:55:09
toElement is not a check; it's a cast (with an ass
majidvp
2016/01/25 20:40:11
It is guaranteed to be an an Element. Check remove
|
| + continue; |
| + toElement(node)->updateFromMutation(mutation); |
| + } |
| +} |
| + |
| void WebViewImpl::updateLayerTreeViewport() |
| { |
| if (!page() || !m_layerTreeView) |