OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 context->setFillColor(textStyle.emphasisMarkColor); | 474 context->setFillColor(textStyle.emphasisMarkColor); |
475 paintEmphasisMark(context, emphasisMark, emphasisMarkOffset, startOffset
, endOffset, length, font, textRun, textOrigin, boxRect); | 475 paintEmphasisMark(context, emphasisMark, emphasisMarkOffset, startOffset
, endOffset, length, font, textRun, textOrigin, boxRect); |
476 } | 476 } |
477 } | 477 } |
478 | 478 |
479 } // namespace | 479 } // namespace |
480 | 480 |
481 void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/) | 481 void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/) |
482 { | 482 { |
483 if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(&renderer()) | 483 if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(&renderer()) |
484 || m_truncation == cFullTruncation || paintInfo.phase == PaintPhaseOutli
ne || !m_len) | 484 || m_truncation == cFullTruncation || !m_len) |
485 return; | 485 return; |
486 | 486 |
487 ASSERT(paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintP
haseChildOutlines); | |
488 | |
489 LayoutRect logicalVisualOverflow = logicalOverflowRect(); | 487 LayoutRect logicalVisualOverflow = logicalOverflowRect(); |
490 LayoutUnit logicalStart = logicalVisualOverflow.x() + paintOffset.x(); | 488 LayoutUnit logicalStart = logicalVisualOverflow.x() + paintOffset.x(); |
491 LayoutUnit logicalExtent = logicalVisualOverflow.width(); | 489 LayoutUnit logicalExtent = logicalVisualOverflow.width(); |
492 | 490 |
493 LayoutUnit paintEnd = paintInfo.rect.maxX(); | 491 LayoutUnit paintEnd = paintInfo.rect.maxX(); |
494 LayoutUnit paintStart = paintInfo.rect.x(); | 492 LayoutUnit paintStart = paintInfo.rect.x(); |
495 | 493 |
496 // When subpixel font scaling is enabled text runs are positioned at | 494 // When subpixel font scaling is enabled text runs are positioned at |
497 // subpixel boundaries on the x-axis and thus there is no reason to | 495 // subpixel boundaries on the x-axis and thus there is no reason to |
498 // snap the x value. We still round the y-axis to ensure consistent | 496 // snap the x value. We still round the y-axis to ensure consistent |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); | 1347 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); |
1350 const int rendererCharacterOffset = 24; | 1348 const int rendererCharacterOffset = 24; |
1351 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) | 1349 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) |
1352 fputc(' ', stderr); | 1350 fputc(' ', stderr); |
1353 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 1351 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
1354 } | 1352 } |
1355 | 1353 |
1356 #endif | 1354 #endif |
1357 | 1355 |
1358 } // namespace blink | 1356 } // namespace blink |
OLD | NEW |