Unreviewed, rolling out r233934.
authortsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2018 00:38:27 +0000 (00:38 +0000)
committertsavell@apple.com <tsavell@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2018 00:38:27 +0000 (00:38 +0000)
Revision caused 5 webkitpy failures on Mac and broke webkitpy
testing on iOS simulator

Reverted changeset:

"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233934

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

Tools/ChangeLog
Tools/lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj
Tools/lldb/lldbWebKitTester/main.cpp
Tools/lldb/lldb_webkit.py
Tools/lldb/lldb_webkit_unittest.py

index 93797e6..f5960ca 100644 (file)
@@ -1,3 +1,16 @@
+2018-07-18  Truitt Savell  <tsavell@apple.com>
+
+        Unreviewed, rolling out r233934.
+
+        Revision caused 5 webkitpy failures on Mac and broke webkitpy
+        testing on iOS simulator
+
+        Reverted changeset:
+
+        "Provide an lldb type summary for WebCore::Color"
+        https://bugs.webkit.org/show_bug.cgi?id=187776
+        https://trac.webkit.org/changeset/233934
+
 2018-07-18  Chris Dumez  <cdumez@apple.com>
 
         REGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebKit: WKBooleanGetValue + 9
index ae8ef16..283299a 100644 (file)
@@ -8,7 +8,6 @@
 
 /* Begin PBXBuildFile section */
                0FC1C35420E5391E001E9FB0 /* DumpClassLayoutTesting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC1C35320E5391E001E9FB0 /* DumpClassLayoutTesting.cpp */; };
-               3156A19320FEEE3200CA3BA3 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3156A19220FEEE3200CA3BA3 /* WebKit.framework */; };
                7CB6844B1AFA7978002B305C /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CB6844A1AFA7978002B305C /* main.cpp */; };
                CE6C3AFF20C0B17B003E33D8 /* libWTF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE6C3AFE20C0B17B003E33D8 /* libWTF.a */; };
                CE6C3B0120C0C444003E33D8 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CE6C3B0020C0C443003E33D8 /* libicucore.dylib */; };
@@ -29,7 +28,6 @@
 /* Begin PBXFileReference section */
                0FC1C35320E5391E001E9FB0 /* DumpClassLayoutTesting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DumpClassLayoutTesting.cpp; sourceTree = "<group>"; };
                0FC1C35520E53932001E9FB0 /* DumpClassLayoutTesting.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DumpClassLayoutTesting.h; sourceTree = "<group>"; };
-               3156A19220FEEE3200CA3BA3 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = WebKit.framework; sourceTree = "<group>"; };
                7C2227511AFC4D9C008C3338 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
                7C2227521AFC4D9C008C3338 /* lldbWebKitTester.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = lldbWebKitTester.xcconfig; sourceTree = "<group>"; };
                7C2227531AFC4D9C008C3338 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
@@ -46,7 +44,6 @@
                        files = (
                                CE6C3B0120C0C444003E33D8 /* libicucore.dylib in Frameworks */,
                                CE6C3AFF20C0B17B003E33D8 /* libWTF.a in Frameworks */,
-                               3156A19320FEEE3200CA3BA3 /* WebKit.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
@@ -96,7 +93,6 @@
                        children = (
                                CE6C3B0020C0C443003E33D8 /* libicucore.dylib */,
                                CE6C3AFE20C0B17B003E33D8 /* libWTF.a */,
-                               3156A19220FEEE3200CA3BA3 /* WebKit.framework */,
                        );
                        name = Frameworks;
                        sourceTree = "<group>";
index 874961a..9c72441 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define WEBCORE_EXPORT
-
 #include "DumpClassLayoutTesting.h"
-#include <WebCore/Color.h>
 #include <stdio.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
@@ -64,12 +61,6 @@ static void testSummaryProviders()
     aVectorWithOneItem.reserveCapacity(16);
     aVectorWithOneItem.append(1);
 
-    auto invalidColor = WebCore::Color { };
-    auto rgbColor = WebCore::Color { 255, 128, 64 };
-    auto rgbaColor = WebCore::Color { 255, 128, 64, 128 };
-    auto extendedColor = WebCore::Color { 0.1, 0.2, 0.3, 0.4, WebCore::ColorSpaceDisplayP3 };
-    auto semanticColor = WebCore::Color { WebCore::makeRGBA(255, 255, 255, 255), WebCore::Color::Semantic };
-
     breakForTestingSummaryProviders();
 }
 
index bfc014e..52fb7a4 100644 (file)
@@ -44,7 +44,6 @@ def __lldb_init_module(debugger, dict):
     debugger.HandleCommand('type summary add --expand -F lldb_webkit.WTFMediaTime_SummaryProvider WTF::MediaTime')
     debugger.HandleCommand('type synthetic add -x "WTF::Vector<.+>$" --python-class lldb_webkit.WTFVectorProvider')
     debugger.HandleCommand('type synthetic add -x "WTF::HashTable<.+>$" --python-class lldb_webkit.WTFHashTableProvider')
-    debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreColor_SummaryProvider WebCore::Color')
     debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreLayoutUnit_SummaryProvider WebCore::LayoutUnit')
     debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreLayoutSize_SummaryProvider WebCore::LayoutSize')
     debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreLayoutPoint_SummaryProvider WebCore::LayoutPoint')
