| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } | 184 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } |
| 185 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } | 185 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } |
| 186 | 186 |
| 187 #if ENABLE(ASSERT) | 187 #if ENABLE(ASSERT) |
| 188 void checkPositionedObjectsNeedLayout(); | 188 void checkPositionedObjectsNeedLayout(); |
| 189 #endif | 189 #endif |
| 190 #ifndef NDEBUG | 190 #ifndef NDEBUG |
| 191 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline
Box* = 0, const char* = 0, const RenderObject* = 0) const; | 191 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline
Box* = 0, const char* = 0, const RenderObject* = 0) const; |
| 192 #endif | 192 #endif |
| 193 | 193 |
| 194 // inline-block elements paint all phases atomically. This function ensures
that. Certain other elements | |
| 195 // (flex items) require this behavior as well, and this function exists as a
helper for them. | |
| 196 // It is expected that the caller will call this function independent of the
value of paintInfo.phase. | |
| 197 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint&
); | |
| 198 | |
| 199 bool recalcChildOverflowAfterStyleChange(); | 194 bool recalcChildOverflowAfterStyleChange(); |
| 200 bool recalcOverflowAfterStyleChange(); | 195 bool recalcOverflowAfterStyleChange(); |
| 201 | 196 |
| 202 protected: | 197 protected: |
| 203 virtual void willBeDestroyed() override; | 198 virtual void willBeDestroyed() override; |
| 204 | 199 |
| 205 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&); | 200 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&); |
| 206 | 201 |
| 207 enum PositionedLayoutBehavior { | 202 enum PositionedLayoutBehavior { |
| 208 DefaultLayout, | 203 DefaultLayout, |
| 209 ForcedLayoutAfterContainingBlockMoved | 204 ForcedLayoutAfterContainingBlockMoved |
| 210 }; | 205 }; |
| 211 | 206 |
| 212 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); | 207 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior
= DefaultLayout); |
| 213 | 208 |
| 214 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox* child) const; | 209 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox* child) const; |
| 215 | 210 |
| 216 int beforeMarginInLineDirection(LineDirectionMode) const; | 211 int beforeMarginInLineDirection(LineDirectionMode) const; |
| 217 | 212 |
| 218 virtual void paint(PaintInfo&, const LayoutPoint&) override; | 213 virtual void paint(PaintInfo&, const LayoutPoint&) override; |
| 219 virtual void paintObject(PaintInfo&, const LayoutPoint&) override; | 214 virtual void paintObject(PaintInfo&, const LayoutPoint&) override; |
| 220 virtual void paintChildren(PaintInfo&, const LayoutPoint&); | 215 virtual void paintChildren(PaintInfo&, const LayoutPoint&); |
| 221 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); | |
| 222 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); | |
| 223 | 216 |
| 224 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit
yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } | 217 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit
yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } |
| 225 | 218 |
| 226 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; | 219 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; |
| 227 virtual void computePreferredLogicalWidths() override; | 220 virtual void computePreferredLogicalWidths() override; |
| 228 | 221 |
| 229 virtual int firstLineBoxBaseline() const override; | 222 virtual int firstLineBoxBaseline() const override; |
| 230 virtual int inlineBlockBaseline(LineDirectionMode) const override; | 223 virtual int inlineBlockBaseline(LineDirectionMode) const override; |
| 231 virtual int lastLineBoxBaseline(LineDirectionMode) const; | 224 virtual int lastLineBoxBaseline(LineDirectionMode) const; |
| 232 | 225 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 245 protected: | 238 protected: |
| 246 virtual void addOverflowFromChildren(); | 239 virtual void addOverflowFromChildren(); |
| 247 void addOverflowFromPositionedObjects(); | 240 void addOverflowFromPositionedObjects(); |
| 248 | 241 |
| 249 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) const override; | 242 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition
alOffset, const RenderLayerModelObject* paintContainer = 0) const override; |
| 250 | 243 |
| 251 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox*
); | 244 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox*
); |
| 252 | 245 |
| 253 virtual bool isInlineBlock() const override final { return isInline() && isR
eplaced(); } | 246 virtual bool isInlineBlock() const override final { return isInline() && isR
eplaced(); } |
| 254 | 247 |
| 255 virtual void paintContents(PaintInfo&, const LayoutPoint&); | |
| 256 | |
| 257 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const Hi
tTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTes
tAction); | 248 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const Hi
tTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTes
tAction); |
| 258 | 249 |
| 259 private: | 250 private: |
| 260 virtual RenderObjectChildList* virtualChildren() override final { return chi
ldren(); } | 251 virtual RenderObjectChildList* virtualChildren() override final { return chi
ldren(); } |
| 261 virtual const RenderObjectChildList* virtualChildren() const override final
{ return children(); } | 252 virtual const RenderObjectChildList* virtualChildren() const override final
{ return children(); } |
| 262 | 253 |
| 263 virtual const char* renderName() const override; | 254 virtual const char* renderName() const override; |
| 264 | 255 |
| 265 virtual bool isRenderBlock() const override final { return true; } | 256 virtual bool isRenderBlock() const override final { return true; } |
| 266 | 257 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // member variables out of RenderBlock and into RenderBlockFlow. | 316 // member variables out of RenderBlock and into RenderBlockFlow. |
| 326 friend class RenderBlockFlow; | 317 friend class RenderBlockFlow; |
| 327 friend class RenderParagraph; | 318 friend class RenderParagraph; |
| 328 }; | 319 }; |
| 329 | 320 |
| 330 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 321 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 331 | 322 |
| 332 } // namespace blink | 323 } // namespace blink |
| 333 | 324 |
| 334 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ | 325 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ |
| OLD | NEW |