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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } | 248 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM
ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } |
249 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } | 249 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo
rContent() + availableLogicalWidth(); } |
250 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } | 250 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire
ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor
Content(); } |
251 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } | 251 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec
tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC
ontent(); } |
252 | 252 |
253 #ifndef NDEBUG | 253 #ifndef NDEBUG |
254 void checkPositionedObjectsNeedLayout(); | 254 void checkPositionedObjectsNeedLayout(); |
255 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline
Box* = 0, const char* = 0, const RenderObject* = 0) const; | 255 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline
Box* = 0, const char* = 0, const RenderObject* = 0) const; |
256 #endif | 256 #endif |
257 | 257 |
258 ShapeInsideInfo* ensureShapeInsideInfo() | 258 ShapeInsideInfo& ensureShapeInsideInfo() |
259 { | 259 { |
260 if (!m_rareData || !m_rareData->m_shapeInsideInfo) | 260 if (!m_rareData || !m_rareData->m_shapeInsideInfo) |
261 setShapeInsideInfo(ShapeInsideInfo::createInfo(this)); | 261 setShapeInsideInfo(ShapeInsideInfo::createInfo(*this)); |
262 return m_rareData->m_shapeInsideInfo.get(); | 262 return *m_rareData->m_shapeInsideInfo; |
263 } | 263 } |
264 ShapeInsideInfo* shapeInsideInfo() const | 264 ShapeInsideInfo* shapeInsideInfo() const |
265 { | 265 { |
266 return m_rareData && m_rareData->m_shapeInsideInfo && ShapeInsideInfo::i
sEnabledFor(this) ? m_rareData->m_shapeInsideInfo.get() : 0; | 266 return m_rareData && m_rareData->m_shapeInsideInfo && ShapeInsideInfo::i
sEnabledFor(*this) ? m_rareData->m_shapeInsideInfo.get() : 0; |
267 } | 267 } |
268 void setShapeInsideInfo(PassOwnPtr<ShapeInsideInfo> value) | 268 void setShapeInsideInfo(PassOwnPtr<ShapeInsideInfo> value) |
269 { | 269 { |
270 if (!m_rareData) | 270 if (!m_rareData) |
271 m_rareData = adoptPtr(new RenderBlockRareData()); | 271 m_rareData = adoptPtr(new RenderBlockRareData()); |
272 m_rareData->m_shapeInsideInfo = value; | 272 m_rareData->m_shapeInsideInfo = value; |
273 } | 273 } |
274 ShapeInsideInfo* layoutShapeInsideInfo() const; | 274 ShapeInsideInfo* layoutShapeInsideInfo() const; |
275 bool allowsShapeInsideInfoSharing(const RenderBlock* other) const; | 275 bool allowsShapeInsideInfoSharing(const RenderBlock* other) const; |
276 LayoutSize logicalOffsetFromShapeAncestorContainer(const RenderBlock* contai
ner) const; | 276 LayoutSize logicalOffsetFromShapeAncestorContainer(const RenderBlock* contai
ner) const; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 return false; | 578 return false; |
579 } | 579 } |
580 return true; | 580 return true; |
581 } | 581 } |
582 | 582 |
583 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 583 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
584 | 584 |
585 } // namespace WebCore | 585 } // namespace WebCore |
586 | 586 |
587 #endif // RenderBlock_h | 587 #endif // RenderBlock_h |
OLD | NEW |