Add a simple content layer to TiledCoreAnimationDrawingArea
Created attachment 114544 [details] Patch
Comment on attachment 114544 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114544&action=review > Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:47 > +- (id)_initWithWebPage:(WebKit::WebPage *)webPage; Why the underscore? If the entire class is private, then I’d expect that to be expressed in the class name. Is there some sense in which this is private? > Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:86 > - m_rootLayer.get().frame = (CGRect)m_webPage->bounds(); > + m_rootLayer.get().frame = static_cast<CGRect>(m_webPage->bounds()); Is there a way we can trigger this conversion without a cast? Maybe use a local variable? Back when I worked on Boost I had proposed an implicit_cast, which would do only conversions that could be done with an assignment and no cast at all. A static_cast seems too powerful to me.
Comment on attachment 114544 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=114544&action=review >> Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:47 >> +- (id)_initWithWebPage:(WebKit::WebPage *)webPage; > > Why the underscore? If the entire class is private, then I’d expect that to be expressed in the class name. Is there some sense in which this is private? It's just a placeholder for the real tiled layer container. I'll remove the underscore. >> Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:86 >> + m_rootLayer.get().frame = static_cast<CGRect>(m_webPage->bounds()); > > Is there a way we can trigger this conversion without a cast? Maybe use a local variable? Back when I worked on Boost I had proposed an implicit_cast, which would do only conversions that could be done with an assignment and no cast at all. A static_cast seems too powerful to me. This is actually a workaround for a bug in GCC where you can't set a property to a temporary. I'll use a local variable.
Committed r99891: <http://trac.webkit.org/changeset/99891>