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

Unified Diff: third_party/WebKit/Source/modules/csspaint/CSSPaintWorklet.cpp

Issue 2896773002: [DONT COMMIT] PaintWorklet: Move paintWorklet from 'window' to 'CSS' (Closed)
Patch Set: WIP Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/csspaint/CSSPaintWorklet.cpp
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintWorklet.cpp b/third_party/WebKit/Source/modules/csspaint/CSSPaintWorklet.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c63be0302b7b4423c19fd592fa814a4859715f4c
--- /dev/null
+++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintWorklet.cpp
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "modules/csspaint/CSSPaintWorklet.h"
+
+#include "core/css/DOMWindowCSS.h"
+#include "core/dom/Document.h"
+#include "core/frame/LocalDOMWindow.h"
+#include "core/frame/LocalFrame.h"
+#include "modules/csspaint/PaintWorklet.h"
+
+namespace blink {
+
+// static
+Worklet* CSSPaintWorklet::paintWorklet(ScriptState* script_state) {
+ return paintWorklet(*ToDocument(ExecutionContext::From(script_state)));
+}
+
+// static
+PaintWorklet* CSSPaintWorklet::paintWorklet(Document& document) {
+ DLOG(ERROR) << document.Url().GetString();
nhiroki 2017/06/13 08:56:58 yukishiino@: I have a question. In LayoutTests/ht
nhiroki 2017/06/13 09:41:56 Sample log: [1:1:0613/021034.138374:3361121614:ER
nhiroki 2017/06/13 10:13:38 According to yukishiino@, this could be a bug in V
+ return PaintWorklet::From(*document.ExecutingWindow());
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698