summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/page/Frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/page/Frame.h')
-rw-r--r--src/3rdparty/webkit/WebCore/page/Frame.h89
1 files changed, 40 insertions, 49 deletions
diff --git a/src/3rdparty/webkit/WebCore/page/Frame.h b/src/3rdparty/webkit/WebCore/page/Frame.h
index 6208bbd..65bdeb0 100644
--- a/src/3rdparty/webkit/WebCore/page/Frame.h
+++ b/src/3rdparty/webkit/WebCore/page/Frame.h
@@ -29,24 +29,25 @@
#define Frame_h
#include "AnimationController.h"
-#include "Document.h"
#include "DragImage.h"
-#include "EditAction.h"
#include "Editor.h"
#include "EventHandler.h"
#include "FrameLoader.h"
#include "FrameTree.h"
-#include "Range.h"
#include "ScriptController.h"
#include "ScrollBehavior.h"
#include "SelectionController.h"
-#include "TextGranularity.h"
#include "UserScriptTypes.h"
+#include "ZoomMode.h"
#if PLATFORM(WIN)
#include "FrameWin.h"
#endif
+#if ENABLE(TILED_BACKING_STORE)
+#include "TiledBackingStoreClient.h"
+#endif
+
#if PLATFORM(MAC)
#ifndef __OBJC__
class NSArray;
@@ -64,26 +65,16 @@ typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
class CSSMutableStyleDeclaration;
- class Editor;
- class EventHandler;
- class FrameLoader;
- class RedirectScheduler;
- class FrameLoaderClient;
- class FrameTree;
- class FrameView;
- class HTMLFrameOwnerElement;
class HTMLTableCellElement;
class RegularExpression;
class RenderPart;
- class ScriptController;
- class SelectionController;
- class Settings;
- class VisibleSelection;
- class Widget;
-
- template <typename T> class Timer;
+ class TiledBackingStore;
- class Frame : public RefCounted<Frame> {
+ class Frame : public RefCounted<Frame>
+#if ENABLE(TILED_BACKING_STORE)
+ , public TiledBackingStoreClient
+#endif
+ {
public:
static PassRefPtr<Frame> create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client)
{
@@ -96,6 +87,8 @@ namespace WebCore {
Page* page() const;
void detachFromPage();
+ void transferChildFrameToNewDocument();
+
HTMLFrameOwnerElement* ownerElement() const;
void pageDestroyed();
@@ -131,7 +124,7 @@ namespace WebCore {
void injectUserScripts(UserScriptInjectionTime);
private:
- void injectUserScriptsForWorld(unsigned worldID, const UserScriptVector&, UserScriptInjectionTime);
+ void injectUserScriptsForWorld(DOMWrapperWorld*, const UserScriptVector&, UserScriptInjectionTime);
private:
Frame(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
@@ -181,15 +174,20 @@ namespace WebCore {
return document() ? document()->displayStringModifiedByEncoding(str) : str;
}
+#if ENABLE(TILED_BACKING_STORE)
+ TiledBackingStore* tiledBackingStore() const { return m_tiledBackingStore.get(); }
+ void setTiledBackingStoreEnabled(bool);
+#endif
+
private:
void lifeSupportTimerFired(Timer<Frame>*);
// === to be moved into FrameView
public:
- void setZoomFactor(float scale, bool isTextOnly);
+ void setZoomFactor(float scale, ZoomMode);
float zoomFactor() const;
- bool isZoomFactorTextOnly() const;
+ ZoomMode zoomMode() const;
bool shouldApplyTextZoom() const;
bool shouldApplyPageZoom() const;
float pageZoomFactor() const { return shouldApplyPageZoom() ? zoomFactor() : 1.0f; }
@@ -250,59 +248,54 @@ namespace WebCore {
public:
TextGranularity selectionGranularity() const;
- void setSelectionGranularity(TextGranularity);
bool shouldChangeSelection(const VisibleSelection&) const;
bool shouldDeleteSelection(const VisibleSelection&) const;
- void clearCaretRectIfNeeded();
void setFocusedNodeIfNeeded();
- void selectionLayoutChanged();
void notifyRendererOfSelectionChange(bool userTriggered);
- void invalidateSelection();
-
- void setCaretVisible(bool = true);
- void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
bool isContentEditable() const; // if true, everything in frame is editable
- void updateSecureKeyboardEntryIfActive();
-
CSSMutableStyleDeclaration* typingStyle() const;
void setTypingStyle(CSSMutableStyleDeclaration*);
void clearTypingStyle();
FloatRect selectionBounds(bool clipToVisibleContent = true) const;
- void selectionTextRects(Vector<FloatRect>&, bool clipToVisibleContent = true) const;
+ enum SelectionRectRespectTransforms { RespectTransforms = true, IgnoreTransforms = false };
+ void selectionTextRects(Vector<FloatRect>&, SelectionRectRespectTransforms respectTransforms, bool clipToVisibleContent = true) const;
HTMLFormElement* currentForm() const;
void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, bool revealExtent = false);
void setSelectionFromNone();
- void setUseSecureKeyboardEntry(bool);
-
- private:
- void caretBlinkTimerFired(Timer<Frame>*);
-
- public:
SelectionController* dragCaretController() const;
- String searchForLabelsAboveCell(RegularExpression*, HTMLTableCellElement*);
- String searchForLabelsBeforeElement(const Vector<String>& labels, Element*);
+ String searchForLabelsAboveCell(RegularExpression*, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
+ String searchForLabelsBeforeElement(const Vector<String>& labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
String matchLabelsAgainstElement(const Vector<String>& labels, Element*);
VisiblePosition visiblePositionForPoint(const IntPoint& framePoint);
Document* documentAtPoint(const IntPoint& windowPoint);
+
+ private:
+#if ENABLE(TILED_BACKING_STORE)
+ // TiledBackingStoreClient interface
+ virtual void tiledBackingStorePaintBegin();
+ virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&);
+ virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea);
+ virtual IntRect tiledBackingStoreContentsRect();
+#endif
#if PLATFORM(MAC)
// === undecided, would like to consider moving to another class
public:
- NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*);
- NSString* searchForLabelsBeforeElement(NSArray* labels, Element*);
+ NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
+ NSString* searchForLabelsBeforeElement(NSArray* labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
NSString* matchLabelsAgainstElement(NSArray* labels, Element*);
#if ENABLE(DASHBOARD_SUPPORT)
@@ -352,11 +345,8 @@ namespace WebCore {
float m_zoomFactor;
- TextGranularity m_selectionGranularity;
-
mutable SelectionController m_selectionController;
mutable VisibleSelection m_mark;
- Timer<Frame> m_caretBlinkTimer;
mutable Editor m_editor;
mutable EventHandler m_eventHandler;
mutable AnimationController m_animationController;
@@ -368,15 +358,16 @@ namespace WebCore {
#if ENABLE(ORIENTATION_EVENTS)
int m_orientation;
#endif
-
- bool m_caretVisible;
- bool m_caretPaint;
bool m_highlightTextMatches;
bool m_inViewSourceMode;
bool m_needsReapplyStyles;
bool m_isDisconnected;
bool m_excludeFromTextSearch;
+
+#if ENABLE(TILED_BACKING_STORE)
+ OwnPtr<TiledBackingStore> m_tiledBackingStore;
+#endif
};
} // namespace WebCore