OLD | NEW |
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 if (isEmptyOrUnstyledAppleStyleSpan(o.node())) | 178 if (isEmptyOrUnstyledAppleStyleSpan(o.node())) |
179 ts << " *empty or unstyled AppleStyleSpan*"; | 179 ts << " *empty or unstyled AppleStyleSpan*"; |
180 } | 180 } |
181 } | 181 } |
182 | 182 |
183 LayoutRect rect = o.debugRect(); | 183 LayoutRect rect = o.debugRect(); |
184 ts << " " << rect; | 184 ts << " " << rect; |
185 | 185 |
186 if (!(o.isText() && !o.isBR())) { | 186 if (!(o.isText() && !o.isBR())) { |
187 if (o.isFileUploadControl()) | 187 if (o.isFileUploadControl()) |
188 ts << " " << quoteAndEscapeNonPrintables( | 188 ts << " " |
189 toLayoutFileUploadControl(&o)->fileTextValue()); | 189 << quoteAndEscapeNonPrintables( |
| 190 toLayoutFileUploadControl(&o)->fileTextValue()); |
190 | 191 |
191 if (o.parent()) { | 192 if (o.parent()) { |
192 Color color = o.resolveColor(CSSPropertyColor); | 193 Color color = o.resolveColor(CSSPropertyColor); |
193 if (o.parent()->resolveColor(CSSPropertyColor) != color) | 194 if (o.parent()->resolveColor(CSSPropertyColor) != color) |
194 ts << " [color=" << color << "]"; | 195 ts << " [color=" << color << "]"; |
195 | 196 |
196 // Do not dump invalid or transparent backgrounds, since that is the | 197 // Do not dump invalid or transparent backgrounds, since that is the |
197 // default. | 198 // default. |
198 Color backgroundColor = o.resolveColor(CSSPropertyBackgroundColor); | 199 Color backgroundColor = o.resolveColor(CSSPropertyBackgroundColor); |
199 if (o.parent()->resolveColor(CSSPropertyBackgroundColor) != | 200 if (o.parent()->resolveColor(CSSPropertyBackgroundColor) != |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // FIXME: Table cell adjustment is temporary until results can be updated. | 445 // FIXME: Table cell adjustment is temporary until results can be updated. |
445 if (o.containingBlock()->isTableCell()) | 446 if (o.containingBlock()->isTableCell()) |
446 y -= toLayoutTableCell(o.containingBlock())->intrinsicPaddingBefore(); | 447 y -= toLayoutTableCell(o.containingBlock())->intrinsicPaddingBefore(); |
447 | 448 |
448 ts << "text run at (" << x << "," << y << ") width " << logicalWidth; | 449 ts << "text run at (" << x << "," << y << ") width " << logicalWidth; |
449 if (!run.isLeftToRightDirection() || run.dirOverride()) { | 450 if (!run.isLeftToRightDirection() || run.dirOverride()) { |
450 ts << (!run.isLeftToRightDirection() ? " RTL" : " LTR"); | 451 ts << (!run.isLeftToRightDirection() ? " RTL" : " LTR"); |
451 if (run.dirOverride()) | 452 if (run.dirOverride()) |
452 ts << " override"; | 453 ts << " override"; |
453 } | 454 } |
454 ts << ": " << quoteAndEscapeNonPrintables( | 455 ts << ": " |
455 String(o.text()).substring(run.start(), run.len())); | 456 << quoteAndEscapeNonPrintables( |
| 457 String(o.text()).substring(run.start(), run.len())); |
456 if (run.hasHyphen()) | 458 if (run.hasHyphen()) |
457 ts << " + hyphen string " | 459 ts << " + hyphen string " |
458 << quoteAndEscapeNonPrintables(o.style()->hyphenString()); | 460 << quoteAndEscapeNonPrintables(o.style()->hyphenString()); |
459 ts << "\n"; | 461 ts << "\n"; |
460 } | 462 } |
461 | 463 |
462 void write(TextStream& ts, | 464 void write(TextStream& ts, |
463 const LayoutObject& o, | 465 const LayoutObject& o, |
464 int indent, | 466 int indent, |
465 LayoutAsTextBehavior behavior) { | 467 LayoutAsTextBehavior behavior) { |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 element->document().updateStyleAndLayout(); | 883 element->document().updateStyleAndLayout(); |
882 | 884 |
883 LayoutObject* layoutObject = element->layoutObject(); | 885 LayoutObject* layoutObject = element->layoutObject(); |
884 if (!layoutObject || !layoutObject->isListItem()) | 886 if (!layoutObject || !layoutObject->isListItem()) |
885 return String(); | 887 return String(); |
886 | 888 |
887 return toLayoutListItem(layoutObject)->markerText(); | 889 return toLayoutListItem(layoutObject)->markerText(); |
888 } | 890 } |
889 | 891 |
890 } // namespace blink | 892 } // namespace blink |
OLD | NEW |