⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 100201 in webkit


Ignore:
Timestamp:
Nov 14, 2011, 3:33:30 PM (15 years ago)
Author:
eae@chromium.org
Message:

Round width and height when computing the scroll size (as opposed to flooring).

Location:
branches/subpixellayout/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/subpixellayout/Source/WebCore/html/TextFieldInputType.cpp

    r98391 r100201  
    148148            if (RenderBox* innerTextRenderer = innerTextElement()->renderBox()) {
    149149                if (RenderLayer* innerLayer = innerTextRenderer->layer())
    150                     innerLayer->scrollToOffset(!renderTextControl->style()->isLeftToRightDirection() ? innerLayer->scrollWidth() : LayoutUnit(0), 0, RenderLayer::ScrollOffsetClamped);
     150                    innerLayer->scrollToOffset(!renderTextControl->style()->isLeftToRightDirection() ? innerLayer->scrollWidth() : 0, 0, RenderLayer::ScrollOffsetClamped);
    151151            }
    152152
  • branches/subpixellayout/Source/WebCore/rendering/RenderLayer.cpp

    r100188 r100201  
    21642164}
    21652165
    2166 LayoutUnit RenderLayer::scrollWidth()
     2166int RenderLayer::scrollWidth()
    21672167{
    21682168    if (m_scrollDimensionsDirty)
     
    21712171}
    21722172
    2173 LayoutUnit RenderLayer::scrollHeight()
     2173int RenderLayer::scrollHeight()
    21742174{
    21752175    if (m_scrollDimensionsDirty)
     
    22162216   
    22172217    m_scrollDimensionsDirty = false;
    2218 
    2219     m_scrollOverflow.setWidth(overflowLeft() - box->borderLeft());
    2220     m_scrollOverflow.setHeight(overflowTop() - box->borderTop());
    2221 
    2222     m_scrollSize.setWidth(overflowRight() - overflowLeft());
    2223     m_scrollSize.setHeight(overflowBottom() - overflowTop());
    2224    
     2218    m_scrollOverflow.setWidth((overflowLeft() - box->borderLeft()).round());
     2219    m_scrollOverflow.setHeight((overflowTop() - box->borderTop()).round());
     2220
     2221    m_scrollSize.setWidth((overflowRight() - overflowLeft()).round());
     2222    m_scrollSize.setHeight((overflowBottom() - overflowTop()).round());
     2223
    22252224    setScrollOrigin(IntPoint(-m_scrollOverflow.width(), -m_scrollOverflow.height()));
    22262225
  • branches/subpixellayout/Source/WebCore/rendering/RenderLayer.h

    r100188 r100201  
    268268    LayoutRect rect() const { return LayoutRect(location(), size()); }
    269269
    270     LayoutUnit scrollWidth();
    271     LayoutUnit scrollHeight();
     270    int scrollWidth();
     271    int scrollHeight();
    272272
    273273    void panScrollFromPoint(const LayoutPoint&);
     
    281281    void scrollByRecursively(LayoutUnit xDelta, LayoutUnit yDelta, ScrollOffsetClamping = ScrollOffsetUnclamped);
    282282
    283     LayoutSize scrolledContentOffset() const { return scrollOffset() + m_scrollOverflow; }
     283    IntSize scrolledContentOffset() const { return scrollOffset() + m_scrollOverflow; }
    284284
    285285    int scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin().x(); }
     
    789789    IntSize m_scrollOffset;
    790790
    791     LayoutSize m_scrollOverflow;
     791    IntSize m_scrollOverflow;
    792792   
    793793    // The width/height of our scrolled area.
  • branches/subpixellayout/Source/WebCore/rendering/RenderTreeAsText.cpp

    r100189 r100201  
    667667            ts << " scrollY " << l.scrollYOffset();
    668668        if (l.renderBox() && l.renderBox()->clientWidth() != l.scrollWidth())
    669             ts << " scrollWidth " << l.scrollWidth().toInt();
     669            ts << " scrollWidth " << l.scrollWidth();
    670670        if (l.renderBox() && l.renderBox()->clientHeight() != l.scrollHeight())
    671             ts << " scrollHeight " << l.scrollHeight().toInt();
     671            ts << " scrollHeight " << l.scrollHeight();
    672672    }
    673673
Note: See TracChangeset for help on using the changeset viewer.