| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 return StyleDifferenceLayout; | 598 return StyleDifferenceLayout; |
| 599 } | 599 } |
| 600 | 600 |
| 601 StyleDifferenceLegacy repaintDifference = repaintOnlyDiff(other, changedCont
extSensitiveProperties); | 601 StyleDifferenceLegacy repaintDifference = repaintOnlyDiff(other, changedCont
extSensitiveProperties); |
| 602 ASSERT(repaintDifference <= StyleDifferenceRepaintLayer); | 602 ASSERT(repaintDifference <= StyleDifferenceRepaintLayer); |
| 603 return repaintDifference; | 603 return repaintDifference; |
| 604 } | 604 } |
| 605 | 605 |
| 606 StyleDifferenceLegacy RenderStyle::repaintOnlyDiff(const RenderStyle& other, uns
igned& changedContextSensitiveProperties) const | 606 StyleDifferenceLegacy RenderStyle::repaintOnlyDiff(const RenderStyle& other, uns
igned& changedContextSensitiveProperties) const |
| 607 { | 607 { |
| 608 // FIXME: The condition for zIndex may be incorrect or unnecessary. | 608 if (position() != StaticPosition && (m_box->zIndex() != other.m_box->zIndex(
) || m_box->hasAutoZIndex() != other.m_box->hasAutoZIndex() |
| 609 // See StyleAdjuster::adjustRenderStyle() for the conditions that zIndex is
applicable. | 609 || visual->clip != other.visual->clip || visual->hasClip != other.visual
->hasClip)) |
| 610 if (position() != StaticPosition) { | 610 return StyleDifferenceRepaintLayer; |
| 611 if (m_box->zIndex() != other.m_box->zIndex() || m_box->hasAutoZIndex() !
= other.m_box->hasAutoZIndex()) | |
| 612 changedContextSensitiveProperties |= ContextSensitivePropertyZIndex; | |
| 613 if (visual->clip != other.visual->clip || visual->hasClip != other.visua
l->hasClip) | |
| 614 return StyleDifferenceRepaintLayer; | |
| 615 } | |
| 616 | 611 |
| 617 if (RuntimeEnabledFeatures::cssCompositingEnabled() && (rareNonInheritedData
->m_effectiveBlendMode != other.rareNonInheritedData->m_effectiveBlendMode | 612 if (RuntimeEnabledFeatures::cssCompositingEnabled() && (rareNonInheritedData
->m_effectiveBlendMode != other.rareNonInheritedData->m_effectiveBlendMode |
| 618 || rareNonInheritedData->m_isolation != other.rareNonInheritedData->m_is
olation)) | 613 || rareNonInheritedData->m_isolation != other.rareNonInheritedData->m_is
olation)) |
| 619 return StyleDifferenceRepaintLayer; | 614 return StyleDifferenceRepaintLayer; |
| 620 | 615 |
| 621 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity) { | 616 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity) { |
| 622 // Don't return early here; instead take note of the type of change, | 617 // Don't return early here; instead take note of the type of change, |
| 623 // and deal with it when looking at compositing. | 618 // and deal with it when looking at compositing. |
| 624 changedContextSensitiveProperties |= ContextSensitivePropertyOpacity; | 619 changedContextSensitiveProperties |= ContextSensitivePropertyOpacity; |
| 625 } | 620 } |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 // right | 1647 // right |
| 1653 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1648 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1654 if (radiiSum > rect.height()) | 1649 if (radiiSum > rect.height()) |
| 1655 factor = std::min(rect.height() / radiiSum, factor); | 1650 factor = std::min(rect.height() / radiiSum, factor); |
| 1656 | 1651 |
| 1657 ASSERT(factor <= 1); | 1652 ASSERT(factor <= 1); |
| 1658 return factor; | 1653 return factor; |
| 1659 } | 1654 } |
| 1660 | 1655 |
| 1661 } // namespace WebCore | 1656 } // namespace WebCore |
| OLD | NEW |