Changeset 74038 in webkit


Ignore:
Timestamp:
Dec 14, 2010 10:06:03 AM (13 years ago)
Author:
apavlov@chromium.org
Message:

2010-12-14 Alexander Pavlov <apavlov@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: Rule data not updated in Styles pane after stylesheet gets reverted
https://bugs.webkit.org/show_bug.cgi?id=51034

  • inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._onRevert):
  • inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._metricsPaneEdited): (WebInspector.ElementsPanel.prototype._stylesPaneEdited): (WebInspector.ElementsPanel.prototype._styleSheetChanged):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74035 r74038  
     12010-12-14  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: Rule data not updated in Styles pane after stylesheet gets reverted
     6        https://bugs.webkit.org/show_bug.cgi?id=51034
     7
     8        * inspector/front-end/CSSStyleModel.js:
     9        (WebInspector.CSSStyleModel.prototype._onRevert):
     10        * inspector/front-end/ElementsPanel.js:
     11        (WebInspector.ElementsPanel):
     12        (WebInspector.ElementsPanel.prototype._metricsPaneEdited):
     13        (WebInspector.ElementsPanel.prototype._stylesPaneEdited):
     14        (WebInspector.ElementsPanel.prototype._styleSheetChanged):
     15
    1162010-12-14  Andreas Kling  <andreas.kling@nokia.com>
    217
  • trunk/WebCore/inspector/front-end/CSSStyleModel.js

    r72938 r74038  
    175175        {
    176176            this._styleSheetChanged(styleSheetId, true);
     177            this.dispatchEventToListeners("stylesheet changed");
    177178        }
    178179        InspectorBackend.setStyleSheetText2(styleSheetId, contentToRevertTo, callback.bind(this));
    179180    }
    180181}
     182
     183WebInspector.CSSStyleModel.prototype.__proto__ = WebInspector.Object.prototype;
    181184
    182185WebInspector.CSSStyleDeclaration = function(payload)
  • trunk/WebCore/inspector/front-end/ElementsPanel.js

    r72733 r74038  
    8989    this.sidebarPanes.styles.addEventListener("style property toggled", this._stylesPaneEdited, this);
    9090    this.sidebarPanes.metrics.addEventListener("metrics edited", this._metricsPaneEdited, this);
     91    WebInspector.cssModel.addEventListener("stylesheet changed", this._styleSheetChanged, this);
    9192
    9293    this.sidebarElement = document.createElement("div");
     
    446447    },
    447448
    448     _stylesPaneEdited: function()
     449    _metricsPaneEdited: function()
    449450    {
    450451        this.sidebarPanes.metrics.needsUpdate = true;
     
    452453    },
    453454
    454     _metricsPaneEdited: function()
     455    _stylesPaneEdited: function()
    455456    {
    456457        this.sidebarPanes.styles.needsUpdate = true;
    457458        this.updateStyles(true);
     459    },
     460
     461    _styleSheetChanged: function()
     462    {
     463        this._stylesPaneEdited();
    458464    },
    459465
Note: See TracChangeset for help on using the changeset viewer.