Bug 173301

Summary: REGRESSION(r209495): materiauxlaverdure.com fails to load
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: CSSAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, buildbot, cdumez, commit-queue, dino, hyatt, koivisto, mcatanzaro, rniwa, simon.fraser, zalan
Priority: P2 Keywords: InRadar, Regression
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
URL: http://app.materiauxlaverdure.com/app/
Attachments:
Description Flags
Fixes the bug
none
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews102 for mac-elcapitan
none
Archive of layout-test-results from ews115 for mac-elcapitan
none
Archive of layout-test-results from ews126 for ios-simulator-wk2
none
Rebaselined the tests
none
Removed superfluous enum koivisto: review+, commit-queue: commit-queue-

Description Ryosuke Niwa 2017-06-12 22:23:47 PDT
materiauxlaverdure.com fails to load on STP and Safari 10.1.x.

WebKit's getPropertyValue serializes the compute style value of '{name: \"flat\"}' as '{name: \"flat\"}'
unlike Chrome and Firefox which serializes it as "{name: \"flat\"}"

Because the website only strips away double quotation marks, this results in the website not loading in Safari.
Comment 1 Ryosuke Niwa 2017-06-12 22:24:01 PDT
<rdar://problem/32624850>
Comment 2 Simon Fraser (smfr) 2017-06-12 22:49:41 PDT
That comes out of the mootools library, so this could affect more sites.
Comment 3 Chris Dumez 2017-06-13 09:52:30 PDT
var content = element.getStyle('content');
if (content) {
    content = content.replace(/^\'/, '');
    content = content.replace(/\'$/, '');
    configs = JSON.decode(content); // This fails.
}
Comment 4 Ryosuke Niwa 2017-06-13 12:05:32 PDT
This regressed in Safari 10.1.
Comment 5 Ryosuke Niwa 2017-06-13 12:21:36 PDT
This is a regression from https://trac.webkit.org/changeset/209495
Comment 6 Ryosuke Niwa 2017-06-13 12:52:30 PDT
Now interesting. The old serialization was wrong but in a way that was compatible with mootools library. We were serializing it as '{name: "flat"}' instead of '{name: \"flat\"}' so eval worked.
Comment 7 Ryosuke Niwa 2017-06-13 21:46:17 PDT
Created attachment 312856 [details]
Fixes the bug
Comment 8 Build Bot 2017-06-13 22:31:36 PDT
Comment on attachment 312856 [details]
Fixes the bug

Attachment 312856 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/3927364

New failing tests:
fast/text/font-weight-parse.html
fast/text/font-style-parse.html
fast/text/font-stretch-parse.html
fast/css/getComputedStyle/computed-style-font-family.html
fast/css/serialization-with-double-quotes.html
Comment 9 Build Bot 2017-06-13 22:31:38 PDT
Created attachment 312857 [details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 10 Build Bot 2017-06-13 22:45:38 PDT
Comment on attachment 312856 [details]
Fixes the bug

Attachment 312856 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/3927421

New failing tests:
fast/text/font-weight-parse.html
fast/text/font-style-parse.html
fast/text/font-stretch-parse.html
fast/css/getComputedStyle/computed-style-font-family.html
fast/css/serialization-with-double-quotes.html
Comment 11 Build Bot 2017-06-13 22:45:40 PDT
Created attachment 312858 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 12 Build Bot 2017-06-13 23:10:03 PDT
Comment on attachment 312856 [details]
Fixes the bug

Attachment 312856 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3927436

New failing tests:
fast/text/font-weight-parse.html
fast/text/font-style-parse.html
fast/text/font-stretch-parse.html
fast/css/getComputedStyle/computed-style-font-family.html
fast/css/serialization-with-double-quotes.html
Comment 13 Build Bot 2017-06-13 23:10:04 PDT
Created attachment 312861 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 14 Build Bot 2017-06-13 23:12:18 PDT
Comment on attachment 312856 [details]
Fixes the bug

Attachment 312856 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3927441

New failing tests:
fast/css/serialization-with-double-quotes.html
Comment 15 Build Bot 2017-06-13 23:12:20 PDT
Created attachment 312862 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 16 Ryosuke Niwa 2017-06-14 16:21:50 PDT
Created attachment 312929 [details]
Rebaselined the tests
Comment 17 Antti Koivisto 2017-06-14 23:39:46 PDT
Comment on attachment 312929 [details]
Rebaselined the tests

View in context: https://bugs.webkit.org/attachment.cgi?id=312929&action=review

> Source/WebCore/css/CSSMarkup.h:32
> +enum class CSSSerializationQuotationMode { Single, Double };

I can't find any uses for CSSSerializationQuotationMode::Single in this patch. Am I missing something obvious?
Comment 18 Ryosuke Niwa 2017-06-15 00:45:07 PDT
Comment on attachment 312929 [details]
Rebaselined the tests

View in context: https://bugs.webkit.org/attachment.cgi?id=312929&action=review

>> Source/WebCore/css/CSSMarkup.h:32
>> +enum class CSSSerializationQuotationMode { Single, Double };
> 
> I can't find any uses for CSSSerializationQuotationMode::Single in this patch. Am I missing something obvious?

Oops, that's a good point. I iteratively removed each instance of ::Single but we don't seem to have one anymore.
Comment 19 Ryosuke Niwa 2017-06-16 18:33:21 PDT
Created attachment 313173 [details]
Removed superfluous enum
Comment 20 Ryosuke Niwa 2017-06-16 23:33:56 PDT
Comment on attachment 313173 [details]
Removed superfluous enum

Thanks for the review.
Comment 21 WebKit Commit Bot 2017-06-17 00:02:46 PDT
Comment on attachment 313173 [details]
Removed superfluous enum

Rejecting attachment 313173 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 313173, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ayoutTests/imported/w3c/ChangeLog
error: Error building trees

Failed to run "['git', 'commit', '--all', '-F', '-']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

You have both LayoutTests/imported/w3c and LayoutTests/imported/w3c/ChangeLog
You have both LayoutTests/imported/w3c and LayoutTests/imported/w3c/ChangeLog
error: Error building trees

Failed to run "['git', 'commit', '--all', '-F', '-']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
Current branch master is up to date.

Full output: http://webkit-queues.webkit.org/results/3946389
Comment 22 Ryosuke Niwa 2017-06-17 00:21:15 PDT
Committed r218446: <http://trac.webkit.org/changeset/218446>
Comment 23 Michael Catanzaro 2017-07-06 22:22:45 PDT
Committed r219243: <http://trac.webkit.org/changeset/219243>