Bug 76548 - Web Inspector: there should be a way to set HTML for given frame.
Summary: Web Inspector: there should be a way to set HTML for given frame.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 09:18 PST by Pavel Feldman
Modified: 2012-01-18 10:59 PST (History)
11 users (show)

See Also:


Attachments
Patch (5.92 KB, patch)
2012-01-18 09:32 PST, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-01-18 09:18:49 PST
Patch to follow.
Comment 1 Pavel Feldman 2012-01-18 09:32:53 PST
Created attachment 122946 [details]
Patch
Comment 2 Yury Semikhatsky 2012-01-18 09:36:54 PST
Comment on attachment 122946 [details]
Patch

Can we have a test for this?
Comment 3 Timothy Hatcher 2012-01-18 09:49:44 PST
Comment on attachment 122946 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122946&action=review

> Source/WebCore/inspector/front-end/DOMAgent.js:-1144
> -            var doc = this._domAgent._documentURLToDocument[resource.url];

Do you still need the _documentURLToDocument map? I feel that map is flawed in the case where multiple frames with the same URL exist. And this patch fixes that issue by using frameId. Who still needs _documentURLToDocument?
Comment 4 Pavel Feldman 2012-01-18 09:54:03 PST
(In reply to comment #3)
> (From update of attachment 122946 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=122946&action=review
> 
> > Source/WebCore/inspector/front-end/DOMAgent.js:-1144
> > -            var doc = this._domAgent._documentURLToDocument[resource.url];
> 
> Do you still need the _documentURLToDocument map? I feel that map is flawed in the case where multiple frames with the same URL exist. And this patch fixes that issue by using frameId. Who still needs _documentURLToDocument?

Good point. Will nuke it prior to landing.
Comment 5 Timothy Hatcher 2012-01-18 09:55:44 PST
Great!
Comment 6 Pavel Feldman 2012-01-18 09:57:01 PST
Committed r105288: <http://trac.webkit.org/changeset/105288>
Comment 8 Pavel Feldman 2012-01-18 10:59:16 PST
(In reply to comment #7)
> Seems like it makes Qt regress again: http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r105288%20(32590)/inspector/elements/set-html-via-resource-pretty-diff.html

Fixed it, sorry about that.