mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 09:30:44 +00:00
bug 774560 pt 2 - implement text-transform:full-width. r=smontagu
This commit is contained in:
parent
f19b7d1e06
commit
db6979f76c
@ -680,6 +680,7 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
||||
#define NS_STYLE_TEXT_TRANSFORM_CAPITALIZE 1
|
||||
#define NS_STYLE_TEXT_TRANSFORM_LOWERCASE 2
|
||||
#define NS_STYLE_TEXT_TRANSFORM_UPPERCASE 3
|
||||
#define NS_STYLE_TEXT_TRANSFORM_FULLWIDTH 4
|
||||
|
||||
// See nsStyleDisplay
|
||||
#define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE 0
|
||||
|
@ -873,6 +873,10 @@ nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_STYLE_TEXT_TRANSFORM_FULLWIDTH:
|
||||
ch = mozilla::unicode::GetFullWidth(ch);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
9
layout/reftests/text-transform/fullwidth-1-ref.html
Normal file
9
layout/reftests/text-transform/fullwidth-1-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<span>full width ¥10</span>
|
||||
</body>
|
||||
</html>
|
9
layout/reftests/text-transform/fullwidth-1.html
Normal file
9
layout/reftests/text-transform/fullwidth-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<span style="text-transform: full-width;">full width ¥10</span>
|
||||
</body>
|
||||
</html>
|
9
layout/reftests/text-transform/fullwidth-2-ref.html
Normal file
9
layout/reftests/text-transform/fullwidth-2-ref.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<span style="text-transform: full-width;">アイヴ</span>
|
||||
</body>
|
||||
</html>
|
9
layout/reftests/text-transform/fullwidth-2.html
Normal file
9
layout/reftests/text-transform/fullwidth-2.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<span style="text-transform: full-width;">アイヴ</span>
|
||||
</body>
|
||||
</html>
|
@ -22,3 +22,5 @@ HTTP(..) != small-caps-turkish-1.html small-caps-turkish-1-notref.html
|
||||
== greek-uppercase-1.html greek-uppercase-1-ref.html
|
||||
== greek-uppercase-2.html greek-uppercase-2-ref.html
|
||||
== greek-small-caps-1.html greek-small-caps-1-ref.html
|
||||
== fullwidth-1.html fullwidth-1-ref.html
|
||||
== fullwidth-2.html fullwidth-2-ref.html
|
||||
|
@ -259,6 +259,7 @@ CSS_KEY(flex, flex)
|
||||
CSS_KEY(flex-end, flex_end)
|
||||
CSS_KEY(flex-start, flex_start)
|
||||
CSS_KEY(forwards, forwards)
|
||||
CSS_KEY(full-width, full_width)
|
||||
CSS_KEY(georgian, georgian)
|
||||
CSS_KEY(grad, grad)
|
||||
CSS_KEY(graytext, graytext)
|
||||
|
@ -1389,6 +1389,7 @@ const int32_t nsCSSProps::kTextTransformKTable[] = {
|
||||
eCSSKeyword_capitalize, NS_STYLE_TEXT_TRANSFORM_CAPITALIZE,
|
||||
eCSSKeyword_lowercase, NS_STYLE_TEXT_TRANSFORM_LOWERCASE,
|
||||
eCSSKeyword_uppercase, NS_STYLE_TEXT_TRANSFORM_UPPERCASE,
|
||||
eCSSKeyword_full_width, NS_STYLE_TEXT_TRANSFORM_FULLWIDTH,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
|
@ -3172,7 +3172,7 @@ var gCSSProperties = {
|
||||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "none" ],
|
||||
other_values: [ "capitalize", "uppercase", "lowercase" ],
|
||||
other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"top": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user