summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/AbstractView.idl2
-rw-r--r--WebCore/page/Console.h1
-rw-r--r--WebCore/page/Console.idl2
-rw-r--r--WebCore/page/DOMWindow.cpp4
-rw-r--r--WebCore/page/DOMWindow.idl7
-rw-r--r--WebCore/page/DragController.cpp5
-rw-r--r--WebCore/page/EventHandler.cpp8
-rw-r--r--WebCore/page/FocusController.cpp21
-rw-r--r--WebCore/page/Frame.cpp3
-rw-r--r--WebCore/page/Frame.h2
-rw-r--r--WebCore/page/FrameView.cpp5
-rw-r--r--WebCore/page/FrameView.h11
-rw-r--r--WebCore/page/Geolocation.h5
-rw-r--r--WebCore/page/GeolocationController.cpp5
-rw-r--r--WebCore/page/Location.idl4
-rw-r--r--WebCore/page/MemoryInfo.cpp47
-rw-r--r--WebCore/page/MemoryInfo.h55
-rw-r--r--WebCore/page/MemoryInfo.idl40
-rw-r--r--WebCore/page/PositionCallback.h4
-rw-r--r--WebCore/page/PositionErrorCallback.h4
-rw-r--r--WebCore/page/PrintContext.cpp1
-rw-r--r--WebCore/page/Settings.cpp6
-rw-r--r--WebCore/page/Settings.h32
-rw-r--r--WebCore/page/SpatialNavigation.cpp1
-rw-r--r--WebCore/page/WebKitPoint.h1
-rw-r--r--WebCore/page/XSSAuditor.cpp4
-rw-r--r--WebCore/page/XSSAuditor.h4
-rw-r--r--WebCore/page/qt/EventHandlerQt.cpp4
28 files changed, 229 insertions, 59 deletions
diff --git a/WebCore/page/AbstractView.idl b/WebCore/page/AbstractView.idl
index e4ece0f..6d8232b 100644
--- a/WebCore/page/AbstractView.idl
+++ b/WebCore/page/AbstractView.idl
@@ -32,7 +32,7 @@ module views {
OmitConstructor
] AbstractView {
readonly attribute Document document;
- readonly attribute Media styleMedia;
+ readonly attribute StyleMedia styleMedia;
};
}
diff --git a/WebCore/page/Console.h b/WebCore/page/Console.h
index 18e311f..04e743e 100644
--- a/WebCore/page/Console.h
+++ b/WebCore/page/Console.h
@@ -43,6 +43,7 @@ typedef Vector<RefPtr<ScriptProfile> > ProfilesArray;
#endif
class Frame;
+class MemoryInfo;
class Page;
class String;
class ScriptCallStack;
diff --git a/WebCore/page/Console.idl b/WebCore/page/Console.idl
index 9a7cdc0..1506210 100644
--- a/WebCore/page/Console.idl
+++ b/WebCore/page/Console.idl
@@ -60,6 +60,8 @@ module window {
[CustomArgumentHandling] void group();
[CustomArgumentHandling] void groupCollapsed();
void groupEnd();
+
+ readonly attribute [CustomGetter] MemoryInfo memory;
};
}
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 9532ec9..413dba1 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -472,8 +472,6 @@ void DOMWindow::clear()
#endif
#if ENABLE(INDEXED_DATABASE)
- if (m_indexedDatabaseRequest)
- m_indexedDatabaseRequest->disconnectFrame();
m_indexedDatabaseRequest = 0;
#endif
}
@@ -673,7 +671,7 @@ IndexedDatabaseRequest* DOMWindow::indexedDB() const
// FIXME: See if indexedDatabase access is allowed.
- m_indexedDatabaseRequest = IndexedDatabaseRequest::create(page->group().indexedDatabase(), m_frame);
+ m_indexedDatabaseRequest = IndexedDatabaseRequest::create(page->group().indexedDatabase());
return m_indexedDatabaseRequest.get();
}
#endif
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index ec1645b..bf1d55d 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -449,6 +449,8 @@ module window {
attribute [CustomGetter] HTMLImageElementConstructor Image; // Usable with new operator
attribute [CustomGetter] HTMLOptionElementConstructor Option; // Usable with new operator
+ attribute CanvasPatternConstructor CanvasPattern;
+ attribute CanvasGradientConstructor CanvasGradient;
attribute CanvasRenderingContext2DConstructor CanvasRenderingContext2D;
attribute ImageDataConstructor ImageData;
attribute [Conditional=3D_CANVAS,EnabledAtRuntime] WebGLRenderingContextConstructor WebGLRenderingContext;
@@ -461,7 +463,7 @@ module window {
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint16ArrayConstructor Uint16Array; // Usable with new operator
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int32ArrayConstructor Int32Array; // Usable with new operator
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint32ArrayConstructor Uint32Array; // Usable with new operator
- attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] FloatArrayConstructor FloatArray; // Usable with new operator
+ attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Float32ArrayConstructor Float32Array; // Usable with new operator
// Temporary aliases to keep current WebGL content working during transition period to TypedArray spec.
// To be removed before WebGL spec is finalized. (FIXME)
@@ -472,7 +474,7 @@ module window {
attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint16ArrayConstructor WebGLUnsignedShortArray; // Usable with new operator
attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int32ArrayConstructor WebGLIntArray; // Usable with new operator
attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Uint32ArrayConstructor WebGLUnsignedIntArray; // Usable with new operator
- attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] FloatArrayConstructor WebGLFloatArray; // Usable with new operator
+ attribute [CustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Float32ArrayConstructor WebGLFloatArray; // Usable with new operator
attribute EventConstructor Event;
attribute BeforeLoadEventConstructor BeforeLoadEvent;
@@ -744,4 +746,3 @@ module window {
};
}
-
diff --git a/WebCore/page/DragController.cpp b/WebCore/page/DragController.cpp
index ec69ea0..716772b 100644
--- a/WebCore/page/DragController.cpp
+++ b/WebCore/page/DragController.cpp
@@ -56,6 +56,7 @@
#include "PlatformKeyboardEvent.h"
#include "RenderFileUploadControl.h"
#include "RenderImage.h"
+#include "RenderLayer.h"
#include "RenderView.h"
#include "ReplaceSelectionCommand.h"
#include "ResourceRequest.h"
@@ -109,9 +110,9 @@ static PassRefPtr<DocumentFragment> documentFragmentFromDragData(DragData* dragD
if (PassRefPtr<DocumentFragment> fragment = dragData->asFragment(document))
return fragment;
- if (dragData->containsURL()) {
+ if (dragData->containsURL(DragData::DoNotConvertFilenames)) {
String title;
- String url = dragData->asURL(&title);
+ String url = dragData->asURL(DragData::DoNotConvertFilenames, &title);
if (!url.isEmpty()) {
RefPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::create(document);
anchor->setHref(url);
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 266881c..5fde80e 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -62,6 +62,7 @@
#include "PluginView.h"
#endif
#include "RenderFrameSet.h"
+#include "RenderLayer.h"
#include "RenderTextControlSingleLine.h"
#include "RenderView.h"
#include "RenderWidget.h"
@@ -377,7 +378,7 @@ bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestR
m_frame->selection()->setIsDirectional(false);
ASSERT(m_frame->settings());
- if (m_frame->settings()->editingBehavior() == EditingMacBehavior) {
+ if (m_frame->settings()->editingBehaviorType() == EditingMacBehavior) {
// See <rdar://problem/3668157> REGRESSION (Mail): shift-click deselects when selection
// was created right-to-left
Position start = newSelection.start();
@@ -496,7 +497,7 @@ static bool canAutoscroll(RenderObject* renderer)
// The code for this is in RenderLayer::scrollRectToVisible.
if (renderer->node() != renderer->document())
return false;
- Frame* frame = renderer->document()->frame();
+ Frame* frame = renderer->frame();
if (!frame)
return false;
Page* page = frame->page();
@@ -1096,9 +1097,6 @@ Cursor EventHandler::selectCursor(const MouseEventWithHitTestResults& event, Scr
IntSize size = cimage->image()->size();
if (size.width() > 128 || size.height() > 128)
continue;
- // Do not let the hotspot be outside the bounds of the image.
- if (hotSpot.x() < 0 || hotSpot.y() < 0 || hotSpot.x() > size.width() || hotSpot.y() > size.height())
- continue;
if (cimage->image()->isNull())
break;
if (!cimage->errorOccurred())
diff --git a/WebCore/page/FocusController.cpp b/WebCore/page/FocusController.cpp
index 372cb32..804341d 100644
--- a/WebCore/page/FocusController.cpp
+++ b/WebCore/page/FocusController.cpp
@@ -511,14 +511,19 @@ static void clearSelectionIfNeeded(Frame* oldFocusedFrame, Frame* newFocusedFram
if (selectionStartNode == newFocusedNode || selectionStartNode->isDescendantOf(newFocusedNode) || selectionStartNode->shadowAncestorNode() == newFocusedNode)
return;
- if (Node* mousePressNode = newFocusedFrame->eventHandler()->mousePressNode())
- if (mousePressNode->renderer() && !mousePressNode->canStartSelection())
- if (Node* root = s->rootEditableElement())
- if (Node* shadowAncestorNode = root->shadowAncestorNode())
- // Don't do this for textareas and text fields, when they lose focus their selections should be cleared
- // and then restored when they regain focus, to match other browsers.
- if (!shadowAncestorNode->hasTagName(inputTag) && !shadowAncestorNode->hasTagName(textareaTag))
- return;
+ if (Node* mousePressNode = newFocusedFrame->eventHandler()->mousePressNode()) {
+ if (mousePressNode->renderer() && !mousePressNode->canStartSelection()) {
+ // Don't clear the selection for contentEditable elements, but do clear it for input and textarea. See bug 38696.
+ Node * root = s->rootEditableElement();
+ if (!root)
+ return;
+
+ if (Node* shadowAncestorNode = root->shadowAncestorNode()) {
+ if (!shadowAncestorNode->hasTagName(inputTag) && !shadowAncestorNode->hasTagName(textareaTag))
+ return;
+ }
+ }
+ }
s->clear();
}
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index f0ce1f2..fb658d2 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -64,6 +64,7 @@
#include "Page.h"
#include "PageGroup.h"
#include "RegularExpression.h"
+#include "RenderLayer.h"
#include "RenderPart.h"
#include "RenderTableCell.h"
#include "RenderTextControl.h"
@@ -141,8 +142,8 @@ Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient*
, m_redirectScheduler(this)
, m_ownerElement(ownerElement)
, m_script(this)
- , m_selectionController(this)
, m_editor(this)
+ , m_selectionController(this)
, m_eventHandler(this)
, m_animationController(this)
, m_lifeSupportTimer(this, &Frame::lifeSupportTimerFired)
diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h
index 7e80370..cb7e977 100644
--- a/WebCore/page/Frame.h
+++ b/WebCore/page/Frame.h
@@ -339,9 +339,9 @@ namespace WebCore {
String m_kjsStatusBarText;
String m_kjsDefaultStatusBarText;
- mutable SelectionController m_selectionController;
mutable VisibleSelection m_mark;
mutable Editor m_editor;
+ mutable SelectionController m_selectionController;
mutable EventHandler m_eventHandler;
mutable AnimationController m_animationController;
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index d549ff4..6fe8d38 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -47,6 +47,7 @@
#include "InspectorTimelineAgent.h"
#include "OverflowEvent.h"
#include "RenderEmbeddedObject.h"
+#include "RenderLayer.h"
#include "RenderPart.h"
#include "RenderScrollbar.h"
#include "RenderScrollbarPart.h"
@@ -1071,7 +1072,11 @@ void FrameView::setScrollPosition(const IntPoint& scrollPoint)
void FrameView::scrollPositionChanged()
{
frame()->eventHandler()->sendScrollEvent();
+ repaintFixedElementsAfterScrolling();
+}
+void FrameView::repaintFixedElementsAfterScrolling()
+{
// For fixed position elements, update widget positions and compositing layers after scrolling,
// but only if we're not inside of layout.
if (!m_nestedLayoutCount && hasFixedObjects()) {
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index 203dc86..69cc67a 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -25,10 +25,10 @@
#ifndef FrameView_h
#define FrameView_h
-#include "Frame.h"
+#include "Frame.h" // Only used by FrameView::inspectorTimelineAgent()
#include "IntSize.h"
-#include "Page.h"
-#include "RenderLayer.h"
+#include "Page.h" // Only used by FrameView::inspectorTimelineAgent()
+#include "RenderObject.h" // For PaintBehavior
#include "ScrollView.h"
#include <wtf/Forward.h>
#include <wtf/OwnPtr.h>
@@ -37,7 +37,6 @@ namespace WebCore {
class Color;
class Event;
-class Frame;
class FrameViewPrivate;
class InspectorTimelineAgent;
class IntRect;
@@ -46,6 +45,7 @@ class PlatformMouseEvent;
class RenderLayer;
class RenderObject;
class RenderEmbeddedObject;
+class RenderScrollbarPart;
class ScheduledEvent;
class String;
@@ -143,7 +143,8 @@ public:
virtual IntRect windowResizerRect() const;
void setScrollPosition(const IntPoint&);
- virtual void scrollPositionChanged();
+ void scrollPositionChanged();
+ virtual void repaintFixedElementsAfterScrolling();
String mediaType() const;
void setMediaType(const String&);
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index fcb967f..f831b87 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -28,7 +28,6 @@
#define Geolocation_h
#include "GeolocationPositionCache.h"
-#include "GeolocationService.h"
#include "Geoposition.h"
#include "PositionCallback.h"
#include "PositionError.h"
@@ -36,6 +35,10 @@
#include "PositionOptions.h"
#include "Timer.h"
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
+#include "GeolocationService.h"
+#endif
+
namespace WebCore {
class Frame;
diff --git a/WebCore/page/GeolocationController.cpp b/WebCore/page/GeolocationController.cpp
index 3812730..40f01ba 100644
--- a/WebCore/page/GeolocationController.cpp
+++ b/WebCore/page/GeolocationController.cpp
@@ -47,7 +47,10 @@ GeolocationController::~GeolocationController()
void GeolocationController::addObserver(Geolocation* observer)
{
- ASSERT(!m_observers.contains(observer));
+ // This may be called multiple times with the same observer, though removeObserver()
+ // is called only once with each.
+ if (m_observers.contains(observer))
+ return;
bool wasEmpty = m_observers.isEmpty();
m_observers.add(observer);
diff --git a/WebCore/page/Location.idl b/WebCore/page/Location.idl
index b020267..aad90ab 100644
--- a/WebCore/page/Location.idl
+++ b/WebCore/page/Location.idl
@@ -41,13 +41,16 @@ module window {
CustomPrototypeDefineGetter,
OmitConstructor
] Location {
+#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
attribute [DoNotCheckDomainSecurityOnSet, CustomSetter, V8DisallowShadowing] DOMString href;
+#endif
[Custom, V8OnInstance] void assign(in DOMString url);
[Custom, V8OnInstance] void replace(in DOMString url);
[Custom, V8OnInstance] void reload();
// URI decomposition attributes
+#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
attribute [CustomSetter] DOMString protocol;
attribute [CustomSetter] DOMString host;
attribute [CustomSetter] DOMString hostname;
@@ -55,6 +58,7 @@ module window {
attribute [CustomSetter] DOMString pathname;
attribute [CustomSetter] DOMString search;
attribute [CustomSetter] DOMString hash;
+#endif
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
[DontEnum, Custom, V8OnInstance, V8ReadOnly] DOMString toString();
diff --git a/WebCore/page/MemoryInfo.cpp b/WebCore/page/MemoryInfo.cpp
new file mode 100644
index 0000000..010a19c
--- /dev/null
+++ b/WebCore/page/MemoryInfo.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MemoryInfo.h"
+
+#include "ScriptGCEvent.h"
+
+namespace WebCore {
+
+MemoryInfo::MemoryInfo()
+ : m_totalJSHeapSize(0),
+ m_usedJSHeapSize(0)
+{
+#if ENABLE(INSPECTOR)
+ ScriptGCEvent::getHeapSize(m_usedJSHeapSize, m_totalJSHeapSize);
+#endif
+}
+
+} // namespace WebCore
diff --git a/WebCore/page/MemoryInfo.h b/WebCore/page/MemoryInfo.h
new file mode 100644
index 0000000..e9e0fa5
--- /dev/null
+++ b/WebCore/page/MemoryInfo.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MemoryInfo_h
+#define MemoryInfo_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class MemoryInfo : public RefCounted<MemoryInfo> {
+public:
+ static PassRefPtr<MemoryInfo> create() { return adoptRef(new MemoryInfo()); }
+
+ size_t totalJSHeapSize() const { return m_totalJSHeapSize; }
+ size_t usedJSHeapSize() const { return m_usedJSHeapSize; }
+
+private:
+ MemoryInfo();
+
+ size_t m_totalJSHeapSize;
+ size_t m_usedJSHeapSize;
+};
+
+} // namespace WebCore
+
+#endif // MemoryInfo_h
diff --git a/WebCore/page/MemoryInfo.idl b/WebCore/page/MemoryInfo.idl
new file mode 100644
index 0000000..59b0081
--- /dev/null
+++ b/WebCore/page/MemoryInfo.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module window {
+
+ interface [OmitConstructor] MemoryInfo {
+
+ readonly attribute unsigned long totalJSHeapSize;
+ readonly attribute unsigned long usedJSHeapSize;
+
+ };
+
+}
diff --git a/WebCore/page/PositionCallback.h b/WebCore/page/PositionCallback.h
index 5b7a202..5511d3e 100644
--- a/WebCore/page/PositionCallback.h
+++ b/WebCore/page/PositionCallback.h
@@ -26,14 +26,16 @@
#ifndef PositionCallback_h
#define PositionCallback_h
+#include "ActiveDOMObject.h"
#include <wtf/RefCounted.h>
namespace WebCore {
class Geoposition;
- class PositionCallback : public RefCounted<PositionCallback> {
+ class PositionCallback : public RefCounted<PositionCallback>, public ActiveDOMObject {
public:
+ PositionCallback(ScriptExecutionContext* context) : ActiveDOMObject(context, this) { }
virtual ~PositionCallback() { }
virtual void handleEvent(Geoposition*) = 0;
};
diff --git a/WebCore/page/PositionErrorCallback.h b/WebCore/page/PositionErrorCallback.h
index e784297..a65e350 100644
--- a/WebCore/page/PositionErrorCallback.h
+++ b/WebCore/page/PositionErrorCallback.h
@@ -26,14 +26,16 @@
#ifndef PositionErrorCallback_h
#define PositionErrorCallback_h
+#include "ActiveDOMObject.h"
#include <wtf/RefCounted.h>
namespace WebCore {
class PositionError;
- class PositionErrorCallback : public RefCounted<PositionErrorCallback> {
+ class PositionErrorCallback : public RefCounted<PositionErrorCallback>, public ActiveDOMObject {
public:
+ PositionErrorCallback(ScriptExecutionContext* context) : ActiveDOMObject(context, this) { }
virtual ~PositionErrorCallback() { }
virtual void handleEvent(PositionError*) = 0;
};
diff --git a/WebCore/page/PrintContext.cpp b/WebCore/page/PrintContext.cpp
index ffde0be..bc4b31a 100644
--- a/WebCore/page/PrintContext.cpp
+++ b/WebCore/page/PrintContext.cpp
@@ -24,6 +24,7 @@
#include "GraphicsContext.h"
#include "Frame.h"
#include "FrameView.h"
+#include "RenderLayer.h"
#include "RenderView.h"
using namespace WebCore;
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 268d8ae..9ee3e1f 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -125,7 +125,7 @@ Settings::Settings(Page* page)
, m_enforceCSSMIMETypeInStrictMode(true)
, m_usesEncodingDetector(false)
, m_allowScriptsToCloseWindows(false)
- , m_editingBehavior(
+ , m_editingBehaviorType(
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
// (PLATFORM(MAC) is always false in Chromium, hence the extra condition.)
EditingMacBehavior
@@ -145,9 +145,13 @@ Settings::Settings(Page* page)
, m_loadDeferringEnabled(true)
, m_tiledBackingStoreEnabled(false)
, m_html5ParserEnabled(false)
+<<<<<<< HEAD:WebCore/page/Settings.cpp
#ifdef ANDROID_PLUGINS
, m_pluginsOnDemand(false)
#endif
+=======
+ , m_paginateDuringLayoutEnabled(false)
+>>>>>>> Webkit.org at r61121:WebCore/page/Settings.cpp
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index 2f9637b..8e82891 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -28,6 +28,7 @@
#define Settings_h
#include "AtomicString.h"
+#include "EditingBehaviorTypes.h"
#include "FontRenderingMode.h"
#include "KURL.h"
#include "ZoomMode.h"
@@ -50,21 +51,6 @@ namespace WebCore {
TextDirectionSubmenuAlwaysIncluded
};
- // There are multiple editing details that are different on Windows than Macintosh.
- // We use a single switch for all of them. Some examples:
- //
- // 1) Clicking below the last line of an editable area puts the caret at the end
- // of the last line on Mac, but in the middle of the last line on Windows.
- // 2) Pushing the down arrow key on the last line puts the caret at the end of the
- // last line on Mac, but does nothing on Windows. A similar case exists on the
- // top line.
- //
- // This setting is intended to control these sorts of behaviors. There are some other
- // behaviors with individual function calls on EditorClient (smart copy and paste and
- // selecting the space after a double click) that could be combined with this if
- // if possible in the future.
- enum EditingBehavior { EditingMacBehavior, EditingWindowsBehavior };
-
class Settings : public Noncopyable {
public:
Settings(Page*);
@@ -336,9 +322,9 @@ namespace WebCore {
void setAllowScriptsToCloseWindows(bool);
bool allowScriptsToCloseWindows() const { return m_allowScriptsToCloseWindows; }
- void setEditingBehavior(EditingBehavior behavior) { m_editingBehavior = behavior; }
- EditingBehavior editingBehavior() const { return static_cast<EditingBehavior>(m_editingBehavior); }
-
+ void setEditingBehaviorType(EditingBehaviorType behavior) { m_editingBehaviorType = behavior; }
+ EditingBehaviorType editingBehaviorType() const { return static_cast<EditingBehaviorType>(m_editingBehaviorType); }
+
void setDownloadableBinaryFontsEnabled(bool);
bool downloadableBinaryFontsEnabled() const { return m_downloadableBinaryFontsEnabled; }
@@ -377,6 +363,9 @@ namespace WebCore {
void setHTML5ParserEnabled(bool flag) { m_html5ParserEnabled = flag; }
bool html5ParserEnabled() const { return m_html5ParserEnabled; }
+ void setPaginateDuringLayoutEnabled(bool flag) { m_paginateDuringLayoutEnabled = flag; }
+ bool paginateDuringLayoutEnabled() const { return m_paginateDuringLayoutEnabled; }
+
private:
Page* m_page;
@@ -483,7 +472,7 @@ namespace WebCore {
bool m_enforceCSSMIMETypeInStrictMode : 1;
bool m_usesEncodingDetector : 1;
bool m_allowScriptsToCloseWindows : 1;
- unsigned m_editingBehavior : 1;
+ unsigned m_editingBehaviorType : 1;
bool m_downloadableBinaryFontsEnabled : 1;
bool m_xssAuditorEnabled : 1;
bool m_acceleratedCompositingEnabled : 1;
@@ -494,10 +483,15 @@ namespace WebCore {
bool m_loadDeferringEnabled : 1;
bool m_tiledBackingStoreEnabled : 1;
bool m_html5ParserEnabled: 1;
+<<<<<<< HEAD:WebCore/page/Settings.h
#ifdef ANDROID_PLUGINS
bool m_pluginsOnDemand : 1;
#endif
+=======
+ bool m_paginateDuringLayoutEnabled : 1;
+
+>>>>>>> Webkit.org at r61121:WebCore/page/Settings.h
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
#endif
diff --git a/WebCore/page/SpatialNavigation.cpp b/WebCore/page/SpatialNavigation.cpp
index d7eaf25..0239c39 100644
--- a/WebCore/page/SpatialNavigation.cpp
+++ b/WebCore/page/SpatialNavigation.cpp
@@ -35,6 +35,7 @@
#include "HTMLFrameOwnerElement.h"
#include "IntRect.h"
#include "Node.h"
+#include "RenderLayer.h"
#include "Page.h"
namespace WebCore {
diff --git a/WebCore/page/WebKitPoint.h b/WebCore/page/WebKitPoint.h
index 501b17f..ff5d442 100644
--- a/WebCore/page/WebKitPoint.h
+++ b/WebCore/page/WebKitPoint.h
@@ -26,6 +26,7 @@
#ifndef WebKitPoint_h
#define WebKitPoint_h
+#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
diff --git a/WebCore/page/XSSAuditor.cpp b/WebCore/page/XSSAuditor.cpp
index 9e225ff..b5aba79 100644
--- a/WebCore/page/XSSAuditor.cpp
+++ b/WebCore/page/XSSAuditor.cpp
@@ -170,7 +170,7 @@ bool XSSAuditor::canCreateInlineEventListener(const String&, const String& code)
return true;
}
-bool XSSAuditor::canLoadExternalScriptFromSrc(const String& context, const String& url) const
+bool XSSAuditor::canLoadExternalScriptFromSrc(const String& url) const
{
if (!isEnabled())
return true;
@@ -179,8 +179,8 @@ bool XSSAuditor::canLoadExternalScriptFromSrc(const String& context, const Strin
return true;
FindTask task;
- task.context = context;
task.string = url;
+ task.allowRequestIfNoIllegalURICharacters = true;
if (findInRequest(task)) {
DEFINE_STATIC_LOCAL(String, consoleMessage, ("Refused to execute a JavaScript script. Source code of script found within request.\n"));
diff --git a/WebCore/page/XSSAuditor.h b/WebCore/page/XSSAuditor.h
index d2f525d..7afbf07 100644
--- a/WebCore/page/XSSAuditor.h
+++ b/WebCore/page/XSSAuditor.h
@@ -66,7 +66,7 @@ namespace WebCore {
// * ScriptController::executeIfJavaScriptURL - used to evaluate JavaScript URLs.
// * ScriptEventListener::createAttributeEventListener - used to create JavaScript event handlers.
// * HTMLBaseElement::process - used to set the document base URL.
- // * HTMLTokenizer::parseTag - used to load external JavaScript scripts.
+ // * HTMLDocumentParser::parseTag - used to load external JavaScript scripts.
// * FrameLoader::requestObject - used to load <object>/<embed> elements.
//
class XSSAuditor : public Noncopyable {
@@ -90,7 +90,7 @@ namespace WebCore {
// Determines whether the external script should be loaded based on the
// content of any user-submitted data.
- bool canLoadExternalScriptFromSrc(const String& context, const String& url) const;
+ bool canLoadExternalScriptFromSrc(const String& url) const;
// Determines whether object should be loaded based on the content of
// any user-submitted data.
diff --git a/WebCore/page/qt/EventHandlerQt.cpp b/WebCore/page/qt/EventHandlerQt.cpp
index ace8e54..18d9b73 100644
--- a/WebCore/page/qt/EventHandlerQt.cpp
+++ b/WebCore/page/qt/EventHandlerQt.cpp
@@ -43,12 +43,12 @@
#include "HitTestResult.h"
#include "KeyboardEvent.h"
#include "MouseEventWithHitTestResults.h"
+#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
#include "RenderWidget.h"
#include "Scrollbar.h"
-#include "NotImplemented.h"
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT extern bool qt_tab_all_widgets; // from qapplication.cpp
@@ -96,7 +96,7 @@ bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestR
bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
{
- //Qt has an activation event which is sent independently
+ // Qt has an activation event which is sent independently
// of mouse event so this thing will be a snafu to implement
// correctly
return false;