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, 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 22 matching lines...) Expand all Loading... | |
33 | 33 |
34 // Used to layout the list item's marker. | 34 // Used to layout the list item's marker. |
35 // The LayoutListMarker always has to be a child of a LayoutListItem. | 35 // The LayoutListMarker always has to be a child of a LayoutListItem. |
36 class LayoutListMarker final : public LayoutBox { | 36 class LayoutListMarker final : public LayoutBox { |
37 public: | 37 public: |
38 static LayoutListMarker* createAnonymous(LayoutListItem*); | 38 static LayoutListMarker* createAnonymous(LayoutListItem*); |
39 ~LayoutListMarker() override; | 39 ~LayoutListMarker() override; |
40 | 40 |
41 const String& text() const { return m_text; } | 41 const String& text() const { return m_text; } |
42 | 42 |
43 // A reduced set of list style categories allowing for more concise expressi on | |
44 // of list style specific logic. | |
45 enum SimplifiedListStyle { | |
46 NoneSimpleStyle, | |
47 SymbolSimpleStyle, | |
48 LanguageSimpleStyle | |
49 }; | |
50 | |
51 // Returns the list's style as one of a reduced high level categorical set o f styles. | |
52 SimplifiedListStyle simplifiedListStyle() const; | |
eae
2015/10/12 06:02:01
listStyleCategory might be a better name as simpli
wkorman
2015/10/14 01:55:30
Done.
| |
43 bool isInside() const; | 53 bool isInside() const; |
44 | 54 |
45 void updateMarginsAndContent(); | 55 void updateMarginsAndContent(); |
46 | 56 |
47 IntRect getRelativeMarkerRect() const; | 57 IntRect getRelativeMarkerRect() const; |
48 LayoutRect localSelectionRect() const; | 58 LayoutRect localSelectionRect() const; |
49 bool isImage() const override; | 59 bool isImage() const override; |
50 const StyleImage* image() const { return m_image.get(); } | 60 const StyleImage* image() const { return m_image.get(); } |
51 const LayoutListItem* listItem() const { return m_listItem; } | 61 const LayoutListItem* listItem() const { return m_listItem; } |
52 | 62 |
(...skipping 23 matching lines...) Expand all Loading... | |
76 | 86 |
77 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; | 87 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; |
78 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override; | 88 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override; |
79 | 89 |
80 bool isText() const { return !isImage(); } | 90 bool isText() const { return !isImage(); } |
81 | 91 |
82 void setSelectionState(SelectionState) override; | 92 void setSelectionState(SelectionState) override; |
83 LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObject* pai ntInvalidationContainer) const override; | 93 LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObject* pai ntInvalidationContainer) const override; |
84 bool canBeSelectionLeaf() const override { return true; } | 94 bool canBeSelectionLeaf() const override { return true; } |
85 | 95 |
96 LayoutUnit getWidthOfTextWithSuffix(UChar* suffix, int suffixLength) const; | |
86 void updateMargins(); | 97 void updateMargins(); |
87 void updateContent(); | 98 void updateContent(); |
88 | 99 |
89 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid e; | 100 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid e; |
90 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; | 101 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; |
91 | 102 |
92 String m_text; | 103 String m_text; |
93 RefPtrWillBePersistent<StyleImage> m_image; | 104 RefPtrWillBePersistent<StyleImage> m_image; |
94 LayoutListItem* m_listItem; | 105 LayoutListItem* m_listItem; |
95 }; | 106 }; |
96 | 107 |
97 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutListMarker, isListMarker()); | 108 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutListMarker, isListMarker()); |
98 | 109 |
99 } // namespace blink | 110 } // namespace blink |
100 | 111 |
101 #endif // LayoutListMarker_h | 112 #endif // LayoutListMarker_h |
OLD | NEW |