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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 if (layer.isTransparent()) 591 if (layer.isTransparent())
592 ts << " transparent"; 592 ts << " transparent";
593 593
594 if (layer.layoutObject()->hasOverflowClip() || reportFrameScrollInfo) { 594 if (layer.layoutObject()->hasOverflowClip() || reportFrameScrollInfo) {
595 ScrollableArea* scrollableArea; 595 ScrollableArea* scrollableArea;
596 if (reportFrameScrollInfo) 596 if (reportFrameScrollInfo)
597 scrollableArea = toLayoutView(layer.layoutObject())->frameView(); 597 scrollableArea = toLayoutView(layer.layoutObject())->frameView();
598 else 598 else
599 scrollableArea = layer.getScrollableArea(); 599 scrollableArea = layer.getScrollableArea();
600 600
601 DoublePoint adjustedScrollOffset = 601 ScrollOffset adjustedScrollOffset =
602 scrollableArea->scrollPositionDouble() + 602 scrollableArea->scrollOffset() +
603 toDoubleSize(scrollableArea->scrollOrigin()); 603 toFloatSize(scrollableArea->scrollOrigin());
604 if (adjustedScrollOffset.x()) 604 if (adjustedScrollOffset.width())
605 ts << " scrollX " << adjustedScrollOffset.x(); 605 ts << " scrollX " << adjustedScrollOffset.width();
606 if (adjustedScrollOffset.y()) 606 if (adjustedScrollOffset.height())
607 ts << " scrollY " << adjustedScrollOffset.y(); 607 ts << " scrollY " << adjustedScrollOffset.height();
608 if (layer.layoutBox() && 608 if (layer.layoutBox() &&
609 layer.layoutBox()->pixelSnappedClientWidth() != 609 layer.layoutBox()->pixelSnappedClientWidth() !=
610 layer.layoutBox()->pixelSnappedScrollWidth()) 610 layer.layoutBox()->pixelSnappedScrollWidth())
611 ts << " scrollWidth " << layer.layoutBox()->pixelSnappedScrollWidth(); 611 ts << " scrollWidth " << layer.layoutBox()->pixelSnappedScrollWidth();
612 if (layer.layoutBox() && 612 if (layer.layoutBox() &&
613 layer.layoutBox()->pixelSnappedClientHeight() != 613 layer.layoutBox()->pixelSnappedClientHeight() !=
614 layer.layoutBox()->pixelSnappedScrollHeight()) 614 layer.layoutBox()->pixelSnappedScrollHeight())
615 ts << " scrollHeight " << layer.layoutBox()->pixelSnappedScrollHeight(); 615 ts << " scrollHeight " << layer.layoutBox()->pixelSnappedScrollHeight();
616 } 616 }
617 617
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 element->document().updateStyleAndLayout(); 875 element->document().updateStyleAndLayout();
876 876
877 LayoutObject* layoutObject = element->layoutObject(); 877 LayoutObject* layoutObject = element->layoutObject();
878 if (!layoutObject || !layoutObject->isListItem()) 878 if (!layoutObject || !layoutObject->isListItem())
879 return String(); 879 return String();
880 880
881 return toLayoutListItem(layoutObject)->markerText(); 881 return toLayoutListItem(layoutObject)->markerText();
882 } 882 }
883 883
884 } // namespace blink 884 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutPart.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698