[iOS][WK2] Micro-optimize view state updates on the UIProcess side
Created attachment 227528 [details] Patch
Comment on attachment 227528 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227528&action=review > Source/WebKit2/UIProcess/ios/WKContentView.mm:240 > + return (FloatRect)FrameView::rectForViewportConstrainedObjects(enclosingLayoutRect(unobscuredRect), roundedLayoutSize(FloatSize(documentSize)), scale, false, StickToViewportBounds); What is the (FloatRect) here for? Doesn’t this compile without it? Also, why FloatSize(documentSize)? Doesn’t this compile without the explicit FloatSize()?
Thanks for the review! (In reply to comment #2) > What is the (FloatRect) here for? Doesn’t this compile without it? No idea, I'll try. > Also, why FloatSize(documentSize)? Doesn’t this compile without the explicit FloatSize()? The conversions between native types and WebCore types are explicit when they have side effects.
Committed r166188: <http://trac.webkit.org/changeset/166188>
(In reply to comment #2) > (From update of attachment 227528 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=227528&action=review > > > Source/WebKit2/UIProcess/ios/WKContentView.mm:240 > > + return (FloatRect)FrameView::rectForViewportConstrainedObjects(enclosingLayoutRect(unobscuredRect), roundedLayoutSize(FloatSize(documentSize)), scale, false, StickToViewportBounds); > Can we put this code somewhere else instead of on FrameView? It's very awkward to have UI process code call member functions on FrameView.