Changeset 101045 in webkit
- Timestamp:
- Nov 23, 2011 12:21:18 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r101035 r101045 1 2011-11-23 Emil A Eklund <eae@chromium.org> 2 3 Change remaining scrollTop/Left/Width/Height methods back to int 4 https://bugs.webkit.org/show_bug.cgi?id=72771 5 6 Reviewed by Eric Seidel. 7 8 Change remaining scrollTop/Left/Width/Height, setScrollLeft/Top and 9 verticalScrollbarWidth, horizontalScrollbarHeight methods back to int as 10 scrolling will remain int based to line up with device pixels. 11 12 No new tests. 13 14 * rendering/RenderBox.cpp: 15 (WebCore::RenderBox::scrollWidth): 16 (WebCore::RenderBox::scrollHeight): 17 (WebCore::RenderBox::scrollLeft): 18 (WebCore::RenderBox::scrollTop): 19 (WebCore::RenderBox::setScrollLeft): 20 (WebCore::RenderBox::setScrollTop): 21 (WebCore::RenderBox::verticalScrollbarWidth): 22 (WebCore::RenderBox::horizontalScrollbarHeight): 23 * rendering/RenderBox.h: 24 (WebCore::RenderBox::scrollbarLogicalHeight): 25 * rendering/RenderListBox.cpp: 26 (WebCore::RenderListBox::verticalScrollbarWidth): 27 (WebCore::RenderListBox::scrollHeight): 28 (WebCore::RenderListBox::scrollLeft): 29 (WebCore::RenderListBox::setScrollLeft): 30 (WebCore::RenderListBox::scrollTop): 31 (WebCore::RenderListBox::setScrollTop): 32 * rendering/RenderListBox.h: 33 * rendering/RenderTextControlSingleLine.cpp: 34 (WebCore::RenderTextControlSingleLine::scrollWidth): 35 (WebCore::RenderTextControlSingleLine::scrollHeight): 36 (WebCore::RenderTextControlSingleLine::scrollLeft): 37 (WebCore::RenderTextControlSingleLine::scrollTop): 38 (WebCore::RenderTextControlSingleLine::setScrollLeft): 39 (WebCore::RenderTextControlSingleLine::setScrollTop): 40 * rendering/RenderTextControlSingleLine.h: 41 1 42 2011-11-22 Kenneth Russell <kbr@google.com> 2 43 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r100365 r101045 476 476 } 477 477 478 LayoutUnit RenderBox::scrollWidth() const478 int RenderBox::scrollWidth() const 479 479 { 480 480 if (hasOverflowClip()) … … 484 484 if (style()->isLeftToRightDirection()) 485 485 return max(clientWidth(), maxXLayoutOverflow() - borderLeft()); 486 return clientWidth() - min <LayoutUnit>(0, minXLayoutOverflow() - borderLeft());487 } 488 489 LayoutUnit RenderBox::scrollHeight() const486 return clientWidth() - min(0, minXLayoutOverflow() - borderLeft()); 487 } 488 489 int RenderBox::scrollHeight() const 490 490 { 491 491 if (hasOverflowClip()) … … 496 496 } 497 497 498 LayoutUnit RenderBox::scrollLeft() const498 int RenderBox::scrollLeft() const 499 499 { 500 500 return hasOverflowClip() ? layer()->scrollXOffset() : 0; 501 501 } 502 502 503 LayoutUnit RenderBox::scrollTop() const503 int RenderBox::scrollTop() const 504 504 { 505 505 return hasOverflowClip() ? layer()->scrollYOffset() : 0; 506 506 } 507 507 508 void RenderBox::setScrollLeft( LayoutUnit newLeft)508 void RenderBox::setScrollLeft(int newLeft) 509 509 { 510 510 if (hasOverflowClip()) … … 512 512 } 513 513 514 void RenderBox::setScrollTop( LayoutUnit newTop)514 void RenderBox::setScrollTop(int newTop) 515 515 { 516 516 if (hasOverflowClip()) … … 644 644 } 645 645 646 LayoutUnit RenderBox::verticalScrollbarWidth() const646 int RenderBox::verticalScrollbarWidth() const 647 647 { 648 648 return includeVerticalScrollbarSize() ? layer()->verticalScrollbarWidth() : 0; 649 649 } 650 650 651 LayoutUnit RenderBox::horizontalScrollbarHeight() const651 int RenderBox::horizontalScrollbarHeight() const 652 652 { 653 653 return includeHorizontalScrollbarSize() ? layer()->horizontalScrollbarHeight() : 0; -
trunk/Source/WebCore/rendering/RenderBox.h
r100048 r101045 200 200 // textareas can scroll shadow content (but pretend that they are the objects that are 201 201 // scrolling). 202 virtual LayoutUnit scrollLeft() const;203 virtual LayoutUnit scrollTop() const;204 virtual LayoutUnit scrollWidth() const;205 virtual LayoutUnit scrollHeight() const;206 virtual void setScrollLeft( LayoutUnit);207 virtual void setScrollTop( LayoutUnit);202 virtual int scrollLeft() const; 203 virtual int scrollTop() const; 204 virtual int scrollWidth() const; 205 virtual int scrollHeight() const; 206 virtual void setScrollLeft(int); 207 virtual void setScrollTop(int); 208 208 209 209 virtual LayoutUnit marginTop() const { return m_marginTop; } … … 341 341 LayoutUnit availableHeight() const { return style()->isHorizontalWritingMode() ? availableLogicalHeight() : availableLogicalWidth(); } 342 342 343 virtual LayoutUnit verticalScrollbarWidth() const;344 LayoutUnit horizontalScrollbarHeight() const;345 LayoutUnit scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }343 virtual int verticalScrollbarWidth() const; 344 int horizontalScrollbarHeight() const; 345 int scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); } 346 346 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0); 347 347 virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0); -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r100447 r101045 635 635 } 636 636 637 LayoutUnit RenderListBox::verticalScrollbarWidth() const637 int RenderListBox::verticalScrollbarWidth() const 638 638 { 639 639 return m_vBar && !m_vBar->isOverlayScrollbar() ? m_vBar->width() : LayoutUnit(0); … … 648 648 } 649 649 650 LayoutUnit RenderListBox::scrollHeight() const650 int RenderListBox::scrollHeight() const 651 651 { 652 652 return max(clientHeight(), listHeight()); 653 653 } 654 654 655 LayoutUnit RenderListBox::scrollLeft() const655 int RenderListBox::scrollLeft() const 656 656 { 657 657 return 0; 658 658 } 659 659 660 void RenderListBox::setScrollLeft( LayoutUnit)661 { 662 } 663 664 LayoutUnit RenderListBox::scrollTop() const660 void RenderListBox::setScrollLeft(int) 661 { 662 } 663 664 int RenderListBox::scrollTop() const 665 665 { 666 666 return m_indexOffset * itemHeight(); 667 667 } 668 668 669 void RenderListBox::setScrollTop( LayoutUnit newTop)669 void RenderListBox::setScrollTop(int newTop) 670 670 { 671 671 // Determine an index and scroll to it. -
trunk/Source/WebCore/rendering/RenderListBox.h
r99511 r101045 89 89 virtual void panScroll(const IntPoint&); 90 90 91 virtual LayoutUnit verticalScrollbarWidth() const;92 virtual LayoutUnit scrollLeft() const;93 virtual LayoutUnit scrollTop() const;94 virtual LayoutUnit scrollWidth() const;95 virtual LayoutUnit scrollHeight() const;96 virtual void setScrollLeft( LayoutUnit);97 virtual void setScrollTop( LayoutUnit);91 virtual int verticalScrollbarWidth() const; 92 virtual int scrollLeft() const; 93 virtual int scrollTop() const; 94 virtual int scrollWidth() const; 95 virtual int scrollHeight() const; 96 virtual void setScrollLeft(int); 97 virtual void setScrollTop(int); 98 98 99 99 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r99511 r101045 708 708 } 709 709 710 LayoutUnit RenderTextControlSingleLine::scrollWidth() const710 int RenderTextControlSingleLine::scrollWidth() const 711 711 { 712 712 if (innerTextElement()) … … 715 715 } 716 716 717 LayoutUnit RenderTextControlSingleLine::scrollHeight() const717 int RenderTextControlSingleLine::scrollHeight() const 718 718 { 719 719 if (innerTextElement()) … … 722 722 } 723 723 724 LayoutUnit RenderTextControlSingleLine::scrollLeft() const724 int RenderTextControlSingleLine::scrollLeft() const 725 725 { 726 726 if (innerTextElement()) … … 729 729 } 730 730 731 LayoutUnit RenderTextControlSingleLine::scrollTop() const731 int RenderTextControlSingleLine::scrollTop() const 732 732 { 733 733 if (innerTextElement()) … … 736 736 } 737 737 738 void RenderTextControlSingleLine::setScrollLeft( LayoutUnit newLeft)738 void RenderTextControlSingleLine::setScrollLeft(int newLeft) 739 739 { 740 740 if (innerTextElement()) … … 742 742 } 743 743 744 void RenderTextControlSingleLine::setScrollTop( LayoutUnit newTop)744 void RenderTextControlSingleLine::setScrollTop(int newTop) 745 745 { 746 746 if (innerTextElement()) -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h
r99511 r101045 67 67 68 68 // Subclassed to forward to our inner div. 69 virtual LayoutUnit scrollLeft() const;70 virtual LayoutUnit scrollTop() const;71 virtual LayoutUnit scrollWidth() const;72 virtual LayoutUnit scrollHeight() const;73 virtual void setScrollLeft( LayoutUnit);74 virtual void setScrollTop( LayoutUnit);69 virtual int scrollLeft() const; 70 virtual int scrollTop() const; 71 virtual int scrollWidth() const; 72 virtual int scrollHeight() const; 73 virtual void setScrollLeft(int); 74 virtual void setScrollTop(int); 75 75 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0); 76 76 virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
Note: See TracChangeset
for help on using the changeset viewer.