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

Issue 2644753002: DevTools: untruncate links on copy (Closed)

Created:
3 years, 11 months ago by luoe
Modified:
3 years, 7 months ago
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: untruncate links on copy During exporti or copying of selected text, links that were truncated will be replaced with their original, un-trimmed text. BUG=505177 Review-Url: https://codereview.chromium.org/2644753002 Cr-Commit-Position: refs/heads/master@{#468514} Committed: https://chromium.googlesource.com/chromium/src/+/9bee9f62d8507206938b746e3987ee2c87d6190b

Patch Set 1 #

Patch Set 2 : a #

Total comments: 11

Patch Set 3 : ac #

Total comments: 4

Patch Set 4 : ac #

Total comments: 2

Patch Set 5 : rebase and return to patch set 3 but with anchorElementForTest removed #

Total comments: 4

Patch Set 6 : ac #

Total comments: 8

Patch Set 7 : account for links with complex subtrees #

Patch Set 8 : ac #

Patch Set 9 : ac! #

Patch Set 10 : YAAAY #

Patch Set 11 : reset tests with zero width space #

Total comments: 10

Patch Set 12 : ac #

Patch Set 13 : simpler #

Total comments: 8

Patch Set 14 : split by regex, always trim hash #

Patch Set 15 : short url with hashes test #

Patch Set 16 : undo zero-width space, back to ellipsis #

Total comments: 2

