Changeset 90919 in webkit


Ignore:
Timestamp:
Jul 13, 2011 8:43:43 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Fix compile for QRawFont.

https://bugs.webkit.org/show_bug.cgi?id=64453

Patch by Pierre Rossi <pierre.rossi@gmail.com> on 2011-07-13
Reviewed by Andreas Kling.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/qt/FontQt.cpp:

(WebCore::Font::drawGlyphs):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90914 r90919  
     12011-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
    1132011-07-13  John Knottenbelt  <jknotten@chromium.org>
    214
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r90872 r90919  
    5454#include <QPainter>
    5555namespace WebCore {
    56 class ContextShadow;
    5756class ShadowBlur;
    5857}
  • trunk/Source/WebCore/platform/graphics/qt/FontQt.cpp

    r90406 r90919  
    4343#include <QPainterPath>
    4444#include <QPen>
     45#if HAVE(QRAWFONT)
     46#include <QPointF>
     47#endif
    4548#include <QTextLayout>
    4649#include <qalgorithms.h>
     
    334337    ASSERT(!shouldStroke);
    335338
    336     // Shadowed text should always take the complex path.
    337     ASSERT(context->contextShadow()->type() == ShadowBlur::NoShadow);
    338 
    339339    if (!shouldFill && !shouldStroke)
    340340        return;
     
    367367    QPainter* painter = context->platformContext();
    368368
    369     ContextShadow* shadow = context->contextShadow();
     369    ShadowBlur* shadow = context->shadowBlur();
    370370    switch (shadow->type()) {
    371     case ContextShadow::SolidShadow: {
     371    case ShadowBlur::SolidShadow: {
    372372        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);
    375376        painter->drawGlyphRun(point, qtGlyphs);
    376         painter->translate(-shadow->offset());
     377        painter->translate(-shadowOffset);
    377378        painter->setPen(previousPen);
    378379        break;
    379380    }
    380     case ContextShadow::BlurShadow: {
     381    case ShadowBlur::BlurShadow: {
    381382        qreal height = rawFont.ascent() + rawFont.descent() + 1;
    382383        QRectF boundingRect(point.x(), point.y() - rawFont.ascent(), width, height);
     
    384385        if (shadowContext) {
    385386            QPainter* shadowPainter = shadowContext->platformContext();
    386             shadowPainter->setPen(shadow->m_color);
     387            shadowPainter->setPen(context->state().shadowColor);
    387388            shadowPainter->drawGlyphRun(point, qtGlyphs);
    388389            shadow->endShadowLayer(context);
     
    390391        break;
    391392    }
    392     case ContextShadow::NoShadow:
     393    case ShadowBlur::NoShadow:
    393394        break;
    394395    default:
Note: See TracChangeset for help on using the changeset viewer.