summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-13 09:36:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-13 09:36:46 (GMT)
commit115b7172d54a5a331b9e00d20f6694749179c484 (patch)
tree7ccc86a933733a600c4a7423e74dcb32d6f838b1
parent50711dd7aa22052eff58431d9f4e95e1a688047e (diff)
parentcea92fb0e9af4f73017682ae7a89f4878faecd03 (diff)
downloadQt-115b7172d54a5a331b9e00d20f6694749179c484.zip
Qt-115b7172d54a5a331b9e00d20f6694749179c484.tar.gz
Qt-115b7172d54a5a331b9e00d20f6694749179c484.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit: Updated WebKit to dc5821c3df2ef60456d85263160852f5335cf946 Updated WebKit to b4aa5e1ddc41edab895132aba3cc66d9d7129444
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog23
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h6
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog262
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.gypi18
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pri4
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro6
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleMedia.cpp (renamed from src/3rdparty/webkit/WebCore/css/Media.cpp)8
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleMedia.h (renamed from src/3rdparty/webkit/WebCore/css/Media.h)17
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleMedia.idl (renamed from src/3rdparty/webkit/WebCore/css/Media.idl)3
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMedia.cpp201
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp201
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h (renamed from src/3rdparty/webkit/WebCore/generated/JSMedia.h)30
-rw-r--r--src/3rdparty/webkit/WebCore/page/AbstractView.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.h8
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.h2
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.h5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp16
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp29
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h11
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubsQt.cpp (renamed from src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp)0
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp22
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp32
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog58
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp17
40 files changed, 749 insertions, 308 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 75fc5e7..d8b4b32 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-b4aa5e1ddc41edab895132aba3cc66d9d7129444
+57d10d5c05e59bbf7de8189ff47dd18d1be996dc
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 1439ae0..97176ef 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-05-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ [Qt] Disable JIT support for mingw-w64
+ https://bugs.webkit.org/show_bug.cgi?id=38747
+
+ Disale JIT for mingw-w64 as it is reportedly
+ unstable.
+
+ Thanks for Vanboxem Rruben for the investigation.
+
+ * wtf/Platform.h:
+
+2010-05-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable YARR_JIT for X86 Mac for QtWebKit
+ https://bugs.webkit.org/show_bug.cgi?id=38668
+
+ * wtf/Platform.h:
+
2010-05-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Eric Seidel.
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index c582905..8d98765 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -927,8 +927,6 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
-#elif CPU(X86_64) && OS(WINDOWS) && COMPILER(MINGW64) && GCC_VERSION >= 40100
- #define ENABLE_JIT 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
@@ -1011,7 +1009,9 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
|| (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \
|| (CPU(ARM_TRADITIONAL) && OS(LINUX)) \
|| (CPU(ARM_TRADITIONAL) && OS(SYMBIAN) && COMPILER(RVCT)) \
- || (CPU(MIPS) && OS(LINUX))
+ || (CPU(MIPS) && OS(LINUX)) \
+ || (CPU(X86) && OS(DARWIN)) \
+ || (CPU(X86_64) && OS(DARWIN))
#define ENABLE_YARR 1
#define ENABLE_YARR_JIT 1
#endif
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 98debf6..c8c2aa3 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 07b60cf799680fcfb7785ee88e14f8030a5dbfa2
+ dc5821c3df2ef60456d85263160852f5335cf946
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 6617b66..76b4eff 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,265 @@
+2010-04-29 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Calls FrameView::scrollPositionChanged whenever a ScrollView is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=38286
+
+ When a ScrollView's scroll position is changed, we have to call
+ FrameView::scrollPositionChanged to generate repaint invalidation for
+ fixed position elements. This ends up getting called indirectly when
+ the ScrollView has a platformWidget through the port layer
+ (see WebHTMLView.mm's _frameOrBoundsChanged method for how the mac
+ port does it) but not when there is no platformWidget.
+
+ This is tested by the fast/repaint/fixed-* tests when run in pixel
+ mode.
+
+ Test: fast/repaint/fixed-move-after-keyboard-scroll.html
+
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::valueChanged):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::scrollPositionChanged):
+
+2010-04-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed build fix.
+
+ Change Media to StyleMedia
+
+ * DerivedSources.make:
+
+2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Laszlo Gombos.
+
+ Rename window.media to window.styleMedia
+ https://bugs.webkit.org/show_bug.cgi?id=36187
+
+ Rename the interface Media to StyleMedia as required by the
+ new CSSOM View spec.
+
+ * Android.derived.jscbindings.mk:
+ * Android.derived.v8bindings.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/Media.cpp: Removed.
+ * css/Media.h: Removed.
+ * css/Media.idl: Removed.
+ * css/StyleMedia.cpp: Added.
+ (WebCore::StyleMedia::StyleMedia):
+ (WebCore::StyleMedia::type):
+ (WebCore::StyleMedia::matchMedium):
+ * css/StyleMedia.h: Added.
+ (WebCore::StyleMedia::create):
+ (WebCore::StyleMedia::disconnectFrame):
+ * css/StyleMedia.idl: Added.
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::styleMedia):
+ * page/DOMWindow.h:
+ (WebCore::DOMWindow::optionalMedia):
+ * page/DOMWindow.idl:
+
+2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Rename window.media to window.styleMedia
+ https://bugs.webkit.org/show_bug.cgi?id=36187
+
+ It has been defined that the AbstractView media extension
+ defined in the CSSOM View spec should be renamed to styleMedia.
+ This patch does that and updates the current layout tests
+ making use of it.
+
+ * page/AbstractView.idl:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::styleMedia):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+
+2010-05-11 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] fast/text/find-hidden-text.html
+ https://bugs.webkit.org/show_bug.cgi?id=32922
+
+ Use the real page step for populating the QStyleOption otherwhise
+ the size can be negative, which can break the QStyle used.
+
+ * platform/qt/ScrollbarThemeQt.cpp:
+ (WebCore::styleOptionSlider):
+
+2010-05-03 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ Spatial Navigation: create a getter for the "fudgeFactor"
+ https://bugs.webkit.org/show_bug.cgi?id=38488
+
+ A couple of places in the Spatial Navigation code make use of a "fudge factor"
+ to improve precision by working around outline focus metrics and such. Patch adds
+ a helper method for unify getter operations of this value, instead of having it
+ declared locally in the various methods it is used.
+
+ No behaviour change.
+
+ * page/SpatialNavigation.cpp:
+ (WebCore::scrollIntoView):
+ (WebCore::deflateIfOverlapped):
+ * page/SpatialNavigation.h:
+ (WebCore::fudgeFactor):
+
+2010-05-10 Markus Goetz <Markus.Goetz@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Qt after 4.6.3 has its integrated DNS cache. Therefore some
+ code is not necessary anymore.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38834
+
+ * platform/network/qt/DnsPrefetchHelper.h:
+ (WebCore::DnsPrefetchHelper::lookup):
+ (WebCore::DnsPrefetchHelper::lookedUp):
+
+2010-05-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, build fix WinCE for QtWebKit.
+
+ [Qt] Compilation with Plugins disabled is broken
+ https://bugs.webkit.org/show_bug.cgi?id=31407
+
+ Rename platform/qt/TemporaryLinkStubs.cpp to avoid name collition on
+ Windows.
+
+ Thanks for Ismail "cartman" Donmez for help.
+
+ No new tests, as there is no new functionality.
+
+ * WebCore.gypi:
+ * WebCore.pro:
+ * platform/qt/TemporaryLinkStubs.cpp: Removed.
+ * platform/qt/TemporaryLinkStubsQt.cpp: Copied from WebCore/platform/qt/TemporaryLinkStubs.cpp.
+
+2010-04-23 Qi Zhang <qi.2.zhang@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] LayoutTests/fast/canvas/pointInPath.html passed, actually it failed
+ https://bugs.webkit.org/show_bug.cgi?id=37276
+
+ QPainterPath::contains doesn't count the point on the bound.
+
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::isPointOnPathBorder):
+ (WebCore::Path::contains):
+
+2010-05-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix rendering of -webkit-user-select: none
+
+ -webkit-user-select: none is implemented by filling
+ the area with an invalid default-constructed Color.
+ In most ports passing an invalid color down to the
+ graphics backend seems to produce transparent fills.
+
+ In Qt the behavior of painting with an invalid QColor
+ is undefined, and in practice it results in painting
+ black opaque areas.
+
+ One way to fix this would be to use Qt::transparent
+ when converting an undefined Color to a QColor, but
+ Qt does not have short circuits for fully transparent
+ painting, and we actually end up in slow code paths
+ due to the transparency. So, we're better of doing the
+ short circuit in WebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38523
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+
+2010-04-05 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix infinite redirection loop in QNetworkReplyHandler
+
+ Put a maximum on consecutive redirections so we don't have to
+ worry about whether it's the same url or not.
+
+ Tolerate up to 10 consecutive redirections, anything beyond
+ that is considered a potentially infinite recursion in the
+ redirection requests. This is the same behaviour as Firefox.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37097
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+ * platform/network/qt/QNetworkReplyHandler.h:
+
+2010-04-05 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Kenneth Rohde-Christiansen.
+
+ [Qt] Fix infinite redirection loop in QNetworkReplyHandler
+
+ Qt enters an infinite loop if a redirect response redirects to itself.
+
+ Fixes http/tests/xmlhttprequest/connection-error-sync.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=37097
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2010-05-07 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ Potential crash in EventHandler::handleTouchEvent
+ https://bugs.webkit.org/show_bug.cgi?id=38646
+
+ Fix a ref counting bug that can cause a crash if the m_originatingouchPointTargets
+ hashmap holds the last ref to an EventTarget when the user lifts their finger.
+
+ This is very hard to reproduce in a consistent way and clearly a
+ simple logic error in the code, therefore no new tests.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Don't let the RefPtr we get back from
+ the hasmap go out of scope so soon as it could delete the wrapped ptr if the
+ hashmap held the last ref (and we use the raw ptr that the RefPtr
+ wraps later in the WebCore::Touch constructor).
+
+2010-05-04 Ben Murdoch <benm@google.com>
+
+ Reviewed by Simon Hausmann.
+
+ Crash in handleTouchEvent: using dangling node ptrs in hashmap
+ https://bugs.webkit.org/show_bug.cgi?id=38514
+
+ When navigating away from a page, if you have your finger still
+ pressed and then lift it on the new page we see a crash if the
+ node got deleted as we still have a dangling pointer in the
+ m_originatingTouchPointTargets hashmap and try to use it as the
+ receiver to dispatch a touchend event.
+
+ Test: fast/events/touch/touch-stale-node-crash.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::clear): Clear the hashmap of touch targets.
+
2010-05-04 Luiz Agostini <luiz.agostini@openbossa.org>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.gypi b/src/3rdparty/webkit/WebCore/WebCore.gypi
index caa79f2..1e92f1f 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.gypi
+++ b/src/3rdparty/webkit/WebCore/WebCore.gypi
@@ -18,10 +18,10 @@
'css/CSSVariablesDeclaration.idl',
'css/CSSVariablesRule.idl',
'css/Counter.idl',
- 'css/Media.idl',
'css/MediaList.idl',
- 'css/RGBColor.idl',
'css/Rect.idl',
+ 'css/RGBColor.idl',
+ 'css/StyleMedia.idl',
'css/StyleSheet.idl',
'css/StyleSheetList.idl',
'css/WebKitCSSKeyframeRule.idl',
@@ -1003,33 +1003,33 @@
'css/FontValue.h',
'css/MediaFeatureNames.cpp',
'css/MediaFeatureNames.h',
- 'css/Media.cpp',
- 'css/Media.h',
'css/MediaList.cpp',
'css/MediaList.h',
'css/MediaQuery.cpp',
- 'css/MediaQuery.h',
'css/MediaQueryEvaluator.cpp',
'css/MediaQueryEvaluator.h',
'css/MediaQueryExp.cpp',
'css/MediaQueryExp.h',
+ 'css/MediaQuery.h',
'css/Pair.h',
'css/Rect.h',
'css/RGBColor.cpp',
'css/RGBColor.h',
- 'css/SVGCSSComputedStyleDeclaration.cpp',
- 'css/SVGCSSParser.cpp',
- 'css/SVGCSSStyleSelector.cpp',
'css/ShadowValue.cpp',
'css/ShadowValue.h',
'css/StyleBase.cpp',
'css/StyleBase.h',
'css/StyleList.cpp',
'css/StyleList.h',
+ 'css/StyleMedia.cpp',
+ 'css/StyleMedia.h',
'css/StyleSheet.cpp',
'css/StyleSheet.h',
'css/StyleSheetList.cpp',
'css/StyleSheetList.h',
+ 'css/SVGCSSComputedStyleDeclaration.cpp',
+ 'css/SVGCSSParser.cpp',
+ 'css/SVGCSSStyleSelector.cpp',
'css/WebKitCSSKeyframeRule.cpp',
'css/WebKitCSSKeyframeRule.h',
'css/WebKitCSSKeyframesRule.cpp',
@@ -2640,7 +2640,7 @@
'platform/qt/SharedBufferQt.cpp',
'platform/qt/SharedTimerQt.cpp',
'platform/qt/SoundQt.cpp',
- 'platform/qt/TemporaryLinkStubs.cpp',
+ 'platform/qt/TemporaryLinkStubsQt.cpp',
'platform/qt/WheelEventQt.cpp',
'platform/qt/WidgetQt.cpp',
'platform/sql/SQLValue.cpp',
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri
index ad514a2..5f5987f 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pri
+++ b/src/3rdparty/webkit/WebCore/WebCore.pri
@@ -227,10 +227,10 @@ IDL_BINDINGS += \
css/CSSValueList.idl \
css/CSSVariablesDeclaration.idl \
css/CSSVariablesRule.idl \
- css/Media.idl \
css/MediaList.idl \
- css/RGBColor.idl \
css/Rect.idl \
+ css/RGBColor.idl \
+ css/StyleMedia.idl \
css/StyleSheet.idl \
css/StyleSheetList.idl \
css/WebKitCSSKeyframeRule.idl \
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index beeb529..254d17b 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -431,7 +431,6 @@ SOURCES += \
css/FontFamilyValue.cpp \
css/FontValue.cpp \
css/MediaFeatureNames.cpp \
- css/Media.cpp \
css/MediaList.cpp \
css/MediaQuery.cpp \
css/MediaQueryEvaluator.cpp \
@@ -440,6 +439,7 @@ SOURCES += \
css/ShadowValue.cpp \
css/StyleBase.cpp \
css/StyleList.cpp \
+ css/StyleMedia.cpp \
css/StyleSheet.cpp \
css/StyleSheetList.cpp \
css/WebKitCSSKeyframeRule.cpp \
@@ -1145,7 +1145,6 @@ HEADERS += \
css/FontFamilyValue.h \
css/FontValue.h \
css/MediaFeatureNames.h \
- css/Media.h \
css/MediaList.h \
css/MediaQueryEvaluator.h \
css/MediaQueryExp.h \
@@ -1154,6 +1153,7 @@ HEADERS += \
css/ShadowValue.h \
css/StyleBase.h \
css/StyleList.h \
+ css/StyleMedia.h \
css/StyleSheet.h \
css/StyleSheetList.h \
css/WebKitCSSKeyframeRule.h \
@@ -2081,7 +2081,7 @@ SOURCES += \
platform/qt/SoundQt.cpp \
platform/qt/LoggingQt.cpp \
platform/text/qt/StringQt.cpp \
- platform/qt/TemporaryLinkStubs.cpp \
+ platform/qt/TemporaryLinkStubsQt.cpp \
platform/text/qt/TextBoundariesQt.cpp \
platform/text/qt/TextBreakIteratorQt.cpp \
platform/text/qt/TextCodecQt.cpp \
diff --git a/src/3rdparty/webkit/WebCore/css/Media.cpp b/src/3rdparty/webkit/WebCore/css/StyleMedia.cpp
index e238602..6cb662f 100644
--- a/src/3rdparty/webkit/WebCore/css/Media.cpp
+++ b/src/3rdparty/webkit/WebCore/css/StyleMedia.cpp
@@ -24,8 +24,8 @@
*/
#include "config.h"
+#include "StyleMedia.h"
-#include "Media.h"
#include "CSSStyleSelector.h"
#include "Frame.h"
#include "FrameView.h"
@@ -34,12 +34,12 @@
namespace WebCore {
-Media::Media(Frame* frame)
+StyleMedia::StyleMedia(Frame* frame)
: m_frame(frame)
{
}
-String Media::type() const
+String StyleMedia::type() const
{
FrameView* view = m_frame ? m_frame->view() : 0;
if (view)
@@ -48,7 +48,7 @@ String Media::type() const
return String();
}
-bool Media::matchMedium(const String& query) const
+bool StyleMedia::matchMedium(const String& query) const
{
if (!m_frame)
return false;
diff --git a/src/3rdparty/webkit/WebCore/css/Media.h b/src/3rdparty/webkit/WebCore/css/StyleMedia.h
index ee6961b..761e6a3 100644
--- a/src/3rdparty/webkit/WebCore/css/Media.h
+++ b/src/3rdparty/webkit/WebCore/css/StyleMedia.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,18 +24,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Media_h
-#define Media_h
+#ifndef StyleMedia_h
+#define StyleMedia_h
#include "DOMWindow.h"
namespace WebCore {
-class Media : public RefCounted<Media> {
+class StyleMedia : public RefCounted<StyleMedia> {
public:
- static PassRefPtr<Media> create(Frame* frame)
+ static PassRefPtr<StyleMedia> create(Frame* frame)
{
- return adoptRef(new Media(frame));
+ return adoptRef(new StyleMedia(frame));
}
void disconnectFrame() { m_frame = 0; }
@@ -42,13 +43,13 @@ public:
String type() const;
bool matchMedium(const String&) const;
-
+
private:
- Media(Frame*);
+ StyleMedia(Frame*);
Frame* m_frame;
};
} // namespace
-#endif // Media_h
+#endif // StyleMedia_h
diff --git a/src/3rdparty/webkit/WebCore/css/Media.idl b/src/3rdparty/webkit/WebCore/css/StyleMedia.idl
index 1bf5900..7be35cc 100644
--- a/src/3rdparty/webkit/WebCore/css/Media.idl
+++ b/src/3rdparty/webkit/WebCore/css/StyleMedia.idl
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,7 +25,7 @@
*/
module view {
- interface Media {
+ interface StyleMedia {
readonly attribute DOMString type;
boolean matchMedium(in DOMString mediaquery);
};
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
index 04238bc..11dfd2e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
@@ -152,7 +152,6 @@
#include "JSHTMLVideoElement.h"
#include "JSImageData.h"
#include "JSKeyboardEvent.h"
-#include "JSMedia.h"
#include "JSMediaError.h"
#include "JSMediaList.h"
#include "JSMessageChannel.h"
@@ -299,6 +298,7 @@
#include "JSSharedWorker.h"
#include "JSStorage.h"
#include "JSStorageEvent.h"
+#include "JSStyleMedia.h"
#include "JSStyleSheet.h"
#include "JSStyleSheetList.h"
#include "JSText.h"
@@ -334,11 +334,11 @@
#include "JSXPathResult.h"
#include "JSXSLTProcessor.h"
#include "KURL.h"
-#include "Media.h"
#include "Navigator.h"
#include "RegisteredEventListener.h"
#include "Screen.h"
#include "Storage.h"
+#include "StyleMedia.h"
#include "WebKitPoint.h"
#include <runtime/Error.h>
#include <runtime/JSNumberCell.h>
@@ -395,7 +395,7 @@ static const HashTableValue JSDOMWindowTableValues[409] =
{ "parent", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowParent), (intptr_t)setJSDOMWindowParent },
{ "top", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowTop), (intptr_t)setJSDOMWindowTop },
{ "document", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowDocument), (intptr_t)0 },
- { "media", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowMedia), (intptr_t)0 },
+ { "styleMedia", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowStyleMedia), (intptr_t)0 },
{ "devicePixelRatio", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowDevicePixelRatio), (intptr_t)setJSDOMWindowDevicePixelRatio },
{ "applicationCache", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowApplicationCache), (intptr_t)0 },
{ "sessionStorage", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowSessionStorage), (intptr_t)0 },
@@ -1304,14 +1304,14 @@ JSValue jsDOMWindowDocument(ExecState* exec, JSValue slotBase, const Identifier&
return result;
}
-JSValue jsDOMWindowMedia(ExecState* exec, JSValue slotBase, const Identifier&)
+JSValue jsDOMWindowStyleMedia(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slotBase));
if (!castedThis->allowsAccessFrom(exec))
return jsUndefined();
UNUSED_PARAM(exec);
DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl());
- JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->media()));
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->styleMedia()));
return result;
}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
index a6f3253..7e50556 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
@@ -231,7 +231,7 @@ void setJSDOMWindowParent(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowTop(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDOMWindowTop(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowDocument(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
-JSC::JSValue jsDOMWindowMedia(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsDOMWindowStyleMedia(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
JSC::JSValue jsDOMWindowDevicePixelRatio(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDOMWindowDevicePixelRatio(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowApplicationCache(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp b/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp
deleted file mode 100644
index 1579c2b..0000000
--- a/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- This file is part of the WebKit open source project.
- This file has been generated by generate-bindings.pl. DO NOT MODIFY!
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "JSMedia.h"
-
-#include "KURL.h"
-#include "Media.h"
-#include <runtime/Error.h>
-#include <runtime/JSString.h>
-#include <wtf/GetPtr.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-ASSERT_CLASS_FITS_IN_CELL(JSMedia);
-
-/* Hash table */
-
-static const HashTableValue JSMediaTableValues[3] =
-{
- { "type", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMediaType), (intptr_t)0 },
- { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMediaConstructor), (intptr_t)0 },
- { 0, 0, 0, 0 }
-};
-
-static JSC_CONST_HASHTABLE HashTable JSMediaTable =
-#if ENABLE(PERFECT_HASH_SIZE)
- { 3, JSMediaTableValues, 0 };
-#else
- { 4, 3, JSMediaTableValues, 0 };
-#endif
-
-/* Hash table for constructor */
-
-static const HashTableValue JSMediaConstructorTableValues[1] =
-{
- { 0, 0, 0, 0 }
-};
-
-static JSC_CONST_HASHTABLE HashTable JSMediaConstructorTable =
-#if ENABLE(PERFECT_HASH_SIZE)
- { 0, JSMediaConstructorTableValues, 0 };
-#else
- { 1, 0, JSMediaConstructorTableValues, 0 };
-#endif
-
-class JSMediaConstructor : public DOMConstructorObject {
-public:
- JSMediaConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMConstructorObject(JSMediaConstructor::createStructure(globalObject->objectPrototype()), globalObject)
- {
- putDirect(exec->propertyNames().prototype, JSMediaPrototype::self(exec, globalObject), None);
- }
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
- virtual const ClassInfo* classInfo() const { return &s_info; }
- static const ClassInfo s_info;
-
- static PassRefPtr<Structure> createStructure(JSValue proto)
- {
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
- }
-
-protected:
- static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags;
-};
-
-const ClassInfo JSMediaConstructor::s_info = { "MediaConstructor", 0, &JSMediaConstructorTable, 0 };
-
-bool JSMediaConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<JSMediaConstructor, DOMObject>(exec, &JSMediaConstructorTable, this, propertyName, slot);
-}
-
-bool JSMediaConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
- return getStaticValueDescriptor<JSMediaConstructor, DOMObject>(exec, &JSMediaConstructorTable, this, propertyName, descriptor);
-}
-
-/* Hash table for prototype */
-
-static const HashTableValue JSMediaPrototypeTableValues[2] =
-{
- { "matchMedium", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsMediaPrototypeFunctionMatchMedium), (intptr_t)1 },
- { 0, 0, 0, 0 }
-};
-
-static JSC_CONST_HASHTABLE HashTable JSMediaPrototypeTable =
-#if ENABLE(PERFECT_HASH_SIZE)
- { 0, JSMediaPrototypeTableValues, 0 };
-#else
- { 2, 1, JSMediaPrototypeTableValues, 0 };
-#endif
-
-const ClassInfo JSMediaPrototype::s_info = { "MediaPrototype", 0, &JSMediaPrototypeTable, 0 };
-
-JSObject* JSMediaPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSMedia>(exec, globalObject);
-}
-
-bool JSMediaPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticFunctionSlot<JSObject>(exec, &JSMediaPrototypeTable, this, propertyName, slot);
-}
-
-bool JSMediaPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
- return getStaticFunctionDescriptor<JSObject>(exec, &JSMediaPrototypeTable, this, propertyName, descriptor);
-}
-
-const ClassInfo JSMedia::s_info = { "Media", 0, &JSMediaTable, 0 };
-
-JSMedia::JSMedia(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Media> impl)
- : DOMObjectWithGlobalPointer(structure, globalObject)
- , m_impl(impl)
-{
-}
-
-JSMedia::~JSMedia()
-{
- forgetDOMObject(this, impl());
-}
-
-JSObject* JSMedia::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
-{
- return new (exec) JSMediaPrototype(JSMediaPrototype::createStructure(globalObject->objectPrototype()));
-}
-
-bool JSMedia::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<JSMedia, Base>(exec, &JSMediaTable, this, propertyName, slot);
-}
-
-bool JSMedia::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
- return getStaticValueDescriptor<JSMedia, Base>(exec, &JSMediaTable, this, propertyName, descriptor);
-}
-
-JSValue jsMediaType(ExecState* exec, JSValue slotBase, const Identifier&)
-{
- JSMedia* castedThis = static_cast<JSMedia*>(asObject(slotBase));
- UNUSED_PARAM(exec);
- Media* imp = static_cast<Media*>(castedThis->impl());
- JSValue result = jsString(exec, imp->type());
- return result;
-}
-
-JSValue jsMediaConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
-{
- JSMedia* domObject = static_cast<JSMedia*>(asObject(slotBase));
- return JSMedia::getConstructor(exec, domObject->globalObject());
-}
-JSValue JSMedia::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
-{
- return getDOMConstructor<JSMediaConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
-}
-
-JSValue JSC_HOST_CALL jsMediaPrototypeFunctionMatchMedium(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
-{
- UNUSED_PARAM(args);
- if (!thisValue.inherits(&JSMedia::s_info))
- return throwError(exec, TypeError);
- JSMedia* castedThisObj = static_cast<JSMedia*>(asObject(thisValue));
- Media* imp = static_cast<Media*>(castedThisObj->impl());
- const UString& mediaquery = args.at(0).toString(exec);
-
-
- JSC::JSValue result = jsBoolean(imp->matchMedium(mediaquery));
- return result;
-}
-
-JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Media* object)
-{
- return getDOMObjectWrapper<JSMedia>(exec, globalObject, object);
-}
-Media* toMedia(JSC::JSValue value)
-{
- return value.inherits(&JSMedia::s_info) ? static_cast<JSMedia*>(asObject(value))->impl() : 0;
-}
-
-}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp
new file mode 100644
index 0000000..b06bf09
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp
@@ -0,0 +1,201 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "JSStyleMedia.h"
+
+#include "KURL.h"
+#include "StyleMedia.h"
+#include <runtime/Error.h>
+#include <runtime/JSString.h>
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+ASSERT_CLASS_FITS_IN_CELL(JSStyleMedia);
+
+/* Hash table */
+
+static const HashTableValue JSStyleMediaTableValues[3] =
+{
+ { "type", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsStyleMediaType), (intptr_t)0 },
+ { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsStyleMediaConstructor), (intptr_t)0 },
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSStyleMediaTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 3, JSStyleMediaTableValues, 0 };
+#else
+ { 4, 3, JSStyleMediaTableValues, 0 };
+#endif
+
+/* Hash table for constructor */
+
+static const HashTableValue JSStyleMediaConstructorTableValues[1] =
+{
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSStyleMediaConstructorTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSStyleMediaConstructorTableValues, 0 };
+#else
+ { 1, 0, JSStyleMediaConstructorTableValues, 0 };
+#endif
+
+class JSStyleMediaConstructor : public DOMConstructorObject {
+public:
+ JSStyleMediaConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
+ : DOMConstructorObject(JSStyleMediaConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ {
+ putDirect(exec->propertyNames().prototype, JSStyleMediaPrototype::self(exec, globalObject), None);
+ }
+ virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual const ClassInfo* classInfo() const { return &s_info; }
+ static const ClassInfo s_info;
+
+ static PassRefPtr<Structure> createStructure(JSValue proto)
+ {
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+protected:
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags;
+};
+
+const ClassInfo JSStyleMediaConstructor::s_info = { "StyleMediaConstructor", 0, &JSStyleMediaConstructorTable, 0 };
+
+bool JSStyleMediaConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSStyleMediaConstructor, DOMObject>(exec, &JSStyleMediaConstructorTable, this, propertyName, slot);
+}
+
+bool JSStyleMediaConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSStyleMediaConstructor, DOMObject>(exec, &JSStyleMediaConstructorTable, this, propertyName, descriptor);
+}
+
+/* Hash table for prototype */
+
+static const HashTableValue JSStyleMediaPrototypeTableValues[2] =
+{
+ { "matchMedium", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsStyleMediaPrototypeFunctionMatchMedium), (intptr_t)1 },
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSStyleMediaPrototypeTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSStyleMediaPrototypeTableValues, 0 };
+#else
+ { 2, 1, JSStyleMediaPrototypeTableValues, 0 };
+#endif
+
+const ClassInfo JSStyleMediaPrototype::s_info = { "StyleMediaPrototype", 0, &JSStyleMediaPrototypeTable, 0 };
+
+JSObject* JSStyleMediaPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSStyleMedia>(exec, globalObject);
+}
+
+bool JSStyleMediaPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticFunctionSlot<JSObject>(exec, &JSStyleMediaPrototypeTable, this, propertyName, slot);
+}
+
+bool JSStyleMediaPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticFunctionDescriptor<JSObject>(exec, &JSStyleMediaPrototypeTable, this, propertyName, descriptor);
+}
+
+const ClassInfo JSStyleMedia::s_info = { "StyleMedia", 0, &JSStyleMediaTable, 0 };
+
+JSStyleMedia::JSStyleMedia(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<StyleMedia> impl)
+ : DOMObjectWithGlobalPointer(structure, globalObject)
+ , m_impl(impl)
+{
+}
+
+JSStyleMedia::~JSStyleMedia()
+{
+ forgetDOMObject(this, impl());
+}
+
+JSObject* JSStyleMedia::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return new (exec) JSStyleMediaPrototype(JSStyleMediaPrototype::createStructure(globalObject->objectPrototype()));
+}
+
+bool JSStyleMedia::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSStyleMedia, Base>(exec, &JSStyleMediaTable, this, propertyName, slot);
+}
+
+bool JSStyleMedia::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSStyleMedia, Base>(exec, &JSStyleMediaTable, this, propertyName, descriptor);
+}
+
+JSValue jsStyleMediaType(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSStyleMedia* castedThis = static_cast<JSStyleMedia*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ StyleMedia* imp = static_cast<StyleMedia*>(castedThis->impl());
+ JSValue result = jsString(exec, imp->type());
+ return result;
+}
+
+JSValue jsStyleMediaConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSStyleMedia* domObject = static_cast<JSStyleMedia*>(asObject(slotBase));
+ return JSStyleMedia::getConstructor(exec, domObject->globalObject());
+}
+JSValue JSStyleMedia::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMConstructor<JSStyleMediaConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
+}
+
+JSValue JSC_HOST_CALL jsStyleMediaPrototypeFunctionMatchMedium(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSStyleMedia::s_info))
+ return throwError(exec, TypeError);
+ JSStyleMedia* castedThisObj = static_cast<JSStyleMedia*>(asObject(thisValue));
+ StyleMedia* imp = static_cast<StyleMedia*>(castedThisObj->impl());
+ const UString& mediaquery = args.at(0).toString(exec);
+
+
+ JSC::JSValue result = jsBoolean(imp->matchMedium(mediaquery));
+ return result;
+}
+
+JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, StyleMedia* object)
+{
+ return getDOMObjectWrapper<JSStyleMedia>(exec, globalObject, object);
+}
+StyleMedia* toStyleMedia(JSC::JSValue value)
+{
+ return value.inherits(&JSStyleMedia::s_info) ? static_cast<JSStyleMedia*>(asObject(value))->impl() : 0;
+}
+
+}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMedia.h b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h
index 28515c9..12601d5 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSMedia.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef JSMedia_h
-#define JSMedia_h
+#ifndef JSStyleMedia_h
+#define JSStyleMedia_h
#include "JSDOMBinding.h"
#include <runtime/JSGlobalObject.h>
@@ -27,13 +27,13 @@
namespace WebCore {
-class Media;
+class StyleMedia;
-class JSMedia : public DOMObjectWithGlobalPointer {
+class JSStyleMedia : public DOMObjectWithGlobalPointer {
typedef DOMObjectWithGlobalPointer Base;
public:
- JSMedia(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Media>);
- virtual ~JSMedia();
+ JSStyleMedia(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<StyleMedia>);
+ virtual ~JSStyleMedia();
static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
@@ -46,18 +46,18 @@ public:
}
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
- Media* impl() const { return m_impl.get(); }
+ StyleMedia* impl() const { return m_impl.get(); }
private:
- RefPtr<Media> m_impl;
+ RefPtr<StyleMedia> m_impl;
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
};
-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Media*);
-Media* toMedia(JSC::JSValue);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, StyleMedia*);
+StyleMedia* toStyleMedia(JSC::JSValue);
-class JSMediaPrototype : public JSC::JSObject {
+class JSStyleMediaPrototype : public JSC::JSObject {
typedef JSC::JSObject Base;
public:
static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
@@ -69,18 +69,18 @@ public:
{
return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
}
- JSMediaPrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
+ JSStyleMediaPrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
};
// Functions
-JSC::JSValue JSC_HOST_CALL jsMediaPrototypeFunctionMatchMedium(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsStyleMediaPrototypeFunctionMatchMedium(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
// Attributes
-JSC::JSValue jsMediaType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
-JSC::JSValue jsMediaConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsStyleMediaType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsStyleMediaConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/AbstractView.idl b/src/3rdparty/webkit/WebCore/page/AbstractView.idl
index 290bf48..e4ece0f 100644
--- a/src/3rdparty/webkit/WebCore/page/AbstractView.idl
+++ b/src/3rdparty/webkit/WebCore/page/AbstractView.idl
@@ -32,7 +32,7 @@ module views {
OmitConstructor
] AbstractView {
readonly attribute Document document;
- readonly attribute Media media;
+ readonly attribute Media styleMedia;
};
}
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
index dd90200..8dcff5c 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
@@ -57,7 +57,7 @@
#include "InspectorController.h"
#include "InspectorTimelineAgent.h"
#include "Location.h"
-#include "Media.h"
+#include "StyleMedia.h"
#include "MessageEvent.h"
#include "Navigator.h"
#include "NotificationCenter.h"
@@ -1112,10 +1112,10 @@ Document* DOMWindow::document() const
return m_frame->document();
}
-PassRefPtr<Media> DOMWindow::media() const
+PassRefPtr<StyleMedia> DOMWindow::styleMedia() const
{
if (!m_media)
- m_media = Media::create(m_frame);
+ m_media = StyleMedia::create(m_frame);
return m_media.get();
}
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.h b/src/3rdparty/webkit/WebCore/page/DOMWindow.h
index a70713b..cf9bc88 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.h
@@ -56,7 +56,7 @@ namespace WebCore {
class IndexedDatabaseRequest;
class InspectorTimelineAgent;
class Location;
- class Media;
+ class StyleMedia;
class Navigator;
class Node;
class NotificationCenter;
@@ -187,7 +187,7 @@ namespace WebCore {
// DOM Level 2 AbstractView Interface
Document* document() const;
// CSSOM View Module
- PassRefPtr<Media> media() const;
+ PassRefPtr<StyleMedia> styleMedia() const;
// DOM Level 2 Style Interface
PassRefPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String& pseudoElt) const;
@@ -353,7 +353,7 @@ namespace WebCore {
Console* optionalConsole() const { return m_console.get(); }
Navigator* optionalNavigator() const { return m_navigator.get(); }
Location* optionalLocation() const { return m_location.get(); }
- Media* optionalMedia() const { return m_media.get(); }
+ StyleMedia* optionalMedia() const { return m_media.get(); }
#if ENABLE(DOM_STORAGE)
Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }
Storage* optionalLocalStorage() const { return m_localStorage.get(); }
@@ -390,7 +390,7 @@ namespace WebCore {
mutable RefPtr<Console> m_console;
mutable RefPtr<Navigator> m_navigator;
mutable RefPtr<Location> m_location;
- mutable RefPtr<Media> m_media;
+ mutable RefPtr<StyleMedia> m_media;
#if ENABLE(DOM_STORAGE)
mutable RefPtr<Storage> m_sessionStorage;
mutable RefPtr<Storage> m_localStorage;
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
index 31e4d4f..33e49e8 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
@@ -141,7 +141,7 @@ module window {
readonly attribute Document document;
// CSSOM View Module
- readonly attribute Media media;
+ readonly attribute StyleMedia styleMedia;
// DOM Level 2 Style Interface
CSSStyleDeclaration getComputedStyle(in Element element,
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
index 0a0e8c6..46dd7ae 100644
--- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
@@ -230,6 +230,9 @@ void EventHandler::clear()
m_capturingMouseEventsNode = 0;
m_latchedWheelEventNode = 0;
m_previousWheelScrolledNode = 0;
+#if ENABLE(TOUCH_EVENTS)
+ m_originatingTouchPointTargets.clear();
+#endif
}
void EventHandler::selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults& result)
@@ -2714,21 +2717,21 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
// Increment the platform touch id by 1 to avoid storing a key of 0 in the hashmap.
unsigned touchPointTargetKey = point.id() + 1;
- EventTarget* touchTarget = 0;
+ RefPtr<EventTarget> touchTarget;
if (point.state() == PlatformTouchPoint::TouchPressed) {
m_originatingTouchPointTargets.set(touchPointTargetKey, target);
touchTarget = target;
} else if (point.state() == PlatformTouchPoint::TouchReleased || point.state() == PlatformTouchPoint::TouchCancelled) {
// The target should be the original target for this touch, so get it from the hashmap. As it's a release or cancel
// we also remove it from the map.
- touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey).get();
+ touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey);
} else
- touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey).get();
+ touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey);
- if (!touchTarget)
+ if (!touchTarget.get())
continue;
- RefPtr<Touch> touch = Touch::create(doc->frame(), touchTarget, point.id(),
+ RefPtr<Touch> touch = Touch::create(doc->frame(), touchTarget.get(), point.id(),
point.screenPos().x(), point.screenPos().y(),
adjustedPageX, adjustedPageY);
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.h b/src/3rdparty/webkit/WebCore/page/FrameView.h
index 7371d13..7119975 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.h
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.h
@@ -139,7 +139,7 @@ public:
virtual void scrollRectIntoViewRecursively(const IntRect&);
virtual void setScrollPosition(const IntPoint&);
- void scrollPositionChanged();
+ virtual void scrollPositionChanged();
String mediaType() const;
void setMediaType(const String&);
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
index 890eacd..d7eaf25 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
@@ -477,9 +477,8 @@ void scrollIntoView(Element* element)
// it is preferable to inflate |element|'s bounding rect a bit before
// scrolling it for accurate reason.
// Element's scrollIntoView method does not provide this flexibility.
- static const int fudgeFactor = 2;
IntRect bounds = element->getRect();
- bounds.inflate(fudgeFactor);
+ bounds.inflate(fudgeFactor());
element->renderer()->enclosingLayer()->scrollRectToVisible(bounds);
}
@@ -497,14 +496,14 @@ static void deflateIfOverlapped(IntRect& a, IntRect& b)
if (!a.intersects(b) || a.contains(b) || b.contains(a))
return;
- static const int fudgeFactor = -2;
+ int deflateFactor = -fudgeFactor();
// Avoid negative width or height values.
- if ((a.width() + 2 * fudgeFactor > 0) && (a.height() + 2 * fudgeFactor > 0))
- a.inflate(fudgeFactor);
+ if ((a.width() + 2 * deflateFactor > 0) && (a.height() + 2 * deflateFactor > 0))
+ a.inflate(deflateFactor);
- if ((b.width() + 2 * fudgeFactor > 0) && (b.height() + 2 * fudgeFactor > 0))
- b.inflate(fudgeFactor);
+ if ((b.width() + 2 * deflateFactor > 0) && (b.height() + 2 * deflateFactor > 0))
+ b.inflate(deflateFactor);
}
static bool checkNegativeCoordsForNode(Node* node, const IntRect& curRect)
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
index 90ff1cf..309b095 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
@@ -40,6 +40,11 @@ inline long long maxDistance()
return numeric_limits<long long>::max();
}
+inline unsigned int fudgeFactor()
+{
+ return 2;
+}
+
// Spatially speaking, two given elements in a web page can be:
// 1) Fully aligned: There is a full intersection between the rects, either
// vertically or horizontally.
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index 5c70eff..e50ab55 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -292,6 +292,7 @@ void ScrollView::valueChanged(Scrollbar* scrollbar)
if (scrollbarsSuppressed())
return;
+ scrollPositionChanged();
scrollContents(scrollDelta);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 9134ddf..118a310 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -302,6 +302,9 @@ private:
// Called to update the scrollbars to accurately reflect the state of the view.
void updateScrollbars(const IntSize& desiredOffset);
+ // Called when the scroll position within this view changes. FrameView overrides this to generate repaint invalidations.
+ virtual void scrollPositionChanged() {}
+
void platformInit();
void platformDestroy();
void platformAddChild(Widget*);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index edac268..0100b72 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -641,12 +641,12 @@ void GraphicsContext::fillRect(const FloatRect& rect)
}
}
-void GraphicsContext::fillRect(const FloatRect& rect, const Color& c, ColorSpace colorSpace)
+void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
- m_data->solidColor.setColor(c);
+ m_data->solidColor.setColor(color);
QPainter* p = m_data->p();
if (m_common->state.shadowColor.isValid())
drawBorderlessRectShadow(this, p, rect);
@@ -655,7 +655,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& c, ColorSpace
void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled() || !color.alpha())
+ if (paintingDisabled() || !color.isValid() || !color.alpha())
return;
Path path = Path::createRoundedRectangle(rect, topLeft, topRight, bottomLeft, bottomRight);
@@ -717,7 +717,7 @@ void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int of
*/
void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int /* width */, int /* offset */, const Color& color)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
unsigned rectCount = rects.size();
@@ -1141,8 +1141,9 @@ void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
+
QPainter* p = m_data->p();
QPen newPen(p->pen());
m_data->solidColor.setColor(color);
@@ -1172,8 +1173,9 @@ void GraphicsContext::setPlatformStrokeThickness(float thickness)
void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
+
m_data->solidColor.setColor(color);
m_data->p()->setBrush(m_data->solidColor);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
index ee4af7f..4b0c21f 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
@@ -69,12 +69,41 @@ Path& Path::operator=(const Path& other)
return *this;
}
+// Check whether a point is on the border
+bool isPointOnPathBorder(const QPolygonF& border, const QPointF& p)
+{
+ QPointF p1 = border.at(0);
+ QPointF p2;
+
+ for (int i = 1; i < border.size(); ++i) {
+ p2 = border.at(i);
+ // (x1<=x<=x2||x1=>x>=x2) && (y1<=y<=y2||y1=>y>=y2) && (y2-y1)(x-x1) == (y-y1)(x2-x1)
+ // In which, (y2-y1)(x-x1) == (y-y1)(x2-x1) is from (y2-y1)/(x2-x1) == (y-y1)/(x-x1)
+ // it want to check the slope between p1 and p2 is same with slope between p and p1,
+ // if so then the three points lie on the same line.
+ // In which, (x1<=x<=x2||x1=>x>=x2) && (y1<=y<=y2||y1=>y>=y2) want to make sure p is
+ // between p1 and p2, not outside.
+ if (((p.x() <= p1.x() && p.x() >= p2.x()) || (p.x() >= p1.x() && p.x() <= p2.x()))
+ && ((p.y() <= p1.y() && p.y() >= p2.y()) || (p.y() >= p1.y() && p.y() <= p2.y()))
+ && (p2.y() - p1.y()) * (p.x() - p1.x()) == (p.y() - p1.y()) * (p2.x() - p1.x())) {
+ return true;
+ }
+ p1 = p2;
+ }
+ return false;
+}
+
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
Qt::FillRule savedRule = m_path.fillRule();
const_cast<QPainterPath*>(&m_path)->setFillRule(rule == RULE_EVENODD ? Qt::OddEvenFill : Qt::WindingFill);
bool contains = m_path.contains(point);
+
+ if (!contains) {
+ // check whether the point is on the border
+ contains = isPointOnPathBorder(m_path.toFillPolygon(), point);
+ }
const_cast<QPainterPath*>(&m_path)->setFillRule(savedRule);
return contains;
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h b/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
index 0d98fcb..e355025 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
@@ -42,6 +42,13 @@ namespace WebCore {
if (currentLookups >= 10)
return; // do not launch more than 10 lookups at the same time
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 3)
+ currentLookups++;
+ QHostInfo::lookupHost(hostname, this, SLOT(lookedUp(QHostInfo)));
+#else
+ // This code is only needed for Qt versions that do not have
+ // the small Qt DNS cache yet.
+
QTime* entryTime = lookupCache.object(hostname);
if (entryTime && entryTime->elapsed() > 300*1000) {
// delete knowledge about lookup if it is already 300 seconds old
@@ -54,6 +61,7 @@ namespace WebCore {
currentLookups++;
QHostInfo::lookupHost(hostname, this, SLOT(lookedUp(QHostInfo)));
}
+#endif
}
void lookedUp(const QHostInfo&)
@@ -61,11 +69,14 @@ namespace WebCore {
// we do not cache the result, we throw it away.
// we currently rely on the OS to cache the results. If it does not do that
// then at least the ISP nameserver did it.
+ // Since Qt 4.6.3, Qt also has a small DNS cache.
currentLookups--;
}
protected:
+#if QT_VERSION < QT_VERSION_CHECK(4, 6, 3)
QCache<QString, QTime> lookupCache; // 100 entries
+#endif
int currentLookups;
};
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 403718f..abeb895 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -49,6 +49,7 @@
#define SIGNAL_CONN Qt::QueuedConnection
#endif
+static const int gMaxRecursionLimit = 10;
namespace WebCore {
@@ -139,6 +140,7 @@ QNetworkReplyHandler::QNetworkReplyHandler(ResourceHandle* handle, LoadMode load
, m_shouldFinish(false)
, m_shouldSendResponse(false)
, m_shouldForwardData(false)
+ , m_redirectionTries(gMaxRecursionLimit)
{
const ResourceRequest &r = m_resourceHandle->request();
@@ -336,9 +338,18 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
QUrl redirection = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
if (redirection.isValid()) {
+ QUrl newUrl = m_reply->url().resolved(redirection);
+
+ m_redirectionTries--;
+ if (m_redirectionTries == 0) { // 10 or more redirections to the same url is considered infinite recursion
+ ResourceError error(newUrl.host(), 400 /*bad request*/,
+ newUrl.toString(),
+ QCoreApplication::translate("QWebPage", "Redirection limit reached"));
+ client->didFail(m_resourceHandle, error);
+ return;
+ }
m_redirected = true;
- QUrl newUrl = m_reply->url().resolved(redirection);
ResourceRequest newRequest = m_resourceHandle->request();
newRequest.setURL(newUrl);
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h
index eb5ae3c..1abad4e 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h
@@ -82,6 +82,7 @@ private:
bool m_shouldFinish;
bool m_shouldSendResponse;
bool m_shouldForwardData;
+ int m_redirectionTries;
};
// Self destructing QIODevice for FormData
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp
index 04a2b1b..eb2d934 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp
@@ -114,7 +114,7 @@ static QStyleOptionSlider* styleOptionSlider(Scrollbar* scrollbar, QWidget* widg
opt.state |= QStyle::State_Horizontal;
opt.sliderValue = scrollbar->value();
opt.sliderPosition = opt.sliderValue;
- opt.pageStep = scrollbar->visibleSize();
+ opt.pageStep = scrollbar->pageStep();
opt.singleStep = scrollbar->lineStep();
opt.minimum = 0;
opt.maximum = qMax(0, scrollbar->maximum());
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
index 814f961..814f961 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
index 0c13e43..75a23d9 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
@@ -82,7 +82,6 @@ public:
, page(0)
, resizesToContents(false)
#if USE(ACCELERATED_COMPOSITING)
- , rootGraphicsLayer(0)
, shouldSync(false)
#endif
{
@@ -158,7 +157,7 @@ public:
enum { RootGraphicsLayerZValue, OverlayZValue };
#if USE(ACCELERATED_COMPOSITING)
- QGraphicsItem* rootGraphicsLayer;
+ QWeakPointer<QGraphicsObject> rootGraphicsLayer;
// we need to sync the layers if we get a special call from the WebCore
// compositor telling us to do so. We'll get that call from ChromeClientQt
bool shouldSync;
@@ -171,12 +170,11 @@ public:
QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate()
{
#if USE(ACCELERATED_COMPOSITING)
- if (rootGraphicsLayer) {
- // we don't need to delete the root graphics layer
- // The lifecycle is managed in GraphicsLayerQt.cpp
- rootGraphicsLayer->setParentItem(0);
- q->scene()->removeItem(rootGraphicsLayer);
- }
+ if (!rootGraphicsLayer)
+ return;
+ // we don't need to delete the root graphics layer. The lifecycle is managed in GraphicsLayerQt.cpp.
+ rootGraphicsLayer.data()->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer.data());
#endif
}
@@ -204,12 +202,12 @@ void QGraphicsWebViewPrivate::createOrDeleteOverlay()
void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer)
{
if (rootGraphicsLayer) {
- rootGraphicsLayer->setParentItem(0);
- q->scene()->removeItem(rootGraphicsLayer);
+ rootGraphicsLayer.data()->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer.data());
QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
}
- rootGraphicsLayer = layer;
+ rootGraphicsLayer = layer ? layer->toGraphicsObject() : 0;
if (layer) {
layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
@@ -231,7 +229,7 @@ void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
{
if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) {
const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition();
- rootGraphicsLayer->setPos(-scrollPosition);
+ rootGraphicsLayer.data()->setPos(-scrollPosition);
}
}
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index b8b50b7..e9ebce5 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -119,15 +119,6 @@
using namespace WebCore;
-void QWEBKIT_EXPORT qt_wrt_setViewMode(QWebPage* page, const QString& mode)
-{
- QWebPagePrivate::priv(page)->viewMode = mode;
- WebCore::Frame* frame = QWebFramePrivate::core(page->mainFrame());
- WebCore::FrameView* view = frame->view();
- frame->document()->updateStyleSelector();
- view->forceLayout();
-}
-
void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
{
PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false);
@@ -1361,6 +1352,26 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
ev->accept();
}
+void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
+{
+ if (event->propertyName() == "_q_viewMode") {
+ QString mode = q->property("_q_viewMode").toString();
+ if (mode != viewMode) {
+ viewMode = mode;
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ WebCore::FrameView* view = frame->view();
+ frame->document()->updateStyleSelector();
+ view->forceLayout();
+ }
+ } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") {
+ int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt();
+ q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize);
+ } else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") {
+ double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble();
+ q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
+ }
+}
+
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
{
WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();
@@ -2708,6 +2719,9 @@ bool QWebPage::event(QEvent *ev)
d->touchEvent(static_cast<QTouchEvent*>(ev));
break;
#endif
+ case QEvent::DynamicPropertyChange:
+ d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev));
+ break;
default:
return QObject::event(ev);
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
index 0712d0c..5350cd9 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
@@ -112,6 +112,8 @@ public:
void inputMethodEvent(QInputMethodEvent*);
+ void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*);
+
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
void handleClipboard(QEvent*, Qt::MouseButton);
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 555b14d..6ddaa2b 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,61 @@
+2010-05-09 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Crash in QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate when animation were used
+ https://bugs.webkit.org/show_bug.cgi?id=38574
+
+ The fix uses a QWeakPointer for rootGraphicsLayer, protecting from a crash in case the layer is deleted before the QGraphicsWebView.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::setRootGraphicsLayer):
+ (QGraphicsWebViewPrivate::updateCompositingScrollPosition):
+
+2010-05-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Expose HTMLTokenizer yielding parameters
+ https://bugs.webkit.org/show_bug.cgi?id=37023
+
+ Enables to set TimeDelay and ChunkSize for
+ HTMLTokenizer.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+
+2010-05-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage viewMode property
+ https://bugs.webkit.org/show_bug.cgi?id=38119
+
+ Rename the property from wrt_viewMode to _q_viewMode.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::viewModes):
+
+2010-04-28 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage viewMode property
+ https://bugs.webkit.org/show_bug.cgi?id=38119
+
+ Replacing method qt_wrt_setViewMode by wrt_viewMode property.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::wrt_viewModes):
+
2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
index a450f9e..910ba8f 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
@@ -642,7 +642,7 @@ EXPORTS
?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &)
?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ; void qt_drt_webinspector_show(class QWebPage *)
?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ; int qt_drt_workerThreadCount(void)
- ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ; void qt_wrt_setViewMode(class QWebPage *, class QString const &)
+ ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ABSENT ; void qt_wrt_setViewMode(class QWebPage *, class QString const &)
?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &)
?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const
?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &)
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
index 145fe0b..ca462d0 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -716,7 +716,7 @@ EXPORTS
_ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME
_ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME
_ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME
- _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME
+ _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT
_Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME
_Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME
_ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index f7eddd5..834a394 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -110,6 +110,8 @@ private slots:
void userAgentApplicationName();
void userAgentLocaleChange();
+ void viewModes();
+
void crashTests_LazyInitializationOfMainFrame();
void screenshot_data();
@@ -357,6 +359,21 @@ void tst_QWebPage::userStyleSheet()
QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png"));
}
+void tst_QWebPage::viewModes()
+{
+ m_view->setHtml("<body></body>");
+ m_page->setProperty("_q_viewMode", "minimized");
+
+ QVariant empty = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode)\")");
+ QVERIFY(empty.type() == QVariant::Bool && empty.toBool());
+
+ QVariant minimized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: minimized)\")");
+ QVERIFY(minimized.type() == QVariant::Bool && minimized.toBool());
+
+ QVariant maximized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: maximized)\")");
+ QVERIFY(maximized.type() == QVariant::Bool && !maximized.toBool());
+}
+
void tst_QWebPage::modified()
{
m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>blub"));