[webkit-reviews] review denied: [Bug 67250] Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp} : [Attachment 105789] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 31 10:48:46 PDT 2011


Darin Adler <darin at apple.com> has denied Fady Samuel <fsamuel at chromium.org>'s
request for review:
Bug 67250: Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
https://bugs.webkit.org/show_bug.cgi?id=67250

Attachment 105789: Patch
https://bugs.webkit.org/attachment.cgi?id=105789&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=105789&action=review


review- because there seem to be many missing Page null checks

> Source/WebCore/css/CSSStyleSelector.cpp:1173
> -    documentStyle->setPageScaleTransform(frame ? frame->pageScaleFactor() :
1);
> +   
documentStyle->setPageScaleTransform(document->page()->pageScaleFactor());

document->page() can be 0; this is not safe without a null check

> Source/WebCore/html/HTMLBodyElement.cpp:271
> +    Page* page = document->page();
> +    float zoomFactor = frame->pageZoomFactor() * page->pageScaleFactor();

Unlike frame, page can be 0, so this is not safe without a null check (unless
you can somehow prove that it is).

> Source/WebCore/html/HTMLBodyElement.cpp:300
> +    view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft *
frame->pageZoomFactor() * page->pageScaleFactor()), view->scrollY()));

Unlike frame, page can be 0, so this is not safe without a null check (unless
you can somehow prove that it is).

> Source/WebCore/html/HTMLBodyElement.cpp:323
> +    view->setScrollPosition(IntPoint(view->scrollX(),
static_cast<int>(scrollTop * frame->pageZoomFactor() *
page->pageScaleFactor())));

Unlike frame, page can be 0, so this is not safe without a null check (unless
you can somehow prove that it is).

> Source/WebCore/loader/HistoryController.cpp:89
> +    item->setPageScaleFactor(m_frame->page()->pageScaleFactor());

Unlike frame, page can be 0, so this is not safe without a null check (unless
you can somehow prove that it is).


More information about the webkit-reviews mailing list