Changeset 88196 in webkit
- Timestamp:
- Jun 6, 2011, 3:27:19 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88195 r88196 1 2011-06-06 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Switch InlineFlowBox::paintMask to use IntPoint 6 https://bugs.webkit.org/show_bug.cgi?id=62156 7 8 Switching InlineFlowBox::paintMask to take an IntPoint representing the paint 9 offset instead of a pair of ints. 10 11 No new tests as this is simple refactoring. 12 13 * rendering/InlineFlowBox.cpp: 14 (WebCore::InlineFlowBox::paint): 15 (WebCore::InlineFlowBox::paintMask): 16 * rendering/InlineFlowBox.h: 17 1 18 2011-06-06 Emil A Eklund <eae@chromium.org> 2 19 -
trunk/Source/WebCore/rendering/InlineFlowBox.cpp
r88033 r88196 992 992 } 993 993 } else if (paintInfo.phase == PaintPhaseMask) { 994 paintMask(paintInfo, paintOffset .x(), paintOffset.y());994 paintMask(paintInfo, paintOffset); 995 995 return; 996 996 } else { … … 1164 1164 } 1165 1165 1166 void InlineFlowBox::paintMask(PaintInfo& paintInfo, int tx, int ty)1166 void InlineFlowBox::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset) 1167 1167 { 1168 1168 if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer()->style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) … … 1177 1177 IntRect localRect(frameRect); 1178 1178 flipForWritingMode(localRect); 1179 tx += localRect.x(); 1180 ty += localRect.y(); 1179 IntPoint adjustedPaintOffset = paintOffset + localRect.location(); 1181 1180 1182 1181 const NinePieceImage& maskNinePieceImage = renderer()->style()->maskBoxImage(); … … 1199 1198 } 1200 1199 1201 IntRect paintRect = IntRect( IntPoint(tx, ty), frameRect.size());1200 IntRect paintRect = IntRect(adjustedPaintOffset, frameRect.size()); 1202 1201 paintFillLayers(paintInfo, Color(), renderer()->style()->maskLayers(), paintRect, compositeOp); 1203 1202 … … 1209 1208 // cases only a single call to draw is required. 1210 1209 if (!prevLineBox() && !nextLineBox()) { 1211 boxModelObject()->paintNinePieceImage(paintInfo.context, IntRect( IntPoint(tx, ty), frameRect.size()), renderer()->style(), maskNinePieceImage, compositeOp);1210 boxModelObject()->paintNinePieceImage(paintInfo.context, IntRect(adjustedPaintOffset, frameRect.size()), renderer()->style(), maskNinePieceImage, compositeOp); 1212 1211 } else { 1213 1212 // We have a mask image that spans multiple lines. … … 1219 1218 for (InlineFlowBox* curr = this; curr; curr = curr->nextLineBox()) 1220 1219 totalLogicalWidth += curr->logicalWidth(); 1221 int stripX = tx- (isHorizontal() ? logicalOffsetOnLine : 0);1222 int stripY = ty- (isHorizontal() ? 0 : logicalOffsetOnLine);1220 int stripX = adjustedPaintOffset.x() - (isHorizontal() ? logicalOffsetOnLine : 0); 1221 int stripY = adjustedPaintOffset.y() - (isHorizontal() ? 0 : logicalOffsetOnLine); 1223 1222 int stripWidth = isHorizontal() ? totalLogicalWidth : frameRect.width(); 1224 1223 int stripHeight = isHorizontal() ? frameRect.height() : totalLogicalWidth; -
trunk/Source/WebCore/rendering/InlineFlowBox.h
r88033 r88196 105 105 106 106 virtual void paintBoxDecorations(PaintInfo&, const IntPoint&); 107 virtual void paintMask(PaintInfo&, int tx, int ty);107 virtual void paintMask(PaintInfo&, const IntPoint&); 108 108 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const IntRect&, CompositeOperator = CompositeSourceOver); 109 109 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, const IntRect&, CompositeOperator = CompositeSourceOver);
Note:
See TracChangeset
for help on using the changeset viewer.