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

Side by Side Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp

Issue 1145993002: Refactor root element background painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase, adding back TestExpectation Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/paint/BoxPainter.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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 break; 1731 break;
1732 1732
1733 finalOpacity *= curr->layoutObject()->opacity(); 1733 finalOpacity *= curr->layoutObject()->opacity();
1734 } 1734 }
1735 1735
1736 return finalOpacity; 1736 return finalOpacity;
1737 } 1737 }
1738 1738
1739 Color CompositedDeprecatedPaintLayerMapping::layoutObjectBackgroundColor() const 1739 Color CompositedDeprecatedPaintLayerMapping::layoutObjectBackgroundColor() const
1740 { 1740 {
1741 LayoutObject* backgroundLayoutObject = layoutObject(); 1741 return layoutObject()->resolveColor(CSSPropertyBackgroundColor);
1742 if (backgroundLayoutObject->isDocumentElement())
1743 backgroundLayoutObject = backgroundLayoutObject->layoutObjectForRootBack ground();
1744
1745 return backgroundLayoutObject->resolveColor(CSSPropertyBackgroundColor);
1746 } 1742 }
1747 1743
1748 void CompositedDeprecatedPaintLayerMapping::updateBackgroundColor() 1744 void CompositedDeprecatedPaintLayerMapping::updateBackgroundColor()
1749 { 1745 {
1750 m_graphicsLayer->setBackgroundColor(layoutObjectBackgroundColor()); 1746 m_graphicsLayer->setBackgroundColor(layoutObjectBackgroundColor());
1751 } 1747 }
1752 1748
1753 bool CompositedDeprecatedPaintLayerMapping::paintsChildren() const 1749 bool CompositedDeprecatedPaintLayerMapping::paintsChildren() const
1754 { 1750 {
1755 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildLayou tObjects()) 1751 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildLayou tObjects())
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2339 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2344 name = "Scrolling Block Selection Layer"; 2340 name = "Scrolling Block Selection Layer";
2345 } else { 2341 } else {
2346 ASSERT_NOT_REACHED(); 2342 ASSERT_NOT_REACHED();
2347 } 2343 }
2348 2344
2349 return name; 2345 return name;
2350 } 2346 }
2351 2347
2352 } // namespace blink 2348 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698