|Summary:||Web Inspector overrides methods defined by the inspected application|
|Product:||WebKit||Reporter:||Yury Semikhatsky <yurys>|
|Component:||Web Inspector (Deprecated)||Assignee:||Yury Semikhatsky <yurys>|
|Severity:||Normal||CC:||commit-queue, pfeldman, timothy|
|Version:||528+ (Nightly build)|
Description Yury Semikhatsky 2010-01-25 08:34:47 PST
Web Inspector shouldn't override methods defined by the inspected application. Currently Web Inspector provides its own implementation for Object.type Object.hasProperties Object.describe Object.className String.prototype.escapeCharacters
Comment 1 Timothy Hatcher 2010-01-25 08:36:44 PST
Just to be clear, we shoulnt use the page's version if it exists. We need to namespace our own.
Comment 3 Timothy Hatcher 2010-01-25 08:47:08 PST
Comment on attachment 47349 [details] patch All the new "InjectedScript." calls should be "this.".
Comment 4 Pavel Feldman 2010-01-25 08:59:55 PST
Comment on attachment 47349 [details] patch Please remove // throw ... comment. Also, do not dump dom tree here - your test should be local to the problem. Wrt InjectedScript. vs this., I am not sure. I'd do that when we migrate to the prototype-based implementation of InjectedScript's functions.
Comment 5 Yury Semikhatsky 2010-01-25 10:34:49 PST
Created attachment 47356 [details] patch - Removed commented code. - Removed DOM tree dump. - I'd rather keep the new calls to InjectedScript methods with InjectedScript. prefix because they are "static" routines, i.e. they don't depend on the state of "this". Also if we want to use "this" in InjectedScript methods I'd convert it into prototype based implementation to be consistent with the rest if the code.
Comment 6 WebKit Commit Bot 2010-01-25 10:57:46 PST
Comment on attachment 47356 [details] patch Clearing flags on attachment: 47356 Committed r53807: <http://trac.webkit.org/changeset/53807>
Comment 7 WebKit Commit Bot 2010-01-25 10:57:51 PST
All reviewed patches have been landed. Closing bug.