Remove Widget from screenColorProfile
https://bugs.webkit.org/show_bug.cgi?id=91300

Patch by Tony Payne <tpayne@chromium.org> on 2012-07-13
Reviewed by Adam Barth.

Source/Platform:

* chromium/public/Platform.h:
(Platform): Updated comment to reflect that we no longer have a type param.

Source/WebCore:

Chromium, the only platform implementing screenColorProfile, does not
need the Widget, so removing for simplicity.

Covered by existing tests.

* platform/PlatformScreen.h:
(WebCore): Updated comment to remove reference to type param that no
longer exists and removed Widget param.
* platform/blackberry/PlatformScreenBlackBerry.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to
match screenColorProfile()'s new spec.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenColorProfile): Removed widget param.
* platform/qt/PlatformScreenQt.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenColorProfile): Removed widget param.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h
index df989a1..1111f9d 100644
--- a/Source/WebCore/platform/PlatformScreen.h
+++ b/Source/WebCore/platform/PlatformScreen.h
@@ -52,8 +52,7 @@
 
     FloatRect screenRect(Widget*);
     FloatRect screenAvailableRect(Widget*);
-    // type can be "monitor" or the name of a profile such as "sRGB" or "Adobe RGB".
-    void screenColorProfile(Widget*, ColorProfile&);
+    void screenColorProfile(ColorProfile&);
 
 #if PLATFORM(MAC)
     NSScreen *screenForWindow(NSWindow *);
diff --git a/Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp b/Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp
index 592539c..1d87031 100644
--- a/Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp
+++ b/Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp
@@ -64,7 +64,7 @@
     return FloatRect(FloatPoint(), FloatSize(IntSize(BlackBerry::Platform::Graphics::Screen::primaryScreen()->size())));
 }
 
-void screenColorProfile(Widget*, ColorProfile&)
+void screenColorProfile(ColorProfile&)
 {
     notImplemented();
 }
diff --git a/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp b/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp
index 46f33da..54d58da 100644
--- a/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp
+++ b/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp
@@ -73,9 +73,8 @@
     return PlatformSupport::screenAvailableRect(widget);
 }
 
-void screenColorProfile(Widget*, ColorProfile& toProfile)
+void screenColorProfile(ColorProfile& toProfile)
 {
-    // FIXME: Add support for multiple monitors.
     WebKit::WebVector<char> profile;
     WebKit::Platform::current()->screenColorProfile(&profile);
     toProfile.append(profile.data(), profile.size());
diff --git a/Source/WebCore/platform/efl/PlatformScreenEfl.cpp b/Source/WebCore/platform/efl/PlatformScreenEfl.cpp
index 5332c2f..394da63 100644
--- a/Source/WebCore/platform/efl/PlatformScreenEfl.cpp
+++ b/Source/WebCore/platform/efl/PlatformScreenEfl.cpp
@@ -100,7 +100,7 @@
     return screenRect(widget);
 }
 
-void screenColorProfile(Widget*, ColorProfile&)
+void screenColorProfile(ColorProfile&)
 {
     notImplemented();
 }
diff --git a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp
index 5762a8f..7125403 100644
--- a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp
+++ b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp
@@ -137,7 +137,7 @@
 
 }
 
-void screenColorProfile(Widget*, ColorProfile&)
+void screenColorProfile(ColorProfile&)
 {
     notImplemented();
 }
diff --git a/Source/WebCore/platform/image-decoders/ImageDecoder.h b/Source/WebCore/platform/image-decoders/ImageDecoder.h
index 760ac93..911878e 100644
--- a/Source/WebCore/platform/image-decoders/ImageDecoder.h
+++ b/Source/WebCore/platform/image-decoders/ImageDecoder.h
@@ -315,7 +315,7 @@
 #else
                 // FIXME: add support for multiple monitors.
                 ColorProfile profile;
-                screenColorProfile(0, profile);
+                screenColorProfile(profile);
                 if (!profile.isEmpty())
                     outputDeviceProfile = qcms_profile_from_memory(profile.data(), profile.size());
 #endif
diff --git a/Source/WebCore/platform/mac/PlatformScreenMac.mm b/Source/WebCore/platform/mac/PlatformScreenMac.mm
index 203418b..71cc4a1 100644
--- a/Source/WebCore/platform/mac/PlatformScreenMac.mm
+++ b/Source/WebCore/platform/mac/PlatformScreenMac.mm
@@ -76,7 +76,7 @@
     return toUserSpace([screenForWindow(window) visibleFrame], window);
 }
 
-void screenColorProfile(Widget*, ColorProfile&)
+void screenColorProfile(ColorProfile&)
 {
     notImplemented();
 }
diff --git a/Source/WebCore/platform/qt/PlatformScreenQt.cpp b/Source/WebCore/platform/qt/PlatformScreenQt.cpp
index cf381ee..f30472a 100644
--- a/Source/WebCore/platform/qt/PlatformScreenQt.cpp
+++ b/Source/WebCore/platform/qt/PlatformScreenQt.cpp
@@ -143,7 +143,7 @@
     return FloatRect(r.x(), r.y(), r.width(), r.height());
 }
 
-void screenColorProfile(Widget*, ColorProfile&)
+void screenColorProfile(ColorProfile&)
 {
     notImplemented();
 }
diff --git a/Source/WebCore/platform/win/PlatformScreenWin.cpp b/Source/WebCore/platform/win/PlatformScreenWin.cpp
index 21bf23c..5ea24b4 100644
--- a/Source/WebCore/platform/win/PlatformScreenWin.cpp
+++ b/Source/WebCore/platform/win/PlatformScreenWin.cpp
@@ -118,7 +118,7 @@
     return monitorInfo.rcWork;
 }
 
-void screenColorProfile(Widget*, ColorProfile&)
+void screenColorProfile(ColorProfile&)
 {
     notImplemented();
 }