diff --git a/content/canvas/src/CanvasRenderingContext2D.cpp b/content/canvas/src/CanvasRenderingContext2D.cpp index daa68f370a21..350c3565fc61 100644 --- a/content/canvas/src/CanvasRenderingContext2D.cpp +++ b/content/canvas/src/CanvasRenderingContext2D.cpp @@ -59,7 +59,6 @@ #include "gfxFont.h" #include "gfxBlur.h" #include "gfxUtils.h" -#include "gfxFontMissingGlyphs.h" #include "nsFrameManager.h" #include "nsFrameLoader.h" @@ -2358,52 +2357,7 @@ struct NS_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcesso mTextRun->GetDetailedGlyphs(i); if (glyphs[i].IsMissing()) { - float xpos; - float advance = detailedGlyphs[0].mAdvance * devUnitsPerAppUnit; - if (mTextRun->IsRightToLeft()) { - xpos = baselineOrigin.x - advanceSum - advance; - } else { - xpos = baselineOrigin.x + advanceSum; - } - advanceSum += advance; - - // default-ignorable characters will have zero advance width. - // we don't draw a hexbox for them, just leave them invisible - if (advance > 0) { - // for now, we use gfxFontMissingGlyphs to draw the hexbox; - // some day we should replace this with a direct Azure version - - // get the DrawTarget's transform, so we can apply it to the - // thebes context for gfxFontMissingGlyphs - Matrix matrix = mCtx->mTarget->GetTransform(); - nsRefPtr thebes; - if (gfxPlatform::GetPlatform()->SupportsAzureContent()) { - // XXX See bug 808288 comment 5 - Bas says: - // This is a little tricky, potentially this could go wrong if - // we fell back to a Cairo context because of for example - // extremely large Canvas size. Cairo content is technically - // -not- supported, but SupportsAzureContent would return true - // as the browser uses D2D content. - // I'm thinking Cairo content will be good enough to do - // DrawMissingGlyph though. - thebes = new gfxContext(mCtx->mTarget); - } else { - nsRefPtr drawSurf; - mCtx->GetThebesSurface(getter_AddRefs(drawSurf)); - thebes = new gfxContext(drawSurf); - } - thebes->SetMatrix(gfxMatrix(matrix._11, matrix._12, matrix._21, - matrix._22, matrix._31, matrix._32)); - - gfxFloat height = font->GetMetrics().maxAscent; - gfxRect glyphRect(xpos, baselineOrigin.y - height, - advance, height); - gfxFontMissingGlyphs::DrawMissingGlyph(thebes, glyphRect, - detailedGlyphs[0].mGlyphID, - nsDeviceContext::AppUnitsPerCSSPixel()); - - mCtx->mTarget->SetTransform(matrix); - } + advanceSum += detailedGlyphs[0].mAdvance * devUnitsPerAppUnit; continue; } diff --git a/gfx/thebes/Makefile.in b/gfx/thebes/Makefile.in index c2bc05769d47..f616fb1134da 100644 --- a/gfx/thebes/Makefile.in +++ b/gfx/thebes/Makefile.in @@ -32,7 +32,6 @@ EXPORTS = \ gfxFont.h \ gfxFontConstants.h \ gfxFontFeatures.h \ - gfxFontMissingGlyphs.h \ gfxFontUtils.h \ gfxFontTest.h \ gfxImageSurface.h \ diff --git a/layout/reftests/canvas/reftest.list b/layout/reftests/canvas/reftest.list index 18761b2c9df1..eb39f303d23a 100644 --- a/layout/reftests/canvas/reftest.list +++ b/layout/reftests/canvas/reftest.list @@ -51,7 +51,11 @@ fails-if(B2G) != text-font-lang.html text-font-lang-notref.html # check that emoji character renders as something non-blank (for Apple Color Emoji font, bug 715798) # apparently fails on some 10.7 systems for unknown reasons, bug 804522. -random-if(OSX==10.7) != text-emoji.html text-emoji-notref.html +## Currently fails most places due to partial backout of bug 808288, see bug 837461. +## (Marking "random" rather than "fails" because it would pass for people +## if they have an Emoji font installed when running the tests.) +## WAS: random-if(OSX==10.7) != text-emoji.html text-emoji-notref.html +random-if(!cocoaWidget||OSX==10.6||OSX==10.7) != text-emoji.html text-emoji-notref.html # azure quartz uses CGDrawLinearGradient instead of DrawShading # so we have less control over degenerate behaviour as tested by this