@@ -97,11 +96,6 @@ def WTFMediaTime_SummaryProvider(valobj, dict):
     return "{ %d/%d, %f }" % (provider.timeValue(), provider.timeScale(), float(provider.timeValue()) / provider.timeScale())
 
 
-def WebCoreColor_SummaryProvider(valobj, dict):
-    provider = WebCoreColorProvider(valobj, dict)
-    return "{ %s }" % provider.to_string()
-
-
 def WebCoreURL_SummaryProvider(valobj, dict):
     provider = WebCoreURLProvider(valobj, dict)
     return "{ %s }" % provider.to_string()
@@ -315,58 +309,6 @@ class WTFStringProvider:
         return impl.to_string()
 
 
-class WebCoreColorProvider:
-    "Print a WebCore::Color"
-    def __init__(self, valobj, dict):
-        self.valobj = valobj
-
-    def _is_extended(self, rgba_and_flags):
-        return not bool(rgba_and_flags & 0x1)
-
-    def _is_valid(self, rgba_and_flags):
-        # Assumes not extended.
-        return bool(rgba_and_flags & 0x2)
-
-    def _is_semantic(self, rgba_and_flags):
-        # Assumes not extended.
-        return bool(rgba_and_flags & 0x4)
-
-    def _to_string_extended(self):
-        extended_color = self.valobj.GetChildMemberWithName('m_colorData').GetChildMemberWithName('extendedColor').Dereference()
-        profile = extended_color.GetChildMemberWithName('m_colorSpace').GetValue()
-        if profile == 'ColorSpaceSRGB':
-            profile = 'srgb'
-        elif profile == 'ColorSpaceDisplayP3':
-            profile = 'display-p3'
-        else:
-            profile = 'unknown'
-        red = float(extended_color.GetChildMemberWithName('m_red').GetValue())
-        green = float(extended_color.GetChildMemberWithName('m_green').GetValue())
-        blue = float(extended_color.GetChildMemberWithName('m_blue').GetValue())
-        alpha = float(extended_color.GetChildMemberWithName('m_alpha').GetValue())
-        return "color(%s %1.2f %1.2f %1.2f / %1.2f)" % (profile, red, green, blue, alpha)
-
-    def to_string(self):
-        rgba_and_flags = self.valobj.GetChildMemberWithName('m_colorData').GetChildMemberWithName('rgbaAndFlags').GetValueAsUnsigned(0)
-
-        if self._is_extended(rgba_and_flags):
-            return self._to_string_extended()
-
-        if not self._is_valid(rgba_and_flags):
-            return 'invalid'
-
-        color = rgba_and_flags >> 32
-        red = (color >> 16) & 0xFF
-        green = (color >> 8) & 0xFF
-        blue = color & 0xFF
-        alpha = ((color >> 24) & 0xFF) / 255.0
-
-        semantic = ' semantic' if self._is_semantic(rgba_and_flags) else ""
-
-        result = 'rgba(%d, %d, %d, %1.2f)%s' % (red, green, blue, alpha, semantic)
-        return result
-
-
 class WebCoreLayoutUnitProvider:
     "Print a WebCore::LayoutUnit"
     def __init__(self, valobj, dict):
index e28fdf0..953020f 100755 (executable)
@@ -152,30 +152,3 @@ class TestSummaryProviders(unittest.TestCase):
         self.assertIsNotNone(variable)
         summary = lldb_webkit.WTFVector_SummaryProvider(variable, {})
         self.assertEqual(summary, "{ size = 1, capacity = 16 }")
-
-    # MARK: WebCoreColor_SummaryProvider test cases
-
-    def serial_test_WebCoreColorProvider_invalid_color(self):
-        variable = self._sbFrame.FindVariable('invalidColor')
-        summary = lldb_webkit.WebCoreColorProvider_SummaryProvider(variable, {})
-        self.assertEqual(summary, "{ invalid }")
-
-    def serial_test_WebCoreColorProvider_extended_color(self):
-        variable = self._sbFrame.FindVariable('extendedColor')
-        summary = lldb_webkit.WebCoreColorProvider_SummaryProvider(variable, {})
-        self.assertEqual(summary, "{ color(display-p3 0.10 0.20 0.30 / 0.40) }")
-
-    def serial_test_WebCoreColorProvider_rgb_color(self):
-        variable = self._sbFrame.FindVariable('rgbColor')
-        summary = lldb_webkit.WebCoreColorProvider_SummaryProvider(variable, {})
-        self.assertEqual(summary, "{ rgba(255, 128, 64, 1.00) }")
-
-    def serial_test_WebCoreColorProvider_rgba_color(self):
-        variable = self._sbFrame.FindVariable('rgbaColor')
-        summary = lldb_webkit.WebCoreColorProvider_SummaryProvider(variable, {})
-        self.assertEqual(summary, "{ rgba(255, 128, 64, 0.50) }")
-
-    def serial_test_WebCoreColorProvider_semantic_color(self):
-        variable = self._sbFrame.FindVariable('semanticColor')
-        summary = lldb_webkit.WebCoreColorProvider_SummaryProvider(variable, {})
-        self.assertEqual(summary, "{ rgba(255, 255, 255, 1.00) semantic }")