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

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 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
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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 break; 1730 break;
1731 1731
1732 finalOpacity *= curr->layoutObject()->opacity(); 1732 finalOpacity *= curr->layoutObject()->opacity();
1733 } 1733 }
1734 1734
1735 return finalOpacity; 1735 return finalOpacity;
1736 } 1736 }
1737 1737
1738 Color CompositedDeprecatedPaintLayerMapping::layoutObjectBackgroundColor() const 1738 Color CompositedDeprecatedPaintLayerMapping::layoutObjectBackgroundColor() const
1739 { 1739 {
1740 LayoutObject* backgroundLayoutObject = layoutObject(); 1740 return layoutObject()->resolveColor(CSSPropertyBackgroundColor);
1741 if (backgroundLayoutObject->isDocumentElement())
1742 backgroundLayoutObject = backgroundLayoutObject->layoutObjectForRootBack ground();
1743
1744 return backgroundLayoutObject->resolveColor(CSSPropertyBackgroundColor);
1745 } 1741 }
1746 1742
1747 void CompositedDeprecatedPaintLayerMapping::updateBackgroundColor() 1743 void CompositedDeprecatedPaintLayerMapping::updateBackgroundColor()
1748 { 1744 {
1749 m_graphicsLayer->setBackgroundColor(layoutObjectBackgroundColor()); 1745 m_graphicsLayer->setBackgroundColor(layoutObjectBackgroundColor());
1750 } 1746 }
1751 1747
1752 bool CompositedDeprecatedPaintLayerMapping::paintsChildren() const 1748 bool CompositedDeprecatedPaintLayerMapping::paintsChildren() const
1753 { 1749 {
1754 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildLayou tObjects()) 1750 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildLayou tObjects())
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2338 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2343 name = "Scrolling Block Selection Layer"; 2339 name = "Scrolling Block Selection Layer";
2344 } else { 2340 } else {
2345 ASSERT_NOT_REACHED(); 2341 ASSERT_NOT_REACHED();
2346 } 2342 }
2347 2343
2348 return name; 2344 return name;
2349 } 2345 }
2350 2346
2351 } // namespace blink 2347 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698