summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/page
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-16 16:25:10 +0100
committerBen Murdoch <benm@google.com>2011-05-23 18:54:14 +0100
commitab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch)
treedb769fadd053248f85db67434a5b275224defef7 /Source/WebCore/page
parent52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff)
downloadexternal_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/page')
-rw-r--r--Source/WebCore/page/Chrome.cpp7
-rw-r--r--Source/WebCore/page/Chrome.h3
-rw-r--r--Source/WebCore/page/ChromeClient.h3
-rw-r--r--Source/WebCore/page/Console.cpp22
-rw-r--r--Source/WebCore/page/ContextMenuController.h3
-rw-r--r--Source/WebCore/page/DOMSelection.cpp8
-rw-r--r--Source/WebCore/page/DOMWindow.cpp22
-rw-r--r--Source/WebCore/page/DOMWindow.h12
-rw-r--r--Source/WebCore/page/DOMWindow.idl13
-rw-r--r--Source/WebCore/page/DragController.h3
-rw-r--r--Source/WebCore/page/EventHandler.cpp5
-rw-r--r--Source/WebCore/page/EventHandler.h12
-rw-r--r--Source/WebCore/page/EventSource.h1
-rw-r--r--Source/WebCore/page/FocusController.h3
-rw-r--r--Source/WebCore/page/FrameTree.h3
-rw-r--r--Source/WebCore/page/FrameView.cpp79
-rw-r--r--Source/WebCore/page/FrameView.h18
-rw-r--r--Source/WebCore/page/GeolocationController.h3
-rw-r--r--Source/WebCore/page/GroupSettings.h3
-rw-r--r--Source/WebCore/page/Page.h7
-rw-r--r--Source/WebCore/page/PageGroup.cpp4
-rw-r--r--Source/WebCore/page/PageGroup.h3
-rw-r--r--Source/WebCore/page/PageGroupLoadDeferrer.h3
-rw-r--r--Source/WebCore/page/PluginHalter.h3
-rw-r--r--Source/WebCore/page/Settings.cpp6
-rw-r--r--Source/WebCore/page/Settings.h7
-rw-r--r--Source/WebCore/page/SpeechInput.cpp6
-rw-r--r--Source/WebCore/page/SpeechInput.h7
-rw-r--r--Source/WebCore/page/SpeechInputClient.h3
-rw-r--r--Source/WebCore/page/UserScript.h3
-rw-r--r--Source/WebCore/page/UserStyleSheet.h3
-rw-r--r--Source/WebCore/page/XSSAuditor.h3
-rw-r--r--Source/WebCore/page/animation/AnimationBase.cpp6
-rw-r--r--Source/WebCore/page/animation/AnimationControllerPrivate.h3
-rw-r--r--Source/WebCore/page/mac/EventHandlerMac.mm3
35 files changed, 191 insertions, 102 deletions
diff --git a/Source/WebCore/page/Chrome.cpp b/Source/WebCore/page/Chrome.cpp
index 0405408..d96b6c9 100644
--- a/Source/WebCore/page/Chrome.cpp
+++ b/Source/WebCore/page/Chrome.cpp
@@ -445,6 +445,13 @@ void Chrome::setCursor(const Cursor& cursor)
m_client->setCursor(cursor);
}
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+void Chrome::scheduleAnimation()
+{
+ m_client->scheduleAnimation();
+}
+#endif
+
#if ENABLE(NOTIFICATIONS)
NotificationPresenter* Chrome::notificationPresenter() const
{
diff --git a/Source/WebCore/page/Chrome.h b/Source/WebCore/page/Chrome.h
index 93b8c4a..0afd807 100644
--- a/Source/WebCore/page/Chrome.h
+++ b/Source/WebCore/page/Chrome.h
@@ -78,6 +78,9 @@ namespace WebCore {
virtual PlatformPageClient platformPageClient() const;
virtual void scrollbarsModeDidChange() const;
virtual void setCursor(const Cursor&);
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ virtual void scheduleAnimation();
+#endif
void scrollRectIntoView(const IntRect&) const;
diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h
index 51c8959..98b56da 100644
--- a/Source/WebCore/page/ChromeClient.h
+++ b/Source/WebCore/page/ChromeClient.h
@@ -151,6 +151,9 @@ namespace WebCore {
virtual PlatformPageClient platformPageClient() const = 0;
virtual void scrollbarsModeDidChange() const = 0;
virtual void setCursor(const Cursor&) = 0;
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ virtual void scheduleAnimation() = 0;
+#endif
// End methods used by HostWindow.
virtual void dispatchViewportDataDidChange(const ViewportArguments&) const { }
diff --git a/Source/WebCore/page/Console.cpp b/Source/WebCore/page/Console.cpp
index d4aed41..0c19421 100644
--- a/Source/WebCore/page/Console.cpp
+++ b/Source/WebCore/page/Console.cpp
@@ -262,20 +262,13 @@ void Console::profile(const String& title, ScriptState* state, PassRefPtr<Script
if (!page)
return;
-#if ENABLE(INSPECTOR)
- InspectorController* controller = page->inspectorController();
// FIXME: log a console message when profiling is disabled.
- if (!controller->profilerEnabled())
+ if (!InspectorInstrumentation::profilerEnabled(page))
return;
-#endif
String resolvedTitle = title;
if (title.isNull()) // no title so give it the next user initiated profile title.
-#if ENABLE(INSPECTOR)
- resolvedTitle = controller->getCurrentUserInitiatedProfileName(true);
-#else
- resolvedTitle = "";
-#endif
+ resolvedTitle = InspectorInstrumentation::getCurrentUserInitiatedProfileName(page, true);
ScriptProfiler::start(state, resolvedTitle);
@@ -289,22 +282,15 @@ void Console::profileEnd(const String& title, ScriptState* state, PassRefPtr<Scr
if (!page)
return;
-#if ENABLE(INSPECTOR)
- InspectorController* controller = page->inspectorController();
- if (!controller->profilerEnabled())
+ if (!InspectorInstrumentation::profilerEnabled(page))
return;
-#endif
RefPtr<ScriptProfile> profile = ScriptProfiler::stop(state, title);
if (!profile)
return;
m_profiles.append(profile);
-
-#if ENABLE(INSPECTOR)
- const ScriptCallFrame& lastCaller = callStack->at(0);
- controller->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
-#endif
+ InspectorInstrumentation::addProfile(page, profile, callStack.get());
}
#endif
diff --git a/Source/WebCore/page/ContextMenuController.h b/Source/WebCore/page/ContextMenuController.h
index ab92796..e6a0a00 100644
--- a/Source/WebCore/page/ContextMenuController.h
+++ b/Source/WebCore/page/ContextMenuController.h
@@ -41,7 +41,8 @@ namespace WebCore {
class Event;
class Page;
- class ContextMenuController : public Noncopyable {
+ class ContextMenuController {
+ WTF_MAKE_NONCOPYABLE(ContextMenuController); WTF_MAKE_FAST_ALLOCATED;
public:
ContextMenuController(Page*, ContextMenuClient*);
~ContextMenuController();
diff --git a/Source/WebCore/page/DOMSelection.cpp b/Source/WebCore/page/DOMSelection.cpp
index 7691da4..dbb0944 100644
--- a/Source/WebCore/page/DOMSelection.cpp
+++ b/Source/WebCore/page/DOMSelection.cpp
@@ -76,23 +76,23 @@ const VisibleSelection& DOMSelection::visibleSelection() const
static Position anchorPosition(const VisibleSelection& selection)
{
Position anchor = selection.isBaseFirst() ? selection.start() : selection.end();
- return rangeCompliantEquivalent(anchor);
+ return anchor.parentAnchoredEquivalent();
}
static Position focusPosition(const VisibleSelection& selection)
{
Position focus = selection.isBaseFirst() ? selection.end() : selection.start();
- return rangeCompliantEquivalent(focus);
+ return focus.parentAnchoredEquivalent();
}
static Position basePosition(const VisibleSelection& selection)
{
- return rangeCompliantEquivalent(selection.base());
+ return selection.base().parentAnchoredEquivalent();
}
static Position extentPosition(const VisibleSelection& selection)
{
- return rangeCompliantEquivalent(selection.extent());
+ return selection.extent().parentAnchoredEquivalent();
}
Node* DOMSelection::anchorNode() const
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
index 9c29071..0860d65 100644
--- a/Source/WebCore/page/DOMWindow.cpp
+++ b/Source/WebCore/page/DOMWindow.cpp
@@ -105,6 +105,10 @@
#include "LocalFileSystem.h"
#endif
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+#include "RequestAnimationFrameCallback.h"
+#endif
+
using std::min;
using std::max;
@@ -1476,6 +1480,21 @@ void DOMWindow::clearInterval(int timeoutId)
DOMTimer::removeById(context, timeoutId);
}
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+int DOMWindow::webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback, Element* e)
+{
+ if (Document* d = document())
+ return d->webkitRequestAnimationFrame(callback, e);
+ return 0;
+}
+
+void DOMWindow::webkitCancelRequestAnimationFrame(int id)
+{
+ if (Document* d = document())
+ d->webkitCancelRequestAnimationFrame(id);
+}
+#endif
+
bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
{
if (!EventTarget::addEventListener(eventType, listener, useCapture))
@@ -1627,6 +1646,9 @@ void DOMWindow::clearDOMStorage()
void DOMWindow::setLocation(const String& urlString, DOMWindow* activeWindow, DOMWindow* firstWindow, SetLocationLocking locking)
{
+ if (!m_frame)
+ return;
+
Frame* activeFrame = activeWindow->frame();
if (!activeFrame)
return;
diff --git a/Source/WebCore/page/DOMWindow.h b/Source/WebCore/page/DOMWindow.h
index 3614627..f02a7ac 100644
--- a/Source/WebCore/page/DOMWindow.h
+++ b/Source/WebCore/page/DOMWindow.h
@@ -64,6 +64,10 @@ namespace WebCore {
class StyleMedia;
class WebKitPoint;
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ class RequestAnimationFrameCallback;
+#endif
+
struct WindowFeatures;
typedef int ExceptionCode;
@@ -237,6 +241,12 @@ namespace WebCore {
int setInterval(PassOwnPtr<ScheduledAction>, int timeout, ExceptionCode&);
void clearInterval(int timeoutId);
+ // WebKit animation extensions
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>, Element*);
+ void webkitCancelRequestAnimationFrame(int id);
+#endif
+
// Events
// EventTarget API
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
@@ -269,6 +279,8 @@ namespace WebCore {
DEFINE_ATTRIBUTE_EVENT_LISTENER(ended);
DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_ATTRIBUTE_EVENT_LISTENER(focus);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(formchange);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(forminput);
DEFINE_ATTRIBUTE_EVENT_LISTENER(hashchange);
DEFINE_ATTRIBUTE_EVENT_LISTENER(input);
DEFINE_ATTRIBUTE_EVENT_LISTENER(invalid);
diff --git a/Source/WebCore/page/DOMWindow.idl b/Source/WebCore/page/DOMWindow.idl
index 77ffe41..a814558 100644
--- a/Source/WebCore/page/DOMWindow.idl
+++ b/Source/WebCore/page/DOMWindow.idl
@@ -235,6 +235,12 @@ module window {
// [Custom] long setInterval(in DOMString code, in long timeout);
void clearInterval(in long handle);
+#if defined(ENABLE_REQUEST_ANIMATION_FRAME)
+ // WebKit animation extensions
+ long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in Element element);
+ void webkitCancelRequestAnimationFrame(in long id);
+#endif
+
// Base64
DOMString atob(in [ConvertNullToNullString] DOMString string)
raises(DOMException);
@@ -264,6 +270,8 @@ module window {
attribute EventListener onended;
attribute EventListener onerror;
attribute EventListener onfocus;
+ attribute EventListener onformchange;
+ attribute EventListener onforminput;
attribute EventListener onhashchange;
attribute EventListener oninput;
attribute EventListener oninvalid;
@@ -308,8 +316,6 @@ module window {
// Not implemented yet.
// attribute EventListener onafterprint;
// attribute EventListener onbeforeprint;
- // attribute EventListener onformchange;
- // attribute EventListener onforminput;
// attribute EventListener onreadystatechange;
// attribute EventListener onredo;
// attribute EventListener onshow;
@@ -439,6 +445,7 @@ module window {
attribute HTMLImageElementConstructor HTMLImageElement;
attribute HTMLInputElementConstructor HTMLInputElement;
attribute HTMLIsIndexElementConstructor HTMLIsIndexElement;
+ attribute HTMLKeygenElementConstructor HTMLKeygenElement;
attribute HTMLLIElementConstructor HTMLLIElement;
attribute HTMLLabelElementConstructor HTMLLabelElement;
attribute HTMLLegendElementConstructor HTMLLegendElement;
@@ -509,7 +516,7 @@ module window {
attribute [JSCCustomGetter,Conditional=3D_CANVAS|BLOB,EnabledAtRuntime] Float32ArrayConstructor Float32Array; // Usable with new operator
attribute [JSCCustomGetter,Conditional=3D_CANVAS|BLOB,EnabledAtRuntime] DataViewConstructor DataView; // Usable with new operator
- attribute [JSCCustomGetter,Conditional=WEB_AUDIO] AudioContextConstructor webkitAudioContext; // Usable with new operator
+ attribute [JSCCustomGetter,Conditional=WEB_AUDIO,EnabledAtRuntime] AudioContextConstructor webkitAudioContext; // Usable with new operator
attribute [Conditional=WEB_AUDIO] AudioPannerNodeConstructor webkitAudioPannerNode; // Needed for panning model constants
attribute EventConstructor Event;
diff --git a/Source/WebCore/page/DragController.h b/Source/WebCore/page/DragController.h
index 10bb5f8..0f176b1 100644
--- a/Source/WebCore/page/DragController.h
+++ b/Source/WebCore/page/DragController.h
@@ -47,7 +47,8 @@ namespace WebCore {
class Range;
class SelectionController;
- class DragController : public Noncopyable {
+ class DragController {
+ WTF_MAKE_NONCOPYABLE(DragController); WTF_MAKE_FAST_ALLOCATED;
public:
DragController(Page*, DragClient*);
~DragController();
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp
index 942f032..476921e 100644
--- a/Source/WebCore/page/EventHandler.cpp
+++ b/Source/WebCore/page/EventHandler.cpp
@@ -2674,12 +2674,11 @@ cleanupDrag:
}
#endif // ENABLE(DRAG_SUPPORT)
-bool EventHandler::handleTextInputEvent(const String& text, Event* underlyingEvent, bool isLineBreak, bool isBackTab)
+bool EventHandler::handleTextInputEvent(const String& text, Event* underlyingEvent, TextEventInputType inputType)
{
// Platforms should differentiate real commands like selectAll from text input in disguise (like insertNewline),
// and avoid dispatching text input events from keydown default handlers.
ASSERT(!underlyingEvent || !underlyingEvent->isKeyboardEvent() || static_cast<KeyboardEvent*>(underlyingEvent)->type() == eventNames().keypressEvent);
- ASSERT(!(isLineBreak && isBackTab));
if (!m_frame)
return false;
@@ -2695,7 +2694,7 @@ bool EventHandler::handleTextInputEvent(const String& text, Event* underlyingEve
if (FrameView* view = m_frame->view())
view->resetDeferredRepaintDelay();
- RefPtr<TextEvent> event = TextEvent::create(m_frame->domWindow(), text, TextEvent::selectInputType(isLineBreak, isBackTab));
+ RefPtr<TextEvent> event = TextEvent::create(m_frame->domWindow(), text, inputType);
event->setUnderlyingEvent(underlyingEvent);
ExceptionCode ec;
diff --git a/Source/WebCore/page/EventHandler.h b/Source/WebCore/page/EventHandler.h
index 65695c2..d12a56e 100644
--- a/Source/WebCore/page/EventHandler.h
+++ b/Source/WebCore/page/EventHandler.h
@@ -31,6 +31,7 @@
#include "HitTestRequest.h"
#include "PlatformMouseEvent.h"
#include "ScrollTypes.h"
+#include "TextEventInputType.h"
#include "Timer.h"
#include <wtf/Forward.h>
#include <wtf/RefPtr.h>
@@ -80,7 +81,8 @@ extern const int GeneralDragHysteresis;
enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars };
-class EventHandler : public Noncopyable {
+class EventHandler {
+ WTF_MAKE_NONCOPYABLE(EventHandler);
public:
EventHandler(Frame*);
~EventHandler();
@@ -173,8 +175,7 @@ public:
bool keyEvent(const PlatformKeyboardEvent&);
void defaultKeyboardEventHandler(KeyboardEvent*);
- bool handleTextInputEvent(const String& text, Event* underlyingEvent = 0,
- bool isLineBreak = false, bool isBackTab = false);
+ bool handleTextInputEvent(const String& text, Event* underlyingEvent = 0, TextEventInputType = TextEventInputKeyboard);
void defaultTextInputEventHandler(TextEvent*);
#if ENABLE(DRAG_SUPPORT)
@@ -224,7 +225,10 @@ private:
PerformDragAndDrop
};
- struct EventHandlerDragState : Noncopyable {
+ struct EventHandlerDragState {
+ WTF_MAKE_NONCOPYABLE(EventHandlerDragState); WTF_MAKE_FAST_ALLOCATED;
+ public:
+ EventHandlerDragState() { }
RefPtr<Node> m_dragSrc; // element that may be a drag source, for the current mouse gesture
bool m_dragSrcIsLink;
bool m_dragSrcIsImage;
diff --git a/Source/WebCore/page/EventSource.h b/Source/WebCore/page/EventSource.h
index ffed592..10ad6ba 100644
--- a/Source/WebCore/page/EventSource.h
+++ b/Source/WebCore/page/EventSource.h
@@ -51,6 +51,7 @@ namespace WebCore {
class ThreadableLoader;
class EventSource : public RefCounted<EventSource>, public EventTarget, private ThreadableLoaderClient, public ActiveDOMObject {
+ WTF_MAKE_FAST_ALLOCATED;
public:
static PassRefPtr<EventSource> create(const String& url, ScriptExecutionContext*, ExceptionCode&);
virtual ~EventSource();
diff --git a/Source/WebCore/page/FocusController.h b/Source/WebCore/page/FocusController.h
index be51c77..50fa2ea 100644
--- a/Source/WebCore/page/FocusController.h
+++ b/Source/WebCore/page/FocusController.h
@@ -40,7 +40,8 @@ class KeyboardEvent;
class Node;
class Page;
-class FocusController : public Noncopyable {
+class FocusController {
+ WTF_MAKE_NONCOPYABLE(FocusController); WTF_MAKE_FAST_ALLOCATED;
public:
FocusController(Page*);
diff --git a/Source/WebCore/page/FrameTree.h b/Source/WebCore/page/FrameTree.h
index 94b8d16..bac5475 100644
--- a/Source/WebCore/page/FrameTree.h
+++ b/Source/WebCore/page/FrameTree.h
@@ -26,7 +26,8 @@ namespace WebCore {
class Frame;
- class FrameTree : public Noncopyable {
+ class FrameTree {
+ WTF_MAKE_NONCOPYABLE(FrameTree);
public:
FrameTree(Frame* thisFrame, Frame* parentFrame)
: m_thisFrame(thisFrame)
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
index fdf01ec..7546270 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
@@ -117,7 +117,10 @@ double FrameView::s_deferredRepaintDelayIncrementDuringLoading = 0;
// The maximum number of updateWidgets iterations that should be done before returning.
static const unsigned maxUpdateWidgetsIterations = 2;
-struct ScheduledEvent : Noncopyable {
+struct ScheduledEvent {
+ WTF_MAKE_NONCOPYABLE(ScheduledEvent); WTF_MAKE_FAST_ALLOCATED;
+public:
+ ScheduledEvent() { }
RefPtr<Event> m_event;
RefPtr<Node> m_eventTarget;
};
@@ -354,6 +357,14 @@ void FrameView::setFrameRect(const IntRect& newRect)
#endif
}
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+void FrameView::scheduleAnimation()
+{
+ if (hostWindow())
+ hostWindow()->scheduleAnimation();
+}
+#endif
+
void FrameView::setMarginWidth(int w)
{
// make it update the rendering area when set
@@ -566,10 +577,19 @@ void FrameView::updateCompositingLayers()
#endif
}
-void FrameView::syncCompositingStateForThisFrame()
+bool FrameView::syncCompositingStateForThisFrame()
{
- if (RenderView* view = m_frame->contentRenderer())
- view->compositor()->flushPendingLayerChanges();
+ ASSERT(m_frame->view() == this);
+ RenderView* view = m_frame->contentRenderer();
+ if (!view)
+ return true; // We don't want to keep trying to update layers if we have no renderer.
+
+ // If we sync compositing layers when a layout is pending, we may cause painting of compositing
+ // layer content to occur before layout has happened, which will cause paintContents() to bail.
+ if (needsLayout())
+ return false;
+
+ view->compositor()->flushPendingLayerChanges();
#if ENABLE(FULLSCREEN_API)
// The fullScreenRenderer's graphicsLayer has been re-parented, and the above recursive syncCompositingState
@@ -581,7 +601,8 @@ void FrameView::syncCompositingStateForThisFrame()
if (GraphicsLayer* fullScreenLayer = backing->graphicsLayer())
fullScreenLayer->syncCompositingState();
}
-#endif
+#endif
+ return true;
}
void FrameView::setNeedsOneShotDrawingSynchronization()
@@ -660,32 +681,16 @@ bool FrameView::isEnclosedInCompositingLayer() const
return false;
}
-bool FrameView::syncCompositingStateRecursive()
+bool FrameView::syncCompositingStateIncludingSubframes()
{
#if USE(ACCELERATED_COMPOSITING)
- ASSERT(m_frame->view() == this);
- RenderView* contentRenderer = m_frame->contentRenderer();
- if (!contentRenderer)
- return true; // We don't want to keep trying to update layers if we have no renderer.
-
- // If we sync compositing layers when a layout is pending, we may cause painting of compositing
- // layer content to occur before layout has happened, which will cause paintContents() to bail.
- if (needsLayout())
- return false;
+ bool allFramesSynced = syncCompositingStateForThisFrame();
- syncCompositingStateForThisFrame();
-
- bool allSubframesSynced = true;
- const HashSet<RefPtr<Widget> >* viewChildren = children();
- HashSet<RefPtr<Widget> >::const_iterator end = viewChildren->end();
- for (HashSet<RefPtr<Widget> >::const_iterator current = viewChildren->begin(); current != end; ++current) {
- Widget* widget = (*current).get();
- if (widget->isFrameView()) {
- bool synced = static_cast<FrameView*>(widget)->syncCompositingStateRecursive();
- allSubframesSynced &= synced;
- }
+ for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->traverseNext(m_frame.get())) {
+ bool synced = child->view()->syncCompositingStateForThisFrame();
+ allFramesSynced &= synced;
}
- return allSubframesSynced;
+ return allFramesSynced;
#else // USE(ACCELERATED_COMPOSITING)
return true;
#endif
@@ -1721,6 +1726,14 @@ void FrameView::unscheduleRelayout()
m_delayedLayout = false;
}
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+void FrameView::serviceScriptedAnimations()
+{
+ for (Frame* frame = m_frame.get(); frame; frame = frame->tree()->traverseNext())
+ frame->document()->serviceScriptedAnimations();
+}
+#endif
+
bool FrameView::isTransparent() const
{
return m_isTransparent;
@@ -2020,23 +2033,15 @@ bool FrameView::isActive() const
return page && page->focusController()->isActive();
}
-void FrameView::valueChanged(Scrollbar* bar)
+void FrameView::scrollTo(const IntSize& newOffset)
{
- // Figure out if we really moved.
IntSize offset = scrollOffset();
- ScrollView::valueChanged(bar);
+ ScrollView::scrollTo(newOffset);
if (offset != scrollOffset())
scrollPositionChanged();
frame()->loader()->client()->didChangeScrollOffset();
}
-void FrameView::valueChanged(const IntSize& scrollDelta)
-{
- ScrollView::valueChanged(scrollDelta);
- frame()->eventHandler()->sendScrollEvent();
- frame()->loader()->client()->didChangeScrollOffset();
-}
-
void FrameView::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
{
// Add in our offset within the FrameView.
diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h
index bdeab90..c75aab8 100644
--- a/Source/WebCore/page/FrameView.h
+++ b/Source/WebCore/page/FrameView.h
@@ -62,6 +62,9 @@ public:
virtual void invalidateRect(const IntRect&);
virtual void setFrameRect(const IntRect&);
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ void scheduleAnimation();
+#endif
Frame* frame() const { return m_frame.get(); }
void clearFrame();
@@ -97,13 +100,18 @@ public:
bool needsFullRepaint() const { return m_doFullRepaint; }
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
void updatePositionedObjects();
+=======
+#if ENABLE(REQUEST_ANIMATION_FRAME)
+ void serviceScriptedAnimations();
+>>>>>>> WebKit.org at r76408
#endif
#if USE(ACCELERATED_COMPOSITING)
void updateCompositingLayers();
- void syncCompositingStateForThisFrame();
+ bool syncCompositingStateForThisFrame();
// Called when changes to the GraphicsLayer hierarchy have to be synchronized with
// content rendered via the normal painting path.
@@ -121,7 +129,7 @@ public:
// Only used with accelerated compositing, but outside the #ifdef to make linkage easier.
// Returns true if the sync was completed.
- bool syncCompositingStateRecursive();
+ bool syncCompositingStateIncludingSubframes();
// Returns true when a paint with the PaintBehaviorFlattenCompositingLayers flag set gives
// a faithful representation of the content.
@@ -294,13 +302,13 @@ private:
virtual IntPoint convertToContainingView(const IntPoint&) const;
virtual IntPoint convertFromContainingView(const IntPoint&) const;
- // ScrollBarClient interface
- virtual void valueChanged(Scrollbar*);
- virtual void valueChanged(const IntSize&);
+ // ScrollableArea interface
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
virtual bool isActive() const;
virtual void getTickmarks(Vector<IntRect>&) const;
+ virtual void scrollTo(const IntSize&);
+
void deferredRepaintTimerFired(Timer<FrameView>*);
void doDeferredRepaints();
void updateDeferredRepaintDelay();
diff --git a/Source/WebCore/page/GeolocationController.h b/Source/WebCore/page/GeolocationController.h
index 7db1951..1a2ce69 100644
--- a/Source/WebCore/page/GeolocationController.h
+++ b/Source/WebCore/page/GeolocationController.h
@@ -40,7 +40,8 @@ class GeolocationError;
class GeolocationPosition;
class Page;
-class GeolocationController : public Noncopyable {
+class GeolocationController {
+ WTF_MAKE_NONCOPYABLE(GeolocationController);
public:
GeolocationController(Page*, GeolocationClient*);
~GeolocationController();
diff --git a/Source/WebCore/page/GroupSettings.h b/Source/WebCore/page/GroupSettings.h
index fb6f6b5..1bbad2b 100644
--- a/Source/WebCore/page/GroupSettings.h
+++ b/Source/WebCore/page/GroupSettings.h
@@ -33,7 +33,8 @@ namespace WebCore {
class PageGroup;
-class GroupSettings : public Noncopyable {
+class GroupSettings {
+ WTF_MAKE_NONCOPYABLE(GroupSettings); WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<GroupSettings> create()
{
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
index 7413bb6..071b142 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
@@ -90,12 +90,15 @@ namespace WebCore {
enum FindDirection { FindDirectionForward, FindDirectionBackward };
- class Page : public Noncopyable {
+ class Page {
+ WTF_MAKE_NONCOPYABLE(Page);
public:
static void scheduleForcedStyleRecalcForAllPages();
// It is up to the platform to ensure that non-null clients are provided where required.
- struct PageClients : Noncopyable {
+ struct PageClients {
+ WTF_MAKE_NONCOPYABLE(PageClients); WTF_MAKE_FAST_ALLOCATED;
+ public:
PageClients();
~PageClients();
diff --git a/Source/WebCore/page/PageGroup.cpp b/Source/WebCore/page/PageGroup.cpp
index 746cd04..96e7301 100644
--- a/Source/WebCore/page/PageGroup.cpp
+++ b/Source/WebCore/page/PageGroup.cpp
@@ -37,7 +37,7 @@
#include "StorageNamespace.h"
#if PLATFORM(CHROMIUM)
-#include "ChromiumBridge.h"
+#include "PlatformBridge.h"
#endif
#ifdef ANDROID
@@ -218,7 +218,7 @@ bool PageGroup::isLinkVisited(LinkHash visitedLinkHash)
{
#if PLATFORM(CHROMIUM)
// Use Chromium's built-in visited link database.
- return ChromiumBridge::isLinkVisited(visitedLinkHash);
+ return PlatformBridge::isLinkVisited(visitedLinkHash);
#else
if (!m_visitedLinksPopulated) {
m_visitedLinksPopulated = true;
diff --git a/Source/WebCore/page/PageGroup.h b/Source/WebCore/page/PageGroup.h
index 0c4b26f..aa600a5 100644
--- a/Source/WebCore/page/PageGroup.h
+++ b/Source/WebCore/page/PageGroup.h
@@ -41,7 +41,8 @@ namespace WebCore {
class Page;
class StorageNamespace;
- class PageGroup : public Noncopyable {
+ class PageGroup {
+ WTF_MAKE_NONCOPYABLE(PageGroup); WTF_MAKE_FAST_ALLOCATED;
public:
PageGroup(const String& name);
PageGroup(Page*);
diff --git a/Source/WebCore/page/PageGroupLoadDeferrer.h b/Source/WebCore/page/PageGroupLoadDeferrer.h
index d443ebd..f7956c4 100644
--- a/Source/WebCore/page/PageGroupLoadDeferrer.h
+++ b/Source/WebCore/page/PageGroupLoadDeferrer.h
@@ -28,7 +28,8 @@ namespace WebCore {
class Frame;
class Page;
- class PageGroupLoadDeferrer : public Noncopyable {
+ class PageGroupLoadDeferrer {
+ WTF_MAKE_NONCOPYABLE(PageGroupLoadDeferrer);
public:
PageGroupLoadDeferrer(Page*, bool deferSelf);
~PageGroupLoadDeferrer();
diff --git a/Source/WebCore/page/PluginHalter.h b/Source/WebCore/page/PluginHalter.h
index af8b31e..5b96d19 100644
--- a/Source/WebCore/page/PluginHalter.h
+++ b/Source/WebCore/page/PluginHalter.h
@@ -35,7 +35,8 @@ namespace WebCore {
class HaltablePlugin;
-class PluginHalter : public Noncopyable {
+class PluginHalter {
+ WTF_MAKE_NONCOPYABLE(PluginHalter); WTF_MAKE_FAST_ALLOCATED;
public:
PluginHalter(PluginHalterClient*);
diff --git a/Source/WebCore/page/Settings.cpp b/Source/WebCore/page/Settings.cpp
index 8b174be..a88ca6b 100644
--- a/Source/WebCore/page/Settings.cpp
+++ b/Source/WebCore/page/Settings.cpp
@@ -168,6 +168,7 @@ Settings::Settings(Page* page)
, m_showRepaintCounter(false)
, m_experimentalNotificationsEnabled(false)
, m_webGLEnabled(false)
+ , m_webAudioEnabled(false)
, m_acceleratedCanvas2dEnabled(false)
, m_loadDeferringEnabled(true)
, m_tiledBackingStoreEnabled(false)
@@ -857,6 +858,11 @@ void Settings::setShouldUseHighResolutionTimers(bool shouldUseHighResolutionTime
}
#endif
+void Settings::setWebAudioEnabled(bool enabled)
+{
+ m_webAudioEnabled = enabled;
+}
+
void Settings::setWebGLEnabled(bool enabled)
{
m_webGLEnabled = enabled;
diff --git a/Source/WebCore/page/Settings.h b/Source/WebCore/page/Settings.h
index f6b2e2d..9f0982a 100644
--- a/Source/WebCore/page/Settings.h
+++ b/Source/WebCore/page/Settings.h
@@ -50,7 +50,8 @@ namespace WebCore {
TextDirectionSubmenuAlwaysIncluded
};
- class Settings : public Noncopyable {
+ class Settings {
+ WTF_MAKE_NONCOPYABLE(Settings); WTF_MAKE_FAST_ALLOCATED;
public:
Settings(Page*);
@@ -379,6 +380,9 @@ namespace WebCore {
void setPluginAllowedRunTime(unsigned);
unsigned pluginAllowedRunTime() const { return m_pluginAllowedRunTime; }
+ void setWebAudioEnabled(bool);
+ bool webAudioEnabled() const { return m_webAudioEnabled; }
+
void setWebGLEnabled(bool);
bool webGLEnabled() const { return m_webGLEnabled; }
@@ -544,6 +548,7 @@ namespace WebCore {
bool m_showRepaintCounter : 1;
bool m_experimentalNotificationsEnabled : 1;
bool m_webGLEnabled : 1;
+ bool m_webAudioEnabled : 1;
bool m_acceleratedCanvas2dEnabled : 1;
bool m_loadDeferringEnabled : 1;
bool m_tiledBackingStoreEnabled : 1;
diff --git a/Source/WebCore/page/SpeechInput.cpp b/Source/WebCore/page/SpeechInput.cpp
index f36ed4d..9605dd3 100644
--- a/Source/WebCore/page/SpeechInput.cpp
+++ b/Source/WebCore/page/SpeechInput.cpp
@@ -33,7 +33,7 @@
#if ENABLE(INPUT_SPEECH)
-#include "Frame.h"
+#include "SecurityOrigin.h"
#include "SpeechInputClient.h"
#include "SpeechInputListener.h"
@@ -93,10 +93,10 @@ void SpeechInput::setRecognitionResult(int listenerId, const SpeechInputResultAr
m_listeners.get(listenerId)->setRecognitionResult(listenerId, result);
}
-bool SpeechInput::startRecognition(int listenerId, const IntRect& elementRect, const AtomicString& language, const String& grammar)
+bool SpeechInput::startRecognition(int listenerId, const IntRect& elementRect, const AtomicString& language, const String& grammar, SecurityOrigin* origin)
{
ASSERT(m_listeners.contains(listenerId));
- return m_client->startRecognition(listenerId, elementRect, language, grammar);
+ return m_client->startRecognition(listenerId, elementRect, language, grammar, origin);
}
void SpeechInput::stopRecording(int listenerId)
diff --git a/Source/WebCore/page/SpeechInput.h b/Source/WebCore/page/SpeechInput.h
index 4532d49..52d6c03 100644
--- a/Source/WebCore/page/SpeechInput.h
+++ b/Source/WebCore/page/SpeechInput.h
@@ -36,18 +36,19 @@
#include "SpeechInputListener.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
namespace WebCore {
class IntRect;
+class SecurityOrigin;
class SpeechInputClient;
class SpeechInputListener;
// This class connects the input elements requiring speech input with the platform specific
// speech recognition engine. It provides methods for the input elements to activate speech
// recognition and methods for the speech recognition engine to return back the results.
-class SpeechInput : public Noncopyable, public SpeechInputListener {
+class SpeechInput : public SpeechInputListener {
+ WTF_MAKE_NONCOPYABLE(SpeechInput);
public:
SpeechInput(SpeechInputClient*);
virtual ~SpeechInput();
@@ -61,7 +62,7 @@ public:
void unregisterListener(int);
// Methods invoked by the input elements.
- bool startRecognition(int listenerId, const IntRect& elementRect, const AtomicString& language, const String& grammar);
+ bool startRecognition(int listenerId, const IntRect& elementRect, const AtomicString& language, const String& grammar, SecurityOrigin*);
void stopRecording(int);
void cancelRecognition(int);
diff --git a/Source/WebCore/page/SpeechInputClient.h b/Source/WebCore/page/SpeechInputClient.h
index 2a2e160..4f8fd5e 100644
--- a/Source/WebCore/page/SpeechInputClient.h
+++ b/Source/WebCore/page/SpeechInputClient.h
@@ -38,6 +38,7 @@
namespace WebCore {
class IntRect;
+class SecurityOrigin;
class SpeechInputListener;
// Provides an interface for SpeechInput to call into the embedder.
@@ -50,7 +51,7 @@ public:
virtual void setListener(SpeechInputListener*) = 0;
// Starts speech recognition and audio recording.
- virtual bool startRecognition(int requestId, const IntRect& elementRect, const AtomicString& language, const String& grammar) = 0;
+ virtual bool startRecognition(int requestId, const IntRect& elementRect, const AtomicString& language, const String& grammar, SecurityOrigin*) = 0;
// Stops audio recording and performs recognition with the audio recorded until now
// (does not discard audio).
diff --git a/Source/WebCore/page/UserScript.h b/Source/WebCore/page/UserScript.h
index 0652439..0514090 100644
--- a/Source/WebCore/page/UserScript.h
+++ b/Source/WebCore/page/UserScript.h
@@ -35,7 +35,8 @@
namespace WebCore {
-class UserScript : public Noncopyable {
+class UserScript {
+ WTF_MAKE_NONCOPYABLE(UserScript); WTF_MAKE_FAST_ALLOCATED;
public:
UserScript(const String& source, const KURL& url,
PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
diff --git a/Source/WebCore/page/UserStyleSheet.h b/Source/WebCore/page/UserStyleSheet.h
index fa42e2c..068df1e 100644
--- a/Source/WebCore/page/UserStyleSheet.h
+++ b/Source/WebCore/page/UserStyleSheet.h
@@ -35,7 +35,8 @@
namespace WebCore {
-class UserStyleSheet : public Noncopyable {
+class UserStyleSheet {
+ WTF_MAKE_NONCOPYABLE(UserStyleSheet); WTF_MAKE_FAST_ALLOCATED;
public:
UserStyleSheet(const String& source, const KURL& url,
PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
diff --git a/Source/WebCore/page/XSSAuditor.h b/Source/WebCore/page/XSSAuditor.h
index 2b781f1..5beed61 100644
--- a/Source/WebCore/page/XSSAuditor.h
+++ b/Source/WebCore/page/XSSAuditor.h
@@ -69,7 +69,8 @@ namespace WebCore {
// * HTMLDocumentParser::shouldLoadExternalScriptFromSrc - used to load external JavaScript scripts.
// * SubframeLoader::requestObject - used to load <object>/<embed> elements.
//
- class XSSAuditor : public Noncopyable {
+ class XSSAuditor {
+ WTF_MAKE_NONCOPYABLE(XSSAuditor); WTF_MAKE_FAST_ALLOCATED;
public:
XSSAuditor(Frame*);
~XSSAuditor();
diff --git a/Source/WebCore/page/animation/AnimationBase.cpp b/Source/WebCore/page/animation/AnimationBase.cpp
index 14a44d2..9a906e2 100644
--- a/Source/WebCore/page/animation/AnimationBase.cpp
+++ b/Source/WebCore/page/animation/AnimationBase.cpp
@@ -223,7 +223,8 @@ class PropertyWrapperBase;
static void addShorthandProperties();
static PropertyWrapperBase* wrapperForProperty(int propertyID);
-class PropertyWrapperBase : public Noncopyable {
+class PropertyWrapperBase {
+ WTF_MAKE_NONCOPYABLE(PropertyWrapperBase); WTF_MAKE_FAST_ALLOCATED;
public:
PropertyWrapperBase(int prop)
: m_prop(prop)
@@ -446,7 +447,8 @@ public:
};
template <typename T>
-class FillLayerPropertyWrapperGetter : public FillLayerPropertyWrapperBase, public Noncopyable {
+class FillLayerPropertyWrapperGetter : public FillLayerPropertyWrapperBase {
+ WTF_MAKE_NONCOPYABLE(FillLayerPropertyWrapperGetter);
public:
FillLayerPropertyWrapperGetter(T (FillLayer::*getter)() const)
: m_getter(getter)
diff --git a/Source/WebCore/page/animation/AnimationControllerPrivate.h b/Source/WebCore/page/animation/AnimationControllerPrivate.h
index 6812e09..186dd7d 100644
--- a/Source/WebCore/page/animation/AnimationControllerPrivate.h
+++ b/Source/WebCore/page/animation/AnimationControllerPrivate.h
@@ -49,7 +49,8 @@ class Node;
class RenderObject;
class RenderStyle;
-class AnimationControllerPrivate : public Noncopyable {
+class AnimationControllerPrivate {
+ WTF_MAKE_NONCOPYABLE(AnimationControllerPrivate); WTF_MAKE_FAST_ALLOCATED;
public:
AnimationControllerPrivate(Frame*);
~AnimationControllerPrivate();
diff --git a/Source/WebCore/page/mac/EventHandlerMac.mm b/Source/WebCore/page/mac/EventHandlerMac.mm
index 2d4d86b..6011859 100644
--- a/Source/WebCore/page/mac/EventHandlerMac.mm
+++ b/Source/WebCore/page/mac/EventHandlerMac.mm
@@ -77,7 +77,8 @@ NSEvent *EventHandler::currentNSEvent()
return currentNSEventSlot().get();
}
-class CurrentEventScope : public Noncopyable {
+class CurrentEventScope {
+ WTF_MAKE_NONCOPYABLE(CurrentEventScope);
public:
CurrentEventScope(NSEvent *);
~CurrentEventScope();