Diff
Modified: trunk/LayoutTests/ChangeLog (104544 => 104545)
--- trunk/LayoutTests/ChangeLog 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/LayoutTests/ChangeLog 2012-01-10 10:46:31 UTC (rev 104545)
@@ -1,3 +1,12 @@
+2012-01-10 Kenichi Ishibashi <[email protected]>
+
+ Complex path should be used when UVS exists in text run
+ https://bugs.webkit.org/show_bug.cgi?id=75289
+
+ Reviewed by Dan Bernstein.
+
+ * platform/chromium/test_expectations.txt: Updates expectation for fast/text/unicode-variation-selector.html. Need rebaselines.
+
2012-01-10 Mike Lawther <[email protected]>
block mask overlay test for CSS3 calc
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (104544 => 104545)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-10 10:46:31 UTC (rev 104545)
@@ -3774,7 +3774,7 @@
// The test hits an ASSERT in Debug.
BUGWK68859 DEBUG : fast/dynamic/crash-paint-no-documentElement-renderer.html = CRASH
-BUGWK74662 MAC : fast/text/unicode-variation-selector.html = PASS CRASH
+BUGWK74662 : fast/text/unicode-variation-selector.html = IMAGE+TEXT
BUGWK74634 WIN : compositing/absolute-position-changed-with-composited-parent-layer.html = IMAGE
Modified: trunk/Source/WebCore/ChangeLog (104544 => 104545)
--- trunk/Source/WebCore/ChangeLog 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/ChangeLog 2012-01-10 10:46:31 UTC (rev 104545)
@@ -1,5 +1,34 @@
2012-01-10 Kenichi Ishibashi <[email protected]>
+ Complex path should be used when UVS exists in text run
+ https://bugs.webkit.org/show_bug.cgi?id=75289
+
+ Uses complex path when a text run contains UVS. The range from U+180B to U+180D already uses complex path.
+ Removes unnecessary functions that were added by r102915.
+
+ Reviewed by Dan Bernstein.
+
+ No new tests. fast/text/unicode-variation-selector.html should take care of this change.
+
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::codePath): Use Complex path when the text run contains UVS.
+ * platform/graphics/SimpleFontData.h: Removed updateGlyphWithVariationSelector().
+ * platform/graphics/SurrogatePairAwareTextIterator.cpp: Removed unnecessary static functions.
+ * platform/graphics/SurrogatePairAwareTextIterator.h: Removed hasTrailingVariationSelector().
+ * platform/graphics/WidthIterator.cpp:
+ (WebCore::WidthIterator::advance): Removed UVS detection code.
+ * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Removed updateGlyphWithVariationSelector().
+ * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Ditto.
+ * platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Ditto.
+ * platform/graphics/mac/SimpleFontDataMac.mm: Ditto.
+ * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
+ * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto.
+ * platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
+ * platform/graphics/wince/SimpleFontDataWinCE.cpp: Ditto.
+ * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
+
+2012-01-10 Kenichi Ishibashi <[email protected]>
+
WebFonts are re-fetched from the server upon Document::styleSelectorChanged call.
https://bugs.webkit.org/show_bug.cgi?id=73419
Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/Font.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -404,12 +404,22 @@
if (supplementaryCharacter <= 0x1F1FF)
return Complex;
+ if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Unicode variation selectors.
+ continue;
+ if (supplementaryCharacter <= 0xE01EF)
+ return Complex;
+
// FIXME: Check for Brahmi (U+11000 block), Kaithi (U+11080 block) and other complex scripts
// in plane 1 or higher.
continue;
}
+ if (c < 0xFE00) // U+FE00 through U+FE0F Unicode variation selectors
+ continue;
+ if (c <= 0xFE0F)
+ return Complex;
+
if (c < 0xFE20) // U+FE20 through U+FE2F Combining half marks
continue;
if (c <= 0xFE2F)
Modified: trunk/Source/WebCore/platform/graphics/SimpleFontData.h (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/SimpleFontData.h 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/SimpleFontData.h 2012-01-10 10:46:31 UTC (rev 104545)
@@ -158,7 +158,6 @@
const GlyphData& missingGlyphData() const { return m_missingGlyphData; }
void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; }
- void updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph&) const;
#ifndef NDEBUG
virtual String description() const;
Modified: trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -32,21 +32,6 @@
namespace WebCore {
-inline static bool isUnicodeBMPVariationSelector(UChar character)
-{
- return (0x180B <= character && character <= 0x180D) || (0xFE00 <= character && character <= 0xFE0F);
-}
-
-inline static bool isUnicodeSupplementaryVariationSelector(UChar lead, UChar trail)
-{
- // A non-BMP variation selector character is in the range of U+E0100 to U+E01EF.
- // It can be a surrogate pair in which the high surrogate is 0xDB40 and
- // the low surrogate is in the range of U16_TRAIL(0xE0100 - 0x10000) to U16_TRAIL(0xE01EF - 0x10000).
- static const UChar trailStart = U16_TRAIL(0xE0100 - 0x10000);
- static const UChar trailEnd = U16_TRAIL(0xE01EF - 0x10000);
- return lead == 0xDB40 && trailStart <= trail && trail <= trailEnd;
-}
-
SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator(const UChar* characters, int currentCharacter, int lastCharacter, int endCharacter)
: m_characters(characters)
, m_currentCharacter(currentCharacter)
@@ -98,21 +83,6 @@
return true;
}
-bool SurrogatePairAwareTextIterator::hasTrailingVariationSelector(UChar32& selector, unsigned& clusterLength)
-{
- if (static_cast<int>(m_currentCharacter + clusterLength) < m_endCharacter && isUnicodeBMPVariationSelector(m_characters[clusterLength])) {
- selector = m_characters[clusterLength];
- clusterLength += 1;
- return true;
- }
- if (static_cast<int>(m_currentCharacter + clusterLength + 1) < m_endCharacter && isUnicodeSupplementaryVariationSelector(m_characters[clusterLength], m_characters[clusterLength + 1])) {
- selector = U16_GET_SUPPLEMENTARY(m_characters[clusterLength], m_characters[clusterLength + 1]);
- clusterLength += 2;
- return true;
- }
- return false;
-}
-
void SurrogatePairAwareTextIterator::advance(unsigned advanceLength)
{
m_characters += advanceLength;
Modified: trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/SurrogatePairAwareTextIterator.h 2012-01-10 10:46:31 UTC (rev 104545)
@@ -32,7 +32,6 @@
SurrogatePairAwareTextIterator(const UChar*, int currentCharacter, int lastCharacter, int endCharacter);
bool consume(UChar32& character, unsigned& clusterLength);
- bool hasTrailingVariationSelector(UChar32& selector, unsigned& clusterLength);
void advance(unsigned advanceLength);
int currentCharacter() const { return m_currentCharacter; }
Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -115,13 +115,6 @@
ASSERT(fontData);
- // If a variation selector follows, update glyph with the selector if possible.
- UChar32 selector = 0;
- if (textIterator.hasTrailingVariationSelector(selector, clusterLength)) {
- fontData->updateGlyphWithVariationSelector(character, selector, glyph);
- advanceLength = clusterLength;
- }
-
// Now that we have a glyph and font data, get its width.
float width;
if (character == '\t' && m_run.allowTabs()) {
Modified: trunk/Source/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -199,9 +199,4 @@
return static_cast<float>(width);
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -162,9 +162,4 @@
return w;
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
}
-
-}
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/SimpleFontDataSkia.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/SimpleFontDataSkia.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/SimpleFontDataSkia.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -236,9 +236,4 @@
return round(SkScalarToFloat(width));
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm 2012-01-10 10:46:31 UTC (rev 104545)
@@ -467,32 +467,4 @@
return true;
}
-static inline void decomposeToUTF16(UChar* buffer, unsigned& length, const UChar32 character)
-{
- if (U_IS_BMP(character)) {
- buffer[length] = character;
- ++length;
- return;
- }
-
- buffer[length] = U16_LEAD(character);
- buffer[length + 1] = U16_TRAIL(character);
- length += 2;
-}
-
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- unsigned length = 0;
- UChar buffer[4];
-
- decomposeToUTF16(buffer, length, character);
- decomposeToUTF16(buffer, length, selector);
- ASSERT(length <= 4);
-
- CGGlyph glyphs[4];
- wkGetGlyphsForCharacters(platformData().cgFont(), buffer, glyphs, length);
- if (glyphs[0])
- glyph = glyphs[0];
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/pango/SimpleFontDataPango.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/pango/SimpleFontDataPango.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/pango/SimpleFontDataPango.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -160,9 +160,4 @@
return width;
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
}
-
-}
Modified: trunk/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -189,9 +189,4 @@
{
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
}
-
-}
Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -282,9 +282,4 @@
return m_scriptFontProperties;
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
}
-
-}
Modified: trunk/Source/WebCore/platform/graphics/wince/SimpleFontDataWinCE.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/wince/SimpleFontDataWinCE.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/wince/SimpleFontDataWinCE.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -180,9 +180,4 @@
m_maxCharWidth = (tm.tmMaxCharWidth * m_platformData.size() + 36) / 72;
}
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp (104544 => 104545)
--- trunk/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp 2012-01-10 10:34:46 UTC (rev 104544)
+++ trunk/Source/WebCore/platform/graphics/wx/SimpleFontDataWx.cpp 2012-01-10 10:46:31 UTC (rev 104545)
@@ -194,9 +194,4 @@
}
#endif
-void SimpleFontData::updateGlyphWithVariationSelector(UChar32 character, UChar32 selector, Glyph& glyph) const
-{
- // FIXME: Implement.
}
-
-}