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

Issue 1662423002: Make CanvasRenderingContext not inherit from ActiveDOMObject (Closed)

Created:
4 years, 10 months ago by xlai (Olivia)
Modified:
4 years, 10 months ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, blink-reviews-html_chromium.org, ajuma+watch-canvas_chromium.org, sof, eae+blinkwatch, Justin Novosad, blink-reviews-dom_chromium.org, dglazkov+blink, Rik, dshwang, blink-reviews, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make CanvasRenderingContext not inherit from ActiveDOMObject The first step before sharing CanvasRenderingContext (CRC) between HTMLCanvasElement and OffscreenCanvas is to take away the inheritance relationship between CRC and ActiveDOMObject. It is not right that both HTMLCanvasElement and its associated CRC are monitoring Document separately. Instead, we add willDetachDocument() to DocumentVisibilityObserver, so that when Document is detached, HTMLCanvasElement will notice this change and call willDetachDocument() to promptly propagates the change to its associated CRC, and CRC will invoke stop() to lose context. BUG=563826 Committed: https://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb Cr-Commit-Position: refs/heads/master@{#373711}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Make the function pure virtual #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -23 lines) Patch
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentTest.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentVisibilityObserver.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 3 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h View 3 chunks +3 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp View 2 chunks +1 line, -14 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
xlai (Olivia)
4 years, 10 months ago (2016-02-04 20:25:22 UTC) #2
Justin Novosad
lgtm with nit https://codereview.chromium.org/1662423002/diff/1/third_party/WebKit/Source/core/dom/DocumentVisibilityObserver.h File third_party/WebKit/Source/core/dom/DocumentVisibilityObserver.h (right): https://codereview.chromium.org/1662423002/diff/1/third_party/WebKit/Source/core/dom/DocumentVisibilityObserver.h#newcode23 third_party/WebKit/Source/core/dom/DocumentVisibilityObserver.h:23: virtual void willDetachDocument() { }; You ...
4 years, 10 months ago (2016-02-04 21:31:38 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1662423002/30001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1662423002/30001
4 years, 10 months ago (2016-02-04 22:11:16 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:30001)
4 years, 10 months ago (2016-02-05 01:46:37 UTC) #8
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 01:48:00 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9c74567e241b46365ecb48f88c62ff5b993ae2bb
Cr-Commit-Position: refs/heads/master@{#373711}

Powered by Google App Engine
This is Rietveld 408576698