Changeset 89950 in webkit
- Timestamp:
- Jun 28, 2011, 12:37:07 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderFileUploadControl.cpp (modified) (1 diff)
-
rendering/RenderTextControl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89948 r89950 1 2011-06-28 Abhishek Arya <inferno@chromium.org> 2 3 Reviewed by Anders Carlsson. 4 5 Split the string creation into a local (while creating text runs) 6 so that it is not destroyed prematurely. 7 https://bugs.webkit.org/show_bug.cgi?id=63543 8 9 Run fast/forms/text-control-intrinsic-widths.html under valgrind/ASAN. 10 * rendering/RenderFileUploadControl.cpp: 11 (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): 12 this one is just done for caution, in case, we don't do the same 13 mistake when adding legacy rounding hacks option. 14 * rendering/RenderTextControl.cpp: 15 (WebCore::RenderTextControl::getAvgCharWidth): 16 1 17 2011-06-28 Greg Simon <gregsimon@chromium.org> 2 18 -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r89777 r89950 160 160 // (using "0" as the nominal character). 161 161 const UChar ch = '0'; 162 float charWidth = font.width(constructTextRun(this, font, String(&ch, 1), style, TextRun::AllowTrailingExpansion)); 162 const String str = String(&ch, 1); 163 float charWidth = font.width(constructTextRun(this, font, str, style, TextRun::AllowTrailingExpansion)); 163 164 m_maxPreferredLogicalWidth = (int)ceilf(charWidth * defaultWidthNumChars); 164 165 } -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r89913 r89950 523 523 524 524 const UChar ch = '0'; 525 const String str = String(&ch, 1); 525 526 const Font& font = style()->font(); 526 TextRun textRun = constructTextRun(this, font, String(&ch, 1), style(), TextRun::AllowTrailingExpansion);527 TextRun textRun = constructTextRun(this, font, str, style(), TextRun::AllowTrailingExpansion); 527 528 textRun.disableRoundingHacks(); 528 529 return font.width(textRun);
Note:
See TracChangeset
for help on using the changeset viewer.