<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174875] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174875">174875</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-10-19 20:42:03 -0700 (Sun, 19 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845
Reviewed by Darin Adler.
Source/WebCore:
Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.
No new tests, no behavior change.
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::layoutCount):
(WebCore::AccessibilityRenderObject::widgetForAttachmentView):
(WebCore::AccessibilityRenderObject::visiblePositionForPoint):
* dom/Document.cpp:
(WebCore::widgetForElement):
* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* editing/FrameSelection.cpp:
(WebCore::isFrameElement):
* html/HTMLEmbedElement.cpp:
(WebCore::findWidgetRenderer):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
(WebCore::HTMLFrameOwnerElement::renderWidget):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::renderMeter):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementInfo):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/Frame.cpp:
(WebCore::Frame::ownerRenderer):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::widgetForEventTarget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
* rendering/InlineTextBox.cpp:
(WebCore::fontToUse):
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
(WebCore::InlineTextBox::paint):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::nodeAtPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::hitTestFloats):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
* rendering/RenderCombineText.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference):
(WebCore::addLayers):
(WebCore::RenderElement::removeLayers):
(WebCore::RenderElement::moveLayers):
(WebCore::RenderElement::setNeedsPositionedMovementLayout):
(WebCore::RenderElement::renderNamedFlowThreadWrapper):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::regionForCompositedLayer):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::transparencyClipBox):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::collectFragments):
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::isRestartedPlugin):
(WebCore::isCompositedPlugin):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
* rendering/RenderLayerModelObject.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
(WebCore::RenderMultiColumnFlowThread::layout):
(WebCore::RenderMultiColumnFlowThread::addRegionToThread):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
(WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::namedFlowThread):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::updateWritingMode):
(WebCore::addFragmentToList):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
(WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::scheduleRelayoutForSubtree):
(WebCore::RenderObject::setLayerNeedsFullRepaint):
(WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::selectionRoot):
(WebCore::RenderObject::shouldUseTransformFromContainer):
(WebCore::RenderObject::getTransformFromContainer):
(WebCore::RenderObject::isRooted):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::isComposited):
(WebCore::RenderObject::currentRenderNamedFlowFragment):
* rendering/RenderObject.h:
* rendering/RenderProgress.h:
* rendering/RenderRuby.cpp:
(WebCore::lastRubyRun):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::rubyRun):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
* rendering/RenderRubyRun.h:
* rendering/RenderSlider.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::calculateProgressRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
(WebCore::writeLayers):
* rendering/RenderVideo.h:
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::isComposited):
* rendering/RenderView.h:
* rendering/RenderWidget.h:
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
Source/WebKit/mac:
Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView pluginHostDied]):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView _windowClipRect]):
(-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPlugin):
(WebFrameLoaderClient::createJavaAppletWidget):
Source/WebKit2:
Use is<>() / downcast<>() for all remaining RenderObject subclasses and
clean up the surrounding code.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginProcessCrashed):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityProgressIndicatorcpp">trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomPositioncpp">trunk/Source/WebCore/dom/Position.cpp</a></li>
<li><a href="#trunkSourceWebCoredomWebKitNamedFlowcpp">trunk/Source/WebCore/dom/WebKitNamedFlow.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLEmbedElementcpp">trunk/Source/WebCore/html/HTMLEmbedElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp">trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMeterElementcpp">trunk/Source/WebCore/html/HTMLMeterElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInElementcpp">trunk/Source/WebCore/html/HTMLPlugInElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInImageElementcpp">trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLProgressElementcpp">trunk/Source/WebCore/html/HTMLProgressElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlPluginDocumentcpp">trunk/Source/WebCore/html/PluginDocument.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlshadowMediaControlElementscpp">trunk/Source/WebCore/html/shadow/MediaControlElements.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorLayerTreeAgentcpp">trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubframeLoadercpp">trunk/Source/WebCore/loader/SubframeLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagegtkEventHandlerGtkcpp">trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp</a></li>
<li><a href="#trunkSourceWebCorepageiosEventHandlerIOSmm">trunk/Source/WebCore/page/ios/EventHandlerIOS.mm</a></li>
<li><a href="#trunkSourceWebCorepagemacEventHandlerMacmm">trunk/Source/WebCore/page/mac/EventHandlerMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformeflRenderThemeEflcpp">trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingLayoutStatecpp">trunk/Source/WebCore/rendering/LayoutState.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderCombineTexth">trunk/Source/WebCore/rendering/RenderCombineText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderEmbeddedObjecth">trunk/Source/WebCore/rendering/RenderEmbeddedObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlowThreadcpp">trunk/Source/WebCore/rendering/RenderFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlowThreadh">trunk/Source/WebCore/rendering/RenderFlowThread.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerModelObjecth">trunk/Source/WebCore/rendering/RenderLayerModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLineBreakh">trunk/Source/WebCore/rendering/RenderLineBreak.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMeterh">trunk/Source/WebCore/rendering/RenderMeter.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnFlowThreadcpp">trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnFlowThreadh">trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSetcpp">trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSeth">trunk/Source/WebCore/rendering/RenderMultiColumnSet.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSpannerPlaceholderh">trunk/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowFragmentcpp">trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowFragmenth">trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowThreadcpp">trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderNamedFlowThreadh">trunk/Source/WebCore/rendering/RenderNamedFlowThread.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderProgressh">trunk/Source/WebCore/rendering/RenderProgress.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRubycpp">trunk/Source/WebCore/rendering/RenderRuby.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRubyBasecpp">trunk/Source/WebCore/rendering/RenderRubyBase.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRubyRuncpp">trunk/Source/WebCore/rendering/RenderRubyRun.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRubyRunh">trunk/Source/WebCore/rendering/RenderRubyRun.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSliderh">trunk/Source/WebCore/rendering/RenderSlider.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextcpp">trunk/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeGtkcpp">trunk/Source/WebCore/rendering/RenderThemeGtk.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeSafaricpp">trunk/Source/WebCore/rendering/RenderThemeSafari.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeWincpp">trunk/Source/WebCore/rendering/RenderThemeWin.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTreeAsTextcpp">trunk/Source/WebCore/rendering/RenderTreeAsText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderVideoh">trunk/Source/WebCore/rendering/RenderVideo.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewh">trunk/Source/WebCore/rendering/RenderView.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderWidgeth">trunk/Source/WebCore/rendering/RenderWidget.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineBreakingContextInlineHeadersh">trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h</a></li>
<li><a href="#trunkSourceWebCorerenderinglineLineBreakercpp">trunk/Source/WebCore/rendering/line/LineBreaker.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacPluginsHostedWebHostedNetscapePluginViewmm">trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebBaseNetscapePluginViewmm">trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/ChangeLog        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1,5 +1,233 @@
</span><span class="cx"> 2014-10-19 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Use is<>() / downcast<>() for all remaining RenderObject subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137845
+
+ Reviewed by Darin Adler.
+
+ Use is<>() / downcast<>() for all remaining RenderObject subclasses and
+ clean up the surrounding code.
+
+ No new tests, no behavior change.
+
+ * accessibility/AccessibilityProgressIndicator.cpp:
+ (WebCore::AccessibilityProgressIndicator::progressElement):
+ (WebCore::AccessibilityProgressIndicator::meterElement):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::layoutCount):
+ (WebCore::AccessibilityRenderObject::widgetForAttachmentView):
+ (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
+ * dom/Document.cpp:
+ (WebCore::widgetForElement):
+ * dom/Position.cpp:
+ (WebCore::Position::getInlineBoxAndOffset):
+ * dom/WebKitNamedFlow.cpp:
+ (WebCore::WebKitNamedFlow::overset):
+ (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
+ (WebCore::WebKitNamedFlow::getRegionsByContent):
+ (WebCore::WebKitNamedFlow::getRegions):
+ * editing/FrameSelection.cpp:
+ (WebCore::isFrameElement):
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::findWidgetRenderer):
+ * html/HTMLFrameOwnerElement.cpp:
+ (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
+ (WebCore::HTMLFrameOwnerElement::renderWidget):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+ * html/HTMLMeterElement.cpp:
+ (WebCore::HTMLMeterElement::renderMeter):
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::supportsFocus):
+ * html/HTMLPlugInImageElement.cpp:
+ (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
+ (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
+ * html/HTMLProgressElement.cpp:
+ (WebCore::HTMLProgressElement::renderProgress):
+ * html/PluginDocument.cpp:
+ (WebCore::PluginDocument::pluginWidget):
+ * html/shadow/MediaControlElements.cpp:
+ (WebCore::MediaControlTimelineElement::defaultEventHandler):
+ (WebCore::MediaControlTextTrackContainerElement::updateSizes):
+ (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
+ * inspector/InspectorLayerTreeAgent.cpp:
+ (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::buildObjectForElementInfo):
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::loadSubframe):
+ * page/Frame.cpp:
+ (WebCore::Frame::ownerRenderer):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * page/gtk/EventHandlerGtk.cpp:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ * page/ios/EventHandlerIOS.mm:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ (WebCore::widgetForEventTarget):
+ * platform/efl/RenderThemeEfl.cpp:
+ (WebCore::RenderThemeEfl::applyEdjeRTLState):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::fontToUse):
+ (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
+ (WebCore::InlineTextBox::paint):
+ * rendering/LayoutState.cpp:
+ (WebCore::LayoutState::LayoutState):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::collapseAnonymousBoxChild):
+ (WebCore::RenderBlock::simplifiedLayout):
+ (WebCore::RenderBlock::paintObject):
+ (WebCore::RenderBlock::selectionGaps):
+ (WebCore::RenderBlock::nodeAtPoint):
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::layoutBlock):
+ (WebCore::RenderBlockFlow::hitTestFloats):
+ (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::scroll):
+ (WebCore::RenderBox::nodeAtPoint):
+ (WebCore::RenderBox::repaintLayerRectsForImage):
+ (WebCore::RenderBox::mapLocalToContainer):
+ (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
+ * rendering/RenderCombineText.h:
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::adjustStyleDifference):
+ (WebCore::addLayers):
+ (WebCore::RenderElement::removeLayers):
+ (WebCore::RenderElement::moveLayers):
+ (WebCore::RenderElement::setNeedsPositionedMovementLayout):
+ (WebCore::RenderElement::renderNamedFlowThreadWrapper):
+ * rendering/RenderEmbeddedObject.h:
+ * rendering/RenderFlowThread.cpp:
+ (WebCore::RenderFlowThread::validateRegions):
+ (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
+ (WebCore::RenderFlowThread::regionForCompositedLayer):
+ (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
+ (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
+ (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
+ (WebCore::RenderFlowThread::addForcedRegionBreak):
+ (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
+ * rendering/RenderFlowThread.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
+ (WebCore::transparencyClipBox):
+ (WebCore::accumulateOffsetTowardsAncestor):
+ (WebCore::RenderLayer::collectFragments):
+ (WebCore::RenderLayer::hitTest):
+ (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
+ (WebCore::RenderLayer::calculateClipRects):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateAfterWidgetResize):
+ (WebCore::RenderLayerBacking::updateConfiguration):
+ (WebCore::isRestartedPlugin):
+ (WebCore::isCompositedPlugin):
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+ (WebCore::RenderLayerBacking::containsPaintedContent):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking):
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ (WebCore::RenderLayerCompositor::requiresCompositingLayer):
+ (WebCore::RenderLayerCompositor::reasonsForCompositing):
+ (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
+ (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
+ (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
+ * rendering/RenderLayerModelObject.h:
+ * rendering/RenderLineBreak.h:
+ * rendering/RenderMeter.h:
+ * rendering/RenderMultiColumnFlowThread.cpp:
+ (WebCore::RenderMultiColumnFlowThread::firstMultiColumnSet):
+ (WebCore::RenderMultiColumnFlowThread::lastMultiColumnSet):
+ (WebCore::RenderMultiColumnFlowThread::layout):
+ (WebCore::RenderMultiColumnFlowThread::addRegionToThread):
+ (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
+ (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
+ (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut):
+ (WebCore::RenderMultiColumnFlowThread::setPageBreak):
+ (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
+ (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox):
+ (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak):
+ (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
+ * rendering/RenderMultiColumnFlowThread.h:
+ * rendering/RenderMultiColumnSet.cpp:
+ (WebCore::RenderMultiColumnSet::nextSiblingMultiColumnSet):
+ (WebCore::RenderMultiColumnSet::previousSiblingMultiColumnSet):
+ * rendering/RenderMultiColumnSet.h:
+ * rendering/RenderMultiColumnSpannerPlaceholder.h:
+ * rendering/RenderNamedFlowFragment.cpp:
+ (WebCore::RenderNamedFlowFragment::checkRegionStyle):
+ (WebCore::RenderNamedFlowFragment::namedFlowThread):
+ * rendering/RenderNamedFlowFragment.h:
+ * rendering/RenderNamedFlowThread.cpp:
+ (WebCore::RenderNamedFlowThread::updateWritingMode):
+ (WebCore::addFragmentToList):
+ (WebCore::RenderNamedFlowThread::addRegionToThread):
+ (WebCore::RenderNamedFlowThread::removeRegionFromThread):
+ (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock):
+ (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
+ (WebCore::RenderNamedFlowThread::checkInvalidRegions):
+ (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
+ (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
+ * rendering/RenderNamedFlowThread.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::scheduleRelayoutForSubtree):
+ (WebCore::RenderObject::setLayerNeedsFullRepaint):
+ (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
+ (WebCore::RenderObject::repaintUsingContainer):
+ (WebCore::RenderObject::selectionRoot):
+ (WebCore::RenderObject::shouldUseTransformFromContainer):
+ (WebCore::RenderObject::getTransformFromContainer):
+ (WebCore::RenderObject::isRooted):
+ (WebCore::RenderObject::willBeDestroyed):
+ (WebCore::RenderObject::isComposited):
+ (WebCore::RenderObject::currentRenderNamedFlowFragment):
+ * rendering/RenderObject.h:
+ * rendering/RenderProgress.h:
+ * rendering/RenderRuby.cpp:
+ (WebCore::lastRubyRun):
+ * rendering/RenderRubyBase.cpp:
+ (WebCore::RenderRubyBase::rubyRun):
+ * rendering/RenderRubyRun.cpp:
+ (WebCore::RenderRubyRun::removeChild):
+ * rendering/RenderRubyRun.h:
+ * rendering/RenderSlider.h:
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::widthFromCache):
+ * rendering/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::calculateProgressRect):
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintProgressBar):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMeter):
+ (WebCore::RenderThemeMac::paintProgressBar):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintMeter):
+ * rendering/RenderThemeWin.cpp:
+ (WebCore::RenderThemeWin::paintMeter):
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::writeRenderRegionList):
+ (WebCore::writeLayers):
+ * rendering/RenderVideo.h:
+ * rendering/RenderView.cpp:
+ (WebCore::SelectionIterator::checkForSpanner):
+ (WebCore::isComposited):
+ * rendering/RenderView.h:
+ * rendering/RenderWidget.h:
+ * rendering/line/BreakingContextInlineHeaders.h:
+ (WebCore::BreakingContext::handleText):
+ * rendering/line/LineBreaker.cpp:
+ (WebCore::LineBreaker::skipLeadingWhitespace):
+ * testing/Internals.cpp:
+ (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
+
+2014-10-19 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=137854
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityProgressIndicatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -122,19 +122,19 @@
</span><span class="cx">
</span><span class="cx"> HTMLProgressElement* AccessibilityProgressIndicator::progressElement() const
</span><span class="cx"> {
</span><del>- if (!m_renderer->isProgress())
</del><ins>+ if (!is<RenderProgress>(*m_renderer))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return toRenderProgress(m_renderer)->progressElement();
</del><ins>+ return downcast<RenderProgress>(*m_renderer).progressElement();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(METER_ELEMENT)
</span><span class="cx"> HTMLMeterElement* AccessibilityProgressIndicator::meterElement() const
</span><span class="cx"> {
</span><del>- if (!m_renderer->isMeter())
</del><ins>+ if (!is<RenderMeter>(*m_renderer))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return toRenderMeter(m_renderer)->meterElement();
</del><ins>+ return downcast<RenderMeter>(*m_renderer).meterElement();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1387,9 +1387,9 @@
</span><span class="cx">
</span><span class="cx"> int AccessibilityRenderObject::layoutCount() const
</span><span class="cx"> {
</span><del>- if (!m_renderer->isRenderView())
</del><ins>+ if (!is<RenderView>(*m_renderer))
</ins><span class="cx"> return 0;
</span><del>- return toRenderView(*m_renderer).frameView().layoutCount();
</del><ins>+ return downcast<RenderView>(*m_renderer).frameView().layoutCount();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String AccessibilityRenderObject::text() const
</span><span class="lines">@@ -1763,7 +1763,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!isAttachment())
</span><span class="cx"> return nullptr;
</span><del>- return toRenderWidget(m_renderer)->widget();
</del><ins>+ return downcast<RenderWidget>(*m_renderer).widget();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // This function is like a cross-platform version of - (WebCoreTextMarkerRange*)textMarkerRange. It returns
</span><span class="lines">@@ -1996,11 +1996,11 @@
</span><span class="cx"> pointResult = result.localPoint();
</span><span class="cx">
</span><span class="cx"> // done if hit something other than a widget
</span><del>- if (!renderer->isWidget())
</del><ins>+ if (!is<RenderWidget>(*renderer))
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> // descend into widget (FRAME, IFRAME, OBJECT...)
</span><del>- Widget* widget = toRenderWidget(renderer)->widget();
</del><ins>+ Widget* widget = downcast<RenderWidget>(*renderer).widget();
</ins><span class="cx"> if (!is<FrameView>(widget))
</span><span class="cx"> break;
</span><span class="cx"> Frame& frame = downcast<FrameView>(*widget).frame();
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/dom/Document.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -327,10 +327,10 @@
</span><span class="cx"> {
</span><span class="cx"> if (!focusedElement)
</span><span class="cx"> return nullptr;
</span><del>- auto renderer = focusedElement->renderer();
- if (!renderer || !renderer->isWidget())
</del><ins>+ auto* renderer = focusedElement->renderer();
+ if (!is<RenderWidget>(renderer))
</ins><span class="cx"> return nullptr;
</span><del>- return toRenderWidget(renderer)->widget();
</del><ins>+ return downcast<RenderWidget>(*renderer).widget();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool acceptsEditingFocus(Node* node)
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/dom/Position.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1156,7 +1156,7 @@
</span><span class="cx"> RenderObject* renderer = deprecatedNode()->renderer();
</span><span class="cx">
</span><span class="cx"> if (renderer->isBR())
</span><del>- inlineBox = !caretOffset ? toRenderLineBreak(renderer)->inlineBoxWrapper() : nullptr;
</del><ins>+ inlineBox = !caretOffset ? downcast<RenderLineBreak>(*renderer).inlineBoxWrapper() : nullptr;
</ins><span class="cx"> else if (is<RenderText>(*renderer)) {
</span><span class="cx"> auto& textRenderer = downcast<RenderText>(*renderer);
</span><span class="cx"> textRenderer.ensureLineBoxes();
</span></span></pre></div>
<a id="trunkSourceWebCoredomWebKitNamedFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/WebKitNamedFlow.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/WebKitNamedFlow.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/dom/WebKitNamedFlow.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -72,8 +72,8 @@
</span><span class="cx"> if (!m_parentFlowThread || !m_parentFlowThread->hasRegions())
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(m_parentFlowThread->lastRegion());
- return namedFlowFragment->regionOversetState() == RegionOverset;
</del><ins>+ const auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*m_parentFlowThread->lastRegion());
+ return namedFlowFragment.regionOversetState() == RegionOverset;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline bool inFlowThread(RenderObject* renderer, RenderNamedFlowThread* flowThread)
</span><span class="lines">@@ -104,14 +104,14 @@
</span><span class="cx">
</span><span class="cx"> int countNonPseudoRegions = -1;
</span><span class="cx"> for (const auto& renderRegion : regionList) {
</span><del>- const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+ const auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*renderRegion);
</ins><span class="cx"> // FIXME: Pseudo-elements are not included in the list.
</span><span class="cx"> // They will be included when we will properly support the Region interface
</span><span class="cx"> // http://dev.w3.org/csswg/css-regions/#the-region-interface
</span><del>- if (namedFlowFragment->isPseudoElementRegion())
</del><ins>+ if (namedFlowFragment.isPseudoElementRegion())
</ins><span class="cx"> continue;
</span><del>- countNonPseudoRegions++;
- if (namedFlowFragment->regionOversetState() == RegionEmpty)
</del><ins>+ ++countNonPseudoRegions;
+ if (namedFlowFragment.regionOversetState() == RegionEmpty)
</ins><span class="cx"> return countNonPseudoRegions;
</span><span class="cx"> }
</span><span class="cx"> return -1;
</span><span class="lines">@@ -135,15 +135,15 @@
</span><span class="cx"> if (inFlowThread(contentNode->renderer(), m_parentFlowThread)) {
</span><span class="cx"> const RenderRegionList& regionList = m_parentFlowThread->renderRegionList();
</span><span class="cx"> for (const auto& renderRegion : regionList) {
</span><del>- const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+ const auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*renderRegion);
</ins><span class="cx"> // FIXME: Pseudo-elements are not included in the list.
</span><span class="cx"> // They will be included when we will properly support the Region interface
</span><span class="cx"> // http://dev.w3.org/csswg/css-regions/#the-region-interface
</span><del>- if (namedFlowFragment->isPseudoElementRegion())
</del><ins>+ if (namedFlowFragment.isPseudoElementRegion())
</ins><span class="cx"> continue;
</span><del>- if (m_parentFlowThread->objectInFlowRegion(contentNode->renderer(), namedFlowFragment)) {
- ASSERT(namedFlowFragment->generatingElement());
- regionElements.append(*namedFlowFragment->generatingElement());
</del><ins>+ if (m_parentFlowThread->objectInFlowRegion(contentNode->renderer(), &namedFlowFragment)) {
+ ASSERT(namedFlowFragment.generatingElement());
+ regionElements.append(*namedFlowFragment.generatingElement());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -165,14 +165,14 @@
</span><span class="cx">
</span><span class="cx"> const RenderRegionList& regionList = m_parentFlowThread->renderRegionList();
</span><span class="cx"> for (const auto& renderRegion : regionList) {
</span><del>- const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+ const auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*renderRegion);
</ins><span class="cx"> // FIXME: Pseudo-elements are not included in the list.
</span><span class="cx"> // They will be included when we will properly support the Region interface
</span><span class="cx"> // http://dev.w3.org/csswg/css-regions/#the-region-interface
</span><del>- if (namedFlowFragment->isPseudoElementRegion())
</del><ins>+ if (namedFlowFragment.isPseudoElementRegion())
</ins><span class="cx"> continue;
</span><del>- ASSERT(namedFlowFragment->generatingElement());
- regionElements.append(*namedFlowFragment->generatingElement());
</del><ins>+ ASSERT(namedFlowFragment.generatingElement());
+ regionElements.append(*namedFlowFragment.generatingElement());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return StaticElementList::adopt(regionElements);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1912,9 +1912,9 @@
</span><span class="cx"> if (!n)
</span><span class="cx"> return false;
</span><span class="cx"> RenderObject* renderer = n->renderer();
</span><del>- if (!renderer || !renderer->isWidget())
</del><ins>+ if (!is<RenderWidget>(renderer))
</ins><span class="cx"> return false;
</span><del>- Widget* widget = toRenderWidget(renderer)->widget();
</del><ins>+ Widget* widget = downcast<RenderWidget>(*renderer).widget();
</ins><span class="cx"> return widget && widget->isFrameView();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLEmbedElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLEmbedElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLEmbedElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLEmbedElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -55,17 +55,18 @@
</span><span class="cx"> return adoptRef(new HTMLEmbedElement(tagName, document, createdByParser));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline RenderWidget* findWidgetRenderer(const Node* n)
</del><ins>+static inline RenderWidget* findWidgetRenderer(const Node* node)
</ins><span class="cx"> {
</span><del>- if (!n->renderer())
- do
- n = n->parentNode();
- while (n && !n->hasTagName(objectTag));
</del><ins>+ if (!node->renderer()) {
+ do {
+ node = node->parentNode();
+ } while (node && !is<HTMLObjectElement>(*node));
+ }
</ins><span class="cx">
</span><del>- if (n && n->renderer() && n->renderer()->isWidget())
- return toRenderWidget(n->renderer());
</del><ins>+ if (node && is<RenderWidget>(node->renderer()))
+ return downcast<RenderWidget>(node->renderer());
</ins><span class="cx">
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderWidget* HTMLEmbedElement::renderWidgetLoadingPlugin() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Document& document)
</span><span class="cx"> : HTMLElement(tagName, document)
</span><del>- , m_contentFrame(0)
</del><ins>+ , m_contentFrame(nullptr)
</ins><span class="cx"> , m_sandboxFlags(SandboxNone)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -43,9 +43,9 @@
</span><span class="cx"> {
</span><span class="cx"> // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
</span><span class="cx"> // when using fallback content.
</span><del>- if (!renderer() || !renderer()->isWidget())
- return 0;
- return toRenderWidget(renderer());
</del><ins>+ if (!is<RenderWidget>(renderer()))
+ return nullptr;
+ return downcast<RenderWidget>(renderer());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLFrameOwnerElement::setContentFrame(Frame* frame)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -4245,8 +4245,8 @@
</span><span class="cx">
</span><span class="cx"> bool HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated(MediaPlayer*)
</span><span class="cx"> {
</span><del>- if (renderer() && renderer()->isVideo())
- return renderer()->view().compositor().canAccelerateVideoRendering(toRenderVideo(*renderer()));
</del><ins>+ if (is<RenderVideo>(renderer()))
+ return renderer()->view().compositor().canAccelerateVideoRendering(downcast<RenderVideo>(*renderer()));
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMeterElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMeterElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMeterElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLMeterElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -220,9 +220,9 @@
</span><span class="cx">
</span><span class="cx"> RenderMeter* HTMLMeterElement::renderMeter() const
</span><span class="cx"> {
</span><del>- if (renderer() && renderer()->isMeter())
- return toRenderMeter(renderer());
- return toRenderMeter(descendantsOfType<Element>(*userAgentShadowRoot()).first()->renderer());
</del><ins>+ if (is<RenderMeter>(renderer()))
+ return downcast<RenderMeter>(renderer());
+ return downcast<RenderMeter>(descendantsOfType<Element>(*userAgentShadowRoot()).first()->renderer());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLMeterElement::didAddUserAgentShadowRoot(ShadowRoot* root)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLPlugInElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -275,9 +275,9 @@
</span><span class="cx"> if (HTMLFrameOwnerElement::supportsFocus())
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (useFallbackContent() || !renderer() || !renderer()->isEmbeddedObject())
</del><ins>+ if (useFallbackContent() || !is<RenderEmbeddedObject>(renderer()))
</ins><span class="cx"> return false;
</span><del>- return !toRenderEmbeddedObject(renderer())->isPluginUnavailable();
</del><ins>+ return !downcast<RenderEmbeddedObject>(*renderer()).isPluginUnavailable();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -145,9 +145,7 @@
</span><span class="cx"> {
</span><span class="cx"> // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
</span><span class="cx"> // when using fallback content.
</span><del>- if (!renderer() || !renderer()->isEmbeddedObject())
- return 0;
- return toRenderEmbeddedObject(renderer());
</del><ins>+ return is<RenderEmbeddedObject>(renderer()) ? downcast<RenderEmbeddedObject>(renderer()) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool HTMLPlugInImageElement::isImageType()
</span><span class="lines">@@ -693,7 +691,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto& renderer = toRenderEmbeddedObject(*this->renderer());
</del><ins>+ auto& renderer = downcast<RenderEmbeddedObject>(*this->renderer());
</ins><span class="cx"> LayoutRect contentRect = renderer.contentBoxRect();
</span><span class="cx"> int contentWidth = contentRect.width();
</span><span class="cx"> int contentHeight = contentRect.height();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLProgressElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLProgressElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLProgressElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/HTMLProgressElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -72,9 +72,9 @@
</span><span class="cx">
</span><span class="cx"> RenderProgress* HTMLProgressElement::renderProgress() const
</span><span class="cx"> {
</span><del>- if (renderer() && renderer()->isProgress())
- return toRenderProgress(renderer());
- return toRenderProgress(descendantsOfType<Element>(*userAgentShadowRoot()).first()->renderer());
</del><ins>+ if (is<RenderProgress>(renderer()))
+ return downcast<RenderProgress>(renderer());
+ return downcast<RenderProgress>(descendantsOfType<Element>(*userAgentShadowRoot()).first()->renderer());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLProgressElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlPluginDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/PluginDocument.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/PluginDocument.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/PluginDocument.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -155,11 +155,9 @@
</span><span class="cx">
</span><span class="cx"> Widget* PluginDocument::pluginWidget()
</span><span class="cx"> {
</span><del>- if (m_pluginElement && m_pluginElement->renderer()) {
- ASSERT(m_pluginElement->renderer()->isEmbeddedObject());
- return toRenderEmbeddedObject(m_pluginElement->renderer())->widget();
- }
- return 0;
</del><ins>+ if (m_pluginElement && m_pluginElement->renderer())
+ return downcast<RenderEmbeddedObject>(*m_pluginElement->renderer()).widget();
+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PluginDocument::setPluginElement(PassRefPtr<HTMLPlugInElement> element)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlshadowMediaControlElementscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -872,8 +872,8 @@
</span><span class="cx"> if (event->type() == eventNames().inputEvent && time != mediaController()->currentTime())
</span><span class="cx"> mediaController()->setCurrentTime(time);
</span><span class="cx">
</span><del>- RenderSlider* slider = toRenderSlider(renderer());
- if (slider && slider->inDragMode())
</del><ins>+ RenderSlider& slider = downcast<RenderSlider>(*renderer());
+ if (slider.inDragMode())
</ins><span class="cx"> m_controls->updateCurrentTimeDisplay();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1337,9 +1337,9 @@
</span><span class="cx"> if (m_textTrackRepresentation)
</span><span class="cx"> videoBox = m_textTrackRepresentation->bounds();
</span><span class="cx"> else {
</span><del>- if (!mediaElement->renderer() || !mediaElement->renderer()->isVideo())
</del><ins>+ if (!is<RenderVideo>(mediaElement->renderer()))
</ins><span class="cx"> return;
</span><del>- videoBox = toRenderVideo(*mediaElement->renderer()).videoBox();
</del><ins>+ videoBox = downcast<RenderVideo>(*mediaElement->renderer()).videoBox();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!forceUpdate && m_videoDisplaySize == videoBox)
</span><span class="lines">@@ -1363,14 +1363,14 @@
</span><span class="cx">
</span><span class="cx"> document().updateLayout();
</span><span class="cx">
</span><del>- auto renderer = this->renderer();
</del><ins>+ auto* renderer = this->renderer();
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> if (!renderer->hasLayer())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RenderLayer* layer = toRenderLayerModelObject(renderer)->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(*renderer).layer();
</ins><span class="cx">
</span><span class="cx"> float deviceScaleFactor = 1;
</span><span class="cx"> if (Page* page = document().page())
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorLayerTreeAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/inspector/InspectorLayerTreeAgent.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx"> void InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy(ErrorString& errorString, RenderObject* renderer, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::LayerTree::Layer>>& layers)
</span><span class="cx"> {
</span><span class="cx"> if (renderer->hasLayer()) {
</span><del>- gatherLayersUsingRenderLayerHierarchy(errorString, toRenderLayerModelObject(renderer)->layer(), layers);
</del><ins>+ gatherLayersUsingRenderLayerHierarchy(errorString, downcast<RenderLayerModelObject>(*renderer).layer(), layers);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -722,9 +722,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderFlowThread* containingFlowThread = renderer->flowThreadContainingBlock();
</span><del>- if (containingFlowThread && containingFlowThread->isRenderNamedFlowThread()) {
</del><ins>+ if (is<RenderNamedFlowThread>(containingFlowThread)) {
</ins><span class="cx"> RefPtr<InspectorObject> contentFlowInfo = InspectorObject::create();
</span><del>- contentFlowInfo->setString("name", toRenderNamedFlowThread(containingFlowThread)->flowThreadName());
</del><ins>+ contentFlowInfo->setString("name", downcast<RenderNamedFlowThread>(*containingFlowThread).flowThreadName());
</ins><span class="cx"> elementInfo->setObject("contentFlowInfo", contentFlowInfo.release());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubframeLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubframeLoader.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -328,10 +328,10 @@
</span><span class="cx"> // FIXME: Can we remove this entirely? m_isComplete normally gets set to false when a load is committed.
</span><span class="cx"> frame->loader().started();
</span><span class="cx">
</span><del>- RenderObject* renderer = ownerElement.renderer();
</del><ins>+ auto* renderer = ownerElement.renderer();
</ins><span class="cx"> FrameView* view = frame->view();
</span><del>- if (renderer && renderer->isWidget() && view)
- toRenderWidget(renderer)->setWidget(view);
</del><ins>+ if (is<RenderWidget>(renderer) && view)
+ downcast<RenderWidget>(*renderer).setWidget(view);
</ins><span class="cx">
</span><span class="cx"> m_frame.loader().checkCallImplicitClose();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/page/Frame.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -735,17 +735,17 @@
</span><span class="cx"> {
</span><span class="cx"> HTMLFrameOwnerElement* ownerElement = m_ownerElement;
</span><span class="cx"> if (!ownerElement)
</span><del>- return 0;
- auto object = ownerElement->renderer();
</del><ins>+ return nullptr;
+ auto* object = ownerElement->renderer();
</ins><span class="cx"> if (!object)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> // FIXME: If <object> is ever fixed to disassociate itself from frames
</span><span class="cx"> // that it has started but canceled, then this can turn into an ASSERT
</span><span class="cx"> // since m_ownerElement would be 0 when the load is canceled.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=18585
</span><del>- if (!object->isWidget())
- return 0;
- return toRenderWidget(object);
</del><ins>+ if (!is<RenderWidget>(*object))
+ return nullptr;
+ return downcast<RenderWidget>(object);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Frame* Frame::frameForWidget(const Widget* widget)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1237,7 +1237,7 @@
</span><span class="cx">
</span><span class="cx"> autoSizeIfEnabled();
</span><span class="cx">
</span><del>- m_needsFullRepaint = !subtree && (m_firstLayout || toRenderView(*root).printing());
</del><ins>+ m_needsFullRepaint = !subtree && (m_firstLayout || downcast<RenderView>(*root).printing());
</ins><span class="cx">
</span><span class="cx"> if (!subtree) {
</span><span class="cx"> ScrollbarMode hMode;
</span><span class="lines">@@ -1325,7 +1325,7 @@
</span><span class="cx"> if (subtree)
</span><span class="cx"> root->view().popLayoutState(*root);
</span><span class="cx">
</span><del>- m_layoutRoot = 0;
</del><ins>+ m_layoutRoot = nullptr;
</ins><span class="cx">
</span><span class="cx"> // Close block here to end the scope of changeSchedulingEnabled and layoutStateDisabler.
</span><span class="cx"> }
</span><span class="lines">@@ -1334,7 +1334,7 @@
</span><span class="cx">
</span><span class="cx"> bool neededFullRepaint = m_needsFullRepaint;
</span><span class="cx">
</span><del>- if (!subtree && !toRenderView(*root).printing())
</del><ins>+ if (!subtree && !downcast<RenderView>(*root).printing())
</ins><span class="cx"> adjustViewSize();
</span><span class="cx">
</span><span class="cx"> m_layoutPhase = InPostLayout;
</span></span></pre></div>
<a id="trunkSourceWebCorepagegtkEventHandlerGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -61,10 +61,10 @@
</span><span class="cx"> bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
</span><span class="cx"> {
</span><span class="cx"> // Figure out which view to send the event to.
</span><del>- RenderObject* target = event.targetNode() ? event.targetNode()->renderer() : 0;
- if (!target || !target->isWidget())
</del><ins>+ RenderObject* target = event.targetNode() ? event.targetNode()->renderer() : nullptr;
+ if (!is<RenderWidget>(target))
</ins><span class="cx"> return false;
</span><del>- return passMouseDownEventToWidget(toRenderWidget(target)->widget());
</del><ins>+ return passMouseDownEventToWidget(downcast<RenderWidget>(*target).widget());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
</span></span></pre></div>
<a id="trunkSourceWebCorepageiosEventHandlerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ios/EventHandlerIOS.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ios/EventHandlerIOS.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/page/ios/EventHandlerIOS.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -169,15 +169,15 @@
</span><span class="cx"> bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
</span><span class="cx"> {
</span><span class="cx"> // Figure out which view to send the event to.
</span><del>- auto target = event.targetNode() ? event.targetNode()->renderer() : nullptr;
- if (!target || !target->isWidget())
</del><ins>+ auto* target = event.targetNode() ? event.targetNode()->renderer() : nullptr;
+ if (!is<RenderWidget>(target))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> // Double-click events don't exist in Cocoa. Since passWidgetMouseDownEventToWidget() will
</span><span class="cx"> // just pass currentEvent down to the widget, we don't want to call it for events that
</span><span class="cx"> // don't correspond to Cocoa events. The mousedown/ups will have already been passed on as
</span><span class="cx"> // part of the pressed/released handling.
</span><del>- return passMouseDownEventToWidget(toRenderWidget(target)->widget());
</del><ins>+ return passMouseDownEventToWidget(downcast<RenderWidget>(*target).widget());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
</span><span class="lines">@@ -363,13 +363,13 @@
</span><span class="cx"> Node* node = event.targetNode();
</span><span class="cx"> if (!node)
</span><span class="cx"> return false;
</span><del>- auto renderer = node->renderer();
- if (!renderer || !renderer->isWidget())
</del><ins>+ auto* renderer = node->renderer();
+ if (!is<RenderWidget>(renderer))
</ins><span class="cx"> return false;
</span><del>- Widget* widget = toRenderWidget(renderer)->widget();
</del><ins>+ Widget* widget = downcast<RenderWidget>(*renderer).widget();
</ins><span class="cx"> if (!widget || !widget->isFrameView())
</span><span class="cx"> return false;
</span><del>- if (!passWidgetMouseDownEventToWidget(toRenderWidget(renderer)))
</del><ins>+ if (!passWidgetMouseDownEventToWidget(downcast<RenderWidget>(renderer)))
</ins><span class="cx"> return false;
</span><span class="cx"> m_mouseDownWasInSubframe = true;
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacEventHandlerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -143,15 +143,15 @@
</span><span class="cx"> bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
</span><span class="cx"> {
</span><span class="cx"> // Figure out which view to send the event to.
</span><del>- auto target = event.targetNode() ? event.targetNode()->renderer() : nullptr;
- if (!target || !target->isWidget())
</del><ins>+ auto* target = event.targetNode() ? event.targetNode()->renderer() : nullptr;
+ if (!is<RenderWidget>(target))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> // Double-click events don't exist in Cocoa. Since passWidgetMouseDownEventToWidget() will
</span><span class="cx"> // just pass currentEvent down to the widget, we don't want to call it for events that
</span><span class="cx"> // don't correspond to Cocoa events. The mousedown/ups will have already been passed on as
</span><span class="cx"> // part of the pressed/released handling.
</span><del>- return passMouseDownEventToWidget(toRenderWidget(target)->widget());
</del><ins>+ return passMouseDownEventToWidget(downcast<RenderWidget>(*target).widget());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
</span><span class="lines">@@ -361,13 +361,13 @@
</span><span class="cx"> Node* node = event.targetNode();
</span><span class="cx"> if (!node)
</span><span class="cx"> return false;
</span><del>- auto renderer = node->renderer();
- if (!renderer || !renderer->isWidget())
</del><ins>+ auto* renderer = node->renderer();
+ if (!is<RenderWidget>(renderer))
</ins><span class="cx"> return false;
</span><del>- Widget* widget = toRenderWidget(renderer)->widget();
</del><ins>+ Widget* widget = downcast<RenderWidget>(*renderer).widget();
</ins><span class="cx"> if (!widget || !widget->isFrameView())
</span><span class="cx"> return false;
</span><del>- if (!passWidgetMouseDownEventToWidget(toRenderWidget(renderer)))
</del><ins>+ if (!passWidgetMouseDownEventToWidget(downcast<RenderWidget>(renderer)))
</ins><span class="cx"> return false;
</span><span class="cx"> m_mouseDownWasInSubframe = true;
</span><span class="cx"> return true;
</span><span class="lines">@@ -785,11 +785,11 @@
</span><span class="cx"> if (!eventTarget)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RenderElement* target = eventTarget->renderer();
- if (!target || !target->isWidget())
</del><ins>+ auto* target = eventTarget->renderer();
+ if (!is<RenderWidget>(target))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return toRenderWidget(target)->widget();
</del><ins>+ return downcast<RenderWidget>(*target).widget();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static ScrollView* scrollViewForEventTarget(Element* eventTarget)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflRenderThemeEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -301,11 +301,10 @@
</span><span class="cx"> void RenderThemeEfl::applyEdjeRTLState(Evas_Object* edje, const RenderObject& object, FormType type, const IntRect& rect)
</span><span class="cx"> {
</span><span class="cx"> if (type == SliderVertical || type == SliderHorizontal) {
</span><del>- if (!object.isSlider())
</del><ins>+ if (!is<RenderSlider>(object))
</ins><span class="cx"> return; // probably have -webkit-appearance: slider..
</span><span class="cx">
</span><del>- const RenderSlider* renderSlider = toRenderSlider(&object);
- HTMLInputElement& input = renderSlider->element();
</del><ins>+ HTMLInputElement& input = downcast<RenderSlider>(object).element();
</ins><span class="cx"> double valueRange = input.maximum() - input.minimum();
</span><span class="cx">
</span><span class="cx"> OwnPtr<Edje_Message_Float_Set> msg = adoptPtr(static_cast<Edje_Message_Float_Set*>(::operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
</span><span class="lines">@@ -323,7 +322,7 @@
</span><span class="cx"> msg->val[1] = (input.valueAsNumber() - input.minimum()) / valueRange;
</span><span class="cx"> edje_object_message_send(edje, EDJE_MESSAGE_FLOAT_SET, 0, msg.get());
</span><span class="cx"> } else if (type == ProgressBar) {
</span><del>- const RenderProgress& renderProgress = toRenderProgress(object);
</del><ins>+ const auto& renderProgress = downcast<RenderProgress>(object);
</ins><span class="cx">
</span><span class="cx"> int max = rect.width();
</span><span class="cx"> double value = renderProgress.position();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -248,8 +248,8 @@
</span><span class="cx">
</span><span class="cx"> static const Font& fontToUse(const RenderStyle& style, const RenderText& renderer)
</span><span class="cx"> {
</span><del>- if (style.hasTextCombine() && renderer.isCombineText()) {
- const RenderCombineText& textCombineRenderer = toRenderCombineText(renderer);
</del><ins>+ if (style.hasTextCombine() && is<RenderCombineText>(renderer)) {
+ const auto& textCombineRenderer = downcast<RenderCombineText>(renderer);
</ins><span class="cx"> if (textCombineRenderer.isCombined())
</span><span class="cx"> return textCombineRenderer.textCombineFont();
</span><span class="cx"> }
</span><span class="lines">@@ -454,10 +454,10 @@
</span><span class="cx"> if (!containingBlock->isRubyBase())
</span><span class="cx"> return true; // This text is not inside a ruby base, so it does not have ruby text over it.
</span><span class="cx">
</span><del>- if (!containingBlock->parent()->isRubyRun())
</del><ins>+ if (!is<RenderRubyRun>(*containingBlock->parent()))
</ins><span class="cx"> return true; // Cannot get the ruby text.
</span><span class="cx">
</span><del>- RenderRubyText* rubyText = toRenderRubyRun(containingBlock->parent())->rubyText();
</del><ins>+ RenderRubyText* rubyText = downcast<RenderRubyRun>(*containingBlock->parent()).rubyText();
</ins><span class="cx">
</span><span class="cx"> // The emphasis marks over are suppressed only if there is a ruby text box and it not empty.
</span><span class="cx"> return !rubyText || !rubyText->hasLines();
</span><span class="lines">@@ -519,7 +519,7 @@
</span><span class="cx"> boxOrigin.moveBy(localPaintOffset);
</span><span class="cx"> FloatRect boxRect(boxOrigin, FloatSize(logicalWidth(), logicalHeight()));
</span><span class="cx">
</span><del>- RenderCombineText* combinedText = lineStyle.hasTextCombine() && renderer().isCombineText() && toRenderCombineText(renderer()).isCombined() ? &toRenderCombineText(renderer()) : 0;
</del><ins>+ RenderCombineText* combinedText = lineStyle.hasTextCombine() && is<RenderCombineText>(renderer()) && downcast<RenderCombineText>(renderer()).isCombined() ? &downcast<RenderCombineText>(renderer()) : nullptr;
</ins><span class="cx">
</span><span class="cx"> bool shouldRotate = !isHorizontal() && !combinedText;
</span><span class="cx"> if (shouldRotate)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingLayoutStatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/LayoutState.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -112,8 +112,8 @@
</span><span class="cx"> m_layoutDeltaYSaturated = m_next->m_layoutDeltaYSaturated;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (lineGrid() && (lineGrid()->style().writingMode() == renderer->style().writingMode()) && renderer->isRenderMultiColumnFlowThread())
- toRenderMultiColumnFlowThread(renderer)->computeLineGridPaginationOrigin(*this);
</del><ins>+ if (lineGrid() && (lineGrid()->style().writingMode() == renderer->style().writingMode()) && is<RenderMultiColumnFlowThread>(*renderer))
+ downcast<RenderMultiColumnFlowThread>(*renderer).computeLineGridPaginationOrigin(*this);
</ins><span class="cx">
</span><span class="cx"> // If we have a new grid to track, then add it to our set.
</span><span class="cx"> if (renderer->style().lineGrid() != RenderStyle::initialLineGrid() && is<RenderBlockFlow>(*renderer))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -705,8 +705,8 @@
</span><span class="cx"> RenderObject* nextSibling = child->nextSibling();
</span><span class="cx">
</span><span class="cx"> RenderFlowThread* childFlowThread = child->flowThreadContainingBlock();
</span><del>- if (childFlowThread && childFlowThread->isRenderNamedFlowThread())
- toRenderNamedFlowThread(childFlowThread)->removeFlowChildInfo(child);
</del><ins>+ if (is<RenderNamedFlowThread>(childFlowThread))
+ downcast<RenderNamedFlowThread>(*childFlowThread).removeFlowChildInfo(child);
</ins><span class="cx">
</span><span class="cx"> parent.removeChildInternal(*child, child->hasLayer() ? NotifyChildren : DontNotifyChildren);
</span><span class="cx"> child->moveAllChildrenTo(&parent, nextSibling, child->hasLayer());
</span><span class="lines">@@ -1268,8 +1268,8 @@
</span><span class="cx">
</span><span class="cx"> // Make sure a forced break is applied after the content if we are a flow thread in a simplified layout.
</span><span class="cx"> // This ensures the size information is correctly computed for the last auto-height region receiving content.
</span><del>- if (isRenderFlowThread())
- toRenderFlowThread(this)->applyBreakAfterContent(clientLogicalBottom());
</del><ins>+ if (is<RenderFlowThread>(*this))
+ downcast<RenderFlowThread>(*this).applyBreakAfterContent(clientLogicalBottom());
</ins><span class="cx">
</span><span class="cx"> // Lay out our positioned objects if our positioned child bit is set.
</span><span class="cx"> // Also, if an absolute position element inside a relative positioned container moves, and the absolute element has a fixed position
</span><span class="lines">@@ -1580,7 +1580,7 @@
</span><span class="cx"> bool didClipToRegion = false;
</span><span class="cx">
</span><span class="cx"> RenderNamedFlowFragment* namedFlowFragment = currentRenderNamedFlowFragment();
</span><del>- if (paintInfo.paintContainer && namedFlowFragment && paintInfo.paintContainer->isRenderNamedFlowThread()) {
</del><ins>+ if (namedFlowFragment && is<RenderNamedFlowThread>(paintInfo.paintContainer)) {
</ins><span class="cx"> // If this box goes beyond the current region, then make sure not to overflow the region.
</span><span class="cx"> // This (overflowing region X altough also fragmented to region X+1) could happen when one of this box's children
</span><span class="cx"> // overflows region X and is an unsplittable element (like an image).
</span><span class="lines">@@ -1589,7 +1589,7 @@
</span><span class="cx"> paintInfo.context->save();
</span><span class="cx"> didClipToRegion = true;
</span><span class="cx">
</span><del>- paintInfo.context->clip(toRenderNamedFlowThread(paintInfo.paintContainer)->decorationsClipRectForBoxInNamedFlowFragment(*this, *namedFlowFragment));
</del><ins>+ paintInfo.context->clip(downcast<RenderNamedFlowThread>(*paintInfo.paintContainer).decorationsClipRectForBoxInNamedFlowFragment(*this, *namedFlowFragment));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> paintBoxDecorations(paintInfo, paintOffset);
</span><span class="lines">@@ -1898,9 +1898,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderNamedFlowFragment* namedFlowFragment = currentRenderNamedFlowFragment();
</span><del>- if (paintInfo && namedFlowFragment && paintInfo->paintContainer->isRenderFlowThread()) {
</del><ins>+ if (paintInfo && namedFlowFragment && is<RenderFlowThread>(*paintInfo->paintContainer)) {
</ins><span class="cx"> // Make sure the current object is actually flowed into the region being painted.
</span><del>- if (!toRenderFlowThread(paintInfo->paintContainer)->objectShouldFragmentInFlowRegion(this, namedFlowFragment))
</del><ins>+ if (!downcast<RenderFlowThread>(*paintInfo->paintContainer).objectShouldFragmentInFlowRegion(this, namedFlowFragment))
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2442,7 +2442,7 @@
</span><span class="cx"> LayoutSize localOffset = toLayoutSize(adjustedLocation);
</span><span class="cx">
</span><span class="cx"> RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>- RenderNamedFlowFragment* namedFlowFragment = flowThread ? toRenderNamedFlowFragment(flowThread->currentRegion()) : nullptr;
</del><ins>+ RenderNamedFlowFragment* namedFlowFragment = flowThread ? downcast<RenderNamedFlowFragment>(flowThread->currentRegion()) : nullptr;
</ins><span class="cx"> // If we are now searching inside a region, make sure this element
</span><span class="cx"> // is being fragmented into this region.
</span><span class="cx"> if (namedFlowFragment && !flowThread->objectShouldFragmentInFlowRegion(this, namedFlowFragment))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -501,8 +501,8 @@
</span><span class="cx">
</span><span class="cx"> // Before updating the final size of the flow thread make sure a forced break is applied after the content.
</span><span class="cx"> // This ensures the size information is correctly computed for the last auto-height region receiving content.
</span><del>- if (isRenderFlowThread())
- toRenderFlowThread(this)->applyBreakAfterContent(oldClientAfterEdge);
</del><ins>+ if (is<RenderFlowThread>(*this))
+ downcast<RenderFlowThread>(*this).applyBreakAfterContent(oldClientAfterEdge);
</ins><span class="cx">
</span><span class="cx"> updateLogicalHeight();
</span><span class="cx"> LayoutUnit newHeight = logicalHeight();
</span><span class="lines">@@ -2826,8 +2826,8 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> LayoutPoint adjustedLocation = accumulatedOffset;
</span><del>- if (isRenderView())
- adjustedLocation += toLayoutSize(toRenderView(*this).frameView().scrollPosition());
</del><ins>+ if (is<RenderView>(*this))
+ adjustedLocation += toLayoutSize(downcast<RenderView>(*this).frameView().scrollPosition());
</ins><span class="cx">
</span><span class="cx"> const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
</span><span class="cx"> auto begin = floatingObjectSet.begin();
</span><span class="lines">@@ -3724,8 +3724,8 @@
</span><span class="cx"> flowThread->setColumnHeightAvailable(std::max<LayoutUnit>(columnHeight, 0));
</span><span class="cx"> if (oldHeightAvailable != flowThread->columnHeightAvailable())
</span><span class="cx"> relayoutChildren = true;
</span><del>- } else if (isRenderFlowThread()) {
- RenderFlowThread* flowThread = toRenderFlowThread(this);
</del><ins>+ } else if (is<RenderFlowThread>(*this)) {
+ RenderFlowThread& flowThread = downcast<RenderFlowThread>(*this);
</ins><span class="cx">
</span><span class="cx"> // FIXME: This is a hack to always make sure we have a page logical height, if said height
</span><span class="cx"> // is known. The page logical height thing in LayoutState is meaningless for flow
</span><span class="lines">@@ -3736,9 +3736,9 @@
</span><span class="cx"> // it's unknown, we need to prevent the pagination code from assuming page breaks everywhere
</span><span class="cx"> // and thereby eating every top margin. It should be trivial to clean up and get rid of this
</span><span class="cx"> // hack once the old multicol implementation is gone.
</span><del>- pageLogicalHeight = flowThread->isPageLogicalHeightKnown() ? LayoutUnit(1) : LayoutUnit(0);
</del><ins>+ pageLogicalHeight = flowThread.isPageLogicalHeightKnown() ? LayoutUnit(1) : LayoutUnit(0);
</ins><span class="cx">
</span><del>- pageLogicalHeightChanged = flowThread->pageLogicalSizeChanged();
</del><ins>+ pageLogicalHeightChanged = flowThread.pageLogicalSizeChanged();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -734,7 +734,7 @@
</span><span class="cx"> setLogicalWidthForTextRun(lineBox, run, &renderText, totalLogicalWidth, lineInfo, textBoxDataMap, verticalPositionCache, wordMeasurements);
</span><span class="cx"> } else {
</span><span class="cx"> bool encounteredJustifiedRuby = false;
</span><del>- if (is<RenderRubyRun>(run->renderer()) && textAlign == JUSTIFY && run != trailingSpaceRun && toRenderRubyRun(run->renderer()).rubyBase()) {
</del><ins>+ if (is<RenderRubyRun>(run->renderer()) && textAlign == JUSTIFY && run != trailingSpaceRun && downcast<RenderRubyRun>(run->renderer()).rubyBase()) {
</ins><span class="cx"> auto* rubyBase = downcast<RenderRubyRun>(run->renderer()).rubyBase();
</span><span class="cx"> if (rubyBase->firstRootBox() && !rubyBase->firstRootBox()->nextRootBox() && run->renderer().style().collapseWhiteSpace()) {
</span><span class="cx"> for (auto* leafChild = rubyBase->firstRootBox()->firstLeafChild(); leafChild; leafChild = leafChild->nextLeafChild()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -804,9 +804,9 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> RenderBlock* nextScrollBlock = containingBlock();
</span><del>- if (nextScrollBlock && nextScrollBlock->isRenderNamedFlowThread()) {
</del><ins>+ if (is<RenderNamedFlowThread>(nextScrollBlock)) {
</ins><span class="cx"> ASSERT(startBox);
</span><del>- nextScrollBlock = toRenderNamedFlowThread(nextScrollBlock)->fragmentFromAbsolutePointAndBox(wheelEventAbsolutePoint, *startBox);
</del><ins>+ nextScrollBlock = downcast<RenderNamedFlowThread>(*nextScrollBlock).fragmentFromAbsolutePointAndBox(wheelEventAbsolutePoint, *startBox);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (nextScrollBlock && !nextScrollBlock->isRenderView())
</span><span class="lines">@@ -1166,7 +1166,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>- RenderRegion* regionToUse = flowThread ? toRenderNamedFlowFragment(flowThread->currentRegion()) : nullptr;
</del><ins>+ RenderRegion* regionToUse = flowThread ? downcast<RenderNamedFlowFragment>(flowThread->currentRegion()) : nullptr;
</ins><span class="cx">
</span><span class="cx"> // If the box is not contained by this region there's no point in going further.
</span><span class="cx"> if (regionToUse && !flowThread->objectShouldFragmentInFlowRegion(this, regionToUse))
</span><span class="lines">@@ -1640,7 +1640,7 @@
</span><span class="cx"> bool RenderBox::repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer* layers, bool drawingBackground)
</span><span class="cx"> {
</span><span class="cx"> LayoutRect rendererRect;
</span><del>- RenderBox* layerRenderer = 0;
</del><ins>+ RenderBox* layerRenderer = nullptr;
</ins><span class="cx">
</span><span class="cx"> for (const FillLayer* curLayer = layers; curLayer; curLayer = curLayer->next()) {
</span><span class="cx"> if (curLayer->image() && image == curLayer->image()->data() && curLayer->image()->canRender(this, style().effectiveZoom())) {
</span><span class="lines">@@ -1650,8 +1650,8 @@
</span><span class="cx"> if (drawingRootBackground) {
</span><span class="cx"> layerRenderer = &view();
</span><span class="cx">
</span><del>- LayoutUnit rw = toRenderView(*layerRenderer).frameView().contentsWidth();
- LayoutUnit rh = toRenderView(*layerRenderer).frameView().contentsHeight();
</del><ins>+ LayoutUnit rw = downcast<RenderView>(*layerRenderer).frameView().contentsWidth();
+ LayoutUnit rh = downcast<RenderView>(*layerRenderer).frameView().contentsHeight();
</ins><span class="cx">
</span><span class="cx"> rendererRect = LayoutRect(-layerRenderer->marginLeft(),
</span><span class="cx"> -layerRenderer->marginTop(),
</span><span class="lines">@@ -1664,7 +1664,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> BackgroundImageGeometry geometry;
</span><del>- layerRenderer->calculateBackgroundImageGeometry(0, curLayer, rendererRect, geometry);
</del><ins>+ layerRenderer->calculateBackgroundImageGeometry(nullptr, curLayer, rendererRect, geometry);
</ins><span class="cx"> if (geometry.hasNonLocalGeometry()) {
</span><span class="cx"> // Rather than incur the costs of computing the paintContainer for renderers with fixed backgrounds
</span><span class="cx"> // in order to get the right destRect, just repaint the entire renderer.
</span><span class="lines">@@ -1958,7 +1958,7 @@
</span><span class="cx"> if (!container->isOutOfFlowRenderFlowThread() || !fixedPositionedWithNamedFlowContainingBlock())
</span><span class="cx"> container->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
</span><span class="cx"> else
</span><del>- container->mapLocalToContainer(toRenderLayerModelObject(container), transformState, mode, wasFixed);
</del><ins>+ container->mapLocalToContainer(downcast<RenderLayerModelObject>(container), transformState, mode, wasFixed);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const RenderObject* RenderBox::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
</span><span class="lines">@@ -3097,15 +3097,15 @@
</span><span class="cx"> const RenderBlock& cb = downcast<RenderBlock>(*containingBlock);
</span><span class="cx"> RenderBoxRegionInfo* boxInfo = nullptr;
</span><span class="cx"> if (!region) {
</span><del>- if (containingBlock->isRenderFlowThread() && !checkForPerpendicularWritingMode)
- return toRenderFlowThread(containingBlock)->contentLogicalWidthOfFirstRegion();
</del><ins>+ if (is<RenderFlowThread>(*containingBlock) && !checkForPerpendicularWritingMode)
+ return downcast<RenderFlowThread>(*containingBlock).contentLogicalWidthOfFirstRegion();
</ins><span class="cx"> if (isWritingModeRoot()) {
</span><span class="cx"> LayoutUnit cbPageOffset = cb.offsetFromLogicalTopOfFirstPage();
</span><span class="cx"> RenderRegion* cbRegion = cb.regionAtBlockOffset(cbPageOffset);
</span><span class="cx"> if (cbRegion)
</span><span class="cx"> boxInfo = cb.renderBoxRegionInfo(cbRegion);
</span><span class="cx"> }
</span><del>- } else if (region && flowThread->isHorizontalWritingMode() == containingBlock->isHorizontalWritingMode()) {
</del><ins>+ } else if (flowThread->isHorizontalWritingMode() == containingBlock->isHorizontalWritingMode()) {
</ins><span class="cx"> RenderRegion* containingBlockRegion = cb.clampToStartAndEndRegions(region);
</span><span class="cx"> boxInfo = cb.renderBoxRegionInfo(containingBlockRegion);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderCombineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderCombineText.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderCombineText.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderCombineText.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -57,8 +57,6 @@
</span><span class="cx"> bool m_needsFontUpdate : 1;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderCombineText, isCombineText())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderCombineText, isCombineText())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx"> // Text nodes share style with their parents but transforms don't apply to them,
</span><span class="cx"> // hence the !isText() check.
</span><span class="cx"> // FIXME: when transforms are taken into account for overflow, we will need to do a layout.
</span><del>- if (!hasLayer() || !toRenderLayerModelObject(this)->layer()->isComposited()) {
</del><ins>+ if (!hasLayer() || !downcast<RenderLayerModelObject>(*this).layer()->isComposited()) {
</ins><span class="cx"> // We need to set at least SimplifiedLayout, but if PositionedMovementOnly is already set
</span><span class="cx"> // then we actually need SimplifiedLayoutAndPositionedMovement.
</span><span class="cx"> if (!hasLayer())
</span><span class="lines">@@ -272,14 +272,14 @@
</span><span class="cx"> // If opacity changed, and we are not composited, need to repaint (also
</span><span class="cx"> // ignoring text nodes)
</span><span class="cx"> if (contextSensitiveProperties & ContextSensitivePropertyOpacity) {
</span><del>- if (!hasLayer() || !toRenderLayerModelObject(this)->layer()->isComposited())
</del><ins>+ if (!hasLayer() || !downcast<RenderLayerModelObject>(*this).layer()->isComposited())
</ins><span class="cx"> diff = StyleDifferenceRepaintLayer;
</span><span class="cx"> else if (diff < StyleDifferenceRecompositeLayer)
</span><span class="cx"> diff = StyleDifferenceRecompositeLayer;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLayer()) {
</span><del>- RenderLayer* layer = toRenderLayerModelObject(this)->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(*this).layer();
</ins><span class="cx"> if (!layer->isComposited() || layer->paintsWithFilters())
</span><span class="cx"> diff = StyleDifferenceRepaintLayer;
</span><span class="cx"> else if (diff < StyleDifferenceRecompositeLayer)
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> // style changing, since it depends on whether we decide to composite these elements. When the
</span><span class="cx"> // layer status of one of these elements changes, we need to force a layout.
</span><span class="cx"> if (diff == StyleDifferenceEqual && isRenderLayerModelObject()) {
</span><del>- if (hasLayer() != toRenderLayerModelObject(this)->requiresLayer())
</del><ins>+ if (hasLayer() != downcast<RenderLayerModelObject>(*this).requiresLayer())
</ins><span class="cx"> diff = StyleDifferenceLayout;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -658,7 +658,7 @@
</span><span class="cx"> beforeChild = newObject->parent()->findNextLayer(parentLayer, newObject);
</span><span class="cx"> newObject = nullptr;
</span><span class="cx"> }
</span><del>- parentLayer->addChild(toRenderLayerModelObject(renderer).layer(), beforeChild);
</del><ins>+ parentLayer->addChild(downcast<RenderLayerModelObject>(renderer).layer(), beforeChild);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -682,7 +682,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (hasLayer()) {
</span><del>- parentLayer->removeChild(toRenderLayerModelObject(this)->layer());
</del><ins>+ parentLayer->removeChild(downcast<RenderLayerModelObject>(*this).layer());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -696,7 +696,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (hasLayer()) {
</span><del>- RenderLayer* layer = toRenderLayerModelObject(this)->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(*this).layer();
</ins><span class="cx"> ASSERT(oldParent == layer->parent());
</span><span class="cx"> if (oldParent)
</span><span class="cx"> oldParent->removeChild(layer);
</span><span class="lines">@@ -1034,7 +1034,7 @@
</span><span class="cx"> setNeedsPositionedMovementLayoutBit(true);
</span><span class="cx"> markContainingBlocksForLayout();
</span><span class="cx"> if (hasLayer()) {
</span><del>- if (oldStyle && style().diffRequiresLayerRepaint(*oldStyle, toRenderLayerModelObject(this)->layer()->isComposited()))
</del><ins>+ if (oldStyle && style().diffRequiresLayerRepaint(*oldStyle, downcast<RenderLayerModelObject>(*this).layer()->isComposited()))
</ins><span class="cx"> setLayerNeedsFullRepaint();
</span><span class="cx"> else
</span><span class="cx"> setLayerNeedsFullRepaintForPositionedMovementLayout();
</span><span class="lines">@@ -1331,10 +1331,10 @@
</span><span class="cx">
</span><span class="cx"> RenderNamedFlowThread* RenderElement::renderNamedFlowThreadWrapper()
</span><span class="cx"> {
</span><del>- auto renderer = this;
- while (renderer && renderer->isAnonymousBlock() && !renderer->isRenderNamedFlowThread())
</del><ins>+ auto* renderer = this;
+ while (renderer && renderer->isAnonymousBlock() && !is<RenderNamedFlowThread>(*renderer))
</ins><span class="cx"> renderer = renderer->parent();
</span><del>- return renderer && renderer->isRenderNamedFlowThread() ? toRenderNamedFlowThread(renderer) : nullptr;
</del><ins>+ return is<RenderNamedFlowThread>(renderer) ? downcast<RenderNamedFlowThread>(renderer) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderElement::hasControlStatesForRenderer(const RenderObject* o)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderEmbeddedObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -101,8 +101,6 @@
</span><span class="cx"> String m_unavailabilityDescription;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderEmbeddedObject, isEmbeddedObject())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderEmbeddedObject, isEmbeddedObject())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include "RenderLayer.h"
</span><span class="cx"> #include "RenderLayerCompositor.h"
</span><span class="cx"> #include "RenderNamedFlowFragment.h"
</span><ins>+#include "RenderNamedFlowThread.h"
</ins><span class="cx"> #include "RenderRegion.h"
</span><span class="cx"> #include "RenderTheme.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="lines">@@ -150,8 +151,8 @@
</span><span class="cx"> // Also, if we have auto-height regions we can't assume m_regionsHaveUniformLogicalHeight to be true in the first phase
</span><span class="cx"> // because the auto-height regions don't have their height computed yet.
</span><span class="cx"> if (inMeasureContentLayoutPhase() && region->hasAutoLogicalHeight()) {
</span><del>- RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
- namedFlowFragment->setComputedAutoHeight(namedFlowFragment->maxPageLogicalHeight());
</del><ins>+ auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*region);
+ namedFlowFragment.setComputedAutoHeight(namedFlowFragment.maxPageLogicalHeight());
</ins><span class="cx"> m_regionsHaveUniformLogicalHeight = false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -217,7 +218,7 @@
</span><span class="cx"> bool RenderFlowThread::hasCompositingRegionDescendant() const
</span><span class="cx"> {
</span><span class="cx"> for (auto& region : m_regionList) {
</span><del>- if (toRenderNamedFlowFragment(region)->layerOwner().layer()->hasCompositingDescendant())
</del><ins>+ if (downcast<RenderNamedFlowFragment>(*region).layerOwner().layer()->hasCompositingDescendant())
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -240,12 +241,12 @@
</span><span class="cx"> RenderRegion* startRegion = nullptr;
</span><span class="cx"> RenderRegion* endRegion = nullptr;
</span><span class="cx"> if (getRegionRangeForBox(childLayer.renderBox(), startRegion, endRegion))
</span><del>- return toRenderNamedFlowFragment(startRegion);
</del><ins>+ return downcast<RenderNamedFlowFragment>(startRegion);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: remove this when we'll have region ranges for inlines as well.
</span><span class="cx"> LayoutPoint flowThreadOffset = flooredLayoutPoint(childLayer.renderer().localToContainerPoint(LayoutPoint(), this, ApplyContainerFlip));
</span><del>- return toRenderNamedFlowFragment(regionAtBlockOffset(0, flipForWritingMode(isHorizontalWritingMode() ? flowThreadOffset.y() : flowThreadOffset.x()), true));
</del><ins>+ return downcast<RenderNamedFlowFragment>(regionAtBlockOffset(0, flipForWritingMode(isHorizontalWritingMode() ? flowThreadOffset.y() : flowThreadOffset.x()), true));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderNamedFlowFragment* RenderFlowThread::cachedRegionForCompositedLayer(RenderLayer& childLayer) const
</span><span class="lines">@@ -713,8 +714,8 @@
</span><span class="cx"> insideNewRegionRange = true;
</span><span class="cx">
</span><span class="cx"> if (!(insideOldRegionRange && insideNewRegionRange)) {
</span><del>- if (region->isRenderNamedFlowFragment())
- toRenderNamedFlowFragment(region)->clearObjectStyleInRegion(box);
</del><ins>+ if (is<RenderNamedFlowFragment>(*region))
+ downcast<RenderNamedFlowFragment>(*region).clearObjectStyleInRegion(box);
</ins><span class="cx"> if (region->renderBoxRegionInfo(box))
</span><span class="cx"> region->removeRenderBoxRegionInfo(box);
</span><span class="cx"> }
</span><span class="lines">@@ -978,10 +979,10 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> for (auto regionIter = startRegion ? m_regionList.find(startRegion) : m_regionList.begin(), end = m_regionList.end(); regionIter != end; ++regionIter) {
</span><del>- RenderRegion* region = *regionIter;
- if (region->hasAutoLogicalHeight()) {
- RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
- namedFlowFragment->setComputedAutoHeight(namedFlowFragment->maxPageLogicalHeight());
</del><ins>+ RenderRegion& region = **regionIter;
+ if (region.hasAutoLogicalHeight()) {
+ auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(region);
+ namedFlowFragment.setComputedAutoHeight(namedFlowFragment.maxPageLogicalHeight());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1020,7 +1021,7 @@
</span><span class="cx"> for (auto& region : m_regionList) {
</span><span class="cx"> // If we find an empty auto-height region, clear the computedAutoHeight value.
</span><span class="cx"> if (emptyRegionsSegment && region->hasAutoLogicalHeight())
</span><del>- toRenderNamedFlowFragment(region)->clearComputedAutoHeight();
</del><ins>+ downcast<RenderNamedFlowFragment>(*region).clearComputedAutoHeight();
</ins><span class="cx">
</span><span class="cx"> LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
</span><span class="cx"> LayoutUnit regionLogicalHeight = std::min<LayoutUnit>(RenderFlowThread::maxLogicalHeight() - logicalHeight, region->logicalHeightOfAllFlowThreadContent());
</span><span class="lines">@@ -1082,24 +1083,24 @@
</span><span class="cx"> LayoutUnit offsetBreakInCurrentRegion = offsetBreakInFlowThread - currentRegionOffsetInFlowThread;
</span><span class="cx">
</span><span class="cx"> if (region->hasAutoLogicalHeight()) {
</span><del>- RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
</del><ins>+ auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*region);
</ins><span class="cx">
</span><span class="cx"> // A forced break can appear only in an auto-height region that didn't have a forced break before.
</span><span class="cx"> // This ASSERT is a good-enough heuristic to verify the above condition.
</span><del>- ASSERT(namedFlowFragment->maxPageLogicalHeight() == namedFlowFragment->computedAutoHeight());
</del><ins>+ ASSERT(namedFlowFragment.maxPageLogicalHeight() == namedFlowFragment.computedAutoHeight());
</ins><span class="cx">
</span><del>- mapToUse.set(breakChild, namedFlowFragment);
</del><ins>+ mapToUse.set(breakChild, &namedFlowFragment);
</ins><span class="cx">
</span><span class="cx"> hasComputedAutoHeight = true;
</span><span class="cx">
</span><span class="cx"> // Compute the region height pretending that the offsetBreakInCurrentRegion is the logicalHeight for the auto-height region.
</span><del>- LayoutUnit regionComputedAutoHeight = namedFlowFragment->constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion);
</del><ins>+ LayoutUnit regionComputedAutoHeight = namedFlowFragment.constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion);
</ins><span class="cx">
</span><span class="cx"> // The new height of this region needs to be smaller than the initial value, the max height. A forced break is the only way to change the initial
</span><span class="cx"> // height of an auto-height region besides content ending.
</span><del>- ASSERT(regionComputedAutoHeight <= namedFlowFragment->maxPageLogicalHeight());
</del><ins>+ ASSERT(regionComputedAutoHeight <= namedFlowFragment.maxPageLogicalHeight());
</ins><span class="cx">
</span><del>- namedFlowFragment->setComputedAutoHeight(regionComputedAutoHeight);
</del><ins>+ namedFlowFragment.setComputedAutoHeight(regionComputedAutoHeight);
</ins><span class="cx">
</span><span class="cx"> currentRegionOffsetInFlowThread += regionComputedAutoHeight;
</span><span class="cx"> } else
</span><span class="lines">@@ -1409,9 +1410,9 @@
</span><span class="cx"> // In order to behave in a similar manner to the non-regions case, content overflowing the box
</span><span class="cx"> // flowed into the region must be painted on top of the region's padding and the box's margin.
</span><span class="cx"> // See http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html
</span><del>- if (box->isRenderNamedFlowThread()) {
</del><ins>+ if (is<RenderNamedFlowThread>(*box)) {
</ins><span class="cx"> ASSERT(box == this);
</span><del>- RenderBlockFlow& fragmentContainer = toRenderNamedFlowFragment(region)->fragmentContainer();
</del><ins>+ RenderBlockFlow& fragmentContainer = downcast<RenderNamedFlowFragment>(*region).fragmentContainer();
</ins><span class="cx"> LayoutUnit spacingAfterLayout = fragmentContainer.paddingAfter() + child->marginAfter();
</span><span class="cx"> if (isHorizontalWritingMode()) {
</span><span class="cx"> if (fragmentContainer.scrollsOverflowY()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlowThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlowThread.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlowThread.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -376,8 +376,6 @@
</span><span class="cx"> bool m_layersToRegionMappingsDirty : 1;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderFlowThread, isRenderFlowThread())
-
</del><span class="cx"> // This structure is used by PODIntervalTree for debugging.
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> template <> struct ValueToString<RenderRegion*> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1497,7 +1497,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (parentLayer->isRootLayer()) {
</span><del>- toRenderView(parentLayer->renderer()).repaintViewRectangle(parentLayerRect);
</del><ins>+ downcast<RenderView>(parentLayer->renderer()).repaintViewRectangle(parentLayerRect);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1652,7 +1652,7 @@
</span><span class="cx"> // We have to break up the transformed extent across our columns.
</span><span class="cx"> // Split our box up into the actual fragment boxes that render in the columns/pages and unite those together to
</span><span class="cx"> // get our true bounding box.
</span><del>- RenderFlowThread& enclosingFlowThread = toRenderFlowThread(paginationLayer->renderer());
</del><ins>+ auto& enclosingFlowThread = downcast<RenderFlowThread>(paginationLayer->renderer());
</ins><span class="cx"> result = enclosingFlowThread.fragmentsBoundingBox(result);
</span><span class="cx"> result.move(paginationLayer->offsetFromAncestor(rootLayer));
</span><span class="cx"> return result;
</span><span class="lines">@@ -1990,8 +1990,8 @@
</span><span class="cx">
</span><span class="cx"> if (adjustForColumns == RenderLayer::AdjustForColumns) {
</span><span class="cx"> if (RenderLayer* parentLayer = layer->parent()) {
</span><del>- if (parentLayer->renderer().isRenderMultiColumnFlowThread()) {
- RenderRegion* region = toRenderMultiColumnFlowThread(parentLayer->renderer()).physicalTranslationFromFlowToRegion(location);
</del><ins>+ if (is<RenderMultiColumnFlowThread>(parentLayer->renderer())) {
+ RenderRegion* region = downcast<RenderMultiColumnFlowThread>(parentLayer->renderer()).physicalTranslationFromFlowToRegion(location);
</ins><span class="cx"> if (region)
</span><span class="cx"> location.moveBy(region->topLeftLocation() + -parentLayer->renderBox()->topLeftLocation());
</span><span class="cx"> }
</span><span class="lines">@@ -4304,7 +4304,7 @@
</span><span class="cx"> LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingBox : boundingBox(paginationLayer, offsetWithinPaginatedLayer);
</span><span class="cx"> layerBoundingBoxInFlowThread.intersect(backgroundRectInFlowThread.rect());
</span><span class="cx">
</span><del>- RenderFlowThread& enclosingFlowThread = toRenderFlowThread(paginationLayer->renderer());
</del><ins>+ auto& enclosingFlowThread = downcast<RenderFlowThread>(paginationLayer->renderer());
</ins><span class="cx"> RenderLayer* parentPaginationLayer = paginationLayer->parent()->enclosingPaginationLayerInSubtree(rootLayer, inclusionMode);
</span><span class="cx"> LayerFragments ancestorFragments;
</span><span class="cx"> if (parentPaginationLayer) {
</span><span class="lines">@@ -4627,7 +4627,7 @@
</span><span class="cx"> ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
</span><span class="cx"> ASSERT(!renderer().view().needsLayout());
</span><span class="cx">
</span><del>- LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread(&renderer())->visualOverflowRect() : renderer().view().documentRect();
</del><ins>+ LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? downcast<RenderFlowThread>(renderer()).visualOverflowRect() : renderer().view().documentRect();
</ins><span class="cx"> if (!request.ignoreClipping())
</span><span class="cx"> hitTestArea.intersect(renderer().view().frameView().visibleContentRect(LegacyIOSDocumentVisibleRect));
</span><span class="cx">
</span><span class="lines">@@ -4637,7 +4637,7 @@
</span><span class="cx"> // return ourselves. We do this so mouse events continue getting delivered after a drag has
</span><span class="cx"> // exited the WebView, and so hit testing over a scrollbar hits the content document.
</span><span class="cx"> if (!request.isChildFrameHitTest() && (request.active() || request.release()) && isRootLayer()) {
</span><del>- renderer().updateHitTestResult(result, toRenderView(renderer()).flipForWritingMode(hitTestLocation.point()));
</del><ins>+ renderer().updateHitTestResult(result, downcast<RenderView>(renderer()).flipForWritingMode(hitTestLocation.point()));
</ins><span class="cx"> insideLayer = this;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -4675,7 +4675,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions() const
</span><span class="cx"> {
</span><del>- return renderer().isRenderFlowThread() && toRenderFlowThread(renderer()).collectsGraphicsLayersUnderRegions();
</del><ins>+ return is<RenderFlowThread>(renderer()) && downcast<RenderFlowThread>(renderer()).collectsGraphicsLayersUnderRegions();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Compute the z-offset of the point in the transformState.
</span><span class="lines">@@ -5662,7 +5662,7 @@
</span><span class="cx"> // get our true bounding box.
</span><span class="cx"> result.move(childLayer->offsetFromAncestor(paginationLayer));
</span><span class="cx">
</span><del>- RenderFlowThread& enclosingFlowThread = toRenderFlowThread(paginationLayer->renderer());
</del><ins>+ auto& enclosingFlowThread = downcast<RenderFlowThread>(paginationLayer->renderer());
</ins><span class="cx"> result = enclosingFlowThread.fragmentsBoundingBox(result);
</span><span class="cx">
</span><span class="cx"> childLayer = paginationLayer;
</span><span class="lines">@@ -5970,7 +5970,7 @@
</span><span class="cx">
</span><span class="cx"> if (!renderer().documentBeingDestroyed()) {
</span><span class="cx"> if (isFlowThreadCollectingGraphicsLayersUnderRegions())
</span><del>- toRenderFlowThread(renderer()).setNeedsLayerToRegionMappingsUpdate();
</del><ins>+ downcast<RenderFlowThread>(renderer()).setNeedsLayerToRegionMappingsUpdate();
</ins><span class="cx"> compositor().setCompositingLayersNeedRebuild();
</span><span class="cx"> if (acceleratedCompositingForOverflowScrollEnabled())
</span><span class="cx"> compositor().setShouldReevaluateCompositingAfterLayout();
</span><span class="lines">@@ -5994,7 +5994,7 @@
</span><span class="cx">
</span><span class="cx"> if (!renderer().documentBeingDestroyed()) {
</span><span class="cx"> if (isFlowThreadCollectingGraphicsLayersUnderRegions())
</span><del>- toRenderFlowThread(renderer()).setNeedsLayerToRegionMappingsUpdate();
</del><ins>+ downcast<RenderFlowThread>(renderer()).setNeedsLayerToRegionMappingsUpdate();
</ins><span class="cx"> compositor().setCompositingLayersNeedRebuild();
</span><span class="cx"> if (acceleratedCompositingForOverflowScrollEnabled())
</span><span class="cx"> compositor().setShouldReevaluateCompositingAfterLayout();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #include "PluginViewBase.h"
</span><span class="cx"> #include "ProgressTracker.h"
</span><span class="cx"> #include "RenderFlowThread.h"
</span><ins>+#include "RenderHTMLCanvas.h"
</ins><span class="cx"> #include "RenderIFrame.h"
</span><span class="cx"> #include "RenderImage.h"
</span><span class="cx"> #include "RenderLayerCompositor.h"
</span><span class="lines">@@ -469,9 +470,9 @@
</span><span class="cx">
</span><span class="cx"> void RenderLayerBacking::updateAfterWidgetResize()
</span><span class="cx"> {
</span><del>- if (!renderer().isWidget())
</del><ins>+ if (!is<RenderWidget>(renderer()))
</ins><span class="cx"> return;
</span><del>- if (RenderLayerCompositor* innerCompositor = RenderLayerCompositor::frameContentsCompositor(toRenderWidget(&renderer()))) {
</del><ins>+ if (RenderLayerCompositor* innerCompositor = RenderLayerCompositor::frameContentsCompositor(&downcast<RenderWidget>(renderer()))) {
</ins><span class="cx"> innerCompositor->frameViewDidChangeSize();
</span><span class="cx"> innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contentsBox().location()));
</span><span class="cx"> }
</span><span class="lines">@@ -598,8 +599,8 @@
</span><span class="cx"> layerConfigChanged = true;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- if (renderer().isWidget())
- layerConfigChanged = RenderLayerCompositor::parentFrameContentLayers(toRenderWidget(&renderer()));
</del><ins>+ if (is<RenderWidget>(renderer()))
+ layerConfigChanged = RenderLayerCompositor::parentFrameContentLayers(&downcast<RenderWidget>(renderer()));
</ins><span class="cx">
</span><span class="cx"> return layerConfigChanged;
</span><span class="cx"> }
</span><span class="lines">@@ -1675,21 +1676,21 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static bool isRestartedPlugin(RenderObject* renderer)
</del><ins>+static bool isRestartedPlugin(RenderObject& renderer)
</ins><span class="cx"> {
</span><del>- if (!renderer->isEmbeddedObject())
</del><ins>+ if (!is<RenderEmbeddedObject>(renderer))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- Element* element = downcast<Element>(renderer->node());
</del><ins>+ HTMLFrameOwnerElement& element = downcast<RenderEmbeddedObject>(renderer).frameOwnerElement();
</ins><span class="cx"> if (!is<HTMLPlugInElement>(element))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return downcast<HTMLPlugInElement>(*element).isRestartedPlugin();
</del><ins>+ return downcast<HTMLPlugInElement>(element).isRestartedPlugin();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static bool isCompositedPlugin(RenderObject* renderer)
</del><ins>+static bool isCompositedPlugin(RenderObject& renderer)
</ins><span class="cx"> {
</span><del>- return renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allowsAcceleratedCompositing();
</del><ins>+ return is<RenderEmbeddedObject>(renderer) && downcast<RenderEmbeddedObject>(renderer).allowsAcceleratedCompositing();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // A "simple container layer" is a RenderLayer which has no visible content to render.
</span><span class="lines">@@ -1697,7 +1698,7 @@
</span><span class="cx"> // This is a useful optimization, because it allows us to avoid allocating backing store.
</span><span class="cx"> bool RenderLayerBacking::isSimpleContainerCompositingLayer() const
</span><span class="cx"> {
</span><del>- if (renderer().isRenderReplaced() && (!isCompositedPlugin(&renderer()) || isRestartedPlugin(&renderer())))
</del><ins>+ if (renderer().isRenderReplaced() && (!isCompositedPlugin(renderer()) || isRestartedPlugin(renderer())))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (paintsBoxDecorations() || paintsChildren())
</span><span class="lines">@@ -1803,12 +1804,12 @@
</span><span class="cx"> // FIXME: we could optimize cases where the image, video or canvas is known to fill the border box entirely,
</span><span class="cx"> // and set background color on the layer in that case, instead of allocating backing store and painting.
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>- if (renderer().isVideo() && toRenderVideo(renderer()).shouldDisplayVideo())
</del><ins>+ if (is<RenderVideo>(renderer()) && downcast<RenderVideo>(renderer()).shouldDisplayVideo())
</ins><span class="cx"> return m_owningLayer.hasBoxDecorationsOrBackground();
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)
</span><del>- if (renderer().isCanvas() && canvasCompositingStrategy(renderer()) == CanvasAsLayerContents)
</del><ins>+ if (is<RenderHTMLCanvas>(renderer()) && canvasCompositingStrategy(renderer()) == CanvasAsLayerContents)
</ins><span class="cx"> return m_owningLayer.hasBoxDecorationsOrBackground();
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -943,10 +943,10 @@
</span><span class="cx"> // its replica GraphicsLayer. In practice this should never happen because reflectee and reflection
</span><span class="cx"> // are both either composited, or not composited.
</span><span class="cx"> if (layer.isReflection()) {
</span><del>- RenderLayer* sourceLayer = toRenderLayerModelObject(layer.renderer().parent())->layer();
</del><ins>+ RenderLayer* sourceLayer = downcast<RenderLayerModelObject>(*layer.renderer().parent()).layer();
</ins><span class="cx"> if (RenderLayerBacking* backing = sourceLayer->backing()) {
</span><span class="cx"> ASSERT(backing->graphicsLayer()->replicaLayer() == layer.backing()->graphicsLayer());
</span><del>- backing->graphicsLayer()->setReplicatedByLayer(0);
</del><ins>+ backing->graphicsLayer()->setReplicatedByLayer(nullptr);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -966,14 +966,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>- if (layerChanged && layer.renderer().isVideo()) {
</del><ins>+ if (layerChanged && is<RenderVideo>(layer.renderer())) {
</ins><span class="cx"> // If it's a video, give the media player a chance to hook up to the layer.
</span><del>- toRenderVideo(layer.renderer()).acceleratedRenderingStateChanged();
</del><ins>+ downcast<RenderVideo>(layer.renderer()).acceleratedRenderingStateChanged();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (layerChanged && layer.renderer().isWidget()) {
- RenderLayerCompositor* innerCompositor = frameContentsCompositor(toRenderWidget(&layer.renderer()));
</del><ins>+ if (layerChanged && is<RenderWidget>(layer.renderer())) {
+ RenderLayerCompositor* innerCompositor = frameContentsCompositor(&downcast<RenderWidget>(layer.renderer()));
</ins><span class="cx"> if (innerCompositor && innerCompositor->inCompositingMode())
</span><span class="cx"> innerCompositor->updateRootLayerAttachment();
</span><span class="cx"> }
</span><span class="lines">@@ -1175,7 +1175,7 @@
</span><span class="cx"> layer.updateLayerListsIfNeeded();
</span><span class="cx">
</span><span class="cx"> if (layer.isFlowThreadCollectingGraphicsLayersUnderRegions()) {
</span><del>- RenderFlowThread& flowThread = toRenderFlowThread(layer.renderer());
</del><ins>+ auto& flowThread = downcast<RenderFlowThread>(layer.renderer());
</ins><span class="cx"> layer.setHasCompositingDescendant(flowThread.hasCompositingRegionDescendant());
</span><span class="cx">
</span><span class="cx"> // Before returning, we need to update the lists of all child layers. This is required because,
</span><span class="lines">@@ -1548,8 +1548,8 @@
</span><span class="cx">
</span><span class="cx"> if (layerBacking) {
</span><span class="cx"> bool parented = false;
</span><del>- if (layer.renderer().isWidget())
- parented = parentFrameContentLayers(toRenderWidget(&layer.renderer()));
</del><ins>+ if (is<RenderWidget>(layer.renderer()))
+ parented = parentFrameContentLayers(&downcast<RenderWidget>(layer.renderer()));
</ins><span class="cx">
</span><span class="cx"> if (!parented)
</span><span class="cx"> layerBacking->parentForSublayers()->setChildren(layerChildren);
</span><span class="lines">@@ -2090,11 +2090,11 @@
</span><span class="cx"> // static
</span><span class="cx"> bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer& layer, RenderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedReason) const
</span><span class="cx"> {
</span><del>- auto renderer = &layer.renderer();
</del><ins>+ auto* renderer = &layer.renderer();
</ins><span class="cx">
</span><span class="cx"> // The compositing state of a reflection should match that of its reflected layer.
</span><span class="cx"> if (layer.isReflection())
</span><del>- renderer = toRenderLayerModelObject(renderer->parent()); // The RenderReplica's parent is the object being reflected.
</del><ins>+ renderer = downcast<RenderLayerModelObject>(renderer->parent()); // The RenderReplica's parent is the object being reflected.
</ins><span class="cx">
</span><span class="cx"> // The root layer always has a compositing layer, but it may not have backing.
</span><span class="cx"> return requiresCompositingForTransform(*renderer)
</span><span class="lines">@@ -2183,9 +2183,9 @@
</span><span class="cx"> if (!layer.isComposited())
</span><span class="cx"> return reasons;
</span><span class="cx">
</span><del>- auto renderer = &layer.renderer();
</del><ins>+ auto* renderer = &layer.renderer();
</ins><span class="cx"> if (layer.isReflection())
</span><del>- renderer = toRenderLayerModelObject(renderer->parent());
</del><ins>+ renderer = downcast<RenderLayerModelObject>(renderer->parent());
</ins><span class="cx">
</span><span class="cx"> if (requiresCompositingForTransform(*renderer))
</span><span class="cx"> reasons |= CompositingReason3DTransform;
</span><span class="lines">@@ -2450,8 +2450,8 @@
</span><span class="cx"> if (!(m_compositingTriggers & ChromeClient::VideoTrigger))
</span><span class="cx"> return false;
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>- if (renderer.isVideo()) {
- RenderVideo& video = toRenderVideo(renderer);
</del><ins>+ if (is<RenderVideo>(renderer)) {
+ auto& video = downcast<RenderVideo>(renderer);
</ins><span class="cx"> return (video.requiresImmediateCompositing() || video.shouldDisplayVideo()) && canAccelerateVideoRendering(video);
</span><span class="cx"> }
</span><span class="cx"> #else
</span><span class="lines">@@ -2484,13 +2484,13 @@
</span><span class="cx"> if (!(m_compositingTriggers & ChromeClient::PluginTrigger))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- bool composite = renderer.isEmbeddedObject() && toRenderEmbeddedObject(&renderer)->allowsAcceleratedCompositing();
</del><ins>+ bool composite = is<RenderEmbeddedObject>(renderer) && downcast<RenderEmbeddedObject>(renderer).allowsAcceleratedCompositing();
</ins><span class="cx"> if (!composite)
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> m_reevaluateCompositingAfterLayout = true;
</span><span class="cx">
</span><del>- RenderWidget& pluginRenderer = *toRenderWidget(&renderer);
</del><ins>+ RenderWidget& pluginRenderer = downcast<RenderWidget>(renderer);
</ins><span class="cx"> // If we can't reliably know the size of the plugin yet, don't change compositing state.
</span><span class="cx"> if (pluginRenderer.needsLayout())
</span><span class="cx"> return pluginRenderer.hasLayer() && pluginRenderer.layer()->isComposited();
</span><span class="lines">@@ -2502,10 +2502,10 @@
</span><span class="cx">
</span><span class="cx"> bool RenderLayerCompositor::requiresCompositingForFrame(RenderLayerModelObject& renderer) const
</span><span class="cx"> {
</span><del>- if (!renderer.isWidget())
</del><ins>+ if (!is<RenderWidget>(renderer))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- RenderWidget& frameRenderer = *toRenderWidget(&renderer);
</del><ins>+ auto& frameRenderer = downcast<RenderWidget>(renderer);
</ins><span class="cx">
</span><span class="cx"> if (!frameRenderer.requiresAcceleratedCompositing())
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerModelObject.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerModelObject.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderLayerModelObject.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -69,8 +69,6 @@
</span><span class="cx"> static bool s_layerWasSelfPainting;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderLayerModelObject, isRenderLayerModelObject())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderLayerModelObject, isRenderLayerModelObject())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLineBreakh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLineBreak.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLineBreak.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -93,8 +93,6 @@
</span><span class="cx"> bool m_isWBR;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderLineBreak, isLineBreak())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderLineBreak, isLineBreak())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMeterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMeter.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMeter.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderMeter.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -47,8 +47,6 @@
</span><span class="cx"> virtual bool requiresForcedStyleRecalcPropagation() const override { return true; }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderMeter, isMeter())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMeter, isMeter())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -72,8 +72,8 @@
</span><span class="cx"> RenderMultiColumnSet* RenderMultiColumnFlowThread::firstMultiColumnSet() const
</span><span class="cx"> {
</span><span class="cx"> for (RenderObject* sibling = nextSibling(); sibling; sibling = sibling->nextSibling()) {
</span><del>- if (sibling->isRenderMultiColumnSet())
- return toRenderMultiColumnSet(sibling);
</del><ins>+ if (is<RenderMultiColumnSet>(*sibling))
+ return downcast<RenderMultiColumnSet>(sibling);
</ins><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -81,8 +81,8 @@
</span><span class="cx"> RenderMultiColumnSet* RenderMultiColumnFlowThread::lastMultiColumnSet() const
</span><span class="cx"> {
</span><span class="cx"> for (RenderObject* sibling = multiColumnBlockFlow()->lastChild(); sibling; sibling = sibling->previousSibling()) {
</span><del>- if (sibling->isRenderMultiColumnSet())
- return toRenderMultiColumnSet(sibling);
</del><ins>+ if (is<RenderMultiColumnSet>(*sibling))
+ return downcast<RenderMultiColumnSet>(sibling);
</ins><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -124,8 +124,8 @@
</span><span class="cx"> m_inLayout = true;
</span><span class="cx"> m_lastSetWorkedOn = nullptr;
</span><span class="cx"> if (RenderBox* first = firstColumnSetOrSpanner()) {
</span><del>- if (first->isRenderMultiColumnSet()) {
- m_lastSetWorkedOn = toRenderMultiColumnSet(first);
</del><ins>+ if (is<RenderMultiColumnSet>(*first)) {
+ m_lastSetWorkedOn = downcast<RenderMultiColumnSet>(first);
</ins><span class="cx"> m_lastSetWorkedOn->beginFlow(this);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderMultiColumnFlowThread::addRegionToThread(RenderRegion* renderRegion)
</span><span class="cx"> {
</span><del>- RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(renderRegion);
</del><ins>+ auto* columnSet = downcast<RenderMultiColumnSet>(renderRegion);
</ins><span class="cx"> if (RenderMultiColumnSet* nextSet = columnSet->nextSiblingMultiColumnSet()) {
</span><span class="cx"> RenderRegionList::iterator it = m_regionList.find(nextSet);
</span><span class="cx"> ASSERT(it != m_regionList.end());
</span><span class="lines">@@ -367,36 +367,36 @@
</span><span class="cx"> return;
</span><span class="cx"> RenderObject* subtreeRoot = descendant;
</span><span class="cx"> for (; descendant; descendant = (descendant ? descendant->nextInPreOrder(subtreeRoot) : nullptr)) {
</span><del>- if (descendant->isRenderMultiColumnSpannerPlaceholder()) {
</del><ins>+ if (is<RenderMultiColumnSpannerPlaceholder>(*descendant)) {
</ins><span class="cx"> // A spanner's placeholder has been inserted. The actual spanner renderer is moved from
</span><span class="cx"> // where it would otherwise occur (if it weren't a spanner) to becoming a sibling of the
</span><span class="cx"> // column sets.
</span><del>- RenderMultiColumnSpannerPlaceholder* placeholder = toRenderMultiColumnSpannerPlaceholder(descendant);
- if (placeholder->flowThread() != this) {
</del><ins>+ RenderMultiColumnSpannerPlaceholder& placeholder = downcast<RenderMultiColumnSpannerPlaceholder>(*descendant);
+ if (placeholder.flowThread() != this) {
</ins><span class="cx"> // This isn't our spanner! It shifted here from an ancestor multicolumn block. It's going to end up
</span><span class="cx"> // becoming our spanner instead, but for it to do that we first have to nuke the original spanner,
</span><span class="cx"> // and get the spanner content back into this flow thread.
</span><del>- RenderBox* spanner = placeholder->spanner();
</del><ins>+ RenderBox* spanner = placeholder.spanner();
</ins><span class="cx">
</span><span class="cx"> // Insert after the placeholder, but don't let a notification happen.
</span><span class="cx"> gShiftingSpanner = true;
</span><span class="cx"> RenderBlockFlow& ancestorBlock = downcast<RenderBlockFlow>(*spanner->parent());
</span><del>- ancestorBlock.moveChildTo(placeholder->parentBox(), spanner, placeholder->nextSibling(), true);
</del><ins>+ ancestorBlock.moveChildTo(placeholder.parentBox(), spanner, placeholder.nextSibling(), true);
</ins><span class="cx"> gShiftingSpanner = false;
</span><span class="cx">
</span><span class="cx"> // We have to nuke the placeholder, since the ancestor already lost the mapping to it when
</span><span class="cx"> // we shifted the placeholder down into this flow thread.
</span><span class="cx"> ancestorBlock.multiColumnFlowThread()->handleSpannerRemoval(spanner);
</span><del>- placeholder->destroy();
</del><ins>+ placeholder.destroy();
</ins><span class="cx">
</span><span class="cx"> // Now we process the spanner.
</span><span class="cx"> descendant = processPossibleSpannerDescendant(subtreeRoot, spanner);
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(!m_spannerMap.get(placeholder->spanner()));
- m_spannerMap.add(placeholder->spanner(), placeholder);
- ASSERT(!placeholder->firstChild()); // There should be no children here, but if there are, we ought to skip them.
</del><ins>+ ASSERT(!m_spannerMap.get(placeholder.spanner()));
+ m_spannerMap.add(placeholder.spanner(), &placeholder);
+ ASSERT(!placeholder.firstChild()); // There should be no children here, but if there are, we ought to skip them.
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -428,12 +428,12 @@
</span><span class="cx"> if (m_beingEvacuated)
</span><span class="cx"> return;
</span><span class="cx"> invalidateRegions();
</span><del>- if (relative->isRenderMultiColumnSpannerPlaceholder()) {
</del><ins>+ if (is<RenderMultiColumnSpannerPlaceholder>(*relative)) {
</ins><span class="cx"> // Remove the map entry for this spanner, but leave the actual spanner renderer alone. Also
</span><span class="cx"> // keep the reference to the spanner, since the placeholder may be about to be re-inserted
</span><span class="cx"> // in the tree.
</span><span class="cx"> ASSERT(relative->isDescendantOf(this));
</span><del>- m_spannerMap.remove(toRenderMultiColumnSpannerPlaceholder(relative)->spanner());
</del><ins>+ m_spannerMap.remove(downcast<RenderMultiColumnSpannerPlaceholder>(*relative).spanner());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (relative->style().columnSpan() == ColumnSpanAll) {
</span><span class="lines">@@ -449,21 +449,21 @@
</span><span class="cx">
</span><span class="cx"> void RenderMultiColumnFlowThread::flowThreadDescendantBoxLaidOut(RenderBox* descendant)
</span><span class="cx"> {
</span><del>- if (!descendant->isRenderMultiColumnSpannerPlaceholder())
</del><ins>+ if (!is<RenderMultiColumnSpannerPlaceholder>(*descendant))
</ins><span class="cx"> return;
</span><del>- RenderMultiColumnSpannerPlaceholder* placeholder = toRenderMultiColumnSpannerPlaceholder(descendant);
- RenderBlock* container = placeholder->containingBlock();
</del><ins>+ auto& placeholder = downcast<RenderMultiColumnSpannerPlaceholder>(*descendant);
+ RenderBlock* container = placeholder.containingBlock();
</ins><span class="cx">
</span><del>- for (RenderBox* prev = previousColumnSetOrSpannerSiblingOf(placeholder->spanner()); prev; prev = previousColumnSetOrSpannerSiblingOf(prev)) {
- if (prev->isRenderMultiColumnSet()) {
- toRenderMultiColumnSet(prev)->endFlow(container, placeholder->logicalTop());
</del><ins>+ for (RenderBox* prev = previousColumnSetOrSpannerSiblingOf(placeholder.spanner()); prev; prev = previousColumnSetOrSpannerSiblingOf(prev)) {
+ if (is<RenderMultiColumnSet>(*prev)) {
+ downcast<RenderMultiColumnSet>(*prev).endFlow(container, placeholder.logicalTop());
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (RenderBox* next = nextColumnSetOrSpannerSiblingOf(placeholder->spanner()); next; next = nextColumnSetOrSpannerSiblingOf(next)) {
- if (next->isRenderMultiColumnSet()) {
- m_lastSetWorkedOn = toRenderMultiColumnSet(next);
</del><ins>+ for (RenderBox* next = nextColumnSetOrSpannerSiblingOf(placeholder.spanner()); next; next = nextColumnSetOrSpannerSiblingOf(next)) {
+ if (is<RenderMultiColumnSet>(*next)) {
+ m_lastSetWorkedOn = downcast<RenderMultiColumnSet>(next);
</ins><span class="cx"> m_lastSetWorkedOn->beginFlow(container);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -484,13 +484,13 @@
</span><span class="cx">
</span><span class="cx"> void RenderMultiColumnFlowThread::setPageBreak(const RenderBlock* block, LayoutUnit offset, LayoutUnit spaceShortage)
</span><span class="cx"> {
</span><del>- if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlockOffset(block, offset)))
</del><ins>+ if (auto* multicolSet = downcast<RenderMultiColumnSet>(regionAtBlockOffset(block, offset)))
</ins><span class="cx"> multicolSet->recordSpaceShortage(spaceShortage);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderMultiColumnFlowThread::updateMinimumPageHeight(const RenderBlock* block, LayoutUnit offset, LayoutUnit minHeight)
</span><span class="cx"> {
</span><del>- if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlockOffset(block, offset)))
</del><ins>+ if (auto* multicolSet = downcast<RenderMultiColumnSet>(regionAtBlockOffset(block, offset)))
</ins><span class="cx"> multicolSet->updateMinimumColumnHeight(minHeight);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -534,12 +534,12 @@
</span><span class="cx"> // exact same flow thread position, which means that some parts of the code may believe that a
</span><span class="cx"> // given box lives in sets that it doesn't really live in. Make some adjustments here and
</span><span class="cx"> // include such sets if they are adjacent to the start and/or end regions.
</span><del>- for (RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(startRegion)->previousSiblingMultiColumnSet(); columnSet; columnSet = columnSet->previousSiblingMultiColumnSet()) {
</del><ins>+ for (RenderMultiColumnSet* columnSet = downcast<RenderMultiColumnSet>(*startRegion).previousSiblingMultiColumnSet(); columnSet; columnSet = columnSet->previousSiblingMultiColumnSet()) {
</ins><span class="cx"> if (columnSet->logicalHeightInFlowThread())
</span><span class="cx"> break;
</span><span class="cx"> startRegion = columnSet;
</span><span class="cx"> }
</span><del>- for (RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(startRegion)->nextSiblingMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet()) {
</del><ins>+ for (RenderMultiColumnSet* columnSet = downcast<RenderMultiColumnSet>(*startRegion).nextSiblingMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet()) {
</ins><span class="cx"> if (columnSet->logicalHeightInFlowThread())
</span><span class="cx"> break;
</span><span class="cx"> endRegion = columnSet;
</span><span class="lines">@@ -550,7 +550,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderMultiColumnFlowThread::addForcedRegionBreak(const RenderBlock* block, LayoutUnit offset, RenderBox* /*breakChild*/, bool /*isBefore*/, LayoutUnit* offsetBreakAdjustment)
</span><span class="cx"> {
</span><del>- if (RenderMultiColumnSet* multicolSet = toRenderMultiColumnSet(regionAtBlockOffset(block, offset))) {
</del><ins>+ if (auto* multicolSet = downcast<RenderMultiColumnSet>(regionAtBlockOffset(block, offset))) {
</ins><span class="cx"> multicolSet->addForcedBreak(offset);
</span><span class="cx"> if (offsetBreakAdjustment)
</span><span class="cx"> *offsetBreakAdjustment = pageLogicalHeightForOffset(offset) ? pageRemainingLogicalHeightForOffset(offset, IncludePageBoundary) : LayoutUnit::fromPixel(0);
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx"> LayoutSize RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion(const RenderRegion* renderRegion, const LayoutUnit logicalOffset) const
</span><span class="cx"> {
</span><span class="cx"> // Now that we know which multicolumn set we hit, we need to get the appropriate translation offset for the column.
</span><del>- const RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(renderRegion);
</del><ins>+ const auto* columnSet = downcast<RenderMultiColumnSet>(renderRegion);
</ins><span class="cx"> LayoutPoint translationOffset = columnSet->columnTranslationForOffset(logicalOffset);
</span><span class="cx">
</span><span class="cx"> // Now we know how we want the rect to be translated into the region. At this point we're converting
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnFlowThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -158,8 +158,6 @@
</span><span class="cx"> static bool gShiftingSpanner;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnFlowThread, isRenderMultiColumnFlowThread())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMultiColumnFlowThread, isRenderMultiColumnFlowThread())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx"> RenderMultiColumnSet* RenderMultiColumnSet::nextSiblingMultiColumnSet() const
</span><span class="cx"> {
</span><span class="cx"> for (RenderObject* sibling = nextSibling(); sibling; sibling = sibling->nextSibling()) {
</span><del>- if (sibling->isRenderMultiColumnSet())
- return toRenderMultiColumnSet(sibling);
</del><ins>+ if (is<RenderMultiColumnSet>(*sibling))
+ return downcast<RenderMultiColumnSet>(sibling);
</ins><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -60,8 +60,8 @@
</span><span class="cx"> RenderMultiColumnSet* RenderMultiColumnSet::previousSiblingMultiColumnSet() const
</span><span class="cx"> {
</span><span class="cx"> for (RenderObject* sibling = previousSibling(); sibling; sibling = sibling->previousSibling()) {
</span><del>- if (sibling->isRenderMultiColumnSet())
- return toRenderMultiColumnSet(sibling);
</del><ins>+ if (is<RenderMultiColumnSet>(*sibling))
+ return downcast<RenderMultiColumnSet>(sibling);
</ins><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -225,8 +225,6 @@
</span><span class="cx"> Vector<ContentRun, 1> m_contentRuns;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMultiColumnSet, isRenderMultiColumnSet())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSpannerPlaceholderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -55,8 +55,6 @@
</span><span class="cx"> RenderMultiColumnFlowThread* m_flowThread;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSpannerPlaceholder, isRenderMultiColumnSpannerPlaceholder())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMultiColumnSpannerPlaceholder, isRenderMultiColumnSpannerPlaceholder())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowFragmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx"> if (!isPseudoElement())
</span><span class="cx"> customRegionStyle = view().document().ensureStyleResolver().checkRegionStyle(generatingElement());
</span><span class="cx"> setHasCustomRegionStyle(customRegionStyle);
</span><del>- toRenderNamedFlowThread(m_flowThread)->checkRegionsWithStyling();
</del><ins>+ downcast<RenderNamedFlowThread>(*m_flowThread).checkRegionsWithStyling();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<RenderStyle> RenderNamedFlowFragment::computeStyleInRegion(RenderElement& renderer, RenderStyle& parentStyle) const
</span><span class="lines">@@ -489,7 +489,7 @@
</span><span class="cx">
</span><span class="cx"> RenderNamedFlowThread* RenderNamedFlowFragment::namedFlowThread() const
</span><span class="cx"> {
</span><del>- return toRenderNamedFlowThread(flowThread());
</del><ins>+ return downcast<RenderNamedFlowThread>(flowThread());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LayoutRect RenderNamedFlowFragment::visualOverflowRect() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowFragmenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> // parent renderer instead.
</span><span class="cx"> // This method returns that renderer holding the layer.
</span><span class="cx"> // The return value cannot be null because CSS Regions create Stacking Contexts (which means they create layers).
</span><del>- RenderLayerModelObject& layerOwner() const { return *toRenderLayerModelObject(parent()); }
</del><ins>+ RenderLayerModelObject& layerOwner() const { return downcast<RenderLayerModelObject>(*parent()); }
</ins><span class="cx">
</span><span class="cx"> bool hasCustomRegionStyle() const { return m_hasCustomRegionStyle; }
</span><span class="cx"> void clearObjectStyleInRegion(const RenderObject*);
</span><span class="lines">@@ -163,8 +163,6 @@
</span><span class="cx"> LayoutUnit m_computedAutoHeight;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderNamedFlowFragment, isRenderNamedFlowFragment())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderNamedFlowFragment, isRenderNamedFlowFragment())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderNamedFlowThread::updateWritingMode()
</span><span class="cx"> {
</span><del>- RenderNamedFlowFragment* firstFragment = toRenderNamedFlowFragment(m_regionList.first());
</del><ins>+ auto* firstFragment = downcast<RenderNamedFlowFragment>(m_regionList.first());
</ins><span class="cx"> if (!firstFragment)
</span><span class="cx"> return;
</span><span class="cx"> if (style().writingMode() == firstFragment->style().writingMode())
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx"> else {
</span><span class="cx"> // Find the first region "greater" than renderNamedFlowFragment.
</span><span class="cx"> auto it = regionList.begin();
</span><del>- while (it != regionList.end() && !compareRenderNamedFlowFragments(renderNamedFlowFragment, toRenderNamedFlowFragment(*it)))
</del><ins>+ while (it != regionList.end() && !compareRenderNamedFlowFragments(renderNamedFlowFragment, downcast<RenderNamedFlowFragment>(*it)))
</ins><span class="cx"> ++it;
</span><span class="cx"> regionList.insertBefore(it, renderNamedFlowFragment);
</span><span class="cx"> }
</span><span class="lines">@@ -230,18 +230,18 @@
</span><span class="cx"> ASSERT(renderRegion);
</span><span class="cx"> ASSERT(!renderRegion->isValid());
</span><span class="cx">
</span><del>- RenderNamedFlowFragment* renderNamedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+ RenderNamedFlowFragment& renderNamedFlowFragment = downcast<RenderNamedFlowFragment>(*renderRegion);
</ins><span class="cx"> resetMarkForDestruction();
</span><span class="cx">
</span><del>- if (renderNamedFlowFragment->parentNamedFlowThread() && renderNamedFlowFragment->parentNamedFlowThread()->dependsOn(this)) {
</del><ins>+ if (renderNamedFlowFragment.parentNamedFlowThread() && renderNamedFlowFragment.parentNamedFlowThread()->dependsOn(this)) {
</ins><span class="cx"> // The order of invalid regions is irrelevant.
</span><del>- m_invalidRegionList.add(renderNamedFlowFragment);
</del><ins>+ m_invalidRegionList.add(&renderNamedFlowFragment);
</ins><span class="cx"> // Register ourself to get a notification when the state changes.
</span><del>- renderNamedFlowFragment->parentNamedFlowThread()->m_observerThreadsSet.add(this);
</del><ins>+ renderNamedFlowFragment.parentNamedFlowThread()->m_observerThreadsSet.add(this);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- addFragmentToNamedFlowThread(renderNamedFlowFragment);
</del><ins>+ addFragmentToNamedFlowThread(&renderNamedFlowFragment);
</ins><span class="cx">
</span><span class="cx"> invalidateRegions();
</span><span class="cx"> }
</span><span class="lines">@@ -250,22 +250,22 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(renderRegion);
</span><span class="cx">
</span><del>- RenderNamedFlowFragment* renderNamedFlowFragment = toRenderNamedFlowFragment(renderRegion);
- if (renderNamedFlowFragment->parentNamedFlowThread()) {
- if (!renderNamedFlowFragment->isValid()) {
- ASSERT(m_invalidRegionList.contains(renderNamedFlowFragment));
- m_invalidRegionList.remove(renderNamedFlowFragment);
- renderNamedFlowFragment->parentNamedFlowThread()->m_observerThreadsSet.remove(this);
</del><ins>+ RenderNamedFlowFragment& renderNamedFlowFragment = downcast<RenderNamedFlowFragment>(*renderRegion);
+ if (renderNamedFlowFragment.parentNamedFlowThread()) {
+ if (!renderNamedFlowFragment.isValid()) {
+ ASSERT(m_invalidRegionList.contains(&renderNamedFlowFragment));
+ m_invalidRegionList.remove(&renderNamedFlowFragment);
+ renderNamedFlowFragment.parentNamedFlowThread()->m_observerThreadsSet.remove(this);
</ins><span class="cx"> // No need to invalidate the regions rectangles. The removed region
</span><span class="cx"> // was not taken into account. Just return here.
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- removeDependencyOnFlowThread(renderNamedFlowFragment->parentNamedFlowThread());
</del><ins>+ removeDependencyOnFlowThread(renderNamedFlowFragment.parentNamedFlowThread());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(m_regionList.contains(renderNamedFlowFragment));
- bool wasFirst = m_regionList.first() == renderNamedFlowFragment;
- m_regionList.remove(renderNamedFlowFragment);
</del><ins>+ ASSERT(m_regionList.contains(&renderNamedFlowFragment));
+ bool wasFirst = m_regionList.first() == &renderNamedFlowFragment;
+ m_regionList.remove(&renderNamedFlowFragment);
</ins><span class="cx">
</span><span class="cx"> if (canBeDestroyed())
</span><span class="cx"> setMarkForDestruction();
</span><span class="lines">@@ -377,7 +377,7 @@
</span><span class="cx">
</span><span class="cx"> RenderBlock* RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock(RenderBox* renderBox, const IntPoint& absolutePoint, const RenderBox& flowedBox)
</span><span class="cx"> {
</span><del>- return toRenderNamedFlowThread(renderBox)->fragmentFromAbsolutePointAndBox(absolutePoint, flowedBox);
</del><ins>+ return downcast<RenderNamedFlowThread>(*renderBox).fragmentFromAbsolutePointAndBox(absolutePoint, flowedBox);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderNamedFlowFragment* RenderNamedFlowThread::fragmentFromAbsolutePointAndBox(const IntPoint& absolutePoint, const RenderBox& flowedBox)
</span><span class="lines">@@ -388,13 +388,13 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
</span><del>- RenderNamedFlowFragment* fragment = toRenderNamedFlowFragment(*iter);
- RenderBlockFlow& fragmentContainer = fragment->fragmentContainer();
</del><ins>+ auto& fragment = downcast<RenderNamedFlowFragment>(**iter);
+ RenderBlockFlow& fragmentContainer = fragment.fragmentContainer();
</ins><span class="cx"> IntRect fragmentAbsoluteRect(roundedIntPoint(fragmentContainer.localToAbsolute()), roundedIntSize(fragmentContainer.paddingBoxRect().size()));
</span><span class="cx"> if (fragmentAbsoluteRect.contains(absolutePoint))
</span><del>- return fragment;
</del><ins>+ return &fragment;
</ins><span class="cx">
</span><del>- if (fragment == endRegion)
</del><ins>+ if (&fragment == endRegion)
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -430,13 +430,13 @@
</span><span class="cx"> {
</span><span class="cx"> Vector<RenderNamedFlowFragment*> newValidFragments;
</span><span class="cx"> for (auto& region : m_invalidRegionList) {
</span><del>- RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
</del><ins>+ auto& namedFlowFragment = downcast<RenderNamedFlowFragment>(*region);
</ins><span class="cx"> // The only reason a region would be invalid is because it has a parent flow thread.
</span><del>- ASSERT(!namedFlowFragment->isValid() && namedFlowFragment->parentNamedFlowThread());
- if (namedFlowFragment->parentNamedFlowThread()->dependsOn(this))
</del><ins>+ ASSERT(!namedFlowFragment.isValid() && namedFlowFragment.parentNamedFlowThread());
+ if (namedFlowFragment.parentNamedFlowThread()->dependsOn(this))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- newValidFragments.append(namedFlowFragment);
</del><ins>+ newValidFragments.append(&namedFlowFragment);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (auto& namedFlowFragment : newValidFragments) {
</span><span class="lines">@@ -803,7 +803,7 @@
</span><span class="cx"> {
</span><span class="cx"> bool hasRegionsWithStyling = false;
</span><span class="cx"> for (const auto& region : m_regionList) {
</span><del>- if (toRenderNamedFlowFragment(region)->hasCustomRegionStyle()) {
</del><ins>+ if (downcast<RenderNamedFlowFragment>(*region).hasCustomRegionStyle()) {
</ins><span class="cx"> hasRegionsWithStyling = true;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -816,7 +816,7 @@
</span><span class="cx"> // Clear the styles for the object in the regions.
</span><span class="cx"> // FIXME: Region styling is not computed only for the region range of the object so this is why we need to walk the whole chain.
</span><span class="cx"> for (auto& region : m_regionList)
</span><del>- toRenderNamedFlowFragment(region)->clearObjectStyleInRegion(object);
</del><ins>+ downcast<RenderNamedFlowFragment>(*region).clearObjectStyleInRegion(object);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderNamedFlowThread::removeFlowChildInfo(RenderObject* child)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderNamedFlowThreadh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderNamedFlowThread.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderNamedFlowThread.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderNamedFlowThread.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -159,8 +159,6 @@
</span><span class="cx"> LayoutUnit m_flowContentBottom;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderNamedFlowThread, isRenderNamedFlowThread())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderNamedFlowThread, isRenderNamedFlowThread())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -569,13 +569,13 @@
</span><span class="cx">
</span><span class="cx"> static void scheduleRelayoutForSubtree(RenderElement& renderer)
</span><span class="cx"> {
</span><del>- if (!renderer.isRenderView()) {
</del><ins>+ if (!is<RenderView>(renderer)) {
</ins><span class="cx"> if (!renderer.isRooted())
</span><span class="cx"> return;
</span><span class="cx"> renderer.view().frameView().scheduleRelayoutOfSubtree(renderer);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- toRenderView(renderer).frameView().scheduleRelayout();
</del><ins>+ downcast<RenderView>(renderer).frameView().scheduleRelayout();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, RenderElement* newRoot)
</span><span class="lines">@@ -677,13 +677,13 @@
</span><span class="cx"> void RenderObject::setLayerNeedsFullRepaint()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasLayer());
</span><del>- toRenderLayerModelObject(this)->layer()->setRepaintStatus(NeedsFullRepaint);
</del><ins>+ downcast<RenderLayerModelObject>(*this).layer()->setRepaintStatus(NeedsFullRepaint);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasLayer());
</span><del>- toRenderLayerModelObject(this)->layer()->setRepaintStatus(NeedsFullRepaintForPositionedMovementLayout);
</del><ins>+ downcast<RenderLayerModelObject>(*this).layer()->setRepaintStatus(NeedsFullRepaintForPositionedMovementLayout);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderBlock* RenderObject::containingBlock() const
</span><span class="lines">@@ -1237,8 +1237,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (repaintContainer->isRenderFlowThread()) {
- toRenderFlowThread(repaintContainer)->repaintRectangleInRegions(r);
</del><ins>+ if (is<RenderFlowThread>(*repaintContainer)) {
+ downcast<RenderFlowThread>(*repaintContainer).repaintRectangleInRegions(r);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1624,8 +1624,8 @@
</span><span class="cx"> SelectionSubtreeRoot& RenderObject::selectionRoot() const
</span><span class="cx"> {
</span><span class="cx"> RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>- if (flowThread && flowThread->isRenderNamedFlowThread())
- return *toRenderNamedFlowThread(flowThread);
</del><ins>+ if (is<RenderNamedFlowThread>(flowThread))
+ return downcast<RenderNamedFlowThread>(*flowThread);
</ins><span class="cx">
</span><span class="cx"> return view();
</span><span class="cx"> }
</span><span class="lines">@@ -1761,7 +1761,7 @@
</span><span class="cx"> #if ENABLE(3D_RENDERING)
</span><span class="cx"> // hasTransform() indicates whether the object has transform, transform-style or perspective. We just care about transform,
</span><span class="cx"> // so check the layer's transform directly.
</span><del>- return (hasLayer() && toRenderLayerModelObject(this)->layer()->transform()) || (containerObject && containerObject->style().hasPerspective());
</del><ins>+ return (hasLayer() && downcast<RenderLayerModelObject>(*this).layer()->transform()) || (containerObject && containerObject->style().hasPerspective());
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(containerObject);
</span><span class="cx"> return hasTransform();
</span><span class="lines">@@ -1773,14 +1773,14 @@
</span><span class="cx"> transform.makeIdentity();
</span><span class="cx"> transform.translate(offsetInContainer.width(), offsetInContainer.height());
</span><span class="cx"> RenderLayer* layer;
</span><del>- if (hasLayer() && (layer = toRenderLayerModelObject(this)->layer()) && layer->transform())
</del><ins>+ if (hasLayer() && (layer = downcast<RenderLayerModelObject>(*this).layer()) && layer->transform())
</ins><span class="cx"> transform.multiply(layer->currentTransform());
</span><span class="cx">
</span><span class="cx"> #if ENABLE(3D_RENDERING)
</span><span class="cx"> if (containerObject && containerObject->hasLayer() && containerObject->style().hasPerspective()) {
</span><span class="cx"> // Perpsective on the container affects us, so we have to factor it in here.
</span><span class="cx"> ASSERT(containerObject->hasLayer());
</span><del>- FloatPoint perspectiveOrigin = toRenderLayerModelObject(containerObject)->layer()->perspectiveOrigin();
</del><ins>+ FloatPoint perspectiveOrigin = downcast<RenderLayerModelObject>(*containerObject).layer()->perspectiveOrigin();
</ins><span class="cx">
</span><span class="cx"> TransformationMatrix perspectiveMatrix;
</span><span class="cx"> perspectiveMatrix.applyPerspective(containerObject->style().perspective());
</span><span class="lines">@@ -1858,15 +1858,15 @@
</span><span class="cx">
</span><span class="cx"> bool RenderObject::isRooted(RenderView** view) const
</span><span class="cx"> {
</span><del>- const RenderObject* o = this;
- while (o->parent())
- o = o->parent();
</del><ins>+ const RenderObject* renderer = this;
+ while (renderer->parent())
+ renderer = renderer->parent();
</ins><span class="cx">
</span><del>- if (!o->isRenderView())
</del><ins>+ if (!is<RenderView>(*renderer))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (view)
</span><del>- *view = &const_cast<RenderView&>(toRenderView(*o));
</del><ins>+ *view = const_cast<RenderView*>(downcast<RenderView>(renderer));
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -1999,7 +1999,7 @@
</span><span class="cx"> // be moved into RenderBoxModelObject::destroy.
</span><span class="cx"> if (hasLayer()) {
</span><span class="cx"> setHasLayer(false);
</span><del>- toRenderLayerModelObject(this)->destroyLayer();
</del><ins>+ downcast<RenderLayerModelObject>(*this).destroyLayer();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> clearLayoutRootIfNeeded();
</span><span class="lines">@@ -2132,7 +2132,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderObject::isComposited() const
</span><span class="cx"> {
</span><del>- return hasLayer() && toRenderLayerModelObject(this)->layer()->isComposited();
</del><ins>+ return hasLayer() && downcast<RenderLayerModelObject>(*this).layer()->isComposited();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter hitTestFilter)
</span><span class="lines">@@ -2579,7 +2579,7 @@
</span><span class="cx"> RenderNamedFlowFragment* RenderObject::currentRenderNamedFlowFragment() const
</span><span class="cx"> {
</span><span class="cx"> RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>- if (!flowThread || !flowThread->isRenderNamedFlowThread())
</del><ins>+ if (!is<RenderNamedFlowThread>(flowThread))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> // FIXME: Once regions are fully integrated with the compositing system we should uncomment this assert.
</span><span class="lines">@@ -2587,7 +2587,7 @@
</span><span class="cx"> // a layer without knowing the containing region in advance.
</span><span class="cx"> // ASSERT(flowThread->currentRegion() && flowThread->currentRegion()->isRenderNamedFlowFragment());
</span><span class="cx">
</span><del>- return toRenderNamedFlowFragment(flowThread->currentRegion());
</del><ins>+ return downcast<RenderNamedFlowFragment>(flowThread->currentRegion());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderFlowThread* RenderObject::locateFlowThreadContainingBlock() const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1122,10 +1122,6 @@
</span><span class="cx"> return m_bitfields.boxDecorationState() == HasBoxDecorationsAndBackgroundIsKnownToBeObscured;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// FIXME: Remove this macro and use SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT() instead.
-#define RENDER_OBJECT_TYPE_CASTS(ToValueTypeName, predicate) \
- TYPE_CASTS_BASE(ToValueTypeName, RenderObject, renderer, is<ToValueTypeName>(*renderer), is<ToValueTypeName>(renderer))
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #define SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(ToValueTypeName, predicate) \
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderProgressh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderProgress.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderProgress.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderProgress.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -58,8 +58,6 @@
</span><span class="cx"> Timer<RenderProgress> m_animationTimer;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderProgress, isProgress())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderProgress, isProgress())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRubycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRuby.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRuby.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderRuby.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -94,10 +94,10 @@
</span><span class="cx"> static RenderRubyRun* lastRubyRun(const RenderElement* ruby)
</span><span class="cx"> {
</span><span class="cx"> RenderObject* child = ruby->lastChild();
</span><del>- if (child && !child->isRubyRun())
</del><ins>+ if (child && !is<RenderRubyRun>(*child))
</ins><span class="cx"> child = child->previousSibling();
</span><del>- ASSERT(!child || child->isRubyRun() || child->isBeforeContent() || child == rubyBeforeBlock(ruby));
- return child && child->isRubyRun() ? toRenderRubyRun(child) : 0;
</del><ins>+ ASSERT(!child || is<RenderRubyRun>(*child) || child->isBeforeContent() || child == rubyBeforeBlock(ruby));
+ return downcast<RenderRubyRun>(child);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline RenderRubyRun& findRubyRunParent(RenderObject& child)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRubyBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRubyBase.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRubyBase.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderRubyBase.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -131,9 +131,7 @@
</span><span class="cx"> RenderRubyRun* RenderRubyBase::rubyRun() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(parent());
</span><del>- ASSERT(parent()->isRubyRun());
-
- return &toRenderRubyRun(*parent());
</del><ins>+ return downcast<RenderRubyRun>(parent());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ETextAlign RenderRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRubyRuncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRubyRun.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRubyRun.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderRubyRun.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -163,15 +163,15 @@
</span><span class="cx"> if (!beingDestroyed() && !documentBeingDestroyed() && child.isRubyText()) {
</span><span class="cx"> RenderRubyBase* base = rubyBase();
</span><span class="cx"> RenderObject* rightNeighbour = nextSibling();
</span><del>- if (base && rightNeighbour && rightNeighbour->isRubyRun()) {
</del><ins>+ if (base && is<RenderRubyRun>(rightNeighbour)) {
</ins><span class="cx"> // Ruby run without a base can happen only at the first run.
</span><del>- RenderRubyRun* rightRun = toRenderRubyRun(rightNeighbour);
- if (rightRun->hasRubyBase()) {
- RenderRubyBase* rightBase = rightRun->rubyBaseSafe();
</del><ins>+ RenderRubyRun& rightRun = downcast<RenderRubyRun>(*rightNeighbour);
+ if (rightRun.hasRubyBase()) {
+ RenderRubyBase* rightBase = rightRun.rubyBaseSafe();
</ins><span class="cx"> // Collect all children in a single base, then swap the bases.
</span><span class="cx"> rightBase->mergeChildrenWithBase(base);
</span><del>- moveChildTo(rightRun, base);
- rightRun->moveChildTo(this, rightBase);
</del><ins>+ moveChildTo(&rightRun, base);
+ rightRun.moveChildTo(this, rightBase);
</ins><span class="cx"> // The now empty ruby base will be removed below.
</span><span class="cx"> ASSERT(!rubyBase()->firstChild());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRubyRunh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRubyRun.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRubyRun.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderRubyRun.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -77,8 +77,6 @@
</span><span class="cx"> virtual void removeLeftoverAnonymousBlock(RenderBlock*) { }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderRubyRun, isRubyRun())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderRubyRun, isRubyRun())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSliderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSlider.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSlider.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderSlider.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -51,8 +51,6 @@
</span><span class="cx"> virtual void layout() override;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSlider, isSlider())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSlider, isSlider())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -438,8 +438,8 @@
</span><span class="cx">
</span><span class="cx"> ALWAYS_INLINE float RenderText::widthFromCache(const Font& f, int start, int len, float xPos, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow, const RenderStyle& style) const
</span><span class="cx"> {
</span><del>- if (style.hasTextCombine() && isCombineText()) {
- const RenderCombineText& combineText = toRenderCombineText(*this);
</del><ins>+ if (style.hasTextCombine() && is<RenderCombineText>(*this)) {
+ const RenderCombineText& combineText = downcast<RenderCombineText>(*this);
</ins><span class="cx"> if (combineText.isCombined())
</span><span class="cx"> return combineText.combinedTextWidth(f);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeGtk.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1620,7 +1620,7 @@
</span><span class="cx"> IntRect RenderThemeGtk::calculateProgressRect(const RenderObject& renderObject, const IntRect& fullBarRect)
</span><span class="cx"> {
</span><span class="cx"> IntRect progressRect(fullBarRect);
</span><del>- const RenderProgress& renderProgress = toRenderProgress(renderObject);
</del><ins>+ const auto& renderProgress = downcast<RenderProgress>(renderObject);
</ins><span class="cx"> if (renderProgress.isDeterminate()) {
</span><span class="cx"> int progressWidth = progressRect.width() * renderProgress.position();
</span><span class="cx"> if (renderObject.style().direction() == RTL)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -849,7 +849,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderThemeIOS::paintProgressBar(const RenderObject& renderer, const PaintInfo& paintInfo, const IntRect& rect)
</span><span class="cx"> {
</span><del>- if (!renderer.isProgress())
</del><ins>+ if (!is<RenderProgress>(renderer))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> const int progressBarHeight = 9;
</span><span class="lines">@@ -897,7 +897,7 @@
</span><span class="cx">
</span><span class="cx"> context->fillRect(FloatRect(rect.x(), verticalRenderingPosition, rect.width(), upperGradientHeight));
</span><span class="cx">
</span><del>- const RenderProgress& renderProgress = *toRenderProgress(&renderer);
</del><ins>+ const auto& renderProgress = downcast<RenderProgress>(renderer);
</ins><span class="cx"> if (renderProgress.isDeterminate()) {
</span><span class="cx"> // 2) Draw the progress bar.
</span><span class="cx"> double position = clampTo(renderProgress.position(), 0.0, 1.0);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -967,12 +967,12 @@
</span><span class="cx">
</span><span class="cx"> bool RenderThemeMac::paintMeter(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
</span><span class="cx"> {
</span><del>- if (!renderObject.isMeter())
</del><ins>+ if (!is<RenderMeter>(renderObject))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> LocalCurrentGraphicsContext localContext(paintInfo.context);
</span><span class="cx">
</span><del>- NSLevelIndicatorCell* cell = levelIndicatorFor(toRenderMeter(renderObject));
</del><ins>+ NSLevelIndicatorCell* cell = levelIndicatorFor(downcast<RenderMeter>(renderObject));
</ins><span class="cx"> GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">
</span><span class="cx"> [cell drawWithFrame:rect inView:documentViewFor(renderObject)];
</span><span class="lines">@@ -1115,13 +1115,13 @@
</span><span class="cx">
</span><span class="cx"> bool RenderThemeMac::paintProgressBar(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
</span><span class="cx"> {
</span><del>- if (!renderObject.isProgress())
</del><ins>+ if (!is<RenderProgress>(renderObject))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> IntRect inflatedRect = progressBarRectForBounds(renderObject, rect);
</span><span class="cx"> NSControlSize controlSize = controlSizeForFont(renderObject.style());
</span><span class="cx">
</span><del>- const RenderProgress& renderProgress = *toRenderProgress(&renderObject);
</del><ins>+ const auto& renderProgress = downcast<RenderProgress>(renderObject);
</ins><span class="cx"> HIThemeTrackDrawInfo trackInfo;
</span><span class="cx"> trackInfo.version = 0;
</span><span class="cx"> if (controlSize == NSRegularControlSize)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeSafaricpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeSafari.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeSafari.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderThemeSafari.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1216,10 +1216,10 @@
</span><span class="cx"> {
</span><span class="cx"> // NOTE: This routine is for testing only. It should be fleshed out with a real CG-based implementation.
</span><span class="cx"> // Right now it uses a slider, with the thumb positioned at the meter point.
</span><del>- if (!renderObject.isMeter())
</del><ins>+ if (!is<RenderMeter>(renderObject))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- HTMLMeterElement* element = toRenderMeter(renderObject).meterElement();
</del><ins>+ HTMLMeterElement* element = downcast<RenderMeter>(renderObject).meterElement();
</ins><span class="cx">
</span><span class="cx"> int remaining = static_cast<int>((1.0 - element->valueRatio()) * static_cast<double>(rect.size().width()));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeWin.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeWin.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1175,10 +1175,10 @@
</span><span class="cx">
</span><span class="cx"> bool RenderThemeWin::paintMeter(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect)
</span><span class="cx"> {
</span><del>- if (!renderObject.isMeter())
</del><ins>+ if (!is<RenderMeter>(renderObject))
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- HTMLMeterElement* element = toRenderMeter(renderObject).meterElement();
</del><ins>+ HTMLMeterElement* element = downcast<RenderMeter>(renderObject).meterElement();
</ins><span class="cx">
</span><span class="cx"> ThemeData theme = getThemeData(renderObject);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -652,8 +652,8 @@
</span><span class="cx">
</span><span class="cx"> Element* generatingElement = renderRegion->generatingElement();
</span><span class="cx"> if (generatingElement) {
</span><del>- bool isRenderNamedFlowFragment = renderRegion->isRenderNamedFlowFragment();
- if (isRenderNamedFlowFragment && toRenderNamedFlowFragment(renderRegion)->hasCustomRegionStyle())
</del><ins>+ bool isRenderNamedFlowFragment = is<RenderNamedFlowFragment>(*renderRegion);
+ if (isRenderNamedFlowFragment && downcast<RenderNamedFlowFragment>(*renderRegion).hasCustomRegionStyle())
</ins><span class="cx"> ts << " region style: 1";
</span><span class="cx"> if (renderRegion->hasAutoLogicalHeight())
</span><span class="cx"> ts << " hasAutoLogicalHeight";
</span><span class="lines">@@ -802,8 +802,8 @@
</span><span class="cx">
</span><span class="cx"> // Altough the RenderFlowThread requires a layer, it is not collected by its parent,
</span><span class="cx"> // so we have to treat it as a special case.
</span><del>- if (l->renderer().isRenderView())
- writeRenderNamedFlowThreads(ts, toRenderView(l->renderer()), rootLayer, paintDirtyRect, indent, behavior);
</del><ins>+ if (is<RenderView>(l->renderer()))
+ writeRenderNamedFlowThreads(ts, downcast<RenderView>(l->renderer()), rootLayer, paintDirtyRect, indent, behavior);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static String nodePosition(Node* node)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderVideoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderVideo.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderVideo.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderVideo.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -90,8 +90,6 @@
</span><span class="cx"> LayoutSize m_cachedImageSize;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderVideo, isVideo())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderVideo, isVideo())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -66,11 +66,11 @@
</span><span class="cx">
</span><span class="cx"> void checkForSpanner()
</span><span class="cx"> {
</span><del>- if (!m_current || !m_current->isRenderMultiColumnSpannerPlaceholder())
</del><ins>+ if (!is<RenderMultiColumnSpannerPlaceholder>(m_current))
</ins><span class="cx"> return;
</span><del>- RenderMultiColumnSpannerPlaceholder* placeholder = toRenderMultiColumnSpannerPlaceholder(m_current);
- m_spannerStack.append(placeholder);
- m_current = placeholder->spanner();
</del><ins>+ auto& placeholder = downcast<RenderMultiColumnSpannerPlaceholder>(*m_current);
+ m_spannerStack.append(&placeholder);
+ m_current = placeholder.spanner();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderObject* current()
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool isComposited(RenderElement* object)
</span><span class="cx"> {
</span><del>- return object->hasLayer() && toRenderLayerModelObject(object)->layer()->isComposited();
</del><ins>+ return object->hasLayer() && downcast<RenderLayerModelObject>(*object).layer()->isComposited();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline bool rendererObscuresBackground(RenderElement* rootObject)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderView.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -369,8 +369,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView())
-
</del><span class="cx"> // Stack-based class to assist with LayoutState push/pop
</span><span class="cx"> class LayoutStateMaintainer {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderWidgeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderWidget.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderWidget.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/RenderWidget.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -104,8 +104,6 @@
</span><span class="cx"> IntRect m_clipRect; // The rectangle needs to remain correct after scrolling, so it is stored in content view coordinates, and not clipped to window.
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderWidget, isWidget())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderWidget, isWidget())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineBreakingContextInlineHeadersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/line/BreakingContextInlineHeaders.h        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -594,8 +594,8 @@
</span><span class="cx"> if (m_autoWrap && !RenderStyle::autoWrap(m_lastWS) && m_ignoringSpaces)
</span><span class="cx"> commitLineBreakAtCurrentWidth(renderText);
</span><span class="cx">
</span><del>- if (renderText.style().hasTextCombine() && m_current.renderer()->isCombineText() && !toRenderCombineText(*m_current.renderer()).isCombined()) {
- RenderCombineText& combineRenderer = toRenderCombineText(*m_current.renderer());
</del><ins>+ if (renderText.style().hasTextCombine() && is<RenderCombineText>(*m_current.renderer()) && !downcast<RenderCombineText>(*m_current.renderer()).isCombined()) {
+ auto& combineRenderer = downcast<RenderCombineText>(*m_current.renderer());
</ins><span class="cx"> combineRenderer.combineText();
</span><span class="cx"> // The length of the renderer's text may have changed. Increment stale iterator positions
</span><span class="cx"> if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreak, combineRenderer)) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderinglineLineBreakercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/line/LineBreaker.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/line/LineBreaker.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/rendering/line/LineBreaker.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -67,9 +67,9 @@
</span><span class="cx"> }
</span><span class="cx"> } else if (object.isFloating())
</span><span class="cx"> m_block.positionNewFloatOnLine(m_block.insertFloatingObject(downcast<RenderBox>(object)), lastFloatFromPreviousLine, lineInfo, width);
</span><del>- else if (object.isText() && object.style().hasTextCombine() && object.isCombineText() && !toRenderCombineText(object).isCombined()) {
- toRenderCombineText(object).combineText();
- if (toRenderCombineText(object).isCombined())
</del><ins>+ else if (is<RenderCombineText>(object) && object.style().hasTextCombine() && !downcast<RenderCombineText>(object).isCombined()) {
+ downcast<RenderCombineText>(object).combineText();
+ if (downcast<RenderCombineText>(object).isCombined())
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx"> resolver.increment();
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -2220,14 +2220,13 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto renderer = element->renderer();
- if (!renderer || !renderer->isEmbeddedObject()) {
</del><ins>+ auto* renderer = element->renderer();
+ if (!is<RenderEmbeddedObject>(renderer)) {
</ins><span class="cx"> ec = INVALID_ACCESS_ERR;
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RenderEmbeddedObject* embed = toRenderEmbeddedObject(renderer);
- return embed->isReplacementObscured();
</del><ins>+ return downcast<RenderEmbeddedObject>(*renderer).isReplacementObscured();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool Internals::isPluginSnapshotted(Element* element, ExceptionCode& ec)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-10-19 Chris Dumez <cdumez@apple.com>
+
+ Use is<>() / downcast<>() for all remaining RenderObject subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137845
+
+ Reviewed by Darin Adler.
+
+ Use is<>() / downcast<>() for all remaining RenderObject subclasses and
+ clean up the surrounding code.
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView pluginHostDied]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView _windowClipRect]):
+ (-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+ (WebFrameLoaderClient::createJavaAppletWidget):
+
</ins><span class="cx"> 2014-10-17 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Build fix for 32-bit Yosemite
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsHostedWebHostedNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -430,10 +430,8 @@
</span><span class="cx">
</span><span class="cx"> - (void)pluginHostDied
</span><span class="cx"> {
</span><del>- if (_element->renderer() && _element->renderer()->isEmbeddedObject()) {
- RenderEmbeddedObject* renderer = toRenderEmbeddedObject(_element->renderer());
- renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
- }
</del><ins>+ if (is<RenderEmbeddedObject>(_element->renderer()))
+ downcast<RenderEmbeddedObject>(*_element->renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
</ins><span class="cx">
</span><span class="cx"> _pluginLayer = nil;
</span><span class="cx"> _proxy = 0;
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebBaseNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -290,11 +290,11 @@
</span><span class="cx">
</span><span class="cx"> - (NSRect)_windowClipRect
</span><span class="cx"> {
</span><del>- RenderObject* renderer = _element->renderer();
</del><ins>+ auto* renderer = _element->renderer();
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return NSZeroRect;
</span><span class="cx">
</span><del>- return toRenderWidget(renderer)->windowClipRect();
</del><ins>+ return downcast<RenderWidget>(*renderer).windowClipRect();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSRect)visibleRect
</span><span class="lines">@@ -874,13 +874,13 @@
</span><span class="cx">
</span><span class="cx"> - (NSRect)actualVisibleRectInWindow
</span><span class="cx"> {
</span><del>- RenderObject* renderer = _element->renderer();
</del><ins>+ auto* renderer = _element->renderer();
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return NSZeroRect;
</span><span class="cx">
</span><span class="cx"> IntRect widgetRect = renderer->pixelSnappedAbsoluteClippedOverflowRect();
</span><span class="cx"> widgetRect = renderer->view().frameView().contentsToWindow(widgetRect);
</span><del>- return intersection(toRenderWidget(renderer)->windowClipRect(), widgetRect);
</del><ins>+ return intersection(downcast<RenderWidget>(*renderer).windowClipRect(), widgetRect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (CALayer *)pluginLayer
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1962,8 +1962,8 @@
</span><span class="cx"> if (pluginPackage) {
</span><span class="cx"> if (WKShouldBlockPlugin([pluginPackage bundleIdentifier], [pluginPackage bundleVersion])) {
</span><span class="cx"> errorCode = WebKitErrorBlockedPlugInVersion;
</span><del>- if (element->renderer()->isEmbeddedObject())
- toRenderEmbeddedObject(element->renderer())->setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</del><ins>+ if (is<RenderEmbeddedObject>(*element->renderer()))
+ downcast<RenderEmbeddedObject>(*element->renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</ins><span class="cx"> } else {
</span><span class="cx"> if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
</span><span class="cx"> view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, attributeKeys, kit(paramValues), baseURL, kit(element), loadManually);
</span><span class="lines">@@ -2067,8 +2067,8 @@
</span><span class="cx"> if (pluginPackage) {
</span><span class="cx"> if (WKShouldBlockPlugin([pluginPackage bundleIdentifier], [pluginPackage bundleVersion])) {
</span><span class="cx"> errorCode = WebKitErrorBlockedPlugInVersion;
</span><del>- if (element->renderer()->isEmbeddedObject())
- toRenderEmbeddedObject(element->renderer())->setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</del><ins>+ if (is<RenderEmbeddedObject>(*element->renderer()))
+ downcast<RenderEmbeddedObject>(*element->renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</ins><span class="cx"> } else {
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-10-19 Chris Dumez <cdumez@apple.com>
+
+ Use is<>() / downcast<>() for all remaining RenderObject subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137845
+
+ Reviewed by Darin Adler.
+
+ Use is<>() / downcast<>() for all remaining RenderObject subclasses and
+ clean up the surrounding code.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::pluginProcessCrashed):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::createPlugin):
+
</ins><span class="cx"> 2014-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -1466,16 +1466,12 @@
</span><span class="cx"> {
</span><span class="cx"> m_pluginProcessHasCrashed = true;
</span><span class="cx">
</span><del>- if (!m_pluginElement->renderer())
</del><ins>+ if (!is<RenderEmbeddedObject>(m_pluginElement->renderer()))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!m_pluginElement->renderer()->isEmbeddedObject())
- return;
-
</del><span class="cx"> m_pluginElement->setNeedsStyleRecalc(SyntheticStyleChange);
</span><span class="cx">
</span><del>- RenderEmbeddedObject* renderer = toRenderEmbeddedObject(m_pluginElement->renderer());
- renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
</del><ins>+ downcast<RenderEmbeddedObject>(*m_pluginElement->renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
</ins><span class="cx">
</span><span class="cx"> Widget::invalidate();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (174874 => 174875)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-10-20 03:24:57 UTC (rev 174874)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-10-20 03:42:03 UTC (rev 174875)
</span><span class="lines">@@ -654,11 +654,11 @@
</span><span class="cx">
</span><span class="cx"> if (isBlockedPlugin) {
</span><span class="cx"> bool replacementObscured = false;
</span><del>- if (pluginElement->renderer()->isEmbeddedObject()) {
- RenderEmbeddedObject* renderObject = toRenderEmbeddedObject(pluginElement->renderer());
- renderObject->setPluginUnavailabilityReasonWithDescription(RenderEmbeddedObject::InsecurePluginVersion, unavailabilityDescription);
- replacementObscured = renderObject->isReplacementObscured();
- renderObject->setUnavailablePluginIndicatorIsHidden(replacementObscured);
</del><ins>+ if (is<RenderEmbeddedObject>(*pluginElement->renderer())) {
+ auto& renderObject = downcast<RenderEmbeddedObject>(*pluginElement->renderer());
+ renderObject.setPluginUnavailabilityReasonWithDescription(RenderEmbeddedObject::InsecurePluginVersion, unavailabilityDescription);
+ replacementObscured = renderObject.isReplacementObscured();
+ renderObject.setUnavailablePluginIndicatorIsHidden(replacementObscured);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> send(Messages::WebPageProxy::DidBlockInsecurePluginVersion(parameters.mimeType, parameters.url.string(), frameURLString, pageURLString, replacementObscured));
</span></span></pre>
</div>
</div>
</body>
</html>