WebKit Bugzilla
Attachment 368255 Details for
Bug 197222
: Clean up dependencies with accessibility and UIKit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197222-20190425114241.patch (text/plain), 10.93 KB, created by
Megan Gardner
on 2019-04-25 11:42:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2019-04-25 11:42:42 PDT
Size:
10.93 KB
patch
obsolete
>Subversion Revision: 244654 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 1c8699c45b3247adb9a1939185d58da21bcc5c77..df574156877aa02953bffb8466b514171b571b13 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,14 @@ >+2019-04-23 Megan Gardner <megan_gardner@apple.com> >+ >+ Clean up dependencies with accessibility and UIKit >+ https://bugs.webkit.org/show_bug.cgi?id=197222 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Define the access to items from UIKit rather than redefining them. >+ >+ * wtf/Platform.h: >+ > 2019-04-25 Alex Christensen <achristensen@webkit.org> > > Start using C++17 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ab967c5b465dff86b6a301a758ff4a9820286b54..7bb8d21c379e03d6c6c233137a6951179d4046e0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2019-04-23 Megan Gardner <megan_gardner@apple.com> >+ >+ Clean up dependencies with accessibility and UIKit >+ https://bugs.webkit.org/show_bug.cgi?id=197222 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No tests, if the tests still work, this was moved around correctly. >+ >+ Access items from UIKit rather than redefining them. >+ Also, this method is defined as not accessible on iOS >+ via UIKit, so we need to make ours seperate since we are >+ using it for tests. >+ >+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: >+ (-[WebAccessibilityObjectWrapper accessibilityHeaderElementsTest]): >+ (-[WebAccessibilityObjectWrapper accessibilityTextualContext]): >+ (AXAttributeStringSetStyle): >+ (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]): Deleted. >+ * platform/mac/WebNSAttributedStringExtras.mm: >+ > 2019-04-25 Alex Christensen <achristensen@webkit.org> > > Start using C++17 >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index 422c8d2d4c15f66614ec718db26ae8a35f418e75..ae8e9c01ccbbe53bea88ad37a25d5fb369706f61 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,13 @@ >+2019-04-23 Megan Gardner <megan_gardner@apple.com> >+ >+ Clean up dependencies with accessibility and UIKit >+ https://bugs.webkit.org/show_bug.cgi?id=197222 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * pal/ios/UIKitSoftLink.h: >+ * pal/ios/UIKitSoftLink.mm: >+ > 2019-04-25 Alex Christensen <achristensen@webkit.org> > > Start using C++17 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d492ff8f8cbdd7c6d1708fb937574f6b1401e6db..f1852c53dc823b4aa4c96745baf4cb1855824574 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,14 @@ >+2019-04-23 Megan Gardner <megan_gardner@apple.com> >+ >+ Clean up dependencies with accessibility and UIKit >+ https://bugs.webkit.org/show_bug.cgi?id=197222 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Define the access to items from UIKit rather than redefining them. >+ >+ * Platform/spi/ios/UIKitSPI.h: >+ > 2019-04-25 Alex Christensen <achristensen@webkit.org> > > Start using C++17 >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index 13faf6169702995e99762b28dbfac24f9dab9689..0db55a45007293ea3358b138d71492dda8c40423 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -1527,3 +1527,7 @@ > #define HAVE_APP_LINKS_WITH_ISENABLED 1 > #define HAVE_ROUTE_SHARING_POLICY_LONG_FORM_VIDEO 1 > #endif >+ >+#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000) >+#define ENABLE_INTERNAL_ACCESSIBILITY_CONSTANTS 1 >+#endif >diff --git a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >index 61871af7e0a825d2cb7c74d8bed4834d22289485..11606a5d976f0f742b4a1b1fc35a82fb2342ddd6 100644 >--- a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >+++ b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >@@ -42,6 +42,8 @@ SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIApplicationDidEnterBackgroundNotific > SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIContentSizeCategoryDidChangeNotification, NSNotificationName) > SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIFontTextStyleCallout, UIFontTextStyle) > SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UITextEffectsBeneathStatusBarWindowLevel, UIWindowLevel) >+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIAccessibilityTextualContextSourceCode, UIAccessibilityTextualContext) >+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIAccessibilityTextAttributeContext, NSAttributedStringKey) > SOFT_LINK_CLASS_FOR_HEADER(PAL, NSParagraphStyle) > SOFT_LINK_CLASS_FOR_HEADER(PAL, NSShadow) > SOFT_LINK_CLASS_FOR_HEADER(PAL, NSTextList) >diff --git a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >index 3493b9b7f55805b80d61fe3be723180726984318..d5c2289bb60c32b8d6d8b20222e04701c08e025c 100644 >--- a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >+++ b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >@@ -42,6 +42,8 @@ SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIApplicationDidEnterBackgroundNotific > SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIContentSizeCategoryDidChangeNotification, NSNotificationName) > SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIFontTextStyleCallout, UIFontTextStyle) > SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UITextEffectsBeneathStatusBarWindowLevel, UIWindowLevel) >+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIAccessibilityTextualContextSourceCode, UIAccessibilityTextualContext) >+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIAccessibilityTextAttributeContext, NSAttributedStringKey) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSParagraphStyle) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSShadow) > SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSTextList) >diff --git a/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h b/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h >index 12f351a2155c96a3a62f18ffc645fbcb21bf94bb..18b95c76574788b487fca3cdcdd647b6ea391b8d 100644 >--- a/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h >+++ b/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h >@@ -147,8 +147,31 @@ NS_ASSUME_NONNULL_END > @end > #endif > >+#if ENABLE_INTERNAL_ACCESSIBILITY_CONSTANTS >+enum { >+ NSAttachmentCharacter = 0xfffc /* To denote attachments. */ >+}; >+ >+typedef NS_ENUM(NSInteger, UIAccessibilityScrollDirection) { >+ UIAccessibilityScrollDirectionRight = 1, >+ UIAccessibilityScrollDirectionLeft, >+ UIAccessibilityScrollDirectionUp, >+ UIAccessibilityScrollDirectionDown, >+ UIAccessibilityScrollDirectionNext, >+ UIAccessibilityScrollDirectionPrevious >+}; >+ >+static NSString * const UIAccessibilityTextAttributeContext = @"UIAccessibilityTextAttributeContext"; >+static NSString * const UIAccessibilityTextualContextSourceCode = @"UIAccessibilityTextualContextSourceCode"; >+ >+typedef NSString * UIAccessibilityTextualContext; >+ >+#endif >+ > #endif // USE(APPLE_INTERNAL_SDK) > >+#import <UIKit/UIAccessibilityConstants.h> >+ > #if ENABLE(FULL_KEYBOARD_ACCESS) > @interface UIColor (IPI) > + (UIColor *)keyboardFocusIndicatorColor; >diff --git a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm b/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >index 5024e68f21e86379846c849431f62a3c83785400..7a1f3c7c283c81fd778573c0ef028b53c8ec9c59 100644 >--- a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >+++ b/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >@@ -61,10 +61,7 @@ > #import "VisibleUnits.h" > > #import <CoreText/CoreText.h> >- >-enum { >- NSAttachmentCharacter = 0xfffc /* To denote attachments. */ >-}; >+#import <pal/ios/UIKitSoftLink.h> > > @interface NSObject (AccessibilityPrivate) > - (void)_accessibilityUnregister; >@@ -96,15 +93,6 @@ @end > using namespace WebCore; > using namespace HTMLNames; > >-typedef NS_ENUM(NSInteger, UIAccessibilityScrollDirection) { >- UIAccessibilityScrollDirectionRight = 1, >- UIAccessibilityScrollDirectionLeft, >- UIAccessibilityScrollDirectionUp, >- UIAccessibilityScrollDirectionDown, >- UIAccessibilityScrollDirectionNext, >- UIAccessibilityScrollDirectionPrevious >-}; >- > // These are tokens accessibility uses to denote attributes. > static NSString * const UIAccessibilityTokenBlockquoteLevel = @"UIAccessibilityTokenBlockquoteLevel"; > static NSString * const UIAccessibilityTokenHeadingLevel = @"UIAccessibilityTokenHeadingLevel"; >@@ -117,9 +105,6 @@ static NSString * const UIAccessibilityTokenUnderline = @"UIAccessibilityTokenUn > static NSString * const UIAccessibilityTokenLanguage = @"UIAccessibilityTokenLanguage"; > static NSString * const UIAccessibilityTokenAttachment = @"UIAccessibilityTokenAttachment"; > >-static NSString * const UIAccessibilityTextAttributeContext = @"UIAccessibilityTextAttributeContext"; >-static NSString * const UIAccessibilityTextualContextSourceCode = @"UIAccessibilityTextualContextSourceCode"; >- > static AccessibilityObjectWrapper* AccessibilityUnignoredAncestor(AccessibilityObjectWrapper *wrapper) > { > while (wrapper && ![wrapper isAccessibilityElement]) { >@@ -1195,6 +1180,8 @@ - (id)accessibilityTitleElement > } > > // Meant to return row or column headers (or other things as the future permits). >+#pragma clang diagnostic push >+#pragma clang diagnostic ignored "-Wdeprecated-implementations" > - (NSArray *)accessibilityHeaderElements > { > if (![self _prepareAccessibilityCall]) >@@ -1246,6 +1233,7 @@ - (NSArray *)accessibilityHeaderElements > > return headers; > } >+#pragma clang diagnostic pop > > - (id)accessibilityElementForRow:(NSInteger)row andColumn:(NSInteger)column > { >@@ -1811,7 +1799,7 @@ - (NSString *)accessibilityTextualContext > return nil; > > if (m_object->node() && m_object->node()->hasTagName(codeTag)) >- return UIAccessibilityTextualContextSourceCode; >+ return PAL::get_UIKit_UIAccessibilityTextualContextSourceCode(); > > return nil; > } >@@ -2183,7 +2171,7 @@ static void AXAttributeStringSetStyle(NSMutableAttributedString* attrString, Ren > }; > > if (const AccessibilityObject* parent = AccessibilityObject::matchedParent(*axObject, true, WTFMove(matchFunc))) >- [attrString addAttribute:UIAccessibilityTextAttributeContext value:UIAccessibilityTextualContextSourceCode range:range]; >+ [attrString addAttribute:PAL::get_UIKit_UIAccessibilityTextAttributeContext() value:PAL::get_UIKit_UIAccessibilityTextualContextSourceCode() range:range]; > } > > static void AXAttributedStringAppendText(NSMutableAttributedString* attrString, Node* node, NSString *text) >diff --git a/Source/WebCore/platform/mac/WebNSAttributedStringExtras.mm b/Source/WebCore/platform/mac/WebNSAttributedStringExtras.mm >index 572c35f183064c8a888b1c9da64a1162ddddcf04..254b22d660a6eb64971da88baf3964d19a31272f 100644 >--- a/Source/WebCore/platform/mac/WebNSAttributedStringExtras.mm >+++ b/Source/WebCore/platform/mac/WebNSAttributedStringExtras.mm >@@ -27,13 +27,7 @@ > #import "WebNSAttributedStringExtras.h" > > #if PLATFORM(IOS_FAMILY) >-#if USE(APPLE_INTERNAL_SDK) >-#import <UIKit/NSTextAttachment.h> >-#else >-enum { >- NSAttachmentCharacter = 0xfffc /* To denote attachments. */ >-}; >-#endif >+#import <pal/ios/UIKitSoftLink.h> > #endif > > namespace WebCore {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197222
:
368093
|
368096
|
368147
|
368168
|
368173
|
368179
|
368184
|
368253
| 368255