Modified: trunk/Source/WebCore/ChangeLog (207773 => 207774)
--- trunk/Source/WebCore/ChangeLog 2016-10-24 20:25:02 UTC (rev 207773)
+++ trunk/Source/WebCore/ChangeLog 2016-10-24 20:42:48 UTC (rev 207774)
@@ -1,3 +1,20 @@
+2016-10-24 Anders Carlsson <ander...@apple.com>
+
+ Fix build with newer versions of clang
+ https://bugs.webkit.org/show_bug.cgi?id=163908
+ rdar://problem/28852016
+
+ Reviewed by Tim Horton.
+
+ Use the macros that names the soft-linked functions in such a way that they won't conflict with actual functions.
+
+ * platform/ios/PlatformScreenIOS.mm:
+ (WebCore::screenIsMonochrome):
+ (WebCore::screenHasInvertedColors):
+ (WebCore::screenSize):
+ (WebCore::availableScreenSize):
+ (WebCore::screenScaleFactor):
+
2016-10-24 Joseph Pecoraro <pecor...@apple.com>
Remove unnecessary unused variable stubs
Modified: trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm (207773 => 207774)
--- trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm 2016-10-24 20:25:02 UTC (rev 207773)
+++ trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm 2016-10-24 20:42:48 UTC (rev 207774)
@@ -39,11 +39,11 @@
#import "WebCoreSystemInterface.h"
#import "Widget.h"
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-SOFT_LINK_CLASS(UIKit, UIScreen)
-SOFT_LINK(UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
-SOFT_LINK(UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ())
+SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit)
+SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIApplication)
+SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIScreen)
+SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
+SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ())
namespace WebCore {
@@ -61,12 +61,12 @@
bool screenIsMonochrome(Widget*)
{
- return UIAccessibilityIsGrayscaleEnabled();
+ return softLinkUIKitUIAccessibilityIsGrayscaleEnabled();
}
bool screenHasInvertedColors()
{
- return UIAccessibilityIsInvertColorsEnabled();
+ return softLinkUIKitUIAccessibilityIsInvertColorsEnabled();
}
bool screenSupportsExtendedColor(Widget*)
@@ -131,28 +131,28 @@
FloatSize screenSize()
{
- if (deviceHasIPadCapability() && [[getUIApplicationClass() sharedApplication] _isClassic])
+ if (deviceHasIPadCapability() && [[get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
return { 320, 480 };
- return FloatSize([[getUIScreenClass() mainScreen] _referenceBounds].size);
+ return FloatSize([[get_UIKit_UIScreenClass() mainScreen] _referenceBounds].size);
}
FloatSize availableScreenSize()
{
- if (deviceHasIPadCapability() && [[getUIApplicationClass() sharedApplication] _isClassic])
+ if (deviceHasIPadCapability() && [[get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
return { 320, 480 };
- return FloatSize([getUIScreenClass() mainScreen].bounds.size);
+ return FloatSize([get_UIKit_UIScreenClass() mainScreen].bounds.size);
}
float screenScaleFactor(UIScreen *screen)
{
if (!screen)
- screen = [getUIScreenClass() mainScreen];
+ screen = [get_UIKit_UIScreenClass() mainScreen];
CGFloat scale = screen.scale;
// We can remove this clamping once <rdar://problem/16395475> is fixed.
const CGFloat maximumClassicScreenScaleFactor = 2;
- if ([[getUIApplicationClass() sharedApplication] _isClassic])
+ if ([[get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
return std::min(scale, maximumClassicScreenScaleFactor);
return scale;