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