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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 9 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 continue; 389 continue;
390 } 390 }
391 391
392 SVGTextMetrics logicalMetrics(SVGTextMetrics::SkippedSpaceMetrics); 392 SVGTextMetrics logicalMetrics(SVGTextMetrics::SkippedSpaceMetrics);
393 const LayoutSVGInlineText* logicalTextNode = 393 const LayoutSVGInlineText* logicalTextNode =
394 currentLogicalCharacterMetrics(logicalMetrics); 394 currentLogicalCharacterMetrics(logicalMetrics);
395 if (!logicalTextNode) 395 if (!logicalTextNode)
396 break; 396 break;
397 397
398 const SVGCharacterData data = 398 const SVGCharacterData data =
399 logicalTextNode->characterDataMap().get(m_logicalCharacterOffset + 1); 399 logicalTextNode->characterDataMap().at(m_logicalCharacterOffset + 1);
400 400
401 // TODO(fs): Use the return value to eliminate the additional 401 // TODO(fs): Use the return value to eliminate the additional
402 // hash-lookup below when determining if this text box should be tagged 402 // hash-lookup below when determining if this text box should be tagged
403 // as starting a new text chunk. 403 // as starting a new text chunk.
404 setCurrentTextPosition(data); 404 setCurrentTextPosition(data);
405 405
406 // When we've advanced to the box start offset, determine using the original 406 // When we've advanced to the box start offset, determine using the original
407 // x/y values, whether this character starts a new text chunk, before doing 407 // x/y values, whether this character starts a new text chunk, before doing
408 // any further processing. 408 // any further processing.
409 if (m_visualMetricsIterator.characterOffset() == textBox->start()) 409 if (m_visualMetricsIterator.characterOffset() == textBox->start())
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 536 }
537 537
538 if (!didStartTextFragment) 538 if (!didStartTextFragment)
539 return; 539 return;
540 540
541 // Close last open fragment, if needed. 541 // Close last open fragment, if needed.
542 recordTextFragment(textBox); 542 recordTextFragment(textBox);
543 } 543 }
544 544
545 } // namespace blink 545 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698