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

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 19883002: Expose a way to set a view's base background color. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix unittests for Android, to reland Created 7 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
« no previous file with comments | « no previous file | Source/web/WebFrameImpl.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 return m_baseBackgroundColor; 2034 return m_baseBackgroundColor;
2035 } 2035 }
2036 2036
2037 void FrameView::setBaseBackgroundColor(const StyleColor& backgroundColor) 2037 void FrameView::setBaseBackgroundColor(const StyleColor& backgroundColor)
2038 { 2038 {
2039 if (!backgroundColor.isValid()) 2039 if (!backgroundColor.isValid())
2040 m_baseBackgroundColor = Color::white; 2040 m_baseBackgroundColor = Color::white;
2041 else 2041 else
2042 m_baseBackgroundColor = backgroundColor.color(); 2042 m_baseBackgroundColor = backgroundColor.color();
2043 2043
2044 if (renderView() && renderView()->layer()->backing()) 2044 if (RenderLayerBacking* backing = renderView() ? renderView()->layer()->back ing() : 0) {
2045 renderView()->layer()->backing()->updateContentsOpaque(); 2045 backing->updateContentsOpaque();
2046 if (backing->graphicsLayer())
2047 backing->graphicsLayer()->setNeedsDisplay();
2048 }
2046 recalculateScrollbarOverlayStyle(); 2049 recalculateScrollbarOverlayStyle();
2047 } 2050 }
2048 2051
2049 void FrameView::updateBackgroundRecursively(const StyleColor& backgroundColor, b ool transparent) 2052 void FrameView::updateBackgroundRecursively(const StyleColor& backgroundColor, b ool transparent)
2050 { 2053 {
2051 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex t(m_frame.get())) { 2054 for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNex t(m_frame.get())) {
2052 if (FrameView* view = frame->view()) { 2055 if (FrameView* view = frame->view()) {
2053 view->setTransparent(transparent); 2056 view->setTransparent(transparent);
2054 view->setBaseBackgroundColor(backgroundColor); 2057 view->setBaseBackgroundColor(backgroundColor);
2055 } 2058 }
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 } 3376 }
3374 3377
3375 AXObjectCache* FrameView::axObjectCache() const 3378 AXObjectCache* FrameView::axObjectCache() const
3376 { 3379 {
3377 if (frame() && frame()->document()) 3380 if (frame() && frame()->document())
3378 return frame()->document()->existingAXObjectCache(); 3381 return frame()->document()->existingAXObjectCache();
3379 return 0; 3382 return 0;
3380 } 3383 }
3381 3384
3382 } // namespace WebCore 3385 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698