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

Issue 649183007: Add console errors and usecounter when srcset candidates are dropped (Closed)

Created:
6 years, 2 months ago by Yoav Weiss
Modified:
6 years, 2 months ago
Reviewers:
Mike West
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Add console errors and usecounter when srcset candidates are dropped Debugging markup is hard. I'm adding console logs here so that it'd be easier for authors to spot that they have invalid srcset descriptors, and that their candidate resources are being dropped. I also added a UseCounter, so we'd have a better idea on how often authors get their descriptors wrong. BUG=422049 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184069

Patch Set 1 #

Patch Set 2 : Fixed up errors. Added UseCounter. Added tests. #

Patch Set 3 : rebase #

Total comments: 1

Patch Set 4 : improved log messages #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -34 lines) Patch
M LayoutTests/fast/hidpi/image-srcset-density-and-width-descriptors-expected.txt View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M LayoutTests/fast/hidpi/image-srcset-ignore-double-descriptor-expected.txt View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M LayoutTests/fast/hidpi/image-srcset-invalid-descriptor.html View 1 2 chunks +16 lines, -0 lines 0 comments Download
M LayoutTests/fast/hidpi/image-srcset-invalid-descriptor-expected.txt View 1 2 3 1 chunk +89 lines, -1 line 0 comments Download
M LayoutTests/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M Source/core/frame/UseCounter.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/parser/HTMLSrcsetParser.h View 1 2 chunks +4 lines, -2 lines 0 comments Download
M Source/core/html/parser/HTMLSrcsetParser.cpp View 1 2 3 12 chunks +64 lines, -29 lines 1 comment Download

Messages

Total messages: 6 (2 generated)
Mike West
LGTM. https://codereview.chromium.org/649183007/diff/40001/LayoutTests/fast/hidpi/image-srcset-density-and-width-descriptors-expected.txt File LayoutTests/fast/hidpi/image-srcset-density-and-width-descriptors-expected.txt (right): https://codereview.chromium.org/649183007/diff/40001/LayoutTests/fast/hidpi/image-srcset-density-and-width-descriptors-expected.txt#newcode1 LayoutTests/fast/hidpi/image-srcset-density-and-width-descriptors-expected.txt:1: CONSOLE ERROR: srcset has multiple 'x' descriptors or ...
6 years, 2 months ago (2014-10-21 06:40:54 UTC) #2
Mike West
SLGTM. https://codereview.chromium.org/649183007/diff/60001/Source/core/html/parser/HTMLSrcsetParser.cpp File Source/core/html/parser/HTMLSrcsetParser.cpp (right): https://codereview.chromium.org/649183007/diff/60001/Source/core/html/parser/HTMLSrcsetParser.cpp#newcode187 Source/core/html/parser/HTMLSrcsetParser.cpp:187: StringBuilder errorMessage; StringBuilder is probably overkill here. '+' ...
6 years, 2 months ago (2014-10-21 09:36:25 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/649183007/60001
6 years, 2 months ago (2014-10-21 09:39:11 UTC) #5
commit-bot: I haz the power
6 years, 2 months ago (2014-10-21 10:47:41 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 184069

Powered by Google App Engine
This is Rietveld 408576698