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

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

Issue 772473004: Get rid of PaintBehaviorSelectionOnly. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | no next file » | 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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 if (!isSelectable()) 1580 if (!isSelectable())
1581 return Color::transparent; 1581 return Color::transparent;
1582 1582
1583 return frame()->selection().isFocusedAndActive() ? 1583 return frame()->selection().isFocusedAndActive() ?
1584 RenderTheme::theme().activeSelectionBackgroundColor() : 1584 RenderTheme::theme().activeSelectionBackgroundColor() :
1585 RenderTheme::theme().inactiveSelectionBackgroundColor(); 1585 RenderTheme::theme().inactiveSelectionBackgroundColor();
1586 } 1586 }
1587 1587
1588 Color RenderObject::selectionColor(int colorProperty) const 1588 Color RenderObject::selectionColor(int colorProperty) const
1589 { 1589 {
1590 // If the element is unselectable, or we are only painting the selection, 1590 // If the element is unselectable, don't override the foreground
1591 // don't override the foreground color with the selection foreground color. 1591 // color with the selection foreground color.
1592 if (!isSelectable() || (frame()->view()->paintBehavior() & PaintBehaviorSele ctionOnly)) 1592 if (!isSelectable())
1593 return resolveColor(colorProperty); 1593 return resolveColor(colorProperty);
1594 1594
1595 if (!RenderTheme::theme().supportsSelectionForegroundColors()) 1595 if (!RenderTheme::theme().supportsSelectionForegroundColors())
1596 return resolveColor(colorProperty); 1596 return resolveColor(colorProperty);
1597 return frame()->selection().isFocusedAndActive() ? 1597 return frame()->selection().isFocusedAndActive() ?
1598 RenderTheme::theme().activeSelectionForegroundColor() : 1598 RenderTheme::theme().activeSelectionForegroundColor() :
1599 RenderTheme::theme().inactiveSelectionForegroundColor(); 1599 RenderTheme::theme().inactiveSelectionForegroundColor();
1600 } 1600 }
1601 1601
1602 Color RenderObject::selectionForegroundColor() const 1602 Color RenderObject::selectionForegroundColor() const
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 { 2572 {
2573 if (object1) { 2573 if (object1) {
2574 const blink::RenderObject* root = object1; 2574 const blink::RenderObject* root = object1;
2575 while (root->parent()) 2575 while (root->parent())
2576 root = root->parent(); 2576 root = root->parent();
2577 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2577 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2578 } 2578 }
2579 } 2579 }
2580 2580
2581 #endif 2581 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698