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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 16081003: [CSS] -webkit-var must be case sensitive according to specs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use foreground color to render overtype caret Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/rendering/RenderView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index da52773b9c681e0a141c09e87d073e96df4c1b23..e9ade48f2e0cde8cd7ec91413c10b854986005b7 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1647,13 +1647,15 @@ Color RenderObject::selectionBackgroundColor() const
{
Color color;
if (style()->userSelect() != SELECT_NONE) {
- RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
- if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
- color = pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).blendWithWhite();
- else
- color = frame()->selection()->isFocusedAndActive() ?
- theme()->activeSelectionBackgroundColor() :
- theme()->inactiveSelectionBackgroundColor();
+ if (frame()->selection()->shouldShowBlockCursor() && frame()->selection()->isCaret()) {
+ color = style()->visitedDependentColor(CSSPropertyColor).blendWithWhite();
+ } else {
+ RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(PseudoStyleRequest(SELECTION));
+ if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
+ color = pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).blendWithWhite();
+ else
+ color = frame()->selection()->isFocusedAndActive() ? theme()->activeSelectionBackgroundColor() : theme()->inactiveSelectionBackgroundColor();
+ }
}
return color;
« no previous file with comments | « no previous file | Source/core/rendering/RenderView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698