summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Frame.h
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-05-21 16:53:46 +0100
committerKristian Monsen <kristianm@google.com>2010-05-25 10:24:15 +0100
commit6c2af9490927c3c5959b5cb07461b646f8b32f6c (patch)
treef7111b9b22befab472616c1d50ec94eb50f1ec8c /WebCore/page/Frame.h
parenta149172322a9067c14e8b474a53e63649aa17cad (diff)
downloadexternal_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.zip
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.gz
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.bz2
Merge WebKit at r59636: Initial merge by git
Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91
Diffstat (limited to 'WebCore/page/Frame.h')
-rw-r--r--WebCore/page/Frame.h169
1 files changed, 165 insertions, 4 deletions
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 <hausmann@kde.org>
* 2000-2001 Dirk Mueller <mueller@kde.org>
* 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 <eric@webkit.org>
*
@@ -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<IntRect>& 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