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

Side by Side Diff: sky/engine/core/rendering/RenderInline.h

Issue 867653005: Remove outline painting on inlines. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
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, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 virtual LayoutUnit marginLeft() const override final; 50 virtual LayoutUnit marginLeft() const override final;
51 virtual LayoutUnit marginRight() const override final; 51 virtual LayoutUnit marginRight() const override final;
52 virtual LayoutUnit marginTop() const override final; 52 virtual LayoutUnit marginTop() const override final;
53 virtual LayoutUnit marginBottom() const override final; 53 virtual LayoutUnit marginBottom() const override final;
54 virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const ove rride final; 54 virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const ove rride final;
55 virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const over ride final; 55 virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const over ride final;
56 virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const over ride final; 56 virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const over ride final;
57 virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const overri de final; 57 virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const overri de final;
58 58
59 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override final;
60 virtual void absoluteQuads(Vector<FloatQuad>&) const override; 59 virtual void absoluteQuads(Vector<FloatQuad>&) const override;
61 60
62 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const override final; 61 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const override final;
63 62
64 IntRect linesBoundingBox() const; 63 IntRect linesBoundingBox() const;
65 LayoutRect linesVisualOverflowBoundingBox() const; 64 LayoutRect linesVisualOverflowBoundingBox() const;
66 65
67 InlineFlowBox* createAndAppendInlineFlowBox(); 66 InlineFlowBox* createAndAppendInlineFlowBox();
68 67
69 void dirtyLineBoxes(bool fullLayout); 68 void dirtyLineBoxes(bool fullLayout);
70 void deleteLineBoxTree(); 69 void deleteLineBoxTree();
71 70
72 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } 71 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; }
73 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; } 72 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; }
74 73
75 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } 74 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); }
76 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } 75 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); }
77 InlineBox* firstLineBoxIncludingCulling() const { return alwaysCreateLineBox es() ? firstLineBox() : culledInlineFirstLineBox(); } 76 InlineBox* firstLineBoxIncludingCulling() const { return alwaysCreateLineBox es() ? firstLineBox() : culledInlineFirstLineBox(); }
78 InlineBox* lastLineBoxIncludingCulling() const { return alwaysCreateLineBoxe s() ? lastLineBox() : culledInlineLastLineBox(); } 77 InlineBox* lastLineBoxIncludingCulling() const { return alwaysCreateLineBoxe s() ? lastLineBox() : culledInlineLastLineBox(); }
79 78
80 LayoutSize offsetForInFlowPositionedInline(const RenderBox& child) const; 79 LayoutSize offsetForInFlowPositionedInline(const RenderBox& child) const;
81 80
82 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) const override final ; 81 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) const override final ;
83 void paintOutline(PaintInfo&, const LayoutPoint&);
84 82
85 bool alwaysCreateLineBoxes() const { return alwaysCreateLineBoxesForRenderIn line(); } 83 bool alwaysCreateLineBoxes() const { return alwaysCreateLineBoxesForRenderIn line(); }
86 void setAlwaysCreateLineBoxes(bool alwaysCreateLineBoxes = true) { setAlways CreateLineBoxesForRenderInline(alwaysCreateLineBoxes); } 84 void setAlwaysCreateLineBoxes(bool alwaysCreateLineBoxes = true) { setAlways CreateLineBoxesForRenderInline(alwaysCreateLineBoxes); }
87 void updateAlwaysCreateLineBoxes(bool fullLayout); 85 void updateAlwaysCreateLineBoxes(bool fullLayout);
88 86
89 virtual LayoutRect localCaretRect(InlineBox*, int, LayoutUnit* extraWidthToE ndOfLine) override final; 87 virtual LayoutRect localCaretRect(InlineBox*, int, LayoutUnit* extraWidthToE ndOfLine) override final;
90 88
91 bool hitTestCulledInline(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset); 89 bool hitTestCulledInline(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset);
92 90
93 protected: 91 protected:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 139
142 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); } 140 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
143 141
144 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override final; 142 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override final;
145 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override final; 143 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override final;
146 144
147 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid e final; 145 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid e final;
148 146
149 virtual void updateFromStyle() override final; 147 virtual void updateFromStyle() override final;
150 148
151 void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutR ect& prevLine, const LayoutRect& thisLine,
152 const LayoutRect& nextLine, const Color);
153
154 RenderObjectChildList m_children; 149 RenderObjectChildList m_children;
155 RenderLineBoxList m_lineBoxes; // All of the line boxes created for this i nline flow. For example, <i>Hello<br>world.</i> will have two <i> line boxes. 150 RenderLineBoxList m_lineBoxes; // All of the line boxes created for this i nline flow. For example, <i>Hello<br>world.</i> will have two <i> line boxes.
156 }; 151 };
157 152
158 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderInline, isRenderInline()); 153 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderInline, isRenderInline());
159 154
160 } // namespace blink 155 } // namespace blink
161 156
162 #endif // SKY_ENGINE_CORE_RENDERING_RENDERINLINE_H_ 157 #endif // SKY_ENGINE_CORE_RENDERING_RENDERINLINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698