Changeset 236468 in webkit
- Timestamp:
- Sep 25, 2018 11:59:38 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r236466 r236468 1 2018-09-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS] Fix the open source iOS 12 build after r236445 4 https://bugs.webkit.org/show_bug.cgi?id=189953 5 6 Reviewed by Alex Christensen. 7 8 Remove soft-linking macros from several sources in WebCore, and instead import UIKitSoftLink from PAL. This 9 allows different WebCore sources to soft-link UIKit (and its classes and symbols) without reimplementing 10 WebCore::UIKitLibrary. 11 12 * editing/cocoa/FontAttributesCocoa.mm: 13 * editing/cocoa/FontShadowCocoa.mm: 14 (WebCore::FontShadow::createShadow const): 15 * platform/graphics/cocoa/ColorCocoa.mm: 16 (WebCore::platformColor): 17 * platform/ios/PlatformScreenIOS.mm: 18 (WebCore::screenIsMonochrome): 19 (WebCore::screenHasInvertedColors): 20 (WebCore::screenSize): 21 (WebCore::availableScreenSize): 22 (WebCore::screenScaleFactor): 23 1 24 2018-09-25 Thibault Saunier <tsaunier@igalia.com> 2 25 -
trunk/Source/WebCore/PAL/ChangeLog
r236445 r236468 1 2018-09-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS] Fix the open source iOS 12 build after r236445 4 https://bugs.webkit.org/show_bug.cgi?id=189953 5 6 Reviewed by Alex Christensen. 7 8 Introduce a single UIKit soft-linking header in PAL. 9 10 * PAL.xcodeproj/project.pbxproj: 11 * pal/ios/UIKitSoftLink.h: Copied from Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm. 12 * pal/ios/UIKitSoftLink.mm: Copied from Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm. 13 1 14 2018-09-24 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
r236303 r236468 109 109 1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */; }; 110 110 2D02E93C2056FAA700A13797 /* AudioToolboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */; }; 111 2E1342CC215AA10A007199D2 /* UIKitSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */; }; 112 2E1342CD215AA10A007199D2 /* UIKitSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */; }; 111 113 31308B1420A21705003FB929 /* SystemPreviewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31308B1320A21705003FB929 /* SystemPreviewSPI.h */; }; 112 114 570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */; }; … … 261 263 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSAppearanceSPI.h; sourceTree = "<group>"; }; 262 264 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioToolboxSPI.h; sourceTree = "<group>"; }; 265 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIKitSoftLink.h; path = ios/UIKitSoftLink.h; sourceTree = "<group>"; }; 266 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UIKitSoftLink.mm; path = ios/UIKitSoftLink.mm; sourceTree = "<group>"; }; 263 267 31308B1320A21705003FB929 /* SystemPreviewSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemPreviewSPI.h; sourceTree = "<group>"; }; 264 268 37119A7820CCB5FF002C6DC9 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; }; … … 505 509 1C4876DE1F8D831300CCEEBD /* cocoa */, 506 510 1C09D0511E31C41200725F18 /* crypto */, 511 2E87C06E215A993100D6CD32 /* ios */, 507 512 0C2DA0651F33CA3300DBC317 /* spi */, 508 513 A3788E9F1F05B7CE00679425 /* system */, … … 558 563 ); 559 564 path = cocoa; 565 sourceTree = "<group>"; 566 }; 567 2E87C06E215A993100D6CD32 /* ios */ = { 568 isa = PBXGroup; 569 children = ( 570 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */, 571 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */, 572 ); 573 name = ios; 560 574 sourceTree = "<group>"; 561 575 }; … … 738 752 A3AB6E641F3D217F009C14B1 /* SystemSleepListenerMac.h in Headers */, 739 753 0C7785A11F45130F00F4EBB6 /* TUCallSPI.h in Headers */, 754 2E1342CC215AA10A007199D2 /* UIKitSoftLink.h in Headers */, 740 755 0C5AF9221F43A4C7002EAC02 /* UIKitSPI.h in Headers */, 741 756 0C2DA1471F3BEB4900DBC317 /* URLFormattingSPI.h in Headers */, … … 848 863 A3AB6E571F3D1DDB009C14B1 /* SystemSleepListener.cpp in Sources */, 849 864 A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */, 865 2E1342CD215AA10A007199D2 /* UIKitSoftLink.mm in Sources */, 850 866 A10826FA1F576292004772AC /* WebPanel.mm in Sources */, 851 867 ); -
trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h
r236467 r236468 24 24 */ 25 25 26 #import "config.h" 27 #import "ColorCocoa.h" 28 29 #import "ColorMac.h" 30 #import <wtf/SoftLinking.h> 31 32 #if PLATFORM(IOS) 33 #import <pal/spi/ios/UIKitSPI.h> 34 35 SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit) 36 SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIColor) 37 #endif 38 39 namespace WebCore { 40 41 #if USE(APPKIT) 42 43 NSColor *platformColor(const Color& color) 44 { 45 return nsColor(color); 46 } 47 48 #endif 26 #pragma once 49 27 50 28 #if PLATFORM(IOS) 51 29 52 UIColor *platformColor(const Color& color) 53 { 54 return [get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)]; 55 } 30 #import <pal/spi/ios/UIKitSPI.h> 31 #import <wtf/SoftLinking.h> 32 33 SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, UIKit) 34 35 SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, NSShadow) 36 SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIApplication) 37 SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIScreen) 38 SOFT_LINK_CLASS_FOR_HEADER(PAL, UIKit, UIColor) 39 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ()) 40 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ()) 56 41 57 42 #endif 58 59 } // namespace WebCore -
trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm
r236467 r236468 24 24 */ 25 25 26 #import "config.h" 27 #import "ColorCocoa.h" 28 29 #import "ColorMac.h" 30 #import <wtf/SoftLinking.h> 31 32 #if PLATFORM(IOS) 33 #import <pal/spi/ios/UIKitSPI.h> 34 35 SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit) 36 SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIColor) 37 #endif 38 39 namespace WebCore { 40 41 #if USE(APPKIT) 42 43 NSColor *platformColor(const Color& color) 44 { 45 return nsColor(color); 46 } 47 48 #endif 26 #include "config.h" 49 27 50 28 #if PLATFORM(IOS) 51 29 52 UIColor *platformColor(const Color& color) 53 { 54 return [get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)]; 55 } 30 #import <pal/spi/ios/UIKitSPI.h> 31 #import <wtf/SoftLinking.h> 32 33 SOFT_LINK_FRAMEWORK_FOR_SOURCE(PAL, UIKit) 34 35 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSShadow) 36 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIApplication) 37 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIScreen) 38 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIColor) 39 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ()) 40 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ()) 56 41 57 42 #endif 58 59 } // namespace WebCore -
trunk/Source/WebCore/editing/cocoa/FontAttributesCocoa.mm
r236445 r236468 28 28 29 29 #import "ColorCocoa.h" 30 #import <wtf/SoftLinking.h>31 30 32 31 namespace WebCore { -
trunk/Source/WebCore/editing/cocoa/FontShadowCocoa.mm
r236445 r236468 31 31 32 32 #if PLATFORM(IOS) 33 SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit) 34 SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, NSShadow) 33 #import <pal/ios/UIKitSoftLink.h> 35 34 #endif 36 35 … … 42 41 auto shadow = adoptNS([NSShadow new]); 43 42 #elif PLATFORM(IOS) 44 auto shadow = adoptNS([ get_UIKit_NSShadowClass() new]);43 auto shadow = adoptNS([PAL::get_UIKit_NSShadowClass() new]); 45 44 #endif 46 45 [shadow setShadowColor:platformColor(color)]; -
trunk/Source/WebCore/platform/graphics/cocoa/ColorCocoa.mm
r236445 r236468 28 28 29 29 #import "ColorMac.h" 30 #import <wtf/SoftLinking.h>31 30 32 31 #if PLATFORM(IOS) 32 #import <pal/ios/UIKitSoftLink.h> 33 33 #import <pal/spi/ios/UIKitSPI.h> 34 35 SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit)36 SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIColor)37 34 #endif 38 35 … … 52 49 UIColor *platformColor(const Color& color) 53 50 { 54 return [ get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)];51 return [PAL::get_UIKit_UIColorClass() _disambiguated_due_to_CIImage_colorWithCGColor:cachedCGColor(color)]; 55 52 } 56 53 -
trunk/Source/WebCore/platform/ios/PlatformScreenIOS.mm
r232372 r236468 39 39 #import "WAKWindow.h" 40 40 #import "Widget.h" 41 #import <pal/ios/UIKitSoftLink.h> 41 42 #import <pal/spi/ios/MobileGestaltSPI.h> 42 43 #import <pal/spi/ios/UIKitSPI.h> 43 #import <wtf/SoftLinking.h>44 45 SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, UIKit)46 SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIApplication)47 SOFT_LINK_CLASS_FOR_SOURCE(WebCore, UIKit, UIScreen)48 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())49 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ())50 44 51 45 namespace WebCore { … … 65 59 bool screenIsMonochrome(Widget*) 66 60 { 67 return softLinkUIKitUIAccessibilityIsGrayscaleEnabled();61 return PAL::softLinkUIKitUIAccessibilityIsGrayscaleEnabled(); 68 62 } 69 63 70 64 bool screenHasInvertedColors() 71 65 { 72 return softLinkUIKitUIAccessibilityIsInvertColorsEnabled();66 return PAL::softLinkUIKitUIAccessibilityIsInvertColorsEnabled(); 73 67 } 74 68 … … 136 130 FloatSize screenSize() 137 131 { 138 if (deviceHasIPadCapability() && [[ get_UIKit_UIApplicationClass() sharedApplication] _isClassic])132 if (deviceHasIPadCapability() && [[PAL::get_UIKit_UIApplicationClass() sharedApplication] _isClassic]) 139 133 return { 320, 480 }; 140 return FloatSize([[ get_UIKit_UIScreenClass() mainScreen] _referenceBounds].size);134 return FloatSize([[PAL::get_UIKit_UIScreenClass() mainScreen] _referenceBounds].size); 141 135 } 142 136 143 137 FloatSize availableScreenSize() 144 138 { 145 if (deviceHasIPadCapability() && [[ get_UIKit_UIApplicationClass() sharedApplication] _isClassic])139 if (deviceHasIPadCapability() && [[PAL::get_UIKit_UIApplicationClass() sharedApplication] _isClassic]) 146 140 return { 320, 480 }; 147 return FloatSize([ get_UIKit_UIScreenClass() mainScreen].bounds.size);141 return FloatSize([PAL::get_UIKit_UIScreenClass() mainScreen].bounds.size); 148 142 } 149 143 … … 160 154 { 161 155 if (!screen) 162 screen = [ get_UIKit_UIScreenClass() mainScreen];156 screen = [PAL::get_UIKit_UIScreenClass() mainScreen]; 163 157 164 158 return screen.scale;
Note: See TracChangeset
for help on using the changeset viewer.