mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add U+2029 PARAGRAPH SEPARATOR and other characters with bidi type Segment Separator and Paragraph Separator to the characters we convert to whitespace before passing text to the Bidi engine. Bug 847242, r=roc
This commit is contained in:
parent
70187840ba
commit
1028613ce4
13
layout/base/crashtests/847242.html
Normal file
13
layout/base/crashtests/847242.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
.f { unicode-bidi: bidi-override; width: 1px; white-space: pre-line; }
|
||||||
|
.f:first-letter { font-size: 200% }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="f">
ت萁
|
||||||
|
x</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -415,6 +415,7 @@ load 826163.html
|
|||||||
load 833604-1.html
|
load 833604-1.html
|
||||||
load 835056.html
|
load 835056.html
|
||||||
load 836990-1.html
|
load 836990-1.html
|
||||||
|
load 847242.html
|
||||||
load 852293.html
|
load 852293.html
|
||||||
load 860579-1.html
|
load 860579-1.html
|
||||||
pref(layers.force-active,true) load 859526-1.html
|
pref(layers.force-active,true) load 859526-1.html
|
||||||
|
@ -35,6 +35,20 @@ static const char16_t kRLE = 0x202B;
|
|||||||
static const char16_t kLRO = 0x202D;
|
static const char16_t kLRO = 0x202D;
|
||||||
static const char16_t kRLO = 0x202E;
|
static const char16_t kRLO = 0x202E;
|
||||||
static const char16_t kPDF = 0x202C;
|
static const char16_t kPDF = 0x202C;
|
||||||
|
static const char16_t kSeparators[] = {
|
||||||
|
// All characters with Bidi type Segment Separator or Block Separator
|
||||||
|
char16_t('\t'),
|
||||||
|
char16_t('\r'),
|
||||||
|
char16_t('\n'),
|
||||||
|
char16_t(0xb),
|
||||||
|
char16_t(0x1c),
|
||||||
|
char16_t(0x1d),
|
||||||
|
char16_t(0x1e),
|
||||||
|
char16_t(0x1f),
|
||||||
|
char16_t(0x85),
|
||||||
|
char16_t(0x2029),
|
||||||
|
char16_t(0)
|
||||||
|
};
|
||||||
|
|
||||||
#define NS_BIDI_CONTROL_FRAME ((nsIFrame*)0xfffb1d1)
|
#define NS_BIDI_CONTROL_FRAME ((nsIFrame*)0xfffb1d1)
|
||||||
|
|
||||||
@ -631,7 +645,7 @@ nsBidiPresUtils::ResolveParagraph(nsBlockFrame* aBlockFrame,
|
|||||||
if (aBpd->BufferLength() < 1) {
|
if (aBpd->BufferLength() < 1) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
aBpd->mBuffer.ReplaceChar("\t\r\n", kSpace);
|
aBpd->mBuffer.ReplaceChar(kSeparators, kSpace);
|
||||||
|
|
||||||
int32_t runCount;
|
int32_t runCount;
|
||||||
|
|
||||||
|
15
layout/reftests/bidi/847242-1-ref.html
Normal file
15
layout/reftests/bidi/847242-1-ref.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>PASS
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
18
layout/reftests/bidi/847242-1.html
Normal file
18
layout/reftests/bidi/847242-1.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
unicode-bidi: bidi-override;
|
||||||
|
direction: rtl;
|
||||||
|
text-align: left;
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>
SSAP</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -138,6 +138,7 @@ skip-if(B2G) == 726420-1.html 726420-1-ref.html
|
|||||||
== 746987-4.html 746987-4-ref.html
|
== 746987-4.html 746987-4-ref.html
|
||||||
== 779003-1.html 779003-1-ref.html
|
== 779003-1.html 779003-1-ref.html
|
||||||
== 779003-1-dynamic.html 779003-1-ref.html
|
== 779003-1-dynamic.html 779003-1-ref.html
|
||||||
|
== 847242-1.html 847242-1-ref.html
|
||||||
== 869833-1.xul 869833-1-ref.xul
|
== 869833-1.xul 869833-1-ref.xul
|
||||||
== 922530-1.html 922530-1-ref.html
|
== 922530-1.html 922530-1-ref.html
|
||||||
== 922550-1.html 922550-1-ref.html
|
== 922550-1.html 922550-1-ref.html
|
||||||
|
Loading…
Reference in New Issue
Block a user