Fix for <rdar://problem/
5230188> REGRESSION: Active/inactive marked text is not distinguished in textfields and textareas
We were previously trying to leave room for 1px of space between the text and the underline.
This change removes that requirement so that if we don't have room for the extra space, we still draw the thick underline
touching the text.
* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextUnderline):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24206
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-11 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin.
+
+ Fix for <rdar://problem/5230188> REGRESSION: Active/inactive marked text is not distinguished in textfields and textareas
+
+ We were previously trying to leave room for 1px of space between the text and the underline.
+ This change removes that requirement so that if we don't have room for the extra space, we still draw the thick underline
+ touching the text.
+
+ * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextUnderline):
+
2007-07-11 Anders Carlsson <andersca@apple.com>
Reviewed by Darin and Geoff.
width = static_cast<RenderText*>(m_object)->width(paintStart, paintEnd - paintStart, textPos() + start, m_firstLine);
}
- // Thick marked text underlines are 2px thick as long as there is room for 1px space under the baseline.
- // All other marked text underlines are 1px thick, and if there's not enough space they will touch or overlap characters.
+ // Thick marked text underlines are 2px thick as long as there is room for the 2px line under the baseline.
+ // All other marked text underlines are 1px thick.
+ // If there's not enough space the underline will touch or overlap characters.
int lineThickness = 1;
- if (underline.thick && m_height - m_baseline > 2)
+ if (underline.thick && m_height - m_baseline >= 2)
lineThickness = 2;
ctx->setStrokeColor(underline.color);