| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 void setShapeInsideInfo(PassOwnPtr<ShapeInsideInfo> value) | 447 void setShapeInsideInfo(PassOwnPtr<ShapeInsideInfo> value) |
| 448 { | 448 { |
| 449 if (!m_rareData) | 449 if (!m_rareData) |
| 450 m_rareData = adoptPtr(new RenderBlockRareData(this)); | 450 m_rareData = adoptPtr(new RenderBlockRareData(this)); |
| 451 m_rareData->m_shapeInsideInfo = value; | 451 m_rareData->m_shapeInsideInfo = value; |
| 452 } | 452 } |
| 453 ShapeInsideInfo* layoutShapeInsideInfo() const; | 453 ShapeInsideInfo* layoutShapeInsideInfo() const; |
| 454 bool allowsShapeInsideInfoSharing() const { return !isInline() && !isFloatin
g(); } | 454 bool allowsShapeInsideInfoSharing() const { return !isInline() && !isFloatin
g(); } |
| 455 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 455 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; |
| 456 | 456 |
| 457 // inline-block elements paint all phases atomically. This function ensures
that. Certain other elements |
| 458 // (grid items, flex items) require this behavior as well, and this function
exists as a helper for them. |
| 459 // It is expected that the caller will call this function independent of the
value of paintInfo.phase. |
| 460 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint&
); |
| 457 protected: | 461 protected: |
| 458 virtual void willBeDestroyed(); | 462 virtual void willBeDestroyed(); |
| 459 | 463 |
| 460 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.positiveMarginBefore() : RenderBlockRareData::positiveMarginBeforeDef
ault(this); } | 464 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.positiveMarginBefore() : RenderBlockRareData::positiveMarginBeforeDef
ault(this); } |
| 461 LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.negativeMarginBefore() : RenderBlockRareData::negativeMarginBeforeDef
ault(this); } | 465 LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData-
>m_margins.negativeMarginBefore() : RenderBlockRareData::negativeMarginBeforeDef
ault(this); } |
| 462 LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->
m_margins.positiveMarginAfter() : RenderBlockRareData::positiveMarginAfterDefaul
t(this); } | 466 LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->
m_margins.positiveMarginAfter() : RenderBlockRareData::positiveMarginAfterDefaul
t(this); } |
| 463 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->
m_margins.negativeMarginAfter() : RenderBlockRareData::negativeMarginAfterDefaul
t(this); } | 467 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->
m_margins.negativeMarginAfter() : RenderBlockRareData::negativeMarginAfterDefaul
t(this); } |
| 464 | 468 |
| 465 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); | 469 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); |
| 466 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); | 470 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 491 | 495 |
| 492 virtual void layout(); | 496 virtual void layout(); |
| 493 | 497 |
| 494 void layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObject
sOnly = false); | 498 void layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObject
sOnly = false); |
| 495 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa
youtScope&); | 499 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa
youtScope&); |
| 496 | 500 |
| 497 virtual void paint(PaintInfo&, const LayoutPoint&); | 501 virtual void paint(PaintInfo&, const LayoutPoint&); |
| 498 virtual void paintObject(PaintInfo&, const LayoutPoint&); | 502 virtual void paintObject(PaintInfo&, const LayoutPoint&); |
| 499 virtual void paintChildren(PaintInfo&, const LayoutPoint&); | 503 virtual void paintChildren(PaintInfo&, const LayoutPoint&); |
| 500 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); | 504 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); |
| 505 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); |
| 501 | 506 |
| 502 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logica
lHeight = 0) const | 507 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logica
lHeight = 0) const |
| 503 { | 508 { |
| 504 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOff
set), applyTextIndent); | 509 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo
gicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOff
set), applyTextIndent); |
| 505 } | 510 } |
| 506 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logical
Height = 0) const | 511 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logical
Height = 0) const |
| 507 { | 512 { |
| 508 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOffse
t), applyTextIndent); | 513 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi
calTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOffse
t), applyTextIndent); |
| 509 } | 514 } |
| 510 LayoutUnit logicalRightOffsetForLineIgnoringShapeOutside(LayoutUnit logicalT
op, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining =
0, LayoutUnit logicalHeight = 0) const | 515 LayoutUnit logicalRightOffsetForLineIgnoringShapeOutside(LayoutUnit logicalT
op, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining =
0, LayoutUnit logicalHeight = 0) const |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlock()); | 1099 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlock()); |
| 1095 return static_cast<const RenderBlock*>(object); | 1100 return static_cast<const RenderBlock*>(object); |
| 1096 } | 1101 } |
| 1097 | 1102 |
| 1098 // This will catch anyone doing an unnecessary cast. | 1103 // This will catch anyone doing an unnecessary cast. |
| 1099 void toRenderBlock(const RenderBlock*); | 1104 void toRenderBlock(const RenderBlock*); |
| 1100 | 1105 |
| 1101 } // namespace WebCore | 1106 } // namespace WebCore |
| 1102 | 1107 |
| 1103 #endif // RenderBlock_h | 1108 #endif // RenderBlock_h |
| OLD | NEW |