summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/wml
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-07-29 06:43:12 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-07-29 06:49:41 (GMT)
commitafce2170aae53a93e8fd3e8cbb24d8bb8148ec11 (patch)
treead4986fa9ffa4b9ae7bb79351a41c72ea038620c /src/3rdparty/webkit/WebCore/wml
parente06e82f843f671ecbb5d10a2262a5866f79da3d9 (diff)
downloadQt-afce2170aae53a93e8fd3e8cbb24d8bb8148ec11.zip
Qt-afce2170aae53a93e8fd3e8cbb24d8bb8148ec11.tar.gz
Qt-afce2170aae53a93e8fd3e8cbb24d8bb8148ec11.tar.bz2
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit-4.6-snapshot-29072009 ( 07fbaeddfade72be1d0d7e7f2b947e5d3c183f4a )
Changes in WebKit since the last update: ++ b/WebKit/qt/ChangeLog 2009-07-28 Simon Hausmann <simon.hausmann@nokia.com> Rubber-stamped by Ariya Hidayat. Fix compilation with the precompiled header. * WebKit_pch.h: Don't include JSDOMBinding.h and MathObject.h, as they include AtomicString.h. AtomicString.cpp needs to enable a #define before including AtomicString.h, which breaks if the PCH forces the inclusion beforehand. 2009-07-28 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Simon Hausmann. Added tests to ensure that scroll position can be changed programmatically, even when the scroll bar policy is set to off. * tests/qwebframe/tst_qwebframe.cpp: 2009-07-28 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. Fix a few compilation warnings in the QWebFrame tests. * tests/qwebframe/tst_qwebframe.cpp: 2009-07-28 Andre Pedralho <andre.pedralho@openbossa.org> Reviewed by Simon Hausmann. Fixed tst_QWebFrame::hasSetFocus test which was using an undefined resource. https://bugs.webkit.org/show_bug.cgi?id=27512 * tests/qwebframe/tst_qwebframe.cpp: 2009-07-28 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Make it possible to pass relative file names to QtLauncher. * QtLauncher/main.cpp: (MainWindow::MainWindow): 2009-07-27 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=27735 Give a helpful name to JSLock constructor argument * Api/qwebframe.cpp: (QWebFrame::addToJavaScriptWindowObject): 2009-07-27 Volker Hilsheimer <volker.hilsheimer@nokia.com> Reviewed by Simon Hausmann. QWebView's "enabled" parameter should default to true, as with QGraphicsView and QPainter. * Api/qwebview.cpp: Add reference to QPainter::renderHints(). * Api/qwebview.h: Add default for enabled argument. 2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> Reviewed by Simon Hausmann. More documentation cleanups in the QWebElement class overview. * Api/qwebelement.cpp: 2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> Reviewed by Simon Hausmann. Clean up documentation of QWebElement's findFirst and findAll functions, as well as their QWebFrame counterparts. * Api/qwebelement.cpp: * Api/qwebframe.cpp: 2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> Reviewed by Simon Hausmann. Various documentation cleanups * Fixed qdoc warnings * Hide QWebNetworkInterface from the class overview * Mention QWebElement in the module overview * More cleanups * Api/qwebframe.cpp: * Api/qwebnetworkinterface.cpp: * Api/qwebview.cpp: * docs/qtwebkit.qdoc: 2009-07-26 Kavindra Palaraja <kavindra.palaraja@nokia.com> Reviewed by Simon Hausmann. Added missing class diagram referenced from the docs, taken from the Qt documentation. * docs/qtwebkit.qdocconf: Register the image directory with qdoc. * docs/qwebview-diagram.png: Added. 2009-07-24 Antonio Gomes <antonio.gomes@openbossa.org> Reviewed by Adam Treat. As per discussion on IRC, changed originalUrl by requestedUrl. * Api/qwebframe.cpp: (QWebFrame::requestedUrl): * Api/qwebframe.h: * tests/qwebframe/tst_qwebframe.cpp: 2009-07-24 Andre Pedralho <andre.pedralho@openbossa.org> Reviewed by Adam Treat. Removed void QWebFrame::renderContents(...) and added the Q_PROPERTY clipRenderToViewport to control whether QWebFrame::render would call FrameView::paintContents rather than FrameView::paint and do not clip the frame content to viewport. * Api/qwebframe.cpp: (QWebFramePrivate::renderPrivate): (QWebFrame::clipRenderToViewport): (QWebFrame::setClipRenderToViewport): * Api/qwebframe.h: * Api/qwebframe_p.h: (QWebFramePrivate::QWebFramePrivate): * tests/qwebframe/tst_qwebframe.cpp: 2009-07-24 Antonio Gomes <antonio.gomes@openbossa.org> Reviewed by Simon Hausmann. [QT] Implement originalUrl getter method to the API https://bugs.webkit.org/show_bug.cgi?id=25867 * Api/qwebframe.cpp: (QWebFrame::originalUrl): * Api/qwebframe.h: * tests/qwebframe/qwebframe.qrc: * tests/qwebframe/test1.html: Added. * tests/qwebframe/test2.html: Added. * tests/qwebframe/tst_qwebframe.cpp: 2009-07-24 Kenneth Rohde Christiansen <kenneth@webkit.org> Build fix for Qt. Fix build issue introduced in 46344 ([Bug 22700] ApplicationCache should have size limit) Remove method only added to the Qt ChromeClient. * WebCoreSupport/ChromeClientQt.h: 2009-07-24 Andrei Popescu <andreip@google.com> Reviewed by Anders Carlsson. ApplicationCache should have size limit https://bugs.webkit.org/show_bug.cgi?id=22700 * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::reachedMaxAppCacheSize): Adds empty implementation of the reachedMaxAppCacheSize callback. * WebCoreSupport/ChromeClientQt.h: 2009-07-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Simon Hausmann. [Qt] Add simple proxy support for QtLauncher https://bugs.webkit.org/show_bug.cgi?id=27495 Picks up proxy settings from the http_proxy environment variable. * QtLauncher/QtLauncher.pro: Add QtNetwork dependency for all platforms. * QtLauncher/main.cpp: (MainWindow::MainWindow): 2009-07-23 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Holger Freyther. Added a testcase to verify that cached methods in the QOBject bindings remain alife even after garbage collection. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::protectBindingsRuntimeObjectsFromCollector): 2009-07-23 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> Reviewed by Simon Hausmann. Fixing two issues related to QtLauncher - MainWindow objects are not always freed after close - JavaScript window.close() sometimes crashes https://bugs.webkit.org/show_bug.cgi?id=27601 * QtLauncher/main.cpp: (MainWindow::MainWindow): (main): 2009-07-21 Volker Hilsheimer <volker.hilsheimer@nokia.com> Reviewed by Simon Hausmann. Various improvements to the API documentation. * Updated link to W3c Database spec * Formatting fixes, cleanups * Add missing \since 4.6 tags to QWebPage::frameAt * Extend QWebDatabase and QWebSecurityOrigin docs. * Api/qwebdatabase.cpp: * Api/qwebpage.cpp: * Api/qwebsecurityorigin.cpp: * Api/qwebview.cpp: 2009-07-21 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Rubber-stamped by Simon Hausmann. Remove preliminary-tag from QWebElement * Api/qwebelement.cpp: 2009-07-20 Kenneth Rohde Christiansen <kenneth@webkit.org> Reviewed by Eric Seidel. Fix Qt code to follow the WebKit Coding Style. * Api/qcookiejar.cpp: (QCookieJar::setCookieJar): (QCookieJar::cookieJar): * Api/qcookiejar.h: * Api/qwebdatabase.cpp: (QWebDatabase::QWebDatabase): (QWebDatabase::removeDatabase): * Api/qwebdatabase.h: * Api/qwebdatabase_p.h: * Api/qwebelement.h: * Api/qwebframe.cpp: (QWebFrame::title): (QWebFrame::print): * Api/qwebframe.h: * Api/qwebframe_p.h: * Api/qwebhistory.cpp: (QWebHistory::clear): * Api/qwebhistory.h: * Api/qwebhistory_p.h: * Api/qwebhistoryinterface.cpp: (gCleanupInterface): (QWebHistoryInterface::setDefaultInterface): (QWebHistoryInterface::defaultInterface): (QWebHistoryInterface::QWebHistoryInterface): * Api/qwebhistoryinterface.h: * Api/qwebnetworkinterface.cpp: (QWebNetworkManager::started): (QWebNetworkManager::finished): (QWebNetworkInterfacePrivate::parseDataUrl): (QWebNetworkInterface::addJob): (WebCoreHttp::onResponseHeaderReceived): (WebCoreHttp::onReadyRead): * Api/qwebnetworkinterface.h: * Api/qwebnetworkinterface_p.h: * Api/qwebpage.cpp: (QWebPagePrivate::editorCommandForWebActions): (QWebPagePrivate::createContextMenu): (QWebPagePrivate::focusInEvent): (QWebPage::fixedContentsSize): (QWebPage::setContentEditable): (QWebPage::swallowContextMenuEvent): (QWebPage::findText): * Api/qwebpage.h: * Api/qwebpage_p.h: * Api/qwebpluginfactory.h: * Api/qwebsecurityorigin.h: * Api/qwebsecurityorigin_p.h: * Api/qwebsettings.cpp: (QWebSettingsPrivate::QWebSettingsPrivate): (QWebSettingsPrivate::apply): (QWebSettings::globalSettings): (QWebSettings::QWebSettings): (QWebSettings::fontSize): (QWebSettings::setUserStyleSheetUrl): (QWebSettings::setDefaultTextEncoding): (QWebSettings::setIconDatabasePath): (QWebSettings::iconDatabasePath): (QWebSettings::iconForUrl): (QWebSettings::setWebGraphic): (QWebSettings::setFontFamily): (QWebSettings::fontFamily): (QWebSettings::testAttribute): (qt_websettings_setLocalStorageDatabasePath): * Api/qwebsettings.h: * Api/qwebview.cpp: (QWebView::setPage): (QWebView::event): * Api/qwebview.h: 2009-07-20 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Simon Hausmann. [Qt] Add test for loading webpages... Performance test for loading webpages. Wait for the loadFinished signal to be fired. This should include a non empty layout. * tests/benchmarks/loading/tst_loading.cpp: Added. (waitForSignal): (tst_Loading::init): (tst_Loading::cleanup): (tst_Loading::load_data): (tst_Loading::load): * tests/benchmarks/loading/tst_loading.pro: Added. * tests/tests.pro: 2009-07-20 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Simon Hausmann. [Qt] Add a test case for drawing a simple viewrect to a QPixmap * tests/benchmarks/painting/tst_painting.cpp: Added. (waitForSignal): (tst_Painting::init): (tst_Painting::cleanup): (tst_Painting::paint_data): (tst_Painting::paint): * tests/benchmarks/painting/tst_painting.pro: Added. * tests/tests.pro: 2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Holger Freyther. [Qt] Add an option for QtLauncher to build without QtUiTools dependency https://bugs.webkit.org/show_bug.cgi?id=27438 Based on Norbert Leser's work. * QtLauncher/main.cpp: (WebPage::createPlugin): 2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> Reviewed by Adam Treat. Coding style fixes. * Api/qcookiejar.cpp: (QCookieJarPrivate::QCookieJarPrivate): (qHash): (QCookieJar::cookieJar): * Api/qwebelement.cpp: (QWebElement::functions): (QWebElement::scriptableProperties): * Api/qwebframe.cpp: (QWebFrame::metaData): (QWebFrame::scrollBarValue): (QWebFrame::scroll): (QWebFrame::scrollPosition): (QWebFrame::print): * Api/qwebnetworkinterface.cpp: (decodePercentEncoding): (QWebNetworkRequestPrivate::init): (QWebNetworkRequestPrivate::setURL): (QWebNetworkRequest::QWebNetworkRequest): (QWebNetworkRequest::operator=): (QWebNetworkRequest::setUrl): (QWebNetworkRequest::setHttpHeader): (QWebNetworkRequest::httpHeaderField): (QWebNetworkRequest::setHttpHeaderField): (QWebNetworkRequest::setPostData): (QWebNetworkJob::setResponse): (QWebNetworkJob::frame): (QWebNetworkManager::add): (QWebNetworkManager::cancel): (QWebNetworkManager::started): (QWebNetworkManager::data): (QWebNetworkManager::finished): (QWebNetworkManager::addHttpJob): (QWebNetworkManager::cancelHttpJob): (QWebNetworkManager::httpConnectionClosed): (QWebNetworkInterfacePrivate::sendFileData): (QWebNetworkInterfacePrivate::parseDataUrl): (QWebNetworkManager::doWork): (QWebNetworkInterface::setDefaultInterface): (QWebNetworkInterface::defaultInterface): (QWebNetworkInterface::QWebNetworkInterface): (QWebNetworkInterface::addJob): (QWebNetworkInterface::cancelJob): (WebCoreHttp::WebCoreHttp): (WebCoreHttp::request): (WebCoreHttp::scheduleNextRequest): (WebCoreHttp::getConnection): (WebCoreHttp::onResponseHeaderReceived): (WebCoreHttp::onReadyRead): (WebCoreHttp::onRequestFinished): (WebCoreHttp::onAuthenticationRequired): (WebCoreHttp::onProxyAuthenticationRequired): * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): (QWebPagePrivate::mouseReleaseEvent): (QWebPagePrivate::inputMethodEvent): (QWebPagePrivate::shortcutOverrideEvent): (QWebPage::inputMethodQuery): (QWebPage::javaScriptPrompt): (QWebPage::updatePositionDependentActions): (QWebPage::userAgentForUrl): (QWebPagePrivate::_q_onLoadProgressChanged): (QWebPage::totalBytes): (QWebPage::bytesReceived): * Api/qwebsettings.cpp: (QWebSettings::iconForUrl): (QWebSettings::setObjectCacheCapacities): * Api/qwebview.cpp: (QWebView::paintEvent): (QWebView::changeEvent): 2009-07-17 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> Reviewed by Simon Hausmann. Overwrite the plugin directories for the DRT. Part of https://bugs.webkit.org/show_bug.cgi?id=27215 * Api/qwebpage.cpp: (qt_drt_overwritePluginDirectories): Only set the plugin directories to the ones in the QTWEBKIT_PLUGIN_PATH environment variable. 2009-07-16 Xiaomei Ji <xji@chromium.org> Reviewed by Dan Bernstein. This is the 2nd part of fixing "RTL: tooltip does not get its directionlity from its element's." https://bugs.webkit.org/show_bug.cgi?id=24187 Add one extra parameter to the callee of HitTestResult::title() due to the signature change. * Api/qwebframe.cpp: (QWebHitTestResultPrivate::QWebHitTestResultPrivate): Add direction as a parameter to the callee of HitTestResult::title(). * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::mouseDidMoveOverElement): Add direction as a parameter to the callee of HitTestResult::title(). 2009-07-16 Benjamin C Meyer <benjamin.meyer@torchmobile.com> Reviewed by Adam Treat. Add new action to qwebpage to reload without cache. * Api/qwebpage.cpp: (QWebPagePrivate::updateAction): (QWebPagePrivate::updateNavigationActions): (QWebPage::triggerAction): * Api/qwebpage.h: 2009-07-16 Xiaomei Ji <xji@chromium.org> Reviewed by Darin Adler. Fix tooltip does not get its directionality from its element's directionality. https://bugs.webkit.org/show_bug.cgi?id=24187 Per mitz's suggestion in comment #6, while getting the plain-text title, we also get the directionality of the title. How to handle the directionality is up to clients. Clients could ignore it, or use attribute or unicode control characters to display the title as what they want. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet). * WebCoreSupport/ChromeClientQt.h: Add directionality as 2nd parameter to setToolTip(). 2009-07-15 Yael Aharon <yael.aharon@nokia.com> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=27285 When the user clicks a link with a target attribute, the newly created window should be visible. Make new windows created in Qtlauncher visible. * QtLauncher/main.cpp: (WebPage::createWindow): 2009-07-14 Adam Treat <adam.treat@torchmobile.com> Reviewed by Zack Rusin. https://bugs.webkit.org/show_bug.cgi?id=26983 The default constructed values for QSize and WebCore::IntSize are different. The former produces an invalid size whereas the latter produces a size of zero. This was causing a layout to be triggered when constructing a view and an assert to be hit. This patch fixes the crash by taking care not to cause an unnecessary layout triggered by ScrollView::setFixedLayoutSize. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
Diffstat (limited to 'src/3rdparty/webkit/WebCore/wml')
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp37
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLCardElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLDoElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLElement.h2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h2
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp29
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLPageState.h4
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h2
17 files changed, 82 insertions, 46 deletions
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
index 5fbeac6..9c84193 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
@@ -150,7 +150,7 @@ void WMLAElement::defaultEventHandler(Event* event)
}
if (!event->defaultPrevented() && document()->frame()) {
- KURL url = document()->completeURL(parseURL(getAttribute(HTMLNames::hrefAttr)));
+ KURL url = document()->completeURL(deprecatedParseURL(getAttribute(HTMLNames::hrefAttr)));
document()->frame()->loader()->urlSelected(url, target(), event, false, false, true);
}
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp
index 0f49bd7..0b73f52 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp
@@ -28,6 +28,7 @@
#include "HTMLNames.h"
#include "MappedAttribute.h"
#include "NodeList.h"
+#include "Page.h"
#include "RenderStyle.h"
#include "WMLDocument.h"
#include "WMLDoElement.h"
@@ -131,20 +132,21 @@ void WMLCardElement::handleIntrinsicEventIfNeeded()
FrameLoader* loader = frame->loader();
if (!loader)
return;
-
- int currentHistoryLength = loader->getHistoryLength();
- int lastHistoryLength = pageState->historyLength();
// Calculate the entry method of current card
WMLIntrinsicEventType eventType = WMLIntrinsicEventUnknown;
- if (lastHistoryLength > currentHistoryLength)
+
+ switch (loader->loadType()) {
+ case FrameLoadTypeReload:
+ break;
+ case FrameLoadTypeBack:
eventType = WMLIntrinsicEventOnEnterBackward;
- else if (lastHistoryLength < currentHistoryLength)
+ break;
+ default:
eventType = WMLIntrinsicEventOnEnterForward;
+ break;
+ }
- // Synchronize history length with WMLPageState
- pageState->setHistoryLength(currentHistoryLength);
-
// Figure out target event handler
WMLIntrinsicEventHandler* eventHandler = this->eventHandler();
bool hasIntrinsicEvent = false;
@@ -204,11 +206,6 @@ void WMLCardElement::handleDeckLevelTaskOverridesIfNeeded()
(*it)->setActive(!cardDoElementNames.contains((*it)->name()));
}
-String WMLCardElement::title() const
-{
- return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::titleAttr));
-}
-
void WMLCardElement::parseMappedAttribute(MappedAttribute* attr)
{
WMLIntrinsicEventType eventType = WMLIntrinsicEventUnknown;
@@ -241,13 +238,25 @@ void WMLCardElement::parseMappedAttribute(MappedAttribute* attr)
void WMLCardElement::insertedIntoDocument()
{
WMLElement::insertedIntoDocument();
+ Document* document = this->document();
// The first card inserted into a document, is visible by default.
if (!m_isVisible) {
- RefPtr<NodeList> nodeList = document()->getElementsByTagName("card");
+ RefPtr<NodeList> nodeList = document->getElementsByTagName("card");
if (nodeList && nodeList->length() == 1 && nodeList->item(0) == this)
m_isVisible = true;
}
+
+ // For the WML layout tests we embed WML content in a XHTML document. Navigating to different cards
+ // within the same deck has a different behaviour in HTML than in WML. HTML wants to "scroll to anchor"
+ // (see FrameLoader) but WML wants a reload. Notify the root document of the layout test that we want
+ // to mimic WML behaviour. This is rather tricky, but has been tested extensively. Usually it's not possible
+ // at all to embed WML in HTML, it's not designed that way, we're just "abusing" it for dynamically created layout tests.
+ if (document->page() && document->page()->mainFrame()) {
+ Document* rootDocument = document->page()->mainFrame()->document();
+ if (rootDocument && rootDocument != document)
+ rootDocument->setContainsWMLContent(true);
+ }
}
RenderObject* WMLCardElement::createRenderer(RenderArena* arena, RenderStyle* style)
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h
index e033e3d..972961e 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLCardElement.h
@@ -47,7 +47,6 @@ public:
void handleIntrinsicEventIfNeeded();
void handleDeckLevelTaskOverridesIfNeeded();
- virtual String title() const;
virtual void parseMappedAttribute(MappedAttribute*);
virtual void insertedIntoDocument();
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp
index f553fff..830009e 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp
@@ -122,6 +122,17 @@ void WMLDoElement::insertedIntoDocument()
eventHandlingElement->registerDoElement(this, document());
}
+void WMLDoElement::attach()
+{
+ WMLElement::attach();
+
+ // The call to updateFromElement() needs to go after the call through
+ // to the base class's attach() because that can sometimes do a close
+ // on the renderer.
+ if (renderer())
+ renderer()->updateFromElement();
+}
+
RenderObject* WMLDoElement::createRenderer(RenderArena* arena, RenderStyle* style)
{
if (!m_isActive || m_isOptional || m_isNoop)
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h
index 51e37c4..eff2589 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLDoElement.h
@@ -36,6 +36,7 @@ public:
virtual void parseMappedAttribute(MappedAttribute*);
virtual void insertedIntoDocument();
+ virtual void attach();
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void recalcStyle(StyleChange);
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp
index f59a3a1..a9e4b5d 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLElement.cpp
@@ -77,6 +77,11 @@ void WMLElement::parseMappedAttribute(MappedAttribute* attr)
}
}
+String WMLElement::title() const
+{
+ return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::titleAttr));
+}
+
bool WMLElement::rendererIsNeeded(RenderStyle* style)
{
return document()->documentElement() == this || style->display() != NONE;
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLElement.h b/src/3rdparty/webkit/WebCore/wml/WMLElement.h
index 04e28d0..46b0ff4 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLElement.h
@@ -37,6 +37,8 @@ public:
virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
virtual void parseMappedAttribute(MappedAttribute*);
+ virtual String title() const;
+
virtual bool rendererIsNeeded(RenderStyle*);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp
index 7293e66..c1bf283 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -102,9 +102,6 @@ void WMLGoElement::executeTask(Event*)
// FIXME: 'newcontext' handling not implemented for external cards
bool inSameDeck = doc->url().path() == url.path();
if (inSameDeck && url.hasRef()) {
- // Force frame loader to load the URL with fragment identifier
- loader->setForceReloadWmlDeck(true);
-
if (WMLCardElement* card = WMLCardElement::findNamedCardInDocument(doc, url.ref())) {
if (card->isNewContext())
pageState->reset();
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp b/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp
index c77b511..3c40215 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLImageLoader.cpp
@@ -49,7 +49,7 @@ void WMLImageLoader::dispatchLoadEvent()
String WMLImageLoader::sourceURI(const AtomicString& attr) const
{
- return parseURL(KURL(element()->baseURI(), attr).string());
+ return deprecatedParseURL(KURL(element()->baseURI(), attr).string());
}
void WMLImageLoader::notifyFinished(CachedResource* image)
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp
index 1ba1c18..7c69ddc 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp
@@ -53,7 +53,12 @@ void WMLNoopElement::insertedIntoDocument()
if (parent->hasTagName(doTag)) {
WMLDoElement* doElement = static_cast<WMLDoElement*>(parent);
doElement->setNoop(true);
- doElement->setNeedsStyleRecalc();
+
+ if (doElement->attached())
+ doElement->detach();
+
+ ASSERT(!doElement->attached());
+ doElement->attach();
} else if (parent->hasTagName(anchorTag))
reportWMLError(document(), WMLErrorForbiddenTaskInAnchorElement);
}
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp
index 3614c6c..9a7ea88 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.cpp
@@ -44,11 +44,6 @@ WMLOptGroupElement::~WMLOptGroupElement()
{
}
-String WMLOptGroupElement::title() const
-{
- return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::titleAttr));
-}
-
const AtomicString& WMLOptGroupElement::formControlType() const
{
DEFINE_STATIC_LOCAL(const AtomicString, optgroup, ("optgroup"));
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h
index 0460056..e1b9217 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLOptGroupElement.h
@@ -32,8 +32,6 @@ public:
WMLOptGroupElement(const QualifiedName& tagName, Document*);
virtual ~WMLOptGroupElement();
- String title() const;
-
virtual const AtomicString& formControlType() const;
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp
index 1087134..60d3de6 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLOptionElement.cpp
@@ -125,7 +125,15 @@ bool WMLOptionElement::selected() const
void WMLOptionElement::setSelectedState(bool selected)
{
+ if (this->selected() == selected)
+ return;
+
OptionElement::setSelectedState(m_data, this, selected);
+
+ if (WMLSelectElement* select = ownerSelectElement(this)) {
+ if (select->multiple() || selected)
+ handleIntrinsicEventIfNeeded();
+ }
}
String WMLOptionElement::value() const
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp b/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp
index 1afc0c9..6b6a763 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp
@@ -1,6 +1,5 @@
/*
- * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- *
+ * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2004-2007 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -25,6 +24,7 @@
#if ENABLE(WML)
#include "WMLPageState.h"
+#include "CString.h"
#include "HistoryItem.h"
#include "KURL.h"
#include "Page.h"
@@ -33,7 +33,6 @@ namespace WebCore {
WMLPageState::WMLPageState(Page* page)
: m_page(page)
- , m_historyLength(0)
, m_activeCard(0)
, m_hasDeckAccess(false)
{
@@ -44,17 +43,27 @@ WMLPageState::~WMLPageState()
m_variables.clear();
}
+#ifndef NDEBUG
+// Debugging helper for use within gdb
+void WMLPageState::dump()
+{
+ WMLVariableMap::iterator it = m_variables.begin();
+ WMLVariableMap::iterator end = m_variables.end();
+
+ fprintf(stderr, "Dumping WMLPageState (this=%p) associated with Page (page=%p)...\n", this, m_page);
+ for (; it != end; ++it)
+ fprintf(stderr, "\t-> name: '%s'\tvalue: '%s'\n", (*it).first.latin1().data(), (*it).second.latin1().data());
+}
+#endif
+
void WMLPageState::reset()
{
- // remove all the variables in the current browser context
+ // Remove all the variables
m_variables.clear();
- // clear the navigation history state
- if (m_page)
- m_page->backForwardList()->clearWmlPageHistory();
-
- // reset implementation-specfic state if UA has
- m_historyLength = 0;
+ // Clear the navigation history state
+ if (BackForwardList* list = m_page ? m_page->backForwardList() : 0)
+ list->clearWMLPageHistory();
}
bool WMLPageState::setNeedCheckDeckAccess(bool need)
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLPageState.h b/src/3rdparty/webkit/WebCore/wml/WMLPageState.h
index 6a1d960..72bc72c 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLPageState.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLPageState.h
@@ -39,6 +39,10 @@ public:
WMLPageState(Page*);
virtual ~WMLPageState();
+#ifndef NDEBUG
+ void dump();
+#endif
+
// reset the browser context when 'newcontext' attribute
// of card element is performed as part of go task
void reset();
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp
index 5e70098..2d03a3f 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.cpp
@@ -46,11 +46,6 @@ WMLSelectElement::~WMLSelectElement()
{
}
-String WMLSelectElement::title() const
-{
- return substituteVariableReferences(getAttribute(HTMLNames::titleAttr), document());
-}
-
const AtomicString& WMLSelectElement::formControlName() const
{
AtomicString name = this->name();
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h
index 6cd3bcb..412a950 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h
@@ -32,8 +32,6 @@ public:
WMLSelectElement(const QualifiedName&, Document*);
virtual ~WMLSelectElement();
- virtual String title() const;
-
virtual const AtomicString& formControlName() const;
virtual const AtomicString& formControlType() const;