Summary: | [macOS] [WK2] NSFontPanel UI (font color, text decorations, font shadow) doesn't update on selection change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||||||
Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | ap, bdakin, darin, enrica, ews-watchlist, mifenton, mitz, thorton, webkit-bug-importer, wenson_hsieh | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | 234770 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Wenson Hsieh
2018-09-30 15:36:25 PDT
WebViewImpl::updateFontPanelIfNeeded already updates NSFontManager's selected font, but this isn't enough; we also need to call -setSelectedAttributes:isMultiple:. Created attachment 351677 [details]
Patch
Comment on attachment 351677 [details]
Patch
(Removing r?, as this patch is terribly out of date)
Created attachment 448137 [details]
Depends on #234770
Created attachment 448162 [details]
Rebase on trunk
Comment on attachment 448162 [details] Rebase on trunk View in context: https://bugs.webkit.org/attachment.cgi?id=448162&action=review > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:3060 > + auto attributesDictionary = attributes.createDictionary(); > + if (NSFont *nsFont = [attributesDictionary objectForKey:NSFontAttributeName]) { Seems a small waste to build the whole dictionary just to get the font. Comment on attachment 448162 [details] Rebase on trunk View in context: https://bugs.webkit.org/attachment.cgi?id=448162&action=review Thanks for the review! >> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:3060 >> + if (NSFont *nsFont = [attributesDictionary objectForKey:NSFontAttributeName]) { > > Seems a small waste to build the whole dictionary just to get the font. Good point — changed this so that we only create the attributes dictionary in the case where the platform NSFont exists. Created attachment 448957 [details]
For landing
Committed r287953 (245982@main): <https://commits.webkit.org/245982@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448957 [details]. |