[BlackBerry] Add WebPageCompositor class to BlackBerry WebKit API
[WebKit-https.git] / Source / WebKit / blackberry / Api / WebPage_p.h
1 /*
2  * Copyright (C) 2009, 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18
19 #ifndef WebPage_p_h
20 #define WebPage_p_h
21
22 #include "ChromeClient.h"
23 #if USE(ACCELERATED_COMPOSITING)
24 #include "GLES2Context.h"
25 #include "LayerRenderer.h"
26 #endif
27 #include "PageClientBlackBerry.h"
28 #include "PlatformMouseEvent.h"
29 #include "ScriptSourceCode.h"
30 #include "Timer.h"
31 #include "ViewportArguments.h"
32 #include "WebPage.h"
33 #include "WebSettings.h"
34
35 #include <BlackBerryPlatformMessage.h>
36
37 namespace WebCore {
38 class DOMWrapperWorld;
39 class Document;
40 class Frame;
41 class GeolocationControllerClientBlackBerry;
42 class JavaScriptDebuggerBlackBerry;
43 class KURL;
44 class Node;
45 class Page;
46 class PluginView;
47 class RenderLayer;
48 class RenderObject;
49 class ScrollView;
50 class TransformationMatrix;
51 template<typename T> class Timer;
52 }
53
54 namespace BlackBerry {
55 namespace WebKit {
56
57 class BackingStore;
58 class BackingStoreClient;
59 class BackingStoreTile;
60 class DumpRenderTreeClient;
61 class InPageSearchManager;
62 class InputHandler;
63 class SelectionHandler;
64 class TouchEventHandler;
65 class WebPageClient;
66
67 #if USE(ACCELERATED_COMPOSITING)
68 class FrameLayers;
69 class WebPageCompositorPrivate;
70 #endif
71
72 // In the client code, there is screen size and viewport.
73 // In WebPagePrivate, the screen size is called the transformedViewportSize,
74 // the viewport position is called the transformedScrollPosition,
75 // and the viewport size is called the transformedActualVisibleSize.
76 class WebPagePrivate : public PageClientBlackBerry, public WebSettingsDelegate, public Platform::GuardedPointerBase {
77 public:
78     enum ViewMode { Mobile, Desktop, FixedDesktop };
79     enum LoadState { None /* on instantiation of page */, Provisional, Committed, Finished, Failed };
80
81     WebPagePrivate(WebPage*, WebPageClient*, const WebCore::IntRect&);
82     virtual ~WebPagePrivate();
83
84     static WebCore::Page* core(const WebPage*);
85
86     WebPageClient* client() const { return m_client; }
87
88     void init(const WebString& pageGroupName);
89     bool handleMouseEvent(WebCore::PlatformMouseEvent&);
90     bool handleWheelEvent(WebCore::PlatformWheelEvent&);
91
92     void load(const char* url, const char* networkToken, const char* method, Platform::NetworkRequest::CachePolicy, const char* data, size_t dataLength, const char* const* headers, size_t headersLength, bool isInitial, bool mustHandleInternally = false, bool forceDownload = false, const char* overrideContentType = "");
93     void loadString(const char* string, const char* baseURL, const char* mimeType, const char* failingURL = 0);
94     bool executeJavaScript(const char* script, JavaScriptDataType& returnType, WebString& returnValue);
95     bool executeJavaScriptInIsolatedWorld(const WebCore::ScriptSourceCode&, JavaScriptDataType& returnType, WebString& returnValue);
96
97     void stopCurrentLoad();
98     void prepareToDestroy();
99
100     LoadState loadState() const { return m_loadState; }
101     bool isLoading() const { return m_loadState == WebPagePrivate::Provisional || m_loadState == WebPagePrivate::Committed; }
102
103     // Called from within WebKit via FrameLoaderClientBlackBerry.
104     void setLoadState(LoadState);
105
106     // Clamp the scale.
107     double clampedScale(double scale) const;
108
109     // Determine if we should zoom, clamping the scale parameter if required.
110     bool shouldZoomAboutPoint(double scale, const WebCore::FloatPoint& anchor, bool enforeScaleClamping, double* clampedScale);
111
112     // Scale the page to the given scale and anchor about the point which is specified in untransformed content coordinates.
113     bool zoomAboutPoint(double scale, const WebCore::FloatPoint& anchor, bool enforceScaleClamping = true, bool forceRendering = false, bool isRestoringZoomLevel = false);
114     bool scheduleZoomAboutPoint(double scale, const WebCore::FloatPoint& anchor, bool enforceScaleClamping = true, bool forceRendering = false);
115     void unscheduleZoomAboutPoint();
116     WebCore::IntPoint calculateReflowedScrollPosition(const WebCore::FloatPoint& anchorOffset, double inverseScale);
117     void setTextReflowAnchorPoint(const Platform::IntPoint& focalPoint);
118
119     void schedulePinchZoomAboutPoint(double scale, const WebCore::IntPoint& anchor);
120
121     // Perform actual zoom for block zoom.
122     void zoomBlock();
123
124     // Called by the backing store as well as the method below.
125     void requestLayoutIfNeeded() const;
126     void setNeedsLayout();
127
128     WebCore::IntPoint scrollPosition() const;
129     WebCore::IntPoint maximumScrollPosition() const;
130     void setScrollPosition(const WebCore::IntPoint&);
131     bool scrollBy(int deltaX, int deltaY, bool scrollMainFrame = true);
132
133     void enqueueRenderingOfClippedContentOfScrollableNodeAfterInRegionScrolling(WebCore::Node*);
134     std::vector<Platform::ScrollViewBase> inRegionScrollableAreasForPoint(const Platform::IntPoint&);
135     void notifyInRegionScrollStatusChanged(bool status);
136     void setScrollOriginPoint(const Platform::IntPoint&);
137     void setHasInRegionScrollableAreas(bool);
138
139     // The actual visible size as reported by the client, but in WebKit coordinates.
140     WebCore::IntSize actualVisibleSize() const;
141
142     // The viewport size is the same as the client's window size, but in webkit coordinates.
143     WebCore::IntSize viewportSize() const;
144
145     // Modifies the zoomToFit algorithm logic to construct a scale such that the viewportSize above is equal to this size.
146     bool hasVirtualViewport() const;
147     bool isUserScalable() const { return m_userScalable; }
148     void setUserScalable(bool userScalable) { m_userScalable = userScalable; }
149
150     // Sets default layout size without doing layout or marking as needing layout.
151     void setDefaultLayoutSize(const WebCore::IntSize&);
152
153     // Updates WebCore when the viewportSize() or actualVisibleSize() change.
154     void updateViewportSize(bool setFixedReportedSize = true, bool sendResizeEvent = true);
155
156     WebCore::FloatPoint centerOfVisibleContentsRect() const;
157     WebCore::IntRect visibleContentsRect() const;
158     WebCore::IntSize contentsSize() const;
159     WebCore::IntSize absoluteVisibleOverflowSize() const;
160
161     // Virtual functions inherited from PageClientBlackBerry.
162     virtual void setCursor(WebCore::PlatformCursor);
163     virtual Platform::NetworkStreamFactory* networkStreamFactory();
164     virtual Platform::Graphics::Window* platformWindow() const;
165     virtual void setPreventsScreenDimming(bool preventDimming);
166     virtual void showVirtualKeyboard(bool showKeyboard);
167     virtual void ensureContentVisible(bool centerInView = true);
168     virtual void zoomToContentRect(const WebCore::IntRect&);
169     virtual void registerPlugin(WebCore::PluginView*, bool);
170     virtual void notifyPageOnLoad();
171     virtual bool shouldPluginEnterFullScreen(WebCore::PluginView*, const char*);
172     virtual void didPluginEnterFullScreen(WebCore::PluginView*, const char*);
173     virtual void didPluginExitFullScreen(WebCore::PluginView*, const char*);
174     virtual void onPluginStartBackgroundPlay(WebCore::PluginView*, const char*);
175     virtual void onPluginStopBackgroundPlay(WebCore::PluginView*, const char*);
176     virtual bool lockOrientation(bool landscape);
177     virtual void unlockOrientation();
178     virtual int orientation() const;
179     virtual double currentZoomFactor() const;
180     virtual int showAlertDialog(WebPageClient::AlertType atype);
181     virtual bool isActive() const;
182     virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&);
183     virtual SaveCredentialType notifyShouldSaveCredential(bool);
184
185     // Called from within WebKit via ChromeClientBlackBerry.
186     void enterFullscreenForNode(WebCore::Node*);
187     void exitFullscreenForNode(WebCore::Node*);
188     void contentsSizeChanged(const WebCore::IntSize&);
189     void overflowExceedsContentsSize() { m_overflowExceedsContentsSize = true; }
190     void layoutFinished();
191     void setNeedTouchEvents(bool);
192
193     // Called according to our heuristic or from setLoadState depending on whether we have a virtual viewport.
194     void zoomToInitialScaleOnLoad();
195
196     // Various scale factors.
197     double currentScale() const { return m_transformationMatrix->m11(); }
198     double zoomToFitScale() const;
199     double initialScale() const;
200     void setInitialScale(double scale) { m_initialScale = scale; }
201     double minimumScale() const
202     {
203         return (m_minimumScale > zoomToFitScale() && m_minimumScale <= maximumScale()) ? m_minimumScale : zoomToFitScale();
204     }
205
206     void setMinimumScale(double scale) { m_minimumScale = scale; }
207     double maximumScale() const;
208     void setMaximumScale(double scale) { m_maximumScale = scale; }
209     void resetScales();
210
211     // Note: to make this reflow width transform invariant just use
212     // transformedActualVisibleSize() here instead!
213     int reflowWidth() const { return actualVisibleSize().width(); }
214
215     // These methods give the real geometry of the device given the currently set transform.
216     WebCore::IntPoint transformedScrollPosition() const;
217     WebCore::IntPoint transformedMaximumScrollPosition() const;
218     WebCore::IntSize transformedActualVisibleSize() const;
219     WebCore::IntSize transformedViewportSize() const;
220     WebCore::IntRect transformedVisibleContentsRect() const;
221     WebCore::IntSize transformedContentsSize() const;
222
223     // Generic conversions of points, rects, relative to and from contents and viewport.
224     WebCore::IntPoint mapFromContentsToViewport(const WebCore::IntPoint&) const;
225     WebCore::IntPoint mapFromViewportToContents(const WebCore::IntPoint&) const;
226     WebCore::IntRect mapFromContentsToViewport(const WebCore::IntRect&) const;
227     WebCore::IntRect mapFromViewportToContents(const WebCore::IntRect&) const;
228
229     // Generic conversions of points, rects, relative to and from transformed contents and transformed viewport.
230     WebCore::IntPoint mapFromTransformedContentsToTransformedViewport(const WebCore::IntPoint&) const;
231     WebCore::IntPoint mapFromTransformedViewportToTransformedContents(const WebCore::IntPoint&) const;
232     WebCore::IntRect mapFromTransformedContentsToTransformedViewport(const WebCore::IntRect&) const;
233     WebCore::IntRect mapFromTransformedViewportToTransformedContents(const WebCore::IntRect&) const;
234
235     // Generic conversions of points, rects, and sizes to and from transformed coordinates.
236     WebCore::IntPoint mapToTransformed(const WebCore::IntPoint&) const;
237     WebCore::FloatPoint mapToTransformedFloatPoint(const WebCore::FloatPoint&) const;
238     WebCore::IntPoint mapFromTransformed(const WebCore::IntPoint&) const;
239     WebCore::FloatPoint mapFromTransformedFloatPoint(const WebCore::FloatPoint&) const;
240     WebCore::FloatRect mapFromTransformedFloatRect(const WebCore::FloatRect&) const;
241     WebCore::IntSize mapToTransformed(const WebCore::IntSize&) const;
242     WebCore::IntSize mapFromTransformed(const WebCore::IntSize&) const;
243     WebCore::IntRect mapToTransformed(const WebCore::IntRect&) const;
244     void clipToTransformedContentsRect(WebCore::IntRect&) const;
245     WebCore::IntRect mapFromTransformed(const WebCore::IntRect&) const;
246     bool transformedPointEqualsUntransformedPoint(const WebCore::IntPoint& transformedPoint, const WebCore::IntPoint& untransformedPoint);
247
248     // Notification methods that deliver changes to the real geometry of the device as specified above.
249     void notifyTransformChanged();
250     void notifyTransformedContentsSizeChanged();
251     void notifyTransformedScrollChanged();
252
253     void assignFocus(Platform::FocusDirection);
254     Platform::IntRect focusNodeRect();
255     WebCore::IntRect getRecursiveVisibleWindowRect(WebCore::ScrollView*, bool noClipOfMainFrame = false);
256
257     WebCore::IntPoint frameOffset(const WebCore::Frame*) const;
258
259     WebCore::Node* bestNodeForZoomUnderPoint(const WebCore::IntPoint&);
260     WebCore::Node* bestChildNodeForClickRect(WebCore::Node* parentNode, const WebCore::IntRect& clickRect);
261     WebCore::Node* nodeForZoomUnderPoint(const WebCore::IntPoint&);
262     WebCore::Node* adjustedBlockZoomNodeForZoomLimits(WebCore::Node*);
263     WebCore::IntRect rectForNode(WebCore::Node*);
264     WebCore::IntRect blockZoomRectForNode(WebCore::Node*);
265     WebCore::IntRect adjustRectOffsetForFrameOffset(const WebCore::IntRect&, const WebCore::Node*);
266     bool compareNodesForBlockZoom(WebCore::Node* n1, WebCore::Node* n2);
267     double newScaleForBlockZoomRect(const WebCore::IntRect&, double oldScale, double margin);
268     double maxBlockZoomScale() const;
269
270     // Plugin Methods.
271     void notifyPluginRectChanged(int id, const WebCore::IntRect& rectChanged);
272
273     // Context Methods.
274     Platform::WebContext webContext(TargetDetectionStrategy);
275     PassRefPtr<WebCore::Node> contextNode(TargetDetectionStrategy);
276
277 #if ENABLE(VIEWPORT_REFLOW)
278     void toggleTextReflowIfEnabledForBlockZoomOnly(bool shouldEnableTextReflow = false);
279 #endif
280
281     void selectionChanged(WebCore::Frame*);
282
283     void updateDelegatedOverlays(bool dispatched = false);
284
285     void updateCursor();
286
287     void onInputLocaleChanged(bool isRTL);
288
289     ViewMode viewMode() const { return m_viewMode; }
290     bool setViewMode(ViewMode); // Returns true if the change requires re-layout.
291
292     void setShouldUseFixedDesktopMode(bool b) { m_shouldUseFixedDesktopMode = b; }
293
294     bool useFixedLayout() const;
295     WebCore::IntSize fixedLayoutSize(bool snapToIncrement = false) const;
296
297     // ZoomToFitOnLoad can lead to a large recursion depth in FrameView::layout() as we attempt
298     // to determine the zoom scale factor so as to have the content of the page fit within the
299     // area of the frame. From observation, we can bail out after a recursion depth of 10 and
300     // still have reasonable results.
301     bool didLayoutExceedMaximumIterations() const { return m_nestedLayoutFinishedCount > 10; }
302
303     void clearFocusNode();
304     WebCore::Frame* focusedOrMainFrame() const;
305     WebCore::Frame* mainFrame() const { return m_mainFrame; }
306
307     bool scrollNodeRecursively(WebCore::Node* originalNode, const WebCore::IntSize& delta);
308     bool scrollRenderer(WebCore::RenderObject* renderer, const WebCore::IntSize& delta);
309     void adjustScrollDelta(const WebCore::IntPoint& maxOffset, const WebCore::IntPoint& currentOffset, WebCore::IntSize& delta) const;
310
311     bool canScrollRenderBox(WebCore::RenderBox*);
312     bool canScrollInnerFrame(WebCore::Frame*) const;
313
314 #if ENABLE(EVENT_MODE_METATAGS)
315     void didReceiveCursorEventMode(WebCore::CursorEventMode);
316     void didReceiveTouchEventMode(WebCore::TouchEventMode);
317 #endif
318
319     void dispatchViewportPropertiesDidChange(const WebCore::ViewportArguments&);
320     WebCore::IntSize recomputeVirtualViewportFromViewportArguments();
321
322     void resetBlockZoom();
323
324     void zoomAboutPointTimerFired(WebCore::Timer<WebPagePrivate>*);
325     bool shouldSendResizeEvent();
326     void scrollEventTimerFired(WebCore::Timer<WebPagePrivate>*);
327     void resizeEventTimerFired(WebCore::Timer<WebPagePrivate>*);
328
329     // If this url should be handled as a pattern, returns the pattern
330     // otherwise, returns an empty string.
331     String findPatternStringForUrl(const WebCore::KURL&) const;
332
333     void suspendBackingStore();
334     void resumeBackingStore();
335
336     void setShouldResetTilesWhenShown(bool flag) { m_shouldResetTilesWhenShown = flag; }
337     bool shouldResetTilesWhenShown() const { return m_shouldResetTilesWhenShown; }
338
339     void setScreenOrientation(int);
340
341     // Scroll and/or zoom so that the WebPage fits the new actual
342     // visible size.
343     void setViewportSize(const WebCore::IntSize& transformedActualVisibleSize, bool ensureFocusElementVisible);
344     void screenRotated(); // Helper method for setViewportSize().
345
346     void scheduleDeferrableTimer(WebCore::Timer<WebPagePrivate>*, double timeOut);
347     void unscheduleAllDeferrableTimers();
348     void willDeferLoading();
349     void didResumeLoading();
350
351     // Returns true if the escape key handler should zoom.
352     bool shouldZoomOnEscape() const;
353
354     WebCore::TransformationMatrix* transformationMatrix() const
355     {
356         return m_transformationMatrix;
357     }
358
359 #if USE(ACCELERATED_COMPOSITING)
360     // WebKit thread.
361     bool needsOneShotDrawingSynchronization();
362     void rootLayerCommitTimerFired(WebCore::Timer<WebPagePrivate>*);
363     bool commitRootLayerIfNeeded();
364     WebCore::LayerRenderingResults lastCompositingResults() const;
365
366     // WebKit thread, plumbed through from ChromeClientBlackBerry.
367     void setRootLayerWebKitThread(WebCore::Frame*, WebCore::LayerWebKitThread*);
368     void setNeedsOneShotDrawingSynchronization();
369     void scheduleRootLayerCommit();
370
371     // Thread safe.
372     void resetCompositingSurface();
373     void drawLayersOnCommit(); // Including backing store blit.
374
375     // Compositing thread.
376     void setRootLayerCompositingThread(WebCore::LayerCompositingThread*);
377     void commitRootLayer(const WebCore::IntRect&, const WebCore::IntSize&);
378     bool isAcceleratedCompositingActive() const { return m_compositor; }
379     WebPageCompositorPrivate* compositor() const { return m_compositor.get(); }
380     void setCompositor(PassRefPtr<WebPageCompositorPrivate>);
381     bool createCompositor();
382     void destroyCompositor();
383     void syncDestroyCompositorOnCompositingThread();
384     void destroyLayerResources();
385     void suspendRootLayerCommit();
386     void resumeRootLayerCommit();
387     void blitVisibleContents();
388 #endif
389
390     bool dispatchTouchEventToFullScreenPlugin(WebCore::PluginView*, const Platform::TouchEvent&);
391     bool dispatchTouchPointAsMouseEventToFullScreenPlugin(WebCore::PluginView*, const Platform::TouchPoint&);
392     bool dispatchMouseEventToFullScreenPlugin(WebCore::PluginView*, const Platform::MouseEvent&);
393
394     BackingStoreClient* backingStoreClientForFrame(const WebCore::Frame*) const;
395     void addBackingStoreClientForFrame(const WebCore::Frame*, BackingStoreClient*);
396     void removeBackingStoreClientForFrame(const WebCore::Frame*);
397
398     // Clean up any document related data we might be holding.
399     void clearDocumentData(const WebCore::Document*);
400
401     void frameUnloaded(const WebCore::Frame*);
402
403     static WebCore::RenderLayer* enclosingPositionedAncestorOrSelfIfPositioned(WebCore::RenderLayer*);
404     static WebCore::RenderLayer* enclosingFixedPositionedAncestorOrSelfIfFixedPositioned(WebCore::RenderLayer*);
405
406     static WebCore::IntSize defaultMaxLayoutSize();
407     static const String& defaultUserAgent();
408
409     void setVisible(bool);
410 #if ENABLE(PAGE_VISIBILITY_API)
411     void setPageVisibilityState();
412 #endif
413     void notifyAppActivationStateChange(ActivationStateType);
414
415     WebPage* m_webPage;
416     WebPageClient* m_client;
417     WebCore::Page* m_page;
418     WebCore::Frame* m_mainFrame;
419     RefPtr<WebCore::Node> m_currentContextNode;
420     WebSettings* m_webSettings;
421
422 #if ENABLE(JAVASCRIPT_DEBUGGER)
423     OwnPtr<WebCore::JavaScriptDebuggerBlackBerry> m_scriptDebugger;
424 #endif
425
426     bool m_visible;
427     ActivationStateType m_activationState;
428     bool m_shouldResetTilesWhenShown;
429     bool m_userScalable;
430     bool m_userPerformedManualZoom;
431     bool m_userPerformedManualScroll;
432     bool m_contentsSizeChanged;
433     bool m_overflowExceedsContentsSize;
434     bool m_resetVirtualViewportOnCommitted;
435     bool m_shouldUseFixedDesktopMode;
436     bool m_needTouchEvents;
437     int m_preventIdleDimmingCount;
438
439 #if ENABLE(TOUCH_EVENTS)
440     bool m_preventDefaultOnTouchStart;
441 #endif
442     unsigned m_nestedLayoutFinishedCount;
443     WebCore::IntSize m_previousContentsSize;
444     int m_actualVisibleWidth;
445     int m_actualVisibleHeight;
446     int m_virtualViewportWidth;
447     int m_virtualViewportHeight;
448     WebCore::IntSize m_defaultLayoutSize;
449     WebCore::ViewportArguments m_viewportArguments; // We keep this around since we may need to re-evaluate the arguments on rotation.
450     bool m_didRestoreFromPageCache;
451     ViewMode m_viewMode;
452     LoadState m_loadState;
453     WebCore::TransformationMatrix* m_transformationMatrix;
454     BackingStore* m_backingStore;
455     BackingStoreClient* m_backingStoreClient;
456     InPageSearchManager* m_inPageSearchManager;
457     InputHandler* m_inputHandler;
458     SelectionHandler* m_selectionHandler;
459     TouchEventHandler* m_touchEventHandler;
460
461 #if ENABLE(EVENT_MODE_METATAGS)
462     WebCore::CursorEventMode m_cursorEventMode;
463     WebCore::TouchEventMode m_touchEventMode;
464 #endif
465
466     Platform::BlackBerryCursor m_currentCursor;
467
468     DumpRenderTreeClient* m_dumpRenderTree;
469
470     double m_initialScale;
471     double m_minimumScale;
472     double m_maximumScale;
473
474     // Block zoom animation data.
475     WebCore::FloatPoint m_finalBlockPoint;
476     WebCore::FloatPoint m_finalBlockPointReflowOffset;
477     double m_blockZoomFinalScale;
478     RefPtr<WebCore::Node> m_currentPinchZoomNode;
479     WebCore::FloatPoint m_anchorInNodeRectRatio;
480     RefPtr<WebCore::Node> m_currentBlockZoomNode;
481     RefPtr<WebCore::Node> m_currentBlockZoomAdjustedNode;
482     bool m_shouldReflowBlock;
483
484     // Delayed zoomAboutPoint.
485     OwnPtr<WebCore::Timer<WebPagePrivate> > m_delayedZoomTimer;
486     struct {
487         double scale;
488         WebCore::FloatPoint anchor;
489         bool enforceScaleClamping;
490         bool forceRendering;
491     } m_delayedZoomArguments;
492
493     double m_lastUserEventTimestamp; // Used to detect user scrolling.
494
495     WebCore::PlatformMouseEvent m_lastMouseEvent;
496     bool m_pluginMouseButtonPressed; // Used to track mouse button for full screen plugins.
497     bool m_pluginMayOpenNewTab;
498
499     WebCore::GeolocationControllerClientBlackBerry* m_geolocationClient;
500
501     HashSet<WebCore::PluginView*> m_pluginViews;
502
503     RefPtr<WebCore::Node> m_inRegionScrollStartingNode;
504
505 #if USE(ACCELERATED_COMPOSITING)
506     bool m_isAcceleratedCompositingActive;
507     OwnPtr<FrameLayers> m_frameLayers; // WebKit thread only.
508
509     // Compositing thread only, used only when the WebKit layer created the context.
510     // If the API client created the context, this will be null.
511     OwnPtr<GLES2Context> m_ownedContext;
512
513     RefPtr<WebPageCompositorPrivate> m_compositor; // Compositing thread only.
514     OwnPtr<WebCore::Timer<WebPagePrivate> > m_rootLayerCommitTimer;
515     bool m_needsOneShotDrawingSynchronization;
516     bool m_needsCommit;
517     bool m_suspendRootLayerCommit;
518 #endif
519
520     int m_pendingOrientation;
521
522     RefPtr<WebCore::Node> m_fullscreenVideoNode;
523     RefPtr<WebCore::PluginView> m_fullScreenPluginView;
524
525     typedef HashMap<const WebCore::Frame*, BackingStoreClient*> BackingStoreClientForFrameMap;
526     BackingStoreClientForFrameMap m_backingStoreClientForFrameMap;
527
528     // WebSettingsDelegate methods.
529     virtual void didChangeSettings(WebSettings*);
530
531     RefPtr<WebCore::DOMWrapperWorld> m_isolatedWorld;
532     bool m_hasInRegionScrollableAreas;
533     bool m_updateDelegatedOverlaysDispatched;
534 };
535 }
536 }
537
538 #endif // WebPage_p_h