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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 615 |
616 if (surround->padding != other.surround->padding) | 616 if (surround->padding != other.surround->padding) |
617 return true; | 617 return true; |
618 } | 618 } |
619 | 619 |
620 return false; | 620 return false; |
621 } | 621 } |
622 | 622 |
623 bool RenderStyle::diffNeedsPaintInvalidationLayer(const RenderStyle& other) cons
t | 623 bool RenderStyle::diffNeedsPaintInvalidationLayer(const RenderStyle& other) cons
t |
624 { | 624 { |
625 if (position() != StaticPosition && (visual->clip != other.visual->clip || v
isual->hasClip != other.visual->hasClip)) | 625 if (position() != StaticPosition && (visual->clip != other.visual->clip || v
isual->hasAutoClip != other.visual->hasAutoClip)) |
626 return true; | 626 return true; |
627 | 627 |
628 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { | 628 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { |
629 if (RuntimeEnabledFeatures::cssCompositingEnabled() | 629 if (RuntimeEnabledFeatures::cssCompositingEnabled() |
630 && (rareNonInheritedData->m_effectiveBlendMode != other.rareNonInher
itedData->m_effectiveBlendMode | 630 && (rareNonInheritedData->m_effectiveBlendMode != other.rareNonInher
itedData->m_effectiveBlendMode |
631 || rareNonInheritedData->m_isolation != other.rareNonInheritedDa
ta->m_isolation)) | 631 || rareNonInheritedData->m_isolation != other.rareNonInheritedDa
ta->m_isolation)) |
632 return true; | 632 return true; |
633 | 633 |
634 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask | 634 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask |
635 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat
a->m_maskBoxImage) | 635 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat
a->m_maskBoxImage) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 if (rareInheritedData->textFillColor() != other.rareInheritedData->t
extFillColor() | 698 if (rareInheritedData->textFillColor() != other.rareInheritedData->t
extFillColor() |
699 || rareInheritedData->textStrokeColor() != other.rareInheritedDa
ta->textStrokeColor() | 699 || rareInheritedData->textStrokeColor() != other.rareInheritedDa
ta->textStrokeColor() |
700 || rareInheritedData->textEmphasisColor() != other.rareInherited
Data->textEmphasisColor() | 700 || rareInheritedData->textEmphasisColor() != other.rareInherited
Data->textEmphasisColor() |
701 || rareInheritedData->textEmphasisFill != other.rareInheritedDat
a->textEmphasisFill | 701 || rareInheritedData->textEmphasisFill != other.rareInheritedDat
a->textEmphasisFill |
702 || rareInheritedData->appliedTextDecorations != other.rareInheri
tedData->appliedTextDecorations) | 702 || rareInheritedData->appliedTextDecorations != other.rareInheri
tedData->appliedTextDecorations) |
703 diff.setTextOrColorChanged(); | 703 diff.setTextOrColorChanged(); |
704 } | 704 } |
705 } | 705 } |
706 } | 706 } |
707 | 707 |
708 void RenderStyle::setClip(const Length& top, const Length& right, const Length&
bottom, const Length& left) | |
709 { | |
710 StyleVisualData* data = visual.access(); | |
711 data->clip.m_top = top; | |
712 data->clip.m_right = right; | |
713 data->clip.m_bottom = bottom; | |
714 data->clip.m_left = left; | |
715 } | |
716 | |
717 void RenderStyle::addCursor(PassRefPtr<StyleImage> image, const IntPoint& hotSpo
t) | 708 void RenderStyle::addCursor(PassRefPtr<StyleImage> image, const IntPoint& hotSpo
t) |
718 { | 709 { |
719 if (!rareInheritedData.access()->cursorData) | 710 if (!rareInheritedData.access()->cursorData) |
720 rareInheritedData.access()->cursorData = CursorList::create(); | 711 rareInheritedData.access()->cursorData = CursorList::create(); |
721 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpot)); | 712 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpot)); |
722 } | 713 } |
723 | 714 |
724 void RenderStyle::setCursorList(PassRefPtr<CursorList> other) | 715 void RenderStyle::setCursorList(PassRefPtr<CursorList> other) |
725 { | 716 { |
726 rareInheritedData.access()->cursorData = other; | 717 rareInheritedData.access()->cursorData = other; |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 // right | 1690 // right |
1700 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1691 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
1701 if (radiiSum > rect.height()) | 1692 if (radiiSum > rect.height()) |
1702 factor = std::min(rect.height() / radiiSum, factor); | 1693 factor = std::min(rect.height() / radiiSum, factor); |
1703 | 1694 |
1704 ASSERT(factor <= 1); | 1695 ASSERT(factor <= 1); |
1705 return factor; | 1696 return factor; |
1706 } | 1697 } |
1707 | 1698 |
1708 } // namespace blink | 1699 } // namespace blink |
OLD | NEW |