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

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

Issue 2875933006: [LayoutNG] Misc fixes in ShapingLineBreaker (Closed)
Patch Set: eae review + RTL snapping fixes Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 range_data.start = start; 706 range_data.start = start;
707 range_data.end = end; 707 range_data.end = end;
708 SetFontFeatures(font, &range_data.font_features); 708 SetFontFeatures(font, &range_data.font_features);
709 709
710 while (run_segmenter.Consume(&segment_range)) { 710 while (run_segmenter.Consume(&segment_range)) {
711 // Only shape segments overlapping with the range indicated by start and 711 // Only shape segments overlapping with the range indicated by start and
712 // end. Not only those strictly within. 712 // end. Not only those strictly within.
713 if (start < segment_range.end && end > segment_range.start) 713 if (start < segment_range.end && end > segment_range.start)
714 ShapeSegment(&range_data, segment_range, result.Get()); 714 ShapeSegment(&range_data, segment_range, result.Get());
715 } 715 }
716 DCHECK(!result->NumCharacters() || (start == result->StartIndexForResult() &&
717 end == result->EndIndexForResult()));
716 return result.Release(); 718 return result.Release();
717 } 719 }
718 720
719 PassRefPtr<ShapeResult> HarfBuzzShaper::Shape(const Font* font, 721 PassRefPtr<ShapeResult> HarfBuzzShaper::Shape(const Font* font,
720 TextDirection direction) const { 722 TextDirection direction) const {
721 return Shape(font, direction, 0, text_length_); 723 return Shape(font, direction, 0, text_length_);
722 } 724 }
723 725
724 } // namespace blink 726 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698