Title: [171374] branches/safari-537.78-branch/Source

Diff

Modified: branches/safari-537.78-branch/Source/WebCore/ChangeLog (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/ChangeLog	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/ChangeLog	2014-07-23 00:27:53 UTC (rev 171374)
@@ -1,3 +1,30 @@
+2014-07-22  Dana Burkart  <dburk...@apple.com>
+
+        Merge r152704.
+
+    2013-07-15  Kangil Han  <kangil....@samsung.com>
+
+            Introduce toHTMLIFrameElement
+            https://bugs.webkit.org/show_bug.cgi?id=118672
+
+            Reviewed by Ryosuke Niwa.
+
+            To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
+
+            * bindings/js/JSHTMLDocumentCustom.cpp:
+            (WebCore::JSHTMLDocument::nameGetter):
+            * css/StyleResolver.cpp:
+            (WebCore::StyleResolver::adjustRenderStyle):
+            * dom/Document.cpp:
+            (WebCore::Document::seamlessParentIFrame):
+            * html/HTMLIFrameElement.h:
+            (WebCore::toHTMLIFrameElement):
+            * rendering/RenderEmbeddedObject.cpp:
+            (WebCore::RenderEmbeddedObject::viewCleared):
+            * rendering/RenderIFrame.cpp:
+            (WebCore::RenderIFrame::isSeamless):
+            (WebCore::RenderIFrame::flattenFrame):
+
 2014-07-19  Lucas Forschler  <lforsch...@apple.com>
 
         Merge r170946

Modified: branches/safari-537.78-branch/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -75,7 +75,7 @@
 
     Node* node = document->documentNamedItemMap().getElementByDocumentNamedItem(atomicPropertyName, document);
     Frame* frame;
-    if (node->hasTagName(iframeTag) && (frame = static_cast<HTMLIFrameElement*>(node)->contentFrame()))
+    if (node->hasTagName(iframeTag) && (frame = toHTMLIFrameElement(node)->contentFrame()))
         return toJS(exec, frame);
 
     return toJS(exec, thisObj->globalObject(), node);

Modified: branches/safari-537.78-branch/Source/WebCore/css/StyleResolver.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/css/StyleResolver.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/css/StyleResolver.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -1508,7 +1508,7 @@
         style->setTransformStyle3D(TransformStyle3DFlat);
 
     // Seamless iframes behave like blocks. Map their display to inline-block when marked inline.
-    if (e && e->hasTagName(iframeTag) && style->display() == INLINE && static_cast<HTMLIFrameElement*>(e)->shouldDisplaySeamlessly())
+    if (e && e->hasTagName(iframeTag) && style->display() == INLINE && toHTMLIFrameElement(e)->shouldDisplaySeamlessly())
         style->setDisplay(INLINE_BLOCK);
 
 #if ENABLE(SVG)

Modified: branches/safari-537.78-branch/Source/WebCore/dom/Document.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/dom/Document.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/dom/Document.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -5651,9 +5651,7 @@
     if (!shouldDisplaySeamlesslyWithParent())
         return 0;
 
-    HTMLFrameOwnerElement* ownerElement = this->ownerElement();
-    ASSERT(ownerElement->hasTagName(iframeTag));
-    return static_cast<HTMLIFrameElement*>(ownerElement);
+    return toHTMLIFrameElement(ownerElement());
 }
 
 bool Document::shouldDisplaySeamlesslyWithParent() const

Modified: branches/safari-537.78-branch/Source/WebCore/html/HTMLIFrameElement.h (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/html/HTMLIFrameElement.h	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/html/HTMLIFrameElement.h	2014-07-23 00:27:53 UTC (rev 171374)
@@ -52,6 +52,12 @@
 #endif
 };
 
+inline HTMLIFrameElement* toHTMLIFrameElement(Node* node)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::iframeTag));
+    return static_cast<HTMLIFrameElement*>(node);
+}
+
 } // namespace WebCore
 
 #endif // HTMLIFrameElement_h

Modified: branches/safari-537.78-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -529,7 +529,7 @@
         int marginWidth = -1;
         int marginHeight = -1;
         if (node()->hasTagName(iframeTag)) {
-            HTMLIFrameElement* frame = static_cast<HTMLIFrameElement*>(node());
+            HTMLIFrameElement* frame = toHTMLIFrameElement(node());
             marginWidth = frame->marginWidth();
             marginHeight = frame->marginHeight();
         }

