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

Issue 2871593003: DevTools: correctly parse srcset attribute before linkifying urls (Closed)

Created:
3 years, 7 months ago by luoe
Modified:
3 years, 7 months ago
Reviewers:
dgozman, lushnikov
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: correctly parse srcset attribute before linkifying urls The "srcset" attribute can take multiple image candidate strings, consisting of a url and an optional width/density descriptor (e.g. 1x, 2w). DevTools used to split the value on commas, which broke when valid srcsets had urls containing commas. This CL updates the linkifier to more closely resemble the rules for parsing the attribute: https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute BUG=671723 Review-Url: https://codereview.chromium.org/2871593003 Cr-Commit-Position: refs/heads/master@{#470624} Committed: https://chromium.googlesource.com/chromium/src/+/c12dbdc00cf31c15ab5ac591c419aa27ad7b9033

Patch Set 1 #

Total comments: 9

Patch Set 2 : ac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -34 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes.html View 1 3 chunks +22 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt View 1 1 chunk +49 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js View 1 1 chunk +54 lines, -23 lines 0 comments Download

Messages

Total messages: 23 (11 generated)
luoe
Please take a look. https://codereview.chromium.org/2871593003/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt File third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt (right): https://codereview.chromium.org/2871593003/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt#newcode3 third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt:3: a link No functional change ...
3 years, 7 months ago (2017-05-08 22:14:45 UTC) #3
dgozman
Looks good, but let's make the test readable! https://codereview.chromium.org/2871593003/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt File third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt (right): https://codereview.chromium.org/2871593003/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt#newcode10 third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt:10: <span ...
3 years, 7 months ago (2017-05-08 23:37:40 UTC) #4
luoe
Changed the test to print out positions of links embedded at each tree element. Ptal ...
3 years, 7 months ago (2017-05-09 02:53:18 UTC) #5
dgozman
lgtm
3 years, 7 months ago (2017-05-09 22:14:04 UTC) #6
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/2871593003/20001
3 years, 7 months ago (2017-05-09 22:16:07 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 00:18:35 UTC) #10
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/2871593003/20001
3 years, 7 months ago (2017-05-10 00:27:27 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 02:29:34 UTC) #14
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/2871593003/20001
3 years, 7 months ago (2017-05-10 02:31:12 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 04:36:00 UTC) #18
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/2871593003/20001
3 years, 7 months ago (2017-05-10 17:04:53 UTC) #20
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 17:13:43 UTC) #23
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/c12dbdc00cf31c15ab5ac591c419...

Powered by Google App Engine
This is Rietveld 408576698