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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 : StyleRuleBase(o) | 259 : StyleRuleBase(o) |
260 , m_properties(o.m_properties->mutableCopy()) | 260 , m_properties(o.m_properties->mutableCopy()) |
261 , m_selectorList(o.m_selectorList) | 261 , m_selectorList(o.m_selectorList) |
262 { | 262 { |
263 } | 263 } |
264 | 264 |
265 StyleRule::~StyleRule() | 265 StyleRule::~StyleRule() |
266 { | 266 { |
267 } | 267 } |
268 | 268 |
269 MutableStylePropertySet* StyleRule::mutableProperties() | 269 MutableStylePropertySet& StyleRule::mutableProperties() |
270 { | 270 { |
271 if (!m_properties->isMutable()) | 271 if (!m_properties->isMutable()) |
272 m_properties = m_properties->mutableCopy(); | 272 m_properties = m_properties->mutableCopy(); |
273 return toMutableStylePropertySet(m_properties); | 273 return *toMutableStylePropertySet(m_properties); |
274 } | 274 } |
275 | 275 |
276 void StyleRule::setProperties(PassRefPtr<StylePropertySet> properties) | 276 void StyleRule::setProperties(PassRefPtr<StylePropertySet> properties) |
277 { | 277 { |
278 m_properties = properties; | 278 m_properties = properties; |
279 } | 279 } |
280 | 280 |
281 StyleRulePage::StyleRulePage() | 281 StyleRulePage::StyleRulePage() |
282 : StyleRuleBase(Page) | 282 : StyleRuleBase(Page) |
283 { | 283 { |
284 } | 284 } |
285 | 285 |
286 StyleRulePage::StyleRulePage(const StyleRulePage& o) | 286 StyleRulePage::StyleRulePage(const StyleRulePage& o) |
287 : StyleRuleBase(o) | 287 : StyleRuleBase(o) |
288 , m_properties(o.m_properties->mutableCopy()) | 288 , m_properties(o.m_properties->mutableCopy()) |
289 , m_selectorList(o.m_selectorList) | 289 , m_selectorList(o.m_selectorList) |
290 { | 290 { |
291 } | 291 } |
292 | 292 |
293 StyleRulePage::~StyleRulePage() | 293 StyleRulePage::~StyleRulePage() |
294 { | 294 { |
295 } | 295 } |
296 | 296 |
297 MutableStylePropertySet* StyleRulePage::mutableProperties() | 297 MutableStylePropertySet& StyleRulePage::mutableProperties() |
298 { | 298 { |
299 if (!m_properties->isMutable()) | 299 if (!m_properties->isMutable()) |
300 m_properties = m_properties->mutableCopy(); | 300 m_properties = m_properties->mutableCopy(); |
301 return toMutableStylePropertySet(m_properties); | 301 return *toMutableStylePropertySet(m_properties); |
302 } | 302 } |
303 | 303 |
304 void StyleRulePage::setProperties(PassRefPtr<StylePropertySet> properties) | 304 void StyleRulePage::setProperties(PassRefPtr<StylePropertySet> properties) |
305 { | 305 { |
306 m_properties = properties; | 306 m_properties = properties; |
307 } | 307 } |
308 | 308 |
309 StyleRuleFontFace::StyleRuleFontFace() | 309 StyleRuleFontFace::StyleRuleFontFace() |
310 : StyleRuleBase(FontFace) | 310 : StyleRuleBase(FontFace) |
311 { | 311 { |
312 } | 312 } |
313 | 313 |
314 StyleRuleFontFace::StyleRuleFontFace(const StyleRuleFontFace& o) | 314 StyleRuleFontFace::StyleRuleFontFace(const StyleRuleFontFace& o) |
315 : StyleRuleBase(o) | 315 : StyleRuleBase(o) |
316 , m_properties(o.m_properties->mutableCopy()) | 316 , m_properties(o.m_properties->mutableCopy()) |
317 { | 317 { |
318 } | 318 } |
319 | 319 |
320 StyleRuleFontFace::~StyleRuleFontFace() | 320 StyleRuleFontFace::~StyleRuleFontFace() |
321 { | 321 { |
322 } | 322 } |
323 | 323 |
324 MutableStylePropertySet* StyleRuleFontFace::mutableProperties() | 324 MutableStylePropertySet& StyleRuleFontFace::mutableProperties() |
325 { | 325 { |
326 if (!m_properties->isMutable()) | 326 if (!m_properties->isMutable()) |
327 m_properties = m_properties->mutableCopy(); | 327 m_properties = m_properties->mutableCopy(); |
328 return toMutableStylePropertySet(m_properties); | 328 return *toMutableStylePropertySet(m_properties); |
329 } | 329 } |
330 | 330 |
331 void StyleRuleFontFace::setProperties(PassRefPtr<StylePropertySet> properties) | 331 void StyleRuleFontFace::setProperties(PassRefPtr<StylePropertySet> properties) |
332 { | 332 { |
333 m_properties = properties; | 333 m_properties = properties; |
334 } | 334 } |
335 | 335 |
336 StyleRuleGroup::StyleRuleGroup(Type type, WillBeHeapVector<RefPtrWillBeMember<St
yleRuleBase> >& adoptRule) | 336 StyleRuleGroup::StyleRuleGroup(Type type, WillBeHeapVector<RefPtrWillBeMember<St
yleRuleBase> >& adoptRule) |
337 : StyleRuleBase(type) | 337 : StyleRuleBase(type) |
338 { | 338 { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o) | 398 StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o) |
399 : StyleRuleBase(o) | 399 : StyleRuleBase(o) |
400 , m_properties(o.m_properties->mutableCopy()) | 400 , m_properties(o.m_properties->mutableCopy()) |
401 { | 401 { |
402 } | 402 } |
403 | 403 |
404 StyleRuleViewport::~StyleRuleViewport() | 404 StyleRuleViewport::~StyleRuleViewport() |
405 { | 405 { |
406 } | 406 } |
407 | 407 |
408 MutableStylePropertySet* StyleRuleViewport::mutableProperties() | 408 MutableStylePropertySet& StyleRuleViewport::mutableProperties() |
409 { | 409 { |
410 if (!m_properties->isMutable()) | 410 if (!m_properties->isMutable()) |
411 m_properties = m_properties->mutableCopy(); | 411 m_properties = m_properties->mutableCopy(); |
412 return toMutableStylePropertySet(m_properties); | 412 return *toMutableStylePropertySet(m_properties); |
413 } | 413 } |
414 | 414 |
415 void StyleRuleViewport::setProperties(PassRefPtr<StylePropertySet> properties) | 415 void StyleRuleViewport::setProperties(PassRefPtr<StylePropertySet> properties) |
416 { | 416 { |
417 m_properties = properties; | 417 m_properties = properties; |
418 } | 418 } |
419 | 419 |
420 StyleRuleFilter::StyleRuleFilter(const String& filterName) | 420 StyleRuleFilter::StyleRuleFilter(const String& filterName) |
421 : StyleRuleBase(Filter) | 421 : StyleRuleBase(Filter) |
422 , m_filterName(filterName) | 422 , m_filterName(filterName) |
423 { | 423 { |
424 } | 424 } |
425 | 425 |
426 StyleRuleFilter::StyleRuleFilter(const StyleRuleFilter& o) | 426 StyleRuleFilter::StyleRuleFilter(const StyleRuleFilter& o) |
427 : StyleRuleBase(o) | 427 : StyleRuleBase(o) |
428 , m_filterName(o.m_filterName) | 428 , m_filterName(o.m_filterName) |
429 , m_properties(o.m_properties->mutableCopy()) | 429 , m_properties(o.m_properties->mutableCopy()) |
430 { | 430 { |
431 } | 431 } |
432 | 432 |
433 StyleRuleFilter::~StyleRuleFilter() | 433 StyleRuleFilter::~StyleRuleFilter() |
434 { | 434 { |
435 } | 435 } |
436 | 436 |
437 MutableStylePropertySet* StyleRuleFilter::mutableProperties() | 437 MutableStylePropertySet& StyleRuleFilter::mutableProperties() |
438 { | 438 { |
439 if (!m_properties->isMutable()) | 439 if (!m_properties->isMutable()) |
440 m_properties = m_properties->mutableCopy(); | 440 m_properties = m_properties->mutableCopy(); |
441 return toMutableStylePropertySet(m_properties); | 441 return *toMutableStylePropertySet(m_properties); |
442 } | 442 } |
443 | 443 |
444 void StyleRuleFilter::setProperties(PassRefPtr<StylePropertySet> properties) | 444 void StyleRuleFilter::setProperties(PassRefPtr<StylePropertySet> properties) |
445 { | 445 { |
446 m_properties = properties; | 446 m_properties = properties; |
447 } | 447 } |
448 | 448 |
449 } // namespace WebCore | 449 } // namespace WebCore |
OLD | NEW |