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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp

Issue 2386333002: reflow comments in platform/fonts (Closed)
Patch Set: Created 4 years, 2 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 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/fonts/shaping/CachingWordShaper.h" 5 #include "platform/fonts/shaping/CachingWordShaper.h"
6 6
7 #include "platform/fonts/CharacterRange.h" 7 #include "platform/fonts/CharacterRange.h"
8 #include "platform/fonts/FontCache.h" 8 #include "platform/fonts/FontCache.h"
9 #include "platform/fonts/GlyphBuffer.h" 9 #include "platform/fonts/GlyphBuffer.h"
10 #include "platform/fonts/shaping/CachingWordShapeIterator.h" 10 #include "platform/fonts/shaping/CachingWordShapeIterator.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 FloatRect periodsGlyphBounds; 442 FloatRect periodsGlyphBounds;
443 float periodsWidth = 443 float periodsWidth =
444 shaper.width(&font, periods, nullptr, &periodsGlyphBounds); 444 shaper.width(&font, periods, nullptr, &periodsGlyphBounds);
445 445
446 TextRun periodsAndSpaces( 446 TextRun periodsAndSpaces(
447 reinterpret_cast<const LChar*>(". . . . . . . . . ."), 19); 447 reinterpret_cast<const LChar*>(". . . . . . . . . ."), 19);
448 FloatRect periodsAndSpacesGlyphBounds; 448 FloatRect periodsAndSpacesGlyphBounds;
449 float periodsAndSpacesWidth = shaper.width(&font, periodsAndSpaces, nullptr, 449 float periodsAndSpacesWidth = shaper.width(&font, periodsAndSpaces, nullptr,
450 &periodsAndSpacesGlyphBounds); 450 &periodsAndSpacesGlyphBounds);
451 451
452 // The total width of periods and spaces should be longer than the width of pe riods alone. 452 // The total width of periods and spaces should be longer than the width of
453 // periods alone.
453 ASSERT_GT(periodsAndSpacesWidth, periodsWidth); 454 ASSERT_GT(periodsAndSpacesWidth, periodsWidth);
454 455
455 // The glyph bounds of periods and spaces should be longer than the glyph boun ds of periods alone. 456 // The glyph bounds of periods and spaces should be longer than the glyph
457 // bounds of periods alone.
456 ASSERT_GT(periodsAndSpacesGlyphBounds.width(), periodsGlyphBounds.width()); 458 ASSERT_GT(periodsAndSpacesGlyphBounds.width(), periodsGlyphBounds.width());
457 } 459 }
458 460
459 } // namespace blink 461 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698