Modified: branches/safari-537.78-branch/Source/WebCore/rendering/RenderIFrame.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebCore/rendering/RenderIFrame.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebCore/rendering/RenderIFrame.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -81,7 +81,7 @@
 
 bool RenderIFrame::isSeamless() const
 {
-    return node() && node()->hasTagName(iframeTag) && static_cast<HTMLIFrameElement*>(node())->shouldDisplaySeamlessly();
+    return node() && node()->hasTagName(iframeTag) && toHTMLIFrameElement(node())->shouldDisplaySeamlessly();
 }
 
 bool RenderIFrame::requiresLayer() const
@@ -102,7 +102,7 @@
     if (!node() || !node()->hasTagName(iframeTag))
         return false;
 
-    HTMLIFrameElement* element = static_cast<HTMLIFrameElement*>(node());
+    HTMLIFrameElement* element = toHTMLIFrameElement(node());
     Frame* frame = element->document()->frame();
 
     if (isSeamless())

Modified: branches/safari-537.78-branch/Source/WebKit/win/ChangeLog (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebKit/win/ChangeLog	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebKit/win/ChangeLog	2014-07-23 00:27:53 UTC (rev 171374)
@@ -1,3 +1,19 @@
+2014-07-22  Dana Burkart  <dburk...@apple.com>
+
+        Merge r152704.
+
+    2013-07-15  Kangil Han  <kangil....@samsung.com>
+
+            Introduce toHTMLIFrameElement
+            https://bugs.webkit.org/show_bug.cgi?id=118672
+
+            Reviewed by Ryosuke Niwa.
+
+            To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
+
+            * DOMHTMLClasses.cpp:
+            (DOMHTMLIFrameElement::contentFrame):
+
 2014-03-18  Brent Fulgham  <bfulg...@apple.com>
 
         Build correction after last merge.

Modified: branches/safari-537.78-branch/Source/WebKit/win/DOMHTMLClasses.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebKit/win/DOMHTMLClasses.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebKit/win/DOMHTMLClasses.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -1610,8 +1610,8 @@
     if (!result)
         return E_POINTER;
     *result = 0;
-    ASSERT(m_element && m_element->hasTagName(iframeTag));
-    HTMLIFrameElement* iFrameElement = static_cast<HTMLIFrameElement*>(m_element);
+    ASSERT(m_element);
+    HTMLIFrameElement* iFrameElement = toHTMLIFrameElement(m_element);
     COMPtr<IWebFrame> webFrame = kit(iFrameElement->contentFrame());
     if (!webFrame)
         return E_FAIL;

Modified: branches/safari-537.78-branch/Source/WebKit2/ChangeLog (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebKit2/ChangeLog	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebKit2/ChangeLog	2014-07-23 00:27:53 UTC (rev 171374)
@@ -1,5 +1,21 @@
 2014-07-22  Dana Burkart  <dburk...@apple.com>
 
+        Merge r152704.
+
+    2013-07-15  Kangil Han  <kangil....@samsung.com>
+
+            Introduce toHTMLIFrameElement
+            https://bugs.webkit.org/show_bug.cgi?id=118672
+
+            Reviewed by Ryosuke Niwa.
+
+            To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
+
+            * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
+            (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
+
+2014-07-22  Dana Burkart  <dburk...@apple.com>
+
         Merge r169448
 
     2014-05-29  Alexey Proskuryakov  <a...@apple.com>

Modified: branches/safari-537.78-branch/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp (171373 => 171374)


--- branches/safari-537.78-branch/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp	2014-07-23 00:14:06 UTC (rev 171373)
+++ branches/safari-537.78-branch/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp	2014-07-23 00:27:53 UTC (rev 171374)
@@ -257,7 +257,7 @@
     if (!m_node->hasTagName(iframeTag))
         return 0;
 
-    Frame* frame = static_cast<HTMLIFrameElement*>(m_node.get())->contentFrame();
+    Frame* frame = toHTMLIFrameElement(m_node.get())->contentFrame();
     if (!frame)
         return 0;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to