Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(2)

Issue 2893073002: DevTools: introduce ResourceBinding

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 week ago by lushnikov_ooo_june_6
Modified:
1 week ago
Reviewers:
dgozman
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: introduce ResourceBinding This patch splits out ResourceBinding from NetworkProject. IMPORTANT: The new ResourceBinding also merges UISourceCodes across frames. ResourceBinding creates UISourceCodes for resources which are not handled by CSS Mappings and JS Mappings, such as images, fonts and html documents. Since there are inline scripts and inline styles, HTML UISourceCodes are needed by both CSSWorkspaceBinding and DebuggerWorkspaceBinding to implement rawLocationToUILocation. This patch addresses the need in the following way: - CSSWorkspaceBinding falls back to ResourceBinding at the last step, after trying both SourceMap mapping (SASSSourceMapping) and CSS mapping (StylesSourceMapping). - DebuggerWorkspaceBinding is structured differently to CSS. The ResourceBinding needs to come into play After the Script Mapping (ResourceScriptMapping) and *before* the VM Script Mapping (DefaultScriptMapping). Since it's really hard to achieve this position using the pushSourceMapping/popSourceMapping system, the patch puts the ResourceBinding inside ResourceScriptMapping. R=dgozman BUG=670180

Patch Set 1 #

Patch Set 2 : cleanup test #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -133 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/bindings-multiple-frames-expected.txt View 3 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/contentscripts-bindings-multiple-frames-expected.txt View 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/sourcemap-bindings-multiple-frames-expected.txt View 3 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/bindings/suspendtarget-bindings-expected.txt View 3 chunks +3 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html View 1 1 chunk +14 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/resource-tree-frame-navigate-iframe-before.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/sources/debugger/pause-in-removed-frame.html View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.html View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js View 3 chunks +8 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/scripts-panel.html View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/scripts-sorting.html View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/inspector/sources/debugger/navigator-view.html View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/BUILD.gn View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/CSSWorkspaceBinding.js View 2 chunks +6 lines, -1 line 1 comment Download
M third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js View 3 chunks +3 lines, -80 lines 1 comment Download
A third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js View 1 chunk +232 lines, -0 lines 3 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js View 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/bindings/module.json View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/main/Main.js View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js View 1 chunk +3 lines, -0 lines 1 comment Download
Commit queue not available (can’t edit this change).

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 6 (4 generated)
lushnikov_ooo_june_6
please, take a look The ResourceBinding suggests the approach which we will use in CSS ...
1 week ago (2017-05-19 19:44:13 UTC) #1
dgozman
1 week ago (2017-05-19 23:51:05 UTC) #4
https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
File
third_party/WebKit/Source/devtools/front_end/bindings/CSSWorkspaceBinding.js
(right):

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/bindings/CSSWorkspaceBinding.js:236:
var uiSourceCode = resourceBinding ?
resourceBinding.uiSourceCodeForURL(rawLocation.url) : null;
Bindings.ResourceBinding.uiSourceCodeForURL(this._target, rawLocation.url)

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js
(right):

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js:397:
this._workspaceProjects.clear();
Let's do this in _dispose as well.

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js
(right):

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js:7: *
@unrestricted
restrict it!

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js:42:
this._resourceModel = resourceModel;
this._resourceTreeModel

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js:63:
static forTarget(target) {
private

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
(right):

https://codereview.chromium.org/2893073002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js:32: *
@unrestricted
Let's do a map to avoid this.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 650457f06