Backed out 4 changesets (bug 1746187) for causing xpcshell failures on test_css-properties-db.js.
Backed out changeset fa4f889dd0d3 (bug 1746187) Backed out changeset e3fce2273109 (bug 1746187) Backed out changeset 6733677ad35d (bug 1746187) Backed out changeset a4375ff93414 (bug 1746187)
This commit is contained in:
@@ -3094,7 +3094,6 @@ exports.CSS_PROPERTIES = {
|
|||||||
"text-underline-offset",
|
"text-underline-offset",
|
||||||
"text-underline-position",
|
"text-underline-position",
|
||||||
"text-decoration-skip-ink",
|
"text-decoration-skip-ink",
|
||||||
"hyphenate-character",
|
|
||||||
"cursor",
|
"cursor",
|
||||||
"pointer-events",
|
"pointer-events",
|
||||||
"-moz-user-input",
|
"-moz-user-input",
|
||||||
@@ -7278,20 +7277,6 @@ exports.CSS_PROPERTIES = {
|
|||||||
"unset"
|
"unset"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"hyphenate-character": {
|
|
||||||
"isInherited": true,
|
|
||||||
"subproperties": [
|
|
||||||
"hyphenate-character"
|
|
||||||
],
|
|
||||||
"supports": [],
|
|
||||||
"values": [
|
|
||||||
"auto",
|
|
||||||
"inherit",
|
|
||||||
"initial",
|
|
||||||
"revert",
|
|
||||||
"unset"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hyphens": {
|
"hyphens": {
|
||||||
"isInherited": true,
|
"isInherited": true,
|
||||||
"subproperties": [
|
"subproperties": [
|
||||||
@@ -11637,10 +11622,6 @@ exports.PREFERENCES = [
|
|||||||
"font-variation-settings",
|
"font-variation-settings",
|
||||||
"layout.css.font-variations.enabled"
|
"layout.css.font-variations.enabled"
|
||||||
],
|
],
|
||||||
[
|
|
||||||
"hyphenate-character",
|
|
||||||
"layout.css.hyphenate-character.enabled"
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
"justify-tracks",
|
"justify-tracks",
|
||||||
"layout.css.grid-template-masonry-value.enabled"
|
"layout.css.grid-template-masonry-value.enabled"
|
||||||
|
|||||||
@@ -2158,17 +2158,8 @@ static already_AddRefed<gfxTextRun> GetHyphenTextRun(nsTextFrame* aTextFrame,
|
|||||||
|
|
||||||
RefPtr<nsFontMetrics> fm =
|
RefPtr<nsFontMetrics> fm =
|
||||||
nsLayoutUtils::GetInflatedFontMetricsForFrame(aTextFrame);
|
nsLayoutUtils::GetInflatedFontMetricsForFrame(aTextFrame);
|
||||||
auto* fontGroup = fm->GetThebesFontGroup();
|
return fm->GetThebesFontGroup()->MakeHyphenTextRun(
|
||||||
auto appPerDev = aTextFrame->PresContext()->AppUnitsPerDevPixel();
|
dt, aTextFrame->PresContext()->AppUnitsPerDevPixel());
|
||||||
const auto& hyphenateChar = aTextFrame->StyleText()->mHyphenateCharacter;
|
|
||||||
if (hyphenateChar.IsAuto()) {
|
|
||||||
return fontGroup->MakeHyphenTextRun(dt, appPerDev);
|
|
||||||
}
|
|
||||||
auto* missingFonts = aTextFrame->PresContext()->MissingFontRecorder();
|
|
||||||
const NS_ConvertUTF8toUTF16 hyphenStr(hyphenateChar.AsString().AsString());
|
|
||||||
return fontGroup->MakeTextRun(hyphenStr.BeginReading(), hyphenStr.Length(),
|
|
||||||
dt, appPerDev, gfx::ShapedTextFlags(),
|
|
||||||
nsTextFrameUtils::Flags(), missingFonts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<gfxTextRun> BuildTextRunsScanner::BuildTextRunForFrames(
|
already_AddRefed<gfxTextRun> BuildTextRunsScanner::BuildTextRunForFrames(
|
||||||
@@ -3650,13 +3641,7 @@ void nsTextFrame::PropertyProvider::CalcTabWidths(Range aRange,
|
|||||||
|
|
||||||
gfxFloat nsTextFrame::PropertyProvider::GetHyphenWidth() const {
|
gfxFloat nsTextFrame::PropertyProvider::GetHyphenWidth() const {
|
||||||
if (mHyphenWidth < 0) {
|
if (mHyphenWidth < 0) {
|
||||||
const auto& hyphenateChar = mTextStyle->mHyphenateCharacter;
|
mHyphenWidth = GetFontGroup()->GetHyphenWidth(this);
|
||||||
if (hyphenateChar.IsAuto()) {
|
|
||||||
mHyphenWidth = GetFontGroup()->GetHyphenWidth(this);
|
|
||||||
} else {
|
|
||||||
RefPtr<gfxTextRun> hyphRun = GetHyphenTextRun(mFrame, nullptr);
|
|
||||||
mHyphenWidth = hyphRun ? hyphRun->GetAdvanceWidth() : 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return mHyphenWidth + mLetterSpacing;
|
return mHyphenWidth + mLetterSpacing;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,7 +589,6 @@ cbindgen-types = [
|
|||||||
{ gecko = "StyleDProperty", servo = "crate::values::specified::svg::DProperty" },
|
{ gecko = "StyleDProperty", servo = "crate::values::specified::svg::DProperty" },
|
||||||
{ gecko = "StyleImageRendering", servo = "crate::values::computed::ImageRendering" },
|
{ gecko = "StyleImageRendering", servo = "crate::values::computed::ImageRendering" },
|
||||||
{ gecko = "StyleScrollbarGutter", servo = "crate::values::computed::ScrollbarGutter" },
|
{ gecko = "StyleScrollbarGutter", servo = "crate::values::computed::ScrollbarGutter" },
|
||||||
{ gecko = "StyleHyphenateCharacter", servo = "crate::values::computed::HyphenateCharacter" },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
mapped-generic-types = [
|
mapped-generic-types = [
|
||||||
|
|||||||
@@ -2962,8 +2962,7 @@ nsStyleText::nsStyleText(const nsStyleText& aSource)
|
|||||||
mTextUnderlinePosition(aSource.mTextUnderlinePosition),
|
mTextUnderlinePosition(aSource.mTextUnderlinePosition),
|
||||||
mWebkitTextStrokeWidth(aSource.mWebkitTextStrokeWidth),
|
mWebkitTextStrokeWidth(aSource.mWebkitTextStrokeWidth),
|
||||||
mTextShadow(aSource.mTextShadow),
|
mTextShadow(aSource.mTextShadow),
|
||||||
mTextEmphasisStyle(aSource.mTextEmphasisStyle),
|
mTextEmphasisStyle(aSource.mTextEmphasisStyle) {
|
||||||
mHyphenateCharacter(aSource.mHyphenateCharacter) {
|
|
||||||
MOZ_COUNT_CTOR(nsStyleText);
|
MOZ_COUNT_CTOR(nsStyleText);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2997,8 +2996,7 @@ nsChangeHint nsStyleText::CalcDifference(const nsStyleText& aNewData) const {
|
|||||||
(mTextIndent != aNewData.mTextIndent) ||
|
(mTextIndent != aNewData.mTextIndent) ||
|
||||||
(mTextJustify != aNewData.mTextJustify) ||
|
(mTextJustify != aNewData.mTextJustify) ||
|
||||||
(mWordSpacing != aNewData.mWordSpacing) ||
|
(mWordSpacing != aNewData.mWordSpacing) ||
|
||||||
(mTabSize != aNewData.mTabSize) ||
|
(mTabSize != aNewData.mTabSize)) {
|
||||||
(mHyphenateCharacter != aNewData.mHyphenateCharacter)) {
|
|
||||||
return NS_STYLE_HINT_REFLOW;
|
return NS_STYLE_HINT_REFLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -927,9 +927,6 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText {
|
|||||||
mozilla::StyleArcSlice<mozilla::StyleSimpleShadow> mTextShadow;
|
mozilla::StyleArcSlice<mozilla::StyleSimpleShadow> mTextShadow;
|
||||||
mozilla::StyleTextEmphasisStyle mTextEmphasisStyle;
|
mozilla::StyleTextEmphasisStyle mTextEmphasisStyle;
|
||||||
|
|
||||||
mozilla::StyleHyphenateCharacter mHyphenateCharacter =
|
|
||||||
mozilla::StyleHyphenateCharacter::Auto();
|
|
||||||
|
|
||||||
mozilla::StyleWordBreak EffectiveWordBreak() const {
|
mozilla::StyleWordBreak EffectiveWordBreak() const {
|
||||||
if (mWordBreak == mozilla::StyleWordBreak::BreakWord) {
|
if (mWordBreak == mozilla::StyleWordBreak::BreakWord) {
|
||||||
return mozilla::StyleWordBreak::Normal;
|
return mozilla::StyleWordBreak::Normal;
|
||||||
|
|||||||
@@ -12857,20 +12857,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.webkit-line-clamp.enabled")) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsCSSPropertyPrefEnabled("layout.css.hyphenate-character.enabled")) {
|
|
||||||
gCSSProperties["hyphenate-character"] = {
|
|
||||||
domProp: "hyphenateCharacter",
|
|
||||||
inherited: true,
|
|
||||||
type: CSS_TYPE_LONGHAND,
|
|
||||||
applies_to_first_letter: true,
|
|
||||||
applies_to_first_line: true,
|
|
||||||
applies_to_placeholder: true,
|
|
||||||
initial_values: ["auto"],
|
|
||||||
other_values: ['"="', '"/-/"', '"\1400"', '""'],
|
|
||||||
invalid_values: ["none", "auto auto", "1400", "U+1400"],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (false) {
|
if (false) {
|
||||||
// TODO These properties are chrome-only, and are not exposed via CSSOM.
|
// TODO These properties are chrome-only, and are not exposed via CSSOM.
|
||||||
// We may still want to find a way to test them. See bug 1206999.
|
// We may still want to find a way to test them. See bug 1206999.
|
||||||
|
|||||||
@@ -7332,12 +7332,6 @@
|
|||||||
mirror: always
|
mirror: always
|
||||||
rust: true
|
rust: true
|
||||||
|
|
||||||
# Is support for CSS hyphenate-character enabled?
|
|
||||||
- name: layout.css.hyphenate-character.enabled
|
|
||||||
type: RelaxedAtomicBool
|
|
||||||
value: @IS_NIGHTLY_BUILD@
|
|
||||||
mirror: always
|
|
||||||
|
|
||||||
# Is support for CSS individual transform enabled?
|
# Is support for CSS individual transform enabled?
|
||||||
- name: layout.css.individual-transform.enabled
|
- name: layout.css.individual-transform.enabled
|
||||||
type: bool
|
type: bool
|
||||||
|
|||||||
@@ -374,15 +374,3 @@ ${helpers.predefined_type(
|
|||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
|
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
// hyphenation character
|
|
||||||
${helpers.predefined_type(
|
|
||||||
"hyphenate-character",
|
|
||||||
"HyphenateCharacter",
|
|
||||||
"computed::HyphenateCharacter::Auto",
|
|
||||||
engines="gecko",
|
|
||||||
gecko_pref="layout.css.hyphenate-character.enabled",
|
|
||||||
has_effect_on_gecko_scrollbars=False,
|
|
||||||
animation_value_type="discrete",
|
|
||||||
spec="https://www.w3.org/TR/css-text-4/#hyphenate-character",
|
|
||||||
)}
|
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight};
|
|||||||
pub use self::text::{OverflowWrap, RubyPosition, TextOverflow, WordBreak, WordSpacing};
|
pub use self::text::{OverflowWrap, RubyPosition, TextOverflow, WordBreak, WordSpacing};
|
||||||
pub use self::text::{TextAlign, TextAlignLast, TextEmphasisPosition, TextEmphasisStyle};
|
pub use self::text::{TextAlign, TextAlignLast, TextEmphasisPosition, TextEmphasisStyle};
|
||||||
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify};
|
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify};
|
||||||
pub use self::text::HyphenateCharacter;
|
|
||||||
pub use self::time::Time;
|
pub use self::time::Time;
|
||||||
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
||||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ pub use crate::values::specified::text::{
|
|||||||
pub use crate::values::specified::{LineBreak, OverflowWrap, RubyPosition, WordBreak};
|
pub use crate::values::specified::{LineBreak, OverflowWrap, RubyPosition, WordBreak};
|
||||||
pub use crate::values::specified::{TextDecorationLine, TextEmphasisPosition};
|
pub use crate::values::specified::{TextDecorationLine, TextEmphasisPosition};
|
||||||
pub use crate::values::specified::{TextDecorationSkipInk, TextJustify, TextTransform};
|
pub use crate::values::specified::{TextDecorationSkipInk, TextJustify, TextTransform};
|
||||||
pub use crate::values::specified::HyphenateCharacter;
|
|
||||||
|
|
||||||
/// A computed value for the `initial-letter` property.
|
/// A computed value for the `initial-letter` property.
|
||||||
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
|
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight, TextAl
|
|||||||
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
|
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
|
||||||
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
||||||
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify, TextTransform};
|
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify, TextTransform};
|
||||||
pub use self::text::HyphenateCharacter;
|
|
||||||
pub use self::time::Time;
|
pub use self::time::Time;
|
||||||
pub use self::transform::{Rotate, Scale, Transform};
|
pub use self::transform::{Rotate, Scale, Transform};
|
||||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||||
|
|||||||
@@ -37,27 +37,6 @@ pub type WordSpacing = Spacing<LengthPercentage>;
|
|||||||
/// A specified value for the `line-height` property.
|
/// A specified value for the `line-height` property.
|
||||||
pub type LineHeight = GenericLineHeight<NonNegativeNumber, NonNegativeLengthPercentage>;
|
pub type LineHeight = GenericLineHeight<NonNegativeNumber, NonNegativeLengthPercentage>;
|
||||||
|
|
||||||
/// A value for the `hyphenate-character` property.
|
|
||||||
#[derive(
|
|
||||||
Clone,
|
|
||||||
Debug,
|
|
||||||
MallocSizeOf,
|
|
||||||
Parse,
|
|
||||||
PartialEq,
|
|
||||||
SpecifiedValueInfo,
|
|
||||||
ToComputedValue,
|
|
||||||
ToCss,
|
|
||||||
ToResolvedValue,
|
|
||||||
ToShmem,
|
|
||||||
)]
|
|
||||||
#[repr(C, u8)]
|
|
||||||
pub enum HyphenateCharacter {
|
|
||||||
/// `auto`
|
|
||||||
Auto,
|
|
||||||
/// `<string>`
|
|
||||||
String(crate::OwnedStr),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Parse for InitialLetter {
|
impl Parse for InitialLetter {
|
||||||
fn parse<'i, 't>(
|
fn parse<'i, 't>(
|
||||||
context: &ParserContext,
|
context: &ParserContext,
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ include = [
|
|||||||
"ImageRendering",
|
"ImageRendering",
|
||||||
"ScrollbarGutter",
|
"ScrollbarGutter",
|
||||||
"ScrollDirection",
|
"ScrollDirection",
|
||||||
"HyphenateCharacter",
|
|
||||||
]
|
]
|
||||||
item_types = ["enums", "structs", "unions", "typedefs", "functions", "constants"]
|
item_types = ["enums", "structs", "unions", "typedefs", "functions", "constants"]
|
||||||
renaming_overrides_prefixing = true
|
renaming_overrides_prefixing = true
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
prefs: [layout.css.hyphenate-character.enabled:true]
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
prefs: [layout.css.hyphenate-character.enabled:true]
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text test: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<link rel="match" href="reference/hyphenate-character-001-ref.html">
|
|
||||||
<meta name="assert" content="Specifies the string that appears at the end of the line before a hyphenation break">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
width: 4.5ch; /* wide enough that the first potential break in "re-al-iza-tion" should NOT be used */
|
|
||||||
hyphens: manual;
|
|
||||||
hyphenate-character: "";
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are broken at hyphenation positions but <b>no visible hyphens appear</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
im­ple­men­ta­tion<br><br>
|
|
||||||
ini­tial­iza­tion<br><br>
|
|
||||||
re­al­iza­tion<br><br>
|
|
||||||
hy­phen­ation
|
|
||||||
</div>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text test: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<link rel="match" href="reference/hyphenate-character-001-ref.html">
|
|
||||||
<meta name="assert" content="Specifies the string that appears at the end of the line before a hyphenation break">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
width: 4.5ch; /* wide enough that the first potential break in "re-al-iza-tion" should NOT be used */
|
|
||||||
hyphens: auto; /* assuming the usual en_US patterns, should generate the same breaks as the manual
|
|
||||||
soft hyphens in test 001. */
|
|
||||||
hyphenate-character: "";
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are broken at hyphenation positions but <b>no visible hyphens appear</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
implementation<br><br>
|
|
||||||
initialization<br><br>
|
|
||||||
realization<br><br>
|
|
||||||
hyphenation
|
|
||||||
</div>
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text test: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<link rel="match" href="reference/hyphenate-character-003-ref.html">
|
|
||||||
<meta name="assert" content="Specifies the string that appears at the end of the line before a hyphenation break">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
width: 5.5ch; /* wide enough that the first potential break in "re-al-iza-tion" should NOT be used */
|
|
||||||
hyphens: manual;
|
|
||||||
hyphenate-character: "\2022";
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are hyphenated <b>using a bullet (•) character</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
im­ple­men­ta­tion<br><br>
|
|
||||||
ini­tial­iza­tion<br><br>
|
|
||||||
re­al­iza­tion<br><br>
|
|
||||||
hy­phen­ation
|
|
||||||
</div>
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text test: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<link rel="match" href="reference/hyphenate-character-004-ref.html">
|
|
||||||
<meta name="assert" content="Specifies the string that appears at the end of the line before a hyphenation break">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
width: 6.5ch; /* wide enough that the last potential break in "im-ple-men-ta-tion" should NOT be used */
|
|
||||||
hyphens: manual;
|
|
||||||
hyphenate-character: "/-/";
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are hyphenated <b>using the string "/-/"</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
im­ple­men­ta­tion<br><br>
|
|
||||||
ini­tial­iza­tion<br><br>
|
|
||||||
re­al­iza­tion<br><br>
|
|
||||||
hy­phen­ation
|
|
||||||
</div>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text reference: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are broken at hyphenation positions but <b>no visible hyphens appear</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
im<br>ple<br>men<br>ta<br>tion<br><br>
|
|
||||||
ini<br>tial<br>iza<br>tion<br><br>
|
|
||||||
real<br>iza<br>tion<br><br>
|
|
||||||
hy<br>phen<br>ation
|
|
||||||
</div>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text reference: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are hyphenated <b>using a bullet (•) character</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
im•<br>ple•<br>men•<br>ta•<br>tion<br><br>
|
|
||||||
ini•<br>tial•<br>iza•<br>tion<br><br>
|
|
||||||
real•<br>iza•<br>tion<br><br>
|
|
||||||
hy•<br>phen•<br>ation
|
|
||||||
</div>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text reference: hyphenate-character</title>
|
|
||||||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
|
|
||||||
<style>
|
|
||||||
div {
|
|
||||||
font: 16px monospace;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p>Test passes if the words below are hyphenated <b>using the string "/-/"</b>.
|
|
||||||
|
|
||||||
<div lang="en">
|
|
||||||
im/-/<br>ple/-/<br>men/-/<br>tation<br><br>
|
|
||||||
ini/-/<br>tial/-/<br>iza/-/<br>tion<br><br>
|
|
||||||
re/-/<br>al/-/<br>iza/-/<br>tion<br><br>
|
|
||||||
hy/-/<br>phen/-/<br>ation
|
|
||||||
</div>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text: getComputedStyle().hyphenateCharacter</title>
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<meta name="assert" content="hyphenate-character computed value is as specified.">
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="/css/support/computed-testcommon.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="target"></div>
|
|
||||||
<script>
|
|
||||||
test_computed_value("hyphenate-character", "auto");
|
|
||||||
test_computed_value("hyphenate-character", "\"=\"");
|
|
||||||
test_computed_value("hyphenate-character", "\"/-/\"");
|
|
||||||
test_computed_value("hyphenate-character", "\"\\1400\"", "\"᐀\"");
|
|
||||||
test_computed_value("hyphenate-character", "\"\"");
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text Module Test: parsing hyphenate-character with invalid values</title>
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<meta name="assert" content="hyphenate-character supports only the grammar 'none | manual | auto'.">
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="/css/support/parsing-testcommon.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
test_invalid_value("hyphenate-character", "normal");
|
|
||||||
test_invalid_value("hyphenate-character", "none");
|
|
||||||
test_invalid_value("hyphenate-character", "auto auto");
|
|
||||||
test_invalid_value("hyphenate-character", "\"-\" \"=\"");
|
|
||||||
test_invalid_value("hyphenate-character", "1400");
|
|
||||||
test_invalid_value("hyphenate-character", "U+1400");
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>CSS Text Module Test: parsing hyphenate-character with valid values</title>
|
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-text-4/#hyphenate-character">
|
|
||||||
<meta name="assert" content="hyphens supports the full grammar 'auto | <string>'.">
|
|
||||||
<script src="/resources/testharness.js"></script>
|
|
||||||
<script src="/resources/testharnessreport.js"></script>
|
|
||||||
<script src="/css/support/parsing-testcommon.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
test_valid_value("hyphenate-character", "auto");
|
|
||||||
test_valid_value("hyphenate-character", "\"=\"");
|
|
||||||
test_valid_value("hyphenate-character", "\"/-/\"");
|
|
||||||
test_valid_value("hyphenate-character", "\"\\1400\"", "\"᐀\"");
|
|
||||||
test_valid_value("hyphenate-character", "\"\"");
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user