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

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

Issue 708843002: Remove -webkit-auto, -webkit-center, -webkit-left, -webkit-right. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT 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/RenderBlockFlow.cpp ('k') | sky/engine/core/rendering/RenderBox.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 direction = rootInlineBox->direction(); 459 direction = rootInlineBox->direction();
460 else 460 else
461 direction = style()->direction(); 461 direction = style()->direction();
462 462
463 // Armed with the total width of the line (without justification), 463 // Armed with the total width of the line (without justification),
464 // we now examine our text-align property in order to determine where to pos ition the 464 // we now examine our text-align property in order to determine where to pos ition the
465 // objects horizontally. The total width of the line can be increased if we end up 465 // objects horizontally. The total width of the line can be increased if we end up
466 // justifying text. 466 // justifying text.
467 switch (textAlign) { 467 switch (textAlign) {
468 case LEFT: 468 case LEFT:
469 case WEBKIT_LEFT:
470 updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 469 updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
471 break; 470 break;
472 case RIGHT: 471 case RIGHT:
473 case WEBKIT_RIGHT:
474 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection() , trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 472 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirection() , trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
475 break; 473 break;
476 case CENTER: 474 case CENTER:
477 case WEBKIT_CENTER:
478 updateLogicalWidthForCenterAlignedBlock(style()->isLeftToRightDirection( ), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 475 updateLogicalWidthForCenterAlignedBlock(style()->isLeftToRightDirection( ), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
479 break; 476 break;
480 case JUSTIFY: 477 case JUSTIFY:
481 adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, availableLogicalWidth); 478 adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, availableLogicalWidth);
482 if (expansionOpportunityCount) { 479 if (expansionOpportunityCount) {
483 if (trailingSpaceRun) { 480 if (trailingSpaceRun) {
484 totalLogicalWidth -= trailingSpaceRun->m_box->logicalWidth(); 481 totalLogicalWidth -= trailingSpaceRun->m_box->logicalWidth();
485 trailingSpaceRun->m_box->setLogicalWidth(0); 482 trailingSpaceRun->m_box->setLogicalWidth(0);
486 } 483 }
487 break; 484 break;
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 1598 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
1602 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 1599 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
1603 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 1600 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
1604 1601
1605 if (!style()->isLeftToRightDirection()) 1602 if (!style()->isLeftToRightDirection())
1606 return logicalWidth() - logicalLeft; 1603 return logicalWidth() - logicalLeft;
1607 return logicalLeft; 1604 return logicalLeft;
1608 } 1605 }
1609 1606
1610 } 1607 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698