Skip to content
Permalink
Browse files
2011-05-24 James Simonsen <simonjam@chromium.org>
        Reviewed by Eric Seidel.

        ASSERT_NOT_REACHED reached with broken ideograph and system fallback
        https://bugs.webkit.org/show_bug.cgi?id=53528

        * platform/chromium/test_expectations.txt: Remove CRASH from fixed test.
2011-05-24  James Simonsen  <simonjam@chromium.org>

        Reviewed by Eric Seidel.

        ASSERT_NOT_REACHED reached with broken ideograph and system fallback
        https://bugs.webkit.org/show_bug.cgi?id=53528

        Test: fast/text/justify-ideograph-vertical.html (on chromium linux)

        * platform/graphics/FontFastPath.cpp:
        (WebCore::Font::glyphDataForCharacter): Identify and handle broken ideographs as any other variant.
        * platform/graphics/SimpleFontData.h:
        (WebCore::SimpleFontData::variantFontData): Added BrokenIdeographVariant.

Canonical link: https://commits.webkit.org/76788@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
James Simonsen committed May 24, 2011
1 parent 92738eb commit fad5e5f7a123205c6ebb22db5402460bceb2181b
@@ -1,3 +1,12 @@
2011-05-24 James Simonsen <simonjam@chromium.org>

Reviewed by Eric Seidel.

ASSERT_NOT_REACHED reached with broken ideograph and system fallback
https://bugs.webkit.org/show_bug.cgi?id=53528

* platform/chromium/test_expectations.txt: Remove CRASH from fixed test.

2011-05-24 Ryosuke Niwa <rniwa@webkit.org>

Skip fast/events/scroll-in-scaled-page-with-overflow-hidden.html on Mac WebKit2
@@ -2820,15 +2820,11 @@ BUGCR70882 WIN : fast/text/offsetForPosition-complex-fallback.html = TEXT
BUGCR70942 WIN : editing/execCommand/break-out-of-empty-list-item.html = PASS TIMEOUT
BUGRNIWA SLOW WIN : editing/execCommand/4786404-1.html = PASS

// Added by and started crashing at http://trac.webkit.org/changeset/76743,
// stopped crashing at some point after 80582, but see BUGCR75426!
BUGCR71013 LINUX : fast/text/justify-ideograph-vertical.html = CRASH IMAGE+TEXT

// Started failing at http://trac.webkit.org/changeset/76743
BUGCR71022 WIN LINUX : fast/text/justify-ideograph-complex.html = IMAGE+TEXT
BUGCR71022 MAC : fast/text/justify-ideograph-complex.html = IMAGE
BUGCR71022 WIN LINUX : fast/text/justify-ideograph-simple.html = IMAGE+TEXT
BUGCR71022 WIN : fast/text/justify-ideograph-vertical.html = IMAGE+TEXT
BUGCR71022 WIN LINUX : fast/text/justify-ideograph-vertical.html = IMAGE+TEXT
// Seems to have started failing at http://trac.webkit.org/changeset/80582
BUGCR71022 LEOPARD : fast/text/justify-ideograph-vertical.html = IMAGE

@@ -1,3 +1,17 @@
2011-05-24 James Simonsen <simonjam@chromium.org>

Reviewed by Eric Seidel.

ASSERT_NOT_REACHED reached with broken ideograph and system fallback
https://bugs.webkit.org/show_bug.cgi?id=53528

Test: fast/text/justify-ideograph-vertical.html (on chromium linux)

* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataForCharacter): Identify and handle broken ideographs as any other variant.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::variantFontData): Added BrokenIdeographVariant.

2011-05-24 Syed Idris Shah <syed.idris-shah@nokia.com>

Reviewed by Andreas Kling.
@@ -70,7 +70,7 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant va
m_fontList->m_pageZero = node;
}

