| OLD | NEW |
| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 } | 417 } |
| 418 | 418 |
| 419 bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const | 419 bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const |
| 420 { | 420 { |
| 421 // FIXME: Not all cases in this method need both full layout and repaint. | 421 // FIXME: Not all cases in this method need both full layout and repaint. |
| 422 // Should move cases into diffNeedsFullLayout() if | 422 // Should move cases into diffNeedsFullLayout() if |
| 423 // - don't need repaint at all; | 423 // - don't need repaint at all; |
| 424 // - or the renderer knows how to exactly repaint caused by the layout chang
e | 424 // - or the renderer knows how to exactly repaint caused by the layout chang
e |
| 425 // instead of forced full repaint. | 425 // instead of forced full repaint. |
| 426 | 426 |
| 427 if (m_box.get() != other.m_box.get()) { | |
| 428 if (m_box->boxSizing() != other.m_box->boxSizing()) | |
| 429 return true; | |
| 430 } | |
| 431 | |
| 432 if (surround.get() != other.surround.get()) { | 427 if (surround.get() != other.surround.get()) { |
| 433 if (surround->margin != other.surround->margin) | 428 if (surround->margin != other.surround->margin) |
| 434 return true; | 429 return true; |
| 435 | 430 |
| 436 if (surround->padding != other.surround->padding) | 431 if (surround->padding != other.surround->padding) |
| 437 return true; | 432 return true; |
| 438 | 433 |
| 439 // If our border widths change, then we need to layout. Other changes to
borders only necessitate a repaint. | 434 // If our border widths change, then we need to layout. Other changes to
borders only necessitate a repaint. |
| 440 if (borderLeftWidth() != other.borderLeftWidth() | 435 if (borderLeftWidth() != other.borderLeftWidth() |
| 441 || borderTopWidth() != other.borderTopWidth() | 436 || borderTopWidth() != other.borderTopWidth() |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 if (m_box->width() != other.m_box->width() | 603 if (m_box->width() != other.m_box->width() |
| 609 || m_box->minWidth() != other.m_box->minWidth() | 604 || m_box->minWidth() != other.m_box->minWidth() |
| 610 || m_box->maxWidth() != other.m_box->maxWidth() | 605 || m_box->maxWidth() != other.m_box->maxWidth() |
| 611 || m_box->height() != other.m_box->height() | 606 || m_box->height() != other.m_box->height() |
| 612 || m_box->minHeight() != other.m_box->minHeight() | 607 || m_box->minHeight() != other.m_box->minHeight() |
| 613 || m_box->maxHeight() != other.m_box->maxHeight()) | 608 || m_box->maxHeight() != other.m_box->maxHeight()) |
| 614 return true; | 609 return true; |
| 615 | 610 |
| 616 if (m_box->verticalAlign() != other.m_box->verticalAlign()) | 611 if (m_box->verticalAlign() != other.m_box->verticalAlign()) |
| 617 return true; | 612 return true; |
| 613 |
| 614 if (m_box->boxSizing() != other.m_box->boxSizing()) |
| 615 return true; |
| 618 } | 616 } |
| 619 | 617 |
| 620 if (noninherited_flags._vertical_align != other.noninherited_flags._vertical
_align) | 618 if (noninherited_flags._vertical_align != other.noninherited_flags._vertical
_align) |
| 621 return true; | 619 return true; |
| 622 | 620 |
| 623 return false; | 621 return false; |
| 624 } | 622 } |
| 625 | 623 |
| 626 bool RenderStyle::diffNeedsRepaintLayer(const RenderStyle& other) const | 624 bool RenderStyle::diffNeedsRepaintLayer(const RenderStyle& other) const |
| 627 { | 625 { |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1711 // right | 1709 // right |
| 1712 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1710 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1713 if (radiiSum > rect.height()) | 1711 if (radiiSum > rect.height()) |
| 1714 factor = std::min(rect.height() / radiiSum, factor); | 1712 factor = std::min(rect.height() / radiiSum, factor); |
| 1715 | 1713 |
| 1716 ASSERT(factor <= 1); | 1714 ASSERT(factor <= 1); |
| 1717 return factor; | 1715 return factor; |
| 1718 } | 1716 } |
| 1719 | 1717 |
| 1720 } // namespace WebCore | 1718 } // namespace WebCore |
| OLD | NEW |