| 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 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/rendering/style/RenderStyle.h" | 27 #include "core/rendering/style/RenderStyle.h" |
| 28 #include "core/rendering/style/ShadowList.h" | 28 #include "core/rendering/style/ShadowList.h" |
| 29 #include "core/rendering/style/StyleFilterData.h" | 29 #include "core/rendering/style/StyleFilterData.h" |
| 30 #include "core/rendering/style/StyleTransformData.h" | 30 #include "core/rendering/style/StyleTransformData.h" |
| 31 #include "core/rendering/svg/ReferenceFilterBuilder.h" | 31 #include "core/rendering/svg/ReferenceFilterBuilder.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 StyleRareNonInheritedData::StyleRareNonInheritedData() | 35 StyleRareNonInheritedData::StyleRareNonInheritedData() |
| 36 : opacity(RenderStyle::initialOpacity()) | 36 : opacity(RenderStyle::initialOpacity()) |
| 37 , m_aspectRatioDenominator(RenderStyle::initialAspectRatioDenominator()) | |
| 38 , m_aspectRatioNumerator(RenderStyle::initialAspectRatioNumerator()) | |
| 39 , m_perspective(RenderStyle::initialPerspective()) | 37 , m_perspective(RenderStyle::initialPerspective()) |
| 40 , m_perspectiveOriginX(RenderStyle::initialPerspectiveOriginX()) | 38 , m_perspectiveOriginX(RenderStyle::initialPerspectiveOriginX()) |
| 41 , m_perspectiveOriginY(RenderStyle::initialPerspectiveOriginY()) | 39 , m_perspectiveOriginY(RenderStyle::initialPerspectiveOriginY()) |
| 42 , lineClamp(RenderStyle::initialLineClamp()) | 40 , lineClamp(RenderStyle::initialLineClamp()) |
| 43 , m_draggableRegionMode(DraggableRegionNone) | 41 , m_draggableRegionMode(DraggableRegionNone) |
| 44 , m_mask(MaskFillLayer, true) | 42 , m_mask(MaskFillLayer, true) |
| 45 , m_pageSize() | 43 , m_pageSize() |
| 46 , m_shapeOutside(RenderStyle::initialShapeOutside()) | 44 , m_shapeOutside(RenderStyle::initialShapeOutside()) |
| 47 , m_shapeMargin(RenderStyle::initialShapeMargin()) | 45 , m_shapeMargin(RenderStyle::initialShapeMargin()) |
| 48 , m_shapeImageThreshold(RenderStyle::initialShapeImageThreshold()) | 46 , m_shapeImageThreshold(RenderStyle::initialShapeImageThreshold()) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 74 , m_textCombine(RenderStyle::initialTextCombine()) | 72 , m_textCombine(RenderStyle::initialTextCombine()) |
| 75 , m_textDecorationStyle(RenderStyle::initialTextDecorationStyle()) | 73 , m_textDecorationStyle(RenderStyle::initialTextDecorationStyle()) |
| 76 , m_wrapFlow(RenderStyle::initialWrapFlow()) | 74 , m_wrapFlow(RenderStyle::initialWrapFlow()) |
| 77 , m_wrapThrough(RenderStyle::initialWrapThrough()) | 75 , m_wrapThrough(RenderStyle::initialWrapThrough()) |
| 78 , m_hasCurrentOpacityAnimation(false) | 76 , m_hasCurrentOpacityAnimation(false) |
| 79 , m_hasCurrentTransformAnimation(false) | 77 , m_hasCurrentTransformAnimation(false) |
| 80 , m_hasCurrentFilterAnimation(false) | 78 , m_hasCurrentFilterAnimation(false) |
| 81 , m_runningOpacityAnimationOnCompositor(false) | 79 , m_runningOpacityAnimationOnCompositor(false) |
| 82 , m_runningTransformAnimationOnCompositor(false) | 80 , m_runningTransformAnimationOnCompositor(false) |
| 83 , m_runningFilterAnimationOnCompositor(false) | 81 , m_runningFilterAnimationOnCompositor(false) |
| 84 , m_hasAspectRatio(false) | |
| 85 , m_effectiveBlendMode(RenderStyle::initialBlendMode()) | 82 , m_effectiveBlendMode(RenderStyle::initialBlendMode()) |
| 86 , m_touchAction(RenderStyle::initialTouchAction()) | 83 , m_touchAction(RenderStyle::initialTouchAction()) |
| 87 , m_objectFit(RenderStyle::initialObjectFit()) | 84 , m_objectFit(RenderStyle::initialObjectFit()) |
| 88 , m_isolation(RenderStyle::initialIsolation()) | 85 , m_isolation(RenderStyle::initialIsolation()) |
| 89 , m_justifyItems(RenderStyle::initialJustifyItems()) | 86 , m_justifyItems(RenderStyle::initialJustifyItems()) |
| 90 , m_justifyItemsOverflowAlignment(RenderStyle::initialJustifyItemsOverflowAl
ignment()) | 87 , m_justifyItemsOverflowAlignment(RenderStyle::initialJustifyItemsOverflowAl
ignment()) |
| 91 , m_justifyItemsPositionType(RenderStyle::initialJustifyItemsPositionType()) | 88 , m_justifyItemsPositionType(RenderStyle::initialJustifyItemsPositionType()) |
| 92 , m_justifySelf(RenderStyle::initialJustifySelf()) | 89 , m_justifySelf(RenderStyle::initialJustifySelf()) |
| 93 , m_justifySelfOverflowAlignment(RenderStyle::initialJustifySelfOverflowAlig
nment()) | 90 , m_justifySelfOverflowAlignment(RenderStyle::initialJustifySelfOverflowAlig
nment()) |
| 94 , m_scrollBehavior(RenderStyle::initialScrollBehavior()) | 91 , m_scrollBehavior(RenderStyle::initialScrollBehavior()) |
| 95 , m_requiresAcceleratedCompositingForExternalReasons(false) | 92 , m_requiresAcceleratedCompositingForExternalReasons(false) |
| 96 , m_hasInlineTransform(false) | 93 , m_hasInlineTransform(false) |
| 97 { | 94 { |
| 98 m_maskBoxImage.setMaskDefaults(); | 95 m_maskBoxImage.setMaskDefaults(); |
| 99 } | 96 } |
| 100 | 97 |
| 101 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
Data& o) | 98 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
Data& o) |
| 102 : RefCounted<StyleRareNonInheritedData>() | 99 : RefCounted<StyleRareNonInheritedData>() |
| 103 , opacity(o.opacity) | 100 , opacity(o.opacity) |
| 104 , m_aspectRatioDenominator(o.m_aspectRatioDenominator) | |
| 105 , m_aspectRatioNumerator(o.m_aspectRatioNumerator) | |
| 106 , m_perspective(o.m_perspective) | 101 , m_perspective(o.m_perspective) |
| 107 , m_perspectiveOriginX(o.m_perspectiveOriginX) | 102 , m_perspectiveOriginX(o.m_perspectiveOriginX) |
| 108 , m_perspectiveOriginY(o.m_perspectiveOriginY) | 103 , m_perspectiveOriginY(o.m_perspectiveOriginY) |
| 109 , lineClamp(o.lineClamp) | 104 , lineClamp(o.lineClamp) |
| 110 , m_draggableRegionMode(o.m_draggableRegionMode) | 105 , m_draggableRegionMode(o.m_draggableRegionMode) |
| 111 , m_deprecatedFlexibleBox(o.m_deprecatedFlexibleBox) | 106 , m_deprecatedFlexibleBox(o.m_deprecatedFlexibleBox) |
| 112 , m_flexibleBox(o.m_flexibleBox) | 107 , m_flexibleBox(o.m_flexibleBox) |
| 113 , m_marquee(o.m_marquee) | 108 , m_marquee(o.m_marquee) |
| 114 , m_multiCol(o.m_multiCol) | 109 , m_multiCol(o.m_multiCol) |
| 115 , m_transform(o.m_transform) | 110 , m_transform(o.m_transform) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 , m_textCombine(o.m_textCombine) | 152 , m_textCombine(o.m_textCombine) |
| 158 , m_textDecorationStyle(o.m_textDecorationStyle) | 153 , m_textDecorationStyle(o.m_textDecorationStyle) |
| 159 , m_wrapFlow(o.m_wrapFlow) | 154 , m_wrapFlow(o.m_wrapFlow) |
| 160 , m_wrapThrough(o.m_wrapThrough) | 155 , m_wrapThrough(o.m_wrapThrough) |
| 161 , m_hasCurrentOpacityAnimation(o.m_hasCurrentOpacityAnimation) | 156 , m_hasCurrentOpacityAnimation(o.m_hasCurrentOpacityAnimation) |
| 162 , m_hasCurrentTransformAnimation(o.m_hasCurrentTransformAnimation) | 157 , m_hasCurrentTransformAnimation(o.m_hasCurrentTransformAnimation) |
| 163 , m_hasCurrentFilterAnimation(o.m_hasCurrentFilterAnimation) | 158 , m_hasCurrentFilterAnimation(o.m_hasCurrentFilterAnimation) |
| 164 , m_runningOpacityAnimationOnCompositor(o.m_runningOpacityAnimationOnComposi
tor) | 159 , m_runningOpacityAnimationOnCompositor(o.m_runningOpacityAnimationOnComposi
tor) |
| 165 , m_runningTransformAnimationOnCompositor(o.m_runningTransformAnimationOnCom
positor) | 160 , m_runningTransformAnimationOnCompositor(o.m_runningTransformAnimationOnCom
positor) |
| 166 , m_runningFilterAnimationOnCompositor(o.m_runningFilterAnimationOnComposito
r) | 161 , m_runningFilterAnimationOnCompositor(o.m_runningFilterAnimationOnComposito
r) |
| 167 , m_hasAspectRatio(o.m_hasAspectRatio) | |
| 168 , m_effectiveBlendMode(o.m_effectiveBlendMode) | 162 , m_effectiveBlendMode(o.m_effectiveBlendMode) |
| 169 , m_touchAction(o.m_touchAction) | 163 , m_touchAction(o.m_touchAction) |
| 170 , m_objectFit(o.m_objectFit) | 164 , m_objectFit(o.m_objectFit) |
| 171 , m_isolation(o.m_isolation) | 165 , m_isolation(o.m_isolation) |
| 172 , m_justifyItems(o.m_justifyItems) | 166 , m_justifyItems(o.m_justifyItems) |
| 173 , m_justifyItemsOverflowAlignment(o.m_justifyItemsOverflowAlignment) | 167 , m_justifyItemsOverflowAlignment(o.m_justifyItemsOverflowAlignment) |
| 174 , m_justifyItemsPositionType(o.m_justifyItemsPositionType) | 168 , m_justifyItemsPositionType(o.m_justifyItemsPositionType) |
| 175 , m_justifySelf(o.m_justifySelf) | 169 , m_justifySelf(o.m_justifySelf) |
| 176 , m_justifySelfOverflowAlignment(o.m_justifySelfOverflowAlignment) | 170 , m_justifySelfOverflowAlignment(o.m_justifySelfOverflowAlignment) |
| 177 , m_scrollBehavior(o.m_scrollBehavior) | 171 , m_scrollBehavior(o.m_scrollBehavior) |
| 178 , m_requiresAcceleratedCompositingForExternalReasons(o.m_requiresAccelerated
CompositingForExternalReasons) | 172 , m_requiresAcceleratedCompositingForExternalReasons(o.m_requiresAccelerated
CompositingForExternalReasons) |
| 179 , m_hasInlineTransform(o.m_hasInlineTransform) | 173 , m_hasInlineTransform(o.m_hasInlineTransform) |
| 180 { | 174 { |
| 181 } | 175 } |
| 182 | 176 |
| 183 StyleRareNonInheritedData::~StyleRareNonInheritedData() | 177 StyleRareNonInheritedData::~StyleRareNonInheritedData() |
| 184 { | 178 { |
| 185 const FilterOperations& filterOperations = m_filter->m_operations; | 179 const FilterOperations& filterOperations = m_filter->m_operations; |
| 186 for (unsigned i = 0; i < filterOperations.size(); ++i) | 180 for (unsigned i = 0; i < filterOperations.size(); ++i) |
| 187 ReferenceFilterBuilder::clearDocumentResourceReference(filterOperations.
at(i)); | 181 ReferenceFilterBuilder::clearDocumentResourceReference(filterOperations.
at(i)); |
| 188 } | 182 } |
| 189 | 183 |
| 190 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
onst | 184 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
onst |
| 191 { | 185 { |
| 192 return opacity == o.opacity | 186 return opacity == o.opacity |
| 193 && m_aspectRatioDenominator == o.m_aspectRatioDenominator | |
| 194 && m_aspectRatioNumerator == o.m_aspectRatioNumerator | |
| 195 && m_perspective == o.m_perspective | 187 && m_perspective == o.m_perspective |
| 196 && m_perspectiveOriginX == o.m_perspectiveOriginX | 188 && m_perspectiveOriginX == o.m_perspectiveOriginX |
| 197 && m_perspectiveOriginY == o.m_perspectiveOriginY | 189 && m_perspectiveOriginY == o.m_perspectiveOriginY |
| 198 && lineClamp == o.lineClamp | 190 && lineClamp == o.lineClamp |
| 199 && m_draggableRegionMode == o.m_draggableRegionMode | 191 && m_draggableRegionMode == o.m_draggableRegionMode |
| 200 && m_deprecatedFlexibleBox == o.m_deprecatedFlexibleBox | 192 && m_deprecatedFlexibleBox == o.m_deprecatedFlexibleBox |
| 201 && m_flexibleBox == o.m_flexibleBox | 193 && m_flexibleBox == o.m_flexibleBox |
| 202 && m_marquee == o.m_marquee | 194 && m_marquee == o.m_marquee |
| 203 && m_multiCol == o.m_multiCol | 195 && m_multiCol == o.m_multiCol |
| 204 && m_transform == o.m_transform | 196 && m_transform == o.m_transform |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 && marginAfterCollapse == o.marginAfterCollapse | 237 && marginAfterCollapse == o.marginAfterCollapse |
| 246 && m_appearance == o.m_appearance | 238 && m_appearance == o.m_appearance |
| 247 && m_textCombine == o.m_textCombine | 239 && m_textCombine == o.m_textCombine |
| 248 && m_textDecorationStyle == o.m_textDecorationStyle | 240 && m_textDecorationStyle == o.m_textDecorationStyle |
| 249 && m_wrapFlow == o.m_wrapFlow | 241 && m_wrapFlow == o.m_wrapFlow |
| 250 && m_wrapThrough == o.m_wrapThrough | 242 && m_wrapThrough == o.m_wrapThrough |
| 251 && m_hasCurrentOpacityAnimation == o.m_hasCurrentOpacityAnimation | 243 && m_hasCurrentOpacityAnimation == o.m_hasCurrentOpacityAnimation |
| 252 && m_hasCurrentTransformAnimation == o.m_hasCurrentTransformAnimation | 244 && m_hasCurrentTransformAnimation == o.m_hasCurrentTransformAnimation |
| 253 && m_hasCurrentFilterAnimation == o.m_hasCurrentFilterAnimation | 245 && m_hasCurrentFilterAnimation == o.m_hasCurrentFilterAnimation |
| 254 && m_effectiveBlendMode == o.m_effectiveBlendMode | 246 && m_effectiveBlendMode == o.m_effectiveBlendMode |
| 255 && m_hasAspectRatio == o.m_hasAspectRatio | |
| 256 && m_touchAction == o.m_touchAction | 247 && m_touchAction == o.m_touchAction |
| 257 && m_objectFit == o.m_objectFit | 248 && m_objectFit == o.m_objectFit |
| 258 && m_isolation == o.m_isolation | 249 && m_isolation == o.m_isolation |
| 259 && m_justifyItems == o.m_justifyItems | 250 && m_justifyItems == o.m_justifyItems |
| 260 && m_justifyItemsOverflowAlignment == o.m_justifyItemsOverflowAlignment | 251 && m_justifyItemsOverflowAlignment == o.m_justifyItemsOverflowAlignment |
| 261 && m_justifyItemsPositionType == o.m_justifyItemsPositionType | 252 && m_justifyItemsPositionType == o.m_justifyItemsPositionType |
| 262 && m_justifySelf == o.m_justifySelf | 253 && m_justifySelf == o.m_justifySelf |
| 263 && m_justifySelfOverflowAlignment == o.m_justifySelfOverflowAlignment | 254 && m_justifySelfOverflowAlignment == o.m_justifySelfOverflowAlignment |
| 264 && m_scrollBehavior == o.m_scrollBehavior | 255 && m_scrollBehavior == o.m_scrollBehavior |
| 265 && m_requiresAcceleratedCompositingForExternalReasons == o.m_requiresAcc
eleratedCompositingForExternalReasons | 256 && m_requiresAcceleratedCompositingForExternalReasons == o.m_requiresAcc
eleratedCompositingForExternalReasons |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 return false; | 302 return false; |
| 312 return m_transitions->transitionsMatchForStyleRecalc(*o.m_transitions); | 303 return m_transitions->transitionsMatchForStyleRecalc(*o.m_transitions); |
| 313 } | 304 } |
| 314 | 305 |
| 315 bool StyleRareNonInheritedData::hasFilters() const | 306 bool StyleRareNonInheritedData::hasFilters() const |
| 316 { | 307 { |
| 317 return m_filter.get() && !m_filter->m_operations.isEmpty(); | 308 return m_filter.get() && !m_filter->m_operations.isEmpty(); |
| 318 } | 309 } |
| 319 | 310 |
| 320 } // namespace blink | 311 } // namespace blink |
| OLD | NEW |