Changeset 109246 in webkit
- Timestamp:
- Feb 29, 2012 12:49:49 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109245 r109246 1 2012-02-29 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Stop doubling maximalOutlineSize during painting 4 https://bugs.webkit.org/show_bug.cgi?id=79724 5 6 Reviewed by Tony Chang. 7 8 Refactoring only, covered by existing tests (mostly repaint ones). 9 10 * rendering/RenderReplaced.cpp: 11 (WebCore::RenderReplaced::shouldPaint): 12 * rendering/RenderTableCell.cpp: 13 (WebCore::RenderTableCell::paintCollapsedBorders): 14 Introduce a local repaint rectangle that we inflate by the maximalOutlineSize 15 to simplify the comparison logic. Also tried to make it clearer what's going on 16 by tweaking the existing code. 17 18 * rendering/RenderTableSection.cpp: 19 (WebCore::RenderTableSection::paintObject): 20 Remove the doubling. 21 1 22 2012-02-29 Ken Buchanan <kenrb@chromium.org> 2 23 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r109104 r109246 197 197 } 198 198 199 LayoutUnit os = 2 * maximalOutlineSize(paintInfo.phase); 200 if (adjustedPaintOffset.x() + minXVisualOverflow() >= paintInfo.rect.maxX() + os || adjustedPaintOffset.x() + maxXVisualOverflow() <= paintInfo.rect.x() - os) 201 return false; 202 if (top >= paintInfo.rect.maxY() + os || bottom <= paintInfo.rect.y() - os) 199 LayoutRect localRepaintRect = paintInfo.rect; 200 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); 201 if (adjustedPaintOffset.x() + minXVisualOverflow() >= localRepaintRect.maxX() || adjustedPaintOffset.x() + maxXVisualOverflow() <= localRepaintRect.x()) 202 return false; 203 204 if (top >= localRepaintRect.maxY() || bottom <= localRepaintRect.y()) 203 205 return false; 204 206 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r108914 r109246 961 961 return; 962 962 963 LayoutPoint adjustedPaintOffset = paintOffset + location(); 964 LayoutUnit os = 2 * maximalOutlineSize(paintInfo.phase); 965 if (!(adjustedPaintOffset.y() - table()->outerBorderTop() < paintInfo.rect.maxY() + os 966 && adjustedPaintOffset.y() + height() + table()->outerBorderBottom() > paintInfo.rect.y() - os)) 963 LayoutRect localRepaintRect = paintInfo.rect; 964 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); 965 966 LayoutRect paintRect = LayoutRect(paintOffset + location(), size()); 967 if (paintRect.y() - table()->outerBorderTop() >= localRepaintRect.maxY()) 968 return; 969 970 if (paintRect.maxY() + table()->outerBorderBottom() <= localRepaintRect.y()) 967 971 return; 968 972 … … 970 974 if (!table()->currentBorderValue() || graphicsContext->paintingDisabled()) 971 975 return; 972 973 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size());974 976 975 977 RenderStyle* tableStyle = table()->style(); -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r109042 r109246 1061 1061 } 1062 1062 1063 // FIXME: Why do we double the outline size? 1064 LayoutUnit outlineSize = 2 * maximalOutlineSize(paintPhase); 1065 localRepaintRect.inflate(outlineSize); 1063 localRepaintRect.inflate(maximalOutlineSize(paintPhase)); 1066 1064 1067 1065 CellSpan dirtiedRows = this->dirtiedRows(localRepaintRect);
Note: See TracChangeset
for help on using the changeset viewer.