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

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

Issue 192863004: Use outlineBox if we have an outline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Mac test (neutral change => same amount of invalidation but in one instead of 2) Created 6 years, 9 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
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('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) 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 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 // If a border-radius exists and width/height is smaller than 1507 // If a border-radius exists and width/height is smaller than
1508 // radius width/height, we cannot use delta-repaint. 1508 // radius width/height, we cannot use delta-repaint.
1509 RoundedRect oldRoundedRect = style()->getRoundedBorderFor(oldBounds); 1509 RoundedRect oldRoundedRect = style()->getRoundedBorderFor(oldBounds);
1510 RoundedRect newRoundedRect = style()->getRoundedBorderFor(newBounds); 1510 RoundedRect newRoundedRect = style()->getRoundedBorderFor(newBounds);
1511 fullRepaint = oldRoundedRect.radii() != newRoundedRect.radii(); 1511 fullRepaint = oldRoundedRect.radii() != newRoundedRect.radii();
1512 } 1512 }
1513 if (!fullRepaint) { 1513 if (!fullRepaint) {
1514 // This ASSERT fails due to animations. See https://bugs.webkit.org/sho w_bug.cgi?id=37048 1514 // This ASSERT fails due to animations. See https://bugs.webkit.org/sho w_bug.cgi?id=37048
1515 // ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBound sForRepaint(repaintContainer)); 1515 // ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBound sForRepaint(repaintContainer));
1516 newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBo undsForRepaint(repaintContainer); 1516 newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBo undsForRepaint(repaintContainer);
1517 if (newOutlineBox.location() != oldOutlineBox.location() || (mustRepaint BackgroundOrBorder() && (newBounds != oldBounds || newOutlineBox != oldOutlineBo x))) 1517
1518 if ((hasOutline() && newOutlineBox.location() != oldOutlineBox.location( ))
1519 || (mustRepaintBackgroundOrBorder() && (newBounds != oldBounds || (h asOutline() && newOutlineBox != oldOutlineBox))))
1518 fullRepaint = true; 1520 fullRepaint = true;
1519 } 1521 }
1520 1522
1523 // If there is no intersection between the old and the new bounds, invalidat ing
1524 // the difference is more expensive than just doing a full repaint.
1525 if (!fullRepaint && !newBounds.intersects(oldBounds))
1526 fullRepaint = true;
1527
1521 if (!repaintContainer) 1528 if (!repaintContainer)
1522 repaintContainer = v; 1529 repaintContainer = v;
1523 1530
1524 if (fullRepaint) { 1531 if (fullRepaint) {
1525 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds)); 1532 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(oldBounds));
1526 if (newBounds != oldBounds) 1533 if (newBounds != oldBounds)
1527 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBound s)); 1534 repaintUsingContainer(repaintContainer, pixelSnappedIntRect(newBound s));
1528 return true; 1535 return true;
1529 } 1536 }
1530 1537
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 { 3321 {
3315 if (object1) { 3322 if (object1) {
3316 const WebCore::RenderObject* root = object1; 3323 const WebCore::RenderObject* root = object1;
3317 while (root->parent()) 3324 while (root->parent())
3318 root = root->parent(); 3325 root = root->parent();
3319 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3326 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3320 } 3327 }
3321 } 3328 }
3322 3329
3323 #endif 3330 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698