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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2804983003: [blink] Use early returns in baseBackgroundColor(Override) setters. (Closed)
Patch Set: Revert compositing update fix, keep other changes. Created 3 years, 8 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 | third_party/WebKit/Source/web/WebFrameWidgetImpl.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 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 2335
2336 bool FrameView::hasOpaqueBackground() const { 2336 bool FrameView::hasOpaqueBackground() const {
2337 return !m_baseBackgroundColor.hasAlpha(); 2337 return !m_baseBackgroundColor.hasAlpha();
2338 } 2338 }
2339 2339
2340 Color FrameView::baseBackgroundColor() const { 2340 Color FrameView::baseBackgroundColor() const {
2341 return m_baseBackgroundColor; 2341 return m_baseBackgroundColor;
2342 } 2342 }
2343 2343
2344 void FrameView::setBaseBackgroundColor(const Color& backgroundColor) { 2344 void FrameView::setBaseBackgroundColor(const Color& backgroundColor) {
2345 if (m_baseBackgroundColor == backgroundColor)
2346 return;
2347
2345 m_baseBackgroundColor = backgroundColor; 2348 m_baseBackgroundColor = backgroundColor;
2346 2349
2347 if (!layoutViewItem().isNull() && 2350 if (!layoutViewItem().isNull() &&
2348 layoutViewItem().layer()->hasCompositedLayerMapping()) { 2351 layoutViewItem().layer()->hasCompositedLayerMapping()) {
2349 CompositedLayerMapping* compositedLayerMapping = 2352 CompositedLayerMapping* compositedLayerMapping =
2350 layoutViewItem().layer()->compositedLayerMapping(); 2353 layoutViewItem().layer()->compositedLayerMapping();
2351 compositedLayerMapping->updateContentsOpaque(); 2354 compositedLayerMapping->updateContentsOpaque();
2352 if (compositedLayerMapping->mainGraphicsLayer()) 2355 if (compositedLayerMapping->mainGraphicsLayer())
2353 compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay(); 2356 compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay();
2354 } 2357 }
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
5269 void FrameView::setAnimationHost( 5272 void FrameView::setAnimationHost(
5270 std::unique_ptr<CompositorAnimationHost> host) { 5273 std::unique_ptr<CompositorAnimationHost> host) {
5271 m_animationHost = std::move(host); 5274 m_animationHost = std::move(host);
5272 } 5275 }
5273 5276
5274 LayoutUnit FrameView::caretWidth() const { 5277 LayoutUnit FrameView::caretWidth() const {
5275 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5278 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5276 } 5279 }
5277 5280
5278 } // namespace blink 5281 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698