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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 using namespace HTMLNames; | 36 using namespace HTMLNames; |
37 | 37 |
38 LayoutListItem::LayoutListItem(Element* element) | 38 LayoutListItem::LayoutListItem(Element* element) |
39 : LayoutBlockFlow(element) | 39 : LayoutBlockFlow(element) |
40 , m_marker(nullptr) | 40 , m_marker(nullptr) |
41 , m_hasExplicitValue(false) | 41 , m_hasExplicitValue(false) |
42 , m_isValueUpToDate(false) | 42 , m_isValueUpToDate(false) |
43 , m_notInList(false) | |
44 { | 43 { |
45 setInline(false); | 44 setInline(false); |
46 | 45 |
47 setConsumesSubtreeChangeNotification(); | 46 setConsumesSubtreeChangeNotification(); |
48 registerSubtreeChangeListenerOnDescendants(true); | 47 registerSubtreeChangeListenerOnDescendants(true); |
49 } | 48 } |
50 | 49 |
51 void LayoutListItem::styleDidChange(StyleDifference diff, const ComputedStyle* o
ldStyle) | 50 void LayoutListItem::styleDidChange(StyleDifference diff, const ComputedStyle* o
ldStyle) |
52 { | 51 { |
53 LayoutBlockFlow::styleDidChange(diff, oldStyle); | 52 LayoutBlockFlow::styleDidChange(diff, oldStyle); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 { | 460 { |
462 ASSERT(node()); | 461 ASSERT(node()); |
463 | 462 |
464 if (!m_hasExplicitValue) | 463 if (!m_hasExplicitValue) |
465 return; | 464 return; |
466 m_hasExplicitValue = false; | 465 m_hasExplicitValue = false; |
467 m_isValueUpToDate = false; | 466 m_isValueUpToDate = false; |
468 explicitValueChanged(); | 467 explicitValueChanged(); |
469 } | 468 } |
470 | 469 |
471 void LayoutListItem::setNotInList(bool notInList) | |
472 { | |
473 m_notInList = notInList; | |
474 } | |
475 | |
476 static LayoutListItem* previousOrNextItem(bool isListReversed, Node* list, Layou
tListItem* item) | 470 static LayoutListItem* previousOrNextItem(bool isListReversed, Node* list, Layou
tListItem* item) |
477 { | 471 { |
478 return isListReversed ? previousListItem(list, item) : nextListItem(list, it
em); | 472 return isListReversed ? previousListItem(list, item) : nextListItem(list, it
em); |
479 } | 473 } |
480 | 474 |
481 void LayoutListItem::updateListMarkerNumbers() | 475 void LayoutListItem::updateListMarkerNumbers() |
482 { | 476 { |
483 // If distribution recalc is needed, updateListMarkerNumber will be re-invok
ed | 477 // If distribution recalc is needed, updateListMarkerNumber will be re-invok
ed |
484 // after distribution is calculated. | 478 // after distribution is calculated. |
485 if (node()->document().childNeedsDistributionRecalc()) | 479 if (node()->document().childNeedsDistributionRecalc()) |
(...skipping 22 matching lines...) Expand all Loading... |
508 // assume that all the following ones have too. | 502 // assume that all the following ones have too. |
509 // This gives us the opportunity to stop here and avoid | 503 // This gives us the opportunity to stop here and avoid |
510 // marking the same nodes again. | 504 // marking the same nodes again. |
511 break; | 505 break; |
512 } | 506 } |
513 item->updateValue(); | 507 item->updateValue(); |
514 } | 508 } |
515 } | 509 } |
516 | 510 |
517 } // namespace blink | 511 } // namespace blink |
OLD | NEW |