| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #include "config.h" | 22 #include "config.h" |
| 23 #include "core/rendering/style/StyleRareNonInheritedData.h" | 23 #include "core/rendering/style/StyleRareNonInheritedData.h" |
| 24 | 24 |
| 25 #include "core/dom/Document.h" |
| 25 #include "core/dom/WebCoreMemoryInstrumentation.h" | 26 #include "core/dom/WebCoreMemoryInstrumentation.h" |
| 26 #include "core/rendering/style/ContentData.h" | 27 #include "core/rendering/style/ContentData.h" |
| 27 #include "core/rendering/style/RenderStyle.h" | 28 #include "core/rendering/style/RenderStyle.h" |
| 28 #include "core/rendering/style/ShadowData.h" | 29 #include "core/rendering/style/ShadowData.h" |
| 29 #include "core/rendering/style/StyleFilterData.h" | 30 #include "core/rendering/style/StyleFilterData.h" |
| 30 #include "core/rendering/style/StyleTransformData.h" | 31 #include "core/rendering/style/StyleTransformData.h" |
| 31 #include <wtf/MemoryInstrumentationHashMap.h> | 32 #include <wtf/MemoryInstrumentationHashMap.h> |
| 32 #include <wtf/MemoryInstrumentationVector.h> | 33 #include <wtf/MemoryInstrumentationVector.h> |
| 33 #include <wtf/MemoryObjectInfo.h> | 34 #include <wtf/MemoryObjectInfo.h> |
| 34 | 35 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 45 , m_draggableRegionMode(DraggableRegionNone) | 46 , m_draggableRegionMode(DraggableRegionNone) |
| 46 , m_mask(FillLayer(MaskFillLayer)) | 47 , m_mask(FillLayer(MaskFillLayer)) |
| 47 , m_pageSize() | 48 , m_pageSize() |
| 48 , m_shapeInside(RenderStyle::initialShapeInside()) | 49 , m_shapeInside(RenderStyle::initialShapeInside()) |
| 49 , m_shapeOutside(RenderStyle::initialShapeOutside()) | 50 , m_shapeOutside(RenderStyle::initialShapeOutside()) |
| 50 , m_shapeMargin(RenderStyle::initialShapeMargin()) | 51 , m_shapeMargin(RenderStyle::initialShapeMargin()) |
| 51 , m_shapePadding(RenderStyle::initialShapePadding()) | 52 , m_shapePadding(RenderStyle::initialShapePadding()) |
| 52 , m_clipPath(RenderStyle::initialClipPath()) | 53 , m_clipPath(RenderStyle::initialClipPath()) |
| 53 , m_visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor()) | 54 , m_visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor()) |
| 54 , m_order(RenderStyle::initialOrder()) | 55 , m_order(RenderStyle::initialOrder()) |
| 56 #if ENABLE(CSS_CALLBACKS) |
| 57 , m_document() |
| 58 #endif |
| 55 , m_flowThread(RenderStyle::initialFlowThread()) | 59 , m_flowThread(RenderStyle::initialFlowThread()) |
| 56 , m_regionThread(RenderStyle::initialRegionThread()) | 60 , m_regionThread(RenderStyle::initialRegionThread()) |
| 57 , m_regionFragment(RenderStyle::initialRegionFragment()) | 61 , m_regionFragment(RenderStyle::initialRegionFragment()) |
| 58 , m_regionBreakAfter(RenderStyle::initialPageBreak()) | 62 , m_regionBreakAfter(RenderStyle::initialPageBreak()) |
| 59 , m_regionBreakBefore(RenderStyle::initialPageBreak()) | 63 , m_regionBreakBefore(RenderStyle::initialPageBreak()) |
| 60 , m_regionBreakInside(RenderStyle::initialPageBreak()) | 64 , m_regionBreakInside(RenderStyle::initialPageBreak()) |
| 61 , m_pageSizeType(PAGE_SIZE_AUTO) | 65 , m_pageSizeType(PAGE_SIZE_AUTO) |
| 62 , m_transformStyle3D(RenderStyle::initialTransformStyle3D()) | 66 , m_transformStyle3D(RenderStyle::initialTransformStyle3D()) |
| 63 , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility()) | 67 , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility()) |
| 64 , m_alignContent(RenderStyle::initialAlignContent()) | 68 , m_alignContent(RenderStyle::initialAlignContent()) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 , m_clipPath(o.m_clipPath) | 121 , m_clipPath(o.m_clipPath) |
| 118 , m_textDecorationColor(o.m_textDecorationColor) | 122 , m_textDecorationColor(o.m_textDecorationColor) |
| 119 , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor) | 123 , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor) |
| 120 , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor) | 124 , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor) |
| 121 , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor) | 125 , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor) |
| 122 , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor) | 126 , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor) |
| 123 , m_visitedLinkBorderRightColor(o.m_visitedLinkBorderRightColor) | 127 , m_visitedLinkBorderRightColor(o.m_visitedLinkBorderRightColor) |
| 124 , m_visitedLinkBorderTopColor(o.m_visitedLinkBorderTopColor) | 128 , m_visitedLinkBorderTopColor(o.m_visitedLinkBorderTopColor) |
| 125 , m_visitedLinkBorderBottomColor(o.m_visitedLinkBorderBottomColor) | 129 , m_visitedLinkBorderBottomColor(o.m_visitedLinkBorderBottomColor) |
| 126 , m_order(o.m_order) | 130 , m_order(o.m_order) |
| 131 #if ENABLE(CSS_CALLBACKS) |
| 132 , m_document() |
| 133 #endif |
| 127 , m_flowThread(o.m_flowThread) | 134 , m_flowThread(o.m_flowThread) |
| 128 , m_regionThread(o.m_regionThread) | 135 , m_regionThread(o.m_regionThread) |
| 129 , m_regionFragment(o.m_regionFragment) | 136 , m_regionFragment(o.m_regionFragment) |
| 130 , m_regionBreakAfter(o.m_regionBreakAfter) | 137 , m_regionBreakAfter(o.m_regionBreakAfter) |
| 131 , m_regionBreakBefore(o.m_regionBreakBefore) | 138 , m_regionBreakBefore(o.m_regionBreakBefore) |
| 132 , m_regionBreakInside(o.m_regionBreakInside) | 139 , m_regionBreakInside(o.m_regionBreakInside) |
| 133 , m_pageSizeType(o.m_pageSizeType) | 140 , m_pageSizeType(o.m_pageSizeType) |
| 134 , m_transformStyle3D(o.m_transformStyle3D) | 141 , m_transformStyle3D(o.m_transformStyle3D) |
| 135 , m_backfaceVisibility(o.m_backfaceVisibility) | 142 , m_backfaceVisibility(o.m_backfaceVisibility) |
| 136 , m_alignContent(o.m_alignContent) | 143 , m_alignContent(o.m_alignContent) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 149 , m_wrapThrough(o.m_wrapThrough) | 156 , m_wrapThrough(o.m_wrapThrough) |
| 150 , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation) | 157 , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation) |
| 151 , m_hasAspectRatio(o.m_hasAspectRatio) | 158 , m_hasAspectRatio(o.m_hasAspectRatio) |
| 152 , m_effectiveBlendMode(o.m_effectiveBlendMode) | 159 , m_effectiveBlendMode(o.m_effectiveBlendMode) |
| 153 , m_touchAction(o.m_touchAction) | 160 , m_touchAction(o.m_touchAction) |
| 154 { | 161 { |
| 155 } | 162 } |
| 156 | 163 |
| 157 StyleRareNonInheritedData::~StyleRareNonInheritedData() | 164 StyleRareNonInheritedData::~StyleRareNonInheritedData() |
| 158 { | 165 { |
| 166 #if ENABLE(CSS_CALLBACKS) |
| 167 if (!m_callbackSelectors.isEmpty() && m_document.get()) { |
| 168 Document* document = m_document.get(); |
| 169 for (Vector<String>::const_iterator it = m_callbackSelectors.begin(), en
d = m_callbackSelectors.end(); |
| 170 it != end; ++it) |
| 171 document->removeSelectorMatch(*it); |
| 172 } |
| 173 #endif |
| 159 } | 174 } |
| 160 | 175 |
| 161 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
onst | 176 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
onst |
| 162 { | 177 { |
| 163 return opacity == o.opacity | 178 return opacity == o.opacity |
| 164 && m_aspectRatioDenominator == o.m_aspectRatioDenominator | 179 && m_aspectRatioDenominator == o.m_aspectRatioDenominator |
| 165 && m_aspectRatioNumerator == o.m_aspectRatioNumerator | 180 && m_aspectRatioNumerator == o.m_aspectRatioNumerator |
| 166 && m_perspective == o.m_perspective | 181 && m_perspective == o.m_perspective |
| 167 && m_perspectiveOriginX == o.m_perspectiveOriginX | 182 && m_perspectiveOriginX == o.m_perspectiveOriginX |
| 168 && m_perspectiveOriginY == o.m_perspectiveOriginY | 183 && m_perspectiveOriginY == o.m_perspectiveOriginY |
| (...skipping 23 matching lines...) Expand all Loading... |
| 192 && m_clipPath == o.m_clipPath | 207 && m_clipPath == o.m_clipPath |
| 193 && m_textDecorationColor == o.m_textDecorationColor | 208 && m_textDecorationColor == o.m_textDecorationColor |
| 194 && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColo
r | 209 && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColo
r |
| 195 && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor | 210 && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor |
| 196 && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor | 211 && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor |
| 197 && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor | 212 && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor |
| 198 && m_visitedLinkBorderRightColor == o.m_visitedLinkBorderRightColor | 213 && m_visitedLinkBorderRightColor == o.m_visitedLinkBorderRightColor |
| 199 && m_visitedLinkBorderTopColor == o.m_visitedLinkBorderTopColor | 214 && m_visitedLinkBorderTopColor == o.m_visitedLinkBorderTopColor |
| 200 && m_visitedLinkBorderBottomColor == o.m_visitedLinkBorderBottomColor | 215 && m_visitedLinkBorderBottomColor == o.m_visitedLinkBorderBottomColor |
| 201 && m_order == o.m_order | 216 && m_order == o.m_order |
| 217 #if ENABLE(CSS_CALLBACKS) |
| 218 && m_callbackSelectors == o.m_callbackSelectors |
| 219 && m_document.get() == o.m_document.get() |
| 220 #endif |
| 202 && m_flowThread == o.m_flowThread | 221 && m_flowThread == o.m_flowThread |
| 203 && m_regionThread == o.m_regionThread | 222 && m_regionThread == o.m_regionThread |
| 204 && m_regionFragment == o.m_regionFragment | 223 && m_regionFragment == o.m_regionFragment |
| 205 && m_regionBreakAfter == o.m_regionBreakAfter | 224 && m_regionBreakAfter == o.m_regionBreakAfter |
| 206 && m_regionBreakBefore == o.m_regionBreakBefore | 225 && m_regionBreakBefore == o.m_regionBreakBefore |
| 207 && m_regionBreakInside == o.m_regionBreakInside | 226 && m_regionBreakInside == o.m_regionBreakInside |
| 208 && m_pageSizeType == o.m_pageSizeType | 227 && m_pageSizeType == o.m_pageSizeType |
| 209 && m_transformStyle3D == o.m_transformStyle3D | 228 && m_transformStyle3D == o.m_transformStyle3D |
| 210 && m_backfaceVisibility == o.m_backfaceVisibility | 229 && m_backfaceVisibility == o.m_backfaceVisibility |
| 211 && m_alignContent == o.m_alignContent | 230 && m_alignContent == o.m_alignContent |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 info.addMember(m_regionThread, "regionThread"); | 332 info.addMember(m_regionThread, "regionThread"); |
| 314 | 333 |
| 315 info.ignoreMember(m_perspectiveOriginX); | 334 info.ignoreMember(m_perspectiveOriginX); |
| 316 info.ignoreMember(m_perspectiveOriginY); | 335 info.ignoreMember(m_perspectiveOriginY); |
| 317 info.ignoreMember(m_pageSize); | 336 info.ignoreMember(m_pageSize); |
| 318 info.ignoreMember(m_shapeMargin); | 337 info.ignoreMember(m_shapeMargin); |
| 319 info.ignoreMember(m_shapePadding); | 338 info.ignoreMember(m_shapePadding); |
| 320 } | 339 } |
| 321 | 340 |
| 322 } // namespace WebCore | 341 } // namespace WebCore |
| OLD | NEW |