Diff
Modified: trunk/Source/WebCore/ChangeLog (145443 => 145444)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 00:50:46 UTC (rev 145444)
@@ -1,3 +1,44 @@
+2013-03-11 Abhishek Arya <infe...@chromium.org>
+
+ Replace static_cast with to* helper functions.
+ https://bugs.webkit.org/show_bug.cgi?id=112045
+
+ Reviewed by Eric Seidel.
+
+ * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
+ (WebCore::V8HTMLOptionsCollection::removeMethodCustom):
+ (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
+ * bindings/v8/custom/V8NamedNodesCollection.cpp:
+ (WebCore::V8NamedNodesCollection::namedItem):
+ * bindings/v8/custom/V8NodeCustom.cpp:
+ (WebCore::wrap):
+ * editing/BreakBlockquoteCommand.cpp:
+ (WebCore::BreakBlockquoteCommand::doApply):
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::insertNodeAt):
+ (WebCore::CompositeEditCommand::pushAnchorElementDown):
+ (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
+ (WebCore::CompositeEditCommand::splitTreeToNode):
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::doApply):
+ * loader/archive/cf/LegacyWebArchive.cpp:
+ (WebCore::LegacyWebArchive::create):
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writeImage):
+ * platform/mac/HTMLConverter.mm:
+ (+[WebHTMLConverter editingAttributedStringFromRange:]):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::frameContentsCompositor):
+ (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
+ * rendering/RenderSnapshottedPlugIn.cpp:
+ (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
+ * rendering/mathml/RenderMathMLOperator.cpp:
+ (WebCore::RenderMathMLOperator::updateFromElement):
+ * rendering/svg/RenderSVGResourceContainer.cpp:
+ (WebCore::RenderSVGResourceContainer::idChanged):
+
2013-03-11 James Robinson <jam...@chromium.org>
[chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
Modified: trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp (145443 => 145444)
--- trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -85,7 +85,7 @@
v8::Handle<v8::Value> V8HTMLOptionsCollection::removeMethodCustom(const v8::Arguments& args)
{
HTMLOptionsCollection* imp = V8HTMLOptionsCollection::toNative(args.Holder());
- HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->ownerNode());
+ HTMLSelectElement* base = toHTMLSelectElement(imp->ownerNode());
return removeElement(base, args);
}
@@ -148,7 +148,7 @@
v8::Handle<v8::Value> V8HTMLOptionsCollection::indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
HTMLOptionsCollection* collection = V8HTMLOptionsCollection::toNative(info.Holder());
- HTMLSelectElement* base = static_cast<HTMLSelectElement*>(collection->ownerNode());
+ HTMLSelectElement* base = toHTMLSelectElement(collection->ownerNode());
return toOptionsCollectionSetter(index, value, base, info.GetIsolate());
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8NamedNodesCollection.cpp (145443 => 145444)
--- trunk/Source/WebCore/bindings/v8/custom/V8NamedNodesCollection.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/bindings/v8/custom/V8NamedNodesCollection.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -46,7 +46,7 @@
{
for (unsigned i = 0; i < m_nodes.size(); ++i) {
Node* node = m_nodes[i].get();
- if (node->hasID() && static_cast<Element*>(node)->getIdAttribute() == id)
+ if (node->hasID() && toElement(node)->getIdAttribute() == id)
return node;
}
return 0;
Modified: trunk/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp (145443 => 145444)
--- trunk/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -133,7 +133,7 @@
if (impl->isSVGElement())
return wrap(static_cast<SVGElement*>(impl), creationContext, isolate);
#endif
- return V8Element::createWrapper(static_cast<Element*>(impl), creationContext, isolate);
+ return V8Element::createWrapper(toElement(impl), creationContext, isolate);
case Node::ATTRIBUTE_NODE:
return wrap(static_cast<Attr*>(impl), creationContext, isolate);
case Node::TEXT_NODE:
Modified: trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp (145443 => 145444)
--- trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -132,7 +132,7 @@
ancestors.append(node);
// Insert a clone of the top blockquote after the break.
- RefPtr<Element> clonedBlockquote = static_cast<Element*>(topBlockquote)->cloneElementWithoutChildren();
+ RefPtr<Element> clonedBlockquote = toElement(topBlockquote)->cloneElementWithoutChildren();
insertNodeAfter(clonedBlockquote.get(), breakNode.get());
// Clone startNode's ancestors into the cloned blockquote.
@@ -150,7 +150,7 @@
while (listChildNode && !listChildNode->hasTagName(liTag))
listChildNode = listChildNode->nextSibling();
if (listChildNode && listChildNode->renderer() && listChildNode->renderer()->isListItem())
- setNodeAttribute(static_cast<Element*>(clonedChild.get()), startAttr, String::number(toRenderListItem(listChildNode->renderer())->value()));
+ setNodeAttribute(clonedChild, startAttr, String::number(toRenderListItem(listChildNode->renderer())->value()));
}
appendNode(clonedChild.get(), clonedAncestor.get());
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (145443 => 145444)
--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -364,7 +364,7 @@
if (child)
insertNodeBefore(insertChild, child);
else
- appendNode(insertChild, static_cast<Element*>(refChild));
+ appendNode(insertChild, toElement(refChild));
} else if (caretMinOffset(refChild) >= offset)
insertNodeBefore(insertChild, refChild);
else if (refChild->isTextNode() && caretMaxOffset(refChild) > offset) {
@@ -979,7 +979,7 @@
ASSERT(anchorNode->isLink());
setEndingSelection(VisibleSelection::selectionFromContentsOfNode(anchorNode));
- applyStyledElement(static_cast<Element*>(anchorNode));
+ applyStyledElement(toElement(anchorNode));
// Clones of anchorNode have been pushed down, now remove it.
if (anchorNode->inDocument())
removeNodePreservingChildren(anchorNode);
@@ -1293,7 +1293,7 @@
// e.g. <ul><li>hello <ul><li><br></li></ul> </li></ul> should become <ul><li>hello</li> <ul><li><br></li></ul> </ul> after this section
// If listNode does NOT appear at the end, then we should consider it as a regular paragraph.
// e.g. <ul><li> <ul><li><br></li></ul> hello</li></ul> should become <ul><li> <div><br></div> hello</li></ul> at the end
- splitElement(static_cast<Element*>(blockEnclosingList), listNode);
+ splitElement(toElement(blockEnclosingList), listNode);
removeNodePreservingChildren(listNode->parentNode());
newBlock = createListItemElement(document());
}
@@ -1309,7 +1309,7 @@
if (isListItem(nextListNode.get()) || isListElement(nextListNode.get())) {
// If emptyListItem follows another list item or nested list, split the list node.
if (isListItem(previousListNode.get()) || isListElement(previousListNode.get()))
- splitElement(static_cast<Element*>(listNode.get()), emptyListItem);
+ splitElement(toElement(listNode.get()), emptyListItem);
// If emptyListItem is followed by other list item or nested list, then insert newBlock before the list node.
// Because we have splitted the element, emptyListItem is the first element in the list node.
@@ -1468,7 +1468,7 @@
VisiblePosition positionInParent = firstPositionInNode(node->parentNode());
VisiblePosition positionInNode = firstPositionInOrBeforeNode(node.get());
if (positionInParent != positionInNode)
- splitElement(static_cast<Element*>(node->parentNode()), node);
+ splitElement(toElement(node->parentNode()), node);
}
return node.release();
Modified: trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp (145443 => 145444)
--- trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -227,7 +227,7 @@
// into an unquoted area. We then don't want the newline within the blockquote or else it will also be quoted.
if (m_pasteBlockqutoeIntoUnquotedArea) {
if (Node* highestBlockquote = highestEnclosingNodeOfType(canonicalPos, &isMailBlockquote))
- startBlock = static_cast<Element*>(highestBlockquote);
+ startBlock = toElement(highestBlockquote);
}
// Most of the time we want to stay at the nesting level of the startBlock (e.g., when nesting within lists). However,
Modified: trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp (145443 => 145444)
--- trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -524,7 +524,7 @@
Node* node = nodes[i];
Frame* childFrame;
if ((node->hasTagName(HTMLNames::frameTag) || node->hasTagName(HTMLNames::iframeTag) || node->hasTagName(HTMLNames::objectTag)) &&
- (childFrame = static_cast<HTMLFrameOwnerElement*>(node)->contentFrame())) {
+ (childFrame = toFrameOwnerElement(node)->contentFrame())) {
if (frameFilter && !frameFilter->shouldIncludeSubframe(childFrame))
continue;
Modified: trunk/Source/WebCore/platform/chromium/PasteboardChromium.cpp (145443 => 145444)
--- trunk/Source/WebCore/platform/chromium/PasteboardChromium.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/platform/chromium/PasteboardChromium.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -146,13 +146,13 @@
// link. This isn't useful to us, so get the actual image URL.
AtomicString urlString;
if (node->hasTagName(HTMLNames::imgTag) || node->hasTagName(HTMLNames::inputTag))
- urlString = static_cast<Element*>(node)->getAttribute(HTMLNames::srcAttr);
+ urlString = toElement(node)->getAttribute(HTMLNames::srcAttr);
#if ENABLE(SVG)
else if (node->hasTagName(SVGNames::imageTag))
- urlString = static_cast<Element*>(node)->getAttribute(XLinkNames::hrefAttr);
+ urlString = toElement(node)->getAttribute(XLinkNames::hrefAttr);
#endif
else if (node->hasTagName(HTMLNames::embedTag) || node->hasTagName(HTMLNames::objectTag)) {
- Element* element = static_cast<Element*>(node);
+ Element* element = toElement(node);
urlString = element->getAttribute(element->imageSourceAttributeName());
}
KURL url = "" ? KURL() : node->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (145443 => 145444)
--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm 2013-03-12 00:50:46 UTC (rev 145444)
@@ -1684,8 +1684,8 @@
if (startContainer == endContainer && (startOffset == endOffset - 1)) {
Node* node = startContainer->childNode(startOffset);
if (node && node->hasTagName(imgTag)) {
- NSFileWrapper *fileWrapper = fileWrapperForElement(static_cast<Element*>(node));
- NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithFileWrapper:fileWrapper];
+ NSFileWrapper* fileWrapper = fileWrapperForElement(toElement(node));
+ NSTextAttachment* attachment = [[NSTextAttachment alloc] initWithFileWrapper:fileWrapper];
[string appendAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]];
[attachment release];
}
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (145443 => 145444)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -539,7 +539,7 @@
}
#if ENABLE(VIDEO)
else if (renderer->isVideo()) {
- HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(renderer->node());
+ HTMLMediaElement* mediaElement = toMediaElement(renderer->node());
m_graphicsLayer->setContentsToMedia(mediaElement->platformLayer());
}
#endif
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (145443 => 145444)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -1304,7 +1304,7 @@
if (!renderer->node()->isFrameOwnerElement())
return 0;
- HTMLFrameOwnerElement* element = static_cast<HTMLFrameOwnerElement*>(renderer->node());
+ HTMLFrameOwnerElement* element = toFrameOwnerElement(renderer->node());
if (Document* contentDocument = element->contentDocument()) {
if (RenderView* view = contentDocument->renderView())
return view->compositor();
@@ -1993,7 +1993,7 @@
if (!node || (!node->hasTagName(HTMLNames::videoTag) && !node->hasTagName(HTMLNames::audioTag)))
return false;
- HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(node);
+ HTMLMediaElement* mediaElement = toMediaElement(node);
return mediaElement->player() ? mediaElement->player()->supportsAcceleratedRendering() : false;
}
#endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)
Modified: trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp (145443 => 145444)
--- trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -58,7 +58,7 @@
HTMLPlugInImageElement* RenderSnapshottedPlugIn::plugInImageElement() const
{
- return static_cast<HTMLPlugInImageElement*>(node());
+ return toHTMLPlugInImageElement(node());
}
void RenderSnapshottedPlugIn::layout()
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (145443 => 145444)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -152,7 +152,7 @@
// We may need the element later if we can't stretch.
if (node()->isElementNode()) {
- if (Element* mo = static_cast<Element*>(node())) {
+ if (Element* mo = toElement(node())) {
AtomicString stretchyAttr = mo->getAttribute(MathMLNames::stretchyAttr);
stretchDisabled = equalIgnoringCase(stretchyAttr, "false");
@@ -233,7 +233,7 @@
if (m_operator)
text = new (renderArena()) RenderText(node(), StringImpl::create(&m_operator, 1));
else if (node()->isElementNode())
- if (Element* mo = static_cast<Element*>(node()))
+ if (Element* mo = toElement(node()))
text = new (renderArena()) RenderText(node(), mo->textContent().replace(hyphenMinus, minusSign).impl());
// If we can't figure out the text, leave it blank.
if (text) {
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (145443 => 145444)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -86,7 +86,7 @@
// Remove old id, that is guaranteed to be present in cache.
SVGDocumentExtensions* extensions = svgExtensionsFromNode(node());
extensions->removeResource(m_id);
- m_id = static_cast<Element*>(node())->getIdAttribute();
+ m_id = toElement(node())->getIdAttribute();
registerResource();
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (145443 => 145444)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-03-12 00:50:46 UTC (rev 145444)
@@ -1,3 +1,27 @@
+2013-03-11 Abhishek Arya <infe...@chromium.org>
+
+ Replace static_cast with to* helper functions.
+ https://bugs.webkit.org/show_bug.cgi?id=112045
+
+ Reviewed by Eric Seidel.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::findChildByExpression):
+ (WebKit::WebFrameImpl::fromFrameOwnerElement):
+ * src/WebHelperPluginImpl.cpp:
+ (WebKit::WebHelperPluginImpl::getPlugin):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::loadInternal):
+ (WebKit::WebMediaPlayerClientImpl::create):
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
+ (WebKit::WebPageSerializerImpl::endTagToString):
+ (WebKit::WebPageSerializerImpl::buildContentForNode):
+ (WebKit::WebPageSerializerImpl::collectTargetFrames):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::autocompleteHandleKeyEvent):
+ (WebKit::WebViewImpl::enterFullScreenForElement):
+
2013-03-11 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r145435.
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (145443 => 145444)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -749,7 +749,7 @@
Node* node = xpathResult->iterateNext(ec);
if (!node || !node->isFrameOwnerElement())
return 0;
- HTMLFrameOwnerElement* frameElement = static_cast<HTMLFrameOwnerElement*>(node);
+ HTMLFrameOwnerElement* frameElement = toFrameOwnerElement(node);
return fromFrame(frameElement->contentFrame());
}
@@ -2272,7 +2272,7 @@
// FIXME: Why do we check specifically for <iframe> and <frame> here? Why can't we get the WebFrameImpl from an <object> element, for example.
if (!element || !element->isFrameOwnerElement() || (!element->hasTagName(HTMLNames::iframeTag) && !element->hasTagName(HTMLNames::frameTag)))
return 0;
- HTMLFrameOwnerElement* frameElement = static_cast<HTMLFrameOwnerElement*>(element);
+ HTMLFrameOwnerElement* frameElement = toFrameOwnerElement(element);
return fromFrame(frameElement->contentFrame());
}
Modified: trunk/Source/WebKit/chromium/src/WebHelperPluginImpl.cpp (145443 => 145444)
--- trunk/Source/WebKit/chromium/src/WebHelperPluginImpl.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/chromium/src/WebHelperPluginImpl.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -166,7 +166,7 @@
return 0;
Node* node = objectElements->item(0);
ASSERT(node->hasTagName(WebCore::HTMLNames::objectTag));
- WebCore::Widget* widget = static_cast<HTMLPlugInElement*>(node)->pluginWidget();
+ WebCore::Widget* widget = toHTMLPlugInElement(node)->pluginWidget();
if (!widget)
return 0;
WebPlugin* plugin = static_cast<WebPluginContainerImpl*>(widget)->plugin();
Modified: trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp (145443 => 145444)
--- trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -383,7 +383,7 @@
if (param->isHTMLDocument) {
result.append('>');
// FIXME: This code is horribly wrong. WebPageSerializerImpl must die.
- if (!static_cast<const HTMLElement*>(element)->ieForbidsInsertHTML()) {
+ if (!toHTMLElement(element)->ieForbidsInsertHTML()) {
// We need to write end tag when it is required.
result.appendLiteral("</");
result.append(element->nodeName().lower());
@@ -406,12 +406,12 @@
switch (node->nodeType()) {
case Node::ELEMENT_NODE:
// Process open tag of element.
- openTagToString(static_cast<Element*>(node), param);
+ openTagToString(toElement(node), param);
// Walk through the children nodes and process it.
for (Node *child = node->firstChild(); child; child = child->nextSibling())
buildContentForNode(child, param);
// Process end tag of element.
- endTagToString(static_cast<Element*>(node), param);
+ endTagToString(toElement(node), param);
break;
case Node::TEXT_NODE:
saveHTMLContentToBuffer(createMarkup(node), param);
@@ -483,7 +483,7 @@
for (unsigned i = 0; Node* node = all->item(i); i++) {
if (!node->isHTMLElement())
continue;
- Element* element = static_cast<Element*>(node);
+ Element* element = toElement(node);
WebFrameImpl* webFrame =
WebFrameImpl::fromFrameOwnerElement(element);
if (webFrame)
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (145443 => 145444)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-03-12 00:50:46 UTC (rev 145444)
@@ -1028,7 +1028,7 @@
ASSERT_NOT_REACHED();
return false;
}
- Element* element = static_cast<Element*>(node);
+ Element* element = toElement(node);
if (!element->hasLocalName(HTMLNames::inputTag)) {
ASSERT_NOT_REACHED();
return false;
@@ -1039,7 +1039,7 @@
if (!m_autofillPopupClient->canRemoveSuggestionAtIndex(selectedIndex))
return false;
- WebString name = WebInputElement(static_cast<HTMLInputElement*>(element)).nameForAutofill();
+ WebString name = WebInputElement(toHTMLInputElement(element)).nameForAutofill();
WebString value = m_autofillPopupClient->itemText(selectedIndex);
m_autofillClient->removeAutocompleteSuggestion(name, value);
// Update the entries in the currently showing popup to reflect the
@@ -1974,7 +1974,7 @@
#if USE(NATIVE_FULLSCREEN_VIDEO)
if (element && element->isMediaElement()) {
- HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(element);
+ HTMLMediaElement* mediaElement = toMediaElement(element);
if (mediaElement->player() && mediaElement->player()->canEnterFullscreen()) {
mediaElement->player()->enterFullscreen();
m_provisionalFullScreenElement = element;
Modified: trunk/Source/WebKit/mac/ChangeLog (145443 => 145444)
--- trunk/Source/WebKit/mac/ChangeLog 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-03-12 00:50:46 UTC (rev 145444)
@@ -1,3 +1,13 @@
+2013-03-11 Abhishek Arya <infe...@chromium.org>
+
+ Replace static_cast with to* helper functions.
+ https://bugs.webkit.org/show_bug.cgi?id=112045
+
+ Reviewed by Eric Seidel.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+
2013-03-11 Jer Noble <jer.no...@apple.com>
Unreviewed build fix. Remove stray brace which crept into r145409.
Modified: trunk/Source/WebKit/mac/WebView/WebRenderLayer.mm (145443 => 145444)
--- trunk/Source/WebKit/mac/WebView/WebRenderLayer.mm 2013-03-12 00:48:27 UTC (rev 145443)
+++ trunk/Source/WebKit/mac/WebView/WebRenderLayer.mm 2013-03-12 00:50:46 UTC (rev 145444)
@@ -53,9 +53,9 @@
if (Node* node = renderer->node()) {
if (node->isElementNode())
- name = [name stringByAppendingFormat:@" %@", (NSString *)static_cast<Element*>(node)->tagName()];
+ name = [name stringByAppendingFormat:@" %@", (NSString *)toElement(node)->tagName()];
if (node->hasID())
- name = [name stringByAppendingFormat:@" id=\"%@\"", (NSString *)static_cast<Element*>(node)->getIdAttribute()];
+ name = [name stringByAppendingFormat:@" id=\"%@\"", (NSString *)toElement(node)->getIdAttribute()];
if (node->hasClass()) {
StyledElement* styledElement = static_cast<StyledElement*>(node);