Revert https://trac.webkit.org/r235910, because the new test times out.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Sep 2018 17:11:15 +0000 (17:11 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Sep 2018 17:11:15 +0000 (17:11 +0000)
Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
https://bugs.webkit.org/show_bug.cgi?id=188008

Source/WebKit:

* Shared/cf/ArgumentCodersCF.cpp:
(IPC::encode):
(IPC::decode):

LayoutTests:

* fast/text/variations/ipc2-expected.txt: Removed.
* fast/text/variations/ipc2.html: Removed.
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/text/variations/ipc2-expected.txt [deleted file]
LayoutTests/fast/text/variations/ipc2.html [deleted file]
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebKit/ChangeLog
Source/WebKit/Shared/cf/ArgumentCodersCF.cpp

index 7d6b928..9fe498c 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-17  Alexey Proskuryakov  <ap@apple.com>
+
+        Revert https://trac.webkit.org/r235910, because the new test times out.
+        Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
+        https://bugs.webkit.org/show_bug.cgi?id=188008
+
+        * fast/text/variations/ipc2-expected.txt: Removed.
+        * fast/text/variations/ipc2.html: Removed.
+        * platform/mac-wk1/TestExpectations:
+
 2018-09-17  Dawei Fenton  <realdawei@apple.com>
 
         Layout Test imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html is a flaky failure.
diff --git a/LayoutTests/fast/text/variations/ipc2-expected.txt b/LayoutTests/fast/text/variations/ipc2-expected.txt
deleted file mode 100644 (file)
index 0ad9598..0000000
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644 (file)
index 6a181f8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!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>
index 8686f53..27fbfd7 100644 (file)
@@ -614,7 +614,6 @@ webkit.org/b/188357 legacy-animation-engine/compositing/layer-creation/animation
 
 webkit.org/b/189087 svg/animations/animate-end-attribute-numeric-precision.html [ Pass Failure ]
 
-webkit.org/b/188008 fast/text/variations/ipc2.html [ Skip ]
 webkit.org/b/189594 imported/w3c/web-platform-tests/css/css-animations/pending-style-changes-001.html [ Pass Failure ]
 
 webkit.org/b/188070 imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html [ Pass Failure ]
index b110bd0..2f7d6af 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-17  Alexey Proskuryakov  <ap@apple.com>
+
+        Revert https://trac.webkit.org/r235910, because the new test times out.
+        Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
+        https://bugs.webkit.org/show_bug.cgi?id=188008
+
+        * Shared/cf/ArgumentCodersCF.cpp:
+        (IPC::encode):
+        (IPC::decode):
+
 2018-09-17  Alex Christensen  <achristensen@webkit.org>
 
         Refactoring related to Safe Browsing
index 90afb5b..e3f3056 100644 (file)
@@ -427,13 +427,14 @@ 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, keys[i]);
+        encode(encoder, static_cast<CFStringRef>(keys[i]));
         encode(encoder, values[i]);
     }
 }
@@ -455,7 +456,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<CFTypeRef> key;
+        RetainPtr<CFStringRef> key;
         if (!decode(decoder, key))
             return false;