diff options
author | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 20:01:12 +0000 |
---|---|---|
committer | amanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 20:01:12 +0000 |
commit | 80605380f9f65f0c1c4fef6537372f44d94d180a (patch) | |
tree | b97bb287d91e22a61ebd949082845127d1c1e114 /webkit | |
parent | f40fa47a03452d4659e1d47f0408bcdef6764705 (diff) | |
download | chromium_src-80605380f9f65f0c1c4fef6537372f44d94d180a.zip chromium_src-80605380f9f65f0c1c4fef6537372f44d94d180a.tar.gz chromium_src-80605380f9f65f0c1c4fef6537372f44d94d180a.tar.bz2 |
Roll WebKit to 46977, fold in http://codereview.chromium.org/164247
in order to fix interactive UI test failures that result.
BUG=18939
TEST=none
Review URL: http://codereview.chromium.org/165243
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/devtools/js/devtools.html | 1 | ||||
-rw-r--r-- | webkit/glue/devtools/js/devtools.js | 118 | ||||
-rw-r--r-- | webkit/glue/devtools/js/dom_agent.js | 59 | ||||
-rw-r--r-- | webkit/glue/devtools/js/inject.js | 301 | ||||
-rw-r--r-- | webkit/glue/devtools/js/inspector_controller_impl.js | 114 | ||||
-rw-r--r-- | webkit/tools/layout_tests/test_expectations.txt | 8 | ||||
-rw-r--r-- | webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp | 24 | ||||
-rw-r--r-- | webkit/webkit.gyp | 1 |
8 files changed, 153 insertions, 473 deletions
diff --git a/webkit/glue/devtools/js/devtools.html b/webkit/glue/devtools/js/devtools.html index b017767..d859e81 100644 --- a/webkit/glue/devtools/js/devtools.html +++ b/webkit/glue/devtools/js/devtools.html @@ -85,6 +85,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <script type="text/javascript" src="SidebarTreeElement.js"></script> <script type="text/javascript" src="PropertiesSection.js"></script> <script type="text/javascript" src="ObjectPropertiesSection.js"></script> + <script type="text/javascript" src="ObjectProxy.js"></script> <script type="text/javascript" src="BreakpointsSidebarPane.js"></script> <script type="text/javascript" src="CallStackSidebarPane.js"></script> <script type="text/javascript" src="ScopeChainSidebarPane.js"></script> diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js index 8306057..be76df6 100644 --- a/webkit/glue/devtools/js/devtools.js +++ b/webkit/glue/devtools/js/devtools.js @@ -339,100 +339,6 @@ WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult = function() { /** - * @override - */ -WebInspector.PropertiesSidebarPane.prototype.update = function(object) { - var body = this.bodyElement; - body.removeChildren(); - - this.sections = []; - - if (!object) { - return; - } - - - var self = this; - devtools.tools.getDomAgent().getNodePrototypesAsync(object.id_, - function(json) { - // Get array of prototype user-friendly names. - var prototypes = JSON.parse(json); - for (var i = 0; i < prototypes.length; ++i) { - var prototype = {}; - prototype.id_ = object.id_; - prototype.protoDepth_ = i; - var section = new WebInspector.SidebarObjectPropertiesSection( - prototype, - prototypes[i]); - self.sections.push(section); - body.appendChild(section.element); - } - }); -}; - - -/** - * Our implementation of ObjectPropertiesSection for Elements tab. - * @constructor - */ -WebInspector.SidebarObjectPropertiesSection = function(object, title) { - WebInspector.ObjectPropertiesSection.call(this, object, title, - null /* subtitle */, null /* emptyPlaceholder */, - null /* ignoreHasOwnProperty */, null /* extraProperties */, - WebInspector.SidebarObjectPropertyTreeElement /* treeElementConstructor */ - ); -}; -goog.inherits(WebInspector.SidebarObjectPropertiesSection, - WebInspector.ObjectPropertiesSection); - - -/** - * @override - */ -WebInspector.SidebarObjectPropertiesSection.prototype.onpopulate = function() { - var nodeId = this.object.id_; - var protoDepth = this.object.protoDepth_; - var path = []; - devtools.tools.getDomAgent().getNodePropertiesAsync(nodeId, path, protoDepth, - goog.partial(WebInspector.didGetNodePropertiesAsync_, - this.propertiesTreeOutline, - this.treeElementConstructor, - nodeId, - path)); -}; - - -/** - * Our implementation of ObjectPropertyTreeElement for Elements tab. - * @constructor - */ -WebInspector.SidebarObjectPropertyTreeElement = function(parentObject, - propertyName) { - WebInspector.ObjectPropertyTreeElement.call(this, parentObject, - propertyName); -}; -goog.inherits(WebInspector.SidebarObjectPropertyTreeElement, - WebInspector.ObjectPropertyTreeElement); - - -/** - * @override - */ -WebInspector.SidebarObjectPropertyTreeElement.prototype.onpopulate = - function() { - var nodeId = this.parentObject.devtools$$nodeId_; - var path = this.parentObject.devtools$$path_.slice(0); - path.push(this.propertyName); - devtools.tools.getDomAgent().getNodePropertiesAsync(nodeId, path, -1, - goog.partial( - WebInspector.didGetNodePropertiesAsync_, - this, - this.treeOutline.section.treeElementConstructor, - nodeId, path)); -}; - - -/** * This override is necessary for adding script source asynchronously. * @override */ @@ -659,9 +565,8 @@ WebInspector.ScopeChainPropertiesSection.prototype.didResolveChildren_ = * using the debugger agent. * @constructor */ -WebInspector.DebuggedObjectTreeElement = function(parentObject, - propertyName) { - WebInspector.ScopeVariableTreeElement.call(this, parentObject, propertyName); +WebInspector.DebuggedObjectTreeElement = function(property) { + WebInspector.ScopeVariableTreeElement.call(this, property); } WebInspector.DebuggedObjectTreeElement.inherits( WebInspector.ScopeVariableTreeElement); @@ -672,7 +577,7 @@ WebInspector.DebuggedObjectTreeElement.inherits( */ WebInspector.DebuggedObjectTreeElement.prototype.onpopulate = function() { - var obj = this.parentObject[this.propertyName]; + var obj = this.property.childObject; devtools.tools.getDebuggerAgent().resolveChildren(obj, goog.bind(this.didResolveChildren_, this), false /* no intrinsic */ ); }; @@ -708,8 +613,13 @@ WebInspector.DebuggedObjectTreeElement.addResolvedChildren = function( } names.sort(); for (var i = 0; i < names.length; i++) { - treeElementContainer.appendChild( - new treeElementConstructor(object, names[i])); + var property = {}; + property.name = names[i]; + property.childObject = object[property.name]; + property.type = typeof property.childObject; + property.hasChildren = property.type == 'object' && Object.hasProperties(property.childObject); + property.textContent = Object.describe(property.childObject, true); + treeElementContainer.appendChild(new treeElementConstructor(property)); } }; @@ -913,11 +823,9 @@ WebInspector.ConsoleView.prototype._formatobject = function(object, elem) { } }; } else { - var wrapper = {}; - wrapper.id_ = object.___devtools_id; - wrapper.protoDepth_ = -1; - var title = object.___devtools_class_name; - section = new WebInspector.SidebarObjectPropertiesSection(wrapper, title); + section = new WebInspector.ObjectPropertiesSection( + new WebInspector.ObjectProxy(object.___devtools_id), + object.___devtools_class_name); } elem.appendChild(section.element); }; diff --git a/webkit/glue/devtools/js/dom_agent.js b/webkit/glue/devtools/js/dom_agent.js index 27b9d2a..ca08205 100644 --- a/webkit/glue/devtools/js/dom_agent.js +++ b/webkit/glue/devtools/js/dom_agent.js @@ -333,6 +333,7 @@ devtools.DomWindow = function(domAgent) { this.document = new devtools.DomDocument(domAgent, this); }; + /** * Represents DOM Node class. */ @@ -340,6 +341,16 @@ devtools.DomWindow.prototype.__defineGetter__('Node', function() { return devtools.DomNode; }); + +/** + * Represents DOM NodeList class. + * @constructor + */ +devtools.DomWindow.prototype.__defineGetter__('NodeList', function() { + return function() {}; +}); + + /** * Represents DOM Element class. * @constructor @@ -718,54 +729,6 @@ devtools.DomAgent.prototype.getSearchResultNode = function(index) { }; -/** - * Returns all properties of the given node. - * @param {number} nodeId Node to get properties for. - * @param {Array.<string>} path Path to the object. - * @param {number} protoDepth Depth to the exact proto level. - * @param {function(string):undefined} callback Function to call with the - * result. - */ -devtools.DomAgent.prototype.getNodePropertiesAsync = function(nodeId, - path, protoDepth, callback) { - var callbackId = this.utilityFunctionCallbackWrapper_(callback); - RemoteToolsAgent.ExecuteUtilityFunction(callbackId, - 'getProperties', - JSON.stringify([nodeId, path, protoDepth])); -}; - - -/** - * Returns prototype chain for a given node. - * @param {number} nodeId Node to get prototypes for. - * @param {Function} callback. - */ -devtools.DomAgent.prototype.getNodePrototypesAsync = function(nodeId, - callback) { - var callbackId = this.utilityFunctionCallbackWrapper_(callback); - RemoteToolsAgent.ExecuteUtilityFunction(callbackId, - 'getPrototypes', JSON.stringify([nodeId])); -}; - - -/** - * Dumps exception if something went wrong in ExecuteUtilityFunction. - * @param {Function} callback Callback to wrap. - * @return {number} Callback id. - */ -devtools.DomAgent.prototype.utilityFunctionCallbackWrapper_ = - function(callback) { - var mycallback = function(result, exception) { - if (exception && exception.length) { - debugPrint('Exception in ExecuteUtilityFunction:' + exception); - return; - } - callback(result); - }; - return devtools.Callback.wrap(mycallback); -}; - - function firstChildSkippingWhitespace() { return this.firstChild; } diff --git a/webkit/glue/devtools/js/inject.js b/webkit/glue/devtools/js/inject.js index f83f019..0d4e0e3 100644 --- a/webkit/glue/devtools/js/inject.js +++ b/webkit/glue/devtools/js/inject.js @@ -28,139 +28,6 @@ devtools.Injected = function() { /** - * Returns object for given id. This can be either node wrapper for - * integer ids or evaluation results that recide in cached console - * objects cache for arbitrary keys. - * @param {number|string} id Id to get object for. - * @return {Object} resolved object. - */ -devtools.Injected.prototype.getObjectForId_ = function(id) { - if (typeof id == 'number') { - return DevToolsAgentHost.getNodeForId(id); - } - return this.cachedConsoleObjects_[id]; -}; - - -/** - * Returns array of properties for a given node on a given path. - * @param {number} nodeId Id of node to get prorotypes for. - * @param {Array.<string>} path Path to the nested object. - * @param {number} protoDepth Depth of the actual proto to inspect. - * @return {Array.<Object>} Array where each property is represented - * by the four entries [{string} type, {string} name, {Object} value, - * {string} objectClassNameOrFunctionSignature]. - */ -devtools.Injected.prototype.getProperties = - function(nodeId, path, protoDepth) { - var result = []; - var obj = this.getObjectForId_(nodeId); - if (!obj) { - return []; - } - - // Follow the path. - for (var i = 0; obj && i < path.length; ++i) { - obj = obj[path[i]]; - } - - if (!obj) { - return []; - } - - // Get to the necessary proto layer. - for (var i = 0; obj && i < protoDepth; ++i) { - obj = obj.__proto__; - } - - if (!obj) { - return []; - } - - // Go over properties, prepare results. - for (var name in obj) { - if (protoDepth != -1 && 'hasOwnProperty' in obj && - !obj.hasOwnProperty(name)) { - continue; - } - if (obj['__lookupGetter__'] && obj.__lookupGetter__(name)) { - continue; - } - - var value; - var type; - try { - value = obj[name]; - type = typeof value; - } catch (e) { - value = 'Exception: ' + e.toString(); - type = 'string'; - } - result.push(type); - result.push(name); - if (type == 'string') { - var str = value; - result.push(str.length > 99 ? str.substr(0, 99) + '...' : str); - result.push(undefined); - } else if (type == 'function') { - result.push(undefined); - var str = Function.prototype.toString.call(value); - // Cut function signature (everything before first ')'). - var signatureLength = str.search(/\)/); - str = str.substr(0, signatureLength + 1); - // Collapse each group of consecutive whitespaces into one whitespaces - // and add body brackets. - str = str.replace(/\s+/g, ' ') + ' {}'; - result.push(str); - } else if (type == 'object') { - result.push(undefined); - result.push(this.getClassName_(value)); - } else { - result.push(value); - result.push(undefined); - } - } - return result; -}; - - -/** - * Returns array of prototypes for a given node. - * @param {number} nodeId Id of node to get prorotypes for. - * @return {Array<string>} Array of proto names. - */ -devtools.Injected.prototype.getPrototypes = function(nodeId) { - var node = DevToolsAgentHost.getNodeForId(nodeId); - if (!node) { - return []; - } - - var result = []; - for (var prototype = node; prototype; prototype = prototype.__proto__) { - result.push(this.getClassName_(prototype)); - } - return result; -}; - - -/** - * @param {Object|Function|null} value An object whose class name to return. - * @return {string} The value class name. - */ -devtools.Injected.prototype.getClassName_ = function(value) { - return (value == null) ? 'null' : value.constructor.name; -}; - - -/** - * Taken from utilities.js as is for injected evaluation. - */ -devtools.Injected.prototype.trimWhitespace_ = function(str) { - return str.replace(/^[\s\xA0]+|[\s\xA0]+$/g, ''); -}; - - -/** * Caches console object for subsequent calls to getConsoleObjectProperties. * @param {Object} obj Object to cache. * @return {Object} console object wrapper. @@ -171,7 +38,7 @@ devtools.Injected.prototype.wrapConsoleObject = function(obj) { var objId = '#consoleobj#' + this.lastCachedConsoleObjectId_++; this.cachedConsoleObjects_[objId] = obj; var result = { ___devtools_id : objId }; - result.___devtools_class_name = this.getClassName_(obj); + result.___devtools_class_name = Object.describe(obj, true); // Loop below fills dummy object with properties for completion. for (var name in obj) { result[name] = ''; @@ -231,115 +98,79 @@ InjectedScript._nodeForId = function(nodeId) { }; -// Following methods are here temporarily, until they are refactored into -// InjectedScript.js in WebKit. -function getStyleTextWithShorthands(style) -{ - var cssText = ""; - var foundProperties = {}; - for (var i = 0; i < style.length; ++i) { - var individualProperty = style[i]; - var shorthandProperty = style.getPropertyShorthand(individualProperty); - var propertyName = (shorthandProperty || individualProperty); - - if (propertyName in foundProperties) - continue; - - if (shorthandProperty) { - var value = getShorthandValue(style, shorthandProperty); - var priority = getShorthandPriority(style, shorthandProperty); - } else { - var value = style.getPropertyValue(individualProperty); - var priority = style.getPropertyPriority(individualProperty); - } - - foundProperties[propertyName] = true; - - cssText += propertyName + ": " + value; - if (priority) - cssText += " !" + priority; - cssText += "; "; - } - - return cssText; -} - - -function getShorthandValue(style, shorthandProperty) -{ - var value = style.getPropertyValue(shorthandProperty); - if (!value) { - // Some shorthands (like border) return a null value, so compute a shorthand value. - // FIXME: remove this when http://bugs.webkit.org/show_bug.cgi?id=15823 is fixed. - - var foundProperties = {}; - for (var i = 0; i < style.length; ++i) { - var individualProperty = style[i]; - if (individualProperty in foundProperties || style.getPropertyShorthand(individualProperty) !== shorthandProperty) - continue; - - var individualValue = style.getPropertyValue(individualProperty); - if (style.isPropertyImplicit(individualProperty) || individualValue === "initial") - continue; - - foundProperties[individualProperty] = true; - - if (!value) - value = ""; - else if (value.length) - value += " "; - value += individualValue; - } - } - return value; -} +InjectedScript._objectForId = function(id) { + if (typeof id == 'number') { + return DevToolsAgentHost.getNodeForId(id); + } + return devtools$$obj.cachedConsoleObjects_[id]; +}; -function getShorthandPriority(style, shorthandProperty) +Object.type = function(obj, win) { - var priority = style.getPropertyPriority(shorthandProperty); - if (!priority) { - for (var i = 0; i < style.length; ++i) { - var individualProperty = style[i]; - if (style.getPropertyShorthand(individualProperty) !== shorthandProperty) - continue; - priority = style.getPropertyPriority(individualProperty); - break; - } - } - return priority; + if (obj === null) + return "null"; + + var type = typeof obj; + if (type !== "object" && type !== "function") + return type; + + win = win || window; + + if (obj instanceof win.Node) + return (obj.nodeType === undefined ? type : "node"); + if (obj instanceof win.String) + return "string"; + if (obj instanceof win.Array) + return "array"; + if (obj instanceof win.Boolean) + return "boolean"; + if (obj instanceof win.Number) + return "number"; + if (obj instanceof win.Date) + return "date"; + if (obj instanceof win.RegExp) + return "regexp"; + if (obj instanceof win.Error) + return "error"; + return type; } - -function getLonghandProperties(style, shorthandProperty) +// Temporarily moved into the injected context. +Object.hasProperties = function(obj) { - var properties = []; - var foundProperties = {}; - - for (var i = 0; i < style.length; ++i) { - var individualProperty = style[i]; - if (individualProperty in foundProperties || style.getPropertyShorthand(individualProperty) !== shorthandProperty) - continue; - foundProperties[individualProperty] = true; - properties.push(individualProperty); - } - - return properties; + if (typeof obj === "undefined" || typeof obj === "null") + return false; + for (var name in obj) + return true; + return false; } - -function getUniqueStyleProperties(style) +Object.describe = function(obj, abbreviated) { - var properties = []; - var foundProperties = {}; - - for (var i = 0; i < style.length; ++i) { - var property = style[i]; - if (property in foundProperties) - continue; - foundProperties[property] = true; - properties.push(property); + var type1 = Object.type(obj); + var type2 = (obj == null) ? "null" : obj.constructor.name; + + switch (type1) { + case "object": + case "node": + return type2; + case "array": + return "[" + obj.toString() + "]"; + case "string": + if (obj.length > 100) + return "\"" + obj.substring(0, 100) + "\u2026\""; + return "\"" + obj + "\""; + case "function": + var objectText = String(obj); + if (!/^function /.test(objectText)) + objectText = (type2 == "object") ? type1 : type2; + else if (abbreviated) + objectText = /.*/.exec(obj)[0].replace(/ +$/g, ""); + return objectText; + case "regexp": + return String(obj).replace(/([\\\/])/g, "\\$1").replace(/\\(\/[gim]*)$/, "$1").substring(1); + default: + return String(obj); } - - return properties; } diff --git a/webkit/glue/devtools/js/inspector_controller_impl.js b/webkit/glue/devtools/js/inspector_controller_impl.js index b3f090a..459d9c4 100644 --- a/webkit/glue/devtools/js/inspector_controller_impl.js +++ b/webkit/glue/devtools/js/inspector_controller_impl.js @@ -12,6 +12,19 @@ goog.provide('devtools.InspectorControllerImpl'); devtools.InspectorControllerImpl = function() { devtools.InspectorController.call(this); this.frame_element_id_ = 1; + + this.installInjectedScriptDelegate_('getStyles', true); + this.installInjectedScriptDelegate_('getComputedStyle', true); + this.installInjectedScriptDelegate_('getInlineStyle', true); + this.installInjectedScriptDelegate_('applyStyleText'); + this.installInjectedScriptDelegate_('setStyleText'); + this.installInjectedScriptDelegate_('toggleStyleEnabled'); + this.installInjectedScriptDelegate_('applyStyleRuleText'); + this.installInjectedScriptDelegate_('addStyleSelector'); + this.installInjectedScriptDelegate_('setStyleProperty'); + this.installInjectedScriptDelegate_('getPrototypes', true); + this.installInjectedScriptDelegate_('getProperties', true); + this.installInjectedScriptDelegate_('setPropertyValue', true); }; goog.inherits(devtools.InspectorControllerImpl, devtools.InspectorController); @@ -253,84 +266,39 @@ devtools.InspectorControllerImpl.prototype.storeLastActivePanel = }; -// Temporary methods that will be dispatched via InspectorController into the -// injected context. -devtools.InspectorControllerImpl.prototype.getStyles = - function(node, authorOnly, callback) { - var mycallback = function(result) { - callback(result); - } - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(mycallback), - 'InjectedScript', JSON.stringify(['getStyles', node.id_, authorOnly])); -}; - - -devtools.InspectorControllerImpl.prototype.getComputedStyle = - function(node, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['getComputedStyle', node.id_])); -}; - - -devtools.InspectorControllerImpl.prototype.getInlineStyle = - function(node, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['getInlineStyle', node.id_])); -}; - - -devtools.InspectorControllerImpl.prototype.applyStyleText = - function(styleId, styleText, propertyName, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['applyStyleText', styleId, styleText, - propertyName])); -}; - - -devtools.InspectorControllerImpl.prototype.setStyleText = - function(style, cssText, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['setStyleText', style, cssText])); -}; - - -devtools.InspectorControllerImpl.prototype.toggleStyleEnabled = - function(styleId, propertyName, disabled, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['toggleStyleEnabled', styleId, - propertyName, disabled])); -}; - - -devtools.InspectorControllerImpl.prototype.applyStyleRuleText = - function(ruleId, newContent, selectedNode, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['applyStyleRuleText', ruleId, - newContent, selectedNode])); -}; - - -devtools.InspectorControllerImpl.prototype.addStyleSelector = - function(newContent, callback) { - RemoteToolsAgent.ExecuteUtilityFunction( - devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['addStyleSelector', newContent])); +/** + * Installs delegating handler into the inspector controller. + * @param {number} argsCound Number of the arguments in the delegating call + * excluding callback. + * @param {string} methodName Method to install delegating handler for. + * @parma {boolean} unwrap Replace first argument with its id. + */ +devtools.InspectorControllerImpl.prototype.installInjectedScriptDelegate_ = + function(methodName, unwrap) { + this[methodName] = goog.bind(this.callInjectedScript_, this, unwrap, + methodName); }; -devtools.InspectorControllerImpl.prototype.setStyleProperty = - function(styleId, name, value, callback) { +/** + * Bound function with the installInjectedScriptDelegate_ actual + * implementation. + */ +devtools.InspectorControllerImpl.prototype.callInjectedScript_ = + function(unwrap, methodName, var_arg) { + var allArgs = Array.prototype.slice.call(arguments); + var callback = allArgs[allArgs.length - 1]; + var args = Array.prototype.slice.call(allArgs, 1, allArgs.length - 1); + if (unwrap) { + if (args[1].id_) { + args[1] = args[1].id_; + } else if (args[1].objectId && args[1].objectId.id_) { + args[1].objectId = args[1].objectId.id_; + } + } RemoteToolsAgent.ExecuteUtilityFunction( devtools.InspectorControllerImpl.parseWrap_(callback), - 'InjectedScript', JSON.stringify(['setStyleProperty', styleId, name, - value])); + 'InjectedScript', JSON.stringify(args)); }; diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt index e6c5d9a..8ecebc5 100644 --- a/webkit/tools/layout_tests/test_expectations.txt +++ b/webkit/tools/layout_tests/test_expectations.txt @@ -2846,3 +2846,11 @@ BUG18896 WIN DEBUG : LayoutTests/svg/carto.net/window.svg = FAIL BUG18896 LINUX DEBUG : LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html = FAIL BUG18896 LINUX DEBUG : LayoutTests/svg/dynamic-updates/SVGClipPathElement-svgdom-clipPathUnits-prop.html = FAIL BUG18896 LINUX DEBUG : LayoutTests/svg/css/crash-css-generated-content.xhtml = FAIL + +// Test failures from WebKit merge 46894 to 46977 +BUG18939 LINUX : LayoutTests/editing/selection/5213963.html = FAIL +BUG18939 LINUX MAC : LayoutTests/fast/js/JSON-stringify-replacer.html = FAIL +BUG18939 LINUX MAC : LayoutTests/fast/js/function-declaration.html = FAIL +BUG18939 LINUX MAC : LayoutTests/fast/js/prototypes.html = FAIL +BUG18939 MAC : LayoutTests/editing/execCommand/toggle-compound-styles.html = FAIL +BUG18939 MAC : LayoutTests/fast/dom/offset-parent-positioned-and-inline.html = CRASH PASS diff --git a/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp index c6dca00..d7e05d9 100644 --- a/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp @@ -103,7 +103,7 @@ static std::ostream& operator<<(std::ostream& out, const Color& c) TEST(TransparencyWin, NoLayer) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(17, 16), DeviceRGB)); // KeepTransform { @@ -142,7 +142,7 @@ TEST(TransparencyWin, NoLayer) TEST(TransparencyWin, WhiteLayer) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); // KeepTransform { @@ -194,7 +194,7 @@ TEST(TransparencyWin, WhiteLayer) TEST(TransparencyWin, TextComposite) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); // KeepTransform is the only valid transform mode for TextComposite. { @@ -213,7 +213,7 @@ TEST(TransparencyWin, TextComposite) TEST(TransparencyWin, OpaqueCompositeLayer) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); // KeepTransform { @@ -283,7 +283,7 @@ TEST(TransparencyWin, OpaqueCompositeLayer) TEST(TransparencyWin, WhiteLayerPixelTest) { // Make a total transparent buffer, and draw the white layer inset by 1 px. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); { TransparencyWin helper; @@ -312,7 +312,7 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel) Color green(0xFF00FF00); // Make a red bottom layer, followed by a half green next layer @ 50%. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); FloatRect fullRect(0, 0, 16, 16); src->context()->fillRect(fullRect, red); @@ -365,7 +365,7 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel) TEST(TransparencyWin, TranslateOpaqueCompositeLayer) { // Fill with white. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); Color white(0xFFFFFFFF); FloatRect fullRect(0, 0, 16, 16); src->context()->fillRect(fullRect, white); @@ -402,7 +402,7 @@ TEST(TransparencyWin, TranslateOpaqueCompositeLayer) // tests that the propert transform is applied to the copied layer. TEST(TransparencyWin, RotateOpaqueCompositeLayer) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); // The background is white. Color white(0xFFFFFFFF); @@ -484,7 +484,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer) TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); // The background is white on top with red on bottom. Color white(0xFFFFFFFF); @@ -532,7 +532,7 @@ TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer) TEST(TransparencyWin, Scale) { // Create an opaque white buffer. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); FloatRect fullBuffer(0, 0, 16, 16); src->context()->fillRect(fullBuffer, Color::white); @@ -587,7 +587,7 @@ TEST(TransparencyWin, Scale) TEST(TransparencyWin, ScaleTransparency) { // Create an opaque white buffer. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); FloatRect fullBuffer(0, 0, 16, 16); src->context()->fillRect(fullBuffer, Color::white); @@ -645,7 +645,7 @@ TEST(TransparencyWin, ScaleTransparency) TEST(TransparencyWin, Text) { - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), false)); + OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB)); // Our text should end up 50% transparent blue-green. Color fullResult(0x80008080); diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index c072275..5b92997 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -1557,6 +1557,7 @@ '../third_party/WebKit/WebCore/inspector/front-end/MetricsSidebarPane.js', '../third_party/WebKit/WebCore/inspector/front-end/Object.js', '../third_party/WebKit/WebCore/inspector/front-end/ObjectPropertiesSection.js', + '../third_party/WebKit/WebCore/inspector/front-end/ObjectProxy.js', '../third_party/WebKit/WebCore/inspector/front-end/Panel.js', '../third_party/WebKit/WebCore/inspector/front-end/PanelEnablerView.js', '../third_party/WebKit/WebCore/inspector/front-end/Placard.js', |