Chromium Code Reviews| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } | 247 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } |
| 248 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); } | 248 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); } |
| 249 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); } | 249 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); } |
| 250 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); } | 250 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); } |
| 251 | 251 |
| 252 #ifndef NDEBUG | 252 #ifndef NDEBUG |
| 253 void checkPositionedObjectsNeedLayout(); | 253 void checkPositionedObjectsNeedLayout(); |
| 254 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const; | 254 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const; |
| 255 #endif | 255 #endif |
| 256 | 256 |
| 257 ShapeInsideInfo* ensureShapeInsideInfo() | 257 ShapeInsideInfo& ensureShapeInsideInfo() |
| 258 { | 258 { |
| 259 if (!m_rareData || !m_rareData->m_shapeInsideInfo) | 259 if (!m_rareData || !m_rareData->m_shapeInsideInfo) |
| 260 setShapeInsideInfo(ShapeInsideInfo::createInfo(this)); | 260 setShapeInsideInfo(ShapeInsideInfo::createInfo(*this)); |
| 261 return m_rareData->m_shapeInsideInfo.get(); | 261 return *m_rareData->m_shapeInsideInfo; |
| 262 } | 262 } |
| 263 ShapeInsideInfo* shapeInsideInfo() const | 263 ShapeInsideInfo* shapeInsideInfo() const |
| 264 { | 264 { |
| 265 return m_rareData && m_rareData->m_shapeInsideInfo && ShapeInsideInfo::i sEnabledFor(this) ? m_rareData->m_shapeInsideInfo.get() : 0; | 265 return m_rareData && m_rareData->m_shapeInsideInfo && ShapeInsideInfo::i sEnabledFor(*this) ? m_rareData->m_shapeInsideInfo.get() : 0; |
| 266 } | 266 } |
| 267 void setShapeInsideInfo(PassOwnPtr<ShapeInsideInfo> value) | 267 void setShapeInsideInfo(PassOwnPtr<ShapeInsideInfo> value) |
| 268 { | 268 { |
| 269 if (!m_rareData) | 269 if (!m_rareData) |
| 270 m_rareData = adoptPtr(new RenderBlockRareData()); | 270 m_rareData = adoptPtr(new RenderBlockRareData()); |
| 271 | |
|
rwlbuis
2014/03/04 14:21:13
I wouldn't do style changes in this patch.
| |
| 271 m_rareData->m_shapeInsideInfo = value; | 272 m_rareData->m_shapeInsideInfo = value; |
| 272 } | 273 } |
| 273 ShapeInsideInfo* layoutShapeInsideInfo() const; | 274 ShapeInsideInfo* layoutShapeInsideInfo() const; |
| 274 bool allowsShapeInsideInfoSharing(const RenderBlock* other) const; | 275 bool allowsShapeInsideInfoSharing(const RenderBlock* other) const; |
| 275 LayoutSize logicalOffsetFromShapeAncestorContainer(const RenderBlock* contai ner) const; | 276 LayoutSize logicalOffsetFromShapeAncestorContainer(const RenderBlock* contai ner) const; |
| 276 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; | 277 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE; |
| 277 | 278 |
| 278 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements | 279 // inline-block elements paint all phases atomically. This function ensures that. Certain other elements |
| 279 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them. | 280 // (grid items, flex items) require this behavior as well, and this function exists as a helper for them. |
| 280 // It is expected that the caller will call this function independent of the value of paintInfo.phase. | 281 // It is expected that the caller will call this function independent of the value of paintInfo.phase. |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 577 return false; | 578 return false; |
| 578 } | 579 } |
| 579 return true; | 580 return true; |
| 580 } | 581 } |
| 581 | 582 |
| 582 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 583 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
| 583 | 584 |
| 584 } // namespace WebCore | 585 } // namespace WebCore |
| 585 | 586 |
| 586 #endif // RenderBlock_h | 587 #endif // RenderBlock_h |
| OLD | NEW |