Changeset 110224 in webkit
- Timestamp:
- Mar 8, 2012 3:41:47 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r110222 r110224 1 2012-03-08 Levi Weintraub <leviw@chromium.org> 2 3 Switch absoluteRects, culledInlineAbsoluteRects, absoluteBoundingBoxRect, and addFocusRingRects back to integers 4 https://bugs.webkit.org/show_bug.cgi?id=80545 5 6 Reviewed by Simon Fraser. 7 8 Converting the above functions, all of which return rects that represent on-screen rects, to IntRects from 9 LayoutRects. 10 11 addFocusRingsRects generates a vector of rects that is handed off directly to the GraphicsContext to be 12 drawn. Snapping the rects before adding them to the vector saves an extra pass through the vector. 13 14 absoluteRects and culledInlineAbsoluteRects are only used by addFocusRingRects, hasNonEmptyBoundingBox (only 15 to check if they're empty), and absoluteBoundingBoxRect, which is exposed from WebCore and thus should be an 16 IntRect anyways. 17 18 No new tests. No change in behavior. 19 20 * dom/Node.cpp: 21 (WebCore::Node::hasNonEmptyBoundingBox): 22 * dom/Range.cpp: 23 (WebCore::Range::boundingBox): 24 * rendering/RenderBlock.cpp: 25 (WebCore::RenderBlock::absoluteRects): 26 (WebCore::RenderBlock::addFocusRingRects): 27 * rendering/RenderBlock.h: 28 (RenderBlock): 29 * rendering/RenderInline.cpp: 30 (WebCore::RenderInline::absoluteRects): 31 (WebCore::RenderInline::culledInlineAbsoluteRects): 32 (WebCore::RenderInline::addFocusRingRects): 33 * rendering/RenderInline.h: 34 (RenderInline): 35 * rendering/RenderListBox.cpp: 36 (WebCore::RenderListBox::addFocusRingRects): 37 * rendering/RenderListBox.h: 38 (RenderListBox): 39 * rendering/RenderObject.cpp: 40 (WebCore::RenderObject::paintFocusRing): 41 (WebCore::RenderObject::absoluteBoundingBoxRect): 42 (WebCore::RenderObject::absoluteFocusRingQuads): 43 * rendering/RenderObject.h: 44 (WebCore::RenderObject::absoluteRects): 45 (RenderObject): 46 (WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms): 47 (WebCore::RenderObject::addFocusRingRects): 48 * rendering/RenderText.cpp: 49 (WebCore::RenderText::absoluteRects): 50 (WebCore::RenderText::absoluteRectsForRange): 51 * rendering/RenderText.h: 52 (RenderText): 53 * rendering/RenderTextControl.cpp: 54 (WebCore::RenderTextControl::addFocusRingRects): 55 * rendering/RenderTextControl.h: 56 (RenderTextControl): 57 * rendering/RenderView.cpp: 58 (WebCore::RenderView::absoluteRects): 59 * rendering/RenderView.h: 60 (RenderView): 61 * rendering/svg/RenderSVGBlock.cpp: 62 (WebCore::RenderSVGBlock::absoluteRects): 63 * rendering/svg/RenderSVGBlock.h: 64 (RenderSVGBlock): 65 * rendering/svg/RenderSVGContainer.cpp: 66 (WebCore::RenderSVGContainer::addFocusRingRects): 67 * rendering/svg/RenderSVGContainer.h: 68 (RenderSVGContainer): 69 * rendering/svg/RenderSVGImage.cpp: 70 (WebCore::RenderSVGImage::addFocusRingRects): 71 * rendering/svg/RenderSVGImage.h: 72 (RenderSVGImage): 73 * rendering/svg/RenderSVGModelObject.cpp: 74 (WebCore::RenderSVGModelObject::absoluteRects): 75 * rendering/svg/RenderSVGModelObject.h: 76 (RenderSVGModelObject): 77 * rendering/svg/RenderSVGShape.cpp: 78 (WebCore::RenderSVGShape::addFocusRingRects): 79 * rendering/svg/RenderSVGShape.h: 80 (RenderSVGShape): 81 1 82 2012-03-08 Erik Arvidsson <arv@chromium.org> 2 83 -
trunk/Source/WebCore/dom/Node.cpp
r110207 r110224 806 806 return true; 807 807 808 Vector< LayoutRect> rects;808 Vector<IntRect> rects; 809 809 FloatPoint absPos = renderer()->localToAbsolute(); 810 810 renderer()->absoluteRects(rects, flooredLayoutPoint(absPos)); -
trunk/Source/WebCore/dom/Range.cpp
r109097 r110224 1671 1671 for (size_t i = 0; i < n; ++i) 1672 1672 result.unite(rects[i]); 1673 return pixelSnappedIntRect(result);1673 return result; 1674 1674 } 1675 1675 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r110072 r110224 6370 6370 } 6371 6371 6372 void RenderBlock::absoluteRects(Vector< LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const6372 void RenderBlock::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const 6373 6373 { 6374 6374 // For blocks inside inlines, we go ahead and include margins so that we run right up to the … … 6378 6378 // FIXME: This is wrong for block-flows that are horizontal. 6379 6379 // https://bugs.webkit.org/show_bug.cgi?id=46781 6380 rects.append( LayoutRect(accumulatedOffset.x(), accumulatedOffset.y() - collapsedMarginBefore(),6380 rects.append(pixelSnappedIntRect(accumulatedOffset.x(), accumulatedOffset.y() - collapsedMarginBefore(), 6381 6381 width(), height() + collapsedMarginBefore() + collapsedMarginAfter())); 6382 6382 continuation()->absoluteRects(rects, accumulatedOffset - toLayoutSize(location() + 6383 6383 inlineElementContinuation()->containingBlock()->location())); 6384 6384 } else 6385 rects.append( LayoutRect(accumulatedOffset, size()));6385 rects.append(pixelSnappedIntRect(accumulatedOffset, size())); 6386 6386 } 6387 6387 … … 6541 6541 } 6542 6542 6543 void RenderBlock::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint& additionalOffset)6543 void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset) 6544 6544 { 6545 6545 // For blocks inside inlines, we go ahead and include margins so that we run right up to the … … 6557 6557 LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin); 6558 6558 if (!rect.isEmpty()) 6559 rects.append( rect);6559 rects.append(pixelSnappedIntRect(rect)); 6560 6560 } else if (width() && height()) 6561 rects.append( LayoutRect(additionalOffset, size()));6561 rects.append(pixelSnappedIntRect(additionalOffset, size())); 6562 6562 6563 6563 if (!hasOverflowClip() && !hasControlClip()) { 6564 6564 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) { 6565 LayoutUnit top = max (curr->lineTop(), static_cast<LayoutUnit>(curr->top()));6566 LayoutUnit bottom = min (curr->lineBottom(), static_cast<LayoutUnit>(curr->top() + curr->height()));6565 LayoutUnit top = max<LayoutUnit>(curr->lineTop(), curr->top()); 6566 LayoutUnit bottom = min<LayoutUnit>(curr->lineBottom(), curr->top() + curr->height()); 6567 6567 LayoutRect rect(additionalOffset.x() + curr->x(), additionalOffset.y() + top, curr->width(), bottom - top); 6568 6568 if (!rect.isEmpty()) 6569 rects.append( rect);6569 rects.append(pixelSnappedIntRect(rect)); 6570 6570 } 6571 6571 -
trunk/Source/WebCore/rendering/RenderBlock.h
r110135 r110224 473 473 void addVisualOverflowFromTheme(); 474 474 475 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);475 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 476 476 477 477 #if ENABLE(SVG) … … 816 816 LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit position); 817 817 818 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint& accumulatedOffset) const;818 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const; 819 819 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; 820 820 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r110196 r110224 508 508 } 509 509 510 void RenderInline::absoluteRects(Vector< LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const510 void RenderInline::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const 511 511 { 512 512 if (!alwaysCreateLineBoxes()) … … 514 514 else if (InlineFlowBox* curr = firstLineBox()) { 515 515 for (; curr; curr = curr->nextLineBox()) 516 rects.append(enclosing LayoutRect(FloatRect(accumulatedOffset + curr->topLeft(), curr->size())));516 rects.append(enclosingIntRect(FloatRect(accumulatedOffset + curr->topLeft(), curr->size()))); 517 517 } else 518 rects.append( LayoutRect(accumulatedOffset, LayoutSize()));518 rects.append(IntRect(roundedIntPoint(accumulatedOffset), IntSize())); 519 519 520 520 if (continuation()) { … … 527 527 } 528 528 529 void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector< LayoutRect>& rects, const LayoutSize& offset) const529 void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<IntRect>& rects, const LayoutSize& offset) const 530 530 { 531 531 if (!culledInlineFirstLineBox()) { … … 1369 1369 } 1370 1370 1371 void RenderInline::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint& additionalOffset)1371 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset) 1372 1372 { 1373 1373 if (!alwaysCreateLineBoxes()) … … 1375 1375 else { 1376 1376 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) 1377 rects.append(enclosing LayoutRect(FloatRect(additionalOffset.x() + curr->x(), additionalOffset.y() + curr->y(), curr->width(), curr->height())));1377 rects.append(enclosingIntRect(FloatRect(additionalOffset.x() + curr->x(), additionalOffset.y() + curr->y(), curr->width(), curr->height()))); 1378 1378 } 1379 1379 -
trunk/Source/WebCore/rendering/RenderInline.h
r105771 r110224 47 47 virtual LayoutUnit marginEnd() const; 48 48 49 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint& accumulatedOffset) const;49 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const; 50 50 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; 51 51 … … 74 74 LayoutSize relativePositionedInlineOffset(const RenderBox* child) const; 75 75 76 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);76 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 77 77 void paintOutline(GraphicsContext*, const LayoutPoint&); 78 78 … … 103 103 InlineBox* culledInlineFirstLineBox() const; 104 104 InlineBox* culledInlineLastLineBox() const; 105 void culledInlineAbsoluteRects(const RenderInline* container, Vector< LayoutRect>&, const LayoutSize&) const;105 void culledInlineAbsoluteRects(const RenderInline* container, Vector<IntRect>&, const LayoutSize&) const; 106 106 void culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>&) const; 107 107 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r110120 r110224 317 317 } 318 318 319 void RenderListBox::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint& additionalOffset)319 void RenderListBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset) 320 320 { 321 321 if (!isSpatialNavigationEnabled(frame())) … … 327 327 int selectedItem = select->activeSelectionEndListIndex(); 328 328 if (selectedItem >= 0) { 329 rects.append( itemBoundingBoxRect(additionalOffset, selectedItem));329 rects.append(pixelSnappedIntRect(itemBoundingBoxRect(additionalOffset, selectedItem))); 330 330 return; 331 331 } … … 337 337 HTMLElement* element = listItems[i]; 338 338 if (element->hasTagName(optionTag) && !toHTMLOptionElement(element)->disabled()) { 339 rects.append( itemBoundingBoxRect(additionalOffset, i));339 rects.append(pixelSnappedIntRect(itemBoundingBoxRect(additionalOffset, i))); 340 340 return; 341 341 } -
trunk/Source/WebCore/rendering/RenderListBox.h
r110120 r110224 78 78 virtual void layout(); 79 79 80 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);80 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 81 81 82 82 virtual bool canBeProgramaticallyScrolled() const { return true; } -
trunk/Source/WebCore/rendering/RenderObject.cpp
r110196 r110224 1111 1111 void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style) 1112 1112 { 1113 Vector< LayoutRect> focusRingRects;1113 Vector<IntRect> focusRingRects; 1114 1114 addFocusRingRects(focusRingRects, paintOffset); 1115 1115 if (style->outlineStyleIsAuto()) … … 1198 1198 } 1199 1199 1200 LayoutRect RenderObject::absoluteBoundingBoxRect(bool useTransforms) const1200 IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms) const 1201 1201 { 1202 1202 if (useTransforms) { … … 1208 1208 return IntRect(); 1209 1209 1210 LayoutRect result = quads[0].enclosingBoundingBox();1210 IntRect result = quads[0].enclosingBoundingBox(); 1211 1211 for (size_t i = 1; i < n; ++i) 1212 1212 result.unite(quads[i].enclosingBoundingBox()); … … 1215 1215 1216 1216 FloatPoint absPos = localToAbsolute(); 1217 Vector< LayoutRect> rects;1217 Vector<IntRect> rects; 1218 1218 absoluteRects(rects, flooredLayoutPoint(absPos)); 1219 1219 1220 1220 size_t n = rects.size(); 1221 1221 if (!n) 1222 return LayoutRect();1222 return IntRect(); 1223 1223 1224 1224 LayoutRect result = rects[0]; 1225 1225 for (size_t i = 1; i < n; ++i) 1226 1226 result.unite(rects[i]); 1227 return result;1227 return pixelSnappedIntRect(result); 1228 1228 } 1229 1229 1230 1230 void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) 1231 1231 { 1232 Vector< LayoutRect> rects;1232 Vector<IntRect> rects; 1233 1233 // FIXME: addFocusRingRects() needs to be passed this transform-unaware 1234 1234 // localToAbsolute() offset here because RenderInline::addFocusRingRects() … … 1239 1239 size_t count = rects.size(); 1240 1240 for (size_t i = 0; i < count; ++i) { 1241 LayoutRect rect = rects[i];1241 IntRect rect = rects[i]; 1242 1242 rect.move(-absolutePoint.x(), -absolutePoint.y()); 1243 1243 quads.append(localToAbsoluteQuad(FloatQuad(rect))); -
trunk/Source/WebCore/rendering/RenderObject.h
r109785 r110224 652 652 LayoutSize offsetFromAncestorContainer(RenderObject*) const; 653 653 654 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint&) const { }654 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } 655 655 656 656 // FIXME: useTransforms should go away eventually 657 LayoutRect absoluteBoundingBoxRect(bool useTransform = true) const;658 LayoutRect absoluteBoundingBoxRectIgnoringTransforms() const { return absoluteBoundingBoxRect(false); }657 IntRect absoluteBoundingBoxRect(bool useTransform = true) const; 658 IntRect absoluteBoundingBoxRectIgnoringTransforms() const { return absoluteBoundingBoxRect(false); } 659 659 660 660 // Build an array of quads in absolute coords for line boxes … … 838 838 void getTransformFromContainer(const RenderObject* container, const LayoutSize& offsetInContainer, TransformationMatrix&) const; 839 839 840 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&) { };840 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&) { }; 841 841 842 842 LayoutRect absoluteOutlineBounds() const -
trunk/Source/WebCore/rendering/RenderText.cpp
r109593 r110224 304 304 } 305 305 306 void RenderText::absoluteRects(Vector< LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const306 void RenderText::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const 307 307 { 308 308 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) 309 rects.append(enclosing LayoutRect(FloatRect(accumulatedOffset + box->topLeft(), box->size())));309 rects.append(enclosingIntRect(FloatRect(accumulatedOffset + box->topLeft(), box->size()))); 310 310 } 311 311 … … 331 331 } 332 332 333 void RenderText::absoluteRectsForRange(Vector< LayoutRect>& rects, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed)333 void RenderText::absoluteRectsForRange(Vector<IntRect>& rects, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) 334 334 { 335 335 // Work around signed/unsigned issues. This function takes unsigneds, and is often passed UINT_MAX … … 348 348 FloatRect r = box->calculateBoundaries(); 349 349 if (useSelectionHeight) { 350 // FIXME: localSelectionRect should switch to return FloatRect soon with the subpixellayout branch.351 350 IntRect selectionRect = box->localSelectionRect(start, end); 352 351 if (box->isHorizontal()) { -
trunk/Source/WebCore/rendering/RenderText.h
r109785 r110224 55 55 void dirtyLineBoxes(bool fullLayout); 56 56 57 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint& accumulatedOffset) const;58 void absoluteRectsForRange(Vector< LayoutRect>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false, bool* wasFixed = 0);57 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const; 58 void absoluteRectsForRange(Vector<IntRect>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false, bool* wasFixed = 0); 59 59 60 60 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r110135 r110224 276 276 } 277 277 278 void RenderTextControl::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint& additionalOffset)278 void RenderTextControl::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset) 279 279 { 280 280 if (!size().isEmpty()) 281 rects.append( LayoutRect(additionalOffset, size()));281 rects.append(pixelSnappedIntRect(additionalOffset, size())); 282 282 } 283 283 -
trunk/Source/WebCore/rendering/RenderTextControl.h
r110034 r110224 73 73 virtual bool avoidsFloats() const { return true; } 74 74 75 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);75 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 76 76 77 77 virtual bool canBeProgramaticallyScrolled() const { return true; } -
trunk/Source/WebCore/rendering/RenderView.cpp
r109805 r110224 367 367 } 368 368 369 void RenderView::absoluteRects(Vector< LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const370 { 371 rects.append( LayoutRect(accumulatedOffset, m_layer->size()));369 void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const 370 { 371 rects.append(pixelSnappedIntRect(accumulatedOffset, m_layer->size())); 372 372 } 373 373 -
trunk/Source/WebCore/rendering/RenderView.h
r107160 r110224 89 89 bool printing() const; 90 90 91 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint& accumulatedOffset) const;91 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const; 92 92 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; 93 93 -
trunk/Source/WebCore/rendering/svg/RenderSVGBlock.cpp
r100225 r110224 80 80 } 81 81 82 void RenderSVGBlock::absoluteRects(Vector< LayoutRect>&, const LayoutPoint&) const82 void RenderSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const 83 83 { 84 84 // This code path should never be taken for SVG, as we're assuming useTransforms=true everywhere, absoluteQuads should be used. -
trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h
r96859 r110224 39 39 virtual void updateBoxModelInfoFromStyle(); 40 40 41 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint& accumulatedOffset) const;41 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const; 42 42 43 43 virtual void willBeDestroyed(); -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp
r107108 r110224 141 141 142 142 // addFocusRingRects is called from paintOutline and needs to be in the same coordinates as the paintOuline call 143 void RenderSVGContainer::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint&)143 void RenderSVGContainer::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&) 144 144 { 145 LayoutRect paintRectInParent = enclosingLayoutRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates()));145 IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates())); 146 146 if (!paintRectInParent.isEmpty()) 147 147 rects.append(paintRectInParent); -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.h
r108699 r110224 53 53 virtual void layout(); 54 54 55 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);55 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 56 56 57 57 virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; } -
trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp
r105613 r110224 184 184 } 185 185 186 void RenderSVGImage::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint&)186 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&) 187 187 { 188 188 // this is called from paint() after the localTransform has already been applied 189 LayoutRect contentRect = enclosingLayoutRect(repaintRectInLocalCoordinates());189 IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates()); 190 190 if (!contentRect.isEmpty()) 191 191 rects.append(contentRect); -
trunk/Source/WebCore/rendering/svg/RenderSVGImage.h
r105613 r110224 59 59 virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; } 60 60 61 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);61 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 62 62 63 63 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); -
trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
r109097 r110224 73 73 } 74 74 75 void RenderSVGModelObject::absoluteRects(Vector< LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const75 void RenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const 76 76 { 77 LayoutRect rect = enclosingLayoutRect(strokeBoundingBox());78 rect.moveBy( accumulatedOffset);77 IntRect rect = enclosingIntRect(strokeBoundingBox()); 78 rect.moveBy(roundedIntPoint(accumulatedOffset)); 79 79 rects.append(rect); 80 80 } -
trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h
r101342 r110224 56 56 virtual LayoutRect outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, LayoutPoint*) const; 57 57 58 virtual void absoluteRects(Vector< LayoutRect>&, const LayoutPoint& accumulatedOffset) const;58 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const; 59 59 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; 60 60 -
trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp
r109003 r110224 357 357 // This method is called from inside paintOutline() since we call paintOutline() 358 358 // while transformed to our coord system, return local coords 359 void RenderSVGShape::addFocusRingRects(Vector< LayoutRect>& rects, const LayoutPoint&)360 { 361 LayoutRect rect = enclosingLayoutRect(repaintRectInLocalCoordinates());359 void RenderSVGShape::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&) 360 { 361 IntRect rect = enclosingIntRect(repaintRectInLocalCoordinates()); 362 362 if (!rect.isEmpty()) 363 363 rects.append(rect); -
trunk/Source/WebCore/rendering/svg/RenderSVGShape.h
r105878 r110224 114 114 virtual void layout(); 115 115 virtual void paint(PaintInfo&, const LayoutPoint&); 116 virtual void addFocusRingRects(Vector< LayoutRect>&, const LayoutPoint&);116 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); 117 117 118 118 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
Note: See TracChangeset
for help on using the changeset viewer.