Changeset 90919 in webkit
- Timestamp:
- Jul 13, 2011 8:43:43 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90914 r90919 1 2011-07-13 Pierre Rossi <pierre.rossi@gmail.com> 2 3 Fix compile for QRawFont. 4 5 https://bugs.webkit.org/show_bug.cgi?id=64453 6 7 Reviewed by Andreas Kling. 8 9 * platform/graphics/GraphicsContext.h: 10 * platform/graphics/qt/FontQt.cpp: 11 (WebCore::Font::drawGlyphs): 12 1 13 2011-07-13 John Knottenbelt <jknotten@chromium.org> 2 14 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r90872 r90919 54 54 #include <QPainter> 55 55 namespace WebCore { 56 class ContextShadow;57 56 class ShadowBlur; 58 57 } -
trunk/Source/WebCore/platform/graphics/qt/FontQt.cpp
r90406 r90919 43 43 #include <QPainterPath> 44 44 #include <QPen> 45 #if HAVE(QRAWFONT) 46 #include <QPointF> 47 #endif 45 48 #include <QTextLayout> 46 49 #include <qalgorithms.h> … … 334 337 ASSERT(!shouldStroke); 335 338 336 // Shadowed text should always take the complex path.337 ASSERT(context->contextShadow()->type() == ShadowBlur::NoShadow);338 339 339 if (!shouldFill && !shouldStroke) 340 340 return; … … 367 367 QPainter* painter = context->platformContext(); 368 368 369 ContextShadow* shadow = context->contextShadow();369 ShadowBlur* shadow = context->shadowBlur(); 370 370 switch (shadow->type()) { 371 case ContextShadow::SolidShadow: {371 case ShadowBlur::SolidShadow: { 372 372 QPen previousPen = painter->pen(); 373 painter->setPen(shadow->m_color); 374 painter->translate(shadow->offset()); 373 painter->setPen(context->state().shadowColor); 374 const QPointF shadowOffset(context->state().shadowOffset.width(), context->state().shadowOffset.height()); 375 painter->translate(shadowOffset); 375 376 painter->drawGlyphRun(point, qtGlyphs); 376 painter->translate(-shadow ->offset());377 painter->translate(-shadowOffset); 377 378 painter->setPen(previousPen); 378 379 break; 379 380 } 380 case ContextShadow::BlurShadow: {381 case ShadowBlur::BlurShadow: { 381 382 qreal height = rawFont.ascent() + rawFont.descent() + 1; 382 383 QRectF boundingRect(point.x(), point.y() - rawFont.ascent(), width, height); … … 384 385 if (shadowContext) { 385 386 QPainter* shadowPainter = shadowContext->platformContext(); 386 shadowPainter->setPen( shadow->m_color);387 shadowPainter->setPen(context->state().shadowColor); 387 388 shadowPainter->drawGlyphRun(point, qtGlyphs); 388 389 shadow->endShadowLayer(context); … … 390 391 break; 391 392 } 392 case ContextShadow::NoShadow:393 case ShadowBlur::NoShadow: 393 394 break; 394 395 default:
Note: See TracChangeset
for help on using the changeset viewer.