Changeset 211175 in webkit
- Timestamp:
- Jan 25, 2017 3:50:12 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r211173 r211175 1 2017-01-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Introduce an item-provider-based pasteboard wrapper 4 https://bugs.webkit.org/show_bug.cgi?id=167410 5 6 Reviewed by Enrica Casucci. 7 8 Adds an additional feature flag. 9 10 * wtf/FeatureDefines.h: 11 1 12 2017-01-25 Konstantin Tokarev <annulen@yandex.ru> 2 13 -
trunk/Source/WTF/wtf/FeatureDefines.h
r211168 r211175 784 784 #endif 785 785 786 #if !defined(ENABLE_DATA_INTERACTION) 787 #define ENABLE_DATA_INTERACTION 0 788 #endif 789 786 790 /* Asserts, invariants for macro definitions */ 787 791 -
trunk/Source/WebCore/ChangeLog
r211173 r211175 1 2017-01-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Introduce an item-provider-based pasteboard wrapper 4 https://bugs.webkit.org/show_bug.cgi?id=167410 5 6 Reviewed by Enrica Casucci. 7 8 Introduces WebItemProviderPasteboard, a pasteboard-like object backed by a number of item providers. No new 9 tests, since there is no behavior change. 10 11 * WebCore.xcodeproj/project.pbxproj: 12 * platform/ios/AbstractPasteboard.h: Copied from Source/WebCore/platform/spi/ios/UIKitSPI.h. 13 * platform/ios/WebItemProviderPasteboard.h: Copied from Source/WebCore/platform/spi/ios/UIKitSPI.h. 14 * platform/ios/WebItemProviderPasteboard.mm: Added. 15 (isRichTextType): 16 (isStringType): 17 (isURLType): 18 (isColorType): 19 (isImageType): 20 (+[WebItemProviderPasteboard sharedInstance]): 21 (-[WebItemProviderPasteboard init]): 22 (-[WebItemProviderPasteboard dealloc]): 23 (-[WebItemProviderPasteboard pasteboardTypes]): 24 (-[WebItemProviderPasteboard setItemProviders:]): 25 (-[WebItemProviderPasteboard numberOfItems]): 26 (-[WebItemProviderPasteboard setItems:]): 27 (-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]): 28 (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]): 29 (-[WebItemProviderPasteboard changeCount]): 30 (-[WebItemProviderPasteboard itemProviderAtIndex:]): 31 * platform/spi/ios/UIKitSPI.h: 32 1 33 2017-01-25 Konstantin Tokarev <annulen@yandex.ru> 2 34 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r211161 r211175 6507 6507 F47A5E3E195B8C8A00483100 /* StyleScrollSnapPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = F47A5E3B195B8C8A00483100 /* StyleScrollSnapPoints.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6508 6508 F47A5E3F195B8E4800483100 /* StyleScrollSnapPoints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F47A5E3A195B8C8A00483100 /* StyleScrollSnapPoints.cpp */; }; 6509 F48223101E3869B80066FC79 /* WebItemProviderPasteboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = F482230E1E3869B80066FC79 /* WebItemProviderPasteboard.mm */; }; 6510 F48223111E3869B80066FC79 /* WebItemProviderPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = F482230F1E3869B80066FC79 /* WebItemProviderPasteboard.h */; }; 6511 F48223131E386E240066FC79 /* AbstractPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = F48223121E386E240066FC79 /* AbstractPasteboard.h */; }; 6509 6512 F4BFB9851E1DDF9B00862C24 /* DumpEditingHistory.js in Copy Scripts */ = {isa = PBXBuildFile; fileRef = F48389831E1DDF2B0076B7EA /* DumpEditingHistory.js */; }; 6510 6513 F4BFB9861E1DDF9B00862C24 /* EditingHistoryUtil.js in Copy Scripts */ = {isa = PBXBuildFile; fileRef = F48389841E1DDF2B0076B7EA /* EditingHistoryUtil.js */; }; … … 14559 14562 F47A5E3A195B8C8A00483100 /* StyleScrollSnapPoints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleScrollSnapPoints.cpp; sourceTree = "<group>"; }; 14560 14563 F47A5E3B195B8C8A00483100 /* StyleScrollSnapPoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleScrollSnapPoints.h; sourceTree = "<group>"; }; 14564 F482230E1E3869B80066FC79 /* WebItemProviderPasteboard.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebItemProviderPasteboard.mm; sourceTree = "<group>"; }; 14565 F482230F1E3869B80066FC79 /* WebItemProviderPasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebItemProviderPasteboard.h; sourceTree = "<group>"; }; 14566 F48223121E386E240066FC79 /* AbstractPasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractPasteboard.h; sourceTree = "<group>"; }; 14561 14567 F48389831E1DDF2B0076B7EA /* DumpEditingHistory.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = DumpEditingHistory.js; path = Scripts/DumpEditingHistory.js; sourceTree = "<group>"; }; 14562 14568 F48389841E1DDF2B0076B7EA /* EditingHistoryUtil.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = EditingHistoryUtil.js; path = Scripts/EditingHistoryUtil.js; sourceTree = "<group>"; }; … … 19773 19779 isa = PBXGroup; 19774 19780 children = ( 19781 F48223121E386E240066FC79 /* AbstractPasteboard.h */, 19775 19782 A148328B187F506800DA63A6 /* wak */, 19776 19783 2655414B1489AA2B000DFC5D /* CursorIOS.cpp */, … … 19837 19844 3FBC4AF1189881560046EE38 /* WebVideoFullscreenInterfaceAVKit.mm */, 19838 19845 E453903C0EAFD637003695C8 /* WidgetIOS.mm */, 19846 F482230E1E3869B80066FC79 /* WebItemProviderPasteboard.mm */, 19847 F482230F1E3869B80066FC79 /* WebItemProviderPasteboard.h */, 19839 19848 ); 19840 19849 path = ios; … … 25234 25243 CE6DADFA1C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h in Headers */, 25235 25244 CE799FA01C6A4C160097B518 /* ContentSecurityPolicySource.h in Headers */, 25245 F48223131E386E240066FC79 /* AbstractPasteboard.h in Headers */, 25236 25246 CE799F981C6A46BC0097B518 /* ContentSecurityPolicySourceList.h in Headers */, 25237 25247 CE799FAC1C6A50660097B518 /* ContentSecurityPolicySourceListDirective.h in Headers */, … … 27768 27778 BC5EB6A30E81DC4F00B25965 /* StyleBackgroundData.h in Headers */, 27769 27779 BC5EB67B0E81D3BE00B25965 /* StyleBoxData.h in Headers */, 27780 F48223111E3869B80066FC79 /* WebItemProviderPasteboard.h in Headers */, 27770 27781 8386A96D19F61B2E00E1EC4A /* StyleBuilder.h in Headers */, 27771 27782 83B9687B19F8AB83004EF7AF /* StyleBuilderConverter.h in Headers */, … … 29228 29239 977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */, 29229 29240 A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */, 29241 F48223101E3869B80066FC79 /* WebItemProviderPasteboard.mm in Sources */, 29230 29242 A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */, 29231 29243 78D02BC5154A18DF00B62D05 /* CSSPropertyAnimation.cpp in Sources */, -
trunk/Source/WebCore/platform/ios/AbstractPasteboard.h
r211174 r211175 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i f USE(APPLE_INTERNAL_SDK)26 #import <Foundation/Foundation.h> 27 27 28 #import <UIKit/UIApplication_Private.h> 29 #import <UIKit/UIInterface_Private.h> 30 #import <UIKit/UIScreen_Private.h> 31 #import <UIKit/UIViewController_Private.h> 28 @protocol AbstractPasteboard <NSObject> 29 @required 32 30 33 #else 31 @property (readonly, nonatomic) NSInteger numberOfItems; 34 32 35 #import <UIKit/UIKit.h> 36 37 @interface UIApplication () 38 39 - ( BOOL)_isClassic;33 - (NSArray<NSString *> *)pasteboardTypes; 34 - (void)setItems:(NSArray *)items; 35 - (NSArray *)dataForPasteboardType:(NSString *)pasteboardType inItemSet:(NSIndexSet *)itemSet; 36 - (NSArray *)valuesForPasteboardType:(NSString *)pasteboardType inItemSet:(NSIndexSet *)itemSet; 37 - (NSInteger)changeCount; 40 38 41 39 @end 42 43 @interface UIColor ()44 45 + (UIColor *)systemBlueColor;46 + (UIColor *)systemGrayColor;47 + (UIColor *)systemGreenColor;48 + (UIColor *)systemOrangeColor;49 + (UIColor *)systemPinkColor;50 + (UIColor *)systemRedColor;51 + (UIColor *)systemYellowColor;52 53 @end54 55 @interface UIScreen ()56 57 @property (nonatomic, readonly) CGRect _referenceBounds;58 59 @end60 61 @interface UIViewController ()62 + (UIViewController *)viewControllerForView:(UIView *)view;63 @end64 65 #endif -
trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.h
r211174 r211175 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All rights reserved.2 * Copyright (C) 2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i f USE(APPLE_INTERNAL_SDK)26 #import "AbstractPasteboard.h" 27 27 28 #import <UIKit/UIApplication_Private.h> 29 #import <UIKit/UIInterface_Private.h> 30 #import <UIKit/UIScreen_Private.h> 31 #import <UIKit/UIViewController_Private.h> 28 #if ENABLE(DATA_INTERACTION) 32 29 33 #else 30 OBJC_CLASS UIItemProvider; 34 31 35 #import <UIKit/UIKit.h> 32 NS_ASSUME_NONNULL_BEGIN 36 33 37 @interface UIApplication () 34 WEBCORE_EXPORT @interface WebItemProviderPasteboard : NSObject<AbstractPasteboard> 38 35 39 - (BOOL)_isClassic; 36 + (instancetype)sharedInstance; 37 38 - (UIItemProvider *)itemProviderAtIndex:(NSInteger)index; 39 40 @property (copy, nonatomic, nullable) NSArray<UIItemProvider *> *itemProviders; 41 @property (readonly, nonatomic) NSInteger numberOfItems; 42 @property (readonly, nonatomic) NSInteger changeCount; 40 43 41 44 @end 42 45 43 @interface UIColor () 46 NS_ASSUME_NONNULL_END 44 47 45 + (UIColor *)systemBlueColor; 46 + (UIColor *)systemGrayColor; 47 + (UIColor *)systemGreenColor; 48 + (UIColor *)systemOrangeColor; 49 + (UIColor *)systemPinkColor; 50 + (UIColor *)systemRedColor; 51 + (UIColor *)systemYellowColor; 52 53 @end 54 55 @interface UIScreen () 56 57 @property (nonatomic, readonly) CGRect _referenceBounds; 58 59 @end 60 61 @interface UIViewController () 62 + (UIViewController *)viewControllerForView:(UIView *)view; 63 @end 64 65 #endif 48 #endif // ENABLE(DATA_INTERACTION) -
trunk/Source/WebCore/platform/spi/ios/UIKitSPI.h
r209414 r211175 30 30 #import <UIKit/UIScreen_Private.h> 31 31 #import <UIKit/UIViewController_Private.h> 32 33 #if ENABLE(DATA_INTERACTION) 34 #import <UIKit/UIItemProvider_Private.h> 35 #endif 32 36 33 37 #else
Note: See TracChangeset
for help on using the changeset viewer.