Changeset 74185 in webkit
- Timestamp:
- Dec 16, 2010 6:09:28 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r74182 r74185 1 2010-12-16 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Up/Down/PageUp/PageDown on a CSS property numeric value commit the value editor 6 https://bugs.webkit.org/show_bug.cgi?id=51114 7 8 * inspector/styles-add-blank-property-expected.txt: 9 * inspector/styles-add-blank-property.html: 10 1 11 2010-12-16 Yury Semikhatsky <yurys@chromium.org> 2 12 -
trunk/LayoutTests/inspector/styles-add-blank-property-expected.txt
r70880 r74185 14 14 [expanded] element.style { () 15 15 font-size: 12px; 16 text-decoration: none;16 margin-left: 3px; 17 17 18 18 ======== Matched CSS Rules ======== -
trunk/LayoutTests/inspector/styles-add-blank-property.html
r73913 r74185 28 28 } 29 29 30 function frontend_createKeyboardEvent(eventName, keyIdentifier) 31 { 32 var evt = document.createEvent("KeyboardEvent"); 33 evt.initKeyboardEvent(eventName, true /* can bubble */, true /* can cancel */, null /* view */, keyIdentifier, ""); 34 return evt; 35 } 36 30 37 function frontend_dumpInspectedStyle(testController) 31 38 { … … 36 43 section.expand(); 37 44 var treeElement = section.addNewBlankProperty(); 45 var enterKeyDown = frontend_createKeyboardEvent("keydown", "Enter"); 46 var incrementKeyDown = frontend_createKeyboardEvent("keydown", "Up"); 47 48 function removeEmpty() 49 { 50 window.getSelection().anchorNode.dispatchEvent(enterKeyDown); 51 frontend_dumpResults(testController); 52 } 53 54 function commit() 55 { 56 treeElement.valueElement.dispatchEvent(enterKeyDown); 57 testController.runAfterPendingDispatches(removeEmpty.bind(this)); 58 frontend_dumpResults(testController); 59 } 60 61 function incrementAgain() 62 { 63 treeElement.valueElement.dispatchEvent(incrementKeyDown); 64 testController.runAfterPendingDispatches(commit.bind(this)); 65 } 66 38 67 treeElement.startEditing(); 39 40 var evt = document.createEvent("KeyboardEvent"); 41 evt.initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel */, null /* view */, "Enter", ""); 42 treeElement.nameElement.textContent = "text-decoration"; 43 treeElement.valueElement.textContent = "none"; 44 treeElement.nameElement.dispatchEvent(evt); 45 46 testController.runAfterPendingDispatches(frontend_dumpResults.bind(this, testController)); 68 treeElement.nameElement.textContent = "margin-left"; 69 treeElement.nameElement.dispatchEvent(enterKeyDown); 70 treeElement.valueElement.textContent = "1px"; 71 treeElement.valueElement.firstChild.select(); 72 treeElement.valueElement.dispatchEvent(incrementKeyDown); 73 testController.runAfterPendingDispatches(incrementAgain.bind(this)); 47 74 } 48 75 -
trunk/WebCore/ChangeLog
r74184 r74185 1 2010-12-16 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Up/Down/PageUp/PageDown on a CSS property numeric value commit the value editor 6 https://bugs.webkit.org/show_bug.cgi?id=51114 7 8 The r74038 regressed the behaviour. This patch additionally ensures that both Metrics and Styles panes 9 are updated once a stylesheet is reverted. 10 11 * inspector/front-end/ElementsPanel.js: 12 (WebInspector.ElementsPanel.prototype._stylesPaneEdited): 13 (WebInspector.ElementsPanel.prototype._metricsPaneEdited): 14 (WebInspector.ElementsPanel.prototype._styleSheetChanged): 15 1 16 2010-12-16 Yury Semikhatsky <yurys@chromium.org> 2 17 -
trunk/WebCore/inspector/front-end/ElementsPanel.js
r74103 r74185 444 444 }, 445 445 446 _metricsPaneEdited: function() 447 { 446 _stylesPaneEdited: function() 447 { 448 // Once styles are edited, the Metrics pane should be updated. 448 449 this.sidebarPanes.metrics.needsUpdate = true; 449 450 this.updateMetrics(); 450 451 }, 451 452 452 _stylesPaneEdited: function() 453 { 453 _metricsPaneEdited: function() 454 { 455 // Once metrics are edited, the Styles pane should be updated. 454 456 this.sidebarPanes.styles.needsUpdate = true; 455 457 this.updateStyles(true); … … 458 460 _styleSheetChanged: function() 459 461 { 462 this._metricsPaneEdited(); 460 463 this._stylesPaneEdited(); 461 464 },
Note: See TracChangeset
for help on using the changeset viewer.