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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp

Issue 1548913002: Store a <scale, bias> tuple for textLength scale adjustment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop []. Created 4 years, 11 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 | « third_party/WebKit/Source/core/layout/svg/SVGTextFragment.h ('k') | no next file » | 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) Research In Motion Limited 2010-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010-2012. 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 m_currentTextFragment.transform.rotate(angle); 516 m_currentTextFragment.transform.rotate(angle);
517 517
518 if (textPathShiftX || textPathShiftY) 518 if (textPathShiftX || textPathShiftY)
519 m_currentTextFragment.transform.translate(textPathShiftX, textPa thShiftY); 519 m_currentTextFragment.transform.translate(textPathShiftX, textPa thShiftY);
520 520
521 // In vertical text, always rotate by 90 degrees regardless of fontO rientation. 521 // In vertical text, always rotate by 90 degrees regardless of fontO rientation.
522 // Shaping engine takes care of the necessary orientation. 522 // Shaping engine takes care of the necessary orientation.
523 if (m_isVerticalText) 523 if (m_isVerticalText)
524 m_currentTextFragment.transform.rotate(90); 524 m_currentTextFragment.transform.rotate(90);
525 525
526 m_currentTextFragment.isVertical = m_isVerticalText;
526 m_currentTextFragment.isTextOnPath = m_inPathLayout && m_textPathSca ling != 1; 527 m_currentTextFragment.isTextOnPath = m_inPathLayout && m_textPathSca ling != 1;
527 if (m_currentTextFragment.isTextOnPath) { 528 if (m_currentTextFragment.isTextOnPath)
528 if (m_isVerticalText) 529 m_currentTextFragment.lengthAdjustScale = m_textPathScaling;
529 m_currentTextFragment.lengthAdjustTransform.scaleNonUniform( 1, m_textPathScaling);
530 else
531 m_currentTextFragment.lengthAdjustTransform.scaleNonUniform( m_textPathScaling, 1);
532 }
533 } 530 }
534 531
535 // Update current text position, after processing of the current charact er finished. 532 // Update current text position, after processing of the current charact er finished.
536 if (m_inPathLayout) { 533 if (m_inPathLayout) {
537 updateCurrentTextPosition(x, y, glyphAdvance); 534 updateCurrentTextPosition(x, y, glyphAdvance);
538 } else { 535 } else {
539 // Apply CSS 'kerning', 'letter-spacing' and 'word-spacing' to next character, if needed. 536 // Apply CSS 'kerning', 'letter-spacing' and 'word-spacing' to next character, if needed.
540 if (spacing) 537 if (spacing)
541 applySpacingToNextCharacter = true; 538 applySpacingToNextCharacter = true;
542 539
(...skipping 14 matching lines...) Expand all
557 } 554 }
558 555
559 if (!didStartTextFragment) 556 if (!didStartTextFragment)
560 return; 557 return;
561 558
562 // Close last open fragment, if needed. 559 // Close last open fragment, if needed.
563 recordTextFragment(textBox); 560 recordTextFragment(textBox);
564 } 561 }
565 562
566 } 563 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/SVGTextFragment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698