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

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

Issue 683373002: Invalidate the frame view when changing the background image of the document or body. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 1 month 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/frame/FrameView.cpp ('k') | Source/core/rendering/RenderView.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) 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 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 bool RenderBox::paintInvalidationLayerRectsForImage(WrappedImagePtr image, const FillLayer& layers, bool drawingBackground) 1277 bool RenderBox::paintInvalidationLayerRectsForImage(WrappedImagePtr image, const FillLayer& layers, bool drawingBackground)
1278 { 1278 {
1279 Vector<RenderObject*> layerRenderers; 1279 Vector<RenderObject*> layerRenderers;
1280 1280
1281 // A background of the body or document must extend to the total visible siz e of the document. This means the union of the 1281 // A background of the body or document must extend to the total visible siz e of the document. This means the union of the
1282 // view and document bounds, since it can be the case that the view is large r than the document and vice-versa. 1282 // view and document bounds, since it can be the case that the view is large r than the document and vice-versa.
1283 // http://dev.w3.org/csswg/css-backgrounds/#the-background 1283 // http://dev.w3.org/csswg/css-backgrounds/#the-background
1284 if (drawingBackground && (isDocumentElement() || (isBody() && !document().do cumentElement()->renderer()->hasBackground()))) { 1284 if (drawingBackground && (isDocumentElement() || (isBody() && !document().do cumentElement()->renderer()->hasBackground()))) {
1285 layerRenderers.append(document().documentElement()->renderer()); 1285 layerRenderers.append(document().documentElement()->renderer());
1286 layerRenderers.append(view()); 1286 layerRenderers.append(view());
1287 if (view()->frameView())
1288 view()->frameView()->setNeedsFullPaintInvalidation();
1287 } else { 1289 } else {
1288 layerRenderers.append(this); 1290 layerRenderers.append(this);
1289 } 1291 }
1290 for (const FillLayer* curLayer = &layers; curLayer; curLayer = curLayer->nex t()) { 1292 for (const FillLayer* curLayer = &layers; curLayer; curLayer = curLayer->nex t()) {
1291 if (curLayer->image() && image == curLayer->image()->data() && curLayer- >image()->canRender(*this, style()->effectiveZoom())) { 1293 if (curLayer->image() && image == curLayer->image()->data() && curLayer- >image()->canRender(*this, style()->effectiveZoom())) {
1292 for (RenderObject* layerRenderer : layerRenderers) 1294 for (RenderObject* layerRenderer : layerRenderers)
1293 layerRenderer->setShouldDoFullPaintInvalidation(); 1295 layerRenderer->setShouldDoFullPaintInvalidation();
1294 return true; 1296 return true;
1295 } 1297 }
1296 } 1298 }
(...skipping 3139 matching lines...) Expand 10 before | Expand all | Expand 10 after
4436 4438
4437 setLogicalTop(oldLogicalTop); 4439 setLogicalTop(oldLogicalTop);
4438 setLogicalWidth(oldLogicalWidth); 4440 setLogicalWidth(oldLogicalWidth);
4439 setMarginLeft(oldMarginLeft); 4441 setMarginLeft(oldMarginLeft);
4440 setMarginRight(oldMarginRight); 4442 setMarginRight(oldMarginRight);
4441 4443
4442 return borderBox; 4444 return borderBox;
4443 } 4445 }
4444 4446
4445 } // namespace blink 4447 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698