Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in

Issue 2893073002: DevTools: introduce ResourceBinding

Can't Edit
Can't Publish+Mail
Start Review
1 week ago by lushnikov_ooo_june_6
1 week ago
chromium-reviews,,,,,, blink-reviews, pfeldman,
Target Ref:


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/ 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:


Total messages: 6 (4 generated)
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
1 week ago (2017-05-19 23:51:05 UTC) #4
var uiSourceCode = resourceBinding ?
resourceBinding.uiSourceCodeForURL(rawLocation.url) : null;
Bindings.ResourceBinding.uiSourceCodeForURL(this._target, rawLocation.url)
File third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js
Let's do this in _dispose as well.
File third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js
third_party/WebKit/Source/devtools/front_end/bindings/ResourceBinding.js:7: *
restrict it!
this._resourceModel = resourceModel;
static forTarget(target) {
File third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js:32: *
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