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

Issue 2256533002: Remove MediaQueryList listener from removed HTMLSourceElement. (Closed)

Created:
4 years, 4 months ago by Yoav Weiss
Modified:
4 years, 3 months ago
Reviewers:
cbiesinger, foolip
CC:
chromium-reviews, blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove MediaQueryList listener from removed HTMLSourceElement. Currently the listener is not removed when HTMLSourceElement is removed from the DOM, resulting in needless downloads when viewport changes after such removal. This CL fixes that. BUG=633875 Committed: https://crrev.com/dfdb63d9b535f4d20901a7e95f91bf503978ec2f Cr-Commit-Position: refs/heads/master@{#416468}

Patch Set 1 #

Total comments: 8

Patch Set 2 : review comments #

Patch Set 3 : Added expected result #

Total comments: 3

Patch Set 4 : typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -10 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/loading/image-picture-download-after-shrink.html View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/image-picture-download-after-shrink-expected.txt View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-picture-removal.html View 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-picture-removal-expected.txt View 1 1 chunk +4 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal.html View 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal-expected.txt View 1 2 2 chunks +3 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-source-removal.html View 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-source-removal-expected.txt View 1 2 chunks +3 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/resources/image-picture-download-after-shrink-frame.html View 1 1 chunk +28 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/resources/image-picture-no-download-after-picture-removal-frame.html View 1 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/resources/image-picture-no-download-after-removal-frame.html View 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/resources/image-picture-no-download-after-source-removal-frame.html View 1 1 chunk +33 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLImageElement.cpp View 1 3 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPictureElement.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPictureElement.cpp View 1 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSourceElement.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSourceElement.cpp View 1 2 chunks +17 lines, -4 lines 0 comments Download

Messages

Total messages: 33 (21 generated)
Yoav Weiss
Hey Christian :) Been a while since we messed around with this code, but mind ...
4 years, 4 months ago (2016-08-16 22:38:40 UTC) #4
cbiesinger
Well, here are some comments. I'm not sure I should be giving the final lgtm ...
4 years, 4 months ago (2016-08-17 19:32:05 UTC) #7
Yoav Weiss
https://codereview.chromium.org/2256533002/diff/1/third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal.html File third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal.html (right): https://codereview.chromium.org/2256533002/diff/1/third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal.html#newcode2 third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal.html:2: <script src="../resources/testharness.js"></script> On 2016/08/17 19:32:05, cbiesinger wrote: > I ...
4 years, 3 months ago (2016-08-30 07:37:07 UTC) #8
Yoav Weiss
foolip@ - care to take a look? (git blamed HTMLSourceElement.cpp and saw that you messed ...
4 years, 3 months ago (2016-09-01 13:21:25 UTC) #16
foolip
I believe I've poked at this file before, but not as it relates to <picture>. ...
4 years, 3 months ago (2016-09-01 14:45:14 UTC) #19
Yoav Weiss
On 2016/09/01 14:45:14, foolip wrote: > I believe I've poked at this file before, but ...
4 years, 3 months ago (2016-09-01 14:46:12 UTC) #20
Yoav Weiss
cbiesinger@ - will you be willing to take another look? I think that even though ...
4 years, 3 months ago (2016-09-01 15:07:50 UTC) #21
cbiesinger
OK then -- lgtm, see comments below. And you need to fix the red try ...
4 years, 3 months ago (2016-09-02 19:09:22 UTC) #22
Yoav Weiss
Thanks for reviewing! https://codereview.chromium.org/2256533002/diff/40001/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp File third_party/WebKit/Source/core/html/HTMLSourceElement.cpp (right): https://codereview.chromium.org/2256533002/diff/40001/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp#newcode84 third_party/WebKit/Source/core/html/HTMLSourceElement.cpp:84: if (media.isEmpty()) On 2016/09/02 19:09:22, cbiesinger ...
4 years, 3 months ago (2016-09-04 04:15:52 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2256533002/60001
4 years, 3 months ago (2016-09-04 07:30:08 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-04 07:35:54 UTC) #31
commit-bot: I haz the power
4 years, 3 months ago (2016-09-04 07:38:18 UTC) #33
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/dfdb63d9b535f4d20901a7e95f91bf503978ec2f
Cr-Commit-Position: refs/heads/master@{#416468}

Powered by Google App Engine
This is Rietveld 408576698