| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 : StyleRuleBase(o) | 263 : StyleRuleBase(o) |
| 264 , m_properties(o.m_properties->mutableCopy()) | 264 , m_properties(o.m_properties->mutableCopy()) |
| 265 , m_selectorList(o.m_selectorList) | 265 , m_selectorList(o.m_selectorList) |
| 266 { | 266 { |
| 267 } | 267 } |
| 268 | 268 |
| 269 StyleRule::~StyleRule() | 269 StyleRule::~StyleRule() |
| 270 { | 270 { |
| 271 } | 271 } |
| 272 | 272 |
| 273 StylePropertySet* StyleRule::mutableProperties() | 273 MutableStylePropertySet* StyleRule::mutableProperties() |
| 274 { | 274 { |
| 275 if (!m_properties->isMutable()) | 275 if (!m_properties->isMutable()) |
| 276 m_properties = m_properties->mutableCopy(); | 276 m_properties = m_properties->mutableCopy(); |
| 277 return m_properties.get(); | 277 return static_cast<MutableStylePropertySet*>(m_properties.get()); |
| 278 } | 278 } |
| 279 | 279 |
| 280 void StyleRule::setProperties(PassRefPtr<StylePropertySet> properties) | 280 void StyleRule::setProperties(PassRefPtr<StylePropertySet> properties) |
| 281 { | 281 { |
| 282 m_properties = properties; | 282 m_properties = properties; |
| 283 } | 283 } |
| 284 | 284 |
| 285 StyleRulePage::StyleRulePage() | 285 StyleRulePage::StyleRulePage() |
| 286 : StyleRuleBase(Page) | 286 : StyleRuleBase(Page) |
| 287 { | 287 { |
| 288 } | 288 } |
| 289 | 289 |
| 290 StyleRulePage::StyleRulePage(const StyleRulePage& o) | 290 StyleRulePage::StyleRulePage(const StyleRulePage& o) |
| 291 : StyleRuleBase(o) | 291 : StyleRuleBase(o) |
| 292 , m_properties(o.m_properties->mutableCopy()) | 292 , m_properties(o.m_properties->mutableCopy()) |
| 293 , m_selectorList(o.m_selectorList) | 293 , m_selectorList(o.m_selectorList) |
| 294 { | 294 { |
| 295 } | 295 } |
| 296 | 296 |
| 297 StyleRulePage::~StyleRulePage() | 297 StyleRulePage::~StyleRulePage() |
| 298 { | 298 { |
| 299 } | 299 } |
| 300 | 300 |
| 301 StylePropertySet* StyleRulePage::mutableProperties() | 301 MutableStylePropertySet* StyleRulePage::mutableProperties() |
| 302 { | 302 { |
| 303 if (!m_properties->isMutable()) | 303 if (!m_properties->isMutable()) |
| 304 m_properties = m_properties->mutableCopy(); | 304 m_properties = m_properties->mutableCopy(); |
| 305 return m_properties.get(); | 305 return static_cast<MutableStylePropertySet*>(m_properties.get()); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void StyleRulePage::setProperties(PassRefPtr<StylePropertySet> properties) | 308 void StyleRulePage::setProperties(PassRefPtr<StylePropertySet> properties) |
| 309 { | 309 { |
| 310 m_properties = properties; | 310 m_properties = properties; |
| 311 } | 311 } |
| 312 | 312 |
| 313 void StyleRulePage::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectIn
fo) const | 313 void StyleRulePage::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectIn
fo) const |
| 314 { | 314 { |
| 315 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 315 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| 316 info.addMember(m_properties, "properties"); | 316 info.addMember(m_properties, "properties"); |
| 317 info.addMember(m_selectorList, "selectorList"); | 317 info.addMember(m_selectorList, "selectorList"); |
| 318 } | 318 } |
| 319 | 319 |
| 320 StyleRuleFontFace::StyleRuleFontFace() | 320 StyleRuleFontFace::StyleRuleFontFace() |
| 321 : StyleRuleBase(FontFace, 0) | 321 : StyleRuleBase(FontFace, 0) |
| 322 { | 322 { |
| 323 } | 323 } |
| 324 | 324 |
| 325 StyleRuleFontFace::StyleRuleFontFace(const StyleRuleFontFace& o) | 325 StyleRuleFontFace::StyleRuleFontFace(const StyleRuleFontFace& o) |
| 326 : StyleRuleBase(o) | 326 : StyleRuleBase(o) |
| 327 , m_properties(o.m_properties->mutableCopy()) | 327 , m_properties(o.m_properties->mutableCopy()) |
| 328 { | 328 { |
| 329 } | 329 } |
| 330 | 330 |
| 331 StyleRuleFontFace::~StyleRuleFontFace() | 331 StyleRuleFontFace::~StyleRuleFontFace() |
| 332 { | 332 { |
| 333 } | 333 } |
| 334 | 334 |
| 335 StylePropertySet* StyleRuleFontFace::mutableProperties() | 335 MutableStylePropertySet* StyleRuleFontFace::mutableProperties() |
| 336 { | 336 { |
| 337 if (!m_properties->isMutable()) | 337 if (!m_properties->isMutable()) |
| 338 m_properties = m_properties->mutableCopy(); | 338 m_properties = m_properties->mutableCopy(); |
| 339 return m_properties.get(); | 339 return static_cast<MutableStylePropertySet*>(m_properties.get()); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void StyleRuleFontFace::setProperties(PassRefPtr<StylePropertySet> properties) | 342 void StyleRuleFontFace::setProperties(PassRefPtr<StylePropertySet> properties) |
| 343 { | 343 { |
| 344 m_properties = properties; | 344 m_properties = properties; |
| 345 } | 345 } |
| 346 | 346 |
| 347 void StyleRuleFontFace::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje
ctInfo) const | 347 void StyleRuleFontFace::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje
ctInfo) const |
| 348 { | 348 { |
| 349 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 349 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o) | 444 StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o) |
| 445 : StyleRuleBase(o) | 445 : StyleRuleBase(o) |
| 446 , m_properties(o.m_properties->mutableCopy()) | 446 , m_properties(o.m_properties->mutableCopy()) |
| 447 { | 447 { |
| 448 } | 448 } |
| 449 | 449 |
| 450 StyleRuleViewport::~StyleRuleViewport() | 450 StyleRuleViewport::~StyleRuleViewport() |
| 451 { | 451 { |
| 452 } | 452 } |
| 453 | 453 |
| 454 StylePropertySet* StyleRuleViewport::mutableProperties() | 454 MutableStylePropertySet* StyleRuleViewport::mutableProperties() |
| 455 { | 455 { |
| 456 if (!m_properties->isMutable()) | 456 if (!m_properties->isMutable()) |
| 457 m_properties = m_properties->mutableCopy(); | 457 m_properties = m_properties->mutableCopy(); |
| 458 return m_properties.get(); | 458 return static_cast<MutableStylePropertySet*>(m_properties.get()); |
| 459 } | 459 } |
| 460 | 460 |
| 461 void StyleRuleViewport::setProperties(PassRefPtr<StylePropertySet> properties) | 461 void StyleRuleViewport::setProperties(PassRefPtr<StylePropertySet> properties) |
| 462 { | 462 { |
| 463 m_properties = properties; | 463 m_properties = properties; |
| 464 } | 464 } |
| 465 | 465 |
| 466 void StyleRuleViewport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje
ctInfo) const | 466 void StyleRuleViewport::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObje
ctInfo) const |
| 467 { | 467 { |
| 468 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 468 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 480 : StyleRuleBase(o) | 480 : StyleRuleBase(o) |
| 481 , m_filterName(o.m_filterName) | 481 , m_filterName(o.m_filterName) |
| 482 , m_properties(o.m_properties->mutableCopy()) | 482 , m_properties(o.m_properties->mutableCopy()) |
| 483 { | 483 { |
| 484 } | 484 } |
| 485 | 485 |
| 486 StyleRuleFilter::~StyleRuleFilter() | 486 StyleRuleFilter::~StyleRuleFilter() |
| 487 { | 487 { |
| 488 } | 488 } |
| 489 | 489 |
| 490 StylePropertySet* StyleRuleFilter::mutableProperties() | 490 MutableStylePropertySet* StyleRuleFilter::mutableProperties() |
| 491 { | 491 { |
| 492 if (!m_properties->isMutable()) | 492 if (!m_properties->isMutable()) |
| 493 m_properties = m_properties->mutableCopy(); | 493 m_properties = m_properties->mutableCopy(); |
| 494 return m_properties.get(); | 494 return static_cast<MutableStylePropertySet*>(m_properties.get()); |
| 495 } | 495 } |
| 496 | 496 |
| 497 void StyleRuleFilter::setProperties(PassRefPtr<StylePropertySet> properties) | 497 void StyleRuleFilter::setProperties(PassRefPtr<StylePropertySet> properties) |
| 498 { | 498 { |
| 499 m_properties = properties; | 499 m_properties = properties; |
| 500 } | 500 } |
| 501 | 501 |
| 502 void StyleRuleFilter::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObject
Info) const | 502 void StyleRuleFilter::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObject
Info) const |
| 503 { | 503 { |
| 504 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); | 504 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); |
| 505 info.addMember(m_filterName); | 505 info.addMember(m_filterName); |
| 506 info.addMember(m_properties); | 506 info.addMember(m_properties); |
| 507 } | 507 } |
| 508 | 508 |
| 509 } // namespace WebCore | 509 } // namespace WebCore |
| OLD | NEW |