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

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

Issue 312193004: Don't force full repaint on size change in style (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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) 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 else if (deltaTop < 0) 1741 else if (deltaTop < 0)
1742 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds.x( ), newBounds.y(), newBounds.width(), -deltaTop), invalidationReason); 1742 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds.x( ), newBounds.y(), newBounds.width(), -deltaTop), invalidationReason);
1743 1743
1744 LayoutUnit deltaBottom = newBounds.maxY() - oldBounds.maxY(); 1744 LayoutUnit deltaBottom = newBounds.maxY() - oldBounds.maxY();
1745 if (deltaBottom > 0) 1745 if (deltaBottom > 0)
1746 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds.x( ), oldBounds.maxY(), newBounds.width(), deltaBottom), invalidationReason); 1746 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBounds.x( ), oldBounds.maxY(), newBounds.width(), deltaBottom), invalidationReason);
1747 else if (deltaBottom < 0) 1747 else if (deltaBottom < 0)
1748 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds.x( ), newBounds.maxY(), oldBounds.width(), -deltaBottom), invalidationReason); 1748 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds.x( ), newBounds.maxY(), oldBounds.width(), -deltaBottom), invalidationReason);
1749 1749
1750 // FIXME: This is a limitation of our visual overflow being a single rectang le. 1750 // FIXME: This is a limitation of our visual overflow being a single rectang le.
1751 if (!style()->boxShadow() && !style()->hasBorderImageOutsets() && !style()-> hasOutline()) 1751 if (!style()->hasBorder() && !style()->boxShadow() && !style()->hasBorderIma geOutsets() && !style()->hasOutline())
Julien - ping for review 2014/06/11 17:53:24 The border does not generate visual overflow and i
Xianzhu 2014/06/16 16:25:29 For example, when an object with border is increas
Julien - ping for review 2014/06/16 20:04:24 OK, I really think we should include the border in
Xianzhu 2014/06/16 20:49:16 I had tried to modify regular invalidation code, b
1752 return false; 1752 return false;
1753 1753
1754 // We didn't move, but we did change size. Invalidate the delta, which will consist of possibly 1754 // We didn't move, but we did change size. Invalidate the delta, which will consist of possibly
1755 // two rectangles (but typically only one). 1755 // two rectangles (but typically only one).
1756 RenderStyle* outlineStyle = outlineStyleForRepaint(); 1756 RenderStyle* outlineStyle = outlineStyleForRepaint();
1757 LayoutUnit outlineWidth = outlineStyle->outlineSize(); 1757 LayoutUnit outlineWidth = outlineStyle->outlineSize();
1758 LayoutBoxExtent insetShadowExtent = style()->getBoxShadowInsetExtent(); 1758 LayoutBoxExtent insetShadowExtent = style()->getBoxShadowInsetExtent();
1759 LayoutUnit width = absoluteValue(newBounds.width() - oldBounds.width()); 1759 LayoutUnit width = absoluteValue(newBounds.width() - oldBounds.width());
1760 if (width) { 1760 if (width) {
1761 LayoutUnit shadowLeft; 1761 LayoutUnit shadowLeft;
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
3557 { 3557 {
3558 if (object1) { 3558 if (object1) {
3559 const WebCore::RenderObject* root = object1; 3559 const WebCore::RenderObject* root = object1;
3560 while (root->parent()) 3560 while (root->parent())
3561 root = root->parent(); 3561 root = root->parent();
3562 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3562 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3563 } 3563 }
3564 } 3564 }
3565 3565
3566 #endif 3566 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/window-resize-viewport-percent-expected.txt ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698