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

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

Issue 891573002: Removed a bunch of unneeded paint phase checks. (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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 611
612 // Paint decorations 612 // Paint decorations
613 TextDecoration textDecorations = styleToUse->textDecorationsInEffect(); 613 TextDecoration textDecorations = styleToUse->textDecorationsInEffect();
614 if (textDecorations != TextDecorationNone) { 614 if (textDecorations != TextDecorationNone) {
615 GraphicsContextStateSaver stateSaver(*context, false); 615 GraphicsContextStateSaver stateSaver(*context, false);
616 updateGraphicsContext(context, textStyle, stateSaver); 616 updateGraphicsContext(context, textStyle, stateSaver);
617 paintDecoration(context, boxOrigin, textDecorations); 617 paintDecoration(context, boxOrigin, textDecorations);
618 } 618 }
619 619
620 if (paintInfo.phase == PaintPhaseForeground) { 620 paintDocumentMarkers(context, boxOrigin, styleToUse, font, false);
ojan 2015/01/30 01:25:59 Not sure why we'd want to skip this code if we're
621 paintDocumentMarkers(context, boxOrigin, styleToUse, font, false);
622 621
623 // Paint custom underlines for compositions. 622 // Paint custom underlines for compositions.
624 if (useCustomUnderlines) { 623 if (useCustomUnderlines) {
625 const Vector<CompositionUnderline>& underlines = renderer().frame()- >inputMethodController().customCompositionUnderlines(); 624 const Vector<CompositionUnderline>& underlines = renderer().frame()->inp utMethodController().customCompositionUnderlines();
626 CompositionUnderlineRangeFilter filter(underlines, start(), end()); 625 CompositionUnderlineRangeFilter filter(underlines, start(), end());
627 for (CompositionUnderlineRangeFilter::ConstIterator it = filter.begi n(); it != filter.end(); ++it) { 626 for (CompositionUnderlineRangeFilter::ConstIterator it = filter.begin(); it != filter.end(); ++it) {
628 if (it->color == Color::transparent) 627 if (it->color == Color::transparent)
629 continue; 628 continue;
630 paintCompositionUnderline(context, boxOrigin, *it); 629 paintCompositionUnderline(context, boxOrigin, *it);
631 }
632 } 630 }
633 } 631 }
634 } 632 }
635 633
636 void InlineTextBox::selectionStartEnd(int& sPos, int& ePos) 634 void InlineTextBox::selectionStartEnd(int& sPos, int& ePos)
637 { 635 {
638 int startPos, endPos; 636 int startPos, endPos;
639 if (renderer().selectionState() == RenderObject::SelectionInside) { 637 if (renderer().selectionState() == RenderObject::SelectionInside) {
640 startPos = 0; 638 startPos = 0;
641 endPos = renderer().textLength(); 639 endPos = renderer().textLength();
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 1335 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
1338 const int rendererCharacterOffset = 24; 1336 const int rendererCharacterOffset = 24;
1339 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1337 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1340 fputc(' ', stderr); 1338 fputc(' ', stderr);
1341 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1339 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1342 } 1340 }
1343 1341
1344 #endif 1342 #endif
1345 1343
1346 } // namespace blink 1344 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698