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

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

Issue 1651703002: More explicit LayoutUnit conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@evenMoarConstructors
Patch Set: Traits vs Properties vs Pandas Created 4 years, 10 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 r = LayoutRect(cell.location().x(), cell.location().y() + cell.intrinsic PaddingBefore(), cell.size().width(), cell.size().height() - cell.intrinsicPaddi ngBefore() - cell.intrinsicPaddingAfter()); 208 r = LayoutRect(cell.location().x(), cell.location().y() + cell.intrinsic PaddingBefore(), cell.size().width(), cell.size().height() - cell.intrinsicPaddi ngBefore() - cell.intrinsicPaddingAfter());
209 } else if (o.isBox()) { 209 } else if (o.isBox()) {
210 r = toLayoutBox(&o)->frameRect(); 210 r = toLayoutBox(&o)->frameRect();
211 } 211 }
212 212
213 // FIXME: Temporary in order to ensure compatibility with existing layout te st results. 213 // FIXME: Temporary in order to ensure compatibility with existing layout te st results.
214 if (adjustForTableCells) 214 if (adjustForTableCells)
215 r.move(0, -toLayoutTableCell(o.containingBlock())->intrinsicPaddingBefor e()); 215 r.move(0, -toLayoutTableCell(o.containingBlock())->intrinsicPaddingBefor e());
216 216
217 if (o.isLayoutView()) { 217 if (o.isLayoutView()) {
218 r.setWidth(toLayoutView(o).viewWidth(IncludeScrollbars)); 218 r.setWidth(LayoutUnit(toLayoutView(o).viewWidth(IncludeScrollbars)));
219 r.setHeight(toLayoutView(o).viewHeight(IncludeScrollbars)); 219 r.setHeight(LayoutUnit(toLayoutView(o).viewHeight(IncludeScrollbars)));
220 } 220 }
221 221
222 ts << " " << r; 222 ts << " " << r;
223 223
224 if (!(o.isText() && !o.isBR())) { 224 if (!(o.isText() && !o.isBR())) {
225 if (o.isFileUploadControl()) 225 if (o.isFileUploadControl())
226 ts << " " << quoteAndEscapeNonPrintables(toLayoutFileUploadControl(& o)->fileTextValue()); 226 ts << " " << quoteAndEscapeNonPrintables(toLayoutFileUploadControl(& o)->fileTextValue());
227 227
228 if (o.parent()) { 228 if (o.parent()) {
229 Color color = o.resolveColor(CSSPropertyColor); 229 Color color = o.resolveColor(CSSPropertyColor);
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 element->document().updateLayout(); 845 element->document().updateLayout();
846 846
847 LayoutObject* layoutObject = element->layoutObject(); 847 LayoutObject* layoutObject = element->layoutObject();
848 if (!layoutObject || !layoutObject->isListItem()) 848 if (!layoutObject || !layoutObject->isListItem())
849 return String(); 849 return String();
850 850
851 return toLayoutListItem(layoutObject)->markerText(); 851 return toLayoutListItem(layoutObject)->markerText();
852 } 852 }
853 853
854 } // namespace blink 854 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTextControl.cpp ('k') | third_party/WebKit/Source/core/layout/line/EllipsisBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698