Show
Ignore:
Timestamp:
02/12/07 15:36:34 (2 years ago)
Author:
darin
Message:

LayoutTests:

Reviewed by Hyatt.

  • update pixel results in cases where overline and line-through were used, because our old code put them 1px too low
  • css1/cascade/cascade_order-expected.checksum: Updated because this has line-through style.
  • css1/cascade/cascade_order-expected.png: Ditto.
  • css1/text_properties/text_decoration-expected.checksum: Updated because this has overline and line-through.
  • css1/text_properties/text_decoration-expected.png: Ditto.
  • css2.1/t1504-c543-txt-decor-00-d-g-expected.checksum: Ditto.
  • css2.1/t1504-c543-txt-decor-00-d-g-expected.png: Ditto.
  • fast/text/stroking-decorations-expected.checksum: Ditto.
  • fast/text/stroking-decorations-expected.png: Ditto.
  • added some missing pixel-test results
  • fast/forms/disabled-select-change-index-expected.checksum: Added.
  • fast/forms/disabled-select-change-index-expected.png: Added.

WebCore:

Reviewed by Hyatt.

  • fix bug where overline and line-through were 1px lower than we intended
  • platform/graphics/GraphicsContext.h: Removed unneeded y offset parameter.
  • platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawLineForText): Removed bogus y offset and +1.
  • platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawLineForText): Ditto.
  • platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawLineForText): Ditto.
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintTextDecorations): Added the "+1" that used to be inside drawLineForText to the underline-drawing code. Changed the other callers of drawLineForText to include the y offset in the y coordinate.
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintDecoration): Ditto. Also renamed _tx and _ty to remove the gratuitious underscores. (WebCore::InlineTextBox::paintMarkedTextUnderline): Made the default thickness be 1px instead of 0 (which ends up being roughly 1px in the CG code path anyway). Fixed the code computing the position to put the underline at the bottom of the line (different from regular underlines which are put 1px under the baseline). The old code used to put the underline 1px further down in the thick case, and 2px further down in the non-thick case. Both of those are bad, because they could be completely clipped out in many cases.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

    r19508 r19587  
    424424} 
    425425 
    426 void GraphicsContext::drawLineForText(const IntPoint& point, int yOffset, int width, bool printing) 
    427 { 
    428     if (paintingDisabled()) 
    429         return; 
    430  
    431     IntPoint origin = point + IntSize(0, yOffset + 1); 
     426void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing) 
     427{ 
     428    if (paintingDisabled()) 
     429        return; 
     430 
    432431    IntPoint endPoint = origin + IntSize(width, 0); 
    433432    drawLine(origin, endPoint);