Changeset 110224 in webkit


Ignore:
Timestamp:
Mar 8, 2012 3:41:47 PM (12 years ago)
Author:
leviw@chromium.org
Message:

Switch absoluteRects, culledInlineAbsoluteRects, absoluteBoundingBoxRect, and addFocusRingRects back to integers
https://bugs.webkit.org/show_bug.cgi?id=80545

Reviewed by Simon Fraser.

Converting the above functions, all of which return rects that represent on-screen rects, to IntRects from
LayoutRects.

addFocusRingsRects generates a vector of rects that is handed off directly to the GraphicsContext to be
drawn. Snapping the rects before adding them to the vector saves an extra pass through the vector.

absoluteRects and culledInlineAbsoluteRects are only used by addFocusRingRects, hasNonEmptyBoundingBox (only
to check if they're empty), and absoluteBoundingBoxRect, which is exposed from WebCore and thus should be an
IntRect anyways.

No new tests. No change in behavior.

  • dom/Node.cpp:

(WebCore::Node::hasNonEmptyBoundingBox):

  • dom/Range.cpp:

(WebCore::Range::boundingBox):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::absoluteRects):
(WebCore::RenderBlock::addFocusRingRects):

  • rendering/RenderBlock.h:

(RenderBlock):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::absoluteRects):
(WebCore::RenderInline::culledInlineAbsoluteRects):
(WebCore::RenderInline::addFocusRingRects):

  • rendering/RenderInline.h:

(RenderInline):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::addFocusRingRects):

  • rendering/RenderListBox.h:

(RenderListBox):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::paintFocusRing):
(WebCore::RenderObject::absoluteBoundingBoxRect):
(WebCore::RenderObject::absoluteFocusRingQuads):

  • rendering/RenderObject.h:

(WebCore::RenderObject::absoluteRects):
(RenderObject):
(WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms):
(WebCore::RenderObject::addFocusRingRects):

  • rendering/RenderText.cpp:

(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteRectsForRange):

  • rendering/RenderText.h:

(RenderText):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::addFocusRingRects):

  • rendering/RenderTextControl.h:

(RenderTextControl):

  • rendering/RenderView.cpp:

(WebCore::RenderView::absoluteRects):

  • rendering/RenderView.h:

(RenderView):

  • rendering/svg/RenderSVGBlock.cpp:

(WebCore::RenderSVGBlock::absoluteRects):

  • rendering/svg/RenderSVGBlock.h:

(RenderSVGBlock):

  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::addFocusRingRects):

  • rendering/svg/RenderSVGContainer.h:

(RenderSVGContainer):

  • rendering/svg/RenderSVGImage.cpp:

(WebCore::RenderSVGImage::addFocusRingRects):

  • rendering/svg/RenderSVGImage.h:

(RenderSVGImage):

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::absoluteRects):

  • rendering/svg/RenderSVGModelObject.h:

(RenderSVGModelObject):

  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::addFocusRingRects):

  • rendering/svg/RenderSVGShape.h:

(RenderSVGShape):

