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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1145993002: Refactor root element background painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert to patchset 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index 7dfacf819fc7be405711d7b918c87b89a3336161..c4192276a15c74ab18260f6504700cf9d17802f5 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -2300,23 +2300,6 @@ bool LayoutObject::isRooted() const
return false;
}
-LayoutObject* LayoutObject::layoutObjectForRootBackground()
-{
- ASSERT(isDocumentElement());
- if (!hasBackground() && isHTMLHtmlElement(node())) {
- // Locate the <body> element using the DOM. This is easier than trying
- // to crawl around a layout tree with potential :before/:after content and
- // anonymous blocks created by inline <body> tags etc. We can locate the <body>
- // layout object very easily via the DOM.
- HTMLElement* body = document().body();
- LayoutObject* bodyObject = isHTMLBodyElement(body) ? body->layoutObject() : 0;
- if (bodyObject)
- return bodyObject;
- }
-
- return this;
-}
-
RespectImageOrientationEnum LayoutObject::shouldRespectImageOrientation() const
{
// Respect the image's orientation if it's being used as a full-page image or it's
@@ -3169,15 +3152,6 @@ void LayoutObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas
if (reason == PaintInvalidationFull)
reason = documentLifecycleBasedPaintInvalidationReason(document().lifecycle());
m_bitfields.setFullPaintInvalidationReason(reason);
-
- if (RuntimeEnabledFeatures::slimmingPaintEnabled() && isBody()) {
- // The rootObject paints view's background. We need to invalidate it when
- // view's background changes because of change of body's style.
- // FIXME: The condition is broader than needed for simplicity.
- // Might remove this when fixing crbug.com/475115.
- if (LayoutObject* rootObject = document().documentElement()->layoutObject())
- rootObject->setShouldDoFullPaintInvalidation();
- }
}
if (!isUpgradingDelayedFullToFull) {

Powered by Google App Engine
This is Rietveld 408576698