Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r182374 - FrameView code uses page() without null checking
https://bugs.webkit.org/show_bug.cgi?id=143425 rdar://problem/18920601 Reviewed by Anders Carlsson. While we don't have tests that cover this, we are seeing crashes coming in that indicate the shouldEnableSpeculativeTilingDuringLoading function is being called when the page is null. This patch adds null checks to all the places in FrameView that use page() without doing null checking. * page/FrameView.cpp: (WebCore::FrameView::layout): If page is null, don't try to do the auto-sizing logic that involves the textAutosizingWidth value from the page. (WebCore::FrameView::setFixedVisibleContentRect): Get settings from the frame rather than the page to avoid possible null-dereference. (WebCore::FrameView::scrollPositionChanged): Check the page for null when getting the event throttling delay. (WebCore::FrameView::updateLayerFlushThrottling): Check the page for null, and return early if it is null. (WebCore::shouldEnableSpeculativeTilingDuringLoading): Check the page for null, and return false if it is null. (WebCore::FrameView::performPostLayoutTasks): Guard the code that calls didLayout on the page client by a check if the page is null. (WebCore::FrameView::pagination): Don't call Page::pagination on a null page here. (WebCore::FrameView::visibleContentScaleFactor): Use a scale factor of 1 if the page is null. (WebCore::FrameView::setVisibleScrollerThumbRect): Don't call through to the page client if the page is null. (WebCore::FrameView::scrollbarStyleChanged): Ditto. (WebCore::FrameView::setScrollPinningBehavior): Check the page for null before asking it for the scrolling coordinator.
- Loading branch information
1 parent
59def07
commit 19325f7
Showing
2 changed files
with
79 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters