OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
10 * | 10 * |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 768 |
769 if (LayoutBox* layoutObject = layoutBox()) | 769 if (LayoutBox* layoutObject = layoutBox()) |
770 return adjustLayoutUnitForAbsoluteZoom( | 770 return adjustLayoutUnitForAbsoluteZoom( |
771 LayoutUnit(layoutObject->pixelSnappedClientHeight()), | 771 LayoutUnit(layoutObject->pixelSnappedClientHeight()), |
772 layoutObject->styleRef()) | 772 layoutObject->styleRef()) |
773 .round(); | 773 .round(); |
774 return 0; | 774 return 0; |
775 } | 775 } |
776 | 776 |
777 double Element::scrollLeft() { | 777 double Element::scrollLeft() { |
778 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); | 778 document().updateScrollPosition(this); |
779 | 779 |
780 if (document().scrollingElement() == this) { | 780 if (document().scrollingElement() == this) { |
781 if (document().domWindow()) | 781 if (document().domWindow()) |
782 return document().domWindow()->scrollX(); | 782 return document().domWindow()->scrollX(); |
783 return 0; | 783 return 0; |
784 } | 784 } |
785 | 785 |
786 if (LayoutBox* box = layoutBox()) | 786 if (LayoutBox* box = layoutBox()) |
787 return adjustScrollForAbsoluteZoom(box->scrollLeft(), *box); | 787 return adjustScrollForAbsoluteZoom(box->scrollLeft(), *box); |
788 | 788 |
789 return 0; | 789 return 0; |
790 } | 790 } |
791 | 791 |
792 double Element::scrollTop() { | 792 double Element::scrollTop() { |
793 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); | 793 document().updateScrollPosition(this); |
794 | 794 |
795 if (document().scrollingElement() == this) { | 795 if (document().scrollingElement() == this) { |
796 if (document().domWindow()) | 796 if (document().domWindow()) |
797 return document().domWindow()->scrollY(); | 797 return document().domWindow()->scrollY(); |
798 return 0; | 798 return 0; |
799 } | 799 } |
800 | 800 |
801 if (LayoutBox* box = layoutBox()) | 801 if (LayoutBox* box = layoutBox()) |
802 return adjustScrollForAbsoluteZoom(box->scrollTop(), *box); | 802 return adjustScrollForAbsoluteZoom(box->scrollTop(), *box); |
803 | 803 |
(...skipping 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4082 } | 4082 } |
4083 | 4083 |
4084 DEFINE_TRACE_WRAPPERS(Element) { | 4084 DEFINE_TRACE_WRAPPERS(Element) { |
4085 if (hasRareData()) { | 4085 if (hasRareData()) { |
4086 visitor->traceWrappers(elementRareData()); | 4086 visitor->traceWrappers(elementRareData()); |
4087 } | 4087 } |
4088 ContainerNode::traceWrappers(visitor); | 4088 ContainerNode::traceWrappers(visitor); |
4089 } | 4089 } |
4090 | 4090 |
4091 } // namespace blink | 4091 } // namespace blink |
OLD | NEW |