Changeset 41152 in webkit
- Timestamp:
- Feb 23, 2009 12:11:05 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r41150 r41152 1 2009-02-23 Adam Treat <adam.treat@torchmobile.com> 2 3 Reviewed by David Hyatt. 4 5 No testcases have been added or modified since this patch should not result in 6 a behavior change for ports that have layout tests enabled. 7 8 Currently, the implementation of GraphicsContext::drawLineForText amongst 9 the various ports differ in that some of them are honoring the context's 10 strokeStyle when drawing a text-decoration and some of them are not. 11 For instance, Apple's Mac port *does not* honor the context's strokeStyle(), 12 but the Cairo implementation does and has an explicit workaround that 13 sets the strokeStyle() temporarily. 14 15 This patch fixes so that all ports are consistent by explicitly making sure 16 to set the GraphicsContext strokeStyle to SolidStroke whenever 17 painting the text-decoration of an InlineFlowBox or InlineTextBox as these 18 should always use a solid stroke. 19 20 This patch addresses these bugs: 21 https://bugs.webkit.org/show_bug.cgi?id=19364 22 https://bugs.webkit.org/show_bug.cgi?id=15659 23 24 * rendering/InlineFlowBox.cpp: 25 (WebCore::InlineFlowBox::paintTextDecorations): 26 * rendering/InlineTextBox.cpp: 27 (WebCore::InlineTextBox::paintDecoration): 28 1 29 2009-02-23 Scott Violet <sky@google.com> 2 30 -
trunk/WebCore/rendering/InlineFlowBox.cpp
r40916 r41152 932 932 if (paintUnderline) { 933 933 context->setStrokeColor(underline); 934 context->setStrokeStyle(SolidStroke); 934 935 // Leave one pixel of white between the baseline and the underline. 935 936 context->drawLineForText(IntPoint(tx, ty + baselinePos + 1), w, isPrinting); … … 937 938 if (paintOverline) { 938 939 context->setStrokeColor(overline); 940 context->setStrokeStyle(SolidStroke); 939 941 context->drawLineForText(IntPoint(tx, ty), w, isPrinting); 940 942 } 941 943 if (paintLineThrough) { 942 944 context->setStrokeColor(linethrough); 945 context->setStrokeStyle(SolidStroke); 943 946 context->drawLineForText(IntPoint(tx, ty + 2 * baselinePos / 3), w, isPrinting); 944 947 } -
trunk/WebCore/rendering/InlineTextBox.cpp
r40930 r41152 636 636 if (deco & UNDERLINE) { 637 637 context->setStrokeColor(underline); 638 context->setStrokeStyle(SolidStroke); 638 639 // Leave one pixel of white between the baseline and the underline. 639 640 context->drawLineForText(IntPoint(tx, ty + baseline + 1), width, isPrinting); … … 641 642 if (deco & OVERLINE) { 642 643 context->setStrokeColor(overline); 644 context->setStrokeStyle(SolidStroke); 643 645 context->drawLineForText(IntPoint(tx, ty), width, isPrinting); 644 646 } 645 647 if (deco & LINE_THROUGH) { 646 648 context->setStrokeColor(linethrough); 649 context->setStrokeStyle(SolidStroke); 647 650 context->drawLineForText(IntPoint(tx, ty + 2 * baseline / 3), width, isPrinting); 648 651 }
Note: See TracChangeset
for help on using the changeset viewer.