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

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

Issue 1413573004: Set page height for printing tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back out patch set 4 and mark tests with NeedsManualRebaseline. Created 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/forced-break-tree-dump-only.html ('k') | 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) 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 String externalRepresentation(LocalFrame* frame, LayoutAsTextBehavior behavior) 782 String externalRepresentation(LocalFrame* frame, LayoutAsTextBehavior behavior)
783 { 783 {
784 if (!(behavior & LayoutAsTextDontUpdateLayout)) 784 if (!(behavior & LayoutAsTextDontUpdateLayout))
785 frame->document()->updateLayout(); 785 frame->document()->updateLayout();
786 786
787 LayoutObject* layoutObject = frame->contentLayoutObject(); 787 LayoutObject* layoutObject = frame->contentLayoutObject();
788 if (!layoutObject || !layoutObject->isBox()) 788 if (!layoutObject || !layoutObject->isBox())
789 return String(); 789 return String();
790 790
791 PrintContext printContext(frame); 791 PrintContext printContext(frame);
792 if (behavior & LayoutAsTextPrintingMode) 792 if (behavior & LayoutAsTextPrintingMode) {
793 printContext.begin(toLayoutBox(layoutObject)->size().width().toFloat()); 793 FloatSize size(toLayoutBox(layoutObject)->size());
794 printContext.begin(size.width(), size.height());
795 }
794 796
795 return externalRepresentation(toLayoutBox(layoutObject), behavior); 797 return externalRepresentation(toLayoutBox(layoutObject), behavior);
796 } 798 }
797 799
798 String externalRepresentation(Element* element, LayoutAsTextBehavior behavior) 800 String externalRepresentation(Element* element, LayoutAsTextBehavior behavior)
799 { 801 {
800 // Doesn't support printing mode. 802 // Doesn't support printing mode.
801 ASSERT(!(behavior & LayoutAsTextPrintingMode)); 803 ASSERT(!(behavior & LayoutAsTextPrintingMode));
802 if (!(behavior & LayoutAsTextDontUpdateLayout)) 804 if (!(behavior & LayoutAsTextDontUpdateLayout))
803 element->document().updateLayout(); 805 element->document().updateLayout();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 element->document().updateLayout(); 846 element->document().updateLayout();
845 847
846 LayoutObject* layoutObject = element->layoutObject(); 848 LayoutObject* layoutObject = element->layoutObject();
847 if (!layoutObject || !layoutObject->isListItem()) 849 if (!layoutObject || !layoutObject->isListItem())
848 return String(); 850 return String();
849 851
850 return toLayoutListItem(layoutObject)->markerText(); 852 return toLayoutListItem(layoutObject)->markerText();
851 } 853 }
852 854
853 } // namespace blink 855 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/forced-break-tree-dump-only.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698