Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: Source/core/rendering/RenderBlock.h

Issue 23737004: Paint flex items atomically, like inline-blocks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 static void paintAsInlineBlock(RenderObject*, PaintInfo&, const LayoutPoint& );
457 protected: 458 protected:
458 virtual void willBeDestroyed(); 459 virtual void willBeDestroyed();
459 460
460 LayoutUnit maxPositiveMarginBefore() const { return m_rareData ? m_rareData- >m_margins.positiveMarginBefore() : RenderBlockRareData::positiveMarginBeforeDef ault(this); } 461 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); } 462 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); } 463 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); } 464 LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData-> m_margins.negativeMarginAfter() : RenderBlockRareData::negativeMarginAfterDefaul t(this); }
464 465
465 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg); 466 void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg);
466 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg); 467 void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg);
(...skipping 24 matching lines...) Expand all
491 492
492 virtual void layout(); 493 virtual void layout();
493 494
494 void layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObject sOnly = false); 495 void layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObject sOnly = false);
495 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa youtScope&); 496 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa youtScope&);
496 497
497 virtual void paint(PaintInfo&, const LayoutPoint&); 498 virtual void paint(PaintInfo&, const LayoutPoint&);
498 virtual void paintObject(PaintInfo&, const LayoutPoint&); 499 virtual void paintObject(PaintInfo&, const LayoutPoint&);
499 virtual void paintChildren(PaintInfo&, const LayoutPoint&); 500 virtual void paintChildren(PaintInfo&, const LayoutPoint&);
500 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); 501 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&);
502 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&);
501 503
502 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed Offset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logica lHeight = 0) const 504 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed Offset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logica lHeight = 0) const
503 { 505 {
504 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo gicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOff set), applyTextIndent); 506 return adjustLogicalRightOffsetForLine(logicalRightFloatOffsetForLine(lo gicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOff set), applyTextIndent);
505 } 507 }
506 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO ffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logical Height = 0) const 508 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO ffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logical Height = 0) const
507 { 509 {
508 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi calTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOffse t), applyTextIndent); 510 return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logi calTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatShapeOffse t), applyTextIndent);
509 } 511 }
510 LayoutUnit logicalRightOffsetForLineIgnoringShapeOutside(LayoutUnit logicalT op, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logicalHeight = 0) const 512 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
1094 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlock()); 1096 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlock());
1095 return static_cast<const RenderBlock*>(object); 1097 return static_cast<const RenderBlock*>(object);
1096 } 1098 }
1097 1099
1098 // This will catch anyone doing an unnecessary cast. 1100 // This will catch anyone doing an unnecessary cast.
1099 void toRenderBlock(const RenderBlock*); 1101 void toRenderBlock(const RenderBlock*);
1100 1102
1101 } // namespace WebCore 1103 } // namespace WebCore
1102 1104
1103 #endif // RenderBlock_h 1105 #endif // RenderBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698