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

Side by Side Diff: Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp

Issue 11845002: Merge 138316 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 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
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 y -= kerning; 571 y -= kerning;
572 } else { 572 } else {
573 x -= kerning; 573 x -= kerning;
574 y -= baselineShift; 574 y -= baselineShift;
575 } 575 }
576 576
577 x += m_dx; 577 x += m_dx;
578 y += m_dy; 578 y += m_dy;
579 } 579 }
580 580
581 // Determine wheter we have to start a new fragment. 581 // Determine whether we have to start a new fragment.
582 bool shouldStartNewFragment = false; 582 bool shouldStartNewFragment = m_dx || m_dy || m_isVerticalText || m_inPa thLayout || angle || angle != lastAngle
583 583 || orientationAngle || kerning || applySpacingToNextCharacter || def inesTextLength;
584 if (m_dx || m_dy)
585 shouldStartNewFragment = true;
586
587 if (!shouldStartNewFragment && (m_isVerticalText || m_inPathLayout))
588 shouldStartNewFragment = true;
589
590 if (!shouldStartNewFragment && (angle || angle != lastAngle || orientati onAngle))
591 shouldStartNewFragment = true;
592
593 if (!shouldStartNewFragment && (kerning || applySpacingToNextCharacter | | definesTextLength))
594 shouldStartNewFragment = true;
595 584
596 // If we already started a fragment, close it now. 585 // If we already started a fragment, close it now.
597 if (didStartTextFragment && shouldStartNewFragment) { 586 if (didStartTextFragment && shouldStartNewFragment) {
598 applySpacingToNextCharacter = false; 587 applySpacingToNextCharacter = false;
599 recordTextFragment(textBox, visualMetricsValues); 588 recordTextFragment(textBox, visualMetricsValues);
600 } 589 }
601 590
602 // Eventually start a new fragment, if not yet done. 591 // Eventually start a new fragment, if not yet done.
603 if (!didStartTextFragment || shouldStartNewFragment) { 592 if (!didStartTextFragment || shouldStartNewFragment) {
604 ASSERT(!m_currentTextFragment.characterOffset); 593 ASSERT(!m_currentTextFragment.characterOffset);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 if (!didStartTextFragment) 645 if (!didStartTextFragment)
657 return; 646 return;
658 647
659 // Close last open fragment, if needed. 648 // Close last open fragment, if needed.
660 recordTextFragment(textBox, visualMetricsValues); 649 recordTextFragment(textBox, visualMetricsValues);
661 } 650 }
662 651
663 } 652 }
664 653
665 #endif // ENABLE(SVG) 654 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « LayoutTests/svg/text/alt-glyph-for-surrogate-pair-expected.svg ('k') | Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698