Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /** | 1 /** |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 306 // are the only item in that anonymous box (since no line box parent was | 306 // are the only item in that anonymous box (since no line box parent was |
| 307 // found). It's ok to just leave the marker where it is in this case. | 307 // found). It's ok to just leave the marker where it is in this case. |
| 308 if (markerParent && markerParent->isAnonymousBlock()) | 308 if (markerParent && markerParent->isAnonymousBlock()) |
| 309 lineBoxParent = markerParent; | 309 lineBoxParent = markerParent; |
| 310 else | 310 else |
| 311 lineBoxParent = this; | 311 lineBoxParent = this; |
| 312 } | 312 } |
| 313 | 313 |
| 314 if (markerParent != lineBoxParent) { | 314 if (markerParent != lineBoxParent) { |
| 315 m_marker->remove(); | 315 m_marker->remove(); |
| 316 // If markerParent is now an anonymous block with no children, this is t he time to attemp to remove it | |
|
mstensho (USE GERRIT)
2016/04/04 09:34:52
"attempt"
| |
| 317 // as it might have gone away after addChild(). | |
| 318 if (markerParent && markerParent->isAnonymousBlock() && !toLayoutBlock(m arkerParent)->firstChild() && !toLayoutBlock(markerParent)->continuation()) | |
| 319 markerParent->destroy(); | |
| 316 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent)); | 320 lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent)); |
| 317 m_marker->updateMarginsAndContent(); | 321 m_marker->updateMarginsAndContent(); |
| 318 // If markerParent is an anonymous block with no children, destroy it. | |
| 319 if (markerParent && markerParent->isAnonymousBlock() && !toLayoutBlock(m arkerParent)->firstChild() && !toLayoutBlock(markerParent)->continuation()) | |
| 320 markerParent->destroy(); | |
| 321 return true; | 322 return true; |
| 322 } | 323 } |
| 323 | 324 |
| 324 return false; | 325 return false; |
| 325 } | 326 } |
| 326 | 327 |
| 327 void LayoutListItem::addOverflowFromChildren() | 328 void LayoutListItem::addOverflowFromChildren() |
| 328 { | 329 { |
| 329 LayoutBlockFlow::addOverflowFromChildren(); | 330 LayoutBlockFlow::addOverflowFromChildren(); |
| 330 positionListMarker(); | 331 positionListMarker(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 // assume that all the following ones have too. | 511 // assume that all the following ones have too. |
| 511 // This gives us the opportunity to stop here and avoid | 512 // This gives us the opportunity to stop here and avoid |
| 512 // marking the same nodes again. | 513 // marking the same nodes again. |
| 513 break; | 514 break; |
| 514 } | 515 } |
| 515 item->updateValue(); | 516 item->updateValue(); |
| 516 } | 517 } |
| 517 } | 518 } |
| 518 | 519 |
| 519 } // namespace blink | 520 } // namespace blink |
| OLD | NEW |