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

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

Issue 2151933003: Change WTF::TemporaryChange to be an alias for AutoReset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 { 232 {
233 SVGTextContentElement* textContentElement = SVGTextContentElement::elementFr omLineLayoutItem(start->getLineLayoutItem()); 233 SVGTextContentElement* textContentElement = SVGTextContentElement::elementFr omLineLayoutItem(start->getLineLayoutItem());
234 return textContentElement 234 return textContentElement
235 && textContentElement->lengthAdjust()->currentValue()->enumValue() == SV GLengthAdjustSpacing 235 && textContentElement->lengthAdjust()->currentValue()->enumValue() == SV GLengthAdjustSpacing
236 && textContentElement->textLengthIsSpecifiedByUser(); 236 && textContentElement->textLengthIsSpecifiedByUser();
237 } 237 }
238 238
239 void SVGTextLayoutEngine::layoutCharactersInTextBoxes(InlineFlowBox* start) 239 void SVGTextLayoutEngine::layoutCharactersInTextBoxes(InlineFlowBox* start)
240 { 240 {
241 bool textLengthSpacingInEffect = m_textLengthSpacingInEffect || definesTextL engthWithSpacing(start); 241 bool textLengthSpacingInEffect = m_textLengthSpacingInEffect || definesTextL engthWithSpacing(start);
242 TemporaryChange<bool> textLengthSpacingScope(m_textLengthSpacingInEffect, te xtLengthSpacingInEffect); 242 TemporaryChange<bool> textLengthSpacingScope(&m_textLengthSpacingInEffect, t extLengthSpacingInEffect);
243 243
244 for (InlineBox* child = start->firstChild(); child; child = child->nextOnLin e()) { 244 for (InlineBox* child = start->firstChild(); child; child = child->nextOnLin e()) {
245 if (child->isSVGInlineTextBox()) { 245 if (child->isSVGInlineTextBox()) {
246 ASSERT(child->getLineLayoutItem().isSVGInlineText()); 246 ASSERT(child->getLineLayoutItem().isSVGInlineText());
247 layoutInlineTextBox(toSVGInlineTextBox(child)); 247 layoutInlineTextBox(toSVGInlineTextBox(child));
248 } else { 248 } else {
249 // Skip generated content. 249 // Skip generated content.
250 Node* node = child->getLineLayoutItem().node(); 250 Node* node = child->getLineLayoutItem().node();
251 if (!node) 251 if (!node)
252 continue; 252 continue;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 } 495 }
496 496
497 if (!didStartTextFragment) 497 if (!didStartTextFragment)
498 return; 498 return;
499 499
500 // Close last open fragment, if needed. 500 // Close last open fragment, if needed.
501 recordTextFragment(textBox); 501 recordTextFragment(textBox);
502 } 502 }
503 503
504 } // namespace blink 504 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698