Chromium Code Reviews| Index: third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp |
| diff --git a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp |
| index d3dbc993cbbd5af58f45d073e372810aa6f4b919..379c4526dbfee84c2f3461490fe9320d16edb9b4 100644 |
| --- a/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp |
| +++ b/third_party/WebKit/Source/modules/csspaint/WindowPaintWorklet.cpp |
| @@ -11,7 +11,7 @@ |
| namespace blink { |
| WindowPaintWorklet::WindowPaintWorklet(LocalDOMWindow& window) |
| - : DOMWindowProperty(window.frame()) {} |
| + : Supplement<LocalDOMWindow>(window) {} |
| const char* WindowPaintWorklet::supplementName() { |
| return "WindowPaintWorklet"; |
| @@ -34,15 +34,14 @@ Worklet* WindowPaintWorklet::paintWorklet(DOMWindow& window) { |
| } |
| PaintWorklet* WindowPaintWorklet::paintWorklet() { |
| - if (!m_paintWorklet && frame()) |
| - m_paintWorklet = PaintWorklet::create(frame()); |
| + if (!m_paintWorklet && host() && host()->frame()) |
|
sof
2017/01/13 07:29:13
we really have to support operating in a host()-fr
|
| + m_paintWorklet = PaintWorklet::create(host()->frame()); |
| return m_paintWorklet.get(); |
| } |
| DEFINE_TRACE(WindowPaintWorklet) { |
| visitor->trace(m_paintWorklet); |
| Supplement<LocalDOMWindow>::trace(visitor); |
| - DOMWindowProperty::trace(visitor); |
| } |
| } // namespace blink |