[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

apavlov at chromium.org apavlov at chromium.org
Wed Dec 22 17:47:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c4c2617eb300cfdc42aba760f6872b60d581832e
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 30 16:47:06 2010 +0000

    2010-11-30  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r72914.
            http://trac.webkit.org/changeset/72914
            https://bugs.webkit.org/show_bug.cgi?id=50241
    
            "pfeldman has a revision management patch both for CSS and JS"
            (Requested by apavlov on #webkit).
    
            * English.lproj/localizedStrings.js:
            * inspector/InspectorStyleSheet.cpp:
            (WebCore::InspectorStyleSheet::reparseStyleSheet):
            * inspector/front-end/CSSStyleModel.js:
            (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
            (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
            (WebInspector.CSSStyleSheet.prototype.getText):
            (WebInspector.CSSStyleSheet.prototype.setText):
            * inspector/front-end/ResourcesPanel.js:
            (WebInspector.ResourceRevisionTreeElement.prototype.onattach):
            (WebInspector.ResourceRevisionTreeElement.prototype._ondragstart):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7a9e75b..f31f511 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-30  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r72914.
+        http://trac.webkit.org/changeset/72914
+        https://bugs.webkit.org/show_bug.cgi?id=50241
+
+        "pfeldman has a revision management patch both for CSS and JS"
+        (Requested by apavlov on #webkit).
+
+        * English.lproj/localizedStrings.js:
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::InspectorStyleSheet::reparseStyleSheet):
+        * inspector/front-end/CSSStyleModel.js:
+        (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
+        (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
+        (WebInspector.CSSStyleSheet.prototype.getText):
+        (WebInspector.CSSStyleSheet.prototype.setText):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.ResourceRevisionTreeElement.prototype.onattach):
+        (WebInspector.ResourceRevisionTreeElement.prototype._ondragstart):
+
 2010-11-25  Satish Sampath  <satish at chromium.org>
 
         Reviewed by Kent Tamura.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index f1644cd..5ffe861 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/inspector/InspectorStyleSheet.cpp b/WebCore/inspector/InspectorStyleSheet.cpp
index 5b67a26..ec1bb39 100644
--- a/WebCore/inspector/InspectorStyleSheet.cpp
+++ b/WebCore/inspector/InspectorStyleSheet.cpp
@@ -588,7 +588,6 @@ void InspectorStyleSheet::reparseStyleSheet(const String& text)
     for (unsigned i = 0, size = m_pageStyleSheet->length(); i < size; ++i)
         m_pageStyleSheet->remove(i);
     m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing());
-    m_pageStyleSheet->styleSheetChanged();
     m_inspectorStyles.clear();
 }
 
diff --git a/WebCore/inspector/front-end/CSSStyleModel.js b/WebCore/inspector/front-end/CSSStyleModel.js
index b54c455..baf44c9 100644
--- a/WebCore/inspector/front-end/CSSStyleModel.js
+++ b/WebCore/inspector/front-end/CSSStyleModel.js
@@ -155,11 +155,6 @@ WebInspector.CSSStyleModel.prototype = {
         InspectorBackend.addRule2(nodeId, selector, callback.bind(this, successCallback, failureCallback, selector));
     },
 
-    setStyleSheetText: function(styleSheetId, newText)
-    {
-        InspectorBackend.setStyleSheetText2(styleSheetId, newText, this._styleSheetChanged.bind(this, styleSheetId, true));
-    },
-
     _styleSheetChanged: function(styleSheetId, majorChange)
     {
         if (!majorChange || !styleSheetId)
@@ -168,10 +163,8 @@ WebInspector.CSSStyleModel.prototype = {
         function callback(href, content)
         {
             var resource = WebInspector.resourceManager.resourceForURL(href);
-            if (resource && resource.type === WebInspector.Resource.Type.Stylesheet) {
-                resource.styleSheetId = styleSheetId;
+            if (resource && resource.type === WebInspector.Resource.Type.Stylesheet)
                 resource.content = content;
-            }
         }
         InspectorBackend.getStyleSheetText2(styleSheetId, callback);
     }
@@ -538,5 +531,20 @@ WebInspector.CSSStyleSheet.prototype = {
     getText: function()
     {
         return this._text;
+    },
+
+    setText: function(newText, userCallback)
+    {
+        function callback(styleSheetPayload)
+        {
+            if (!styleSheetPayload)
+                userCallback(null);
+            else {
+                userCallback(new WebInspector.CSSStyleSheet(styleSheetPayload));
+                WebInspector.cssModel._styleSheetChanged(this.id, true);
+            }
+        }
+
+        InspectorBackend.setStyleSheetText2(this.id, newText, callback.bind(this));
     }
 }
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 74273c0..5c5c5d6 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -1094,7 +1094,6 @@ WebInspector.FrameResourceTreeElement.prototype = {
         var revisionResource = new WebInspector.Resource(null, this._resource.url);
         revisionResource.type = this._resource.type;
         revisionResource.loader = this._resource.loader;
-        revisionResource.styleSheetId = this._resource.styleSheetId;
         if (this._resource.finished)
             revisionResource.finished = true;
         else {
@@ -1262,7 +1261,6 @@ WebInspector.ResourceRevisionTreeElement.prototype = {
         WebInspector.BaseStorageTreeElement.prototype.onattach.call(this);
         this.listItemElement.draggable = true;
         this.listItemElement.addEventListener("dragstart", this._ondragstart.bind(this), false);
-        this.listItemElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
     },
 
     onselect: function()
@@ -1276,17 +1274,6 @@ WebInspector.ResourceRevisionTreeElement.prototype = {
         event.dataTransfer.setData("text/plain", this._resource.content);
         event.dataTransfer.effectAllowed = "copy";
         return true;
-    },
-
-    _handleContextMenuEvent: function(event)
-    {
-        if (!this._resource.styleSheetId)
-            return;
-
-        var contextMenu = new WebInspector.ContextMenu();
-        var itemAction = WebInspector.cssModel.setStyleSheetText.bind(WebInspector.cssModel, this._resource.styleSheetId, this._resource.content);
-        contextMenu.appendItem(WebInspector.UIString("Revert to this revision"), itemAction);
-        contextMenu.show(event);
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list