| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 602 |
| 603 // FIXME: We would like to use SimplifiedLayout for relative positio
ning, but we can't quite do that yet. | 603 // FIXME: We would like to use SimplifiedLayout for relative positio
ning, but we can't quite do that yet. |
| 604 // We need to make sure SimplifiedLayout can operate correctly on Re
nderInlines (we will need | 604 // We need to make sure SimplifiedLayout can operate correctly on Re
nderInlines (we will need |
| 605 // to add a selfNeedsSimplifiedLayout bit in order to not get confus
ed and taint every line). | 605 // to add a selfNeedsSimplifiedLayout bit in order to not get confus
ed and taint every line). |
| 606 return StyleDifferenceLayout; | 606 return StyleDifferenceLayout; |
| 607 } else if (m_box->zIndex() != other->m_box->zIndex() || m_box->hasAutoZI
ndex() != other->m_box->hasAutoZIndex() | 607 } else if (m_box->zIndex() != other->m_box->zIndex() || m_box->hasAutoZI
ndex() != other->m_box->hasAutoZIndex() |
| 608 || visual->clip != other->visual->clip || visual->hasClip != ot
her->visual->hasClip) | 608 || visual->clip != other->visual->clip || visual->hasClip != ot
her->visual->hasClip) |
| 609 return StyleDifferenceRepaintLayer; | 609 return StyleDifferenceRepaintLayer; |
| 610 } | 610 } |
| 611 | 611 |
| 612 #if ENABLE(CSS_COMPOSITING) | 612 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 613 if (rareNonInheritedData->m_effectiveBlendMode != other->rareNonInheritedDat
a->m_effectiveBlendMode) | 613 if (rareNonInheritedData->m_effectiveBlendMode != other->rareNonInherite
dData->m_effectiveBlendMode) |
| 614 return StyleDifferenceRepaintLayer; | 614 return StyleDifferenceRepaintLayer; |
| 615 #endif | |
| 616 | 615 |
| 617 if (rareNonInheritedData->opacity != other->rareNonInheritedData->opacity) { | 616 if (rareNonInheritedData->opacity != other->rareNonInheritedData->opacity) { |
| 618 // 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, |
| 619 // and deal with it when looking at compositing. | 618 // and deal with it when looking at compositing. |
| 620 changedContextSensitiveProperties |= ContextSensitivePropertyOpacity; | 619 changedContextSensitiveProperties |= ContextSensitivePropertyOpacity; |
| 621 } | 620 } |
| 622 | 621 |
| 623 if (rareNonInheritedData->m_filter.get() != other->rareNonInheritedData->m_f
ilter.get() | 622 if (rareNonInheritedData->m_filter.get() != other->rareNonInheritedData->m_f
ilter.get() |
| 624 && *rareNonInheritedData->m_filter.get() != *other->rareNonInheritedData
->m_filter.get()) { | 623 && *rareNonInheritedData->m_filter.get() != *other->rareNonInheritedData
->m_filter.get()) { |
| 625 // Don't return early here; instead take note of the type of change, | 624 // Don't return early here; instead take note of the type of change, |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 785 |
| 787 void RenderStyle::setContent(QuoteType quote, bool add) | 786 void RenderStyle::setContent(QuoteType quote, bool add) |
| 788 { | 787 { |
| 789 if (add) { | 788 if (add) { |
| 790 appendContent(ContentData::create(quote)); | 789 appendContent(ContentData::create(quote)); |
| 791 return; | 790 return; |
| 792 } | 791 } |
| 793 | 792 |
| 794 rareNonInheritedData.access()->m_content = ContentData::create(quote); | 793 rareNonInheritedData.access()->m_content = ContentData::create(quote); |
| 795 } | 794 } |
| 796 | 795 |
| 796 BlendMode RenderStyle::blendMode() const |
| 797 { |
| 798 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 799 return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode
); |
| 800 return BlendModeNormal; |
| 801 } |
| 802 |
| 803 void RenderStyle::setBlendMode(BlendMode v) |
| 804 { |
| 805 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 806 rareNonInheritedData.access()->m_effectiveBlendMode = v; |
| 807 } |
| 808 |
| 809 bool RenderStyle::hasBlendMode() const |
| 810 { |
| 811 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 812 return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode
) != BlendModeNormal; |
| 813 return false; |
| 814 } |
| 815 |
| 797 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) | 816 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr
ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) |
| 798 { | 817 { |
| 799 // transform-origin brackets the transform with translate operations. | 818 // transform-origin brackets the transform with translate operations. |
| 800 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant | 819 // Optimize for the case where the only transform is a translation, since th
e transform-origin is irrelevant |
| 801 // in that case. | 820 // in that case. |
| 802 if (applyOrigin != RenderStyle::IncludeTransformOrigin) | 821 if (applyOrigin != RenderStyle::IncludeTransformOrigin) |
| 803 return false; | 822 return false; |
| 804 | 823 |
| 805 unsigned size = transformOperations.size(); | 824 unsigned size = transformOperations.size(); |
| 806 for (unsigned i = 0; i < size; ++i) { | 825 for (unsigned i = 0; i < size; ++i) { |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 info.addMember(inherited, "inherited"); | 1602 info.addMember(inherited, "inherited"); |
| 1584 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); | 1603 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); |
| 1585 #if ENABLE(SVG) | 1604 #if ENABLE(SVG) |
| 1586 info.addMember(m_svgStyle, "svgStyle"); | 1605 info.addMember(m_svgStyle, "svgStyle"); |
| 1587 #endif | 1606 #endif |
| 1588 info.addMember(inherited_flags, "inherited_flags"); | 1607 info.addMember(inherited_flags, "inherited_flags"); |
| 1589 info.addMember(noninherited_flags, "noninherited_flags"); | 1608 info.addMember(noninherited_flags, "noninherited_flags"); |
| 1590 } | 1609 } |
| 1591 | 1610 |
| 1592 } // namespace WebCore | 1611 } // namespace WebCore |
| OLD | NEW |