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

Side by Side Diff: sky/engine/core/rendering/InlineBox.cpp

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
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/EllipsisBox.cpp ('k') | sky/engine/core/rendering/InlineFlowBox.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) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (renderer().isReplaced()) 190 if (renderer().isReplaced())
191 toRenderBox(renderer()).move(dx, dy); 191 toRenderBox(renderer()).move(dx, dy);
192 } 192 }
193 193
194 void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Layo utUnit /* lineTop */, LayoutUnit /*lineBottom*/) 194 void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Layo utUnit /* lineTop */, LayoutUnit /*lineBottom*/)
195 { 195 {
196 if (!paintInfo.shouldPaintWithinRoot(&renderer()) || (paintInfo.phase != Pai ntPhaseForeground && paintInfo.phase != PaintPhaseSelection)) 196 if (!paintInfo.shouldPaintWithinRoot(&renderer()) || (paintInfo.phase != Pai ntPhaseForeground && paintInfo.phase != PaintPhaseSelection))
197 return; 197 return;
198 198
199 LayoutPoint childPoint = paintOffset; 199 LayoutPoint childPoint = paintOffset;
200 if (parent()->renderer().style()->isFlippedBlocksWritingMode()) // Faster th an calling containingBlock().
201 childPoint = renderer().containingBlock()->flipForWritingModeForChild(&t oRenderBox(renderer()), childPoint);
202
203 RenderBlock::paintAsInlineBlock(&renderer(), paintInfo, childPoint); 200 RenderBlock::paintAsInlineBlock(&renderer(), paintInfo, childPoint);
204 } 201 }
205 202
206 bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result , const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffs et, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/) 203 bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result , const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffs et, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
207 { 204 {
208 // Hit test all phases of replaced elements atomically, as though the replac ed element established its 205 // Hit test all phases of replaced elements atomically, as though the replac ed element established its
209 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab le elements in the CSS2.1 206 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab le elements in the CSS2.1
210 // specification.) 207 // specification.)
211 LayoutPoint childPoint = accumulatedOffset; 208 LayoutPoint childPoint = accumulatedOffset;
212 if (parent()->renderer().style()->isFlippedBlocksWritingMode()) // Faster th an calling containingBlock().
213 childPoint = renderer().containingBlock()->flipForWritingModeForChild(&t oRenderBox(renderer()), childPoint);
214
215 return renderer().hitTest(request, result, locationInContainer, childPoint); 209 return renderer().hitTest(request, result, locationInContainer, childPoint);
216 } 210 }
217 211
218 const RootInlineBox& InlineBox::root() const 212 const RootInlineBox& InlineBox::root() const
219 { 213 {
220 if (m_parent) 214 if (m_parent)
221 return m_parent->root(); 215 return m_parent->root();
222 ASSERT(isRootInlineBox()); 216 ASSERT(isRootInlineBox());
223 return static_cast<const RootInlineBox&>(*this); 217 return static_cast<const RootInlineBox&>(*this);
224 } 218 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 b->showTreeForThis(); 344 b->showTreeForThis();
351 } 345 }
352 346
353 void showLineTree(const blink::InlineBox* b) 347 void showLineTree(const blink::InlineBox* b)
354 { 348 {
355 if (b) 349 if (b)
356 b->showLineTreeForThis(); 350 b->showLineTreeForThis();
357 } 351 }
358 352
359 #endif 353 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/EllipsisBox.cpp ('k') | sky/engine/core/rendering/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698