This test occasionally fails on the bots: "Expected -[WKContentView hasText] to be NO, but observed: YES (after inserting an image element)"
Created attachment 322268 [details] Patch
Created attachment 322282 [details] Fix some awkward ChangeLog wording
Comment on attachment 322282 [details] Fix some awkward ChangeLog wording View in context: https://bugs.webkit.org/attachment.cgi?id=322282&action=review > Source/WebCore/editing/VisibleUnits.cpp:1895 > - Vector<UChar32> characters(maxCharacters); > + Vector<UChar32> characters(maxCharacters, 0); Can we just make this an array of length 3 as in? UChar32 maxCharacters[maxCharacters] = {0}; or at least give it an inline capacity so that it won't do a heap allocation?
(In reply to Ryosuke Niwa from comment #3) > Comment on attachment 322282 [details] > Fix some awkward ChangeLog wording > > View in context: > https://bugs.webkit.org/attachment.cgi?id=322282&action=review > > > Source/WebCore/editing/VisibleUnits.cpp:1895 > > - Vector<UChar32> characters(maxCharacters); > > + Vector<UChar32> characters(maxCharacters, 0); > > Can we just make this an array of length 3 as in? > UChar32 maxCharacters[maxCharacters] = {0}; > or at least give it an inline capacity so that it won't do a heap allocation? Sounds good! Changed `characters` into a 0-initialized UChar32 array.
Created attachment 322299 [details] Patch for landing
Comment on attachment 322299 [details] Patch for landing Clearing flags on attachment: 322299 Committed r222683: <http://trac.webkit.org/changeset/222683>
<rdar://problem/34780869>
Comment on attachment 322299 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=322299&action=review > Source/WebCore/ChangeLog:23 > + members in the PostLayoutData struct). We also turn `characters` into a UChar32 array on the stack, to avoid the > + heap allocations using a Vector<UChar32>. I think that adding inline capacity to the vector would be a better fix for the latter part.