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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1224893004: Turn FrameView's paintBehavior into a real global (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improved change after the reviews. Still fails on Android. Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/paint/BoxPainter.cpp » ('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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 return resolveColor(*pseudoStyle, CSSPropertyBackgroundColor).blendWithW hite(); 1596 return resolveColor(*pseudoStyle, CSSPropertyBackgroundColor).blendWithW hite();
1597 return frame()->selection().isFocusedAndActive() ? 1597 return frame()->selection().isFocusedAndActive() ?
1598 LayoutTheme::theme().activeSelectionBackgroundColor() : 1598 LayoutTheme::theme().activeSelectionBackgroundColor() :
1599 LayoutTheme::theme().inactiveSelectionBackgroundColor(); 1599 LayoutTheme::theme().inactiveSelectionBackgroundColor();
1600 } 1600 }
1601 1601
1602 Color LayoutObject::selectionColor(int colorProperty) const 1602 Color LayoutObject::selectionColor(int colorProperty) const
1603 { 1603 {
1604 // If the element is unselectable, or we are only painting the selection, 1604 // If the element is unselectable, or we are only painting the selection,
1605 // don't override the foreground color with the selection foreground color. 1605 // don't override the foreground color with the selection foreground color.
1606 if (!isSelectable() || (frame()->view()->paintBehavior() & PaintBehaviorSele ctionOnly)) 1606 if (!isSelectable() || (gGlobalPaintFlags & GlobalPaintSelectionOnly))
1607 return resolveColor(colorProperty); 1607 return resolveColor(colorProperty);
1608 1608
1609 if (RefPtr<ComputedStyle> pseudoStyle = getUncachedPseudoStyleFromParentOrSh adowHost()) 1609 if (RefPtr<ComputedStyle> pseudoStyle = getUncachedPseudoStyleFromParentOrSh adowHost())
1610 return resolveColor(*pseudoStyle, colorProperty); 1610 return resolveColor(*pseudoStyle, colorProperty);
1611 if (!LayoutTheme::theme().supportsSelectionForegroundColors()) 1611 if (!LayoutTheme::theme().supportsSelectionForegroundColors())
1612 return resolveColor(colorProperty); 1612 return resolveColor(colorProperty);
1613 return frame()->selection().isFocusedAndActive() ? 1613 return frame()->selection().isFocusedAndActive() ?
1614 LayoutTheme::theme().activeSelectionForegroundColor() : 1614 LayoutTheme::theme().activeSelectionForegroundColor() :
1615 LayoutTheme::theme().inactiveSelectionForegroundColor(); 1615 LayoutTheme::theme().inactiveSelectionForegroundColor();
1616 } 1616 }
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
3289 const blink::LayoutObject* root = object1; 3289 const blink::LayoutObject* root = object1;
3290 while (root->parent()) 3290 while (root->parent())
3291 root = root->parent(); 3291 root = root->parent();
3292 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3292 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3293 } else { 3293 } else {
3294 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3294 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3295 } 3295 }
3296 } 3296 }
3297 3297
3298 #endif 3298 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698