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

Side by Side Diff: sky/engine/core/rendering/InlineTextBox.cpp

Issue 882223005: Remove painting roots. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 * (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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 if (textStyle.emphasisMarkColor != textStyle.fillColor) 473 if (textStyle.emphasisMarkColor != textStyle.fillColor)
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() || m_truncation == cFullTruncation || !m_len)
484 || m_truncation == cFullTruncation || !m_len)
485 return; 484 return;
486 485
487 LayoutRect logicalVisualOverflow = logicalOverflowRect(); 486 LayoutRect logicalVisualOverflow = logicalOverflowRect();
488 LayoutUnit logicalStart = logicalVisualOverflow.x() + paintOffset.x(); 487 LayoutUnit logicalStart = logicalVisualOverflow.x() + paintOffset.x();
489 LayoutUnit logicalExtent = logicalVisualOverflow.width(); 488 LayoutUnit logicalExtent = logicalVisualOverflow.width();
490 489
491 LayoutUnit paintEnd = paintInfo.rect.maxX(); 490 LayoutUnit paintEnd = paintInfo.rect.maxX();
492 LayoutUnit paintStart = paintInfo.rect.x(); 491 LayoutUnit paintStart = paintInfo.rect.x();
493 492
494 // When subpixel font scaling is enabled text runs are positioned at 493 // When subpixel font scaling is enabled text runs are positioned at
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 1346 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
1348 const int rendererCharacterOffset = 24; 1347 const int rendererCharacterOffset = 24;
1349 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1348 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1350 fputc(' ', stderr); 1349 fputc(' ', stderr);
1351 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1350 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1352 } 1351 }
1353 1352
1354 #endif 1353 #endif
1355 1354
1356 } // namespace blink 1355 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.cpp ('k') | sky/engine/core/rendering/LayerPaintingInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698