From 8849121137d33fd67d00d49b30bb06dd820028b5 Mon Sep 17 00:00:00 2001 From: "darin@apple.com" Date: Tue, 17 Mar 2009 00:10:25 +0000 Subject: [PATCH] 2009-03-16 Darin Adler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed by Kevin Decker. Top Sites malfunction when switching text zoom mode * page/Frame.cpp: (WebCore::Frame::setNeedsReapplyStyles): Don’t do anything if the frame is currently showing a non-HTML view. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41754 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 10 ++++++++++ WebCore/page/Frame.cpp | 14 ++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 726d0fc..a72835d 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,5 +1,15 @@ 2009-03-16 Darin Adler + Reviewed by Kevin Decker. + + Top Sites malfunction when switching text zoom mode + + * page/Frame.cpp: + (WebCore::Frame::setNeedsReapplyStyles): Don’t do anything if the frame is + currently showing a non-HTML view. + +2009-03-16 Darin Adler + Reviewed by Adele Peterson. Bug 24629: moving forward or backward a paragraph fails at edge of document diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp index 52e5fe0..ae4f1b4 100644 --- a/WebCore/page/Frame.cpp +++ b/WebCore/page/Frame.cpp @@ -5,7 +5,7 @@ * 2000 Simon Hausmann * 2000 Stefan Schimanski <1Stein@gmx.de> * 2001 George Staikos - * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2005 Alexey Proskuryakov * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) * Copyright (C) 2008 Eric Seidel @@ -44,6 +44,7 @@ #include "FocusController.h" #include "FloatQuad.h" #include "FrameLoader.h" +#include "FrameLoaderClient.h" #include "FrameView.h" #include "GraphicsContext.h" #include "HTMLDocument.h" @@ -784,6 +785,12 @@ String Frame::jsDefaultStatusBarText() const void Frame::setNeedsReapplyStyles() { + // When the frame is not showing web content, it doesn't make sense to apply styles. + // If we tried, we'd end up doing things with the document, but the document, if one + // exists, is not currently shown and should be in the page cache. + if (!m_loader.client()->hasHTMLView()) + return; + if (m_needsReapplyStyles) return; @@ -804,9 +811,8 @@ void Frame::reapplyStyles() { m_needsReapplyStyles = false; - // FIXME: This call doesn't really make sense in a method called - // "reapplyStyles". We should probably eventually move it into its own - // method. + // FIXME: This call doesn't really make sense in a function called reapplyStyles. + // We should probably eventually move it into its own function. m_doc->docLoader()->setAutoLoadImages(m_page && m_page->settings()->loadsImagesAutomatically()); #if FRAME_LOADS_USER_STYLESHEET -- 1.8.3.1