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

Side by Side Diff: Source/WebCore/inspector/front-end/utilities.js

Issue 7147011: Merge 88331 - 2011-06-07 Andrey Kosyakov <caseq@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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 | « Source/WebCore/inspector/front-end/inspector.css ('k') | no next file » | 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return null; 221 return null;
222 } 222 }
223 223
224 Node.prototype.enclosingNodeWithClass = function(className) 224 Node.prototype.enclosingNodeWithClass = function(className)
225 { 225 {
226 if (!this.parentNode) 226 if (!this.parentNode)
227 return null; 227 return null;
228 return this.parentNode.enclosingNodeOrSelfWithClass(className); 228 return this.parentNode.enclosingNodeOrSelfWithClass(className);
229 } 229 }
230 230
231 Node.SHADOW_ROOT_NODE = 14; 231 Element.prototype.query = function(query)
232
233 Element.prototype.query = function(query)
234 { 232 {
235 return this.ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDE RED_NODE_TYPE, null).singleNodeValue; 233 return this.ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDE RED_NODE_TYPE, null).singleNodeValue;
236 } 234 }
237 235
238 Element.prototype.removeChildren = function() 236 Element.prototype.removeChildren = function()
239 { 237 {
240 if (this.firstChild) 238 if (this.firstChild)
241 this.textContent = ""; 239 this.textContent = "";
242 } 240 }
243 241
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 var text = content; 1059 var text = content;
1062 var result = 0; 1060 var result = 0;
1063 var match; 1061 var match;
1064 while (text && (match = regex.exec(text))) { 1062 while (text && (match = regex.exec(text))) {
1065 if (match[0].length > 0) 1063 if (match[0].length > 0)
1066 ++result; 1064 ++result;
1067 text = text.substring(match.index + 1); 1065 text = text.substring(match.index + 1);
1068 } 1066 }
1069 return result; 1067 return result;
1070 } 1068 }
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/front-end/inspector.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698