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

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

Issue 294783004: Use tighter typing in table rendering code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo / bug and update copyrights Created 6 years, 7 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { re turn child->marginStart(style()); } 237 LayoutUnit marginStartForChild(const RenderBoxModelObject* child) const { re turn child->marginStart(style()); }
238 LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { retu rn child->marginEnd(style()); } 238 LayoutUnit marginEndForChild(const RenderBoxModelObject* child) const { retu rn child->marginEnd(style()); }
239 void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginStart(value, style()); } 239 void setMarginStartForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginStart(value, style()); }
240 void setMarginEndForChild(RenderBox* child, LayoutUnit value) const { child- >setMarginEnd(value, style()); } 240 void setMarginEndForChild(RenderBox* child, LayoutUnit value) const { child- >setMarginEnd(value, style()); }
241 void setMarginBeforeForChild(RenderBox* child, LayoutUnit value) const { chi ld->setMarginBefore(value, style()); } 241 void setMarginBeforeForChild(RenderBox* child, LayoutUnit value) const { chi ld->setMarginBefore(value, style()); }
242 void setMarginAfterForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginAfter(value, style()); } 242 void setMarginAfterForChild(RenderBox* child, LayoutUnit value) const { chil d->setMarginAfter(value, style()); }
243 LayoutUnit collapsedMarginBeforeForChild(const RenderBox* child) const; 243 LayoutUnit collapsedMarginBeforeForChild(const RenderBox* child) const;
244 LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const; 244 LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const;
245 245
246 virtual void updateFirstLetter(); 246 virtual void updateFirstLetter();
247 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE;
mstensho (USE GERRIT) 2014/05/20 09:34:39 Right... I see why you need this. I wonder what's
247 248
248 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v erticalScrollbarChanged*/) { }; 249 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v erticalScrollbarChanged*/) { }
249 250
250 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>( 0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); } 251 LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>( 0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); }
251 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } 252 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
252 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); } 253 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); }
253 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); } 254 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); }
254 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); } 255 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); }
255 256
256 #ifndef NDEBUG 257 #ifndef NDEBUG
257 void checkPositionedObjectsNeedLayout(); 258 void checkPositionedObjectsNeedLayout();
258 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const; 259 void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const Inline Box* = 0, const char* = 0, const RenderObject* = 0) const;
(...skipping 29 matching lines...) Expand all
288 int beforeMarginInLineDirection(LineDirectionMode) const; 289 int beforeMarginInLineDirection(LineDirectionMode) const;
289 290
290 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; 291 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
291 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE; 292 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE;
292 virtual void paintChildren(PaintInfo&, const LayoutPoint&); 293 virtual void paintChildren(PaintInfo&, const LayoutPoint&);
293 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); 294 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&);
294 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); 295 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&);
295 296
296 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } 297 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
297 298
298 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE;
299
300 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE; 299 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE;
301 virtual void computePreferredLogicalWidths() OVERRIDE; 300 virtual void computePreferredLogicalWidths() OVERRIDE;
302 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const; 301 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const;
303 302
304 virtual int firstLineBoxBaseline() const OVERRIDE; 303 virtual int firstLineBoxBaseline() const OVERRIDE;
305 virtual int inlineBlockBaseline(LineDirectionMode) const OVERRIDE; 304 virtual int inlineBlockBaseline(LineDirectionMode) const OVERRIDE;
306 int lastLineBoxBaseline(LineDirectionMode) const; 305 int lastLineBoxBaseline(LineDirectionMode) const;
307 306
308 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID E; 307 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID E;
309 308
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // FIXME: This is temporary as we move code that accesses block flow 544 // FIXME: This is temporary as we move code that accesses block flow
546 // member variables out of RenderBlock and into RenderBlockFlow. 545 // member variables out of RenderBlock and into RenderBlockFlow.
547 friend class RenderBlockFlow; 546 friend class RenderBlockFlow;
548 }; 547 };
549 548
550 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 549 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
551 550
552 } // namespace WebCore 551 } // namespace WebCore
553 552
554 #endif // RenderBlock_h 553 #endif // RenderBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698