Changeset 20675 in webkit
- Timestamp:
- Apr 2, 2007 10:54:33 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r20674 r20675 1 2007-04-02 Adele Peterson <adele@apple.com> 2 3 Reviewed by Maciej. 4 5 Fix for <rdar://problem/5107095> REGRESSION: disabled text color calculations are slowing down launchtime measurements 6 7 Hardcode disabled text colors for the most common cases- black and white. 8 9 * rendering/RenderTextControl.cpp: (WebCore::disabledTextColor): 10 1 11 2007-04-02 David Hyatt <hyatt@apple.com> 2 12 -
trunk/WebCore/rendering/RenderTextControl.cpp
r20349 r20675 104 104 } 105 105 106 // Hardcode these common cases for speed. 107 const unsigned blackDisabledColor = 0xFF545454; 108 const unsigned whiteDisabledColor = 0xFFABABAB; 106 109 static Color disabledTextColor(const Color& textColor, const Color& backgroundColor) 107 110 { 108 111 if (differenceSquared(textColor, Color::white) > differenceSquared(backgroundColor, Color::white)) 109 return textColor .light();110 return textColor .dark();112 return textColor == Color::black ? Color(blackDisabledColor) : textColor.light(); 113 return textColor == Color::white ? Color(whiteDisabledColor) : textColor.dark(); 111 114 } 112 115
Note: See TracChangeset
for help on using the changeset viewer.