Changeset 88087 in webkit
- Timestamp:
- Jun 3, 2011 7:25:54 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88081 r88087 1 2011-06-03 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Switch paintMask and paintObject to use IntPoint 6 https://bugs.webkit.org/show_bug.cgi?id=62077 7 8 Switching paintMask and paintObject to use IntPoint for their paint offset instead of 9 a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize 10 passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&. 11 12 No new tests since this is simple refactoring. 13 14 * rendering/RenderBlock.cpp: 15 (WebCore::RenderBlock::paint): 16 (WebCore::RenderBlock::paintObject): 17 * rendering/RenderBlock.h: 18 * rendering/RenderBox.cpp: 19 (WebCore::RenderBox::paintMask): 20 (WebCore::RenderBox::pushContentsClip): 21 (WebCore::RenderBox::popContentsClip): 22 * rendering/RenderBox.h: 23 (WebCore::RenderBox::paintObject): 24 * rendering/RenderFieldset.cpp: 25 (WebCore::RenderFieldset::paintMask): 26 * rendering/RenderFieldset.h: 27 * rendering/RenderFileUploadControl.cpp: 28 (WebCore::RenderFileUploadControl::paintObject): 29 * rendering/RenderFileUploadControl.h: 30 * rendering/RenderListBox.cpp: 31 (WebCore::RenderListBox::paintObject): 32 * rendering/RenderListBox.h: 33 * rendering/RenderReplaced.cpp: 34 (WebCore::RenderReplaced::paint): 35 * rendering/RenderReplica.cpp: 36 (WebCore::RenderReplica::paint): 37 * rendering/RenderTable.cpp: 38 (WebCore::RenderTable::paint): 39 (WebCore::RenderTable::paintObject): 40 (WebCore::RenderTable::paintMask): 41 * rendering/RenderTable.h: 42 * rendering/RenderTableSection.cpp: 43 (WebCore::RenderTableSection::paint): 44 (WebCore::RenderTableSection::paintObject): 45 * rendering/RenderTableSection.h: 46 * rendering/RenderTextControl.cpp: 47 (WebCore::RenderTextControl::paintPlaceholder): 48 (WebCore::RenderTextControl::paintObject): 49 * rendering/RenderTextControl.h: 50 * rendering/RenderView.cpp: 51 (WebCore::RenderView::paint): 52 * rendering/RenderWidget.cpp: 53 (WebCore::RenderWidget::paint): 54 1 55 2011-06-03 Cary Clark <caryclark@google.com> 2 56 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r88050 r88087 2261 2261 2262 2262 bool pushedClip = pushContentsClip(paintInfo, tx, ty); 2263 paintObject(paintInfo, tx, ty);2263 paintObject(paintInfo, IntPoint(tx, ty)); 2264 2264 if (pushedClip) 2265 2265 popContentsClip(paintInfo, phase, tx, ty); … … 2459 2459 } 2460 2460 2461 void RenderBlock::paintObject(PaintInfo& paintInfo, int tx, int ty)2461 void RenderBlock::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset) 2462 2462 { 2463 2463 PaintPhase paintPhase = paintInfo.phase; … … 2466 2466 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style()->visibility() == VISIBLE) { 2467 2467 if (hasBoxDecorations()) 2468 paintBoxDecorations(paintInfo, IntPoint(tx, ty));2468 paintBoxDecorations(paintInfo, paintOffset); 2469 2469 if (hasColumns()) 2470 paintColumnRules(paintInfo, tx, ty);2470 paintColumnRules(paintInfo, paintOffset.x(), paintOffset.y()); 2471 2471 } 2472 2472 2473 2473 if (paintPhase == PaintPhaseMask && style()->visibility() == VISIBLE) { 2474 paintMask(paintInfo, IntSize(tx, ty));2474 paintMask(paintInfo, paintOffset); 2475 2475 return; 2476 2476 } … … 2481 2481 2482 2482 // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div). 2483 int scrolledX = tx; 2484 int scrolledY = ty; 2485 if (hasOverflowClip()) { 2486 IntSize offset = layer()->scrolledContentOffset(); 2487 scrolledX -= offset.width(); 2488 scrolledY -= offset.height(); 2489 } 2483 IntPoint scrolledOffset = paintOffset; 2484 if (hasOverflowClip()) 2485 scrolledOffset.move(-layer()->scrolledContentOffset()); 2490 2486 2491 2487 // 2. paint contents 2492 2488 if (paintPhase != PaintPhaseSelfOutline) { 2493 2489 if (hasColumns()) 2494 paintColumnContents(paintInfo, scrolled X, scrolledY);2490 paintColumnContents(paintInfo, scrolledOffset.x(), scrolledOffset.y()); 2495 2491 else 2496 paintContents(paintInfo, scrolled X, scrolledY);2492 paintContents(paintInfo, scrolledOffset.x(), scrolledOffset.y()); 2497 2493 } 2498 2494 … … 2501 2497 bool isPrinting = document()->printing(); 2502 2498 if (!isPrinting && !hasColumns()) 2503 paintSelection(paintInfo, scrolled X, scrolledY); // Fill in gaps in selection on lines and between blocks.2499 paintSelection(paintInfo, scrolledOffset.x(), scrolledOffset.y()); // Fill in gaps in selection on lines and between blocks. 2504 2500 2505 2501 // 4. paint floats. 2506 2502 if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip) { 2507 2503 if (hasColumns()) 2508 paintColumnContents(paintInfo, scrolled X, scrolledY, true);2504 paintColumnContents(paintInfo, scrolledOffset.x(), scrolledOffset.y(), true); 2509 2505 else 2510 paintFloats(paintInfo, scrolled X, scrolledY, paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip);2506 paintFloats(paintInfo, scrolledOffset.x(), scrolledOffset.y(), paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip); 2511 2507 } 2512 2508 2513 2509 // 5. paint outline. 2514 2510 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE) 2515 paintOutline(paintInfo.context, IntRect( tx, ty, width(), height()));2511 paintOutline(paintInfo.context, IntRect(paintOffset, size())); 2516 2512 2517 2513 // 6. paint continuation outlines. … … 2533 2529 cb->addContinuationWithOutline(inlineRenderer); 2534 2530 else if (!inlineRenderer->firstLineBox()) 2535 inlineRenderer->paintOutline(paintInfo.context, tx- x() + inlineRenderer->containingBlock()->x(),2536 ty- y() + inlineRenderer->containingBlock()->y());2537 } 2538 paintContinuationOutlines(paintInfo, tx, ty);2531 inlineRenderer->paintOutline(paintInfo.context, paintOffset.x() - x() + inlineRenderer->containingBlock()->x(), 2532 paintOffset.y() - y() + inlineRenderer->containingBlock()->y()); 2533 } 2534 paintContinuationOutlines(paintInfo, paintOffset.x(), paintOffset.y()); 2539 2535 } 2540 2536 … … 2543 2539 // then paint the caret. 2544 2540 if (paintPhase == PaintPhaseForeground) { 2545 paintCaret(paintInfo, IntPoint(scrolledX, scrolledY), CursorCaret);2546 paintCaret(paintInfo, IntPoint(scrolledX, scrolledY), DragCaret);2541 paintCaret(paintInfo, scrolledOffset, CursorCaret); 2542 paintCaret(paintInfo, scrolledOffset, DragCaret); 2547 2543 } 2548 2544 } -
trunk/Source/WebCore/rendering/RenderBlock.h
r88050 r88087 294 294 295 295 virtual void paint(PaintInfo&, int tx, int ty); 296 virtual void paintObject(PaintInfo&, int tx, int ty);296 virtual void paintObject(PaintInfo&, const IntPoint&); 297 297 298 298 int logicalRightOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const; -
trunk/Source/WebCore/rendering/RenderBox.cpp
r88033 r88087 877 877 } 878 878 879 void RenderBox::paintMask(PaintInfo& paintInfo, IntSizepaintOffset)879 void RenderBox::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset) 880 880 { 881 881 if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context->paintingDisabled()) 882 882 return; 883 883 884 IntRect paintRect = IntRect( toPoint(paintOffset), size());884 IntRect paintRect = IntRect(paintOffset, size()); 885 885 886 886 // border-fit can adjust where we paint our border and background. If set, we snugly fit our line box descendants. (The iChat … … 1112 1112 else if (paintInfo.phase == PaintPhaseChildBlockBackground) { 1113 1113 paintInfo.phase = PaintPhaseBlockBackground; 1114 paintObject(paintInfo, tx, ty);1114 paintObject(paintInfo, IntPoint(tx, ty)); 1115 1115 paintInfo.phase = PaintPhaseChildBlockBackgrounds; 1116 1116 } … … 1130 1130 if (originalPhase == PaintPhaseOutline) { 1131 1131 paintInfo.phase = PaintPhaseSelfOutline; 1132 paintObject(paintInfo, tx, ty);1132 paintObject(paintInfo, IntPoint(tx, ty)); 1133 1133 paintInfo.phase = originalPhase; 1134 1134 } else if (originalPhase == PaintPhaseChildBlockBackground) -
trunk/Source/WebCore/rendering/RenderBox.h
r88033 r88087 353 353 void popContentsClip(PaintInfo&, PaintPhase originalPhase, int tx, int ty); 354 354 355 virtual void paintObject(PaintInfo&, int /*tx*/, int /*ty*/) { ASSERT_NOT_REACHED(); }355 virtual void paintObject(PaintInfo&, const IntPoint&) { ASSERT_NOT_REACHED(); } 356 356 virtual void paintBoxDecorations(PaintInfo&, const IntPoint&); 357 virtual void paintMask(PaintInfo&, IntSize);357 virtual void paintMask(PaintInfo&, const IntPoint&); 358 358 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); 359 359 -
trunk/Source/WebCore/rendering/RenderFieldset.cpp
r88033 r88087 169 169 } 170 170 171 void RenderFieldset::paintMask(PaintInfo& paintInfo, IntSizepaintOffset)171 void RenderFieldset::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset) 172 172 { 173 173 if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) 174 174 return; 175 175 176 IntRect paintRect = IntRect( toPoint(paintOffset), size());176 IntRect paintRect = IntRect(paintOffset, size()); 177 177 RenderBox* legend = findLegend(); 178 178 if (!legend) -
trunk/Source/WebCore/rendering/RenderFieldset.h
r88033 r88087 46 46 47 47 virtual void paintBoxDecorations(PaintInfo&, const IntPoint&); 48 virtual void paintMask(PaintInfo&, IntSize);48 virtual void paintMask(PaintInfo&, const IntPoint&); 49 49 }; 50 50 -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r87780 r88087 228 228 } 229 229 230 void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)230 void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset) 231 231 { 232 232 if (style()->visibility() != VISIBLE) … … 237 237 GraphicsContextStateSaver stateSaver(*paintInfo.context, false); 238 238 if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) { 239 IntRect clipRect( tx + borderLeft(), ty+ borderTop(),239 IntRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(), 240 240 width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop() + buttonShadowHeight); 241 241 if (clipRect.isEmpty()) … … 251 251 252 252 // Determine where the filename should be placed 253 int contentLeft = tx+ borderLeft() + paddingLeft();253 int contentLeft = paintOffset.x() + borderLeft() + paddingLeft(); 254 254 int buttonAndIconWidth = m_button->renderBox()->width() + afterButtonSpacing 255 255 + (m_fileChooser->icon() ? iconWidth + iconFilenameSpacing : 0); … … 272 272 if (m_fileChooser->icon()) { 273 273 // Determine where the icon should be placed 274 int iconY = ty+ borderTop() + paddingTop() + (contentHeight() - iconHeight) / 2;274 int iconY = paintOffset.y() + borderTop() + paddingTop() + (contentHeight() - iconHeight) / 2; 275 275 int iconX; 276 276 if (style()->isLeftToRightDirection()) … … 285 285 286 286 // Paint the children. 287 RenderBlock::paintObject(paintInfo, tx, ty);287 RenderBlock::paintObject(paintInfo, paintOffset); 288 288 } 289 289 -
trunk/Source/WebCore/rendering/RenderFileUploadControl.h
r84238 r88087 53 53 virtual void updateFromElement(); 54 54 virtual void computePreferredLogicalWidths(); 55 virtual void paintObject(PaintInfo&, int tx, int ty);55 virtual void paintObject(PaintInfo&, const IntPoint&); 56 56 57 57 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r88049 r88087 257 257 } 258 258 259 void RenderListBox::paintObject(PaintInfo& paintInfo, int tx, int ty)259 void RenderListBox::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset) 260 260 { 261 261 if (style()->visibility() != VISIBLE) … … 267 267 int index = m_indexOffset; 268 268 while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) { 269 paintItemForeground(paintInfo, IntPoint(tx, ty), index);269 paintItemForeground(paintInfo, paintOffset, index); 270 270 index++; 271 271 } … … 273 273 274 274 // Paint the children. 275 RenderBlock::paintObject(paintInfo, tx, ty);275 RenderBlock::paintObject(paintInfo, paintOffset); 276 276 277 277 switch (paintInfo.phase) { … … 280 280 case PaintPhaseForeground: 281 281 if (m_vBar->isOverlayScrollbar()) 282 paintScrollbar(paintInfo, tx, ty);282 paintScrollbar(paintInfo, paintOffset.x(), paintOffset.y()); 283 283 break; 284 284 case PaintPhaseBlockBackground: 285 285 if (!m_vBar->isOverlayScrollbar()) 286 paintScrollbar(paintInfo, tx, ty);286 paintScrollbar(paintInfo, paintOffset.x(), paintOffset.y()); 287 287 break; 288 288 case PaintPhaseChildBlockBackground: … … 290 290 int index = m_indexOffset; 291 291 while (index < listItemsSize && index <= m_indexOffset + numVisibleItems()) { 292 paintItemBackground(paintInfo, IntPoint(tx, ty), index);292 paintItemBackground(paintInfo, paintOffset, index); 293 293 index++; 294 294 } -
trunk/Source/WebCore/rendering/RenderListBox.h
r88049 r88087 66 66 67 67 virtual bool hasControlClip() const { return true; } 68 virtual void paintObject(PaintInfo&, int tx, int ty);68 virtual void paintObject(PaintInfo&, const IntPoint&); 69 69 virtual IntRect controlClipRect(const IntPoint&) const; 70 70 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r88033 r88087 107 107 108 108 if (paintInfo.phase == PaintPhaseMask) { 109 paintMask(paintInfo, Int Size(tx, ty));109 paintMask(paintInfo, IntPoint(tx, ty)); 110 110 return; 111 111 } -
trunk/Source/WebCore/rendering/RenderReplica.cpp
r86377 r88087 77 77 RenderLayer::PaintLayerHaveTransparency | RenderLayer::PaintLayerAppliedTransform | RenderLayer::PaintLayerTemporaryClipRects | RenderLayer::PaintLayerPaintingReflection); 78 78 else if (paintInfo.phase == PaintPhaseMask) 79 paintMask(paintInfo, Int Size(tx, ty));79 paintMask(paintInfo, IntPoint(tx, ty)); 80 80 } 81 81 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r88033 r88087 469 469 470 470 bool pushedClip = pushContentsClip(paintInfo, tx, ty); 471 paintObject(paintInfo, tx, ty);471 paintObject(paintInfo, IntPoint(tx, ty)); 472 472 if (pushedClip) 473 473 popContentsClip(paintInfo, paintPhase, tx, ty); 474 474 } 475 475 476 void RenderTable::paintObject(PaintInfo& paintInfo, int tx, int ty)476 void RenderTable::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset) 477 477 { 478 478 PaintPhase paintPhase = paintInfo.phase; 479 479 if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && hasBoxDecorations() && style()->visibility() == VISIBLE) 480 paintBoxDecorations(paintInfo, IntPoint(tx, ty));480 paintBoxDecorations(paintInfo, paintOffset); 481 481 482 482 if (paintPhase == PaintPhaseMask) { 483 paintMask(paintInfo, IntSize(tx, ty));483 paintMask(paintInfo, paintOffset); 484 484 return; 485 485 } … … 499 499 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 500 500 if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption)) { 501 IntPoint childPoint = flipForWritingMode(toRenderBox(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);501 IntPoint childPoint = flipForWritingMode(toRenderBox(child), paintOffset, ParentToChildFlippingAdjustment); 502 502 child->paint(info, childPoint.x(), childPoint.y()); 503 503 } … … 521 521 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) 522 522 if (child->isTableSection()) { 523 IntPoint childPoint = flipForWritingMode(toRenderTableSection(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);523 IntPoint childPoint = flipForWritingMode(toRenderTableSection(child), paintOffset, ParentToChildFlippingAdjustment); 524 524 child->paint(info, childPoint.x(), childPoint.y()); 525 525 } … … 530 530 // Paint outline. 531 531 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style()->visibility() == VISIBLE) 532 paintOutline(paintInfo.context, IntRect( IntPoint(tx, ty), size()));532 paintOutline(paintInfo.context, IntRect(paintOffset, size())); 533 533 } 534 534 … … 574 574 } 575 575 576 void RenderTable::paintMask(PaintInfo& paintInfo, IntSizepaintOffset)576 void RenderTable::paintMask(PaintInfo& paintInfo, const IntPoint& paintOffset) 577 577 { 578 578 if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) 579 579 return; 580 580 581 IntRect rect( toPoint(paintOffset), size());581 IntRect rect(paintOffset, size()); 582 582 subtractCaptionRect(rect); 583 583 -
trunk/Source/WebCore/rendering/RenderTable.h
r88033 r88087 216 216 217 217 virtual void paint(PaintInfo&, int tx, int ty); 218 virtual void paintObject(PaintInfo&, int tx, int ty);218 virtual void paintObject(PaintInfo&, const IntPoint&); 219 219 virtual void paintBoxDecorations(PaintInfo&, const IntPoint&); 220 virtual void paintMask(PaintInfo&, IntSize);220 virtual void paintMask(PaintInfo&, const IntPoint&); 221 221 virtual void layout(); 222 222 virtual void computePreferredLogicalWidths(); -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r88063 r88087 905 905 PaintPhase phase = paintInfo.phase; 906 906 bool pushedClip = pushContentsClip(paintInfo, tx, ty); 907 paintObject(paintInfo, tx, ty);907 paintObject(paintInfo, IntPoint(tx, ty)); 908 908 if (pushedClip) 909 909 popContentsClip(paintInfo, phase, tx, ty); … … 949 949 } 950 950 951 void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)951 void RenderTableSection::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset) 952 952 { 953 953 // Check which rows and cols are visible and only paint these. … … 963 963 964 964 IntRect localRepaintRect = paintInfo.rect; 965 localRepaintRect.move (-tx, -ty);965 localRepaintRect.moveBy(-paintOffset); 966 966 if (style()->isFlippedBlocksWritingMode()) { 967 967 if (style()->isHorizontalWritingMode()) … … 1019 1019 if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell)) 1020 1020 continue; 1021 paintCell(cell, paintInfo, IntPoint(tx, ty));1021 paintCell(cell, paintInfo, paintOffset); 1022 1022 } 1023 1023 } … … 1046 1046 // Paint the cells. 1047 1047 for (int i = 0; i < size; ++i) 1048 paintCell(cells[i], paintInfo, IntPoint(tx, ty));1048 paintCell(cells[i], paintInfo, paintOffset); 1049 1049 } 1050 1050 } -
trunk/Source/WebCore/rendering/RenderTableSection.h
r88063 r88087 135 135 virtual void paint(PaintInfo&, int tx, int ty); 136 136 virtual void paintCell(RenderTableCell*, PaintInfo&, const IntPoint&); 137 virtual void paintObject(PaintInfo&, int tx, int ty);137 virtual void paintObject(PaintInfo&, const IntPoint&); 138 138 139 139 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r87302 r88087 600 600 } 601 601 602 void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, int tx, int ty)602 void RenderTextControl::paintPlaceholder(PaintInfo& paintInfo, const IntPoint& paintOffset) 603 603 { 604 604 if (style()->visibility() != VISIBLE) 605 605 return; 606 606 607 IntRect clipRect( tx + borderLeft(), ty+ borderTop(), width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop());607 IntRect clipRect(paintOffset.x() + borderLeft(), paintOffset.y() + borderTop(), width() - borderLeft() - borderRight(), height() - borderBottom() - borderTop()); 608 608 if (clipRect.isEmpty()) 609 609 return; … … 624 624 if (textRenderer) { 625 625 IntPoint textPoint; 626 textPoint.setY( ty+ textBlockInsetTop() + placeholderStyle->fontMetrics().ascent());626 textPoint.setY(paintOffset.y() + textBlockInsetTop() + placeholderStyle->fontMetrics().ascent()); 627 627 int styleTextIndent = placeholderStyle->textIndent().isFixed() ? placeholderStyle->textIndent().calcMinValue(0) : 0; 628 628 if (placeholderStyle->isLeftToRightDirection()) 629 textPoint.setX( tx+ styleTextIndent + textBlockInsetLeft());629 textPoint.setX(paintOffset.x() + styleTextIndent + textBlockInsetLeft()); 630 630 else 631 textPoint.setX( tx+ width() - textBlockInsetRight() - styleTextIndent - style()->font().width(textRun));631 textPoint.setX(paintOffset.x() + width() - textBlockInsetRight() - styleTextIndent - style()->font().width(textRun)); 632 632 633 633 paintInfo.context->drawBidiText(placeholderStyle->font(), textRun, textPoint); … … 635 635 } 636 636 637 void RenderTextControl::paintObject(PaintInfo& paintInfo, int tx, int ty)637 void RenderTextControl::paintObject(PaintInfo& paintInfo, const IntPoint& paintOffset) 638 638 { 639 639 if (m_placeholderVisible && paintInfo.phase == PaintPhaseForeground) 640 paintPlaceholder(paintInfo, tx, ty);641 642 RenderBlock::paintObject(paintInfo, tx, ty);640 paintPlaceholder(paintInfo, paintOffset); 641 642 RenderBlock::paintObject(paintInfo, paintOffset); 643 643 } 644 644 -
trunk/Source/WebCore/rendering/RenderTextControl.h
r87302 r88087 91 91 virtual bool canHaveChildren() const { return false; } 92 92 virtual bool avoidsFloats() const { return true; } 93 virtual void paintObject(PaintInfo&, int tx, int ty);93 virtual void paintObject(PaintInfo&, const IntPoint&); 94 94 95 95 virtual void addFocusRingRects(Vector<IntRect>&, const IntPoint&); … … 109 109 virtual int textBlockInsetTop() const = 0; 110 110 111 void paintPlaceholder(PaintInfo&, int tx, int ty);111 void paintPlaceholder(PaintInfo&, const IntPoint&); 112 112 113 113 bool m_lastChangeWasUserEdit; -
trunk/Source/WebCore/rendering/RenderView.cpp
r88033 r88087 169 169 // If we ever require layout but receive a paint anyway, something has gone horribly wrong. 170 170 ASSERT(!needsLayout()); 171 paintObject(paintInfo, tx, ty);171 paintObject(paintInfo, IntPoint(tx, ty)); 172 172 } 173 173 -
trunk/Source/WebCore/rendering/RenderWidget.cpp
r88033 r88087 260 260 261 261 if (paintInfo.phase == PaintPhaseMask) { 262 paintMask(paintInfo, Int Size(tx, ty));262 paintMask(paintInfo, IntPoint(tx, ty)); 263 263 return; 264 264 }
Note: See TracChangeset
for help on using the changeset viewer.