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

Side by Side Diff: Source/WebCore/rendering/RenderBox.cpp

Issue 13465009: Merge 147127 "RenderBox::backgroundIsKnownToBeOpaqueInRect may b..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 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 | « LayoutTests/platform/chromium/compositing/contents-opaque/control-layer-expected.txt ('k') | no next file » | 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 1164
1165 bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c onst 1165 bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c onst
1166 { 1166 {
1167 if (isBody() && skipBodyBackground(this)) 1167 if (isBody() && skipBodyBackground(this))
1168 return false; 1168 return false;
1169 1169
1170 Color backgroundColor = style()->visitedDependentColor(CSSPropertyBackground Color); 1170 Color backgroundColor = style()->visitedDependentColor(CSSPropertyBackground Color);
1171 if (!backgroundColor.isValid() || backgroundColor.hasAlpha()) 1171 if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
1172 return false; 1172 return false;
1173 1173
1174 // If the element has appearance, it might be painted by theme.
1175 // We cannot be sure if theme paints the background opaque.
1176 // In this case it is safe to not assume opaqueness.
1177 // FIXME: May be ask theme if it paints opaque.
1178 if (style()->hasAppearance())
1179 return false;
1174 // FIXME: Check the opaqueness of background images. 1180 // FIXME: Check the opaqueness of background images.
1175 1181
1176 // FIXME: Use rounded rect if border radius is present. 1182 // FIXME: Use rounded rect if border radius is present.
1177 if (style()->hasBorderRadius()) 1183 if (style()->hasBorderRadius())
1178 return false; 1184 return false;
1179 // FIXME: The background color clip is defined by the last layer. 1185 // FIXME: The background color clip is defined by the last layer.
1180 if (style()->backgroundLayers()->next()) 1186 if (style()->backgroundLayers()->next())
1181 return false; 1187 return false;
1182 LayoutRect backgroundRect; 1188 LayoutRect backgroundRect;
1183 switch (style()->backgroundClip()) { 1189 switch (style()->backgroundClip()) {
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after
4582 4588
4583 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation) 4589 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation)
4584 { 4590 {
4585 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures); 4591 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures);
4586 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures); 4592 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures);
4587 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures); 4593 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures);
4588 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures); 4594 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures);
4589 } 4595 }
4590 4596
4591 } // namespace WebCore 4597 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/platform/chromium/compositing/contents-opaque/control-layer-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698