WebKit Bugzilla
Attachment 347097 Details for
Bug 188569
: Crashes in Quip under _dictionaryPopupInfoForRange, in setObject:forKey:
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188569-20180814115120.patch (text/plain), 3.99 KB, created by
Tim Horton
on 2018-08-14 11:51:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2018-08-14 11:51:21 PDT
Size:
3.99 KB
patch
obsolete
>Subversion Revision: 234857 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 33b11eb01641aa739a1272e7b108659d07540366..bdaacd06b6a33adb5ee50861f329c168b6b9119a 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+2018-08-14 Tim Horton <timothy_horton@apple.com> >+ >+ Crashes in Quip under _dictionaryPopupInfoForRange, in setObject:forKey: >+ https://bugs.webkit.org/show_bug.cgi?id=188569 >+ <rdar://problem/34201095> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/mac/WebPageMac.mm: >+ (WebKit::WebPage::dictionaryPopupInfoForRange): >+ Speculative fix; the crashes indicate font is null, but we just checked it, >+ so it must be getting made null by convertFont:toSize:. Check again! >+ > 2018-08-14 Antti Koivisto <antti@apple.com> > > RemoteLayerTreeTransaction should use OptionSet for change flags >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 77093f102445849d564e90ff87bad866f1a160df..624ef632b1c406e3a0aaaaba11a954e68b6c1f35 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2018-08-14 Tim Horton <timothy_horton@apple.com> >+ >+ Crashes in Quip under _dictionaryPopupInfoForRange, in setObject:forKey: >+ https://bugs.webkit.org/show_bug.cgi?id=188569 >+ <rdar://problem/34201095> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebImmediateActionController.mm: >+ (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]): >+ Speculative fix; the crashes indicate font is null, but we just checked it, >+ so it must be getting made null by convertFont:toSize:. Check again! >+ > 2018-08-13 Alex Christensen <achristensen@webkit.org> > > Use a 1-byte enum class for TextDirection >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >index 76279f8dab75d2a3ccdd1ce5709aaf652556a851..d6e6d465518292b3e38cff9e50b36b7bf781912b 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >@@ -462,10 +462,10 @@ DictionaryPopupInfo WebPage::dictionaryPopupInfoForRange(Frame& frame, Range& ra > RetainPtr<NSMutableDictionary> scaledAttributes = adoptNS([attributes mutableCopy]); > > NSFont *font = [scaledAttributes objectForKey:NSFontAttributeName]; >- if (font) { >- font = [fontManager convertFont:font toSize:[font pointSize] * pageScaleFactor()]; >+ if (font) >+ font = [fontManager convertFont:font toSize:font.pointSize * pageScaleFactor()]; >+ if (font) > [scaledAttributes setObject:font forKey:NSFontAttributeName]; >- } > > [scaledNSAttributedString addAttributes:scaledAttributes.get() range:range]; > }]; >diff --git a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm >index 551589a24c3de7c109e5e153f585512e7c5b555c..754cccc1af2806558cef96b88cc6e68733ca22a6 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm >@@ -528,10 +528,10 @@ + (DictionaryPopupInfo)_dictionaryPopupInfoForRange:(Range&)range inFrame:(Frame > RetainPtr<NSMutableDictionary> scaledAttributes = adoptNS([attributes mutableCopy]); > > NSFont *font = [scaledAttributes objectForKey:NSFontAttributeName]; >- if (font) { >- font = [fontManager convertFont:font toSize:[font pointSize] * frame->page()->pageScaleFactor()]; >+ if (font) >+ font = [fontManager convertFont:font toSize:font.pointSize * frame->page()->pageScaleFactor()]; >+ if (font) > [scaledAttributes setObject:font forKey:NSFontAttributeName]; >- } > > [scaledNSAttributedString addAttributes:scaledAttributes.get() range:attributeRange]; > }];
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 188569
: 347097