GlyphPage* page;
GlyphPage* page = 0;
if (variant == NormalVariant) {
// Fastest loop, for the common case (normal variant).
while (true) {
@@ -79,23 +79,14 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant va
GlyphData data = page->glyphDataForCharacter(c);
if (data.fontData && (data.fontData->platformData().orientation() == Horizontal || data.fontData->isTextOrientationFallback()))
return data;

if (data.fontData) {
if (isCJKIdeographOrSymbol(c)) {
if (!data.fontData->hasVerticalGlyphs()) {
// Use the broken ideograph font data. The broken ideograph font will use the horizontal width of glyphs
// to make sure you get a square (even for broken glyphs like symbols used for punctuation).
const SimpleFontData* brokenIdeographFontData = data.fontData->brokenIdeographFontData();
GlyphPageTreeNode* brokenIdeographNode = GlyphPageTreeNode::getRootChild(brokenIdeographFontData, pageNumber);
const GlyphPage* brokenIdeographPage = brokenIdeographNode->page();
if (brokenIdeographPage) {
GlyphData brokenIdeographData = brokenIdeographPage->glyphDataForCharacter(c);
if (brokenIdeographData.fontData)
return brokenIdeographData;
}

// Shouldn't be possible to even reach this point.
ASSERT_NOT_REACHED();
variant = BrokenIdeographVariant;
break;
}
} else {
if (m_fontDescription.textOrientation() == TextOrientationVerticalRight) {
@@ -145,7 +136,8 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant va
else
m_fontList->m_pageZero = node;
}
} else {
}
if (variant != NormalVariant) {
while (true) {
page = node->page();
if (page) {
@@ -200,8 +192,12 @@ GlyphData Font::glyphDataForCharacter(UChar32 c, bool mirror, FontDataVariant va
codeUnitsLength = 2;
}
const SimpleFontData* characterFontData = fontCache()->getFontDataForCharacters(*this, codeUnits, codeUnitsLength);
if (variant != NormalVariant && characterFontData)
characterFontData = characterFontData->variantFontData(m_fontDescription, variant);
if (characterFontData) {
if (characterFontData->platformData().orientation() == Vertical && !characterFontData->hasVerticalGlyphs() && isCJKIdeographOrSymbol(c))
variant = BrokenIdeographVariant;
if (variant != NormalVariant)
characterFontData = characterFontData->variantFontData(m_fontDescription, variant);
}
if (characterFontData) {
// Got the fallback glyph and font.
GlyphPage* fallbackPage = GlyphPageTreeNode::getRootChild(characterFontData, pageNumber)->page();
@@ -65,7 +65,7 @@ namespace WebCore {
class FontDescription;
class SharedBuffer;

enum FontDataVariant { AutoVariant, NormalVariant, SmallCapsVariant, EmphasisMarkVariant };
enum FontDataVariant { AutoVariant, NormalVariant, SmallCapsVariant, EmphasisMarkVariant, BrokenIdeographVariant };
enum Pitch { UnknownPitch, FixedPitch, VariablePitch };

class SimpleFontData : public FontData {
@@ -90,6 +90,7 @@ class SimpleFontData : public FontData {

SimpleFontData* smallCapsFontData(const FontDescription&) const;
SimpleFontData* emphasisMarkFontData(const FontDescription&) const;
SimpleFontData* brokenIdeographFontData() const;

SimpleFontData* variantFontData(const FontDescription& description, FontDataVariant variant) const
{
@@ -98,6 +99,8 @@ class SimpleFontData : public FontData {
return smallCapsFontData(description);
case EmphasisMarkVariant:
return emphasisMarkFontData(description);
case BrokenIdeographVariant:
return brokenIdeographFontData();
case AutoVariant:
case NormalVariant:
break;
@@ -108,7 +111,6 @@ class SimpleFontData : public FontData {

SimpleFontData* verticalRightOrientationFontData() const;
SimpleFontData* uprightOrientationFontData() const;
SimpleFontData* brokenIdeographFontData() const;

bool hasVerticalGlyphs() const { return m_hasVerticalGlyphs; }
bool isTextOrientationFallback() const { return m_isTextOrientationFallback; }

0 comments on commit fad5e5f

Please sign in to comment.