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

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

Issue 931423003: Rename rendering/RenderList* to layout/LayoutList* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove spurious LayoutLayerModelObject reference Created 5 years, 10 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
« no previous file with comments | « Source/core/layout/LayoutListItem.cpp ('k') | Source/core/layout/LayoutListMarker.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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef RenderListMarker_h 23 #ifndef LayoutListMarker_h
24 #define RenderListMarker_h 24 #define LayoutListMarker_h
25 25
26 #include "core/rendering/RenderBox.h" 26 #include "core/rendering/RenderBox.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class RenderListItem; 30 class LayoutListItem;
31 31
32 String listMarkerText(EListStyleType, int value); 32 String listMarkerText(EListStyleType, int value);
33 33
34 // Used to render the list item's marker. 34 // Used to render the list item's marker.
35 // The RenderListMarker always has to be a child of a RenderListItem. 35 // The LayoutListMarker always has to be a child of a LayoutListItem.
36 class RenderListMarker final : public RenderBox { 36 class LayoutListMarker final : public RenderBox {
37 public: 37 public:
38 static RenderListMarker* createAnonymous(RenderListItem*); 38 static LayoutListMarker* createAnonymous(LayoutListItem*);
39 39
40 virtual ~RenderListMarker(); 40 virtual ~LayoutListMarker();
41 virtual void destroy() override; 41 virtual void destroy() override;
42 42
43 const String& text() const { return m_text; } 43 const String& text() const { return m_text; }
44 44
45 bool isInside() const; 45 bool isInside() const;
46 46
47 void updateMarginsAndContent(); 47 void updateMarginsAndContent();
48 48
49 IntRect getRelativeMarkerRect(); 49 IntRect getRelativeMarkerRect();
50 LayoutRect localSelectionRect(); 50 LayoutRect localSelectionRect();
51 virtual bool isImage() const override; 51 virtual bool isImage() const override;
52 const StyleImage* image() { return m_image.get(); } 52 const StyleImage* image() { return m_image.get(); }
53 const RenderListItem* listItem() { return m_listItem; } 53 const LayoutListItem* listItem() { return m_listItem; }
54 54
55 static UChar listMarkerSuffix(EListStyleType, int value); 55 static UChar listMarkerSuffix(EListStyleType, int value);
56 56
57 void listItemStyleDidChange(); 57 void listItemStyleDidChange();
58 58
59 private: 59 private:
60 RenderListMarker(RenderListItem*); 60 LayoutListMarker(LayoutListItem*);
61 61
62 virtual const char* renderName() const override { return "RenderListMarker"; } 62 virtual const char* renderName() const override { return "LayoutListMarker"; }
63 virtual void computePreferredLogicalWidths() override; 63 virtual void computePreferredLogicalWidths() override;
64 64
65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectListMarker || RenderBox::isOfType(type); } 65 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectListMarker || RenderBox::isOfType(type); }
66 66
67 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 67 virtual void paint(const PaintInfo&, const LayoutPoint&) override;
68 68
69 virtual void layout() override; 69 virtual void layout() override;
70 70
71 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; 71 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override;
72 72
73 virtual InlineBox* createInlineBox() override; 73 virtual InlineBox* createInlineBox() override;
74 74
75 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override; 75 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override;
76 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override; 76 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override;
77 77
78 bool isText() const { return !isImage(); } 78 bool isText() const { return !isImage(); }
79 79
80 virtual void setSelectionState(SelectionState) override; 80 virtual void setSelectionState(SelectionState) override;
81 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObj ect* paintInvalidationContainer) const override; 81 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObj ect* paintInvalidationContainer) const override;
82 virtual bool canBeSelectionLeaf() const override { return true; } 82 virtual bool canBeSelectionLeaf() const override { return true; }
83 83
84 void updateMargins(); 84 void updateMargins();
85 void updateContent(); 85 void updateContent();
86 86
87 virtual void styleWillChange(StyleDifference, const LayoutStyle& newStyle) o verride; 87 virtual void styleWillChange(StyleDifference, const LayoutStyle& newStyle) o verride;
88 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 88 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride;
89 89
90 String m_text; 90 String m_text;
91 RefPtr<StyleImage> m_image; 91 RefPtr<StyleImage> m_image;
92 RenderListItem* m_listItem; 92 LayoutListItem* m_listItem;
93 }; 93 };
94 94
95 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderListMarker, isListMarker()); 95 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutListMarker, isListMarker());
96 96
97 } // namespace blink 97 } // namespace blink
98 98
99 #endif // RenderListMarker_h 99 #endif // LayoutListMarker_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutListItem.cpp ('k') | Source/core/layout/LayoutListMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698