Diff
Modified: trunk/Source/WebCore/ChangeLog (236467 => 236468)
--- trunk/Source/WebCore/ChangeLog 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/ChangeLog 2018-09-25 18:59:38 UTC (rev 236468)
@@ -1,3 +1,26 @@
+2018-09-25 Wenson Hsieh <wenson_hs...@apple.com>
+
+ [iOS] Fix the open source iOS 12 build after r236445
+ https://bugs.webkit.org/show_bug.cgi?id=189953
+
+ Reviewed by Alex Christensen.
+
+ Remove soft-linking macros from several sources in WebCore, and instead import UIKitSoftLink from PAL. This
+ allows different WebCore sources to soft-link UIKit (and its classes and symbols) without reimplementing
+ WebCore::UIKitLibrary.
+
+ * editing/cocoa/FontAttributesCocoa.mm:
+ * editing/cocoa/FontShadowCocoa.mm:
+ (WebCore::FontShadow::createShadow const):
+ * platform/graphics/cocoa/ColorCocoa.mm:
+ (WebCore::platformColor):
+ * platform/ios/PlatformScreenIOS.mm:
+ (WebCore::screenIsMonochrome):
+ (WebCore::screenHasInvertedColors):
+ (WebCore::screenSize):
+ (WebCore::availableScreenSize):
+ (WebCore::screenScaleFactor):
+
2018-09-25 Thibault Saunier <tsaun...@igalia.com>
[WPE][GTK][WebRTC] Fixup VP8 encoding support
Modified: trunk/Source/WebCore/PAL/ChangeLog (236467 => 236468)
--- trunk/Source/WebCore/PAL/ChangeLog 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/PAL/ChangeLog 2018-09-25 18:59:38 UTC (rev 236468)
@@ -1,3 +1,16 @@
+2018-09-25 Wenson Hsieh <wenson_hs...@apple.com>
+
+ [iOS] Fix the open source iOS 12 build after r236445
+ https://bugs.webkit.org/show_bug.cgi?id=189953
+
+ Reviewed by Alex Christensen.
+
+ Introduce a single UIKit soft-linking header in PAL.
+
+ * PAL.xcodeproj/project.pbxproj:
+ * pal/ios/UIKitSoftLink.h: Copied from Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm.
+ * pal/ios/UIKitSoftLink.mm: Copied from Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm.
+
2018-09-24 Wenson Hsieh <wenson_hs...@apple.com>
Refactor Editor::fontAttributesForSelectionStart to be platform-agnostic
Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (236467 => 236468)
--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj 2018-09-25 18:59:38 UTC (rev 236468)
@@ -108,6 +108,8 @@
1CCEE4F520D871930047B097 /* CoreUISPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F420D871930047B097 /* CoreUISPI.h */; };
1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */; };
2D02E93C2056FAA700A13797 /* AudioToolboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */; };
+ 2E1342CC215AA10A007199D2 /* UIKitSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */; };
+ 2E1342CD215AA10A007199D2 /* UIKitSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */; };
31308B1420A21705003FB929 /* SystemPreviewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31308B1320A21705003FB929 /* SystemPreviewSPI.h */; };
570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */; };
570AB8F920AF6E3D00B8BE87 /* NSXPCConnectionSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */; };
@@ -260,6 +262,8 @@
1CCEE4F420D871930047B097 /* CoreUISPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreUISPI.h; sourceTree = "<group>"; };
1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSAppearanceSPI.h; sourceTree = "<group>"; };
2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioToolboxSPI.h; sourceTree = "<group>"; };
+ 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIKitSoftLink.h; path = ios/UIKitSoftLink.h; sourceTree = "<group>"; };
+ 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIKitSoftLink.mm; path = ios/UIKitSoftLink.mm; sourceTree = "<group>"; };
31308B1320A21705003FB929 /* SystemPreviewSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemPreviewSPI.h; sourceTree = "<group>"; };
37119A7820CCB5FF002C6DC9 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; };
570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecKeyProxySPI.h; sourceTree = "<group>"; };
@@ -504,6 +508,7 @@
0CF99CA51F73841C007EE793 /* cf */,
1C4876DE1F8D831300CCEEBD /* cocoa */,
1C09D0511E31C41200725F18 /* crypto */,
+ 2E87C06E215A993100D6CD32 /* ios */,
0C2DA0651F33CA3300DBC317 /* spi */,
A3788E9F1F05B7CE00679425 /* system */,
A30D411D1F0DD0AC00B71954 /* text */,
@@ -559,6 +564,15 @@
path = cocoa;
sourceTree = "<group>";
};
+ 2E87C06E215A993100D6CD32 /* ios */ = {
+ isa = PBXGroup;
+ children = (
+ 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */,
+ 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */,
+ );
+ name = ios;
+ sourceTree = "<group>";
+ };
A30D411D1F0DD0AC00B71954 /* text */ = {
isa = PBXGroup;
children = (
@@ -737,6 +751,7 @@
A3AB6E581F3D1DDB009C14B1 /* SystemSleepListener.h in Headers */,
A3AB6E641F3D217F009C14B1 /* SystemSleepListenerMac.h in Headers */,
0C7785A11F45130F00F4EBB6 /* TUCallSPI.h in Headers */,
+ 2E1342CC215AA10A007199D2 /* UIKitSoftLink.h in Headers */,
0C5AF9221F43A4C7002EAC02 /* UIKitSPI.h in Headers */,
0C2DA1471F3BEB4900DBC317 /* URLFormattingSPI.h in Headers */,
0C2DA1591F3BEB4900DBC317 /* WebFilterEvaluatorSPI.h in Headers */,
@@ -847,6 +862,7 @@
A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */,
A3AB6E571F3D1DDB009C14B1 /* SystemSleepListener.cpp in Sources */,
A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */,
+ 2E1342CD215AA10A007199D2 /* UIKitSoftLink.mm in Sources */,
A10826FA1F576292004772AC /* WebPanel.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Copied: trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h (from rev 236467, trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm) (0 => 236468)
--- trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h (rev 0)
+++ trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h 2018-09-25 18:59:38 UTC (rev 236468)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(IOS)
+
+#import <pal/spi/ios/UIKitSPI.h>
+#import <wtf/SoftLinking.h>
+
+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, UIKit)
+
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, NSShadow)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIApplication)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIScreen)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIColor)
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ())
+
+#endif
Copied: trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm (from rev 236467, trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm) (0 => 236468)
--- trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm (rev 0)
+++ trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm 2018-09-25 18:59:38 UTC (rev 236468)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if PLATFORM(IOS)
+
+#import <pal/spi/ios/UIKitSPI.h>
+#import <wtf/SoftLinking.h>
+
+SOFT_LINK_FRAMEWORK_FOR_SOURCE(PAL, UIKit)
+
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSShadow)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIApplication)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIScreen)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIColor)
+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ())
+
+#endif
Modified: trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm (236467 => 236468)
--- trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm 2018-09-25 18:59:38 UTC (rev 236468)
@@ -27,7 +27,6 @@
#import "FontAttributes.h"
#import "ColorCocoa.h"
-#import <wtf/SoftLinking.h>
namespace WebCore {
Modified: trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm (236467 => 236468)
--- trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm 2018-09-25 18:59:38 UTC (rev 236468)
@@ -30,8 +30,7 @@
#import "ColorMac.h"
#if PLATFORM(IOS)
-SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit)
-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, NSShadow)
+#import <pal/ios/UIKitSoftLink.h>
#endif
namespace WebCore {
@@ -41,7 +40,7 @@
#if USE(APPKIT)
auto shadow = adoptNS([NSShadow new]);
#elif PLATFORM(IOS)
- auto shadow = adoptNS([get_UIKit_NSShadowClass() new]);
+ auto shadow = adoptNS([PAL::get_UIKit_NSShadowClass() new]);
#endif
[shadow setShadowColor:platformColor(color)];
[shadow setShadowOffset:offset];
Modified: trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm (236467 => 236468)
--- trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm 2018-09-25 18:59:38 UTC (rev 236468)
@@ -27,13 +27,10 @@
#import "ColorCocoa.h"
#import "ColorMac.h"
-#import <wtf/SoftLinking.h>
#if PLATFORM(IOS)
+#import <pal/ios/UIKitSoftLink.h>
#import <pal/spi/ios/UIKitSPI.h>
-
-SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit)
-SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIColor)
#endif
namespace WebCore {
@@ -51,7 +48,7 @@
UIColor *platformColor(const Color& color)
{
- return [get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)];
+ return [PAL::get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)];
}
#endif
Modified: trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm (236467 => 236468)
--- trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm 2018-09-25 18:55:24 UTC (rev 236467)
+++ trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm 2018-09-25 18:59:38 UTC (rev 236468)
@@ -38,16 +38,10 @@
#import "IntRect.h"
#import "WAKWindow.h"
#import "Widget.h"
+#import <pal/ios/UIKitSoftLink.h>
#import <pal/spi/ios/MobileGestaltSPI.h>
#import <pal/spi/ios/UIKitSPI.h>
-#import <wtf/SoftLinking.h>
-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 {
int screenDepth(Widget*)
@@ -64,12 +58,12 @@
bool screenIsMonochrome(Widget*)
{
- return softLinkUIKitUIAccessibilityIsGrayscaleEnabled();
+ return PAL::softLinkUIKitUIAccessibilityIsGrayscaleEnabled();
}
bool screenHasInvertedColors()
{
- return softLinkUIKitUIAccessibilityIsInvertColorsEnabled();
+ return PAL::softLinkUIKitUIAccessibilityIsInvertColorsEnabled();
}
bool screenSupportsExtendedColor(Widget*)
@@ -135,16 +129,16 @@
FloatSize screenSize()
{
- if (deviceHasIPadCapability() && [[get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
+ if (deviceHasIPadCapability() && [[PAL::get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
return { 320, 480 };
- return FloatSize([[get_UIKit_UIScreenClass() mainScreen] _referenceBounds].size);
+ return FloatSize([[PAL::get_UIKit_UIScreenClass() mainScreen] _referenceBounds].size);
}
FloatSize availableScreenSize()
{
- if (deviceHasIPadCapability() && [[get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
+ if (deviceHasIPadCapability() && [[PAL::get_UIKit_UIApplicationClass() sharedApplication] _isClassic])
return { 320, 480 };
- return FloatSize([get_UIKit_UIScreenClass() mainScreen].bounds.size);
+ return FloatSize([PAL::get_UIKit_UIScreenClass() mainScreen].bounds.size);
}
#if USE(APPLE_INTERNAL_SDK) && __has_include(<WebKitAdditions/PlatformScreenIOS.mm>)
@@ -159,7 +153,7 @@
float screenScaleFactor(UIScreen *screen)
{
if (!screen)
- screen = [get_UIKit_UIScreenClass() mainScreen];
+ screen = [PAL::get_UIKit_UIScreenClass() mainScreen];
return screen.scale;
}