From 6c2af9490927c3c5959b5cb07461b646f8b32f6c Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Fri, 21 May 2010 16:53:46 +0100 Subject: Merge WebKit at r59636: Initial merge by git Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91 --- WebCore/page/Frame.h | 169 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 165 insertions(+), 4 deletions(-) (limited to 'WebCore/page/Frame.h') diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h index 4a7cdaf..f84952e 100644 --- a/WebCore/page/Frame.h +++ b/WebCore/page/Frame.h @@ -5,7 +5,7 @@ * 2000-2001 Simon Hausmann * 2000-2001 Dirk Mueller * 2000 Stefan Schimanski <1Stein@gmx.de> - * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) * Copyright (C) 2008 Eric Seidel * @@ -29,6 +29,7 @@ #define Frame_h #include "AnimationController.h" +#include "CSSMutableStyleDeclaration.h" #include "DragImage.h" #include "Editor.h" #include "EventHandler.h" @@ -64,7 +65,6 @@ typedef struct HBITMAP__* HBITMAP; namespace WebCore { - class CSSMutableStyleDeclaration; class HTMLTableCellElement; class RegularExpression; class RenderPart; @@ -98,9 +98,13 @@ namespace WebCore { FrameView* view() const; void setDOMWindow(DOMWindow*); - DOMWindow* domWindow() const; void clearFormerDOMWindow(DOMWindow*); + // Unlike many of the accessors in Frame, domWindow() always creates a new DOMWindow if m_domWindow is null. + // Callers that don't need a new DOMWindow to be created should use existingDOMWindow(). + DOMWindow* domWindow() const; + DOMWindow* existingDOMWindow() { return m_domWindow.get(); } + Editor* editor() const; EventHandler* eventHandler() const; FrameLoader* loader() const; @@ -223,7 +227,6 @@ namespace WebCore { void applyEditingStyleToBodyElement() const; void removeEditingStyleFromBodyElement() const; void applyEditingStyleToElement(Element*) const; - void removeEditingStyleFromElement(Element*) const; IntRect firstRectForRange(Range*) const; @@ -290,6 +293,7 @@ namespace WebCore { virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&); virtual void tiledBackingStorePaintEnd(const Vector& paintedArea); virtual IntRect tiledBackingStoreContentsRect(); + virtual IntRect tiledBackingStoreVisibleRect(); #endif #if PLATFORM(MAC) @@ -373,6 +377,163 @@ namespace WebCore { #endif }; + inline void Frame::init() + { + m_loader.init(); + } + + inline FrameLoader* Frame::loader() const + { + return &m_loader; + } + + inline RedirectScheduler* Frame::redirectScheduler() const + { + return &m_redirectScheduler; + } + + inline FrameView* Frame::view() const + { + return m_view.get(); + } + + inline ScriptController* Frame::script() + { + return &m_script; + } + + inline Document* Frame::document() const + { + return m_doc.get(); + } + + inline SelectionController* Frame::selection() const + { + return &m_selectionController; + } + + inline Editor* Frame::editor() const + { + return &m_editor; + } + + inline AnimationController* Frame::animation() const + { + return &m_animationController; + } + + inline const VisibleSelection& Frame::mark() const + { + return m_mark; + } + + inline void Frame::setMark(const VisibleSelection& s) + { + ASSERT(!s.base().node() || s.base().node()->document() == document()); + ASSERT(!s.extent().node() || s.extent().node()->document() == document()); + ASSERT(!s.start().node() || s.start().node()->document() == document()); + ASSERT(!s.end().node() || s.end().node()->document() == document()); + + m_mark = s; + } + + inline float Frame::zoomFactor() const + { + return m_zoomFactor; + } + + inline String Frame::jsStatusBarText() const + { + return m_kjsStatusBarText; + } + + inline String Frame::jsDefaultStatusBarText() const + { + return m_kjsDefaultStatusBarText; + } + + inline bool Frame::needsReapplyStyles() const + { + return m_needsReapplyStyles; + } + + inline CSSMutableStyleDeclaration* Frame::typingStyle() const + { + return m_typingStyle.get(); + } + + inline void Frame::clearTypingStyle() + { + m_typingStyle = 0; + } + + inline HTMLFrameOwnerElement* Frame::ownerElement() const + { + return m_ownerElement; + } + + inline bool Frame::isDisconnected() const + { + return m_isDisconnected; + } + + inline void Frame::setIsDisconnected(bool isDisconnected) + { + m_isDisconnected = isDisconnected; + } + + inline bool Frame::excludeFromTextSearch() const + { + return m_excludeFromTextSearch; + } + + inline void Frame::setExcludeFromTextSearch(bool exclude) + { + m_excludeFromTextSearch = exclude; + } + + inline bool Frame::inViewSourceMode() const + { + return m_inViewSourceMode; + } + + inline void Frame::setInViewSourceMode(bool mode) + { + m_inViewSourceMode = mode; + } + + inline bool Frame::markedTextMatchesAreHighlighted() const + { + return m_highlightTextMatches; + } + + inline FrameTree* Frame::tree() const + { + return &m_treeNode; + } + + inline Page* Frame::page() const + { + return m_page; + } + + inline void Frame::detachFromPage() + { + m_page = 0; + } + + inline EventHandler* Frame::eventHandler() const + { + return &m_eventHandler; + } + + inline bool Frame::shouldClose() + { + // FIXME: Some WebKit clients call Frame::shouldClose() directly. + // We should transition them to calling FrameLoader::shouldClose() then get rid of this method. + return m_loader.shouldClose(); + } + } // namespace WebCore #endif // Frame_h -- cgit v1.1