http://trac.webkit.org/changeset/145462
https://bugs.webkit.org/show_bug.cgi?id=112097
Compilation failure in PluginView.cpp (Requested by jamesr_ on
#webkit).
Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-11
Source/WebCore:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::canSetFocusAttribute):
* bindings/objc/DOM.mm:
(kitClass):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* editing/ApplyStyleCommand.cpp:
(WebCore::isLegacyAppleStyleSpan):
(WebCore::isEmptyFontTag):
(WebCore::ApplyStyleCommand::applyBlockStyle):
* editing/FormatBlockCommand.cpp:
(WebCore::isElementForFormatBlock):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isMailPasteAsQuotationNode):
(WebCore::haveSameTagName):
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::suggestions):
* html/HTMLTableRowsCollection.cpp:
(WebCore::isInHead):
(WebCore::isInBody):
(WebCore::isInFoot):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::innerPatchNode):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
* plugins/PluginView.cpp:
(WebCore::PluginView::getValue):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::name):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::mediaElement):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::autosaveName):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textFormControlElement):
(WebCore::updateUserModifyProperty):
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::updateFromElement):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::endElementNs):
Source/WebKit/chromium:
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::focusedNodeChanged):
* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/DOMUtilitiesPrivate.cpp:
(WebCore::toHTMLElement):
* src/WebSearchableFormData.cpp:
(HTMLNames::IsSelectInDefaultState):
Source/WebKit/mac:
* WebView/WebView.mm:
(-[WebView _enterFullscreenForNode:WebCore::]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145471
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-03-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r145462.
+ http://trac.webkit.org/changeset/145462
+ https://bugs.webkit.org/show_bug.cgi?id=112097
+
+ Compilation failure in PluginView.cpp (Requested by jamesr_ on
+ #webkit).
+
+ * accessibility/AccessibilityMenuList.cpp:
+ (WebCore::AccessibilityMenuList::canSetFocusAttribute):
+ * bindings/objc/DOM.mm:
+ (kitClass):
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::prepareListenerObject):
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::checkOne):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::isLegacyAppleStyleSpan):
+ (WebCore::isEmptyFontTag):
+ (WebCore::ApplyStyleCommand::applyBlockStyle):
+ * editing/FormatBlockCommand.cpp:
+ (WebCore::isElementForFormatBlock):
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::isMailPasteAsQuotationNode):
+ (WebCore::haveSameTagName):
+ (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
+ (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
+ * history/CachedPage.cpp:
+ (WebCore::CachedPage::restore):
+ * html/ColorInputType.cpp:
+ (WebCore::ColorInputType::suggestions):
+ * html/HTMLTableRowsCollection.cpp:
+ (WebCore::isInHead):
+ (WebCore::isInBody):
+ (WebCore::isInFoot):
+ * inspector/DOMPatchSupport.cpp:
+ (WebCore::DOMPatchSupport::innerPatchNode):
+ * page/PageSerializer.cpp:
+ (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::getValue):
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::paintContents):
+ (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::name):
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::mediaElement):
+ * rendering/RenderSearchField.cpp:
+ (WebCore::RenderSearchField::autosaveName):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::textFormControlElement):
+ (WebCore::updateUserModifyProperty):
+ * rendering/mathml/RenderMathMLFenced.cpp:
+ (WebCore::RenderMathMLFenced::updateFromElement):
+ * rendering/mathml/RenderMathMLFraction.cpp:
+ (WebCore::RenderMathMLFraction::updateFromElement):
+ * xml/parser/XMLDocumentParserLibxml2.cpp:
+ (WebCore::XMLDocumentParser::XMLDocumentParser):
+ (WebCore::XMLDocumentParser::endElementNs):
+
2013-03-11 Alexey Proskuryakov <ap@apple.com>
Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository
if (!node())
return false;
- return toElement(node())->isEnabledFormControl();
+ return static_cast<Element*>(node())->isEnabledFormControl();
}
void AccessibilityMenuList::didUpdateActiveOption(int optionIndex)
switch (impl->nodeType()) {
case WebCore::Node::ELEMENT_NODE:
if (impl->isHTMLElement())
- return WebCore::elementClass(toHTMLElement(impl)->tagQName(), [DOMHTMLElement class]);
+ return WebCore::elementClass(static_cast<WebCore::HTMLElement*>(impl)->tagQName(), [DOMHTMLElement class]);
#if ENABLE(SVG_DOM_OBJC_BINDINGS)
if (impl->isSVGElement())
return WebCore::elementClass(static_cast<WebCore::SVGElement*>(impl)->tagQName(), [DOMSVGElement class]);
HTMLFormElement* formElement = 0;
if (m_node && m_node->isHTMLElement())
- formElement = toHTMLElement(m_node)->form();
+ formElement = static_cast<HTMLElement*>(m_node)->form();
v8::Handle<v8::Object> nodeWrapper = toObjectWrapper<Node>(m_node, isolate);
v8::Handle<v8::Object> formWrapper = toObjectWrapper<HTMLFormElement>(formElement, isolate);
break;
#if ENABLE(PROGRESS_ELEMENT)
if (element->hasTagName(progressTag)) {
- HTMLProgressElement* progress = toHTMLProgressElement(element);
+ HTMLProgressElement* progress = static_cast<HTMLProgressElement*>(element);
if (progress && !progress->isDeterminate())
return true;
break;
if (!node || !node->isHTMLElement())
return false;
- const HTMLElement* elem = toHTMLElement(node);
+ const HTMLElement* elem = static_cast<const HTMLElement*>(node);
return elem->hasLocalName(spanAttr) && elem->getAttribute(classAttr) == styleSpanClassString();
}
if (!element || !element->hasTagName(fontTag))
return false;
- return hasNoAttributeOrOnlyStyleAttribute(toHTMLElement(element), shouldStyleAttributeBeEmpty);
+ return hasNoAttributeOrOnlyStyleAttribute(static_cast<const HTMLElement*>(element), shouldStyleAttributeBeEmpty);
}
static PassRefPtr<Element> createFontElement(Document* document)
nextParagraphStart = endOfParagraph(paragraphStart).next();
}
- startRange = TextIterator::rangeFromLocationAndLength(toElement(scope), startIndex, 0, true);
- endRange = TextIterator::rangeFromLocationAndLength(toElement(scope), endIndex, 0, true);
+ startRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), startIndex, 0, true);
+ endRange = TextIterator::rangeFromLocationAndLength(static_cast<Element*>(scope), endIndex, 0, true);
if (startRange && endRange)
updateStartEnd(startRange->startPosition(), endRange->startPosition());
}
static bool isElementForFormatBlock(const QualifiedName& tagName);
static inline bool isElementForFormatBlock(Node* node)
{
- return node->isElementNode() && isElementForFormatBlock(toElement(node)->tagQName());
+ return node->isElementNode() && isElementForFormatBlock(static_cast<Element*>(node)->tagQName());
}
FormatBlockCommand::FormatBlockCommand(Document* document, const QualifiedName& tagName)
static bool isMailPasteAsQuotationNode(const Node* node)
{
- return node && node->hasTagName(blockquoteTag) && node->isElementNode() && toElement(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
+ return node && node->hasTagName(blockquoteTag) && node->isElementNode() && static_cast<const Element*>(node)->getAttribute(classAttr) == ApplePasteAsQuotation;
}
static bool isHeaderElement(const Node* a)
static bool haveSameTagName(Node* a, Node* b)
{
- return a && b && a->isElementNode() && b->isElementNode() && toElement(a)->tagName() == static_cast<Element*>(b)->tagName();
+ return a && b && a->isElementNode() && b->isElementNode() && static_cast<Element*>(a)->tagName() == static_cast<Element*>(b)->tagName();
}
bool ReplaceSelectionCommand::shouldMerge(const VisiblePosition& source, const VisiblePosition& destination)
if (inlineStyle) {
if (element->isHTMLElement()) {
Vector<QualifiedName> attributes;
- HTMLElement* htmlElement = toHTMLElement(element);
+ HTMLElement* htmlElement = static_cast<HTMLElement*>(element);
if (newInlineStyle->conflictsWithImplicitStyleOfElement(htmlElement)) {
// e.g. <b style="font-weight: normal;"> is converted to <span style="font-weight: normal;">
if (!node->isHTMLElement())
continue;
- if (isProhibitedParagraphChild(toHTMLElement(node.get())->localName())) {
- if (HTMLElement* paragraphElement = toHTMLElement(enclosingNodeWithTag(positionInParentBeforeNode(node.get()), pTag)))
+ if (isProhibitedParagraphChild(static_cast<const HTMLElement*>(node.get())->localName())) {
+ if (HTMLElement* paragraphElement = static_cast<HTMLElement*>(enclosingNodeWithTag(positionInParentBeforeNode(node.get()), pTag)))
moveNodeOutOfAncestor(node, paragraphElement);
}
Document* focusedDocument = page->focusController()->focusedOrMainFrame()->document();
if (Node* node = focusedDocument->focusedNode()) {
if (node->isElementNode())
- toElement(node)->updateFocusAppearance(true);
+ static_cast<Element*>(node)->updateFocusAppearance(true);
}
if (m_needStyleRecalcForVisitedLinks) {
HTMLDataListElement* dataList = element()->dataList();
if (dataList) {
RefPtr<HTMLCollection> options = dataList->options();
- for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); i++) {
+ for (unsigned i = 0; HTMLOptionElement* option = static_cast<HTMLOptionElement*>(options->item(i)); i++) {
if (!element()->isValidValue(option->value()))
continue;
Color color(option->value());
static bool isInHead(Element* row)
{
- return row->parentNode() && toElement(row->parentNode())->hasLocalName(theadTag);
+ return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(theadTag);
}
static bool isInBody(Element* row)
{
- return row->parentNode() && toElement(row->parentNode())->hasLocalName(tbodyTag);
+ return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(tbodyTag);
}
static bool isInFoot(Element* row)
{
- return row->parentNode() && toElement(row->parentNode())->hasLocalName(tfootTag);
+ return row->parentNode() && static_cast<Element*>(row->parentNode())->hasLocalName(tfootTag);
}
HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table, HTMLTableRowElement* previous)
return true;
// Patch attributes
- Element* oldElement = toElement(oldNode);
- Element* newElement = toElement(newNode);
+ Element* oldElement = static_cast<Element*>(oldNode);
+ Element* newElement = static_cast<Element*>(newNode);
if (oldDigest->m_attrsSHA1 != newDigest->m_attrsSHA1) {
// FIXME: Create a function in Element for removing all properties. Take in account whether did/willModifyAttribute are important.
if (oldElement->hasAttributesWithoutUpdate()) {
if (!element->isFrameOwnerElement())
return;
- HTMLFrameOwnerElement* frameOwner = toFrameOwnerElement(element);
+ HTMLFrameOwnerElement* frameOwner = static_cast<HTMLFrameOwnerElement*>(element);
Frame* frame = frameOwner->contentFrame();
if (!frame)
return;
NPObject* pluginScriptObject = 0;
if (m_element->hasTagName(appletTag) || m_element->hasTagName(embedTag) || m_element->hasTagName(objectTag))
- pluginScriptObject = toHTMLPlugInElement(m_element)->getNPObject();
+ pluginScriptObject = static_cast<HTMLPlugInElement*>(m_element)->getNPObject();
// Return value is expected to be retained, as described here: <http://www.mozilla.org/projects/plugin/npruntime.html>
if (pluginScriptObject)
void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- Element* element = toElement(node());
+ Element* element = static_cast<Element*>(node());
if (!element || !element->isPluginElement())
return;
- HTMLPlugInElement* plugInElement = toHTMLPlugInElement(element);
+ HTMLPlugInElement* plugInElement = static_cast<HTMLPlugInElement*>(element);
if (plugInElement->displayState() > HTMLPlugInElement::DisplayingSnapshot) {
RenderPart::paintContents(paintInfo, paintOffset);
return;
if (!plugInElement->isPlugInImageElement())
return;
- Image* snapshot = toHTMLPlugInImageElement(plugInElement)->snapshotImage();
+ Image* snapshot = static_cast<HTMLPlugInImageElement*>(plugInElement)->snapshotImage();
if (snapshot)
paintSnapshotImage(paintInfo, paintOffset, snapshot);
}
return;
MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
- HTMLPlugInElement* element = toHTMLPlugInElement(node());
+ HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(node());
if (event->type() == eventNames().mousedownEvent && static_cast<MouseEvent*>(event)->button() == LeftButton) {
m_mouseDownWasInUnavailablePluginIndicator = isInUnavailablePluginIndicator(mouseEvent);
if (m_mouseDownWasInUnavailablePluginIndicator) {
if (Node* node = renderer()->node()) {
if (node->isElementNode()) {
name.append(' ');
- name.append(toElement(node)->tagName());
+ name.append(static_cast<Element*>(node)->tagName());
}
if (node->hasID()) {
name.appendLiteral(" id=\'");
- name.append(toElement(node)->getIdAttribute());
+ name.append(static_cast<Element*>(node)->getIdAttribute());
name.append('\'');
}
HTMLMediaElement* RenderMedia::mediaElement() const
{
- return toMediaElement(node());
+ return static_cast<HTMLMediaElement*>(node());
}
void RenderMedia::layout()
const AtomicString& RenderSearchField::autosaveName() const
{
- return toElement(node())->getAttribute(autosaveAttr);
+ return static_cast<Element*>(node())->getAttribute(autosaveAttr);
}
// PopupMenuClient methods
HTMLTextFormControlElement* RenderTextControl::textFormControlElement() const
{
- return toHTMLTextFormControlElement(node());
+ return static_cast<HTMLTextFormControlElement*>(node());
}
HTMLElement* RenderTextControl::innerTextElement() const
bool isReadOnlyControl = false;
if (node->isElementNode()) {
- Element* element = toElement(node);
+ Element* element = static_cast<Element*>(node);
isEnabled = element->isEnabledFormControl();
- isReadOnlyControl = element->isTextFormControl() && toHTMLTextFormControlElement(element)->readOnly();
+ isReadOnlyControl = element->isTextFormControl() && static_cast<HTMLTextFormControlElement*>(element)->readOnly();
}
style->setUserModify((isReadOnlyControl || !isEnabled) ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY);
void RenderMathMLFenced::updateFromElement()
{
- Element* fenced = toElement(node());
+ Element* fenced = static_cast<Element*>(node());
// FIXME: Handle open/close values with more than one character (they should be treated like text).
AtomicString openValue = fenced->getAttribute(MathMLNames::openAttr);
if (isEmpty())
return;
- Element* fraction = toElement(node());
+ Element* fraction = static_cast<Element*>(node());
RenderObject* numeratorWrapper = firstChild();
RenderObject* denominatorWrapper = numeratorWrapper->nextSibling();
ContainerNode* n = parentElement->parentNode();
if (!n || !n->isElementNode())
break;
- parentElement = toElement(n);
+ parentElement = static_cast<Element*>(n);
}
if (elemStack.isEmpty())
if (hackAroundLibXMLEntityParsingBug() && context()->depth <= depthTriggeringEntityExpansion())
setDepthTriggeringEntityExpansion(-1);
- if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(toElement(n.get()))) {
+ if (!scriptingContentIsAllowed(m_scriptingPermission) && n->isElementNode() && toScriptElement(static_cast<Element*>(n.get()))) {
popCurrentNode();
n->remove(IGNORE_EXCEPTION);
return;
return;
}
- Element* element = toElement(n.get());
+ Element* element = static_cast<Element*>(n.get());
// The element's parent may have already been removed from document.
// Parsing continues in this case, but scripts aren't executed.
+2013-03-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r145462.
+ http://trac.webkit.org/changeset/145462
+ https://bugs.webkit.org/show_bug.cgi?id=112097
+
+ Compilation failure in PluginView.cpp (Requested by jamesr_ on
+ #webkit).
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::focusedNodeChanged):
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+ * src/DOMUtilitiesPrivate.cpp:
+ (WebCore::toHTMLElement):
+ * src/WebSearchableFormData.cpp:
+ (HTMLNames::IsSelectInDefaultState):
+
2013-03-11 Abhishek Arya <inferno@chromium.org>
Replace static_casts with to* functions.
// WebCore::Node.
HitTestResult hitTest(IntPoint(0, 0));
// This cast must be valid because of the isLink() check.
- hitTest.setURLElement(toElement(node));
+ hitTest.setURLElement(static_cast<Element*>(node));
if (hitTest.isLiveLink())
focusURL = hitTest.absoluteLinkURL();
}
// We know that if absoluteMediaURL() is not empty, then this
// is a media element.
HTMLMediaElement* mediaElement =
- toMediaElement(r.innerNonSharedNode());
+ static_cast<HTMLMediaElement*>(r.innerNonSharedNode());
if (mediaElement->hasTagName(HTMLNames::videoTag))
data.mediaType = WebContextMenuData::MediaTypeVideo;
else if (mediaElement->hasTagName(HTMLNames::audioTag))
if (plugin->plugin()->supportsPaginatedPrint())
data.mediaFlags |= WebContextMenuData::MediaCanPrint;
- HTMLPlugInImageElement* pluginElement = toHTMLPlugInImageElement(r.innerNonSharedNode());
+ HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(r.innerNonSharedNode());
data.srcURL = pluginElement->document()->completeURL(pluginElement->url());
data.mediaFlags |= WebContextMenuData::MediaCanSave;
HTMLNodeType* toHTMLElement(Node* node, const QualifiedName& name)
{
if (node->isHTMLElement()
- && toHTMLElement(node)->hasTagName(name)) {
+ && static_cast<HTMLElement*>(node)->hasTagName(name)) {
return static_cast<HTMLNodeType*>(node);
}
return 0;
for (Vector<HTMLElement*>::const_iterator i(listItems.begin()); i != listItems.end(); ++i) {
if (!(*i)->hasLocalName(HTMLNames::optionTag))
continue;
- HTMLOptionElement* optionElement = toHTMLOptionElement(*i);
+ HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(*i);
if (optionElement->selected() != optionElement->hasAttribute(selectedAttr))
return false;
}
for (Vector<HTMLElement*>::const_iterator i(listItems.begin()); i != listItems.end(); ++i) {
if (!(*i)->hasLocalName(HTMLNames::optionTag))
continue;
- HTMLOptionElement* optionElement = toHTMLOptionElement(*i);
+ HTMLOptionElement* optionElement = static_cast<HTMLOptionElement*>(*i);
if (optionElement->hasAttribute(selectedAttr)) {
// The page specified the option to select.
initialSelected = optionElement;
+2013-03-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r145462.
+ http://trac.webkit.org/changeset/145462
+ https://bugs.webkit.org/show_bug.cgi?id=112097
+
+ Compilation failure in PluginView.cpp (Requested by jamesr_ on
+ #webkit).
+
+ * WebView/WebView.mm:
+ (-[WebView _enterFullscreenForNode:WebCore::]):
+
2013-03-11 Abhishek Arya <inferno@chromium.org>
Replace static_casts with to* functions.
- (void)_enterFullscreenForNode:(WebCore::Node*)node
{
ASSERT(node->hasTagName(WebCore::HTMLNames::videoTag));
- HTMLMediaElement* videoElement = toMediaElement(node);
+ HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
if (_private->fullscreenController) {
if ([_private->fullscreenController mediaElement] == videoElement) {