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

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

Issue 323053002: Unapply effectiveZoom during SVG layout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tests Created 6 years, 6 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 ASSERT(svgStyle); 438 ASSERT(svgStyle);
439 439
440 m_visualMetricsListOffset = 0; 440 m_visualMetricsListOffset = 0;
441 m_visualCharacterOffset = 0; 441 m_visualCharacterOffset = 0;
442 442
443 Vector<SVGTextMetrics>& visualMetricsValues = text->layoutAttributes()->text MetricsValues(); 443 Vector<SVGTextMetrics>& visualMetricsValues = text->layoutAttributes()->text MetricsValues();
444 ASSERT(!visualMetricsValues.isEmpty()); 444 ASSERT(!visualMetricsValues.isEmpty());
445 445
446 const Font& font = style->font(); 446 const Font& font = style->font();
447 447
448 SVGTextLayoutEngineSpacing spacingLayout(font); 448 SVGTextLayoutEngineSpacing spacingLayout(font, style->effectiveZoom());
449 SVGTextLayoutEngineBaseline baselineLayout(font); 449 SVGTextLayoutEngineBaseline baselineLayout(font);
450 450
451 bool didStartTextFragment = false; 451 bool didStartTextFragment = false;
452 bool applySpacingToNextCharacter = false; 452 bool applySpacingToNextCharacter = false;
453 453
454 float lastAngle = 0; 454 float lastAngle = 0;
455 float baselineShift = baselineLayout.calculateBaselineShift(svgStyle, length Context); 455 float baselineShift = baselineLayout.calculateBaselineShift(svgStyle, length Context);
456 baselineShift -= baselineLayout.calculateAlignmentBaselineShift(m_isVertical Text, text); 456 baselineShift -= baselineLayout.calculateAlignmentBaselineShift(m_isVertical Text, text);
457 457
458 // Main layout algorithm. 458 // Main layout algorithm.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 646
647 if (!didStartTextFragment) 647 if (!didStartTextFragment)
648 return; 648 return;
649 649
650 // Close last open fragment, if needed. 650 // Close last open fragment, if needed.
651 recordTextFragment(textBox, visualMetricsValues); 651 recordTextFragment(textBox, visualMetricsValues);
652 } 652 }
653 653
654 } 654 }
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698