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

Side by Side Diff: Source/devtools/front_end/common/DOMExtension.js

Issue 317153002: [DevTools] Move user agent override to responsive design toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: mac style Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 { 327 {
328 return this.ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDE RED_NODE_TYPE, null).singleNodeValue; 328 return this.ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDE RED_NODE_TYPE, null).singleNodeValue;
329 } 329 }
330 330
331 Element.prototype.removeChildren = function() 331 Element.prototype.removeChildren = function()
332 { 332 {
333 if (this.firstChild) 333 if (this.firstChild)
334 this.textContent = ""; 334 this.textContent = "";
335 } 335 }
336 336
337 Element.prototype.appendChildren = function(children)
338 {
339 for (var i = 0; i < children.length; ++i)
340 this.appendChild(children[i]);
341 }
342
343 Element.prototype.setChildren = function(children)
344 {
345 this.removeChildren();
346 this.appendChildren(children);
347 }
348
337 Element.prototype.isInsertionCaretInside = function() 349 Element.prototype.isInsertionCaretInside = function()
338 { 350 {
339 var selection = window.getSelection(); 351 var selection = window.getSelection();
340 if (!selection.rangeCount || !selection.isCollapsed) 352 if (!selection.rangeCount || !selection.isCollapsed)
341 return false; 353 return false;
342 var selectionRange = selection.getRangeAt(0); 354 var selectionRange = selection.getRangeAt(0);
343 return selectionRange.startContainer.isSelfOrDescendant(this); 355 return selectionRange.startContainer.isSelfOrDescendant(this);
344 } 356 }
345 357
346 /** 358 /**
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 */ 673 */
662 function isEnterKey(event) { 674 function isEnterKey(event) {
663 // Check if in IME. 675 // Check if in IME.
664 return event.keyCode !== 229 && event.keyIdentifier === "Enter"; 676 return event.keyCode !== 229 && event.keyIdentifier === "Enter";
665 } 677 }
666 678
667 function consumeEvent(e) 679 function consumeEvent(e)
668 { 680 {
669 e.consume(); 681 e.consume();
670 } 682 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ResponsiveDesignView.js ('k') | Source/devtools/front_end/common/Settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698