Title: [184437] trunk/Source/WebCore
Revision
184437
Author
[email protected]
Date
2015-05-16 13:00:04 -0700 (Sat, 16 May 2015)

Log Message

Remove styleText() and applyStyleText() from InspectorStyle.
https://bugs.webkit.org/show_bug.cgi?id=145093

Patch by Sungmann Cho <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184436 => 184437)


--- trunk/Source/WebCore/ChangeLog	2015-05-16 19:57:26 UTC (rev 184436)
+++ trunk/Source/WebCore/ChangeLog	2015-05-16 20:00:04 UTC (rev 184437)
@@ -1,5 +1,23 @@
 2015-05-16  Sungmann Cho  <[email protected]>
 
+        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  <[email protected]>
+
         Remove MessageType variant of addMessageToConsole() from ChromeClient.
         https://bugs.webkit.org/show_bug.cgi?id=145095
 

Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (184436 => 184437)


--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp	2015-05-16 19:57:26 UTC (rev 184436)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp	2015-05-16 20:00:04 UTC (rev 184437)
@@ -356,7 +356,7 @@
     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);

Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.h (184436 => 184437)


--- trunk/Source/WebCore/inspector/InspectorStyleSheet.h	2015-05-16 19:57:26 UTC (rev 184436)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.h	2015-05-16 20:00:04 UTC (rev 184437)
@@ -140,10 +140,6 @@
 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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to