Location:
trunk/Source/WebCore
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110222 r110224  
     12012-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
    1822012-03-08  Erik Arvidsson  <arv@chromium.org>
    283
  • trunk/Source/WebCore/dom/Node.cpp

    r110207 r110224  
    806806        return true;
    807807
    808     Vector<LayoutRect> rects;
     808    Vector<IntRect> rects;
    809809    FloatPoint absPos = renderer()->localToAbsolute();
    810810    renderer()->absoluteRects(rects, flooredLayoutPoint(absPos));
  • trunk/Source/WebCore/dom/Range.cpp

    r109097 r110224  
    16711671    for (size_t i = 0; i < n; ++i)
    16721672        result.unite(rects[i]);
    1673     return pixelSnappedIntRect(result);
     1673    return result;
    16741674}
    16751675
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r110072 r110224  
    63706370}
    63716371
    6372 void RenderBlock::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
     6372void RenderBlock::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
    63736373{
    63746374    // For blocks inside inlines, we go ahead and include margins so that we run right up to the
     
    63786378        // FIXME: This is wrong for block-flows that are horizontal.
    63796379        // 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(),
    63816381                                width(), height() + collapsedMarginBefore() + collapsedMarginAfter()));
    63826382        continuation()->absoluteRects(rects, accumulatedOffset - toLayoutSize(location() +
    63836383                inlineElementContinuation()->containingBlock()->location()));
    63846384    } else
    6385         rects.append(LayoutRect(accumulatedOffset, size()));
     6385        rects.append(pixelSnappedIntRect(accumulatedOffset, size()));
    63866386}
    63876387
     
    65416541}
    65426542
    6543 void RenderBlock::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset)
     6543void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset)
    65446544{
    65456545    // For blocks inside inlines, we go ahead and include margins so that we run right up to the
     
    65576557        LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin);
    65586558        if (!rect.isEmpty())
    6559             rects.append(rect);
     6559            rects.append(pixelSnappedIntRect(rect));
    65606560    } else if (width() && height())
    6561         rects.append(LayoutRect(additionalOffset, size()));
     6561        rects.append(pixelSnappedIntRect(additionalOffset, size()));
    65626562
    65636563    if (!hasOverflowClip() && !hasControlClip()) {
    65646564        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());
    65676567            LayoutRect rect(additionalOffset.x() + curr->x(), additionalOffset.y() + top, curr->width(), bottom - top);
    65686568            if (!rect.isEmpty())
    6569                 rects.append(rect);
     6569                rects.append(pixelSnappedIntRect(rect));
    65706570        }
    65716571
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r110135 r110224  
    473473    void addVisualOverflowFromTheme();
    474474
    475     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     475    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    476476
    477477#if ENABLE(SVG)
     
    816816    LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit position);
    817817   
    818     virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
     818    virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
    819819    virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
    820820
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r110196 r110224  
    508508}
    509509
    510 void RenderInline::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
     510void RenderInline::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
    511511{
    512512    if (!alwaysCreateLineBoxes())
     
    514514    else if (InlineFlowBox* curr = firstLineBox()) {
    515515        for (; curr; curr = curr->nextLineBox())
    516             rects.append(enclosingLayoutRect(FloatRect(accumulatedOffset + curr->topLeft(), curr->size())));
     516            rects.append(enclosingIntRect(FloatRect(accumulatedOffset + curr->topLeft(), curr->size())));
    517517    } else
    518         rects.append(LayoutRect(accumulatedOffset, LayoutSize()));
     518        rects.append(IntRect(roundedIntPoint(accumulatedOffset), IntSize()));
    519519
    520520    if (continuation()) {
     
    527527}
    528528
    529 void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>& rects, const LayoutSize& offset) const
     529void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<IntRect>& rects, const LayoutSize& offset) const
    530530{
    531531    if (!culledInlineFirstLineBox()) {
     
    13691369}
    13701370
    1371 void RenderInline::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset)
     1371void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset)
    13721372{
    13731373    if (!alwaysCreateLineBoxes())
     
    13751375    else {
    13761376        for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
    1377             rects.append(enclosingLayoutRect(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())));
    13781378    }
    13791379
  • trunk/Source/WebCore/rendering/RenderInline.h

    r105771 r110224  
    4747    virtual LayoutUnit marginEnd() const;
    4848
    49     virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
     49    virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
    5050    virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
    5151
     
    7474    LayoutSize relativePositionedInlineOffset(const RenderBox* child) const;
    7575
    76     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     76    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    7777    void paintOutline(GraphicsContext*, const LayoutPoint&);
    7878
     
    103103    InlineBox* culledInlineFirstLineBox() const;
    104104    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;
    106106    void culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>&) const;
    107107
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r110120 r110224  
    317317}
    318318
    319 void RenderListBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset)
     319void RenderListBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset)
    320320{
    321321    if (!isSpatialNavigationEnabled(frame()))
     
    327327    int selectedItem = select->activeSelectionEndListIndex();
    328328    if (selectedItem >= 0) {
    329         rects.append(itemBoundingBoxRect(additionalOffset, selectedItem));
     329        rects.append(pixelSnappedIntRect(itemBoundingBoxRect(additionalOffset, selectedItem)));
    330330        return;
    331331    }
     
    337337        HTMLElement* element = listItems[i];
    338338        if (element->hasTagName(optionTag) && !toHTMLOptionElement(element)->disabled()) {
    339             rects.append(itemBoundingBoxRect(additionalOffset, i));
     339            rects.append(pixelSnappedIntRect(itemBoundingBoxRect(additionalOffset, i)));
    340340            return;
    341341        }
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r110120 r110224  
    7878    virtual void layout();
    7979
    80     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     80    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    8181
    8282    virtual bool canBeProgramaticallyScrolled() const { return true; }
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r110196 r110224  
    11111111void RenderObject::paintFocusRing(GraphicsContext* context, const LayoutPoint& paintOffset, RenderStyle* style)
    11121112{
    1113     Vector<LayoutRect> focusRingRects;
     1113    Vector<IntRect> focusRingRects;
    11141114    addFocusRingRects(focusRingRects, paintOffset);
    11151115    if (style->outlineStyleIsAuto())
     
    11981198}
    11991199
    1200 LayoutRect RenderObject::absoluteBoundingBoxRect(bool useTransforms) const
     1200IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms) const
    12011201{
    12021202    if (useTransforms) {
     
    12081208            return IntRect();
    12091209   
    1210         LayoutRect result = quads[0].enclosingBoundingBox();
     1210        IntRect result = quads[0].enclosingBoundingBox();
    12111211        for (size_t i = 1; i < n; ++i)
    12121212            result.unite(quads[i].enclosingBoundingBox());
     
    12151215
    12161216    FloatPoint absPos = localToAbsolute();
    1217     Vector<LayoutRect> rects;
     1217    Vector<IntRect> rects;
    12181218    absoluteRects(rects, flooredLayoutPoint(absPos));
    12191219
    12201220    size_t n = rects.size();
    12211221    if (!n)
    1222         return LayoutRect();
     1222        return IntRect();
    12231223
    12241224    LayoutRect result = rects[0];
    12251225    for (size_t i = 1; i < n; ++i)
    12261226        result.unite(rects[i]);
    1227     return result;
     1227    return pixelSnappedIntRect(result);
    12281228}
    12291229
    12301230void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
    12311231{
    1232     Vector<LayoutRect> rects;
     1232    Vector<IntRect> rects;
    12331233    // FIXME: addFocusRingRects() needs to be passed this transform-unaware
    12341234    // localToAbsolute() offset here because RenderInline::addFocusRingRects()
     
    12391239    size_t count = rects.size();
    12401240    for (size_t i = 0; i < count; ++i) {
    1241         LayoutRect rect = rects[i];
     1241        IntRect rect = rects[i];
    12421242        rect.move(-absolutePoint.x(), -absolutePoint.y());
    12431243        quads.append(localToAbsoluteQuad(FloatQuad(rect)));
  • trunk/Source/WebCore/rendering/RenderObject.h

    r109785 r110224  
    652652    LayoutSize offsetFromAncestorContainer(RenderObject*) const;
    653653   
    654     virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint&) const { }
     654    virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { }
    655655
    656656    // 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); }
    659659
    660660    // Build an array of quads in absolute coords for line boxes
     
    838838    void getTransformFromContainer(const RenderObject* container, const LayoutSize& offsetInContainer, TransformationMatrix&) const;
    839839   
    840     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&) { };
     840    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&) { };
    841841
    842842    LayoutRect absoluteOutlineBounds() const
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r109593 r110224  
    304304}
    305305
    306 void RenderText::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
     306void RenderText::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
    307307{
    308308    for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
    309         rects.append(enclosingLayoutRect(FloatRect(accumulatedOffset + box->topLeft(), box->size())));
     309        rects.append(enclosingIntRect(FloatRect(accumulatedOffset + box->topLeft(), box->size())));
    310310}
    311311
     
    331331}
    332332
    333 void RenderText::absoluteRectsForRange(Vector<LayoutRect>& rects, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed)
     333void RenderText::absoluteRectsForRange(Vector<IntRect>& rects, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed)
    334334{
    335335    // Work around signed/unsigned issues. This function takes unsigneds, and is often passed UINT_MAX
     
    348348            FloatRect r = box->calculateBoundaries();
    349349            if (useSelectionHeight) {
    350                 // FIXME: localSelectionRect should switch to return FloatRect soon with the subpixellayout branch.
    351350                IntRect selectionRect = box->localSelectionRect(start, end);
    352351                if (box->isHorizontal()) {
  • trunk/Source/WebCore/rendering/RenderText.h

    r109785 r110224  
    5555    void dirtyLineBoxes(bool fullLayout);
    5656
    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);
    5959
    6060    virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r110135 r110224  
    276276}
    277277
    278 void RenderTextControl::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset)
     278void RenderTextControl::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& additionalOffset)
    279279{
    280280    if (!size().isEmpty())
    281         rects.append(LayoutRect(additionalOffset, size()));
     281        rects.append(pixelSnappedIntRect(additionalOffset, size()));
    282282}
    283283
  • trunk/Source/WebCore/rendering/RenderTextControl.h

    r110034 r110224  
    7373    virtual bool avoidsFloats() const { return true; }
    7474   
    75     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     75    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    7676
    7777    virtual bool canBeProgramaticallyScrolled() const { return true; }
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r109805 r110224  
    367367}
    368368
    369 void RenderView::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
    370 {
    371     rects.append(LayoutRect(accumulatedOffset, m_layer->size()));
     369void RenderView::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
     370{
     371    rects.append(pixelSnappedIntRect(accumulatedOffset, m_layer->size()));
    372372}
    373373
  • trunk/Source/WebCore/rendering/RenderView.h

    r107160 r110224  
    8989    bool printing() const;
    9090
    91     virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
     91    virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
    9292    virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
    9393
  • trunk/Source/WebCore/rendering/svg/RenderSVGBlock.cpp

    r100225 r110224  
    8080}
    8181
    82 void RenderSVGBlock::absoluteRects(Vector<LayoutRect>&, const LayoutPoint&) const
     82void RenderSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const
    8383{
    8484    // 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  
    3939    virtual void updateBoxModelInfoFromStyle();
    4040
    41     virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
     41    virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
    4242
    4343    virtual void willBeDestroyed();
  • trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp

    r107108 r110224  
    141141
    142142// 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&)
     143void RenderSVGContainer::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&)
    144144{
    145     LayoutRect paintRectInParent = enclosingLayoutRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates()));
     145    IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates()));
    146146    if (!paintRectInParent.isEmpty())
    147147        rects.append(paintRectInParent);
  • trunk/Source/WebCore/rendering/svg/RenderSVGContainer.h

    r108699 r110224  
    5353    virtual void layout();
    5454
    55     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     55    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    5656
    5757    virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; }
  • trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp

    r105613 r110224  
    184184}
    185185
    186 void RenderSVGImage::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&)
     186void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&)
    187187{
    188188    // this is called from paint() after the localTransform has already been applied
    189     LayoutRect contentRect = enclosingLayoutRect(repaintRectInLocalCoordinates());
     189    IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates());
    190190    if (!contentRect.isEmpty())
    191191        rects.append(contentRect);
  • trunk/Source/WebCore/rendering/svg/RenderSVGImage.h

    r105613 r110224  
    5959    virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
    6060
    61     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     61    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    6262
    6363    virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
  • trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp

    r109097 r110224  
    7373}
    7474
    75 void RenderSVGModelObject::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
     75void RenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
    7676{
    77     LayoutRect rect = enclosingLayoutRect(strokeBoundingBox());
    78     rect.moveBy(accumulatedOffset);
     77    IntRect rect = enclosingIntRect(strokeBoundingBox());
     78    rect.moveBy(roundedIntPoint(accumulatedOffset));
    7979    rects.append(rect);
    8080}
  • trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h

    r101342 r110224  
    5656    virtual LayoutRect outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, LayoutPoint*) const;
    5757
    58     virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
     58    virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
    5959    virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
    6060
  • trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp

    r109003 r110224  
    357357// This method is called from inside paintOutline() since we call paintOutline()
    358358// while transformed to our coord system, return local coords
    359 void RenderSVGShape::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&)
    360 {
    361     LayoutRect rect = enclosingLayoutRect(repaintRectInLocalCoordinates());
     359void RenderSVGShape::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&)
     360{
     361    IntRect rect = enclosingIntRect(repaintRectInLocalCoordinates());
    362362    if (!rect.isEmpty())
    363363        rects.append(rect);
  • trunk/Source/WebCore/rendering/svg/RenderSVGShape.h

    r105878 r110224  
    114114    virtual void layout();
    115115    virtual void paint(PaintInfo&, const LayoutPoint&);
    116     virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
     116    virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&);
    117117
    118118    virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
Note: See TracChangeset for help on using the changeset viewer.