Diff
Modified: trunk/LayoutTests/ChangeLog (262405 => 262406)
--- trunk/LayoutTests/ChangeLog 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/ChangeLog 2020-06-02 05:49:47 UTC (rev 262406)
@@ -1,3 +1,32 @@
+2020-06-01 Noam Rosenthal <n...@webkit.org>
+
+ Make unicode-bidi:isolate the default for an element with a dir attribute (instead of unicode-bidi:embed)
+ https://bugs.webkit.org/show_bug.cgi?id=134630
+
+ Reviewed by Simon Fraser.
+
+ * TestExpectations:
+ Unskipped w3c tests that now pass, testing this behavior.
+
+ * fast/css/default-bidi-css-rules-expected.txt:
+ * fast/css/default-bidi-css-rules.html:
+ This test was modified, as the default bidi CSS rules are modified.
+
+ * editing/selection/move-by-word-visually-mac-expected.txt:
+ * editing/selection/move-by-word-visually-single-space-inline-element.html:
+ * editing/style/make-text-writing-direction-inline-mac.html:
+ * editing/style/make-text-writing-direction-inline-win.html:
+ * fast/css/absolute-inline-alignment-2-expected.html:
+ * fast/css/absolute-inline-alignment-2.html:
+ * fast/text/bidi-embedding-pop-and-push-same.html:
+ * fast/text/bidi-reverse-runs-crash-expected.txt:
+ * fast/text/bidi-reverse-runs-crash.html:
+ * fast/text/international/bidi-LDB-2-HTML.html:
+ * fast/text/international/bidi-ignored-for-first-child-inline.html:
+ * fast/text/international/iso-8859-8.html:
+ These tests rely on the previous unicode-bidi: embed default.
+ Modified them to include that old default explicitly in the test, as they test something else.
+
2020-06-01 Chris Dumez <cdu...@apple.com>
Update web-platform-tests/webaudio from upstream
Modified: trunk/LayoutTests/TestExpectations (262405 => 262406)
--- trunk/LayoutTests/TestExpectations 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/TestExpectations 2020-06-02 05:49:47 UTC (rev 262406)
@@ -390,17 +390,6 @@
imported/w3c/web-platform-tests/2dcontext/wide-gamut-canvas/canvas-createImageBitmap-e_srgb.html [ Skip ]
# Newly imported WPT ref tests failures.
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html [ ImageOnlyFailure ]
-imported/w3c/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-008.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-010.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/rendering/bindings/the-select-element-0/option-label.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-mac.html (262405 => 262406)
--- trunk/LayoutTests/editing/selection/move-by-word-visually-mac.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-mac.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -5,6 +5,7 @@
<link rel="stylesheet" type="text/css" href="" />
<style>
test_move_by_word {display: none;}
+*[dir] {unicode-bidi: embed}
</style>
<script src=""
<script>
Modified: trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html (262405 => 262406)
--- trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -5,6 +5,9 @@
<link rel="stylesheet" type="text/css" href="" />
<style>
test_move_by_word {display: none;}
+*[dir] {
+ unicode-bidi: embed
+}
</style>
<script src=""
<script>
Modified: trunk/LayoutTests/editing/style/make-text-writing-direction-inline-mac.html (262405 => 262406)
--- trunk/LayoutTests/editing/style/make-text-writing-direction-inline-mac.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/editing/style/make-text-writing-direction-inline-mac.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -7,6 +7,7 @@
<body>
<p id="description"></p>
<div id="console"></div>
+<style>*[dir] { unicode-bidi: embed;}</style>
<script>
description('Tests to ensure MakeTextWritingDirection* modifies the direction of text and embed texts properly.');
Modified: trunk/LayoutTests/editing/style/make-text-writing-direction-inline-win.html (262405 => 262406)
--- trunk/LayoutTests/editing/style/make-text-writing-direction-inline-win.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/editing/style/make-text-writing-direction-inline-win.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -7,6 +7,7 @@
<body>
<p id="description"></p>
<div id="console"></div>
+<style>*[dir] { unicode-bidi: embed;}</style>
<script>
description('Tests to ensure MakeTextWritingDirection* modifies the direction of text and embed texts properly.');
Modified: trunk/LayoutTests/fast/css/absolute-inline-alignment-2-expected.html (262405 => 262406)
--- trunk/LayoutTests/fast/css/absolute-inline-alignment-2-expected.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/css/absolute-inline-alignment-2-expected.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -19,7 +19,7 @@
</style>
<div dir="rtl">​<span id="absolute"></span>Lorem ipsum dolor sit amet</span></div>
<div dir="ltr">​<span id="absolute"></span>Lorem ipsum dolor sit amet</span></div>
-<div>​<span dir="rtl"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>
+<div>​<span dir="rtl" style="unicode-bidi: embed"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>
<div>​<span id="absolute"></span>Lorem ipsum dolor sit amet</div>
<div style="text-align: left;">​<span dir="rtl"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>
<div style="text-align: right;">​<span dir="rtl"><span id="absolute"></span>Lorem ipsum dolor sit amet</span></span></div>
Modified: trunk/LayoutTests/fast/css/absolute-inline-alignment-2.html (262405 => 262406)
--- trunk/LayoutTests/fast/css/absolute-inline-alignment-2.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/css/absolute-inline-alignment-2.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -16,6 +16,10 @@
height: 25px;
background-color: rgba(0, 0, 255, 0.5);
}
+
+ span {
+ unicode-bidi: embed;
+ }
</style>
<div dir="rtl"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></div>
<div dir="ltr"><span id="absolute"></span> Lorem ipsum dolor sit amet</span></div>
Modified: trunk/LayoutTests/fast/css/default-bidi-css-rules-expected.txt (262405 => 262406)
--- trunk/LayoutTests/fast/css/default-bidi-css-rules-expected.txt 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/css/default-bidi-css-rules-expected.txt 2020-06-02 05:49:47 UTC (rev 262406)
@@ -3,9 +3,9 @@
PASS styleOf("div", {}).direction is "ltr"
FAIL styleOf("div", {}).unicodeBidi should be isolate. Was normal.
PASS styleOf("div", {"dir":"ltr"}).direction is "ltr"
-PASS styleOf("div", {"dir":"ltr"}).unicodeBidi is "embed"
+PASS styleOf("div", {"dir":"ltr"}).unicodeBidi is "isolate"
PASS styleOf("div", {"dir":"rtl"}).direction is "rtl"
-PASS styleOf("div", {"dir":"rtl"}).unicodeBidi is "embed"
+PASS styleOf("div", {"dir":"rtl"}).unicodeBidi is "isolate"
PASS styleOf("div", {"dir":"auto"}).direction is "ltr"
PASS styleOf("div", {"dir":"auto"}).unicodeBidi is "isolate"
PASS styleOf("div", {"dir":""}).direction is "ltr"
@@ -13,9 +13,9 @@
PASS styleOf("span", {}).direction is "ltr"
PASS styleOf("span", {}).unicodeBidi is "normal"
PASS styleOf("span", {"dir":"ltr"}).direction is "ltr"
-PASS styleOf("span", {"dir":"ltr"}).unicodeBidi is "embed"
+PASS styleOf("span", {"dir":"ltr"}).unicodeBidi is "isolate"
PASS styleOf("span", {"dir":"rtl"}).direction is "rtl"
-PASS styleOf("span", {"dir":"rtl"}).unicodeBidi is "embed"
+PASS styleOf("span", {"dir":"rtl"}).unicodeBidi is "isolate"
PASS styleOf("span", {"dir":"auto"}).direction is "ltr"
PASS styleOf("span", {"dir":"auto"}).unicodeBidi is "isolate"
PASS styleOf("span", {"dir":""}).direction is "ltr"
@@ -53,9 +53,9 @@
PASS styleOf("textarea", {}).direction is "ltr"
PASS styleOf("textarea", {}).unicodeBidi is "normal"
PASS styleOf("textarea", {"dir":"ltr"}).direction is "ltr"
-PASS styleOf("textarea", {"dir":"ltr"}).unicodeBidi is "embed"
+PASS styleOf("textarea", {"dir":"ltr"}).unicodeBidi is "isolate"
PASS styleOf("textarea", {"dir":"rtl"}).direction is "rtl"
-PASS styleOf("textarea", {"dir":"rtl"}).unicodeBidi is "embed"
+PASS styleOf("textarea", {"dir":"rtl"}).unicodeBidi is "isolate"
PASS styleOf("textarea", {"dir":"auto"}).direction is "ltr"
PASS styleOf("textarea", {"dir":"auto"}).unicodeBidi is "plaintext"
PASS styleOf("textarea", {"dir":""}).direction is "ltr"
@@ -63,9 +63,9 @@
PASS styleOf("pre", {}).direction is "ltr"
PASS styleOf("pre", {}).unicodeBidi is "normal"
PASS styleOf("pre", {"dir":"ltr"}).direction is "ltr"
-PASS styleOf("pre", {"dir":"ltr"}).unicodeBidi is "embed"
+PASS styleOf("pre", {"dir":"ltr"}).unicodeBidi is "isolate"
PASS styleOf("pre", {"dir":"rtl"}).direction is "rtl"
-PASS styleOf("pre", {"dir":"rtl"}).unicodeBidi is "embed"
+PASS styleOf("pre", {"dir":"rtl"}).unicodeBidi is "isolate"
PASS styleOf("pre", {"dir":"auto"}).direction is "ltr"
PASS styleOf("pre", {"dir":"auto"}).unicodeBidi is "plaintext"
PASS styleOf("pre", {"dir":""}).direction is "ltr"
Modified: trunk/LayoutTests/fast/css/default-bidi-css-rules.html (262405 => 262406)
--- trunk/LayoutTests/fast/css/default-bidi-css-rules.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/css/default-bidi-css-rules.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -21,14 +21,14 @@
var tests = [
['div', {}, 'ltr', 'isolate'],
- ['div', {'dir': 'ltr'}, 'ltr', 'embed'],
- ['div', {'dir': 'rtl'}, 'rtl', 'embed'],
+ ['div', {'dir': 'ltr'}, 'ltr', 'isolate'],
+ ['div', {'dir': 'rtl'}, 'rtl', 'isolate'],
['div', {'dir': 'auto'}, 'ltr', 'isolate'],
['div', {'dir': ''}, 'ltr', 'embed'],
['span', {}, 'ltr', 'normal'],
- ['span', {'dir': 'ltr'}, 'ltr', 'embed'],
- ['span', {'dir': 'rtl'}, 'rtl', 'embed'],
+ ['span', {'dir': 'ltr'}, 'ltr', 'isolate'],
+ ['span', {'dir': 'rtl'}, 'rtl', 'isolate'],
['span', {'dir': 'auto'}, 'ltr', 'isolate'],
['span', {'dir': ''}, 'ltr', 'embed'],
@@ -51,14 +51,14 @@
['bdo', {'dir': ''}, 'ltr', 'bidi-override'],
['textarea', {}, 'ltr', 'normal'],
- ['textarea', {'dir': 'ltr'}, 'ltr', 'embed'],
- ['textarea', {'dir': 'rtl'}, 'rtl', 'embed'],
+ ['textarea', {'dir': 'ltr'}, 'ltr', 'isolate'],
+ ['textarea', {'dir': 'rtl'}, 'rtl', 'isolate'],
['textarea', {'dir': 'auto'}, 'ltr', 'plaintext'],
['textarea', {'dir': ''}, 'ltr', 'embed'],
['pre', {}, 'ltr', 'normal'],
- ['pre', {'dir': 'ltr'}, 'ltr', 'embed'],
- ['pre', {'dir': 'rtl'}, 'rtl', 'embed'],
+ ['pre', {'dir': 'ltr'}, 'ltr', 'isolate'],
+ ['pre', {'dir': 'rtl'}, 'rtl', 'isolate'],
['pre', {'dir': 'auto'}, 'ltr', 'plaintext'],
['pre', {'dir': ''}, 'ltr', 'embed'],
].forEach(function (test) {
Modified: trunk/LayoutTests/fast/text/bidi-embedding-pop-and-push-same.html
(Binary files differ)
Modified: trunk/LayoutTests/fast/text/international/bidi-LDB-2-HTML.html (262405 => 262406)
--- trunk/LayoutTests/fast/text/international/bidi-LDB-2-HTML.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/text/international/bidi-LDB-2-HTML.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -75,9 +75,9 @@
<table class="pair"><tr><td>ג</td><td>ב</td><td>א</td><td> </td><td>A</td><td>B</td><td>C</td><td> </td><td>ו</td><td>ה</td><td>ד</td><td> </td><td>D</td><td>E</td><td>F</td><td> </td><td>ט</td><td>ח</td><td>ז</td></tr></table>
<p class="pair">אבג ABC דהו DEF זחט</p>
<p class="pair">אבג <span>ABC דהו</span> DEF זחט</p>
-<p class="pair">אבג <span dir="ltr">ABC דהו DEF</span> זחט</p>
+<p class="pair">אבג <span dir="ltr" class="embed">ABC דהו DEF</span> זחט</p>
<p class="pair">זחט <span dir="rtl">DEF דהו ABC</span> אבג</p>
-<p class="pair">דהו <span dir="rtl">ABC אבג</span> DEF זחט</p>
+<p class="pair">דהו <span dir="rtl" class="embed">ABC אבג</span> DEF זחט</p>
<p class="pair">דהו <bdo dir="rtl">CBA אבג</bdo> DEF זחט</p>
<p class="pair">אבג <bdo dir="ltr">ABC והד</bdo> DEF זחט</p>
<p class="rtl pair">זחט <bdo dir="ltr">ABC והד</bdo> DEF אבג</p>
Modified: trunk/LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline.html (262405 => 262406)
--- trunk/LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/text/international/bidi-ignored-for-first-child-inline.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -4,6 +4,7 @@
<style type="text/css">
@import url(resources/Mac-compatible-font-fallback.css);
.rlo { direction: rtl; unicode-bidi: bidi-override; }
+span[dir] { unicode-bidi: embed; }
</style>
</head>
<body>
Modified: trunk/LayoutTests/fast/text/international/iso-8859-8.html (262405 => 262406)
--- trunk/LayoutTests/fast/text/international/iso-8859-8.html 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/LayoutTests/fast/text/international/iso-8859-8.html 2020-06-02 05:49:47 UTC (rev 262406)
@@ -2,6 +2,9 @@
<html>
<head>
<meta charset="ISO-8859-8">
+<style>
+*[dir] { unicode-bidi: embed }
+</style>
<body>
<p>Test rendering of ISO-8859-8.
<p>
Modified: trunk/Source/WebCore/ChangeLog (262405 => 262406)
--- trunk/Source/WebCore/ChangeLog 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/Source/WebCore/ChangeLog 2020-06-02 05:49:47 UTC (rev 262406)
@@ -1,3 +1,16 @@
+2020-06-01 Noam Rosenthal <n...@webkit.org>
+
+ Make unicode-bidi:isolate the default for an element with a dir attribute (instead of unicode-bidi:embed)
+ https://bugs.webkit.org/show_bug.cgi?id=134630
+
+ Reviewed by Simon Fraser.
+
+ Unskipped 11 dir-isolation w3c tests.
+
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::collectStyleForPresentationAttribute):
+ Use isolate instead of embed for unicode-bidi when dir attribute is present.
+
2020-06-01 Devin Rousso <drou...@apple.com>
Web Inspector: Graphics: should use the `id` (name) of the animation if it exists
Modified: trunk/Source/WebCore/html/HTMLElement.cpp (262405 => 262406)
--- trunk/Source/WebCore/html/HTMLElement.cpp 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2020-06-02 05:49:47 UTC (rev 262406)
@@ -208,10 +208,15 @@
if (equalLettersIgnoringASCIICase(value, "auto"))
addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, unicodeBidiAttributeForDirAuto(*this));
else {
- if (isLTROrRTLIgnoringCase(value))
+ auto unicodeBidiValue = CSSValueEmbed;
+
+ if (isLTROrRTLIgnoringCase(value)) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyDirection, value);
+ unicodeBidiValue = CSSValueIsolate;
+ }
+
if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(outputTag))
- addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, CSSValueEmbed);
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, unicodeBidiValue);
}
} else if (name.matches(XMLNames::langAttr))
mapLanguageAttributeToLocale(value, style);
Modified: trunk/Tools/ChangeLog (262405 => 262406)
--- trunk/Tools/ChangeLog 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/Tools/ChangeLog 2020-06-02 05:49:47 UTC (rev 262406)
@@ -1,3 +1,14 @@
+2020-06-01 Noam Rosenthal <n...@webkit.org>
+
+ Make unicode-bidi:isolate the default for an element with a dir attribute (instead of unicode-bidi:embed)
+ https://bugs.webkit.org/show_bug.cgi?id=134630
+
+ Reviewed by Simon Fraser.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm:
+ (TEST):
+ Test was expecting unicode-bidi:embed, changed expectation.
+
2020-06-01 Sihui Liu <sihui_...@apple.com>
TextManipulationController should put one Node in only one paragraph
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm (262405 => 262406)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm 2020-06-02 03:19:48 UTC (rev 262405)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm 2020-06-02 05:49:47 UTC (rev 262406)
@@ -61,7 +61,7 @@
isDone = false;
[webView evaluateJavaScript:@"document.body.getAttributeNode('dir').style.cssText" completionHandler:^(NSString *result, NSError *error) {
- EXPECT_STREQ("direction: rtl; unicode-bidi: embed;", result.UTF8String);
+ EXPECT_STREQ("direction: rtl; unicode-bidi: isolate;", result.UTF8String);
isDone = true;
}];
TestWebKitAPI::Util::run(&isDone);