Over time, we accumulated a lot of tricky code in this area.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d7ab52b4dfd0f24647699087d196a822b38d9f03 commit d7ab52b4dfd0f24647699087d196a822b38d9f03 Author: dgozman <dgozman@chromium.org> Date: Thu Nov 17 02:38:35 2016 [DevTools] Make all links have underline decoration. Previously, external links only got underline on hover. Now they appear similary to resource links. Easy example is in remote devices drawer view. The motivation is that we don't know in advance whether the link is external or not (for example, resource may be loaded later) and so we shouldn't display them differently. This will also simplify the handling, as we can now remove the notion of resource vs. external link entirely. BUG= 665661 Review-Url: https://codereview.chromium.org/2504763003 Cr-Commit-Position: refs/heads/master@{#432711} [modify] https://crrev.com/d7ab52b4dfd0f24647699087d196a822b38d9f03/third_party/WebKit/Source/devtools/front_end/ui/inspectorSyntaxHighlight.css
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1545da6cad6e84e6206f4be68ea443792bacb889 commit 1545da6cad6e84e6206f4be68ea443792bacb889 Author: dgozman <dgozman@chromium.org> Date: Fri Nov 18 23:37:08 2016 [DevTools] Handle external link clicks and context menu separately. BUG= 665661 Review-Url: https://codereview.chromium.org/2512013002 Cr-Commit-Position: refs/heads/master@{#433331} [modify] https://crrev.com/1545da6cad6e84e6206f4be68ea443792bacb889/third_party/WebKit/Source/devtools/front_end/components/HandlerRegistry.js [modify] https://crrev.com/1545da6cad6e84e6206f4be68ea443792bacb889/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js [modify] https://crrev.com/1545da6cad6e84e6206f4be68ea443792bacb889/third_party/WebKit/Source/devtools/front_end/main/Main.js [modify] https://crrev.com/1545da6cad6e84e6206f4be68ea443792bacb889/third_party/WebKit/Source/devtools/front_end/main/module.json [modify] https://crrev.com/1545da6cad6e84e6206f4be68ea443792bacb889/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9d93d2db99cd8b188713f7433cbeff15394f8f17 commit 9d93d2db99cd8b188713f7433cbeff15394f8f17 Author: dgozman <dgozman@chromium.org> Date: Sat Nov 19 02:29:22 2016 [DevTools] Remove Components.linkifyRequestAsNode. It is used in one place and doesn't really bring any functionality. BUG= 665661 Review-Url: https://codereview.chromium.org/2515543002 Cr-Commit-Position: refs/heads/master@{#433385} [modify] https://crrev.com/9d93d2db99cd8b188713f7433cbeff15394f8f17/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/9d93d2db99cd8b188713f7433cbeff15394f8f17/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ec36eece79b9b54ea488826cfc175ab985362e10 commit ec36eece79b9b54ea488826cfc175ab985362e10 Author: dgozman <dgozman@chromium.org> Date: Sat Nov 19 04:14:03 2016 [DevTools] Do not use external links for resources anymore. We figure out whether the link is external vs. resource when clicking or showing context menu. BUG= 665661 Review-Url: https://codereview.chromium.org/2512873002 Cr-Commit-Position: refs/heads/master@{#433397} [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-links-expected.txt [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-links.html [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-stack-in-errors-expected.txt [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/audits/AuditFormatters.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js [modify] https://crrev.com/ec36eece79b9b54ea488826cfc175ab985362e10/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/66cf403e747dc5dd959f9ee94852b269c0f3a312 commit 66cf403e747dc5dd959f9ee94852b269c0f3a312 Author: dgozman <dgozman@chromium.org> Date: Sat Nov 19 09:11:28 2016 [DevTools] Move link click and context menu handling to Linkifier. BUG= 665661 Review-Url: https://codereview.chromium.org/2510193003 Cr-Commit-Position: refs/heads/master@{#433416} [modify] https://crrev.com/66cf403e747dc5dd959f9ee94852b269c0f3a312/third_party/WebKit/Source/devtools/front_end/components/HandlerRegistry.js [modify] https://crrev.com/66cf403e747dc5dd959f9ee94852b269c0f3a312/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/66cf403e747dc5dd959f9ee94852b269c0f3a312/third_party/WebKit/Source/devtools/front_end/main/Main.js [modify] https://crrev.com/66cf403e747dc5dd959f9ee94852b269c0f3a312/third_party/WebKit/Source/devtools/front_end/main/module.json [modify] https://crrev.com/66cf403e747dc5dd959f9ee94852b269c0f3a312/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/081f467eccb37a5ded14adbf17881f8780f3bb92 commit 081f467eccb37a5ded14adbf17881f8780f3bb92 Author: dgozman <dgozman@chromium.org> Date: Tue Nov 22 18:41:57 2016 [DevTools] Refactor Linkifier to unify link processing. BUG= 665661 Review-Url: https://codereview.chromium.org/2512353002 Cr-Commit-Position: refs/heads/master@{#433925} [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-on-messages-before-inspection-expected.txt [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-on-messages-before-inspection.html [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/linkifier-expected.txt [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/linkifier.html [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-stack-in-errors-expected.txt [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/LayoutTests/inspector/jump-to-previous-editing-location.html [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/Source/devtools/front_end/sources/FileBasedSearchResultsPane.js [modify] https://crrev.com/081f467eccb37a5ded14adbf17881f8780f3bb92/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d75addb33b2790805d66ef51ff2c615e17b549b commit 5d75addb33b2790805d66ef51ff2c615e17b549b Author: dgozman <dgozman@chromium.org> Date: Wed Nov 23 00:07:20 2016 [DevTools] Remove HandlerRegistry. All meaningful functionality went to Linkifier. BUG= 665661 Review-Url: https://codereview.chromium.org/2516253002 Cr-Commit-Position: refs/heads/master@{#434035} [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/LayoutTests/inspector/extensions/extensions-panel.html [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/LayoutTests/inspector/extensions/extensions-resources.html [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/BUILD.gn [delete] https://crrev.com/7793cc56cff1379a30a7d46f6f2d0684de56dec4/third_party/WebKit/Source/devtools/front_end/components/HandlerRegistry.js [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/front_end/components/module.json [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionServer.js [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/front_end/main/Main.js [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/front_end/main/module.json [modify] https://crrev.com/5d75addb33b2790805d66ef51ff2c615e17b549b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/411a262c8298a3f9acd8db3f9650067a0a984d54 commit 411a262c8298a3f9acd8db3f9650067a0a984d54 Author: dgozman <dgozman@chromium.org> Date: Wed Nov 23 04:16:32 2016 [DevTools] Remove preventFollow and special checks for links throughout frontend. Previously, we handled links using click handler on document, so many places had to be careful to not intercept clicks on links. Now links have their own click handler so we can remove those check. Also, different context menu handlers should have been aware to call appendApplicableItems for target node. Now it's done automatically in ContextMenu constructor, which handles it for everyone. BUG= 665661 Review-Url: https://codereview.chromium.org/2519213002 Cr-Commit-Position: refs/heads/master@{#434113} [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/main/Main.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/ui/ContextMenu.js [modify] https://crrev.com/411a262c8298a3f9acd8db3f9650067a0a984d54/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1c7d33a6563cab463e7b6893a9c18f937acadb4f commit 1c7d33a6563cab463e7b6893a9c18f937acadb4f Author: dgozman <dgozman@chromium.org> Date: Thu Nov 24 17:31:05 2016 [DevTools] Turn links into spans to prevent default behavior. Also replaced two different classes with a single one. BUG= 665661 Review-Url: https://codereview.chromium.org/2527763003 Cr-Commit-Position: refs/heads/master@{#434359} [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-in-errors-with-trace.html [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/http/tests/inspector/elements-test.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/http/tests/inspector/elements/elements-linkify-attributes-expected.txt [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/linkifier.html [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-links-expected.txt [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-links.html [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/console/console-log-linkify-stack-in-errors-expected.txt [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/console/console-proxy-expected.txt [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify-expected.txt [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/elements/styles-4/styles-url-linkify.html [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/extensions/extensions-panel.html [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/LayoutTests/inspector/extensions/extensions-resources.html [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/console/consoleView.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/elements/elementsPanel.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/elements/elementsTreeOutline.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/main/Main.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/network/networkLogView.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/profiler/heapProfiler.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/resources/serviceWorkersView.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/sources/UIList.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/sources/WorkspaceMappingTip.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/sources/fileBasedSearchResultsPane.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/sources/uiList.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/terminal/terminal.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/ui/inspectorSyntaxHighlight.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/ui/inspectorSyntaxHighlightDark.css [modify] https://crrev.com/1c7d33a6563cab463e7b6893a9c18f937acadb4f/third_party/WebKit/Source/devtools/front_end/ui_lazy/dataGrid.css
Comment 1 by bugdroid1@chromium.org
, Nov 17 2016