Changeset 63654 in webkit
- Timestamp:
- Jul 19, 2010 7:08:31 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63650 r63654 1 2010-07-19 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Some composition modes fail when color has alpha zero 6 https://bugs.webkit.org/show_bug.cgi?id=36973 7 8 Unskip fast/canvas/canvas-composite-alpha.html 9 10 * platform/qt/Skipped: 11 1 12 2010-07-19 Pavel Podivilov <podivilov@chromium.org> 2 13 -
trunk/LayoutTests/platform/qt/Skipped
r63623 r63654 2606 2606 fast/text/international/002.html 2607 2607 fast/block/positioning/absolute-in-inline-rtl-4.html 2608 fast/canvas/canvas-composite-alpha.html2609 2608 fast/canvas/canvas-gradient-addStop-error.html 2610 2609 fast/css/zoom-body-scroll.html -
trunk/WebCore/ChangeLog
r63653 r63654 1 2010-07-19 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Some composition modes fail when color has alpha zero 6 https://bugs.webkit.org/show_bug.cgi?id=36973 7 8 Remove erroneous optimization that ignored painting calls when 9 the stroke/fill color had an alpha value of zero. 10 11 * platform/graphics/qt/GraphicsContextQt.cpp: 12 (WebCore::GraphicsContext::drawLine): 13 (WebCore::GraphicsContext::strokeArc): 14 (WebCore::GraphicsContext::fillPath): 15 (WebCore::GraphicsContext::strokePath): 16 (WebCore::GraphicsContext::fillRect): 17 (WebCore::GraphicsContext::fillRoundedRect): 18 1 19 2010-07-19 Andreas Kling <andreas.kling@nokia.com> 2 20 -
trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
r63614 r63654 359 359 StrokeStyle style = strokeStyle(); 360 360 Color color = strokeColor(); 361 if (style == NoStroke || !color.alpha())361 if (style == NoStroke) 362 362 return; 363 363 … … 468 468 void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSpan) 469 469 { 470 if (paintingDisabled() || strokeStyle() == NoStroke || strokeThickness() <= 0.0f || !strokeColor().alpha())470 if (paintingDisabled() || strokeStyle() == NoStroke || strokeThickness() <= 0.0f) 471 471 return; 472 472 … … 571 571 path.setFillRule(toQtFillRule(fillRule())); 572 572 573 if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) { 574 drawFilledShadowPath(this, p, path); 575 if (m_common->state.fillPattern) { 576 AffineTransform affine; 577 p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine))); 578 } else if (m_common->state.fillGradient) { 579 QBrush brush(*m_common->state.fillGradient->platformGradient()); 580 brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform()); 581 p->fillPath(path, brush); 582 } else { 583 if (fillColor().alpha()) 584 p->fillPath(path, p->brush()); 585 } 586 } 573 drawFilledShadowPath(this, p, path); 574 if (m_common->state.fillPattern) { 575 AffineTransform affine; 576 p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine))); 577 } else if (m_common->state.fillGradient) { 578 QBrush brush(*m_common->state.fillGradient->platformGradient()); 579 brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform()); 580 p->fillPath(path, brush); 581 } else 582 p->fillPath(path, p->brush()); 583 587 584 m_data->currentPath = QPainterPath(); 588 585 } … … 598 595 path.setFillRule(toQtFillRule(fillRule())); 599 596 600 if (m_common->state.strokePattern || m_common->state.strokeGradient || strokeColor().alpha()) { 601 FloatSize shadowSize; 602 float shadowBlur; 603 Color shadowColor; 604 if (getShadow(shadowSize, shadowBlur, shadowColor)) { 605 QTransform t(p->worldTransform()); 606 p->translate(shadowSize.width(), shadowSize.height()); 607 QPen shadowPen(pen); 608 shadowPen.setColor(shadowColor); 609 p->strokePath(path, shadowPen); 610 p->setWorldTransform(t); 611 } 612 if (m_common->state.strokePattern) { 613 AffineTransform affine; 614 pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine))); 615 p->setPen(pen); 616 p->strokePath(path, pen); 617 } else if (m_common->state.strokeGradient) { 618 QBrush brush(*m_common->state.strokeGradient->platformGradient()); 619 brush.setTransform(m_common->state.strokeGradient->gradientSpaceTransform()); 620 pen.setBrush(brush); 621 p->setPen(pen); 622 p->strokePath(path, pen); 623 } else { 624 if (strokeColor().alpha()) 625 p->strokePath(path, pen); 626 } 627 } 597 FloatSize shadowSize; 598 float shadowBlur; 599 Color shadowColor; 600 if (getShadow(shadowSize, shadowBlur, shadowColor)) { 601 QTransform t(p->worldTransform()); 602 p->translate(shadowSize.width(), shadowSize.height()); 603 QPen shadowPen(pen); 604 shadowPen.setColor(shadowColor); 605 p->strokePath(path, shadowPen); 606 p->setWorldTransform(t); 607 } 608 if (m_common->state.strokePattern) { 609 AffineTransform affine; 610 pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine))); 611 p->setPen(pen); 612 p->strokePath(path, pen); 613 } else if (m_common->state.strokeGradient) { 614 QBrush brush(*m_common->state.strokeGradient->platformGradient()); 615 brush.setTransform(m_common->state.strokeGradient->gradientSpaceTransform()); 616 pen.setBrush(brush); 617 p->setPen(pen); 618 p->strokePath(path, pen); 619 } else 620 p->strokePath(path, pen); 628 621 m_data->currentPath = QPainterPath(); 629 622 } … … 713 706 return; 714 707 715 if (!(m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()))716 return;717 718 708 QPainter* p = m_data->p(); 719 709 FloatRect normalizedRect = rect.normalized(); … … 760 750 } 761 751 p->fillRect(normalizedRect, brush); 762 } else if (fillColor().alpha()){752 } else { 763 753 if (hasShadow) { 764 754 pShadow->fillRect(shadowImage->rect(), p->brush()); … … 788 778 void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace) 789 779 { 790 if (paintingDisabled() || !color.isValid() || !color.alpha())780 if (paintingDisabled() || !color.isValid()) 791 781 return; 792 782
Note: See TracChangeset
for help on using the changeset viewer.