Summary: | WKWebView doesn’t respond to -copyFont: and -pasteFont: | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | mitz | ||||||||||||||
Component: | HTML Editing | Assignee: | Devin Rousso <hi> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | akeerthi, cdumez, esprehn+autocc, ews-watchlist, hi, kangil.han, megan_gardner, mifenton, rniwa, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||
Version: | Other | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | 233938, 233939, 233940, 234065 | ||||||||||||||||
Bug Blocks: | 234185 | ||||||||||||||||
Attachments: |
|
Description
mitz
2018-11-07 09:50:52 PST
Created attachment 446245 [details]
Patch
Created attachment 446257 [details]
Patch
rebase
Created attachment 446498 [details]
Patch
Created attachment 446795 [details]
Patch
Comment on attachment 446795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446795&action=review r=mews > Source/WebCore/editing/mac/EditorMac.mm:109 > +void Editor::platformCopyFont() We should file a followup to unify this code with the WebKitLegacy implementation in WebHTMLView. > Source/WebCore/editing/mac/EditorMac.mm:125 > +void Editor::platformPasteFont() Same, for this. > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4174 > + // FIXME: Does iOS have a different pasteboard for fonts? iOS does not support a dedicated font pasteboard, no. Falling back to the general pasteboard is probably okay here (and we can remove the FIXME). > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4186 > + // FIXME: Does iOS have a different pasteboard for fonts? Ditto. > Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:1555 > + // FIXME: Does iOS have a different pasteboard for fonts? Ditto. > Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:663 > + grantAccessToCurrentPasteboardData(NSFontPboard); Can you use `NSPasteboardNameFont` instead of suppressing deprecation warnings? Comment on attachment 446795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446795&action=review > LayoutTests/editing/execCommand/mac/copyFont-pasteFont-expected.html:4 > +#copy { Nit - indentation is a bit off in a few places in this file. > LayoutTests/editing/execCommand/mac/copyFont-pasteFont.html:3 > + <script src=../../editing.js></script> Ditto, re: indentation. Comment on attachment 446795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446795&action=review >> LayoutTests/editing/execCommand/mac/copyFont-pasteFont-expected.html:4 >> +#copy { > > Nit - indentation is a bit off in a few places in this file. Oh lol that's just my personal preference. I find that indenting inline CSS/JS to match the indentation of the surrounding DOM is odd because if you then did `style.textContent` there'd be all this extra indentation for seemingly no reason. Created attachment 446837 [details]
Patch
Created attachment 446842 [details]
Patch
Committed r286894 (245122@main): <https://commits.webkit.org/245122@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 446842 [details]. |