OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 m_renderObjectRegionStyle.swap(temp); | 346 m_renderObjectRegionStyle.swap(temp); |
347 } | 347 } |
348 | 348 |
349 void RenderRegion::insertedIntoTree() | 349 void RenderRegion::insertedIntoTree() |
350 { | 350 { |
351 RenderReplaced::insertedIntoTree(); | 351 RenderReplaced::insertedIntoTree(); |
352 | 352 |
353 attachRegion(); | 353 attachRegion(); |
354 } | 354 } |
355 | 355 |
| 356 void RenderRegion::willBeRemovedFromTree() |
| 357 { |
| 358 RenderReplaced::willBeRemovedFromTree(); |
| 359 |
| 360 detachRegion(); |
| 361 } |
| 362 |
356 PassRefPtr<RenderStyle> RenderRegion::computeStyleInRegion(const RenderObject* o
bject) | 363 PassRefPtr<RenderStyle> RenderRegion::computeStyleInRegion(const RenderObject* o
bject) |
357 { | 364 { |
358 ASSERT(object); | 365 ASSERT(object); |
359 ASSERT(object->view()); | 366 ASSERT(object->view()); |
360 ASSERT(object->view()->document()); | 367 ASSERT(object->view()->document()); |
361 ASSERT(!object->isAnonymous()); | 368 ASSERT(!object->isAnonymous()); |
362 ASSERT(object->node() && object->node()->isElementNode()); | 369 ASSERT(object->node() && object->node()->isElementNode()); |
363 | 370 |
364 Element* element = toElement(object->node()); | 371 Element* element = toElement(object->node()); |
365 RefPtr<RenderStyle> renderObjectRegionStyle = object->view()->document()->st
yleResolver()->styleForElement(element, 0, DisallowStyleSharing, MatchAllRules,
this); | 372 RefPtr<RenderStyle> renderObjectRegionStyle = object->view()->document()->st
yleResolver()->styleForElement(element, 0, DisallowStyleSharing, MatchAllRules,
this); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 { | 424 { |
418 ASSERT(object); | 425 ASSERT(object); |
419 m_renderObjectRegionStyle.remove(object); | 426 m_renderObjectRegionStyle.remove(object); |
420 | 427 |
421 // Clear the style for the children of this object. | 428 // Clear the style for the children of this object. |
422 for (RenderObject* child = object->firstChild(); child; child = child->nextS
ibling()) | 429 for (RenderObject* child = object->firstChild(); child; child = child->nextS
ibling()) |
423 clearObjectStyleInRegion(child); | 430 clearObjectStyleInRegion(child); |
424 } | 431 } |
425 | 432 |
426 } // namespace WebCore | 433 } // namespace WebCore |
OLD | NEW |