Chromium Code Reviews| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 (surround.get() != other.surround.get()) { | 425 if (surround.get() != other.surround.get()) { |
|
Julien - ping for review
2014/06/29 01:20:32
There is only border checks in this branch so I wo
Xianzhu
2014/06/30 22:30:34
If 'surround' object is shared between the old sty
| |
| 426 if (surround->margin != other.surround->margin) | |
| 427 return true; | |
| 428 | |
| 429 if (surround->padding != other.surround->padding) | |
| 430 return true; | |
| 431 | |
| 432 // If our border widths change, then we need to layout. Other changes to borders only necessitate a repaint. | 426 // If our border widths change, then we need to layout. Other changes to borders only necessitate a repaint. |
| 433 if (borderLeftWidth() != other.borderLeftWidth() | 427 if (borderLeftWidth() != other.borderLeftWidth() |
| 434 || borderTopWidth() != other.borderTopWidth() | 428 || borderTopWidth() != other.borderTopWidth() |
| 435 || borderBottomWidth() != other.borderBottomWidth() | 429 || borderBottomWidth() != other.borderBottomWidth() |
| 436 || borderRightWidth() != other.borderRightWidth()) | 430 || borderRightWidth() != other.borderRightWidth()) |
| 437 return true; | 431 return true; |
| 438 } | 432 } |
| 439 | 433 |
| 440 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { | 434 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { |
| 441 if (rareNonInheritedData->m_appearance != other.rareNonInheritedData->m_ appearance | 435 if (rareNonInheritedData->m_appearance != other.rareNonInheritedData->m_ appearance |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 609 if (m_box->verticalAlign() != other.m_box->verticalAlign()) | 603 if (m_box->verticalAlign() != other.m_box->verticalAlign()) |
| 610 return true; | 604 return true; |
| 611 | 605 |
| 612 if (m_box->boxSizing() != other.m_box->boxSizing()) | 606 if (m_box->boxSizing() != other.m_box->boxSizing()) |
| 613 return true; | 607 return true; |
| 614 } | 608 } |
| 615 | 609 |
| 616 if (noninherited_flags._vertical_align != other.noninherited_flags._vertical _align) | 610 if (noninherited_flags._vertical_align != other.noninherited_flags._vertical _align) |
| 617 return true; | 611 return true; |
| 618 | 612 |
| 613 if (surround.get() != other.surround.get()) { | |
|
Julien - ping for review
2014/06/29 01:20:32
Will this work correctly if we have a background-c
Xianzhu
2014/06/30 22:30:34
Yes. Border size change will still trigger a full
| |
| 614 if (surround->margin != other.surround->margin) | |
| 615 return true; | |
| 616 | |
| 617 if (surround->padding != other.surround->padding) | |
| 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 |