Add new NSAttributedString API for converting HTML.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2019 23:32:20 +0000 (23:32 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2019 23:32:20 +0000 (23:32 +0000)
commitf6f6caab7a3d896050b887109107881e289717c6
treefc6f14f3a90a080f7b0fa8262792eda6a4fa5c31
parent629d681cb669f2d188660b23198570449492b37c
Add new NSAttributedString API for converting HTML.
https://bugs.webkit.org/show_bug.cgi?id=195636
rdar://problem/45055697

Reviewed by Tim Horton.

Source/WebCore:

* en.lproj/Localizable.strings: Updated.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* SourcesCocoa.txt:
* UIProcess/API/Cocoa/NSAttributedString.h: Added.
* UIProcess/API/Cocoa/NSAttributedString.mm: Added.
(-[_WKAttributedStringNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[_WKAttributedStringNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(-[_WKAttributedStringNavigationDelegate webView:didFailNavigation:withError:]):
(-[_WKAttributedStringNavigationDelegate webView:didFinishNavigation:]):
(+[_WKAttributedStringWebViewCache cache]):
(+[_WKAttributedStringWebViewCache configuration]):
(+[_WKAttributedStringWebViewCache clearConfiguration]):
(+[_WKAttributedStringWebViewCache retrieveOrCreateWebView]):
(+[_WKAttributedStringWebViewCache cacheWebView:]):
(+[_WKAttributedStringWebViewCache resetPurgeDelay]):
(+[_WKAttributedStringWebViewCache purgeSingleWebView]):
(+[_WKAttributedStringWebViewCache purgeAllWebViews]):
(+[NSAttributedString _loadFromHTMLWithOptions:contentLoader:completionHandler:]):
(+[NSAttributedString loadFromHTMLWithRequest:options:completionHandler:]):
(+[NSAttributedString loadFromHTMLWithFileURL:options:completionHandler:]):
(+[NSAttributedString loadFromHTMLWithString:options:completionHandler:]):
(+[NSAttributedString loadFromHTMLWithData:options:completionHandler:]):
* UIProcess/API/Cocoa/NSAttributedStringPrivate.h: Copied from Source/WebKit/UIProcess/API/Cocoa/WKErrorInternal.h.
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/WKError.mm:
(localizedDescriptionForErrorCode):
(createNSError):
* UIProcess/API/Cocoa/WKErrorInternal.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::getContentsAsAttributedString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/en.lproj/Localizable.strings
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.h [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/NSAttributedString.mm [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/NSAttributedStringPrivate.h [new file with mode: 0644]
Source/WebKit/UIProcess/API/Cocoa/WKError.h
Source/WebKit/UIProcess/API/Cocoa/WKError.mm
Source/WebKit/UIProcess/API/Cocoa/WKErrorInternal.h
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm