Turn srcset parsing errors into a warning
Reported by
andrea.g...@gmail.com,
Mar 21 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce the problem: 1. type the following in console 2. (new Image).srcset = '<!-- this is a placeholder -->'; 3. two red errors are thrown What is the expected behavior? Other browsers try to load the placeholder regardless, which I think is wrong. However, throwing 2 errors in console is also too much. Shouldn't these just be warnings instead? What went wrong? Specially when it comes to templates, having placeholders as attributes is quite common. In this case Chromium is doing the right thing, ignoring the srcset without trying to load it from the network, but it throws 2 errors even if I instantly update the attribute. If Chromium could just show a warning instead, that'd be awesome! Did this work before? N/A Does this work in other browsers? Yes Chrome version: 56.0.2924.87 Channel: n/a OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 25.0 r0 This is essential to keep mapped literal templates to DOM nodes as simple as possible, without having "scary" errors per srcset. Thanks for considering some improvement, if possible.
,
Mar 23 2017
One is here - https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp?q=%22attribute+value+since%22&dr=C&l=198 Should probably just be changed from ErrorMessageLevel to WarningMessageLevel. https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/parser/HTMLSrcsetParser.cpp?q=%22Dropped+srcset+candidate%22&dr=C&l=328 Same here, but perhaps the previous message (which comes from parseDescriptors calling srcsetError) should be prepended (shared via an out parameter or something) to this message.
,
Mar 24 2017
,
Mar 24 2017
,
Mar 28 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 28 2018
the error is still there, but the fix looked simple enough. why has this issue been abandoned?
,
Mar 28 2018
phistuck@, you have some greater powers now. Would you like to put the change up for review? |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by phistuck@chromium.org
, Mar 23 2017Components: Blink>Image
Labels: OS-Windows
Status: Untriaged (was: Unconfirmed)
Summary: Turn srcset parsing errors into a warning (was: srcset is over-reacting)