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

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

Issue 23447021: Add toSVGRootInlineBox(), and use it as much as we can (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGText.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 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 // Now position our text runs vertically. 1456 // Now position our text runs vertically.
1457 computeBlockDirectionPositionsForLine(lineBox, bidiRuns.firstRun(), textBoxD ataMap, verticalPositionCache); 1457 computeBlockDirectionPositionsForLine(lineBox, bidiRuns.firstRun(), textBoxD ataMap, verticalPositionCache);
1458 1458
1459 // SVG text layout code computes vertical & horizontal positions on its own. 1459 // SVG text layout code computes vertical & horizontal positions on its own.
1460 // Note that we still need to execute computeVerticalPositionsForLine() as 1460 // Note that we still need to execute computeVerticalPositionsForLine() as
1461 // it calls InlineTextBox::positionLineBox(), which tracks whether the box 1461 // it calls InlineTextBox::positionLineBox(), which tracks whether the box
1462 // contains reversed text or not. If we wouldn't do that editing and thus 1462 // contains reversed text or not. If we wouldn't do that editing and thus
1463 // text selection in RTL boxes would not work as expected. 1463 // text selection in RTL boxes would not work as expected.
1464 if (isSVGRootInlineBox) { 1464 if (isSVGRootInlineBox) {
1465 ASSERT(isSVGText()); 1465 ASSERT(isSVGText());
1466 static_cast<SVGRootInlineBox*>(lineBox)->computePerCharacterLayoutInform ation(); 1466 toSVGRootInlineBox(lineBox)->computePerCharacterLayoutInformation();
1467 } 1467 }
1468 1468
1469 // Compute our overflow now. 1469 // Compute our overflow now.
1470 lineBox->computeOverflow(lineBox->lineTop(), lineBox->lineBottom(), textBoxD ataMap); 1470 lineBox->computeOverflow(lineBox->lineTop(), lineBox->lineBottom(), textBoxD ataMap);
1471 1471
1472 return lineBox; 1472 return lineBox;
1473 } 1473 }
1474 1474
1475 // Like LayoutState for layout(), LineLayoutState keeps track of global informat ion 1475 // Like LayoutState for layout(), LineLayoutState keeps track of global informat ion
1476 // during an entire linebox tree layout pass (aka layoutInlineChildren). 1476 // during an entire linebox tree layout pass (aka layoutInlineChildren).
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after
3559 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache); 3559 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache);
3560 3560
3561 setLineGridBox(lineGridBox); 3561 setLineGridBox(lineGridBox);
3562 3562
3563 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying 3563 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying
3564 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping 3564 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
3565 // to this grid. 3565 // to this grid.
3566 } 3566 }
3567 3567
3568 } 3568 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698