⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 90200 in webkit


Ignore:
Timestamp:
Jun 30, 2011, 8:28:38 PM (15 years ago)
Author:
bashi@chromium.org
Message:

2011-06-30 Kenichi Ishibashi <bashi@chromium.org>

Reviewed by Simon Fraser.

[Chromium] -webkit-text-stroke doesn't affect with non-zero width border property
https://bugs.webkit.org/show_bug.cgi?id=63698

Added a test which ensures text stroke is rendered with non-zero width border.

  • platform/chromium-linux/platform/chromium/fast/text/text-stroke-with-border-expected.png: Added.
  • platform/chromium-linux/platform/chromium/fast/text/text-stroke-with-border-expected.txt: Added.
  • platform/chromium-mac/platform/chromium/fast/text/text-stroke-with-border-expected.png: Added.
  • platform/chromium-mac/platform/chromium/fast/text/text-stroke-with-border-expected.txt: Added.
  • platform/chromium-win/platform/chromium/fast/text/text-stroke-with-border-expected.png: Added.
  • platform/chromium-win/platform/chromium/fast/text/text-stroke-with-border-expected.txt: Added.
  • platform/chromium/fast/text/text-stroke-with-border.html: Added.

2011-06-30 Kenichi Ishibashi <bashi@chromium.org>

Reviewed by Simon Fraser.

[Chromium] -webkit-text-stroke doesn't affect with non-zero width border property
https://bugs.webkit.org/show_bug.cgi?id=63698

Restore the stroke style when it is modified in RenderObject::drawLineForBoxSide() to show text stroke correctly.

Test: platform/chromium/fast/text/text-stroke-with-border.html

  • rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): Save/restore the stroke style.
Location:
trunk
Files:
13 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90199 r90200  
     12011-06-30  Kenichi Ishibashi  <bashi@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        [Chromium] -webkit-text-stroke doesn't affect with non-zero width border property
     6        https://bugs.webkit.org/show_bug.cgi?id=63698
     7
     8        Added a test which ensures text stroke is rendered with non-zero width border.
     9
     10        * platform/chromium-linux/platform/chromium/fast/text/text-stroke-with-border-expected.png: Added.
     11        * platform/chromium-linux/platform/chromium/fast/text/text-stroke-with-border-expected.txt: Added.
     12        * platform/chromium-mac/platform/chromium/fast/text/text-stroke-with-border-expected.png: Added.
     13        * platform/chromium-mac/platform/chromium/fast/text/text-stroke-with-border-expected.txt: Added.
     14        * platform/chromium-win/platform/chromium/fast/text/text-stroke-with-border-expected.png: Added.
     15        * platform/chromium-win/platform/chromium/fast/text/text-stroke-with-border-expected.txt: Added.
     16        * platform/chromium/fast/text/text-stroke-with-border.html: Added.
     17
    1182011-06-30  Andrew Scherkus  <scherkus@chromium.org>
    219
  • trunk/Source/WebCore/ChangeLog

    r90188 r90200  
     12011-06-30  Kenichi Ishibashi  <bashi@chromium.org>
     2
     3        Reviewed by Simon Fraser.
     4
     5        [Chromium] -webkit-text-stroke doesn't affect with non-zero width border property
     6        https://bugs.webkit.org/show_bug.cgi?id=63698
     7
     8        Restore the stroke style when it is modified in RenderObject::drawLineForBoxSide() to show text stroke correctly.
     9
     10        Test: platform/chromium/fast/text/text-stroke-with-border.html
     11
     12        * rendering/RenderObject.cpp:
     13        (WebCore::RenderObject::drawLineForBoxSide): Save/restore the stroke style.
     14
    1152011-06-30  Gwang Yoon Hwang  <ryumiel@company100.net>
    216
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r90186 r90200  
    711711            return;
    712712        case DOTTED:
    713         case DASHED:
     713        case DASHED: {
    714714            graphicsContext->setStrokeColor(color, m_style->colorSpace());
    715715            graphicsContext->setStrokeThickness(width);
     716            StrokeStyle oldStrokeStyle = graphicsContext->strokeStyle();
    716717            graphicsContext->setStrokeStyle(style == DASHED ? DashedStroke : DottedStroke);
    717718
     
    731732                }
    732733                graphicsContext->setShouldAntialias(wasAntialiased);
     734                graphicsContext->setStrokeStyle(oldStrokeStyle);
    733735            }
    734736            break;
     737        }
    735738        case DOUBLE: {
    736739            int third = (width + 1) / 3;
    737740
    738741            if (adjacentWidth1 == 0 && adjacentWidth2 == 0) {
     742                StrokeStyle oldStrokeStyle = graphicsContext->strokeStyle();
    739743                graphicsContext->setStrokeStyle(NoStroke);
    740744                graphicsContext->setFillColor(color, m_style->colorSpace());
     
    760764
    761765                graphicsContext->setShouldAntialias(wasAntialiased);
     766                graphicsContext->setStrokeStyle(oldStrokeStyle);
    762767            } else {
    763768                int adjacent1BigThird = ((adjacentWidth1 > 0) ? adjacentWidth1 + 1 : adjacentWidth1 - 1) / 3;
     
    857862            // fall through
    858863        case SOLID: {
     864            StrokeStyle oldStrokeStyle = graphicsContext->strokeStyle();
    859865            graphicsContext->setStrokeStyle(NoStroke);
    860866            graphicsContext->setFillColor(color, m_style->colorSpace());
     
    868874                graphicsContext->drawRect(IntRect(x1, y1, x2 - x1, y2 - y1));
    869875                graphicsContext->setShouldAntialias(wasAntialiased);
     876                graphicsContext->setStrokeStyle(oldStrokeStyle);
    870877                return;
    871878            }
     
    899906
    900907            graphicsContext->drawConvexPolygon(4, quad, antialias);
     908            graphicsContext->setStrokeStyle(oldStrokeStyle);
    901909            break;
    902910        }
Note: See TracChangeset for help on using the changeset viewer.