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

Side by Side Diff: sky/engine/core/rendering/RenderBlock.h

Issue 688213002: First pass at removing dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/rendering/InlineTextBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 using RenderBoxModelObject::continuation; 176 using RenderBoxModelObject::continuation;
177 using RenderBoxModelObject::setContinuation; 177 using RenderBoxModelObject::setContinuation;
178 178
179 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Render Object*, EDisplay = BLOCK); 179 static RenderBlock* createAnonymousWithParentRendererAndDisplay(const Render Object*, EDisplay = BLOCK);
180 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); } 180 RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return c reateAnonymousWithParentRendererAndDisplay(this, display); }
181 181
182 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare nt) const override; 182 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* pare nt) const override;
183 183
184 // Accessors for logical width/height and margins in the containing block's block-flow direction. 184 // Accessors for logical width/height and margins in the containing block's block-flow direction.
185 LayoutUnit logicalWidthForChild(const RenderBox* child) const { return isHor izontalWritingMode() ? child->width() : child->height(); } 185 LayoutUnit logicalWidthForChild(const RenderBox* child) const { return child ->width(); }
186 LayoutUnit logicalHeightForChild(const RenderBox* child) const { return isHo rizontalWritingMode() ? child->height() : child->width(); } 186 LayoutUnit logicalHeightForChild(const RenderBox* child) const { return chil d->height(); }
187 LayoutSize logicalSizeForChild(const RenderBox* child) const { return isHori zontalWritingMode() ? child->size() : child->size().transposedSize(); } 187 LayoutSize logicalSizeForChild(const RenderBox* child) const { return child- >size(); }
188 LayoutUnit logicalTopForChild(const RenderBox* child) const { return isHoriz ontalWritingMode() ? child->y() : child->x(); } 188 LayoutUnit logicalTopForChild(const RenderBox* child) const { return child-> y(); }
189 LayoutUnit marginBeforeForChild(const RenderBoxModelObject* child) const { r eturn child->marginBefore(style()); } 189 LayoutUnit marginBeforeForChild(const RenderBoxModelObject* child) const { r eturn child->marginBefore(style()); }
190 LayoutUnit marginAfterForChild(const RenderBoxModelObject* child) const { re turn child->marginAfter(style()); } 190 LayoutUnit marginAfterForChild(const RenderBoxModelObject* child) const { re turn child->marginAfter(style()); }
191 LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { re turn child->marginStart(style()); } 191 LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { re turn child->marginStart(style()); }
192 LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { retu rn child->marginEnd(style()); } 192 LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { retu rn child->marginEnd(style()); }
193 void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginStart(value, style()); } 193 void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginStart(value, style()); }
194 void setMarginEndForChild(RenderBox* child, LayoutUnit value) const { child- >setMarginEnd(value, style()); } 194 void setMarginEndForChild(RenderBox* child, LayoutUnit value) const { child- >setMarginEnd(value, style()); }
195 void setMarginBeforeForChild(RenderBox* child, LayoutUnit value) const { chi ld->setMarginBefore(value, style()); } 195 void setMarginBeforeForChild(RenderBox* child, LayoutUnit value) const { chi ld->setMarginBefore(value, style()); }
196 void setMarginAfterForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginAfter(value, style()); } 196 void setMarginAfterForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginAfter(value, style()); }
197 LayoutUnit collapsedMarginBeforeForChild(const RenderBox* child) const; 197 LayoutUnit collapsedMarginBeforeForChild(const RenderBox* child) const;
198 LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const; 198 LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const;
199 199
200 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override; 200 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override;
201 201
202 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v erticalScrollbarChanged*/) { } 202 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v erticalScrollbarChanged*/) { }
203 203
204 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>( 0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); } 204 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>( 0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); }
205 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } 205 LayoutUnit logicalLeftOffsetForContent() const { return borderLeft() + paddi ngLeft(); }
206 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); } 206 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); }
207 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); } 207 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); }
208 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); } 208 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); }
209 209
210 #if ENABLE(ASSERT) 210 #if ENABLE(ASSERT)
211 void checkPositionedObjectsNeedLayout(); 211 void checkPositionedObjectsNeedLayout();
212 #endif 212 #endif
213 #ifndef NDEBUG 213 #ifndef NDEBUG
214 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const; 214 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const;
215 #endif 215 #endif
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // FIXME: This is temporary as we move code that accesses block flow 413 // FIXME: This is temporary as we move code that accesses block flow
414 // member variables out of RenderBlock and into RenderBlockFlow. 414 // member variables out of RenderBlock and into RenderBlockFlow.
415 friend class RenderBlockFlow; 415 friend class RenderBlockFlow;
416 }; 416 };
417 417
418 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 418 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
419 419
420 } // namespace blink 420 } // namespace blink
421 421
422 #endif // RenderBlock_h 422 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineTextBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698