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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2693813002: Selection API: Some functions should throw InvalidNodeTypeError and IndexSizeError. (Closed)
Patch Set: adjust 2 more tests Created 3 years, 10 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 | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('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 * 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 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 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 this._prompt.on(UI.TextPrompt.TextChangedEvent, this._applyFreeFlowStyleTe xtEdit.bind(this)); 2362 this._prompt.on(UI.TextPrompt.TextChangedEvent, this._applyFreeFlowStyleTe xtEdit.bind(this));
2363 2363
2364 var proxyElement = this._prompt.attachAndStartEditing(selectElement, blurLis tener.bind(this, context)); 2364 var proxyElement = this._prompt.attachAndStartEditing(selectElement, blurLis tener.bind(this, context));
2365 this._navigateToSource(selectElement, true); 2365 this._navigateToSource(selectElement, true);
2366 2366
2367 proxyElement.addEventListener('keydown', this._editingNameValueKeyDown.bind( this, context), false); 2367 proxyElement.addEventListener('keydown', this._editingNameValueKeyDown.bind( this, context), false);
2368 proxyElement.addEventListener('keypress', this._editingNameValueKeyPress.bin d(this, context), false); 2368 proxyElement.addEventListener('keypress', this._editingNameValueKeyPress.bin d(this, context), false);
2369 if (isEditingName) 2369 if (isEditingName)
2370 proxyElement.addEventListener('paste', pasteHandler.bind(this, context), f alse); 2370 proxyElement.addEventListener('paste', pasteHandler.bind(this, context), f alse);
2371 2371
2372 selectElement.getComponentSelection().setBaseAndExtent(selectElement, 0, sel ectElement, 1); 2372 selectElement.getComponentSelection().setBaseAndExtent(
2373 selectElement, 0, selectElement, selectElement.firstChild ? 1 : 0);
2373 } 2374 }
2374 2375
2375 /** 2376 /**
2376 * @param {!Elements.StylePropertyTreeElement.Context} context 2377 * @param {!Elements.StylePropertyTreeElement.Context} context
2377 * @param {!Event} event 2378 * @param {!Event} event
2378 */ 2379 */
2379 _editingNameValueKeyDown(context, event) { 2380 _editingNameValueKeyDown(context, event) {
2380 if (event.handled) 2381 if (event.handled)
2381 return; 2382 return;
2382 2383
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 } 3081 }
3081 3082
3082 /** 3083 /**
3083 * @override 3084 * @override
3084 * @return {!UI.ToolbarItem} 3085 * @return {!UI.ToolbarItem}
3085 */ 3086 */
3086 item() { 3087 item() {
3087 return this._button; 3088 return this._button;
3088 } 3089 }
3089 }; 3090 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698