Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: Source/core/layout/LayoutListItem.h

Issue 778003003: List marker pseudo elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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, 2007, 2009 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserv ed.
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 const String& markerText() const; 54 const String& markerText() const;
55 55
56 void updateListMarkerNumbers(); 56 void updateListMarkerNumbers();
57 57
58 static void updateItemValuesForOrderedList(const HTMLOListElement*); 58 static void updateItemValuesForOrderedList(const HTMLOListElement*);
59 static unsigned itemCountForOrderedList(const HTMLOListElement*); 59 static unsigned itemCountForOrderedList(const HTMLOListElement*);
60 60
61 bool isEmpty() const; 61 bool isEmpty() const;
62 62
63 void setMarker(LayoutListMarker* marker) { m_marker = marker; }
64 LayoutListMarker* marker() const { return m_marker; }
65
63 virtual const char* name() const override { return "LayoutListItem"; } 66 virtual const char* name() const override { return "LayoutListItem"; }
64 67
65 private: 68 private:
66 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectListItem || LayoutBlockFlow::isOfType(type); } 69 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectListItem || LayoutBlockFlow::isOfType(type); }
67 70
68 virtual void willBeDestroyed() override; 71 virtual void willBeDestroyed() override;
69 72
70 virtual void insertedIntoTree() override; 73 virtual void insertedIntoTree() override;
71 virtual void willBeRemovedFromTree() override; 74 virtual void willBeRemovedFromTree() override;
72 75
76 virtual void subtreeDidChange() override;
77
73 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 78 virtual void paint(const PaintInfo&, const LayoutPoint&) override;
74 79
75 virtual void layout() override; 80 virtual void layout() override;
76 81
77 // Returns true if we re-attached and updated the location of the marker. 82 // Returns true if we re-attached and updated the location of the marker.
78 bool updateMarkerLocation(); 83 bool updateMarkerLocation();
79 void updateMarkerLocationAndInvalidateWidth(); 84 void updateMarkerLocationAndInvalidateWidth();
80 85
81 void positionListMarker(); 86 void positionListMarker(LayoutListMarker*);
82 87
83 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; 88 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
84 89
85 virtual void addOverflowFromChildren() override; 90 virtual void addOverflowFromChildren() override;
86 91
87 inline int calcValue() const; 92 inline int calcValue() const;
88 void updateValueNow() const; 93 void updateValueNow() const;
89 void explicitValueChanged(); 94 void explicitValueChanged();
90 95
91 int m_explicitValue; 96 int m_explicitValue;
92 LayoutListMarker* m_marker; 97 LayoutListMarker* m_marker; // Not owned when using listMarkerPseudoElements .
93 mutable int m_value; 98 mutable int m_value;
94 99
95 bool m_hasExplicitValue : 1; 100 bool m_hasExplicitValue : 1;
96 mutable bool m_isValueUpToDate : 1; 101 mutable bool m_isValueUpToDate : 1;
97 bool m_notInList : 1; 102 bool m_notInList : 1;
98 }; 103 };
99 104
100 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutListItem, isListItem()); 105 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutListItem, isListItem());
101 106
102 } // namespace blink 107 } // namespace blink
103 108
104 #endif // LayoutListItem_h 109 #endif // LayoutListItem_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | Source/core/layout/LayoutListItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698