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

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

Issue 756183004: Get rid of background-clip:text and PaintBehaviorForceBlackText. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove forceBlackText Created 6 years 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 * Copyright (C) 2003, 2006 Apple Computer, Inc. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 FloatPoint textOrigin = FloatPoint(boxOrigin.x(), boxOrigin.y() + font.fontM etrics().ascent()); 46 FloatPoint textOrigin = FloatPoint(boxOrigin.x(), boxOrigin.y() + font.fontM etrics().ascent());
47 47
48 Color styleTextColor = renderer().resolveColor(style, CSSPropertyWebkitTextF illColor); 48 Color styleTextColor = renderer().resolveColor(style, CSSPropertyWebkitTextF illColor);
49 if (styleTextColor != context->fillColor()) 49 if (styleTextColor != context->fillColor())
50 context->setFillColor(styleTextColor); 50 context->setFillColor(styleTextColor);
51 51
52 if (selectionState() != RenderObject::SelectionNone) { 52 if (selectionState() != RenderObject::SelectionNone) {
53 paintSelection(context, boxOrigin, style, font); 53 paintSelection(context, boxOrigin, style, font);
54 54
55 // Select the correct color for painting the text. 55 // Select the correct color for painting the text.
56 Color foreground = paintInfo.forceBlackText() ? Color::black : renderer( ).selectionForegroundColor(); 56 Color foreground = renderer().selectionForegroundColor();
57 if (foreground != styleTextColor) 57 if (foreground != styleTextColor)
58 context->setFillColor(foreground); 58 context->setFillColor(foreground);
59 } 59 }
60 60
61 const ShadowList* shadowList = style->textShadow(); 61 const ShadowList* shadowList = style->textShadow();
62 bool hasShadow = shadowList; 62 bool hasShadow = shadowList;
63 if (hasShadow) 63 if (hasShadow)
64 context->setDrawLooper(shadowList->createDrawLooper(DrawLooperBuilder::S hadowIgnoresAlpha)); 64 context->setDrawLooper(shadowList->createDrawLooper(DrawLooperBuilder::S hadowIgnoresAlpha));
65 65
66 TextRun textRun = constructTextRun(&renderer(), font, m_str, style, TextRun: :AllowTrailingExpansion); 66 TextRun textRun = constructTextRun(&renderer(), font, m_str, style, TextRun: :AllowTrailingExpansion);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (visibleToHitTestRequest(request) && boundsRect.intersects(HitTestLocatio n::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) { 159 if (visibleToHitTestRequest(request) && boundsRect.intersects(HitTestLocatio n::rectForPoint(locationInContainer.point(), 0, 0, 0, 0))) {
160 renderer().updateHitTestResult(result, locationInContainer.point() - toL ayoutSize(adjustedLocation)); 160 renderer().updateHitTestResult(result, locationInContainer.point() - toL ayoutSize(adjustedLocation));
161 if (!result.addNodeToRectBasedTestResult(renderer().node(), request, loc ationInContainer, boundsRect)) 161 if (!result.addNodeToRectBasedTestResult(renderer().node(), request, loc ationInContainer, boundsRect))
162 return true; 162 return true;
163 } 163 }
164 164
165 return false; 165 return false;
166 } 166 }
167 167
168 } // namespace blink 168 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSPrimitiveValueMappings.h ('k') | sky/engine/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698