From a94275402997c11dd2e778633dacf4b7e630a35d Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 22 Oct 2010 13:02:20 +0100 Subject: Merge WebKit at r70209: Initial merge by Git Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e --- WebCore/wml/WMLAElement.cpp | 3 ++- WebCore/wml/WMLDoElement.cpp | 4 ++-- WebCore/wml/WMLImageLoader.cpp | 4 ++-- WebCore/wml/WMLNoopElement.cpp | 2 +- WebCore/wml/WMLOptGroupElement.cpp | 42 +------------------------------------ WebCore/wml/WMLOptGroupElement.h | 6 ------ WebCore/wml/WMLOptionElement.cpp | 2 +- WebCore/wml/WMLPostfieldElement.cpp | 4 ++-- WebCore/wml/WMLSetvarElement.cpp | 4 ++-- WebCore/wml/WMLTableElement.cpp | 2 +- WebCore/wml/WMLTaskElement.cpp | 4 ++-- WebCore/wml/WMLTimerElement.cpp | 4 ++-- 12 files changed, 18 insertions(+), 63 deletions(-) (limited to 'WebCore/wml') diff --git a/WebCore/wml/WMLAElement.cpp b/WebCore/wml/WMLAElement.cpp index c60db5e..00067fe 100644 --- a/WebCore/wml/WMLAElement.cpp +++ b/WebCore/wml/WMLAElement.cpp @@ -37,6 +37,7 @@ #include "FrameLoader.h" #include "HTMLAnchorElement.h" #include "HTMLNames.h" +#include "HTMLParserIdioms.h" #include "KeyboardEvent.h" #include "MouseEvent.h" #include "RenderBox.h" @@ -128,7 +129,7 @@ void WMLAElement::defaultEventHandler(Event* event) } if (isLinkClick(event)) { - handleLinkClick(event, document(), deprecatedParseURL(getAttribute(HTMLNames::hrefAttr)), target(), event); + handleLinkClick(event, document(), stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames::hrefAttr)), target(), event); return; } } diff --git a/WebCore/wml/WMLDoElement.cpp b/WebCore/wml/WMLDoElement.cpp index 9398aa0..17a6d10 100644 --- a/WebCore/wml/WMLDoElement.cpp +++ b/WebCore/wml/WMLDoElement.cpp @@ -120,7 +120,7 @@ void WMLDoElement::insertedIntoDocument() if (!hasAttribute(HTMLNames::nameAttr)) m_name = m_type; - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (!parent || !parent->isWMLElement()) return; @@ -130,7 +130,7 @@ void WMLDoElement::insertedIntoDocument() void WMLDoElement::removedFromDocument() { - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (parent && parent->isWMLElement()) { if (WMLEventHandlingElement* eventHandlingElement = toWMLEventHandlingElement(static_cast(parent))) diff --git a/WebCore/wml/WMLImageLoader.cpp b/WebCore/wml/WMLImageLoader.cpp index 1f1054f..1e4c96b 100644 --- a/WebCore/wml/WMLImageLoader.cpp +++ b/WebCore/wml/WMLImageLoader.cpp @@ -24,8 +24,8 @@ #include "WMLImageLoader.h" #include "CachedImage.h" -#include "CSSHelper.h" #include "HTMLNames.h" +#include "HTMLParserIdioms.h" #include "WMLImageElement.h" #include "WMLNames.h" @@ -49,7 +49,7 @@ void WMLImageLoader::dispatchLoadEvent() String WMLImageLoader::sourceURI(const AtomicString& attr) const { - return KURL(element()->baseURI(), deprecatedParseURL(attr)); + return KURL(element()->baseURI(), stripLeadingAndTrailingHTMLSpaces(attr)); } void WMLImageLoader::notifyFinished(CachedResource* image) diff --git a/WebCore/wml/WMLNoopElement.cpp b/WebCore/wml/WMLNoopElement.cpp index 3afddeb..fbd3788 100644 --- a/WebCore/wml/WMLNoopElement.cpp +++ b/WebCore/wml/WMLNoopElement.cpp @@ -49,7 +49,7 @@ void WMLNoopElement::insertedIntoDocument() { WMLElement::insertedIntoDocument(); - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (!parent || !parent->isWMLElement()) return; diff --git a/WebCore/wml/WMLOptGroupElement.cpp b/WebCore/wml/WMLOptGroupElement.cpp index 7c59a7e..3e15c7b 100644 --- a/WebCore/wml/WMLOptGroupElement.cpp +++ b/WebCore/wml/WMLOptGroupElement.cpp @@ -55,49 +55,9 @@ const AtomicString& WMLOptGroupElement::formControlType() const return optgroup; } -bool WMLOptGroupElement::insertBefore(PassRefPtr newChild, Node* refChild, ExceptionCode& ec, bool shouldLazyAttach) -{ - bool result = WMLFormControlElement::insertBefore(newChild, refChild, ec, shouldLazyAttach); - if (result) - recalcSelectOptions(); - return result; -} - -bool WMLOptGroupElement::replaceChild(PassRefPtr newChild, Node* oldChild, ExceptionCode& ec, bool shouldLazyAttach) -{ - bool result = WMLFormControlElement::replaceChild(newChild, oldChild, ec, shouldLazyAttach); - if (result) - recalcSelectOptions(); - return result; -} - -bool WMLOptGroupElement::removeChild(Node* oldChild, ExceptionCode& ec) -{ - bool result = WMLFormControlElement::removeChild(oldChild, ec); - if (result) - recalcSelectOptions(); - return result; -} - -bool WMLOptGroupElement::appendChild(PassRefPtr newChild, ExceptionCode& ec, bool shouldLazyAttach) -{ - bool result = WMLFormControlElement::appendChild(newChild, ec, shouldLazyAttach); - if (result) - recalcSelectOptions(); - return result; -} - -bool WMLOptGroupElement::removeChildren() -{ - bool result = WMLFormControlElement::removeChildren(); - if (result) - recalcSelectOptions(); - return result; -} - static inline WMLSelectElement* ownerSelectElement(Element* element) { - Node* select = element->parentNode(); + ContainerNode* select = element->parentNode(); while (select && !select->hasTagName(selectTag)) select = select->parentNode(); diff --git a/WebCore/wml/WMLOptGroupElement.h b/WebCore/wml/WMLOptGroupElement.h index 3cfa47d..c49749e 100644 --- a/WebCore/wml/WMLOptGroupElement.h +++ b/WebCore/wml/WMLOptGroupElement.h @@ -38,12 +38,6 @@ public: virtual bool rendererIsNeeded(RenderStyle*) { return false; } - virtual bool insertBefore(PassRefPtr newChild, Node* refChild, ExceptionCode&, bool shouldLazyAttach = false); - virtual bool replaceChild(PassRefPtr newChild, Node* oldChild, ExceptionCode&, bool shouldLazyAttach = false); - virtual bool removeChild(Node* child, ExceptionCode&); - virtual bool appendChild(PassRefPtr newChild, ExceptionCode&, bool shouldLazyAttach = false); - virtual bool removeChildren(); - virtual void accessKeyAction(bool sendToAnyElement); virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); virtual void parseMappedAttribute(Attribute*); diff --git a/WebCore/wml/WMLOptionElement.cpp b/WebCore/wml/WMLOptionElement.cpp index bc97215..6c8aa74 100644 --- a/WebCore/wml/WMLOptionElement.cpp +++ b/WebCore/wml/WMLOptionElement.cpp @@ -56,7 +56,7 @@ const AtomicString& WMLOptionElement::formControlType() const static inline WMLSelectElement* ownerSelectElement(Element* element) { - Node* select = element->parentNode(); + ContainerNode* select = element->parentNode(); while (select && !select->hasTagName(selectTag)) select = select->parentNode(); diff --git a/WebCore/wml/WMLPostfieldElement.cpp b/WebCore/wml/WMLPostfieldElement.cpp index b168dbb..25ce05a 100644 --- a/WebCore/wml/WMLPostfieldElement.cpp +++ b/WebCore/wml/WMLPostfieldElement.cpp @@ -48,14 +48,14 @@ void WMLPostfieldElement::insertedIntoDocument() { WMLElement::insertedIntoDocument(); - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (parent && parent->hasTagName(goTag)) static_cast(parent)->registerPostfieldElement(this); } void WMLPostfieldElement::removedFromDocument() { - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (parent && parent->hasTagName(goTag)) static_cast(parent)->deregisterPostfieldElement(this); diff --git a/WebCore/wml/WMLSetvarElement.cpp b/WebCore/wml/WMLSetvarElement.cpp index a0fc3e8..0514602 100644 --- a/WebCore/wml/WMLSetvarElement.cpp +++ b/WebCore/wml/WMLSetvarElement.cpp @@ -60,7 +60,7 @@ void WMLSetvarElement::insertedIntoDocument() { WMLElement::insertedIntoDocument(); - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (!parent || !parent->isWMLElement()) return; @@ -70,7 +70,7 @@ void WMLSetvarElement::insertedIntoDocument() void WMLSetvarElement::removedFromDocument() { - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (parent && parent->isWMLElement()) { if (static_cast(parent)->isWMLTaskElement()) static_cast(parent)->deregisterVariableSetter(this); diff --git a/WebCore/wml/WMLTableElement.cpp b/WebCore/wml/WMLTableElement.cpp index eb22503..ed3522d 100644 --- a/WebCore/wml/WMLTableElement.cpp +++ b/WebCore/wml/WMLTableElement.cpp @@ -231,7 +231,7 @@ void WMLTableElement::alignCells(Vector& columnElements, WMLElement bool rtl = false; if (RenderObject* renderer = rowElement->renderer()) { if (RenderStyle* style = renderer->style()) - rtl = style->direction() == RTL; + rtl = !style->isLeftToRightDirection(); } rowElement->setAttribute(HTMLNames::alignAttr, rtl ? "right" : "left"); diff --git a/WebCore/wml/WMLTaskElement.cpp b/WebCore/wml/WMLTaskElement.cpp index d49a03e..3d1d636 100644 --- a/WebCore/wml/WMLTaskElement.cpp +++ b/WebCore/wml/WMLTaskElement.cpp @@ -47,7 +47,7 @@ void WMLTaskElement::insertedIntoDocument() { WMLElement::insertedIntoDocument(); - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (!parent || !parent->isWMLElement()) return; @@ -61,7 +61,7 @@ void WMLTaskElement::insertedIntoDocument() void WMLTaskElement::removedFromDocument() { - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (parent && parent->isWMLElement()) { if (parent->hasTagName(anchorTag)) static_cast(parent)->deregisterTask(this); diff --git a/WebCore/wml/WMLTimerElement.cpp b/WebCore/wml/WMLTimerElement.cpp index feac38b..dd6c4aa 100644 --- a/WebCore/wml/WMLTimerElement.cpp +++ b/WebCore/wml/WMLTimerElement.cpp @@ -63,7 +63,7 @@ void WMLTimerElement::insertedIntoDocument() if (value().toInt() <= 0) return; - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (!parent || !parent->isWMLElement()) return; @@ -75,7 +75,7 @@ void WMLTimerElement::insertedIntoDocument() void WMLTimerElement::removedFromDocument() { - Node* parent = parentNode(); + ContainerNode* parent = parentNode(); if (parent && parent->isWMLElement() && parent->hasTagName(cardTag)) { m_card->setIntrinsicEventTimer(0); m_card = 0; -- cgit v1.1