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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 348493003: Don't force full invalidation on box-sizing change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test expectation 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
« no previous file with comments | « LayoutTests/fast/repaint/box-sizing-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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const 417 bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const
418 { 418 {
419 // FIXME: Not all cases in this method need both full layout and repaint. 419 // FIXME: Not all cases in this method need both full layout and repaint.
420 // Should move cases into diffNeedsFullLayout() if 420 // Should move cases into diffNeedsFullLayout() if
421 // - don't need repaint at all; 421 // - don't need repaint at all;
422 // - or the renderer knows how to exactly repaint caused by the layout chang e 422 // - or the renderer knows how to exactly repaint caused by the layout chang e
423 // instead of forced full repaint. 423 // instead of forced full repaint.
424 424
425 if (m_box.get() != other.m_box.get()) {
426 if (m_box->boxSizing() != other.m_box->boxSizing())
427 return true;
428 }
429
430 if (surround.get() != other.surround.get()) { 425 if (surround.get() != other.surround.get()) {
431 if (surround->margin != other.surround->margin) 426 if (surround->margin != other.surround->margin)
432 return true; 427 return true;
433 428
434 if (surround->padding != other.surround->padding) 429 if (surround->padding != other.surround->padding)
435 return true; 430 return true;
436 431
437 // If our border widths change, then we need to layout. Other changes to borders only necessitate a repaint. 432 // If our border widths change, then we need to layout. Other changes to borders only necessitate a repaint.
438 if (borderLeftWidth() != other.borderLeftWidth() 433 if (borderLeftWidth() != other.borderLeftWidth()
439 || borderTopWidth() != other.borderTopWidth() 434 || borderTopWidth() != other.borderTopWidth()
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 if (m_box->width() != other.m_box->width() 601 if (m_box->width() != other.m_box->width()
607 || m_box->minWidth() != other.m_box->minWidth() 602 || m_box->minWidth() != other.m_box->minWidth()
608 || m_box->maxWidth() != other.m_box->maxWidth() 603 || m_box->maxWidth() != other.m_box->maxWidth()
609 || m_box->height() != other.m_box->height() 604 || m_box->height() != other.m_box->height()
610 || m_box->minHeight() != other.m_box->minHeight() 605 || m_box->minHeight() != other.m_box->minHeight()
611 || m_box->maxHeight() != other.m_box->maxHeight()) 606 || m_box->maxHeight() != other.m_box->maxHeight())
612 return true; 607 return true;
613 608
614 if (m_box->verticalAlign() != other.m_box->verticalAlign()) 609 if (m_box->verticalAlign() != other.m_box->verticalAlign())
615 return true; 610 return true;
611
612 if (m_box->boxSizing() != other.m_box->boxSizing())
613 return true;
616 } 614 }
617 615
618 if (noninherited_flags._vertical_align != other.noninherited_flags._vertical _align) 616 if (noninherited_flags._vertical_align != other.noninherited_flags._vertical _align)
619 return true; 617 return true;
620 618
621 return false; 619 return false;
622 } 620 }
623 621
624 bool RenderStyle::diffNeedsRepaintLayer(const RenderStyle& other) const 622 bool RenderStyle::diffNeedsRepaintLayer(const RenderStyle& other) const
625 { 623 {
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 // right 1707 // right
1710 radiiSum = radii.topRight().height() + radii.bottomRight().height(); 1708 radiiSum = radii.topRight().height() + radii.bottomRight().height();
1711 if (radiiSum > rect.height()) 1709 if (radiiSum > rect.height())
1712 factor = std::min(rect.height() / radiiSum, factor); 1710 factor = std::min(rect.height() / radiiSum, factor);
1713 1711
1714 ASSERT(factor <= 1); 1712 ASSERT(factor <= 1);
1715 return factor; 1713 return factor;
1716 } 1714 }
1717 1715
1718 } // namespace WebCore 1716 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/box-sizing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698