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

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

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/page/EventHandler.cpp ('k') | sky/engine/core/rendering/InlineFlowBox.h » ('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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 void InlineBox::clearKnownToHaveNoOverflow() 308 void InlineBox::clearKnownToHaveNoOverflow()
309 { 309 {
310 m_bitfields.setKnownToHaveNoOverflow(false); 310 m_bitfields.setKnownToHaveNoOverflow(false);
311 if (parent() && parent()->knownToHaveNoOverflow()) 311 if (parent() && parent()->knownToHaveNoOverflow())
312 parent()->clearKnownToHaveNoOverflow(); 312 parent()->clearKnownToHaveNoOverflow();
313 } 313 }
314 314
315 FloatPoint InlineBox::locationIncludingFlipping() 315 FloatPoint InlineBox::locationIncludingFlipping()
316 { 316 {
317 if (!renderer().style()->isFlippedBlocksWritingMode()) 317 // FIXME(sky): remove
318 return FloatPoint(x(), y()); 318 return FloatPoint(x(), y());
319 RenderBlockFlow& block = root().block();
320 if (block.style()->isHorizontalWritingMode())
321 return FloatPoint(x(), block.height() - height() - y());
322
323 return FloatPoint(block.width() - width() - x(), y());
324 } 319 }
325 320
326 void InlineBox::flipForWritingMode(FloatRect& rect) 321 void InlineBox::flipForWritingMode(FloatRect& rect)
327 { 322 {
328 if (!renderer().style()->isFlippedBlocksWritingMode()) 323 // FIXME(sky): remove
329 return;
330 root().block().flipForWritingMode(rect);
331 } 324 }
332 325
333 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point) 326 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point)
334 { 327 {
335 if (!renderer().style()->isFlippedBlocksWritingMode()) 328 // FIXME(sky): remove
336 return point; 329 return point;
337 return root().block().flipForWritingMode(point);
338 } 330 }
339 331
340 void InlineBox::flipForWritingMode(LayoutRect& rect) 332 void InlineBox::flipForWritingMode(LayoutRect& rect)
341 { 333 {
342 if (!renderer().style()->isFlippedBlocksWritingMode()) 334 // FIXME(sky): remove
343 return;
344 root().block().flipForWritingMode(rect);
345 } 335 }
346 336
347 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point) 337 LayoutPoint InlineBox::flipForWritingMode(const LayoutPoint& point)
348 { 338 {
349 if (!renderer().style()->isFlippedBlocksWritingMode()) 339 // FIXME(sky): remove
350 return point; 340 return point;
351 return root().block().flipForWritingMode(point);
352 } 341 }
353 342
354 } // namespace blink 343 } // namespace blink
355 344
356 #ifndef NDEBUG 345 #ifndef NDEBUG
357 346
358 void showTree(const blink::InlineBox* b) 347 void showTree(const blink::InlineBox* b)
359 { 348 {
360 if (b) 349 if (b)
361 b->showTreeForThis(); 350 b->showTreeForThis();
362 } 351 }
363 352
364 void showLineTree(const blink::InlineBox* b) 353 void showLineTree(const blink::InlineBox* b)
365 { 354 {
366 if (b) 355 if (b)
367 b->showLineTreeForThis(); 356 b->showLineTreeForThis();
368 } 357 }
369 358
370 #endif 359 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/page/EventHandler.cpp ('k') | sky/engine/core/rendering/InlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698