Changeset 86449 in webkit
- Timestamp:
- May 13, 2011 11:21:12 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86448 r86449 1 2011-05-13 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Switch paintCollapsedBorder to use IntRect 6 https://bugs.webkit.org/show_bug.cgi?id=60739 7 8 Updating the last offending paint function that takes four ints 9 instead of an IntRect. 10 11 No new tests as this is simple refactoring. 12 13 * rendering/RenderTableCell.cpp: 14 (WebCore::RenderTableCell::paint): 15 (WebCore::RenderTableCell::paintCollapsedBorder): 16 * rendering/RenderTableCell.h: 17 1 18 2011-05-13 Abhishek Arya <inferno@chromium.org> 2 19 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r86384 r86449 813 813 if (ty - table()->outerBorderTop() < paintInfo.rect.maxY() + os 814 814 && ty + height() + table()->outerBorderBottom() > paintInfo.rect.y() - os) 815 paintCollapsedBorder(paintInfo.context, tx, ty, width(), height());815 paintCollapsedBorder(paintInfo.context, IntRect(tx, ty, width(), height())); 816 816 return; 817 817 } … … 913 913 } 914 914 915 void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, int tx, int ty, int w, int h)915 void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, const IntRect& paintRect) 916 916 { 917 917 if (!table()->currentBorderStyle()) … … 929 929 int rightWidth = rightVal.width(); 930 930 931 tx -=leftWidth / 2;932 ty -=topWidth / 2;933 w +=leftWidth / 2 + (rightWidth + 1) / 2;934 h +=topWidth / 2 + (bottomWidth + 1) / 2;931 int x = paintRect.x() - leftWidth / 2; 932 int y = paintRect.y() - topWidth / 2; 933 int w = paintRect.width() + leftWidth / 2 + (rightWidth + 1) / 2; 934 int h = paintRect.height() + topWidth / 2 + (bottomWidth + 1) / 2; 935 935 936 936 EBorderStyle topStyle = collapsedBorderStyle(topVal.style()); … … 947 947 // precedence paint on top of borders with lower precedence. 948 948 CollapsedBorders borders; 949 borders.addBorder(topVal, BSTop, renderTop, tx, ty, tx + w, ty + topWidth, topStyle);950 borders.addBorder(bottomVal, BSBottom, renderBottom, tx, ty + h - bottomWidth, tx + w, ty + h, bottomStyle);951 borders.addBorder(leftVal, BSLeft, renderLeft, tx, ty, tx + leftWidth, ty + h, leftStyle);952 borders.addBorder(rightVal, BSRight, renderRight, tx + w - rightWidth, ty, tx + w, ty + h, rightStyle);949 borders.addBorder(topVal, BSTop, renderTop, x, y, x + w, y + topWidth, topStyle); 950 borders.addBorder(bottomVal, BSBottom, renderBottom, x, y + h - bottomWidth, x + w, y + h, bottomStyle); 951 borders.addBorder(leftVal, BSLeft, renderLeft, x, y, x + leftWidth, y + h, leftStyle); 952 borders.addBorder(rightVal, BSRight, renderRight, x + w - rightWidth, y, x + w, y + h, rightStyle); 953 953 954 954 for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) { -
trunk/Source/WebCore/rendering/RenderTableCell.h
r86377 r86449 150 150 virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false); 151 151 152 void paintCollapsedBorder(GraphicsContext*, int x, int y, int w, int h);152 void paintCollapsedBorder(GraphicsContext*, const IntRect&); 153 153 154 154 int m_row;
Note: See TracChangeset
for help on using the changeset viewer.