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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 } | 432 } |
433 | 433 |
434 static void writeTextRun(TextStream& ts, | 434 static void writeTextRun(TextStream& ts, |
435 const LayoutText& o, | 435 const LayoutText& o, |
436 const InlineTextBox& run) { | 436 const InlineTextBox& run) { |
437 // FIXME: For now use an "enclosingIntRect" model for x, y and logicalWidth, | 437 // FIXME: For now use an "enclosingIntRect" model for x, y and logicalWidth, |
438 // although this makes it harder to detect any changes caused by the | 438 // although this makes it harder to detect any changes caused by the |
439 // conversion to floating point. :( | 439 // conversion to floating point. :( |
440 int x = run.x().toInt(); | 440 int x = run.x().toInt(); |
441 int y = run.y().toInt(); | 441 int y = run.y().toInt(); |
442 int logicalWidth = (run.left() + run.logicalWidth()).ceil() - x; | 442 int logicalWidth = (run.x() + run.logicalWidth()).ceil() - x; |
443 | 443 |
444 // FIXME: Table cell adjustment is temporary until results can be updated. | 444 // FIXME: Table cell adjustment is temporary until results can be updated. |
445 if (o.containingBlock()->isTableCell()) | 445 if (o.containingBlock()->isTableCell()) |
446 y -= toLayoutTableCell(o.containingBlock())->intrinsicPaddingBefore(); | 446 y -= toLayoutTableCell(o.containingBlock())->intrinsicPaddingBefore(); |
447 | 447 |
448 ts << "text run at (" << x << "," << y << ") width " << logicalWidth; | 448 ts << "text run at (" << x << "," << y << ") width " << logicalWidth; |
449 if (!run.isLeftToRightDirection() || run.dirOverride()) { | 449 if (!run.isLeftToRightDirection() || run.dirOverride()) { |
450 ts << (!run.isLeftToRightDirection() ? " RTL" : " LTR"); | 450 ts << (!run.isLeftToRightDirection() ? " RTL" : " LTR"); |
451 if (run.dirOverride()) | 451 if (run.dirOverride()) |
452 ts << " override"; | 452 ts << " override"; |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 element->document().updateStyleAndLayout(); | 883 element->document().updateStyleAndLayout(); |
884 | 884 |
885 LayoutObject* layoutObject = element->layoutObject(); | 885 LayoutObject* layoutObject = element->layoutObject(); |
886 if (!layoutObject || !layoutObject->isListItem()) | 886 if (!layoutObject || !layoutObject->isListItem()) |
887 return String(); | 887 return String(); |
888 | 888 |
889 return toLayoutListItem(layoutObject)->markerText(); | 889 return toLayoutListItem(layoutObject)->markerText(); |
890 } | 890 } |
891 | 891 |
892 } // namespace blink | 892 } // namespace blink |
OLD | NEW |