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

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

Issue 390173003: When accessing line boxes, use RenderBlockFlow instead of RenderBlock. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: make line box methods protected Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | 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-2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are 10 * modification, are permitted provided that the following conditions are
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 { 79 {
80 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(posi tion, shouldIndentText, logicalHeight) 80 return style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(posi tion, shouldIndentText, logicalHeight)
81 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT ext, logicalHeight); 81 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT ext, logicalHeight);
82 } 82 }
83 LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, Layo utUnit logicalHeight = 0) const 83 LayoutUnit endOffsetForLine(LayoutUnit position, bool shouldIndentText, Layo utUnit logicalHeight = 0) const
84 { 84 {
85 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos ition, shouldIndentText, logicalHeight) 85 return !style()->isLeftToRightDirection() ? logicalLeftOffsetForLine(pos ition, shouldIndentText, logicalHeight)
86 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT ext, logicalHeight); 86 : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentT ext, logicalHeight);
87 } 87 }
88 88
89 // FIXME-BLOCKFLOW: Move this into RenderBlockFlow once there are no calls
Julien - ping for review 2014/07/18 21:10:50 I think we should tie that to a bug if we have one
90 // in RenderBlock.
91 using RenderBlock::lineBoxes;
92 using RenderBlock::firstLineBox;
93 using RenderBlock::lastLineBox;
94 using RenderBlock::firstRootBox;
95 using RenderBlock::lastRootBox;
96
89 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position) OVERRIDE; 97 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position) OVERRIDE;
90 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position) OVERRIDE; 98 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position) OVERRIDE;
91 99
92 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox* child, LayoutUnit childMarginStart); 100 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox* child, LayoutUnit childMarginStart);
93 101
94 RootInlineBox* createAndAppendRootInlineBox(); 102 RootInlineBox* createAndAppendRootInlineBox();
95 103
96 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo l inLayout = true); 104 void markAllDescendantsWithFloatsForLayout(RenderBox* floatToRemove = 0, boo l inLayout = true);
97 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0); 105 void markSiblingsWithFloatsForLayout(RenderBox* floatToRemove = 0);
98 106
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 506
499 // END METHODS DEFINED IN RenderBlockLineLayout 507 // END METHODS DEFINED IN RenderBlockLineLayout
500 508
501 }; 509 };
502 510
503 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow()); 511 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow());
504 512
505 } // namespace WebCore 513 } // namespace WebCore
506 514
507 #endif // RenderBlockFlow_h 515 #endif // RenderBlockFlow_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698