Patch Set 17 : ac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+536 lines, -50 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/console/console-copy-truncated-text.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +198 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/console/console-copy-truncated-text-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +225 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html View 1 2 chunks +1 line, -20 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/components/Linkifier.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +69 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -5 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +11 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 38 (13 generated)
luoe
Please take a look
3 years, 9 months ago (2017-03-24 23:22:52 UTC) #3
allada
https://codereview.chromium.org/2644753002/diff/20001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js File third_party/WebKit/Source/devtools/front_end/components/Linkifier.js (right): https://codereview.chromium.org/2644753002/diff/20001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js#newcode308 third_party/WebKit/Source/devtools/front_end/components/Linkifier.js:308: var text = info.originalLinkText.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, '$1\u2026'); This looks very strange ...
3 years, 9 months ago (2017-03-28 01:13:09 UTC) #4
luoe
https://codereview.chromium.org/2644753002/diff/20001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js File third_party/WebKit/Source/devtools/front_end/components/Linkifier.js (right): https://codereview.chromium.org/2644753002/diff/20001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js#newcode308 third_party/WebKit/Source/devtools/front_end/components/Linkifier.js:308: var text = info.originalLinkText.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, '$1\u2026'); On 2017/03/28 01:13:08, allada ...
3 years, 8 months ago (2017-03-31 21:35:21 UTC) #5
allada
lgtm https://codereview.chromium.org/2644753002/diff/20001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js (right): https://codereview.chromium.org/2644753002/diff/20001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js#newcode79 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js:79: return typeof originalLinkText === 'string' ? originalLinkText : ...
3 years, 8 months ago (2017-03-31 23:17:33 UTC) #6
luoe
3 years, 8 months ago (2017-04-04 00:40:27 UTC) #8
lushnikov
https://codereview.chromium.org/2644753002/diff/40001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2644753002/diff/40001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode127 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:127: this._anchorElementForTest = anchorElement; query it! https://codereview.chromium.org/2644753002/diff/40001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js (right): ...
3 years, 8 months ago (2017-04-04 01:07:07 UTC) #9
luoe
Comments addressed! Please take another look https://codereview.chromium.org/2644753002/diff/40001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (right): https://codereview.chromium.org/2644753002/diff/40001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#newcode127 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:127: this._anchorElementForTest = anchorElement; ...
3 years, 8 months ago (2017-04-04 19:56:34 UTC) #10
dgozman
https://codereview.chromium.org/2644753002/diff/60001/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js File third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js (right): https://codereview.chromium.org/2644753002/diff/60001/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js#newcode601 third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js:601: node[Components.DOMPresentationUtils._untruncatedTextSymbol] = originalText; This is only used for Console, ...
3 years, 8 months ago (2017-04-05 15:45:13 UTC) #12
luoe
Please take another look https://codereview.chromium.org/2644753002/diff/60001/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js File third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js (right): https://codereview.chromium.org/2644753002/diff/60001/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js#newcode601 third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js:601: node[Components.DOMPresentationUtils._untruncatedTextSymbol] = originalText; I've returned ...
3 years, 8 months ago (2017-04-06 02:10:24 UTC) #13
lushnikov
https://codereview.chromium.org/2644753002/diff/80001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js (right): https://codereview.chromium.org/2644753002/diff/80001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js#newcode78 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js:78: var originalLinkText = Components.Linkifier.originalLinkText(node.parentElement); let's inline this method to ...
3 years, 8 months ago (2017-04-08 00:00:31 UTC) #14
luoe
Ready for another look https://codereview.chromium.org/2644753002/diff/80001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js (right): https://codereview.chromium.org/2644753002/diff/80001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js#newcode78 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js:78: var originalLinkText = Components.Linkifier.originalLinkText(node.parentElement); On ...
3 years, 8 months ago (2017-04-10 21:43:12 UTC) #15
lushnikov
https://codereview.chromium.org/2644753002/diff/100001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js File third_party/WebKit/Source/devtools/front_end/components/Linkifier.js (right): https://codereview.chromium.org/2644753002/diff/100001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js#newcode424 third_party/WebKit/Source/devtools/front_end/components/Linkifier.js:424: static originalLinkText(nodes) { let's pass a link here https://codereview.chromium.org/2644753002/diff/100001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js#newcode438 ...
3 years, 8 months ago (2017-04-11 22:59:34 UTC) #16
luoe
In order to account for selections over truncated links with nested elements inside them (e.g. ...
3 years, 8 months ago (2017-04-12 22:00:37 UTC) #17
lushnikov
as per offline discussion, we came up with the following solution: - instead of simply ...
3 years, 8 months ago (2017-04-14 21:23:03 UTC) #18
luoe
It appears that the range highlighter will interfere when we make an empty text node ...
3 years, 8 months ago (2017-04-15 02:29:16 UTC) #19
lushnikov
https://codereview.chromium.org/2644753002/diff/200001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js File third_party/WebKit/Source/devtools/front_end/components/Linkifier.js (right): https://codereview.chromium.org/2644753002/diff/200001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js#newcode424 third_party/WebKit/Source/devtools/front_end/components/Linkifier.js:424: if (trimHashes) { I don't quite follow what's going ...
3 years, 8 months ago (2017-04-17 17:57:40 UTC) #20
luoe
Comments addressed https://codereview.chromium.org/2644753002/diff/200001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js File third_party/WebKit/Source/devtools/front_end/components/Linkifier.js (right): https://codereview.chromium.org/2644753002/diff/200001/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js#newcode424 third_party/WebKit/Source/devtools/front_end/components/Linkifier.js:424: if (trimHashes) { On 2017/04/17 17:57:40, lushnikov ...
3 years, 8 months ago (2017-04-17 22:15:07 UTC) #21
luoe
The latest patch set should hopefully make _setTrimmedText() be easier to read. Please take another ...
3 years, 8 months ago (2017-04-20 22:47:56 UTC) #22
lushnikov
overall looks good, but we need to fix the _setTrimmedText function. I just recalled that ...
3 years, 8 months ago (2017-04-22 01:11:48 UTC) #23
luoe
Finding out about splitByRegexes: https://media.giphy.com/media/26ufdipQqU2lhNA4g/giphy.gif The general purpose regex splitter makes it cleaner now. Thanks ...
3 years, 8 months ago (2017-04-22 05:43:16 UTC) #24
luoe
Added a test case to simulate when a text selection ends on an empty element ...
3 years, 7 months ago (2017-04-29 03:33:46 UTC) #26
lushnikov
lgtm https://codereview.chromium.org/2644753002/diff/300001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js (right): https://codereview.chromium.org/2644753002/diff/300001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js#newcode463 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js:463: if (container.textContent.length === 0 && container.nodeType !== Node.TEXT_NODE) ...
3 years, 7 months ago (2017-05-01 22:52:27 UTC) #27
luoe
Thanks for the reviews https://codereview.chromium.org/2644753002/diff/300001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js (right): https://codereview.chromium.org/2644753002/diff/300001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js#newcode463 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js:463: if (container.textContent.length === 0 && ...
3 years, 7 months ago (2017-05-01 23:03:50 UTC) #28
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/2644753002/320001
3 years, 7 months ago (2017-05-02 00:42:26 UTC) #35
commit-bot: I haz the power
3 years, 7 months ago (2017-05-02 00:49:03 UTC) #38
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/9bee9f62d8507206938b746e3987...

Powered by Google App Engine
This is Rietveld 408576698