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

Side by Side Diff: Source/core/rendering/RenderFlowThread.cpp

Issue 669803002: Optimize for horizontal writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: w compile fix Created 6 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 while (currentBlock && !currentBlock->isRenderFlowThread()) { 346 while (currentBlock && !currentBlock->isRenderFlowThread()) {
347 RenderBlock* containerBlock = currentBlock->containingBlock(); 347 RenderBlock* containerBlock = currentBlock->containingBlock();
348 ASSERT(containerBlock); 348 ASSERT(containerBlock);
349 if (!containerBlock) 349 if (!containerBlock)
350 return 0; 350 return 0;
351 LayoutPoint currentBlockLocation = currentBlock->location(); 351 LayoutPoint currentBlockLocation = currentBlock->location();
352 352
353 if (containerBlock->style()->writingMode() != currentBlock->style()->wri tingMode()) { 353 if (containerBlock->style()->writingMode() != currentBlock->style()->wri tingMode()) {
354 // We have to put the block rect in container coordinates 354 // We have to put the block rect in container coordinates
355 // and we have to take into account both the container and current b lock flipping modes 355 // and we have to take into account both the container and current b lock flipping modes
356 if (containerBlock->style()->isFlippedBlocksWritingMode()) { 356 if (containerBlock->style()->slowIsFlippedBlocksWritingMode()) {
357 if (containerBlock->isHorizontalWritingMode()) 357 if (containerBlock->isHorizontalWritingMode())
358 blockRect.setY(currentBlock->height() - blockRect.maxY()); 358 blockRect.setY(currentBlock->height() - blockRect.maxY());
359 else 359 else
360 blockRect.setX(currentBlock->width() - blockRect.maxX()); 360 blockRect.setX(currentBlock->width() - blockRect.maxX());
361 } 361 }
362 currentBlock->flipForWritingMode(blockRect); 362 currentBlock->flipForWritingMode(blockRect);
363 } 363 }
364 blockRect.moveBy(currentBlockLocation); 364 blockRect.moveBy(currentBlockLocation);
365 currentBlock = containerBlock; 365 currentBlock = containerBlock;
366 } 366 }
(...skipping 24 matching lines...) Expand all
391 { 391 {
392 if (!m_renderFlowThread) 392 if (!m_renderFlowThread)
393 return; 393 return;
394 RenderView* view = m_renderFlowThread->view(); 394 RenderView* view = m_renderFlowThread->view();
395 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl owThread); 395 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl owThread);
396 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo wThread); 396 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo wThread);
397 } 397 }
398 398
399 399
400 } // namespace blink 400 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698