Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: Source/core/dom/Element.cpp

Issue 319633004: Fix scrollWidth/Height to not truncate scroll offset (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 } 797 }
798 798
799 // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instant ly. 799 // FIXME: Use scrollBehavior to decide whether to scroll smoothly or instant ly.
800 setScrollTop(position); 800 setScrollTop(position);
801 } 801 }
802 802
803 double Element::scrollWidth() 803 double Element::scrollWidth()
804 { 804 {
805 document().updateLayoutIgnorePendingStylesheets(); 805 document().updateLayoutIgnorePendingStylesheets();
806 if (RenderBox* rend = renderBox()) 806 if (RenderBox* rend = renderBox())
807 return adjustForAbsoluteZoom(rend->scrollWidth(), rend); 807 return adjustLayoutUnitForAbsoluteZoom(rend->scrollWidth(), *rend).toDou ble();
808 return 0; 808 return 0;
809 } 809 }
810 810
811 double Element::scrollHeight() 811 double Element::scrollHeight()
812 { 812 {
813 document().updateLayoutIgnorePendingStylesheets(); 813 document().updateLayoutIgnorePendingStylesheets();
814 if (RenderBox* rend = renderBox()) 814 if (RenderBox* rend = renderBox())
815 return adjustForAbsoluteZoom(rend->scrollHeight(), rend); 815 return adjustLayoutUnitForAbsoluteZoom(rend->scrollHeight(), *rend).toDo uble();
816 return 0; 816 return 0;
817 } 817 }
818 818
819 IntRect Element::boundsInRootViewSpace() 819 IntRect Element::boundsInRootViewSpace()
820 { 820 {
821 document().updateLayoutIgnorePendingStylesheets(); 821 document().updateLayoutIgnorePendingStylesheets();
822 822
823 FrameView* view = document().view(); 823 FrameView* view = document().view();
824 if (!view) 824 if (!view)
825 return IntRect(); 825 return IntRect();
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after
3323 3323
3324 void Element::trace(Visitor* visitor) 3324 void Element::trace(Visitor* visitor)
3325 { 3325 {
3326 if (hasRareData()) 3326 if (hasRareData())
3327 visitor->trace(elementRareData()); 3327 visitor->trace(elementRareData());
3328 3328
3329 ContainerNode::trace(visitor); 3329 ContainerNode::trace(visitor);
3330 } 3330 }
3331 3331
3332 } // namespace WebCore 3332 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698