| 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 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 virtual void setSelectionState(SelectionState) override; | 151 virtual void setSelectionState(SelectionState) override; |
| 152 | 152 |
| 153 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co
nst LayoutRect& logicalRect); | 153 LayoutRect logicalRectToPhysicalRect(const LayoutPoint& physicalPosition, co
nst LayoutRect& logicalRect); |
| 154 | 154 |
| 155 // Helper methods for computing line counts and heights for line counts. | 155 // Helper methods for computing line counts and heights for line counts. |
| 156 virtual RootInlineBox* lineAtIndex(int) const; | 156 virtual RootInlineBox* lineAtIndex(int) const; |
| 157 virtual int lineCount(const RootInlineBox* = 0, bool* = 0) const; | 157 virtual int lineCount(const RootInlineBox* = 0, bool* = 0) const; |
| 158 void clearTruncation(); | 158 void clearTruncation(); |
| 159 | 159 |
| 160 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Render
Object*, EDisplay = PARAGRAPH); | |
| 161 RenderBlock* createAnonymousBlock(EDisplay display = PARAGRAPH) const { retu
rn createAnonymousWithParentRendererAndDisplay(this, display); } | |
| 162 | |
| 163 // Accessors for logical width/height and margins in the containing block's
block-flow direction. | 160 // Accessors for logical width/height and margins in the containing block's
block-flow direction. |
| 164 LayoutUnit logicalWidthForChild(const RenderBox* child) const { return child
->width(); } | 161 LayoutUnit logicalWidthForChild(const RenderBox* child) const { return child
->width(); } |
| 165 LayoutUnit logicalHeightForChild(const RenderBox* child) const { return chil
d->height(); } | 162 LayoutUnit logicalHeightForChild(const RenderBox* child) const { return chil
d->height(); } |
| 166 LayoutSize logicalSizeForChild(const RenderBox* child) const { return child-
>size(); } | 163 LayoutSize logicalSizeForChild(const RenderBox* child) const { return child-
>size(); } |
| 167 LayoutUnit logicalTopForChild(const RenderBox* child) const { return child->
y(); } | 164 LayoutUnit logicalTopForChild(const RenderBox* child) const { return child->
y(); } |
| 168 LayoutUnit marginBeforeForChild(const RenderBoxModelObject* child) const { r
eturn child->marginBefore(style()); } | 165 LayoutUnit marginBeforeForChild(const RenderBoxModelObject* child) const { r
eturn child->marginBefore(style()); } |
| 169 LayoutUnit marginAfterForChild(const RenderBoxModelObject* child) const { re
turn child->marginAfter(style()); } | 166 LayoutUnit marginAfterForChild(const RenderBoxModelObject* child) const { re
turn child->marginAfter(style()); } |
| 170 LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { re
turn child->marginStart(style()); } | 167 LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { re
turn child->marginStart(style()); } |
| 171 LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { retu
rn child->marginEnd(style()); } | 168 LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { retu
rn child->marginEnd(style()); } |
| 172 void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { chil
d->setMarginStart(value, style()); } | 169 void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { chil
d->setMarginStart(value, style()); } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 private: | 247 private: |
| 251 virtual RenderObjectChildList* virtualChildren() override final { return chi
ldren(); } | 248 virtual RenderObjectChildList* virtualChildren() override final { return chi
ldren(); } |
| 252 virtual const RenderObjectChildList* virtualChildren() const override final
{ return children(); } | 249 virtual const RenderObjectChildList* virtualChildren() const override final
{ return children(); } |
| 253 | 250 |
| 254 virtual const char* renderName() const override; | 251 virtual const char* renderName() const override; |
| 255 | 252 |
| 256 virtual bool isRenderBlock() const override final { return true; } | 253 virtual bool isRenderBlock() const override final { return true; } |
| 257 | 254 |
| 258 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final
{ m_lineBoxes.dirtyLinesFromChangedChild(this, child); } | 255 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final
{ m_lineBoxes.dirtyLinesFromChangedChild(this, child); } |
| 259 | 256 |
| 260 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj
ect* beforeChild = 0); | |
| 261 | |
| 262 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants
Map*&, TrackedContainerMap*&); | 257 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants
Map*&, TrackedContainerMap*&); |
| 263 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc
endantsMap*&, TrackedContainerMap*&); | 258 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc
endantsMap*&, TrackedContainerMap*&); |
| 264 | 259 |
| 265 void paintSelection(PaintInfo&, const LayoutPoint&); | 260 void paintSelection(PaintInfo&, const LayoutPoint&); |
| 266 void paintCarets(PaintInfo&, const LayoutPoint&); | 261 void paintCarets(PaintInfo&, const LayoutPoint&); |
| 267 | 262 |
| 268 bool hasCaret() const; | 263 bool hasCaret() const; |
| 269 | 264 |
| 270 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline | 265 // Obtains the nearest enclosing block (including this block) that contribut
es a first-line style to our inline |
| 271 // children. | 266 // children. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 // FIXME: This is temporary as we move code that accesses block flow | 305 // FIXME: This is temporary as we move code that accesses block flow |
| 311 // member variables out of RenderBlock and into RenderParagraph. | 306 // member variables out of RenderBlock and into RenderParagraph. |
| 312 friend class RenderParagraph; | 307 friend class RenderParagraph; |
| 313 }; | 308 }; |
| 314 | 309 |
| 315 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 310 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 316 | 311 |
| 317 } // namespace blink | 312 } // namespace blink |
| 318 | 313 |
| 319 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ | 314 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ |
| OLD | NEW |