Changeset 102581 in webkit
- Timestamp:
- Dec 12, 2011 7:24:36 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r102578 r102581 1 2011-12-12 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: [Styles] Modified selector text needs sanitization 4 https://bugs.webkit.org/show_bug.cgi?id=74291 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/styles/commit-selector-expected.txt: 9 * inspector/styles/commit-selector.html: 10 1 11 2011-11-30 Alexander Pavlov <apavlov@chromium.org> 2 12 -
trunk/LayoutTests/inspector/styles/commit-selector-expected.txt
r99713 r102581 17 17 18 18 19 === After selector modification === 19 === After non-affecting selector modification === 20 [expanded] 21 element.style { () 22 color: red; 23 24 ======== Matched CSS Rules ======== 25 [expanded] 26 hr, #inspected { (commit-selector.html:4) 27 /-- overloaded --/ color: green; 28 29 [expanded] 30 div { (user agent stylesheet) 31 display: block; 32 33 34 === After affecting selector modification === 20 35 [expanded] 21 36 element.style { () -
trunk/LayoutTests/inspector/styles/commit-selector.html
r97606 r102581 21 21 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2]; 22 22 section.startEditingSelector(); 23 section._selectorElement.textContent = " #inspectedChanged";23 section._selectorElement.textContent = "hr, #inspected "; 24 24 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); 25 25 InspectorTest.runAfterPendingDispatches(step2); … … 28 28 function step2() 29 29 { 30 InspectorTest.addResult("=== After selector modification ==="); 30 InspectorTest.addResult("=== After non-affecting selector modification ==="); 31 InspectorTest.dumpSelectedElementStyles(true); 32 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2]; 33 section.startEditingSelector(); 34 section._selectorElement.textContent = "#inspectedChanged"; 35 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); 36 InspectorTest.runAfterPendingDispatches(step3); 37 } 38 39 function step3() 40 { 41 InspectorTest.addResult("=== After affecting selector modification ==="); 31 42 InspectorTest.dumpSelectedElementStyles(true); 32 43 InspectorTest.completeTest(); -
trunk/Source/WebCore/ChangeLog
r102580 r102581 1 2011-12-12 Alexander Pavlov <apavlov@chromium.org> 2 3 Web Inspector: [Styles] Modified selector text needs sanitization 4 https://bugs.webkit.org/show_bug.cgi?id=74291 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/front-end/StylesSidebarPane.js: 9 1 10 2011-12-12 Renata Hodovan <reni@webkit.org> 2 11 -
trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js
r101671 r102581 1208 1208 editingSelectorCommitted: function(element, newContent, oldContent, context, moveDirection) 1209 1209 { 1210 if (newContent === oldContent) 1210 if (newContent) 1211 newContent = newContent.trim(); 1212 if (newContent === oldContent) { 1213 // Revert to a trimmed version of the selector if need be. 1214 this._selectorElement.textContent = newContent; 1211 1215 return this._moveEditorFromSelector(moveDirection); 1216 } 1212 1217 1213 1218 function successCallback(newRule, doesAffectSelectedNode)
Note: See TracChangeset
for help on using the changeset viewer.