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

Side by Side Diff: Source/core/rendering/RenderListMarker.h

Issue 590413005: Move paint code from RenderListMarker/RenderListItem to ListMarkerPainter/ListItemPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/paint/ListMarkerPainter.cpp ('k') | Source/core/rendering/RenderListMarker.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 29 matching lines...) Expand all
40 virtual ~RenderListMarker(); 40 virtual ~RenderListMarker();
41 virtual void destroy() OVERRIDE; 41 virtual void destroy() OVERRIDE;
42 virtual void trace(Visitor*) OVERRIDE; 42 virtual void trace(Visitor*) OVERRIDE;
43 43
44 const String& text() const { return m_text; } 44 const String& text() const { return m_text; }
45 45
46 bool isInside() const; 46 bool isInside() const;
47 47
48 void updateMarginsAndContent(); 48 void updateMarginsAndContent();
49 49
50 IntRect getRelativeMarkerRect();
51 LayoutRect localSelectionRect();
52 virtual bool isImage() const OVERRIDE;
53 const StyleImage* image() { return m_image.get(); }
54 const RenderListItem* listItem() { return m_listItem.get(); }
55
56 static UChar listMarkerSuffix(EListStyleType, int value);
57
50 private: 58 private:
51 RenderListMarker(RenderListItem*); 59 RenderListMarker(RenderListItem*);
52 60
53 virtual const char* renderName() const OVERRIDE { return "RenderListMarker"; } 61 virtual const char* renderName() const OVERRIDE { return "RenderListMarker"; }
54 virtual void computePreferredLogicalWidths() OVERRIDE; 62 virtual void computePreferredLogicalWidths() OVERRIDE;
55 63
56 virtual bool isListMarker() const OVERRIDE { return true; } 64 virtual bool isListMarker() const OVERRIDE { return true; }
57 65
58 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; 66 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
59 67
60 virtual void layout() OVERRIDE; 68 virtual void layout() OVERRIDE;
61 69
62 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; 70 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
63 71
64 virtual InlineBox* createInlineBox() OVERRIDE; 72 virtual InlineBox* createInlineBox() OVERRIDE;
65 73
66 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const OVERRIDE; 74 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const OVERRIDE;
67 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE; 75 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE;
68 76
69 virtual bool isImage() const OVERRIDE;
70 bool isText() const { return !isImage(); } 77 bool isText() const { return !isImage(); }
71 78
72 virtual void setSelectionState(SelectionState) OVERRIDE; 79 virtual void setSelectionState(SelectionState) OVERRIDE;
73 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer) const OVERRIDE; 80 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer) const OVERRIDE;
74 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; } 81 virtual bool canBeSelectionLeaf() const OVERRIDE { return true; }
75 82
76 void updateMargins(); 83 void updateMargins();
77 void updateContent(); 84 void updateContent();
78 85
79 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; 86 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE;
80 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 87 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
81 88
82 IntRect getRelativeMarkerRect();
83 LayoutRect localSelectionRect();
84
85 String m_text; 89 String m_text;
86 RefPtr<StyleImage> m_image; 90 RefPtr<StyleImage> m_image;
87 RawPtrWillBeMember<RenderListItem> m_listItem; 91 RawPtrWillBeMember<RenderListItem> m_listItem;
88 }; 92 };
89 93
90 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderListMarker, isListMarker()); 94 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderListMarker, isListMarker());
91 95
92 } // namespace blink 96 } // namespace blink
93 97
94 #endif // RenderListMarker_h 98 #endif // RenderListMarker_h
OLDNEW
« no previous file with comments | « Source/core/paint/ListMarkerPainter.cpp ('k') | Source/core/rendering/RenderListMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698