for single RenderText only at this point.
<rdar://problem/30593370>
Created attachment 302061 [details] Patch
Comment on attachment 302061 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302061&action=review > Source/WebCore/rendering/SimpleLineLayoutResolver.cpp:217 > + if (it.lineIndex() > lineIndex) > + return --it; > + // Now we have a candidate run. > + // Find the last run that still contains this point (taking overlapping runs with odd word spacing values into account). > + while (it != end() && (*it).logicalLeft() <= x && lineIndex == it.lineIndex()) The if condition could be eliminated by changing the while to this while (it != end() && lineIndex == it.lineIndex() && (*it).logicalLeft() <= x) but this way it's a bit more implicit. I don't really have a preference on this.
Created attachment 302062 [details] Patch
Comment on attachment 302062 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302062&action=review > Source/WebCore/rendering/RenderBlockFlow.cpp:3553 > + if (!simpleLineLayout() || firstChild() != lastChild() || !is<RenderText>(firstChild())) It might be good to have a comment explaining the tests (beyond just having !simpleLineLayout()). > Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp:220 > +unsigned positionForPoint(const LayoutPoint& point, const RenderText& renderer, const Layout& layout) Might be better to call this something else since it doesn't return a Position object (unlike the RenderText version). Maybe textOffsetForPoint or similar? > Source/WebCore/rendering/SimpleLineLayoutResolver.cpp:204 > + auto it = Iterator(begin()); Can't this just be auto it = begin(); ?
Created attachment 302076 [details] Patch
Comment on attachment 302076 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302076&action=review > Source/WebCore/rendering/SimpleLineLayoutResolver.cpp:201 > + return Iterator(end()); return end()?
Created attachment 302078 [details] Patch
Comment on attachment 302078 [details] Patch Clearing flags on attachment: 302078 Committed r212615: <http://trac.webkit.org/changeset/212615>
All reviewed patches have been landed. Closing bug.