Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: inspector/front-end/DOMAgent.js

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « inspector/front-end/ConsoleView.js ('k') | inspector/front-end/Database.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 WebInspector.DOMNode = function(doc, payload) { 32 WebInspector.DOMNode = function(doc, payload) {
33 this.ownerDocument = doc; 33 this.ownerDocument = doc;
34 34
35 this.id = payload.id; 35 this.id = payload.id;
36 // injectedScriptId is a node is for DOM nodes which should be converted
37 // to corresponding InjectedScript by the inspector backend. We indicate
38 // this by making injectedScriptId negative.
39 this.injectedScriptId = -payload.id;
36 this.nodeType = payload.nodeType; 40 this.nodeType = payload.nodeType;
37 this.nodeName = payload.nodeName; 41 this.nodeName = payload.nodeName;
38 this.localName = payload.localName; 42 this.localName = payload.localName;
39 this._nodeValue = payload.nodeValue; 43 this._nodeValue = payload.nodeValue;
40 this.textContent = this.nodeValue; 44 this.textContent = this.nodeValue;
41 45
42 this.attributes = []; 46 this.attributes = [];
43 this._attributesMap = {}; 47 this._attributesMap = {};
44 if (payload.attributes) 48 if (payload.attributes)
45 this._setAttributesPayload(payload.attributes); 49 this._setAttributesPayload(payload.attributes);
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (!node) 510 if (!node)
507 return; 511 return;
508 512
509 var callId = WebInspector.Callback.wrap(callback); 513 var callId = WebInspector.Callback.wrap(callback);
510 InspectorBackend.getEventListenersForNode(callId, node.id); 514 InspectorBackend.getEventListenersForNode(callId, node.id);
511 } 515 }
512 516
513 WebInspector.CSSStyleDeclaration = function(payload) 517 WebInspector.CSSStyleDeclaration = function(payload)
514 { 518 {
515 this.id = payload.id; 519 this.id = payload.id;
520 this.injectedScriptId = payload.injectedScriptId;
516 this.width = payload.width; 521 this.width = payload.width;
517 this.height = payload.height; 522 this.height = payload.height;
518 this.__disabledProperties = payload.__disabledProperties; 523 this.__disabledProperties = payload.__disabledProperties;
519 this.__disabledPropertyValues = payload.__disabledPropertyValues; 524 this.__disabledPropertyValues = payload.__disabledPropertyValues;
520 this.__disabledPropertyPriorities = payload.__disabledPropertyPriorities; 525 this.__disabledPropertyPriorities = payload.__disabledPropertyPriorities;
521 this.uniqueStyleProperties = payload.uniqueStyleProperties; 526 this.uniqueStyleProperties = payload.uniqueStyleProperties;
522 this._shorthandValues = payload.shorthandValues; 527 this._shorthandValues = payload.shorthandValues;
523 this._propertyMap = {}; 528 this._propertyMap = {};
524 this._longhandProperties = {}; 529 this._longhandProperties = {};
525 this.length = payload.properties.length; 530 this.length = payload.properties.length;
(...skipping 22 matching lines...) Expand all
548 553
549 WebInspector.CSSStyleDeclaration.parseStyle = function(payload) 554 WebInspector.CSSStyleDeclaration.parseStyle = function(payload)
550 { 555 {
551 return new WebInspector.CSSStyleDeclaration(payload); 556 return new WebInspector.CSSStyleDeclaration(payload);
552 } 557 }
553 558
554 WebInspector.CSSStyleDeclaration.parseRule = function(payload) 559 WebInspector.CSSStyleDeclaration.parseRule = function(payload)
555 { 560 {
556 var rule = {}; 561 var rule = {};
557 rule.id = payload.id; 562 rule.id = payload.id;
563 rule.injectedScriptId = payload.injectedScriptId;
558 rule.selectorText = payload.selectorText; 564 rule.selectorText = payload.selectorText;
559 rule.style = new WebInspector.CSSStyleDeclaration(payload.style); 565 rule.style = new WebInspector.CSSStyleDeclaration(payload.style);
560 rule.style.parentRule = rule; 566 rule.style.parentRule = rule;
561 rule.isUserAgent = payload.isUserAgent; 567 rule.isUserAgent = payload.isUserAgent;
562 rule.isUser = payload.isUser; 568 rule.isUser = payload.isUser;
563 rule.isViaInspector = payload.isViaInspector; 569 rule.isViaInspector = payload.isViaInspector;
564 if (payload.parentStyleSheet) 570 if (payload.parentStyleSheet)
565 rule.parentStyleSheet = { href: payload.parentStyleSheet.href }; 571 rule.parentStyleSheet = { href: payload.parentStyleSheet.href };
566 572
567 return rule; 573 return rule;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 this.domAgent._childNodeRemoved.apply(this.domAgent, arguments); 685 this.domAgent._childNodeRemoved.apply(this.domAgent, arguments);
680 } 686 }
681 687
682 WebInspector.didGetCookies = WebInspector.Callback.processCallback; 688 WebInspector.didGetCookies = WebInspector.Callback.processCallback;
683 WebInspector.didGetChildNodes = WebInspector.Callback.processCallback; 689 WebInspector.didGetChildNodes = WebInspector.Callback.processCallback;
684 WebInspector.didPerformSearch = WebInspector.Callback.processCallback; 690 WebInspector.didPerformSearch = WebInspector.Callback.processCallback;
685 WebInspector.didApplyDomChange = WebInspector.Callback.processCallback; 691 WebInspector.didApplyDomChange = WebInspector.Callback.processCallback;
686 WebInspector.didRemoveAttribute = WebInspector.Callback.processCallback; 692 WebInspector.didRemoveAttribute = WebInspector.Callback.processCallback;
687 WebInspector.didSetTextNodeValue = WebInspector.Callback.processCallback; 693 WebInspector.didSetTextNodeValue = WebInspector.Callback.processCallback;
688 WebInspector.didGetEventListenersForNode = WebInspector.Callback.processCallback ; 694 WebInspector.didGetEventListenersForNode = WebInspector.Callback.processCallback ;
OLDNEW
« no previous file with comments | « inspector/front-end/ConsoleView.js ('k') | inspector/front-end/Database.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698