Bug 143389

Summary: Migrate FontCascade's expansion functions to use StringView iterators
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: NEW    
Severity: Normal CC: benjamin, cmarcelo, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+
Patch for landing none

Myles C. Maxfield
Reported 2015-04-03 14:54:57 PDT
Migrate FontCascade's expansion functions to use StringView iterators
Attachments
Patch (29.49 KB, patch)
2015-04-03 15:23 PDT, Myles C. Maxfield
darin: review+
Patch for landing (29.63 KB, patch)
2015-04-03 17:39 PDT, Myles C. Maxfield
no flags
Myles C. Maxfield
Comment 1 2015-04-03 15:23:21 PDT
Darin Adler
Comment 2 2015-04-03 16:39:29 PDT
Comment on attachment 250102 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250102&action=review Not sure why compilation is failing. Please don’t land until you resolve that! > Source/WTF/wtf/text/StringView.h:74 > + // Note that these four iterators do not support double increments or double dereferences. These four things that follow are not iterators. These are sort of “collections” that you can then call begin/end on to get iterators. I don’t think the terms “double increments” and “double dereferences” are clear. What you are saying is that these are a certain type of iterator. I believe that what you are saying is that these are input iterators http://en.cppreference.com/w/cpp/concept/InputIterator but further they are even more restricted because you must always dereference and then increment before dereferencing again. I don’t think the phrase “do not support double increments” says that to me. > Source/WTF/wtf/text/StringView.h:515 > +// Iterators I don’t think this is a helpful comment, especially since the classes below are not all iterators. > Source/WTF/wtf/text/StringView.h:516 > +class StringView::CodeUnits { I suggest putting all the class definitions first, and then all the inline functions later.
Myles C. Maxfield
Comment 3 2015-04-03 17:38:03 PDT
Comment on attachment 250102 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250102&action=review >> Source/WTF/wtf/text/StringView.h:74 >> + // Note that these four iterators do not support double increments or double dereferences. > > These four things that follow are not iterators. These are sort of “collections” that you can then call begin/end on to get iterators. > > I don’t think the terms “double increments” and “double dereferences” are clear. What you are saying is that these are a certain type of iterator. I believe that what you are saying is that these are input iterators http://en.cppreference.com/w/cpp/concept/InputIterator but further they are even more restricted because you must always dereference and then increment before dereferencing again. I don’t think the phrase “do not support double increments” says that to me. Done. >> Source/WTF/wtf/text/StringView.h:515 >> +// Iterators > > I don’t think this is a helpful comment, especially since the classes below are not all iterators. Done. >> Source/WTF/wtf/text/StringView.h:516 >> +class StringView::CodeUnits { > > I suggest putting all the class definitions first, and then all the inline functions later. Done. Out of curiosity, why is this preferred?
Myles C. Maxfield
Comment 4 2015-04-03 17:39:20 PDT
Created attachment 250111 [details] Patch for landing
Myles C. Maxfield
Comment 5 2015-04-03 18:24:38 PDT
Looks like this patch regresses Layout/line-layout-simple.html about 0.5%
Note You need to log in before you can comment on or make changes to this bug.