FramePrivate.h 3.66 KB
Newer Older
darin's avatar
darin committed
1
/* Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
darin's avatar
darin committed
2 3 4 5 6
 *                     1999-2001 Lars Knoll <knoll@kde.org>
 *                     1999-2001 Antti Koivisto <koivisto@kde.org>
 *                     2000-2001 Simon Hausmann <hausmann@kde.org>
 *                     2000-2001 Dirk Mueller <mueller@kde.org>
 *                     2000 Stefan Schimanski <1Stein@gmx.de>
darin's avatar
darin committed
7
 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
mjs's avatar
mjs committed
8
 * Copyright (C) 2007 Trolltech ASA
darin's avatar
darin committed
9 10 11 12 13 14 15 16 17 18 19 20 21
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
ddkilzer's avatar
ddkilzer committed
22 23
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
darin's avatar
darin committed
24
 */
darin's avatar
darin committed
25

26 27
#ifndef FramePrivate_h
#define FramePrivate_h
darin's avatar
darin committed
28

29
#include "AnimationController.h"
aliceli1's avatar
aliceli1 committed
30
#include "Editor.h"
darin's avatar
darin committed
31
#include "EventHandler.h"
darin's avatar
darin committed
32
#include "FrameTree.h"
mjs's avatar
mjs committed
33
#include "Range.h"
darin's avatar
darin committed
34
#include "SelectionController.h"
darin's avatar
darin committed
35
#include "StringHash.h"
darin's avatar
darin committed
36

mjs's avatar
mjs committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
namespace KJS {
    class Interpreter;
        
    namespace Bindings {
        class Instance;
        class RootObject;
    }
}

#if PLATFORM(MAC)
#ifdef __OBJC__
@class WebCoreFrameBridge;
@class WebScriptObject;
#else
class WebCoreFrameBridge;
class WebScriptObject;
#endif
#endif

#if PLATFORM(WIN)
#include "FrameWin.h"
#endif

darin's avatar
darin committed
60 61 62
namespace WebCore {

    class UserStyleSheetLoader;
darin's avatar
darin committed
63

andersca's avatar
andersca committed
64 65
    typedef HashMap<void*, RefPtr<KJS::Bindings::RootObject> > RootObjectMap;
    
darin's avatar
darin committed
66
    class FramePrivate {
darin's avatar
darin committed
67
    public:
darin's avatar
darin committed
68
        FramePrivate(Page*, Frame* parent, Frame* thisFrame, HTMLFrameOwnerElement*, FrameLoaderClient*);
darin's avatar
darin committed
69
        ~FramePrivate();
darin's avatar
darin committed
70 71 72

        Page* m_page;
        FrameTree m_treeNode;
ggaren's avatar
ggaren committed
73
        RefPtr<DOMWindow> m_domWindow;
darin's avatar
darin committed
74

darin's avatar
darin committed
75
        HTMLFrameOwnerElement* m_ownerElement;
darin's avatar
darin committed
76
        RefPtr<FrameView> m_view;
darin's avatar
darin committed
77
        RefPtr<Document> m_doc;
darin's avatar
darin committed
78

darin's avatar
darin committed
79
        KJSProxy* m_jscript;
darin's avatar
darin committed
80

darin's avatar
darin committed
81 82
        String m_kjsStatusBarText;
        String m_kjsDefaultStatusBarText;
darin's avatar
darin committed
83 84 85

        int m_zoomFactor;

darin's avatar
darin committed
86
        TextGranularity m_selectionGranularity;
darin's avatar
darin committed
87

justing's avatar
justing committed
88
        SelectionController m_selectionController;
darin's avatar
darin committed
89 90
        Selection m_mark;
        Timer<Frame> m_caretBlinkTimer;
aliceli1's avatar
aliceli1 committed
91
        Editor m_editor;
darin's avatar
darin committed
92
        EventHandler m_eventHandler;
93
        AnimationController m_animationController;
aliceli1's avatar
 
aliceli1 committed
94

darin's avatar
darin committed
95 96
        bool m_caretVisible : 1;
        bool m_caretPaint : 1;
97
        bool m_isActive : 1;
antti's avatar
antti committed
98
        bool m_isPainting : 1;
darin's avatar
darin committed
99

darin's avatar
darin committed
100
        RefPtr<CSSMutableStyleDeclaration> m_typingStyle;
darin's avatar
darin committed
101 102

        Timer<Frame> m_lifeSupportTimer;
darin's avatar
darin committed
103

darin's avatar
darin committed
104
        FrameLoader* m_loader;
mjs's avatar
mjs committed
105
        
darin's avatar
darin committed
106
        UserStyleSheetLoader* m_userStyleSheetLoader;
adele's avatar
adele committed
107
        
108
        RefPtr<Node> m_elementToDraw;
109
        PaintRestriction m_paintRestriction;
110
        
sullivan's avatar
sullivan committed
111
        bool m_highlightTextMatches;
112 113
        bool m_windowHasFocus;
        
114 115
        bool m_inViewSourceMode;

116
        unsigned frameCount;
tomernic's avatar
tomernic committed
117 118

        bool m_prohibitsScrolling;
mjs's avatar
mjs committed
119

120 121
        bool m_needsReapplyStyles;

mjs's avatar
mjs committed
122 123
        // The root object used for objects bound outside the context of a plugin.
        RefPtr<KJS::Bindings::RootObject> m_bindingRootObject; 
andersca's avatar
andersca committed
124
        RootObjectMap m_rootObjects;
mjs's avatar
mjs committed
125 126
        NPObject* m_windowScriptNPObject;
#if PLATFORM(MAC)
thatcher's avatar
thatcher committed
127
        RetainPtr<WebScriptObject> m_windowScriptObject;
mjs's avatar
mjs committed
128 129
        WebCoreFrameBridge* m_bridge;
#endif
darin's avatar
darin committed
130
    };
darin's avatar
darin committed
131 132
}

darin's avatar
darin committed
133
#endif