| 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, 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void deleteLineBoxTree(); | 67 void deleteLineBoxTree(); |
| 68 | 68 |
| 69 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } | 69 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } |
| 70 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; } | 70 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; } |
| 71 | 71 |
| 72 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 72 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
| 73 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 73 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
| 74 InlineBox* firstLineBoxIncludingCulling() const { return alwaysCreateLineBox
es() ? firstLineBox() : culledInlineFirstLineBox(); } | 74 InlineBox* firstLineBoxIncludingCulling() const { return alwaysCreateLineBox
es() ? firstLineBox() : culledInlineFirstLineBox(); } |
| 75 InlineBox* lastLineBoxIncludingCulling() const { return alwaysCreateLineBoxe
s() ? lastLineBox() : culledInlineLastLineBox(); } | 75 InlineBox* lastLineBoxIncludingCulling() const { return alwaysCreateLineBoxe
s() ? lastLineBox() : culledInlineLastLineBox(); } |
| 76 | 76 |
| 77 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) const override final
; | 77 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderBox* paintContainer = 0) const override final; |
| 78 | 78 |
| 79 bool alwaysCreateLineBoxes() const { return alwaysCreateLineBoxesForRenderIn
line(); } | 79 bool alwaysCreateLineBoxes() const { return alwaysCreateLineBoxesForRenderIn
line(); } |
| 80 void setAlwaysCreateLineBoxes(bool alwaysCreateLineBoxes = true) { setAlways
CreateLineBoxesForRenderInline(alwaysCreateLineBoxes); } | 80 void setAlwaysCreateLineBoxes(bool alwaysCreateLineBoxes = true) { setAlways
CreateLineBoxesForRenderInline(alwaysCreateLineBoxes); } |
| 81 void updateAlwaysCreateLineBoxes(bool fullLayout); | 81 void updateAlwaysCreateLineBoxes(bool fullLayout); |
| 82 | 82 |
| 83 virtual LayoutRect localCaretRect(InlineBox*, int, LayoutUnit* extraWidthToE
ndOfLine) override final; | 83 virtual LayoutRect localCaretRect(InlineBox*, int, LayoutUnit* extraWidthToE
ndOfLine) override final; |
| 84 | 84 |
| 85 bool hitTestCulledInline(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset); | 85 bool hitTestCulledInline(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 107 void generateLineBoxRects(GeneratorContext& yield) const; | 107 void generateLineBoxRects(GeneratorContext& yield) const; |
| 108 template<typename GeneratorContext> | 108 template<typename GeneratorContext> |
| 109 void generateCulledLineBoxRects(GeneratorContext& yield, const RenderInline*
container) const; | 109 void generateCulledLineBoxRects(GeneratorContext& yield, const RenderInline*
container) const; |
| 110 | 110 |
| 111 virtual void layout() override final { ASSERT_NOT_REACHED(); } // Do nothing
for layout() | 111 virtual void layout() override final { ASSERT_NOT_REACHED(); } // Do nothing
for layout() |
| 112 | 112 |
| 113 virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layer
s) override final; | 113 virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layer
s) override final; |
| 114 | 114 |
| 115 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override f
inal; | 115 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override f
inal; |
| 116 | 116 |
| 117 virtual LayerType layerTypeRequired() const override { return NoLayer; } | |
| 118 | |
| 119 virtual LayoutUnit offsetLeft() const override final; | 117 virtual LayoutUnit offsetLeft() const override final; |
| 120 virtual LayoutUnit offsetTop() const override final; | 118 virtual LayoutUnit offsetTop() const override final; |
| 121 virtual LayoutUnit offsetWidth() const override final { return linesBounding
Box().width(); } | 119 virtual LayoutUnit offsetWidth() const override final { return linesBounding
Box().width(); } |
| 122 virtual LayoutUnit offsetHeight() const override final { return linesBoundin
gBox().height(); } | 120 virtual LayoutUnit offsetHeight() const override final { return linesBoundin
gBox().height(); } |
| 123 | 121 |
| 124 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const
override; | 122 virtual void mapLocalToContainer(const RenderBox* paintInvalidationContainer
, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const override; |
| 125 | 123 |
| 126 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override f
inal; | 124 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override f
inal; |
| 127 | 125 |
| 128 virtual IntRect borderBoundingBox() const override final | 126 virtual IntRect borderBoundingBox() const override final |
| 129 { | 127 { |
| 130 IntRect boundingBox = linesBoundingBox(); | 128 IntRect boundingBox = linesBoundingBox(); |
| 131 return IntRect(0, 0, boundingBox.width(), boundingBox.height()); | 129 return IntRect(0, 0, boundingBox.width(), boundingBox.height()); |
| 132 } | 130 } |
| 133 | 131 |
| 134 virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby | 132 virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby |
| 135 | 133 |
| 136 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final
{ m_lineBoxes.dirtyLinesFromChangedChild(this, child); } | 134 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final
{ m_lineBoxes.dirtyLinesFromChangedChild(this, child); } |
| 137 | 135 |
| 138 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override final; | 136 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override final; |
| 139 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override final; | 137 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override final; |
| 140 | 138 |
| 141 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid
e final; | 139 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) overrid
e final; |
| 142 | 140 |
| 143 virtual void updateFromStyle() override final; | |
| 144 | |
| 145 RenderObjectChildList m_children; | 141 RenderObjectChildList m_children; |
| 146 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. | 142 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. |
| 147 }; | 143 }; |
| 148 | 144 |
| 149 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderInline, isRenderInline()); | 145 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderInline, isRenderInline()); |
| 150 | 146 |
| 151 } // namespace blink | 147 } // namespace blink |
| 152 | 148 |
| 153 #endif // SKY_ENGINE_CORE_RENDERING_RENDERINLINE_H_ | 149 #endif // SKY_ENGINE_CORE_RENDERING_RENDERINLINE_H_ |
| OLD | NEW |