Changeset 106237 in webkit


Ignore:
Timestamp:
Jan 30, 2012 5:04:28 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: [Styles] Unable to paste and subsequently edit multiple properties in the Styles pane
https://bugs.webkit.org/show_bug.cgi?id=77209

Reviewed by Pavel Feldman.

Source/WebCore:

Check if the property value contains a ";" before kicking the freeflow text update.

  • inspector/front-end/StylesSidebarPane.js:

(WebInspector.StylePropertyTreeElement.prototype):

LayoutTests:

  • inspector/styles/styles-add-blank-property-expected.txt:
  • inspector/styles/styles-add-blank-property.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106226 r106237  
     12012-01-30  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: [Styles] Unable to paste and subsequently edit multiple properties in the Styles pane
     4        https://bugs.webkit.org/show_bug.cgi?id=77209
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/styles/styles-add-blank-property-expected.txt:
     9        * inspector/styles/styles-add-blank-property.html:
     10
    1112012-01-30  Yuzo Fujishima  <yuzo@google.com>
    212
  • trunk/LayoutTests/inspector/styles/styles-add-blank-property-expected.txt

    r99713 r106237  
    2525
    2626
     27After append and change of a 'compound' property:
     28[expanded]
     29element.style  { ()
     30font-size: 12px;
     31margin-left: 3px;
     32color: red;
     33font-weight: bold;
    2734
     35======== Matched CSS Rules ========
     36[expanded]
     37div  { (user agent stylesheet)
     38display: block;
     39
     40
     41
  • trunk/LayoutTests/inspector/styles/styles-add-blank-property.html

    r89804 r106237  
    5656        InspectorTest.addResult("After append:");
    5757        InspectorTest.dumpSelectedElementStyles(true);
     58
     59        treeElement = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1].addNewBlankProperty();
     60        treeElement.startEditing();
     61        treeElement.nameElement.textContent = "color";
     62        treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
     63
     64        treeElement.valueElement.textContent = "green; font-weight: bold";
     65        treeElement.kickFreeFlowStyleEditForTest();
     66
     67        treeElement.valueElement.textContent = "red; font-weight: bold";
     68        treeElement.kickFreeFlowStyleEditForTest();
     69
     70        treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
     71        InspectorTest.runAfterPendingDispatches(step6);
     72    }
     73
     74    function step6()
     75    {
     76        InspectorTest.selectNodeWithId("other");
     77        InspectorTest.runAfterPendingDispatches(step7);
     78    }
     79
     80    function step7()
     81    {
     82        InspectorTest.selectNodeAndWaitForStyles("inspected", step8);
     83    }
     84
     85
     86    function step8()
     87    {
     88        InspectorTest.addResult("After append and change of a 'compound' property:");
     89        InspectorTest.dumpSelectedElementStyles(true);
    5890        InspectorTest.completeTest();
    5991    }
  • trunk/Source/WebCore/ChangeLog

    r106236 r106237  
     12012-01-30  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: [Styles] Unable to paste and subsequently edit multiple properties in the Styles pane
     4        https://bugs.webkit.org/show_bug.cgi?id=77209
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Check if the property value contains a ";" before kicking the freeflow text update.
     9
     10        * inspector/front-end/StylesSidebarPane.js:
     11        (WebInspector.StylePropertyTreeElement.prototype):
     12
    1132012-01-30  Vsevolod Vlasov  <vsevik@chromium.org>
    214
  • trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js

    r105409 r106237  
    19881988        function apply()
    19891989        {
    1990             this.applyStyleText(this.nameElement.textContent + ": " + this.valueElement.textContent, false, false, false);
     1990            var valueText = this.valueElement.textContent;
     1991            if (valueText.indexOf(";") === -1)
     1992                this.applyStyleText(this.nameElement.textContent + ": " + valueText, false, false, false);
    19911993        }
    19921994        if (now)
Note: See TracChangeset for help on using the changeset viewer.