diff --git a/gfx/thebes/gfxFT2FontBase.cpp b/gfx/thebes/gfxFT2FontBase.cpp index ee4e9e2cbede..5b53009f2c7a 100644 --- a/gfx/thebes/gfxFT2FontBase.cpp +++ b/gfx/thebes/gfxFT2FontBase.cpp @@ -516,10 +516,10 @@ gfxFT2FontBase::GetFTGlyphAdvance(uint16_t aGID) // Failed to get the FT_Face? Give up already. return 0; } + bool hinting = gfxPlatform::GetPlatform()->FontHintingEnabled(); int32_t flags = - gfxPlatform::GetPlatform()->FontHintingEnabled() - ? FT_LOAD_ADVANCE_ONLY - : FT_LOAD_ADVANCE_ONLY | FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING; + hinting ? FT_LOAD_ADVANCE_ONLY + : FT_LOAD_ADVANCE_ONLY | FT_LOAD_NO_AUTOHINT | FT_LOAD_NO_HINTING; FT_Error ftError = FT_Load_Glyph(face.get(), aGID, flags); MOZ_ASSERT(!ftError); if (ftError != FT_Err_Ok) { @@ -527,7 +527,11 @@ gfxFT2FontBase::GetFTGlyphAdvance(uint16_t aGID) return 0; } FT_Fixed advance = 0; - if (face.get()->face_flags & FT_FACE_FLAG_SCALABLE) { + // Due to freetype bug 52683 we MUST use the linearHoriAdvance field when + // dealing with a variation font; also use it for scalable fonts when not + // applying hinting. Otherwise, prefer hinted width from glyph->advance.x. + if ((face.get()->face_flags & FT_FACE_FLAG_SCALABLE) && + (!hinting || (face.get()->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS))) { advance = face.get()->glyph->linearHoriAdvance; } else { advance = face.get()->glyph->advance.x << 10; // convert 26.6 to 16.16 diff --git a/layout/reftests/forms/placeholder/reftest.list b/layout/reftests/forms/placeholder/reftest.list index 525b4ab74a9e..c5a77b443b32 100644 --- a/layout/reftests/forms/placeholder/reftest.list +++ b/layout/reftests/forms/placeholder/reftest.list @@ -16,7 +16,7 @@ == placeholder-3.html placeholder-overridden-ref.html == placeholder-4.html placeholder-overridden-ref.html == placeholder-5.html placeholder-visible-ref.html -fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) == placeholder-6.html placeholder-overflow-ref.html +fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) fails-if(webrender) == placeholder-6.html placeholder-overflow-ref.html skip-if(Android&&asyncPan) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html # needs-focus == placeholder-7.html placeholder-focus-ref.html # needs-focus == placeholder-8.html placeholder-focus-ref.html diff --git a/layout/reftests/svg/text/reftest.list b/layout/reftests/svg/text/reftest.list index 0ff23de40c57..f057c0aac48b 100644 --- a/layout/reftests/svg/text/reftest.list +++ b/layout/reftests/svg/text/reftest.list @@ -196,10 +196,10 @@ needs-focus == deselectAll.svg deselectAll-ref.svg fuzzy-if(skiaContent,1,250) needs-focus == selectSubString.svg selectSubString-ref.svg fuzzy-if(skiaContent,1,600) needs-focus == selectSubString-2.svg selectSubString-2-ref.svg fuzzy-if(skiaContent,1,250) needs-focus == selectSubString-3.svg selectSubString-3-ref.svg -fuzzy-if(webrender,1-1,294-294) needs-focus == simple-selection.svg simple-selection-ref.html -fuzzy-if(skiaContent,1,100) fuzzy-if(webrender,1-1,594-594) needs-focus == simple-bidi-selection.svg simple-bidi-selection-ref.html -fuzzy-if(skiaContent,1,50) fuzzy-if(webrender,1-1,294-294) needs-focus == simple-fill-color-selection.svg simple-fill-color-selection-ref.html -fuzzy-if(skiaContent,1,150) fuzzy-if(webrender,1-1,276-276) needs-focus == simple-underline-selection.svg simple-underline-selection-ref.html -fuzzy-if(skiaContent,1,300) fuzzy-if(webrender,1-1,1010-1010) needs-focus == multiple-text-selection.svg multiple-text-selection-ref.html +fuzzy-if(webrender,1-1,237-237) needs-focus == simple-selection.svg simple-selection-ref.html +fuzzy-if(skiaContent,1,100) fuzzy-if(webrender,1-1,575-575) needs-focus == simple-bidi-selection.svg simple-bidi-selection-ref.html +fuzzy-if(skiaContent,1,50) fuzzy-if(webrender,1-1,237-237) needs-focus == simple-fill-color-selection.svg simple-fill-color-selection-ref.html +fuzzy-if(skiaContent,1,150) fuzzy-if(webrender,1-1,222-222) needs-focus == simple-underline-selection.svg simple-underline-selection-ref.html +fuzzy-if(skiaContent,1,300) fuzzy-if(webrender,1-1,934-934) needs-focus == multiple-text-selection.svg multiple-text-selection-ref.html needs-focus == multiple-chunks-selection.svg multiple-chunks-selection-ref.svg fuzzy-if(skiaContent,1,200) needs-focus == textpath-selection.svg textpath-selection-ref.svg diff --git a/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini b/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini index 8cb5d42619c6..853f9d6789b7 100644 --- a/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini +++ b/testing/web-platform/meta/css/CSS2/backgrounds/background-root-002.xht.ini @@ -1,3 +1,4 @@ [background-root-002.xht] expected: if os == "win": FAIL + if os == "linux": FAIL diff --git a/testing/web-platform/meta/css/CSS2/linebox/vertical-align-baseline-004a.xht.ini b/testing/web-platform/meta/css/CSS2/linebox/vertical-align-baseline-004a.xht.ini new file mode 100644 index 000000000000..6e3fdfcf722e --- /dev/null +++ b/testing/web-platform/meta/css/CSS2/linebox/vertical-align-baseline-004a.xht.ini @@ -0,0 +1,2 @@ +[vertical-align-baseline-004a.xht] + expected: FAIL diff --git a/testing/web-platform/meta/css/CSS2/linebox/vertical-align-baseline-005a.xht.ini b/testing/web-platform/meta/css/CSS2/linebox/vertical-align-baseline-005a.xht.ini new file mode 100644 index 000000000000..a6cec1bfc1ff --- /dev/null +++ b/testing/web-platform/meta/css/CSS2/linebox/vertical-align-baseline-005a.xht.ini @@ -0,0 +1,2 @@ +[vertical-align-baseline-005a.xht] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-text/white-space/white-space-collapsing-preserve-breaks-001.xht.ini b/testing/web-platform/meta/css/css-text/white-space/white-space-collapsing-preserve-breaks-001.xht.ini deleted file mode 100644 index 767492d9d7ef..000000000000 --- a/testing/web-platform/meta/css/css-text/white-space/white-space-collapsing-preserve-breaks-001.xht.ini +++ /dev/null @@ -1,2 +0,0 @@ -[white-space-collapsing-preserve-breaks-001.xht] - expected: FAIL