| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()) { | 427 if (m_box.get() != other.m_box.get()) { |
| 428 if (m_box->width() != other.m_box->width() | |
| 429 || m_box->minWidth() != other.m_box->minWidth() | |
| 430 || m_box->maxWidth() != other.m_box->maxWidth() | |
| 431 || m_box->height() != other.m_box->height() | |
| 432 || m_box->minHeight() != other.m_box->minHeight() | |
| 433 || m_box->maxHeight() != other.m_box->maxHeight()) | |
| 434 return true; | |
| 435 | |
| 436 if (m_box->verticalAlign() != other.m_box->verticalAlign()) | 428 if (m_box->verticalAlign() != other.m_box->verticalAlign()) |
| 437 return true; | 429 return true; |
| 438 | 430 |
| 439 if (m_box->boxSizing() != other.m_box->boxSizing()) | 431 if (m_box->boxSizing() != other.m_box->boxSizing()) |
| 440 return true; | 432 return true; |
| 441 } | 433 } |
| 442 | 434 |
| 443 if (surround.get() != other.surround.get()) { | 435 if (surround.get() != other.surround.get()) { |
| 444 if (surround->margin != other.surround->margin) | 436 if (surround->margin != other.surround->margin) |
| 445 return true; | 437 return true; |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 return true; | 601 return true; |
| 610 } | 602 } |
| 611 | 603 |
| 612 // Movement of non-static-positioned object is special cased in RenderStyle:
:visualInvalidationDiff(). | 604 // Movement of non-static-positioned object is special cased in RenderStyle:
:visualInvalidationDiff(). |
| 613 | 605 |
| 614 return false; | 606 return false; |
| 615 } | 607 } |
| 616 | 608 |
| 617 bool RenderStyle::diffNeedsFullLayout(const RenderStyle& other) const | 609 bool RenderStyle::diffNeedsFullLayout(const RenderStyle& other) const |
| 618 { | 610 { |
| 611 if (m_box.get() != other.m_box.get()) { |
| 612 if (m_box->width() != other.m_box->width() |
| 613 || m_box->minWidth() != other.m_box->minWidth() |
| 614 || m_box->maxWidth() != other.m_box->maxWidth() |
| 615 || m_box->height() != other.m_box->height() |
| 616 || m_box->minHeight() != other.m_box->minHeight() |
| 617 || m_box->maxHeight() != other.m_box->maxHeight()) |
| 618 return true; |
| 619 } |
| 620 |
| 619 return false; | 621 return false; |
| 620 } | 622 } |
| 621 | 623 |
| 622 bool RenderStyle::diffNeedsRepaintLayer(const RenderStyle& other) const | 624 bool RenderStyle::diffNeedsRepaintLayer(const RenderStyle& other) const |
| 623 { | 625 { |
| 624 if (position() != StaticPosition && (visual->clip != other.visual->clip || v
isual->hasClip != other.visual->hasClip)) | 626 if (position() != StaticPosition && (visual->clip != other.visual->clip || v
isual->hasClip != other.visual->hasClip)) |
| 625 return true; | 627 return true; |
| 626 | 628 |
| 627 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { | 629 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { |
| 628 if (RuntimeEnabledFeatures::cssCompositingEnabled() | 630 if (RuntimeEnabledFeatures::cssCompositingEnabled() |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 // right | 1709 // right |
| 1708 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1710 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1709 if (radiiSum > rect.height()) | 1711 if (radiiSum > rect.height()) |
| 1710 factor = std::min(rect.height() / radiiSum, factor); | 1712 factor = std::min(rect.height() / radiiSum, factor); |
| 1711 | 1713 |
| 1712 ASSERT(factor <= 1); | 1714 ASSERT(factor <= 1); |
| 1713 return factor; | 1715 return factor; |
| 1714 } | 1716 } |
| 1715 | 1717 |
| 1716 } // namespace WebCore | 1718 } // namespace WebCore |
| OLD | NEW |