<https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
Reviewed by Geoff Garen.
Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
It now also returns a reference, as it can never be null.
Removed 8.8 million lines of null-checking as a result.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/page/SpatialNavigation.cpp b/Source/WebCore/page/SpatialNavigation.cpp
index 7c0362b..915c5d4 100644
--- a/Source/WebCore/page/SpatialNavigation.cpp
+++ b/Source/WebCore/page/SpatialNavigation.cpp
@@ -90,7 +90,7 @@
bool isSpatialNavigationEnabled(const Frame* frame)
{
- return (frame && frame->settings() && frame->settings()->spatialNavigationEnabled());
+ return (frame && frame->settings().spatialNavigationEnabled());
}
static RectsAlignment alignmentForRects(FocusDirection direction, const LayoutRect& curRect, const LayoutRect& targetRect, const LayoutSize& viewSize)