home *** CD-ROM | disk | FTP | other *** search
/ Computer Active Guide 2009 July / CAG7.ISO / Internetas / SafariSetup.exe / AppleApplicationSupport.msi / WebKit.resources_inspector_DOMAgent.js < prev    next >
Encoding:
Text File  |  2010-06-03  |  21.1 KB  |  683 lines

  1. /*
  2.  * Copyright (C) 2009 Google Inc. All rights reserved.
  3.  * Copyright (C) 2009 Joseph Pecoraro
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions are
  7.  * met:
  8.  *
  9.  *     * Redistributions of source code must retain the above copyright
  10.  * notice, this list of conditions and the following disclaimer.
  11.  *     * Redistributions in binary form must reproduce the above
  12.  * copyright notice, this list of conditions and the following disclaimer
  13.  * in the documentation and/or other materials provided with the
  14.  * distribution.
  15.  *     * Neither the name of Google Inc. nor the names of its
  16.  * contributors may be used to endorse or promote products derived from
  17.  * this software without specific prior written permission.
  18.  *
  19.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  22.  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  23.  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  25.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  26.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  27.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  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.
  30.  */
  31.  
  32. WebInspector.DOMNode = function(doc, payload) {
  33.     this.ownerDocument = doc;
  34.  
  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;
  40.     this.nodeType = payload.nodeType;
  41.     this.nodeName = payload.nodeName;
  42.     this.localName = payload.localName;
  43.     this._nodeValue = payload.nodeValue;
  44.     this.textContent = this.nodeValue;
  45.  
  46.     this.attributes = [];
  47.     this._attributesMap = {};
  48.     if (payload.attributes)
  49.         this._setAttributesPayload(payload.attributes);
  50.  
  51.     this._childNodeCount = payload.childNodeCount;
  52.     this.children = null;
  53.  
  54.     this.nextSibling = null;
  55.     this.prevSibling = null;
  56.     this.firstChild = null;
  57.     this.lastChild = null;
  58.     this.parentNode = null;
  59.  
  60.     if (payload.children)
  61.         this._setChildrenPayload(payload.children);
  62.  
  63.     this._computedStyle = null;
  64.     this.style = null;
  65.     this._matchedCSSRules = [];
  66.  
  67.     if (this.nodeType === Node.ELEMENT_NODE) {
  68.         // HTML and BODY from internal iframes should not overwrite top-level ones.
  69.         if (!this.ownerDocument.documentElement && this.nodeName === "HTML")
  70.             this.ownerDocument.documentElement = this;
  71.         if (!this.ownerDocument.body && this.nodeName === "BODY")
  72.             this.ownerDocument.body = this;
  73.         if (payload.documentURL)
  74.             this.documentURL = payload.documentURL;
  75.     } else if (this.nodeType === Node.DOCUMENT_TYPE_NODE) {
  76.         this.publicId = payload.publicId;
  77.         this.systemId = payload.systemId;
  78.         this.internalSubset = payload.internalSubset;
  79.     } else if (this.nodeType === Node.DOCUMENT_NODE)
  80.         this.documentURL = payload.documentURL;
  81. }
  82.  
  83. WebInspector.DOMNode.prototype = {
  84.     hasAttributes: function()
  85.     {
  86.         return this.attributes.length > 0;
  87.     },
  88.  
  89.     hasChildNodes: function()  {
  90.         return this._childNodeCount > 0;
  91.     },
  92.  
  93.     get nodeValue() {
  94.         return this._nodeValue;
  95.     },
  96.  
  97.     set nodeValue(value) {
  98.         if (this.nodeType != Node.TEXT_NODE)
  99.             return;
  100.         var self = this;
  101.         var callback = function()
  102.         {
  103.             self._nodeValue = value;
  104.             self.textContent = value;
  105.         };
  106.         this.ownerDocument._domAgent.setTextNodeValueAsync(this, value, callback);
  107.     },
  108.  
  109.     getAttribute: function(name)
  110.     {
  111.         var attr = this._attributesMap[name];
  112.         return attr ? attr.value : undefined;
  113.     },
  114.  
  115.     setAttribute: function(name, value)
  116.     {
  117.         var self = this;
  118.         var callback = function()
  119.         {
  120.             var attr = self._attributesMap[name];
  121.             if (attr)
  122.                 attr.value = value;
  123.             else
  124.                 attr = self._addAttribute(name, value);
  125.         };
  126.         this.ownerDocument._domAgent.setAttributeAsync(this, name, value, callback);
  127.     },
  128.  
  129.     removeAttribute: function(name)
  130.     {
  131.         var self = this;
  132.         var callback = function()
  133.         {
  134.             delete self._attributesMap[name];
  135.             for (var i = 0;  i < self.attributes.length; ++i) {
  136.                 if (self.attributes[i].name == name) {
  137.                     self.attributes.splice(i, 1);
  138.                     break;
  139.                 }
  140.             }
  141.         };
  142.         this.ownerDocument._domAgent.removeAttributeAsync(this, name, callback);
  143.     },
  144.  
  145.     _setAttributesPayload: function(attrs)
  146.     {
  147.         this.attributes = [];
  148.         this._attributesMap = {};
  149.         for (var i = 0; i < attrs.length; i += 2)
  150.             this._addAttribute(attrs[i], attrs[i + 1]);
  151.     },
  152.  
  153.     _insertChild: function(prev, payload)
  154.     {
  155.         var node = new WebInspector.DOMNode(this.ownerDocument, payload);
  156.         if (!prev) {
  157.             if (!this.children) {
  158.                 // First node
  159.                 this.children = [ node ];
  160.             } else
  161.                 this.children.unshift(node);
  162.         } else
  163.             this.children.splice(this.children.indexOf(prev) + 1, 0, node);
  164.         this._renumber();
  165.         return node;
  166.     },
  167.  
  168.     removeChild_: function(node)
  169.     {
  170.         this.children.splice(this.children.indexOf(node), 1);
  171.         node.parentNode = null;
  172.         this._renumber();
  173.     },
  174.  
  175.     _setChildrenPayload: function(payloads)
  176.     {
  177.         this.children = [];
  178.         for (var i = 0; i < payloads.length; ++i) {
  179.             var payload = payloads[i];
  180.             var node = new WebInspector.DOMNode(this.ownerDocument, payload);
  181.             this.children.push(node);
  182.         }
  183.         this._renumber();
  184.     },
  185.  
  186.     _renumber: function()
  187.     {
  188.         this._childNodeCount = this.children.length;
  189.         if (this._childNodeCount == 0) {
  190.             this.firstChild = null;
  191.             this.lastChild = null;
  192.             return;
  193.         }
  194.         this.firstChild = this.children[0];
  195.         this.lastChild = this.children[this._childNodeCount - 1];
  196.         for (var i = 0; i < this._childNodeCount; ++i) {
  197.             var child = this.children[i];
  198.             child.index = i;
  199.             child.nextSibling = i + 1 < this._childNodeCount ? this.children[i + 1] : null;
  200.             child.prevSibling = i - 1 >= 0 ? this.children[i - 1] : null;
  201.             child.parentNode = this;
  202.         }
  203.     },
  204.  
  205.     _addAttribute: function(name, value)
  206.     {
  207.         var attr = {
  208.             "name": name,
  209.             "value": value,
  210.             "_node": this
  211.         };
  212.         this._attributesMap[name] = attr;
  213.         this.attributes.push(attr);
  214.     }
  215. }
  216.  
  217. WebInspector.DOMDocument = function(domAgent, defaultView, payload)
  218. {
  219.     WebInspector.DOMNode.call(this, this, payload);
  220.     this._listeners = {};
  221.     this._domAgent = domAgent;
  222.     this.defaultView = defaultView;
  223. }
  224.  
  225. WebInspector.DOMDocument.prototype = {
  226.  
  227.     addEventListener: function(name, callback)
  228.     {
  229.         var listeners = this._listeners[name];
  230.         if (!listeners) {
  231.             listeners = [];
  232.             this._listeners[name] = listeners;
  233.         }
  234.         listeners.push(callback);
  235.     },
  236.  
  237.     removeEventListener: function(name, callback)
  238.     {
  239.         var listeners = this._listeners[name];
  240.         if (!listeners)
  241.             return;
  242.  
  243.         var index = listeners.indexOf(callback);
  244.         if (index != -1)
  245.             listeners.splice(index, 1);
  246.     },
  247.  
  248.     _fireDomEvent: function(name, event)
  249.     {
  250.         var listeners = this._listeners[name];
  251.         if (!listeners)
  252.             return;
  253.  
  254.         for (var i = 0; i < listeners.length; ++i) {
  255.             var listener = listeners[i];
  256.             listener.call(this, event);
  257.         }
  258.     }
  259. }
  260.  
  261. WebInspector.DOMDocument.prototype.__proto__ = WebInspector.DOMNode.prototype;
  262.  
  263.  
  264. WebInspector.DOMWindow = function(domAgent)
  265. {
  266.     this._domAgent = domAgent;
  267. }
  268.  
  269. WebInspector.DOMWindow.prototype = {
  270.     get document()
  271.     {
  272.         return this._domAgent.document;
  273.     },
  274.  
  275.     get Node()
  276.     {
  277.         return WebInspector.DOMNode;
  278.     },
  279.  
  280.     get Element()
  281.     {
  282.         return WebInspector.DOMNode;
  283.     },
  284.  
  285.     Object: function()
  286.     {
  287.     }
  288. }
  289.  
  290. WebInspector.DOMAgent = function() {
  291.     this._window = new WebInspector.DOMWindow(this);
  292.     this._idToDOMNode = null;
  293.     this.document = null;
  294. }
  295.  
  296. WebInspector.DOMAgent.prototype = {
  297.     get domWindow()
  298.     {
  299.         return this._window;
  300.     },
  301.  
  302.     getChildNodesAsync: function(parent, callback)
  303.     {
  304.         var children = parent.children;
  305.         if (children) {
  306.             callback(children);
  307.             return;
  308.         }
  309.         function mycallback() {
  310.             callback(parent.children);
  311.         }
  312.         var callId = WebInspector.Callback.wrap(mycallback);
  313.         InspectorBackend.getChildNodes(callId, parent.id);
  314.     },
  315.  
  316.     setAttributeAsync: function(node, name, value, callback)
  317.     {
  318.         var mycallback = this._didApplyDomChange.bind(this, node, callback);
  319.         InspectorBackend.setAttribute(WebInspector.Callback.wrap(mycallback), node.id, name, value);
  320.     },
  321.  
  322.     removeAttributeAsync: function(node, name, callback)
  323.     {
  324.         var mycallback = this._didApplyDomChange.bind(this, node, callback);
  325.         InspectorBackend.removeAttribute(WebInspector.Callback.wrap(mycallback), node.id, name);
  326.     },
  327.  
  328.     setTextNodeValueAsync: function(node, text, callback)
  329.     {
  330.         var mycallback = this._didApplyDomChange.bind(this, node, callback);
  331.         InspectorBackend.setTextNodeValue(WebInspector.Callback.wrap(mycallback), node.id, text);
  332.     },
  333.  
  334.     _didApplyDomChange: function(node, callback, success)
  335.     {
  336.         if (!success)
  337.             return;
  338.         callback();
  339.         // TODO(pfeldman): Fix this hack.
  340.         var elem = WebInspector.panels.elements.treeOutline.findTreeElement(node);
  341.         if (elem)
  342.             elem.updateTitle();
  343.     },
  344.  
  345.     _attributesUpdated: function(nodeId, attrsArray)
  346.     {
  347.         var node = this._idToDOMNode[nodeId];
  348.         node._setAttributesPayload(attrsArray);
  349.         var event = {target: node};
  350.         this.document._fireDomEvent("DOMAttrModified", event);
  351.     },
  352.  
  353.     nodeForId: function(nodeId) {
  354.         return this._idToDOMNode[nodeId];
  355.     },
  356.  
  357.     _setDocument: function(payload)
  358.     {
  359.         this._idToDOMNode = {};
  360.         if (payload && "id" in payload) {
  361.             this.document = new WebInspector.DOMDocument(this, this._window, payload);
  362.             this._idToDOMNode[payload.id] = this.document;
  363.             this._bindNodes(this.document.children);
  364.         } else
  365.             this.document = null;
  366.         WebInspector.panels.elements.setDocument(this.document);
  367.     },
  368.  
  369.     _setDetachedRoot: function(payload)
  370.     {
  371.         var root = new WebInspector.DOMNode(this.document, payload);
  372.         this._idToDOMNode[payload.id] = root;
  373.     },
  374.  
  375.     _setChildNodes: function(parentId, payloads)
  376.     {
  377.         var parent = this._idToDOMNode[parentId];
  378.         parent._setChildrenPayload(payloads);
  379.         this._bindNodes(parent.children);
  380.     },
  381.  
  382.     _bindNodes: function(children)
  383.     {
  384.         for (var i = 0; i < children.length; ++i) {
  385.             var child = children[i];
  386.             this._idToDOMNode[child.id] = child;
  387.             if (child.children)
  388.                 this._bindNodes(child.children);
  389.         }
  390.     },
  391.  
  392.     _childNodeCountUpdated: function(nodeId, newValue)
  393.     {
  394.         var node = this._idToDOMNode[nodeId];
  395.         node._childNodeCount = newValue;
  396.         var outline = WebInspector.panels.elements.treeOutline;
  397.         var treeElement = outline.findTreeElement(node);
  398.         if (treeElement)
  399.             treeElement.hasChildren = newValue;
  400.     },
  401.  
  402.     _childNodeInserted: function(parentId, prevId, payload)
  403.     {
  404.         var parent = this._idToDOMNode[parentId];
  405.         var prev = this._idToDOMNode[prevId];
  406.         var node = parent._insertChild(prev, payload);
  407.         this._idToDOMNode[node.id] = node;
  408.         var event = { target : node, relatedNode : parent };
  409.         this.document._fireDomEvent("DOMNodeInserted", event);
  410.     },
  411.  
  412.     _childNodeRemoved: function(parentId, nodeId)
  413.     {
  414.         var parent = this._idToDOMNode[parentId];
  415.         var node = this._idToDOMNode[nodeId];
  416.         parent.removeChild_(node);
  417.         var event = { target : node, relatedNode : parent };
  418.         this.document._fireDomEvent("DOMNodeRemoved", event);
  419.         delete this._idToDOMNode[nodeId];
  420.     }
  421. }
  422.  
  423. WebInspector.Cookies = {}
  424.  
  425. WebInspector.Cookies.getCookiesAsync = function(callback)
  426. {
  427.     function mycallback(cookies, cookiesString) {
  428.         if (cookiesString)
  429.             callback(WebInspector.Cookies.buildCookiesFromString(cookiesString), false);
  430.         else
  431.             callback(cookies, true);
  432.     }
  433.     var callId = WebInspector.Callback.wrap(mycallback);
  434.     InspectorBackend.getCookies(callId);
  435. }
  436.  
  437. WebInspector.Cookies.buildCookiesFromString = function(rawCookieString)
  438. {
  439.     var rawCookies = rawCookieString.split(/;\s*/);
  440.     var cookies = [];
  441.  
  442.     if (!(/^\s*$/.test(rawCookieString))) {
  443.         for (var i = 0; i < rawCookies.length; ++i) {
  444.             var cookie = rawCookies[i];
  445.             var delimIndex = cookie.indexOf("=");
  446.             var name = cookie.substring(0, delimIndex);
  447.             var value = cookie.substring(delimIndex + 1);
  448.             var size = name.length + value.length;
  449.             cookies.push({ name: name, value: value, size: size });
  450.         }
  451.     }
  452.  
  453.     return cookies;
  454. }
  455.  
  456. WebInspector.Cookies.cookieMatchesResourceURL = function(cookie, resourceURL)
  457. {
  458.     var match = resourceURL.match(WebInspector.GenericURLRegExp);
  459.     if (!match)
  460.         return false;
  461.     // See WebInspector.URLRegExp for definitions of the group index constants.
  462.     if (!this.cookieDomainMatchesResourceDomain(cookie.domain, match[2]))
  463.         return false;
  464.     var resourcePort = match[3] ? match[3] : undefined;
  465.     var resourcePath = match[4] ? match[4] : '/';
  466.     return (resourcePath.indexOf(cookie.path) === 0
  467.         && (!cookie.port || resourcePort == cookie.port)
  468.         && (!cookie.secure || match[1].toLowerCase() === 'https'));
  469. }
  470.  
  471. WebInspector.Cookies.cookieDomainMatchesResourceDomain = function(cookieDomain, resourceDomain)
  472. {
  473.     if (cookieDomain.charAt(0) !== '.')
  474.         return resourceDomain === cookieDomain;
  475.     return !!resourceDomain.match(new RegExp("^([^\\.]+\\.)?" + cookieDomain.substring(1).escapeForRegExp() + "$"), "i");
  476. }
  477.  
  478. WebInspector.EventListeners = {}
  479.  
  480. WebInspector.EventListeners.getEventListenersForNodeAsync = function(node, callback)
  481. {
  482.     if (!node)
  483.         return;
  484.  
  485.     var callId = WebInspector.Callback.wrap(callback);
  486.     InspectorBackend.getEventListenersForNode(callId, node.id);
  487. }
  488.  
  489. WebInspector.CSSStyleDeclaration = function(payload)
  490. {
  491.     this.id = payload.id;
  492.     this.width = payload.width;
  493.     this.height = payload.height;
  494.     this.__disabledProperties = {};
  495.     this.__disabledPropertyValues = {};
  496.     this.__disabledPropertyPriorities = {};
  497.     if (payload.disabled) {
  498.         for (var i = 0; i < payload.disabled.length; ++i) {
  499.             var property = payload.disabled[i];
  500.             this.__disabledProperties[property.name] = true;
  501.             this.__disabledPropertyValues[property.name] = property.value;
  502.             this.__disabledPropertyPriorities[property.name] = property.priority;
  503.         }
  504.     }
  505.  
  506.     this._shorthandValues = payload.shorthandValues;
  507.     this._propertyMap = {};
  508.     this._longhandProperties = {};
  509.     this.length = payload.properties.length;
  510.  
  511.     for (var i = 0; i < this.length; ++i) {
  512.         var property = payload.properties[i];
  513.         var name = property.name;
  514.         this[i] = name;
  515.         this._propertyMap[name] = property;
  516.  
  517.         // Index longhand properties.
  518.         if (property.shorthand) {
  519.             var longhands = this._longhandProperties[property.shorthand];
  520.             if (!longhands) {
  521.                 longhands = [];
  522.                 this._longhandProperties[property.shorthand] = longhands;
  523.             }
  524.             longhands.push(name);
  525.         }
  526.     }
  527. }
  528.  
  529. WebInspector.CSSStyleDeclaration.parseStyle = function(payload)
  530. {
  531.     return new WebInspector.CSSStyleDeclaration(payload);
  532. }
  533.  
  534. WebInspector.CSSStyleDeclaration.parseRule = function(payload)
  535. {
  536.     var rule = {};
  537.     rule.id = payload.id;
  538.     rule.selectorText = payload.selectorText;
  539.     rule.style = new WebInspector.CSSStyleDeclaration(payload.style);
  540.     rule.style.parentRule = rule;
  541.     rule.isUserAgent = payload.isUserAgent;
  542.     rule.isUser = payload.isUser;
  543.     rule.isViaInspector = payload.isViaInspector;
  544.     rule.sourceLine = payload.sourceLine;
  545.     if (payload.parentStyleSheet)
  546.         rule.parentStyleSheet = { href: payload.parentStyleSheet.href };
  547.  
  548.     return rule;
  549. }
  550.  
  551. WebInspector.CSSStyleDeclaration.prototype = {
  552.     getPropertyValue: function(name)
  553.     {
  554.         var property = this._propertyMap[name];
  555.         return property ? property.value : "";
  556.     },
  557.  
  558.     getPropertyPriority: function(name)
  559.     {
  560.         var property = this._propertyMap[name];
  561.         return property ? property.priority : "";
  562.     },
  563.  
  564.     getPropertyShorthand: function(name)
  565.     {
  566.         var property = this._propertyMap[name];
  567.         return property ? property.shorthand : "";
  568.     },
  569.  
  570.     isPropertyImplicit: function(name)
  571.     {
  572.         var property = this._propertyMap[name];
  573.         return property ? property.implicit : "";
  574.     },
  575.  
  576.     styleTextWithShorthands: function()
  577.     {
  578.         var cssText = "";
  579.         var foundProperties = {};
  580.         for (var i = 0; i < this.length; ++i) {
  581.             var individualProperty = this[i];
  582.             var shorthandProperty = this.getPropertyShorthand(individualProperty);
  583.             var propertyName = (shorthandProperty || individualProperty);
  584.  
  585.             if (propertyName in foundProperties)
  586.                 continue;
  587.  
  588.             if (shorthandProperty) {
  589.                 var value = this.getShorthandValue(shorthandProperty);
  590.                 var priority = this.getShorthandPriority(shorthandProperty);
  591.             } else {
  592.                 var value = this.getPropertyValue(individualProperty);
  593.                 var priority = this.getPropertyPriority(individualProperty);
  594.             }
  595.  
  596.             foundProperties[propertyName] = true;
  597.  
  598.             cssText += propertyName + ": " + value;
  599.             if (priority)
  600.                 cssText += " !" + priority;
  601.             cssText += "; ";
  602.         }
  603.  
  604.         return cssText;
  605.     },
  606.  
  607.     getLonghandProperties: function(name)
  608.     {
  609.         return this._longhandProperties[name] || [];
  610.     },
  611.  
  612.     getShorthandValue: function(shorthandProperty)
  613.     {
  614.         return this._shorthandValues[shorthandProperty];
  615.     },
  616.  
  617.     getShorthandPriority: function(shorthandProperty)
  618.     {
  619.         var priority = this.getPropertyPriority(shorthandProperty);
  620.         if (priority)
  621.             return priority;
  622.  
  623.         var longhands = this._longhandProperties[shorthandProperty];
  624.         return longhands ? this.getPropertyPriority(longhands[0]) : null;
  625.     }
  626. }
  627.  
  628. WebInspector.attributesUpdated = function()
  629. {
  630.     this.domAgent._attributesUpdated.apply(this.domAgent, arguments);
  631. }
  632.  
  633. WebInspector.setDocument = function()
  634. {
  635.     this.domAgent._setDocument.apply(this.domAgent, arguments);
  636. }
  637.  
  638. WebInspector.setDetachedRoot = function()
  639. {
  640.     this.domAgent._setDetachedRoot.apply(this.domAgent, arguments);
  641. }
  642.  
  643. WebInspector.setChildNodes = function()
  644. {
  645.     this.domAgent._setChildNodes.apply(this.domAgent, arguments);
  646. }
  647.  
  648. WebInspector.childNodeCountUpdated = function()
  649. {
  650.     this.domAgent._childNodeCountUpdated.apply(this.domAgent, arguments);
  651. }
  652.  
  653. WebInspector.childNodeInserted = function()
  654. {
  655.     this.domAgent._childNodeInserted.apply(this.domAgent, arguments);
  656. }
  657.  
  658. WebInspector.childNodeRemoved = function()
  659. {
  660.     this.domAgent._childNodeRemoved.apply(this.domAgent, arguments);
  661. }
  662.  
  663. WebInspector.didGetCookies = WebInspector.Callback.processCallback;
  664. WebInspector.didGetChildNodes = WebInspector.Callback.processCallback;
  665. WebInspector.didPerformSearch = WebInspector.Callback.processCallback;
  666. WebInspector.didApplyDomChange = WebInspector.Callback.processCallback;
  667. WebInspector.didRemoveAttribute = WebInspector.Callback.processCallback;
  668. WebInspector.didSetTextNodeValue = WebInspector.Callback.processCallback;
  669. WebInspector.didRemoveNode = WebInspector.Callback.processCallback;
  670. WebInspector.didChangeTagName = WebInspector.Callback.processCallback;
  671. WebInspector.didGetEventListenersForNode = WebInspector.Callback.processCallback;
  672.  
  673. WebInspector.didGetStyles = WebInspector.Callback.processCallback;
  674. WebInspector.didGetAllStyles = WebInspector.Callback.processCallback;
  675. WebInspector.didGetInlineStyle = WebInspector.Callback.processCallback;
  676. WebInspector.didGetComputedStyle = WebInspector.Callback.processCallback;
  677. WebInspector.didApplyStyleText = WebInspector.Callback.processCallback;
  678. WebInspector.didSetStyleText = WebInspector.Callback.processCallback;
  679. WebInspector.didSetStyleProperty = WebInspector.Callback.processCallback;
  680. WebInspector.didToggleStyleEnabled = WebInspector.Callback.processCallback;
  681. WebInspector.didSetRuleSelector = WebInspector.Callback.processCallback;
  682. WebInspector.didAddRule = WebInspector.Callback.processCallback;
  683.