[webkit-reviews] review granted: [Bug 113352] Need WK2 API to give a WebView a header and footer : [Attachment 195223] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 27 13:43:20 PDT 2013
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Beth Dakin
<bdakin at apple.com>'s request for review:
Bug 113352: Need WK2 API to give a WebView a header and footer
https://bugs.webkit.org/show_bug.cgi?id=113352
Attachment 195223: Patch
https://bugs.webkit.org/attachment.cgi?id=195223&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=195223&action=review
I think we need to add window.internals methods for adding header and footer
height, and add some tests for basic hit testing etc with a header. Otherwise
we have no way for other platforms to tell when they break the geometry logic
with headers.
> Source/WebCore/page/FrameView.cpp:892
> + RenderView* renderView = this->renderView();
Assert that this is the root FrameView?
> Source/WebCore/page/FrameView.cpp:904
> +{
Ditto.
> Source/WebCore/rendering/RenderLayerCompositor.cpp:2493
> + m_layerForBottomOverhangArea->setPosition(FloatPoint(0,
m_rootContentLayer->size().height() + m_renderView->frameView()->footerHeight()
+ m_renderView->frameView()->headerHeight()));
Seems logical to say headerHeight + footerHeight rather than the other way
around.
> Source/WebCore/rendering/RenderLayerCompositor.cpp:2519
> + m_layerForHeader->setPosition(FloatPoint(0, 0));
> + return m_layerForHeader.get();
Don't we want to update the width of the header layer too?
> Source/WebCore/rendering/RenderLayerCompositor.cpp:2543
> + m_layerForFooter->setPosition(FloatPoint(0,
m_rootContentLayer->size().height() +
m_renderView->frameView()->headerHeight()));
Ditto.
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:824
> +void WebPage::setHeaderLayerWithHeight(CALayer *childLayer, int height)
Not sure that the "child" adds anything.
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:838
> + m_headerLayer.get().bounds = CGRectMake(0, 0, size().width(), height);
> + parentLayer->setSize(FloatSize(m_headerLayer.get().bounds.size));
Who's responsible for updating the width and contents of the header and footer
layers when the WKView is resized?
More information about the webkit-reviews
mailing list