Remove styleText() and applyStyleText() from InspectorStyle.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 May 2015 20:00:04 +0000 (20:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 May 2015 20:00:04 +0000 (20:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145093

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-16
Reviewed by Darin Adler.

styleText() and applyStyleText() in InspectorStyle are private aliases for the public
accessors in the same class but are rarely used. I think it would be better off removing
these aliases and updating all the current call sites to use the public accessors directly
as noted in InspectorStyleSheet.h.

No new tests, no behavior change.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::populateAllProperties):
* inspector/InspectorStyleSheet.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184437 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorStyleSheet.cpp
Source/WebCore/inspector/InspectorStyleSheet.h

index 5df6155..818eb8d 100644 (file)
@@ -1,5 +1,23 @@
 2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>
 
+        Remove styleText() and applyStyleText() from InspectorStyle.
+        https://bugs.webkit.org/show_bug.cgi?id=145093
+
+        Reviewed by Darin Adler.
+
+        styleText() and applyStyleText() in InspectorStyle are private aliases for the public
+        accessors in the same class but are rarely used. I think it would be better off removing
+        these aliases and updating all the current call sites to use the public accessors directly
+        as noted in InspectorStyleSheet.h.
+
+        No new tests, no behavior change.
+
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::InspectorStyle::populateAllProperties):
+        * inspector/InspectorStyleSheet.h:
+
+2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>
+
         Remove MessageType variant of addMessageToConsole() from ChromeClient.
         https://bugs.webkit.org/show_bug.cgi?id=145095
 
index 6d97233..cbf0bab 100644 (file)
@@ -356,7 +356,7 @@ bool InspectorStyle::populateAllProperties(Vector<InspectorStyleProperty>* resul
     Vector<CSSPropertySourceData>* sourcePropertyData = sourceData ? &(sourceData->styleSourceData->propertyData) : nullptr;
     if (sourcePropertyData) {
         String styleDeclaration;
-        bool isStyleTextKnown = styleText(&styleDeclaration);
+        bool isStyleTextKnown = getText(&styleDeclaration);
         ASSERT_UNUSED(isStyleTextKnown, isStyleTextKnown);
         for (Vector<CSSPropertySourceData>::const_iterator it = sourcePropertyData->begin(); it != sourcePropertyData->end(); ++it) {
             InspectorStyleProperty p(*it, true, false);
index 9a82187..e77617d 100644 (file)
@@ -140,10 +140,6 @@ public:
 private:
     InspectorStyle(const InspectorCSSId& styleId, RefPtr<CSSStyleDeclaration>&&, InspectorStyleSheet* parentStyleSheet);
 
-    // FIXME: Remove these aliases and update all the current call sites to use the new public methods.
-    bool styleText(String* result) const { return getText(result); }
-    bool applyStyleText(const String& text) { ExceptionCode ec = 0; return setText(text, ec); }
-
     bool populateAllProperties(Vector<InspectorStyleProperty>* result) const;
     Ref<Inspector::Protocol::CSS::CSSStyle> styleWithProperties() const;
     RefPtr<CSSRuleSourceData> extractSourceData() const;