| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // | 179 // |
| 180 // The big problem though is that overflow needs to be region-specific. We c
an't simply use the RenderFlowThread's global | 180 // The big problem though is that overflow needs to be region-specific. We c
an't simply use the RenderFlowThread's global |
| 181 // overflow values, since then we'd always think any narrow region had huge
overflow (all the way to the width of the | 181 // overflow values, since then we'd always think any narrow region had huge
overflow (all the way to the width of the |
| 182 // RenderFlowThread itself). | 182 // RenderFlowThread itself). |
| 183 // | 183 // |
| 184 // We'll need to expand RenderBoxRegionInfo to also hold left and right over
flow values. | 184 // We'll need to expand RenderBoxRegionInfo to also hold left and right over
flow values. |
| 185 } | 185 } |
| 186 | 186 |
| 187 void RenderRegion::attachRegion() | 187 void RenderRegion::attachRegion() |
| 188 { | 188 { |
| 189 if (documentBeingDestroyed()) | 189 ASSERT(view()); |
| 190 return; | |
| 191 | |
| 192 if (!m_flowThread && isValid()) { | 190 if (!m_flowThread && isValid()) { |
| 193 // We have to recreate the named flow if the named flow was deleted beca
use | 191 // We have to recreate the named flow if the named flow was deleted beca
use |
| 194 // the region detached was the last one from the named flow. | 192 // the region detached was the last one from the named flow. |
| 195 m_flowThread = view()->flowThreadController()->ensureRenderFlowThreadWit
hName(style()->regionThread()); | 193 m_flowThread = view()->flowThreadController()->ensureRenderFlowThreadWit
hName(style()->regionThread()); |
| 196 // The region will be marked as valid after being checked that it is not | 194 // The region will be marked as valid after being checked that it is not |
| 197 // part of a circular dependency. | 195 // part of a circular dependency. |
| 198 setIsValid(false); | 196 setIsValid(false); |
| 199 } | 197 } |
| 200 | 198 |
| 201 // By now the flow thread should already be added to the rendering tree, | 199 // By now the flow thread should already be added to the rendering tree, |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 { | 422 { |
| 425 ASSERT(object); | 423 ASSERT(object); |
| 426 m_renderObjectRegionStyle.remove(object); | 424 m_renderObjectRegionStyle.remove(object); |
| 427 | 425 |
| 428 // Clear the style for the children of this object. | 426 // Clear the style for the children of this object. |
| 429 for (RenderObject* child = object->firstChild(); child; child = child->nextS
ibling()) | 427 for (RenderObject* child = object->firstChild(); child; child = child->nextS
ibling()) |
| 430 clearObjectStyleInRegion(child); | 428 clearObjectStyleInRegion(child); |
| 431 } | 429 } |
| 432 | 430 |
| 433 } // namespace WebCore | 431 } // namespace WebCore |
| OLD | NEW |