| 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.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 | 792 |
| 793 if (LocalDOMWindow* window = document().domWindow()) | 793 if (LocalDOMWindow* window = document().domWindow()) |
| 794 window->scrollTo(window->scrollX(), newTop); | 794 window->scrollTo(window->scrollX(), newTop); |
| 795 } | 795 } |
| 796 } | 796 } |
| 797 | 797 |
| 798 int Element::scrollWidth() | 798 int Element::scrollWidth() |
| 799 { | 799 { |
| 800 document().updateLayoutIgnorePendingStylesheets(); | 800 document().updateLayoutIgnorePendingStylesheets(); |
| 801 if (LayoutBox* box = layoutBox()) | 801 if (LayoutBox* box = layoutBox()) |
| 802 return adjustLayoutUnitForAbsoluteZoom(box->scrollWidth(), *box).toDoubl
e(); | 802 return adjustLayoutUnitForAbsoluteZoom(box->scrollWidth(), *box).round()
; |
| 803 return 0; | 803 return 0; |
| 804 } | 804 } |
| 805 | 805 |
| 806 int Element::scrollHeight() | 806 int Element::scrollHeight() |
| 807 { | 807 { |
| 808 document().updateLayoutIgnorePendingStylesheets(); | 808 document().updateLayoutIgnorePendingStylesheets(); |
| 809 if (LayoutBox* box = layoutBox()) | 809 if (LayoutBox* box = layoutBox()) |
| 810 return adjustLayoutUnitForAbsoluteZoom(box->scrollHeight(), *box).toDoub
le(); | 810 return adjustLayoutUnitForAbsoluteZoom(box->scrollHeight(), *box).round(
); |
| 811 return 0; | 811 return 0; |
| 812 } | 812 } |
| 813 | 813 |
| 814 void Element::scrollBy(double x, double y) | 814 void Element::scrollBy(double x, double y) |
| 815 { | 815 { |
| 816 ScrollToOptions scrollToOptions; | 816 ScrollToOptions scrollToOptions; |
| 817 scrollToOptions.setLeft(x); | 817 scrollToOptions.setLeft(x); |
| 818 scrollToOptions.setTop(y); | 818 scrollToOptions.setTop(y); |
| 819 scrollBy(scrollToOptions); | 819 scrollBy(scrollToOptions); |
| 820 } | 820 } |
| (...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3496 { | 3496 { |
| 3497 #if ENABLE(OILPAN) | 3497 #if ENABLE(OILPAN) |
| 3498 if (hasRareData()) | 3498 if (hasRareData()) |
| 3499 visitor->trace(elementRareData()); | 3499 visitor->trace(elementRareData()); |
| 3500 visitor->trace(m_elementData); | 3500 visitor->trace(m_elementData); |
| 3501 #endif | 3501 #endif |
| 3502 ContainerNode::trace(visitor); | 3502 ContainerNode::trace(visitor); |
| 3503 } | 3503 } |
| 3504 | 3504 |
| 3505 } // namespace blink | 3505 } // namespace blink |
| OLD | NEW |