Changeset 88049 in webkit
- Timestamp:
- Jun 3, 2011 1:55:44 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88045 r88049 1 2011-06-03 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Switch paintItemForeground and paintItemForeground to use IntPoint 6 https://bugs.webkit.org/show_bug.cgi?id=62035 7 8 Switching paintItemFore/Background to use IntPoint instead of a pair of ints. 9 10 No new tests since this is simple refactoring. 11 12 * rendering/RenderListBox.cpp: 13 (WebCore::RenderListBox::paintObject): 14 (WebCore::RenderListBox::paintItemForeground): 15 (WebCore::RenderListBox::paintItemBackground): 16 * rendering/RenderListBox.h: 17 1 18 2011-06-03 Alexis Menard <alexis.menard@openbossa.org> 2 19 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r87989 r88049 267 267 int index = m_indexOffset; 268 268 while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) { 269 paintItemForeground(paintInfo, tx, ty, index);269 paintItemForeground(paintInfo, IntPoint(tx, ty), index); 270 270 index++; 271 271 } … … 290 290 int index = m_indexOffset; 291 291 while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) { 292 paintItemBackground(paintInfo, tx, ty, index);292 paintItemBackground(paintInfo, IntPoint(tx, ty), index); 293 293 index++; 294 294 } … … 357 357 } 358 358 359 void RenderListBox::paintItemForeground(PaintInfo& paintInfo, int tx, int ty, int listIndex)359 void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const IntPoint& paintOffset, int listIndex) 360 360 { 361 361 SelectElement* select = toSelectElement(static_cast<Element*>(node())); … … 393 393 TextRun textRun(string, length, false, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), itemStyle->unicodeBidi() == Override); 394 394 Font itemFont = style()->font(); 395 IntRect r = itemBoundingBoxRect( IntPoint(tx, ty), listIndex);395 IntRect r = itemBoundingBoxRect(paintOffset, listIndex); 396 396 r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r)); 397 397 … … 408 408 } 409 409 410 void RenderListBox::paintItemBackground(PaintInfo& paintInfo, int tx, int ty, int listIndex)410 void RenderListBox::paintItemBackground(PaintInfo& paintInfo, const IntPoint& paintOffset, int listIndex) 411 411 { 412 412 SelectElement* select = toSelectElement(static_cast<Element*>(node())); … … 427 427 if (!element->renderStyle() || element->renderStyle()->visibility() != HIDDEN) { 428 428 ColorSpace colorSpace = element->renderStyle() ? element->renderStyle()->colorSpace() : style()->colorSpace(); 429 IntRect itemRect = itemBoundingBoxRect( IntPoint(tx, ty), listIndex);430 itemRect.intersect(controlClipRect( IntPoint(tx, ty)));429 IntRect itemRect = itemBoundingBoxRect(paintOffset, listIndex); 430 itemRect.intersect(controlClipRect(paintOffset)); 431 431 paintInfo.context->fillRect(itemRect, backColor, colorSpace); 432 432 } -
trunk/Source/WebCore/rendering/RenderListBox.h
r87443 r88049 134 134 int listHeight() const; 135 135 void paintScrollbar(PaintInfo&, int tx, int ty); 136 void paintItemForeground(PaintInfo&, int tx, int ty, int listIndex);137 void paintItemBackground(PaintInfo&, int tx, int ty, int listIndex);136 void paintItemForeground(PaintInfo&, const IntPoint&, int listIndex); 137 void paintItemBackground(PaintInfo&, const IntPoint&, int listIndex); 138 138 void scrollToRevealSelection(); 139 139
Note: See TracChangeset
for help on using the changeset viewer.