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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/rendering/RenderView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 for (const RenderObject* child = firstChild(); child; child = child->nextSib ling()) 1640 for (const RenderObject* child = firstChild(); child; child = child->nextSib ling())
1641 child->showRenderTreeAndMark(markedObject1, markedLabel1, markedObject2, markedLabel2, depth + 1); 1641 child->showRenderTreeAndMark(markedObject1, markedLabel1, markedObject2, markedLabel2, depth + 1);
1642 } 1642 }
1643 1643
1644 #endif // NDEBUG 1644 #endif // NDEBUG
1645 1645
1646 Color RenderObject::selectionBackgroundColor() const 1646 Color RenderObject::selectionBackgroundColor() const
1647 { 1647 {
1648 Color color; 1648 Color color;
1649 if (style()->userSelect() != SELECT_NONE) { 1649 if (style()->userSelect() != SELECT_NONE) {
1650 RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(PseudoStyleRequ est(SELECTION)); 1650 if (frame()->selection()->shouldShowBlockCursor() && frame()->selection( )->isCaret()) {
1651 if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBackgro undColor).isValid()) 1651 color = style()->visitedDependentColor(CSSPropertyColor).blendWithWh ite();
1652 color = pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColo r).blendWithWhite(); 1652 } else {
1653 else 1653 RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(PseudoStyle Request(SELECTION));
1654 color = frame()->selection()->isFocusedAndActive() ? 1654 if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBac kgroundColor).isValid())
1655 theme()->activeSelectionBackgroundColor() : 1655 color = pseudoStyle->visitedDependentColor(CSSPropertyBackground Color).blendWithWhite();
1656 theme()->inactiveSelectionBackgroundColor(); 1656 else
1657 color = frame()->selection()->isFocusedAndActive() ? theme()->ac tiveSelectionBackgroundColor() : theme()->inactiveSelectionBackgroundColor();
1658 }
1657 } 1659 }
1658 1660
1659 return color; 1661 return color;
1660 } 1662 }
1661 1663
1662 Color RenderObject::selectionColor(int colorProperty) const 1664 Color RenderObject::selectionColor(int colorProperty) const
1663 { 1665 {
1664 Color color; 1666 Color color;
1665 // If the element is unselectable, or we are only painting the selection, 1667 // If the element is unselectable, or we are only painting the selection,
1666 // don't override the foreground color with the selection foreground color. 1668 // don't override the foreground color with the selection foreground color.
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 { 3234 {
3233 if (object1) { 3235 if (object1) {
3234 const WebCore::RenderObject* root = object1; 3236 const WebCore::RenderObject* root = object1;
3235 while (root->parent()) 3237 while (root->parent())
3236 root = root->parent(); 3238 root = root->parent();
3237 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3239 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3238 } 3240 }
3239 } 3241 }
3240 3242
3241 #endif 3243 #endif
OLDNEW
« 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