Changeset 58404 in webkit
- Timestamp:
- Apr 28, 2010 4:58:45 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r58403 r58404 1 2010-04-28 Marcus Bulach <bulach@chromium.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Reverts 58340 (https://bugs.webkit.org/show_bug.cgi?id=38158) due to regression on fast/text/international/khmer-selection.html 6 https://bugs.webkit.org/show_bug.cgi?id=38254 7 8 * platform/graphics/chromium/FontLinux.cpp: 9 (WebCore::adjustTextRenderMode): 10 (WebCore::TextRunWalker::getTextRun): 11 (WebCore::TextRunWalker::getNormalizedTextRun): 12 (WebCore::TextRunWalker::setGlyphXPositions): 13 (WebCore::glyphIndexForXPositionInScriptRun): 14 (WebCore::Font::offsetForPositionForComplexText): 15 (WebCore::Font::selectionRectForComplexText): 16 * platform/graphics/chromium/FontPlatformDataLinux.cpp: 17 (WebCore::FontPlatformData::setupPaint): 18 * platform/graphics/chromium/HarfbuzzSkia.cpp: 19 (WebCore::getOutlinePoint): 20 * platform/graphics/skia/GraphicsContext3DSkia.cpp: 21 (WebCore::GraphicsContext3D::getImageData): 22 * platform/graphics/skia/GraphicsContextSkia.cpp: 23 (WebCore::isCoordinateSkiaSafe): 24 (WebCore::GraphicsContext::fillRect): 25 (WebCore::GraphicsContext::strokePath): 26 (WebCore::GraphicsContext::strokeRect): 27 1 28 2010-04-28 Andrey Kosyakov <caseq@chromium.org> 2 29 -
trunk/WebCore/platform/graphics/chromium/FontLinux.cpp
r58340 r58404 65 65 } 66 66 67 static voidadjustTextRenderMode(SkPaint* paint, bool isCanvasMultiLayered)67 static bool adjustTextRenderMode(SkPaint* paint, bool isCanvasMultiLayered) 68 68 { 69 69 // Our layers only have a single alpha channel. This means that subpixel … … 325 325 // 2) Convert spacing characters into plain spaces, as some fonts will provide glyphs 326 326 // for characters like '\n' otherwise. 327 for ( inti = 0; i < originalRun.length(); ++i) {327 for (unsigned i = 0; i < originalRun.length(); ++i) { 328 328 UChar ch = originalRun[i]; 329 329 UBlockCode block = ::ublock_getCode(ch); … … 347 347 ASSERT(U_SUCCESS(error)); 348 348 349 for ( inti = 0; i < normalizedString.length(); ++i) {349 for (unsigned i = 0; i < normalizedString.length(); ++i) { 350 350 if (Font::treatAsSpace(m_normalizedBuffer[i])) 351 351 m_normalizedBuffer[i] = ' '; … … 440 440 { 441 441 double position = 0; 442 for (int iter = 0; iter < static_cast<int>(m_item.num_glyphs); ++iter) {442 for (int iter = 0; iter < m_item.num_glyphs; ++iter) { 443 443 // Glyphs are stored in logical order, but for layout purposes we always go left to right. 444 444 int i = isRTL ? m_item.num_glyphs - iter - 1 : iter; … … 539 539 } 540 540 } else { 541 for (glyphIndex = 0; glyphIndex < static_cast<int>(walker.length()); ++glyphIndex) {541 for (glyphIndex = 0; glyphIndex < walker.length(); ++glyphIndex) { 542 542 if (x < truncateFixedPointToInteger(advances[glyphIndex])) 543 543 break; … … 591 591 basePosition -= walker.numCodePoints(); 592 592 593 if (x < static_cast<int>(walker.width())) {593 if (x < walker.width()) { 594 594 // The x value in question is within this script run. We consider 595 595 // each glyph in presentation order and stop when we find the one … … 651 651 base -= walker.width(); 652 652 653 if (fromX == -1 && from < static_cast<int>(walker.numCodePoints())) {653 if (fromX == -1 && from < walker.numCodePoints()) { 654 654 // |from| is within this script run. So we index the clusters log to 655 655 // find which glyph this code-point contributed to and find its x … … 661 661 from -= walker.numCodePoints(); 662 662 663 if (toX == -1 && to < static_cast<int>(walker.numCodePoints())) {663 if (toX == -1 && to < walker.numCodePoints()) { 664 664 int glyph = walker.logClusters()[to]; 665 665 toX = base + walker.xPositions()[glyph]; -
trunk/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
r58340 r58404 149 149 paint->setTextSkewX(m_fakeItalic ? -SK_Scalar1 / 4 : 0); 150 150 151 if (m_style.useAntiAlias == 1 || (m_style.useAntiAlias == FontRenderStyle::NoPreference && isSkiaAntiAlias))151 if (m_style.useAntiAlias == 1 || m_style.useAntiAlias == FontRenderStyle::NoPreference && isSkiaAntiAlias) 152 152 paint->setLCDRenderText(m_style.useSubpixel == FontRenderStyle::NoPreference ? isSkiaSubpixelGlyphs : m_style.useSubpixel); 153 153 } -
trunk/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp
r58340 r58404 140 140 SkPath path; 141 141 paint.getTextPath(&glyph16, sizeof(glyph16), 0, 0, &path); 142 unsigned numPoints = path.getPoints(0, 0);142 int numPoints = path.getPoints(NULL, 0); 143 143 if (point >= numPoints) 144 144 return HB_Err_Invalid_SubTable; -
trunk/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
r58340 r58404 56 56 SkBitmap& skiaImageRef = *skiaImage; 57 57 SkAutoLockPixels lock(skiaImageRef); 58 int width = skiaImage->width(); 58 59 int height = skiaImage->height(); 59 60 int rowBytes = skiaImage->rowBytes(); 60 ASSERT(rowBytes == skiaImage->width()* 4);61 ASSERT(rowBytes == width * 4); 61 62 uint8_t* pixels = reinterpret_cast<uint8_t*>(skiaImage->getPixels()); 62 63 outputVector.resize(rowBytes * height); -
trunk/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r58340 r58404 92 92 // #define ENSURE_VALUE_SAFETY_FOR_SKIA 93 93 94 static bool isCoordinateSkiaSafe(float coord) 95 { 94 96 #ifdef ENSURE_VALUE_SAFETY_FOR_SKIA 95 static bool isCoordinateSkiaSafe(float coord)96 {97 97 // First check for valid floats. 98 98 #if defined(_MSC_VER) … … 111 111 112 112 return true; 113 } 113 #else 114 return true; 114 115 #endif 116 } 115 117 116 118 static bool isPointSkiaSafe(const SkMatrix& transform, const SkPoint& pt) … … 733 735 } 734 736 737 const GraphicsContextState& state = m_common->state; 738 735 739 SkPaint paint; 736 740 platformContext()->setupPaintForFilling(&paint); … … 1119 1123 return; 1120 1124 1125 const GraphicsContextState& state = m_common->state; 1126 1121 1127 SkPaint paint; 1122 1128 platformContext()->setupPaintForStroking(&paint, 0, 0); 1129 1123 1130 platformContext()->canvas()->drawPath(path, paint); 1124 1131 } … … 1131 1138 if (!isRectSkiaSafe(getCTM(), rect)) 1132 1139 return; 1140 1141 const GraphicsContextState& state = m_common->state; 1133 1142 1134 1143 SkPaint paint; 1135 1144 platformContext()->setupPaintForStroking(&paint, 0, 0); 1136 1145 paint.setStrokeWidth(WebCoreFloatToSkScalar(lineWidth)); 1146 1137 1147 platformContext()->canvas()->drawRect(rect, paint); 1138 1148 }
Note: See TracChangeset
for help on using the changeset viewer.