WebKit Bugzilla
Attachment 349407 Details for
Bug 188008
: Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188008-20180911102626.patch (text/plain), 4.50 KB, created by
Myles C. Maxfield
on 2018-09-11 10:26:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2018-09-11 10:26:27 PDT
Size:
4.50 KB
patch
obsolete
>Subversion Revision: 235897 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index ef4d3e4b0d8b22081123ed8784715c1bf4f74b9f..26eeb216364e6640faefc7ac40d9233c05a70373 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2018-09-11 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts >+ https://bugs.webkit.org/show_bug.cgi?id=188008 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=180307. >+ Variable fonts have CFDictionaries with non-string keys. We need to support that in our IPC code. >+ >+ * Shared/cf/ArgumentCodersCF.cpp: >+ (IPC::encode): >+ (IPC::decode): >+ > 2018-09-11 Woodrow Wang <woodrow_wang@apple.com> > > Add Web API Statistics Collection >diff --git a/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp b/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >index e3f3056668630a4b5afeb984c9de4dede5015c0b..90afb5b611f3f28e88ba6909202d83933feb9c5a 100644 >--- a/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >+++ b/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >@@ -427,14 +427,13 @@ void encode(Encoder& encoder, CFDictionaryRef dictionary) > > for (CFIndex i = 0; i < size; ++i) { > ASSERT(keys[i]); >- ASSERT(CFGetTypeID(keys[i]) == CFStringGetTypeID()); > ASSERT(values[i]); > > // Ignore values we don't recognize. > if (typeFromCFTypeRef(values[i]) == Unknown) > continue; > >- encode(encoder, static_cast<CFStringRef>(keys[i])); >+ encode(encoder, keys[i]); > encode(encoder, values[i]); > } > } >@@ -456,7 +455,7 @@ bool decode(Decoder& decoder, RetainPtr<CFDictionaryRef>& result) > RetainPtr<CFMutableDictionaryRef> dictionary = adoptCF(CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); > for (uint64_t i = 0; i < size; ++i) { > // Try to decode the key name. >- RetainPtr<CFStringRef> key; >+ RetainPtr<CFTypeRef> key; > if (!decode(decoder, key)) > return false; > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 77060e2d2cfccf45d5c5b0cb2eafdfe024d9ea6f..ea57d385f108e5a151ce8ce3ed11c7d50d5e6ec3 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-09-11 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts >+ https://bugs.webkit.org/show_bug.cgi?id=188008 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/text/variations/ipc2-expected.txt: Added. >+ * fast/text/variations/ipc2.html: Added. >+ > 2018-09-11 Woodrow Wang <woodrow_wang@apple.com> > > Add Web API Statistics Collection >diff --git a/LayoutTests/fast/text/variations/ipc2-expected.txt b/LayoutTests/fast/text/variations/ipc2-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0ad95989f749bec68a8a941d4a084015cb8dd80b >--- /dev/null >+++ b/LayoutTests/fast/text/variations/ipc2-expected.txt >@@ -0,0 +1 @@ >+This makes sure that variable fonts can be sent across IPC. The test passes if there is no crash. >diff --git a/LayoutTests/fast/text/variations/ipc2.html b/LayoutTests/fast/text/variations/ipc2.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6a181f8f449cce67ef6d0b4a4425b82fbc13eb5a >--- /dev/null >+++ b/LayoutTests/fast/text/variations/ipc2.html >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<style> >+@font-face { >+ font-family: "Boxis"; >+ src: url("resources/Boxis-VF.ttf") format("truetype"); >+} >+</style> >+<script> >+if (window.testRunner) { >+ testRunner.dumpAsText(); >+ testRunner.waitUntilDone(); >+} >+function test() { >+ let target = document.getElementById("target"); >+ let x = target.offsetLeft + target.offsetWidth / 2; >+ let y = target.offsetTop + target.offsetHeight / 2; >+ if (window.eventSender) { >+ eventSender.mouseMoveTo(x, y); >+ eventSender.mouseDown(); >+ eventSender.mouseUp(); >+ } >+ if (window.testRunner) >+ testRunner.notifyDone(); >+} >+window.addEventListener("load", test); >+</script> >+</head> >+<body> >+This makes sure that variable fonts can be sent across IPC. The test passes if there is no crash. >+<select id="target" style="border:0; font-family: 'Boxis';"> >+ <option>Select option</option> >+ <option>1</option> >+ <option>2</option> >+ <option>3</option> >+</select> >+</body> >+</html>
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 188008
:
346004
|
349373
|
349378
| 349407