<!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&lt;&gt;() / downcast&lt;&gt;() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845

Reviewed by Darin Adler.

Source/WebCore:

Use is&lt;&gt;() / downcast&lt;&gt;() 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&lt;&gt;() / downcast&lt;&gt;() 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&lt;&gt;() / downcast&lt;&gt;() 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  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Use is&lt;&gt;() / downcast&lt;&gt;() for all remaining RenderObject subclasses
+        https://bugs.webkit.org/show_bug.cgi?id=137845
+
+        Reviewed by Darin Adler.
+
+        Use is&lt;&gt;() / downcast&lt;&gt;() 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  &lt;cdumez@apple.com&gt;
+
</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-&gt;isProgress())
</del><ins>+    if (!is&lt;RenderProgress&gt;(*m_renderer))
</ins><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    return toRenderProgress(m_renderer)-&gt;progressElement();
</del><ins>+    return downcast&lt;RenderProgress&gt;(*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-&gt;isMeter())
</del><ins>+    if (!is&lt;RenderMeter&gt;(*m_renderer))
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return toRenderMeter(m_renderer)-&gt;meterElement();
</del><ins>+    return downcast&lt;RenderMeter&gt;(*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-&gt;isRenderView())
</del><ins>+    if (!is&lt;RenderView&gt;(*m_renderer))
</ins><span class="cx">         return 0;
</span><del>-    return toRenderView(*m_renderer).frameView().layoutCount();
</del><ins>+    return downcast&lt;RenderView&gt;(*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)-&gt;widget();
</del><ins>+    return downcast&lt;RenderWidget&gt;(*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-&gt;isWidget())
</del><ins>+        if (!is&lt;RenderWidget&gt;(*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)-&gt;widget();
</del><ins>+        Widget* widget = downcast&lt;RenderWidget&gt;(*renderer).widget();
</ins><span class="cx">         if (!is&lt;FrameView&gt;(widget))
</span><span class="cx">             break;
</span><span class="cx">         Frame&amp; frame = downcast&lt;FrameView&gt;(*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-&gt;renderer();
-    if (!renderer || !renderer-&gt;isWidget())
</del><ins>+    auto* renderer = focusedElement-&gt;renderer();
+    if (!is&lt;RenderWidget&gt;(renderer))
</ins><span class="cx">         return nullptr;
</span><del>-    return toRenderWidget(renderer)-&gt;widget();
</del><ins>+    return downcast&lt;RenderWidget&gt;(*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()-&gt;renderer();
</span><span class="cx"> 
</span><span class="cx">     if (renderer-&gt;isBR())
</span><del>-        inlineBox = !caretOffset ? toRenderLineBreak(renderer)-&gt;inlineBoxWrapper() : nullptr;
</del><ins>+        inlineBox = !caretOffset ? downcast&lt;RenderLineBreak&gt;(*renderer).inlineBoxWrapper() : nullptr;
</ins><span class="cx">     else if (is&lt;RenderText&gt;(*renderer)) {
</span><span class="cx">         auto&amp; textRenderer = downcast&lt;RenderText&gt;(*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-&gt;hasRegions())
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(m_parentFlowThread-&gt;lastRegion());
-    return namedFlowFragment-&gt;regionOversetState() == RegionOverset;
</del><ins>+    const auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*m_parentFlowThread-&gt;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&amp; renderRegion : regionList) {
</span><del>-        const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+        const auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*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-&gt;isPseudoElementRegion())
</del><ins>+        if (namedFlowFragment.isPseudoElementRegion())
</ins><span class="cx">             continue;
</span><del>-        countNonPseudoRegions++;
-        if (namedFlowFragment-&gt;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-&gt;renderer(), m_parentFlowThread)) {
</span><span class="cx">         const RenderRegionList&amp; regionList = m_parentFlowThread-&gt;renderRegionList();
</span><span class="cx">         for (const auto&amp; renderRegion : regionList) {
</span><del>-            const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+            const auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*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-&gt;isPseudoElementRegion())
</del><ins>+            if (namedFlowFragment.isPseudoElementRegion())
</ins><span class="cx">                 continue;
</span><del>-            if (m_parentFlowThread-&gt;objectInFlowRegion(contentNode-&gt;renderer(), namedFlowFragment)) {
-                ASSERT(namedFlowFragment-&gt;generatingElement());
-                regionElements.append(*namedFlowFragment-&gt;generatingElement());
</del><ins>+            if (m_parentFlowThread-&gt;objectInFlowRegion(contentNode-&gt;renderer(), &amp;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&amp; regionList = m_parentFlowThread-&gt;renderRegionList();
</span><span class="cx">     for (const auto&amp; renderRegion : regionList) {
</span><del>-        const RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+        const auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*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-&gt;isPseudoElementRegion())
</del><ins>+        if (namedFlowFragment.isPseudoElementRegion())
</ins><span class="cx">             continue;
</span><del>-        ASSERT(namedFlowFragment-&gt;generatingElement());
-        regionElements.append(*namedFlowFragment-&gt;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-&gt;renderer();
</span><del>-    if (!renderer || !renderer-&gt;isWidget())
</del><ins>+    if (!is&lt;RenderWidget&gt;(renderer))
</ins><span class="cx">         return false;
</span><del>-    Widget* widget = toRenderWidget(renderer)-&gt;widget();
</del><ins>+    Widget* widget = downcast&lt;RenderWidget&gt;(*renderer).widget();
</ins><span class="cx">     return widget &amp;&amp; widget-&gt;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-&gt;renderer())
-        do
-            n = n-&gt;parentNode();
-        while (n &amp;&amp; !n-&gt;hasTagName(objectTag));
</del><ins>+    if (!node-&gt;renderer()) {
+        do {
+            node = node-&gt;parentNode();
+        } while (node &amp;&amp; !is&lt;HTMLObjectElement&gt;(*node));
+    }
</ins><span class="cx"> 
</span><del>-    if (n &amp;&amp; n-&gt;renderer() &amp;&amp; n-&gt;renderer()-&gt;isWidget())
-        return toRenderWidget(n-&gt;renderer());
</del><ins>+    if (node &amp;&amp; is&lt;RenderWidget&gt;(node-&gt;renderer()))
+        return downcast&lt;RenderWidget&gt;(node-&gt;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&amp; tagName, Document&amp; 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()-&gt;isWidget())
-        return 0;
-    return toRenderWidget(renderer());
</del><ins>+    if (!is&lt;RenderWidget&gt;(renderer()))
+        return nullptr;
+    return downcast&lt;RenderWidget&gt;(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() &amp;&amp; renderer()-&gt;isVideo())
-        return renderer()-&gt;view().compositor().canAccelerateVideoRendering(toRenderVideo(*renderer()));
</del><ins>+    if (is&lt;RenderVideo&gt;(renderer()))
+        return renderer()-&gt;view().compositor().canAccelerateVideoRendering(downcast&lt;RenderVideo&gt;(*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() &amp;&amp; renderer()-&gt;isMeter())
-        return toRenderMeter(renderer());
-    return toRenderMeter(descendantsOfType&lt;Element&gt;(*userAgentShadowRoot()).first()-&gt;renderer());
</del><ins>+    if (is&lt;RenderMeter&gt;(renderer()))
+        return downcast&lt;RenderMeter&gt;(renderer());
+    return downcast&lt;RenderMeter&gt;(descendantsOfType&lt;Element&gt;(*userAgentShadowRoot()).first()-&gt;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()-&gt;isEmbeddedObject())
</del><ins>+    if (useFallbackContent() || !is&lt;RenderEmbeddedObject&gt;(renderer()))
</ins><span class="cx">         return false;
</span><del>-    return !toRenderEmbeddedObject(renderer())-&gt;isPluginUnavailable();
</del><ins>+    return !downcast&lt;RenderEmbeddedObject&gt;(*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()-&gt;isEmbeddedObject())
-        return 0;
-    return toRenderEmbeddedObject(renderer());
</del><ins>+    return is&lt;RenderEmbeddedObject&gt;(renderer()) ? downcast&lt;RenderEmbeddedObject&gt;(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&amp; renderer = toRenderEmbeddedObject(*this-&gt;renderer());
</del><ins>+    auto&amp; renderer = downcast&lt;RenderEmbeddedObject&gt;(*this-&gt;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() &amp;&amp; renderer()-&gt;isProgress())
-        return toRenderProgress(renderer());
-    return toRenderProgress(descendantsOfType&lt;Element&gt;(*userAgentShadowRoot()).first()-&gt;renderer());
</del><ins>+    if (is&lt;RenderProgress&gt;(renderer()))
+        return downcast&lt;RenderProgress&gt;(renderer());
+    return downcast&lt;RenderProgress&gt;(descendantsOfType&lt;Element&gt;(*userAgentShadowRoot()).first()-&gt;renderer());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLProgressElement::parseAttribute(const QualifiedName&amp; name, const AtomicString&amp; 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 &amp;&amp; m_pluginElement-&gt;renderer()) {
-        ASSERT(m_pluginElement-&gt;renderer()-&gt;isEmbeddedObject());
-        return toRenderEmbeddedObject(m_pluginElement-&gt;renderer())-&gt;widget();
-    }
-    return 0;
</del><ins>+    if (m_pluginElement &amp;&amp; m_pluginElement-&gt;renderer())
+        return downcast&lt;RenderEmbeddedObject&gt;(*m_pluginElement-&gt;renderer()).widget();
+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginDocument::setPluginElement(PassRefPtr&lt;HTMLPlugInElement&gt; 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-&gt;type() == eventNames().inputEvent &amp;&amp; time != mediaController()-&gt;currentTime())
</span><span class="cx">         mediaController()-&gt;setCurrentTime(time);
</span><span class="cx"> 
</span><del>-    RenderSlider* slider = toRenderSlider(renderer());
-    if (slider &amp;&amp; slider-&gt;inDragMode())
</del><ins>+    RenderSlider&amp; slider = downcast&lt;RenderSlider&gt;(*renderer());
+    if (slider.inDragMode())
</ins><span class="cx">         m_controls-&gt;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-&gt;bounds();
</span><span class="cx">     else {
</span><del>-        if (!mediaElement-&gt;renderer() || !mediaElement-&gt;renderer()-&gt;isVideo())
</del><ins>+        if (!is&lt;RenderVideo&gt;(mediaElement-&gt;renderer()))
</ins><span class="cx">             return;
</span><del>-        videoBox = toRenderVideo(*mediaElement-&gt;renderer()).videoBox();
</del><ins>+        videoBox = downcast&lt;RenderVideo&gt;(*mediaElement-&gt;renderer()).videoBox();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!forceUpdate &amp;&amp; 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-&gt;renderer();
</del><ins>+    auto* renderer = this-&gt;renderer();
</ins><span class="cx">     if (!renderer)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (!renderer-&gt;hasLayer())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    RenderLayer* layer = toRenderLayerModelObject(renderer)-&gt;layer();
</del><ins>+    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(*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&amp; errorString, RenderObject* renderer, RefPtr&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::LayerTree::Layer&gt;&gt;&amp; layers)
</span><span class="cx"> {
</span><span class="cx">     if (renderer-&gt;hasLayer()) {
</span><del>-        gatherLayersUsingRenderLayerHierarchy(errorString, toRenderLayerModelObject(renderer)-&gt;layer(), layers);
</del><ins>+        gatherLayersUsingRenderLayerHierarchy(errorString, downcast&lt;RenderLayerModelObject&gt;(*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-&gt;flowThreadContainingBlock();
</span><del>-    if (containingFlowThread &amp;&amp; containingFlowThread-&gt;isRenderNamedFlowThread()) {
</del><ins>+    if (is&lt;RenderNamedFlowThread&gt;(containingFlowThread)) {
</ins><span class="cx">         RefPtr&lt;InspectorObject&gt; contentFlowInfo = InspectorObject::create();
</span><del>-        contentFlowInfo-&gt;setString(&quot;name&quot;, toRenderNamedFlowThread(containingFlowThread)-&gt;flowThreadName());
</del><ins>+        contentFlowInfo-&gt;setString(&quot;name&quot;, downcast&lt;RenderNamedFlowThread&gt;(*containingFlowThread).flowThreadName());
</ins><span class="cx">         elementInfo-&gt;setObject(&quot;contentFlowInfo&quot;, 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-&gt;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-&gt;view();
</span><del>-    if (renderer &amp;&amp; renderer-&gt;isWidget() &amp;&amp; view)
-        toRenderWidget(renderer)-&gt;setWidget(view);
</del><ins>+    if (is&lt;RenderWidget&gt;(renderer) &amp;&amp; view)
+        downcast&lt;RenderWidget&gt;(*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-&gt;renderer();
</del><ins>+        return nullptr;
+    auto* object = ownerElement-&gt;renderer();
</ins><span class="cx">     if (!object)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     // FIXME: If &lt;object&gt; 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-&gt;isWidget())
-        return 0;
-    return toRenderWidget(object);
</del><ins>+    if (!is&lt;RenderWidget&gt;(*object))
+        return nullptr;
+    return downcast&lt;RenderWidget&gt;(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 &amp;&amp; (m_firstLayout || toRenderView(*root).printing());
</del><ins>+        m_needsFullRepaint = !subtree &amp;&amp; (m_firstLayout || downcast&lt;RenderView&gt;(*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-&gt;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 &amp;&amp; !toRenderView(*root).printing())
</del><ins>+    if (!subtree &amp;&amp; !downcast&lt;RenderView&gt;(*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&amp; 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()-&gt;renderer() : 0;
-    if (!target || !target-&gt;isWidget())
</del><ins>+    RenderObject* target = event.targetNode() ? event.targetNode()-&gt;renderer() : nullptr;
+    if (!is&lt;RenderWidget&gt;(target))
</ins><span class="cx">         return false;
</span><del>-    return passMouseDownEventToWidget(toRenderWidget(target)-&gt;widget());
</del><ins>+    return passMouseDownEventToWidget(downcast&lt;RenderWidget&gt;(*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&amp; 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()-&gt;renderer() : nullptr;
-    if (!target || !target-&gt;isWidget())
</del><ins>+    auto* target = event.targetNode() ? event.targetNode()-&gt;renderer() : nullptr;
+    if (!is&lt;RenderWidget&gt;(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)-&gt;widget());
</del><ins>+    return passMouseDownEventToWidget(downcast&lt;RenderWidget&gt;(*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-&gt;renderer();
-            if (!renderer || !renderer-&gt;isWidget())
</del><ins>+            auto* renderer = node-&gt;renderer();
+            if (!is&lt;RenderWidget&gt;(renderer))
</ins><span class="cx">                 return false;
</span><del>-            Widget* widget = toRenderWidget(renderer)-&gt;widget();
</del><ins>+            Widget* widget = downcast&lt;RenderWidget&gt;(*renderer).widget();
</ins><span class="cx">             if (!widget || !widget-&gt;isFrameView())
</span><span class="cx">                 return false;
</span><del>-            if (!passWidgetMouseDownEventToWidget(toRenderWidget(renderer)))
</del><ins>+            if (!passWidgetMouseDownEventToWidget(downcast&lt;RenderWidget&gt;(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&amp; 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()-&gt;renderer() : nullptr;
-    if (!target || !target-&gt;isWidget())
</del><ins>+    auto* target = event.targetNode() ? event.targetNode()-&gt;renderer() : nullptr;
+    if (!is&lt;RenderWidget&gt;(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)-&gt;widget());
</del><ins>+    return passMouseDownEventToWidget(downcast&lt;RenderWidget&gt;(*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-&gt;renderer();
-            if (!renderer || !renderer-&gt;isWidget())
</del><ins>+            auto* renderer = node-&gt;renderer();
+            if (!is&lt;RenderWidget&gt;(renderer))
</ins><span class="cx">                 return false;
</span><del>-            Widget* widget = toRenderWidget(renderer)-&gt;widget();
</del><ins>+            Widget* widget = downcast&lt;RenderWidget&gt;(*renderer).widget();
</ins><span class="cx">             if (!widget || !widget-&gt;isFrameView())
</span><span class="cx">                 return false;
</span><del>-            if (!passWidgetMouseDownEventToWidget(toRenderWidget(renderer)))
</del><ins>+            if (!passWidgetMouseDownEventToWidget(downcast&lt;RenderWidget&gt;(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-&gt;renderer();
-    if (!target || !target-&gt;isWidget())
</del><ins>+    auto* target = eventTarget-&gt;renderer();
+    if (!is&lt;RenderWidget&gt;(target))
</ins><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    return toRenderWidget(target)-&gt;widget();
</del><ins>+    return downcast&lt;RenderWidget&gt;(*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&amp; object, FormType type, const IntRect&amp; rect)
</span><span class="cx"> {
</span><span class="cx">     if (type == SliderVertical || type == SliderHorizontal) {
</span><del>-        if (!object.isSlider())
</del><ins>+        if (!is&lt;RenderSlider&gt;(object))
</ins><span class="cx">             return; // probably have -webkit-appearance: slider..
</span><span class="cx"> 
</span><del>-        const RenderSlider* renderSlider = toRenderSlider(&amp;object);
-        HTMLInputElement&amp; input = renderSlider-&gt;element();
</del><ins>+        HTMLInputElement&amp; input = downcast&lt;RenderSlider&gt;(object).element();
</ins><span class="cx">         double valueRange = input.maximum() - input.minimum();
</span><span class="cx"> 
</span><span class="cx">         OwnPtr&lt;Edje_Message_Float_Set&gt; msg = adoptPtr(static_cast&lt;Edje_Message_Float_Set*&gt;(::operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
</span><span class="lines">@@ -323,7 +322,7 @@
</span><span class="cx">         msg-&gt;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&amp; renderProgress = toRenderProgress(object);
</del><ins>+        const auto&amp; renderProgress = downcast&lt;RenderProgress&gt;(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&amp; fontToUse(const RenderStyle&amp; style, const RenderText&amp; renderer)
</span><span class="cx"> {
</span><del>-    if (style.hasTextCombine() &amp;&amp; renderer.isCombineText()) {
-        const RenderCombineText&amp; textCombineRenderer = toRenderCombineText(renderer);
</del><ins>+    if (style.hasTextCombine() &amp;&amp; is&lt;RenderCombineText&gt;(renderer)) {
+        const auto&amp; textCombineRenderer = downcast&lt;RenderCombineText&gt;(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-&gt;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-&gt;parent()-&gt;isRubyRun())
</del><ins>+    if (!is&lt;RenderRubyRun&gt;(*containingBlock-&gt;parent()))
</ins><span class="cx">         return true; // Cannot get the ruby text.
</span><span class="cx"> 
</span><del>-    RenderRubyText* rubyText = toRenderRubyRun(containingBlock-&gt;parent())-&gt;rubyText();
</del><ins>+    RenderRubyText* rubyText = downcast&lt;RenderRubyRun&gt;(*containingBlock-&gt;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-&gt;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() &amp;&amp; renderer().isCombineText() &amp;&amp; toRenderCombineText(renderer()).isCombined() ? &amp;toRenderCombineText(renderer()) : 0;
</del><ins>+    RenderCombineText* combinedText = lineStyle.hasTextCombine() &amp;&amp; is&lt;RenderCombineText&gt;(renderer()) &amp;&amp; downcast&lt;RenderCombineText&gt;(renderer()).isCombined() ? &amp;downcast&lt;RenderCombineText&gt;(renderer()) : nullptr;
</ins><span class="cx"> 
</span><span class="cx">     bool shouldRotate = !isHorizontal() &amp;&amp; !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-&gt;m_layoutDeltaYSaturated;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (lineGrid() &amp;&amp; (lineGrid()-&gt;style().writingMode() == renderer-&gt;style().writingMode()) &amp;&amp; renderer-&gt;isRenderMultiColumnFlowThread())
-        toRenderMultiColumnFlowThread(renderer)-&gt;computeLineGridPaginationOrigin(*this);
</del><ins>+    if (lineGrid() &amp;&amp; (lineGrid()-&gt;style().writingMode() == renderer-&gt;style().writingMode()) &amp;&amp; is&lt;RenderMultiColumnFlowThread&gt;(*renderer))
+        downcast&lt;RenderMultiColumnFlowThread&gt;(*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-&gt;style().lineGrid() != RenderStyle::initialLineGrid() &amp;&amp; is&lt;RenderBlockFlow&gt;(*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-&gt;nextSibling();
</span><span class="cx"> 
</span><span class="cx">     RenderFlowThread* childFlowThread = child-&gt;flowThreadContainingBlock();
</span><del>-    if (childFlowThread &amp;&amp; childFlowThread-&gt;isRenderNamedFlowThread())
-        toRenderNamedFlowThread(childFlowThread)-&gt;removeFlowChildInfo(child);
</del><ins>+    if (is&lt;RenderNamedFlowThread&gt;(childFlowThread))
+        downcast&lt;RenderNamedFlowThread&gt;(*childFlowThread).removeFlowChildInfo(child);
</ins><span class="cx"> 
</span><span class="cx">     parent.removeChildInternal(*child, child-&gt;hasLayer() ? NotifyChildren : DontNotifyChildren);
</span><span class="cx">     child-&gt;moveAllChildrenTo(&amp;parent, nextSibling, child-&gt;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)-&gt;applyBreakAfterContent(clientLogicalBottom());
</del><ins>+    if (is&lt;RenderFlowThread&gt;(*this))
+        downcast&lt;RenderFlowThread&gt;(*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 &amp;&amp; namedFlowFragment &amp;&amp; paintInfo.paintContainer-&gt;isRenderNamedFlowThread()) {
</del><ins>+            if (namedFlowFragment &amp;&amp; is&lt;RenderNamedFlowThread&gt;(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-&gt;save();
</span><span class="cx">                 didClipToRegion = true;
</span><span class="cx"> 
</span><del>-                paintInfo.context-&gt;clip(toRenderNamedFlowThread(paintInfo.paintContainer)-&gt;decorationsClipRectForBoxInNamedFlowFragment(*this, *namedFlowFragment));
</del><ins>+                paintInfo.context-&gt;clip(downcast&lt;RenderNamedFlowThread&gt;(*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 &amp;&amp; namedFlowFragment &amp;&amp; paintInfo-&gt;paintContainer-&gt;isRenderFlowThread()) {
</del><ins>+    if (paintInfo &amp;&amp; namedFlowFragment &amp;&amp; is&lt;RenderFlowThread&gt;(*paintInfo-&gt;paintContainer)) {
</ins><span class="cx">         // Make sure the current object is actually flowed into the region being painted.
</span><del>-        if (!toRenderFlowThread(paintInfo-&gt;paintContainer)-&gt;objectShouldFragmentInFlowRegion(this, namedFlowFragment))
</del><ins>+        if (!downcast&lt;RenderFlowThread&gt;(*paintInfo-&gt;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-&gt;currentRegion()) : nullptr;
</del><ins>+    RenderNamedFlowFragment* namedFlowFragment = flowThread ? downcast&lt;RenderNamedFlowFragment&gt;(flowThread-&gt;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 &amp;&amp; !flowThread-&gt;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)-&gt;applyBreakAfterContent(oldClientAfterEdge);
</del><ins>+    if (is&lt;RenderFlowThread&gt;(*this))
+        downcast&lt;RenderFlowThread&gt;(*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&lt;RenderView&gt;(*this))
+        adjustedLocation += toLayoutSize(downcast&lt;RenderView&gt;(*this).frameView().scrollPosition());
</ins><span class="cx"> 
</span><span class="cx">     const FloatingObjectSet&amp; floatingObjectSet = m_floatingObjects-&gt;set();
</span><span class="cx">     auto begin = floatingObjectSet.begin();
</span><span class="lines">@@ -3724,8 +3724,8 @@
</span><span class="cx">         flowThread-&gt;setColumnHeightAvailable(std::max&lt;LayoutUnit&gt;(columnHeight, 0));
</span><span class="cx">         if (oldHeightAvailable != flowThread-&gt;columnHeightAvailable())
</span><span class="cx">             relayoutChildren = true;
</span><del>-    } else if (isRenderFlowThread()) {
-        RenderFlowThread* flowThread = toRenderFlowThread(this);
</del><ins>+    } else if (is&lt;RenderFlowThread&gt;(*this)) {
+        RenderFlowThread&amp; flowThread = downcast&lt;RenderFlowThread&gt;(*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-&gt;isPageLogicalHeightKnown() ? LayoutUnit(1) : LayoutUnit(0);
</del><ins>+        pageLogicalHeight = flowThread.isPageLogicalHeightKnown() ? LayoutUnit(1) : LayoutUnit(0);
</ins><span class="cx"> 
</span><del>-        pageLogicalHeightChanged = flowThread-&gt;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, &amp;renderText, totalLogicalWidth, lineInfo, textBoxDataMap, verticalPositionCache, wordMeasurements);
</span><span class="cx">         } else {
</span><span class="cx">             bool encounteredJustifiedRuby = false;
</span><del>-            if (is&lt;RenderRubyRun&gt;(run-&gt;renderer()) &amp;&amp; textAlign == JUSTIFY &amp;&amp; run != trailingSpaceRun &amp;&amp; toRenderRubyRun(run-&gt;renderer()).rubyBase()) {
</del><ins>+            if (is&lt;RenderRubyRun&gt;(run-&gt;renderer()) &amp;&amp; textAlign == JUSTIFY &amp;&amp; run != trailingSpaceRun &amp;&amp; downcast&lt;RenderRubyRun&gt;(run-&gt;renderer()).rubyBase()) {
</ins><span class="cx">                 auto* rubyBase = downcast&lt;RenderRubyRun&gt;(run-&gt;renderer()).rubyBase();
</span><span class="cx">                 if (rubyBase-&gt;firstRootBox() &amp;&amp; !rubyBase-&gt;firstRootBox()-&gt;nextRootBox() &amp;&amp; run-&gt;renderer().style().collapseWhiteSpace()) {
</span><span class="cx">                     for (auto* leafChild = rubyBase-&gt;firstRootBox()-&gt;firstLeafChild(); leafChild; leafChild = leafChild-&gt;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 &amp;&amp; nextScrollBlock-&gt;isRenderNamedFlowThread()) {
</del><ins>+    if (is&lt;RenderNamedFlowThread&gt;(nextScrollBlock)) {
</ins><span class="cx">         ASSERT(startBox);
</span><del>-        nextScrollBlock = toRenderNamedFlowThread(nextScrollBlock)-&gt;fragmentFromAbsolutePointAndBox(wheelEventAbsolutePoint, *startBox);
</del><ins>+        nextScrollBlock = downcast&lt;RenderNamedFlowThread&gt;(*nextScrollBlock).fragmentFromAbsolutePointAndBox(wheelEventAbsolutePoint, *startBox);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (nextScrollBlock &amp;&amp; !nextScrollBlock-&gt;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-&gt;currentRegion()) : nullptr;
</del><ins>+    RenderRegion* regionToUse = flowThread ? downcast&lt;RenderNamedFlowFragment&gt;(flowThread-&gt;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 &amp;&amp; !flowThread-&gt;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-&gt;next()) {
</span><span class="cx">         if (curLayer-&gt;image() &amp;&amp; image == curLayer-&gt;image()-&gt;data() &amp;&amp; curLayer-&gt;image()-&gt;canRender(this, style().effectiveZoom())) {
</span><span class="lines">@@ -1650,8 +1650,8 @@
</span><span class="cx">                 if (drawingRootBackground) {
</span><span class="cx">                     layerRenderer = &amp;view();
</span><span class="cx"> 
</span><del>-                    LayoutUnit rw = toRenderView(*layerRenderer).frameView().contentsWidth();
-                    LayoutUnit rh = toRenderView(*layerRenderer).frameView().contentsHeight();
</del><ins>+                    LayoutUnit rw = downcast&lt;RenderView&gt;(*layerRenderer).frameView().contentsWidth();
+                    LayoutUnit rh = downcast&lt;RenderView&gt;(*layerRenderer).frameView().contentsHeight();
</ins><span class="cx"> 
</span><span class="cx">                     rendererRect = LayoutRect(-layerRenderer-&gt;marginLeft(),
</span><span class="cx">                         -layerRenderer-&gt;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-&gt;calculateBackgroundImageGeometry(0, curLayer, rendererRect, geometry);
</del><ins>+            layerRenderer-&gt;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-&gt;isOutOfFlowRenderFlowThread() || !fixedPositionedWithNamedFlowContainingBlock())
</span><span class="cx">         container-&gt;mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
</span><span class="cx">     else
</span><del>-        container-&gt;mapLocalToContainer(toRenderLayerModelObject(container), transformState, mode, wasFixed);
</del><ins>+        container-&gt;mapLocalToContainer(downcast&lt;RenderLayerModelObject&gt;(container), transformState, mode, wasFixed);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const RenderObject* RenderBox::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&amp; geometryMap) const
</span><span class="lines">@@ -3097,15 +3097,15 @@
</span><span class="cx">         const RenderBlock&amp; cb = downcast&lt;RenderBlock&gt;(*containingBlock);
</span><span class="cx">         RenderBoxRegionInfo* boxInfo = nullptr;
</span><span class="cx">         if (!region) {
</span><del>-            if (containingBlock-&gt;isRenderFlowThread() &amp;&amp; !checkForPerpendicularWritingMode)
-                return toRenderFlowThread(containingBlock)-&gt;contentLogicalWidthOfFirstRegion();
</del><ins>+            if (is&lt;RenderFlowThread&gt;(*containingBlock) &amp;&amp; !checkForPerpendicularWritingMode)
+                return downcast&lt;RenderFlowThread&gt;(*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 &amp;&amp; flowThread-&gt;isHorizontalWritingMode() == containingBlock-&gt;isHorizontalWritingMode()) {
</del><ins>+        } else if (flowThread-&gt;isHorizontalWritingMode() == containingBlock-&gt;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)-&gt;layer()-&gt;isComposited()) {
</del><ins>+        if (!hasLayer() || !downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;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 &amp; ContextSensitivePropertyOpacity) {
</span><del>-        if (!hasLayer() || !toRenderLayerModelObject(this)-&gt;layer()-&gt;isComposited())
</del><ins>+        if (!hasLayer() || !downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;isComposited())
</ins><span class="cx">             diff = StyleDifferenceRepaintLayer;
</span><span class="cx">         else if (diff &lt; StyleDifferenceRecompositeLayer)
</span><span class="cx">             diff = StyleDifferenceRecompositeLayer;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ((contextSensitiveProperties &amp; ContextSensitivePropertyFilter) &amp;&amp; hasLayer()) {
</span><del>-        RenderLayer* layer = toRenderLayerModelObject(this)-&gt;layer();
</del><ins>+        RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(*this).layer();
</ins><span class="cx">         if (!layer-&gt;isComposited() || layer-&gt;paintsWithFilters())
</span><span class="cx">             diff = StyleDifferenceRepaintLayer;
</span><span class="cx">         else if (diff &lt; 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 &amp;&amp; isRenderLayerModelObject()) {
</span><del>-        if (hasLayer() != toRenderLayerModelObject(this)-&gt;requiresLayer())
</del><ins>+        if (hasLayer() != downcast&lt;RenderLayerModelObject&gt;(*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-&gt;parent()-&gt;findNextLayer(parentLayer, newObject);
</span><span class="cx">             newObject = nullptr;
</span><span class="cx">         }
</span><del>-        parentLayer-&gt;addChild(toRenderLayerModelObject(renderer).layer(), beforeChild);
</del><ins>+        parentLayer-&gt;addChild(downcast&lt;RenderLayerModelObject&gt;(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-&gt;removeChild(toRenderLayerModelObject(this)-&gt;layer());
</del><ins>+        parentLayer-&gt;removeChild(downcast&lt;RenderLayerModelObject&gt;(*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)-&gt;layer();
</del><ins>+        RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(*this).layer();
</ins><span class="cx">         ASSERT(oldParent == layer-&gt;parent());
</span><span class="cx">         if (oldParent)
</span><span class="cx">             oldParent-&gt;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 &amp;&amp; style().diffRequiresLayerRepaint(*oldStyle, toRenderLayerModelObject(this)-&gt;layer()-&gt;isComposited()))
</del><ins>+        if (oldStyle &amp;&amp; style().diffRequiresLayerRepaint(*oldStyle, downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;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 &amp;&amp; renderer-&gt;isAnonymousBlock() &amp;&amp; !renderer-&gt;isRenderNamedFlowThread())
</del><ins>+    auto* renderer = this;
+    while (renderer &amp;&amp; renderer-&gt;isAnonymousBlock() &amp;&amp; !is&lt;RenderNamedFlowThread&gt;(*renderer))
</ins><span class="cx">         renderer = renderer-&gt;parent();
</span><del>-    return renderer &amp;&amp; renderer-&gt;isRenderNamedFlowThread() ? toRenderNamedFlowThread(renderer) : nullptr;
</del><ins>+    return is&lt;RenderNamedFlowThread&gt;(renderer) ? downcast&lt;RenderNamedFlowThread&gt;(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 &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</span><span class="cx"> #include &quot;RenderNamedFlowFragment.h&quot;
</span><ins>+#include &quot;RenderNamedFlowThread.h&quot;
</ins><span class="cx"> #include &quot;RenderRegion.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</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() &amp;&amp; region-&gt;hasAutoLogicalHeight()) {
</span><del>-                    RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
-                    namedFlowFragment-&gt;setComputedAutoHeight(namedFlowFragment-&gt;maxPageLogicalHeight());
</del><ins>+                    auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*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&amp; region : m_regionList) {
</span><del>-        if (toRenderNamedFlowFragment(region)-&gt;layerOwner().layer()-&gt;hasCompositingDescendant())
</del><ins>+        if (downcast&lt;RenderNamedFlowFragment&gt;(*region).layerOwner().layer()-&gt;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&lt;RenderNamedFlowFragment&gt;(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&lt;RenderNamedFlowFragment&gt;(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&amp; 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 &amp;&amp; insideNewRegionRange)) {
</span><del>-            if (region-&gt;isRenderNamedFlowFragment())
-                toRenderNamedFlowFragment(region)-&gt;clearObjectStyleInRegion(box);
</del><ins>+            if (is&lt;RenderNamedFlowFragment&gt;(*region))
+                downcast&lt;RenderNamedFlowFragment&gt;(*region).clearObjectStyleInRegion(box);
</ins><span class="cx">             if (region-&gt;renderBoxRegionInfo(box))
</span><span class="cx">                 region-&gt;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-&gt;hasAutoLogicalHeight()) {
-            RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
-            namedFlowFragment-&gt;setComputedAutoHeight(namedFlowFragment-&gt;maxPageLogicalHeight());
</del><ins>+        RenderRegion&amp; region = **regionIter;
+        if (region.hasAutoLogicalHeight()) {
+            auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(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&amp; 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 &amp;&amp; region-&gt;hasAutoLogicalHeight())
</span><del>-            toRenderNamedFlowFragment(region)-&gt;clearComputedAutoHeight();
</del><ins>+            downcast&lt;RenderNamedFlowFragment&gt;(*region).clearComputedAutoHeight();
</ins><span class="cx"> 
</span><span class="cx">         LayoutUnit regionLogicalWidth = region-&gt;pageLogicalWidth();
</span><span class="cx">         LayoutUnit regionLogicalHeight = std::min&lt;LayoutUnit&gt;(RenderFlowThread::maxLogicalHeight() - logicalHeight, region-&gt;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-&gt;hasAutoLogicalHeight()) {
</span><del>-        RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
</del><ins>+        auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*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-&gt;maxPageLogicalHeight() == namedFlowFragment-&gt;computedAutoHeight());
</del><ins>+        ASSERT(namedFlowFragment.maxPageLogicalHeight() == namedFlowFragment.computedAutoHeight());
</ins><span class="cx"> 
</span><del>-        mapToUse.set(breakChild, namedFlowFragment);
</del><ins>+        mapToUse.set(breakChild, &amp;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-&gt;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 &lt;= namedFlowFragment-&gt;maxPageLogicalHeight());
</del><ins>+        ASSERT(regionComputedAutoHeight &lt;= namedFlowFragment.maxPageLogicalHeight());
</ins><span class="cx"> 
</span><del>-        namedFlowFragment-&gt;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-&gt;isRenderNamedFlowThread()) {
</del><ins>+        if (is&lt;RenderNamedFlowThread&gt;(*box)) {
</ins><span class="cx">             ASSERT(box == this);
</span><del>-            RenderBlockFlow&amp; fragmentContainer = toRenderNamedFlowFragment(region)-&gt;fragmentContainer();
</del><ins>+            RenderBlockFlow&amp; fragmentContainer = downcast&lt;RenderNamedFlowFragment&gt;(*region).fragmentContainer();
</ins><span class="cx">             LayoutUnit spacingAfterLayout = fragmentContainer.paddingAfter() + child-&gt;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 &lt;&gt; struct ValueToString&lt;RenderRegion*&gt; {
</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-&gt;isRootLayer()) {
</span><del>-        toRenderView(parentLayer-&gt;renderer()).repaintViewRectangle(parentLayerRect);
</del><ins>+        downcast&lt;RenderView&gt;(parentLayer-&gt;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&amp; enclosingFlowThread = toRenderFlowThread(paginationLayer-&gt;renderer());
</del><ins>+        auto&amp; enclosingFlowThread = downcast&lt;RenderFlowThread&gt;(paginationLayer-&gt;renderer());
</ins><span class="cx">         result = enclosingFlowThread.fragmentsBoundingBox(result);
</span><span class="cx">         result.move(paginationLayer-&gt;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-&gt;parent()) {
</span><del>-            if (parentLayer-&gt;renderer().isRenderMultiColumnFlowThread()) {
-                RenderRegion* region = toRenderMultiColumnFlowThread(parentLayer-&gt;renderer()).physicalTranslationFromFlowToRegion(location);
</del><ins>+            if (is&lt;RenderMultiColumnFlowThread&gt;(parentLayer-&gt;renderer())) {
+                RenderRegion* region = downcast&lt;RenderMultiColumnFlowThread&gt;(parentLayer-&gt;renderer()).physicalTranslationFromFlowToRegion(location);
</ins><span class="cx">                 if (region)
</span><span class="cx">                     location.moveBy(region-&gt;topLeftLocation() + -parentLayer-&gt;renderBox()-&gt;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&amp; enclosingFlowThread = toRenderFlowThread(paginationLayer-&gt;renderer());
</del><ins>+    auto&amp; enclosingFlowThread = downcast&lt;RenderFlowThread&gt;(paginationLayer-&gt;renderer());
</ins><span class="cx">     RenderLayer* parentPaginationLayer = paginationLayer-&gt;parent()-&gt;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(&amp;renderer())-&gt;visualOverflowRect() : renderer().view().documentRect();
</del><ins>+    LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? downcast&lt;RenderFlowThread&gt;(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() &amp;&amp; (request.active() || request.release()) &amp;&amp; isRootLayer()) {
</span><del>-            renderer().updateHitTestResult(result, toRenderView(renderer()).flipForWritingMode(hitTestLocation.point()));
</del><ins>+            renderer().updateHitTestResult(result, downcast&lt;RenderView&gt;(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() &amp;&amp; toRenderFlowThread(renderer()).collectsGraphicsLayersUnderRegions();
</del><ins>+    return is&lt;RenderFlowThread&gt;(renderer()) &amp;&amp; downcast&lt;RenderFlowThread&gt;(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-&gt;offsetFromAncestor(paginationLayer));
</span><span class="cx"> 
</span><del>-        RenderFlowThread&amp; enclosingFlowThread = toRenderFlowThread(paginationLayer-&gt;renderer());
</del><ins>+        auto&amp; enclosingFlowThread = downcast&lt;RenderFlowThread&gt;(paginationLayer-&gt;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&lt;RenderFlowThread&gt;(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&lt;RenderFlowThread&gt;(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 &quot;PluginViewBase.h&quot;
</span><span class="cx"> #include &quot;ProgressTracker.h&quot;
</span><span class="cx"> #include &quot;RenderFlowThread.h&quot;
</span><ins>+#include &quot;RenderHTMLCanvas.h&quot;
</ins><span class="cx"> #include &quot;RenderIFrame.h&quot;
</span><span class="cx"> #include &quot;RenderImage.h&quot;
</span><span class="cx"> #include &quot;RenderLayerCompositor.h&quot;
</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&lt;RenderWidget&gt;(renderer()))
</ins><span class="cx">         return;
</span><del>-    if (RenderLayerCompositor* innerCompositor = RenderLayerCompositor::frameContentsCompositor(toRenderWidget(&amp;renderer()))) {
</del><ins>+    if (RenderLayerCompositor* innerCompositor = RenderLayerCompositor::frameContentsCompositor(&amp;downcast&lt;RenderWidget&gt;(renderer()))) {
</ins><span class="cx">         innerCompositor-&gt;frameViewDidChangeSize();
</span><span class="cx">         innerCompositor-&gt;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(&amp;renderer()));
</del><ins>+    if (is&lt;RenderWidget&gt;(renderer()))
+        layerConfigChanged = RenderLayerCompositor::parentFrameContentLayers(&amp;downcast&lt;RenderWidget&gt;(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&amp; renderer)
</ins><span class="cx"> {
</span><del>-    if (!renderer-&gt;isEmbeddedObject())
</del><ins>+    if (!is&lt;RenderEmbeddedObject&gt;(renderer))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    Element* element = downcast&lt;Element&gt;(renderer-&gt;node());
</del><ins>+    HTMLFrameOwnerElement&amp; element = downcast&lt;RenderEmbeddedObject&gt;(renderer).frameOwnerElement();
</ins><span class="cx">     if (!is&lt;HTMLPlugInElement&gt;(element))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return downcast&lt;HTMLPlugInElement&gt;(*element).isRestartedPlugin();
</del><ins>+    return downcast&lt;HTMLPlugInElement&gt;(element).isRestartedPlugin();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool isCompositedPlugin(RenderObject* renderer)
</del><ins>+static bool isCompositedPlugin(RenderObject&amp; renderer)
</ins><span class="cx"> {
</span><del>-    return renderer-&gt;isEmbeddedObject() &amp;&amp; toRenderEmbeddedObject(renderer)-&gt;allowsAcceleratedCompositing();
</del><ins>+    return is&lt;RenderEmbeddedObject&gt;(renderer) &amp;&amp; downcast&lt;RenderEmbeddedObject&gt;(renderer).allowsAcceleratedCompositing();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // A &quot;simple container layer&quot; 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() &amp;&amp; (!isCompositedPlugin(&amp;renderer()) || isRestartedPlugin(&amp;renderer())))
</del><ins>+    if (renderer().isRenderReplaced() &amp;&amp; (!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() &amp;&amp; toRenderVideo(renderer()).shouldDisplayVideo())
</del><ins>+    if (is&lt;RenderVideo&gt;(renderer()) &amp;&amp; downcast&lt;RenderVideo&gt;(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() &amp;&amp; canvasCompositingStrategy(renderer()) == CanvasAsLayerContents)
</del><ins>+    if (is&lt;RenderHTMLCanvas&gt;(renderer()) &amp;&amp; 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())-&gt;layer();
</del><ins>+                RenderLayer* sourceLayer = downcast&lt;RenderLayerModelObject&gt;(*layer.renderer().parent()).layer();
</ins><span class="cx">                 if (RenderLayerBacking* backing = sourceLayer-&gt;backing()) {
</span><span class="cx">                     ASSERT(backing-&gt;graphicsLayer()-&gt;replicaLayer() == layer.backing()-&gt;graphicsLayer());
</span><del>-                    backing-&gt;graphicsLayer()-&gt;setReplicatedByLayer(0);
</del><ins>+                    backing-&gt;graphicsLayer()-&gt;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 &amp;&amp; layer.renderer().isVideo()) {
</del><ins>+    if (layerChanged &amp;&amp; is&lt;RenderVideo&gt;(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&lt;RenderVideo&gt;(layer.renderer()).acceleratedRenderingStateChanged();
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    if (layerChanged &amp;&amp; layer.renderer().isWidget()) {
-        RenderLayerCompositor* innerCompositor = frameContentsCompositor(toRenderWidget(&amp;layer.renderer()));
</del><ins>+    if (layerChanged &amp;&amp; is&lt;RenderWidget&gt;(layer.renderer())) {
+        RenderLayerCompositor* innerCompositor = frameContentsCompositor(&amp;downcast&lt;RenderWidget&gt;(layer.renderer()));
</ins><span class="cx">         if (innerCompositor &amp;&amp; innerCompositor-&gt;inCompositingMode())
</span><span class="cx">             innerCompositor-&gt;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&amp; flowThread = toRenderFlowThread(layer.renderer());
</del><ins>+        auto&amp; flowThread = downcast&lt;RenderFlowThread&gt;(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(&amp;layer.renderer()));
</del><ins>+        if (is&lt;RenderWidget&gt;(layer.renderer()))
+            parented = parentFrameContentLayers(&amp;downcast&lt;RenderWidget&gt;(layer.renderer()));
</ins><span class="cx"> 
</span><span class="cx">         if (!parented)
</span><span class="cx">             layerBacking-&gt;parentForSublayers()-&gt;setChildren(layerChildren);
</span><span class="lines">@@ -2090,11 +2090,11 @@
</span><span class="cx"> // static
</span><span class="cx"> bool RenderLayerCompositor::requiresCompositingLayer(const RenderLayer&amp; layer, RenderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedReason) const
</span><span class="cx"> {
</span><del>-    auto renderer = &amp;layer.renderer();
</del><ins>+    auto* renderer = &amp;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-&gt;parent()); // The RenderReplica's parent is the object being reflected.
</del><ins>+        renderer = downcast&lt;RenderLayerModelObject&gt;(renderer-&gt;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 = &amp;layer.renderer();
</del><ins>+    auto* renderer = &amp;layer.renderer();
</ins><span class="cx">     if (layer.isReflection())
</span><del>-        renderer = toRenderLayerModelObject(renderer-&gt;parent());
</del><ins>+        renderer = downcast&lt;RenderLayerModelObject&gt;(renderer-&gt;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 &amp; ChromeClient::VideoTrigger))
</span><span class="cx">         return false;
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>-    if (renderer.isVideo()) {
-        RenderVideo&amp; video = toRenderVideo(renderer);
</del><ins>+    if (is&lt;RenderVideo&gt;(renderer)) {
+        auto&amp; video = downcast&lt;RenderVideo&gt;(renderer);
</ins><span class="cx">         return (video.requiresImmediateCompositing() || video.shouldDisplayVideo()) &amp;&amp; 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 &amp; ChromeClient::PluginTrigger))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    bool composite = renderer.isEmbeddedObject() &amp;&amp; toRenderEmbeddedObject(&amp;renderer)-&gt;allowsAcceleratedCompositing();
</del><ins>+    bool composite = is&lt;RenderEmbeddedObject&gt;(renderer) &amp;&amp; downcast&lt;RenderEmbeddedObject&gt;(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&amp; pluginRenderer = *toRenderWidget(&amp;renderer);
</del><ins>+    RenderWidget&amp; pluginRenderer = downcast&lt;RenderWidget&gt;(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() &amp;&amp; pluginRenderer.layer()-&gt;isComposited();
</span><span class="lines">@@ -2502,10 +2502,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderLayerCompositor::requiresCompositingForFrame(RenderLayerModelObject&amp; renderer) const
</span><span class="cx"> {
</span><del>-    if (!renderer.isWidget())
</del><ins>+    if (!is&lt;RenderWidget&gt;(renderer))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    RenderWidget&amp; frameRenderer = *toRenderWidget(&amp;renderer);
</del><ins>+    auto&amp; frameRenderer = downcast&lt;RenderWidget&gt;(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-&gt;nextSibling()) {
</span><del>-        if (sibling-&gt;isRenderMultiColumnSet())
-            return toRenderMultiColumnSet(sibling);
</del><ins>+        if (is&lt;RenderMultiColumnSet&gt;(*sibling))
+            return downcast&lt;RenderMultiColumnSet&gt;(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()-&gt;lastChild(); sibling; sibling = sibling-&gt;previousSibling()) {
</span><del>-        if (sibling-&gt;isRenderMultiColumnSet())
-            return toRenderMultiColumnSet(sibling);
</del><ins>+        if (is&lt;RenderMultiColumnSet&gt;(*sibling))
+            return downcast&lt;RenderMultiColumnSet&gt;(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-&gt;isRenderMultiColumnSet()) {
-            m_lastSetWorkedOn = toRenderMultiColumnSet(first);
</del><ins>+        if (is&lt;RenderMultiColumnSet&gt;(*first)) {
+            m_lastSetWorkedOn = downcast&lt;RenderMultiColumnSet&gt;(first);
</ins><span class="cx">             m_lastSetWorkedOn-&gt;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&lt;RenderMultiColumnSet&gt;(renderRegion);
</ins><span class="cx">     if (RenderMultiColumnSet* nextSet = columnSet-&gt;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-&gt;nextInPreOrder(subtreeRoot) : nullptr)) {
</span><del>-        if (descendant-&gt;isRenderMultiColumnSpannerPlaceholder()) {
</del><ins>+        if (is&lt;RenderMultiColumnSpannerPlaceholder&gt;(*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-&gt;flowThread() != this) {
</del><ins>+            RenderMultiColumnSpannerPlaceholder&amp; placeholder = downcast&lt;RenderMultiColumnSpannerPlaceholder&gt;(*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-&gt;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&amp; ancestorBlock = downcast&lt;RenderBlockFlow&gt;(*spanner-&gt;parent());
</span><del>-                ancestorBlock.moveChildTo(placeholder-&gt;parentBox(), spanner, placeholder-&gt;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()-&gt;handleSpannerRemoval(spanner);
</span><del>-                placeholder-&gt;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-&gt;spanner()));
-            m_spannerMap.add(placeholder-&gt;spanner(), placeholder);
-            ASSERT(!placeholder-&gt;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(), &amp;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-&gt;isRenderMultiColumnSpannerPlaceholder()) {
</del><ins>+    if (is&lt;RenderMultiColumnSpannerPlaceholder&gt;(*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-&gt;isDescendantOf(this));
</span><del>-        m_spannerMap.remove(toRenderMultiColumnSpannerPlaceholder(relative)-&gt;spanner());
</del><ins>+        m_spannerMap.remove(downcast&lt;RenderMultiColumnSpannerPlaceholder&gt;(*relative).spanner());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     if (relative-&gt;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-&gt;isRenderMultiColumnSpannerPlaceholder())
</del><ins>+    if (!is&lt;RenderMultiColumnSpannerPlaceholder&gt;(*descendant))
</ins><span class="cx">         return;
</span><del>-    RenderMultiColumnSpannerPlaceholder* placeholder = toRenderMultiColumnSpannerPlaceholder(descendant);
-    RenderBlock* container = placeholder-&gt;containingBlock();
</del><ins>+    auto&amp; placeholder = downcast&lt;RenderMultiColumnSpannerPlaceholder&gt;(*descendant);
+    RenderBlock* container = placeholder.containingBlock();
</ins><span class="cx"> 
</span><del>-    for (RenderBox* prev = previousColumnSetOrSpannerSiblingOf(placeholder-&gt;spanner()); prev; prev = previousColumnSetOrSpannerSiblingOf(prev)) {
-        if (prev-&gt;isRenderMultiColumnSet()) {
-            toRenderMultiColumnSet(prev)-&gt;endFlow(container, placeholder-&gt;logicalTop());
</del><ins>+    for (RenderBox* prev = previousColumnSetOrSpannerSiblingOf(placeholder.spanner()); prev; prev = previousColumnSetOrSpannerSiblingOf(prev)) {
+        if (is&lt;RenderMultiColumnSet&gt;(*prev)) {
+            downcast&lt;RenderMultiColumnSet&gt;(*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-&gt;spanner()); next; next = nextColumnSetOrSpannerSiblingOf(next)) {
-        if (next-&gt;isRenderMultiColumnSet()) {
-            m_lastSetWorkedOn = toRenderMultiColumnSet(next);
</del><ins>+    for (RenderBox* next = nextColumnSetOrSpannerSiblingOf(placeholder.spanner()); next; next = nextColumnSetOrSpannerSiblingOf(next)) {
+        if (is&lt;RenderMultiColumnSet&gt;(*next)) {
+            m_lastSetWorkedOn = downcast&lt;RenderMultiColumnSet&gt;(next);
</ins><span class="cx">             m_lastSetWorkedOn-&gt;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&lt;RenderMultiColumnSet&gt;(regionAtBlockOffset(block, offset)))
</ins><span class="cx">         multicolSet-&gt;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&lt;RenderMultiColumnSet&gt;(regionAtBlockOffset(block, offset)))
</ins><span class="cx">         multicolSet-&gt;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)-&gt;previousSiblingMultiColumnSet(); columnSet; columnSet = columnSet-&gt;previousSiblingMultiColumnSet()) {
</del><ins>+    for (RenderMultiColumnSet* columnSet = downcast&lt;RenderMultiColumnSet&gt;(*startRegion).previousSiblingMultiColumnSet(); columnSet; columnSet = columnSet-&gt;previousSiblingMultiColumnSet()) {
</ins><span class="cx">         if (columnSet-&gt;logicalHeightInFlowThread())
</span><span class="cx">             break;
</span><span class="cx">         startRegion = columnSet;
</span><span class="cx">     }
</span><del>-    for (RenderMultiColumnSet* columnSet = toRenderMultiColumnSet(startRegion)-&gt;nextSiblingMultiColumnSet(); columnSet; columnSet = columnSet-&gt;nextSiblingMultiColumnSet()) {
</del><ins>+    for (RenderMultiColumnSet* columnSet = downcast&lt;RenderMultiColumnSet&gt;(*startRegion).nextSiblingMultiColumnSet(); columnSet; columnSet = columnSet-&gt;nextSiblingMultiColumnSet()) {
</ins><span class="cx">         if (columnSet-&gt;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&lt;RenderMultiColumnSet&gt;(regionAtBlockOffset(block, offset))) {
</ins><span class="cx">         multicolSet-&gt;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&lt;RenderMultiColumnSet&gt;(renderRegion);
</ins><span class="cx">     LayoutPoint translationOffset = columnSet-&gt;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-&gt;nextSibling()) {
</span><del>-        if (sibling-&gt;isRenderMultiColumnSet())
-            return toRenderMultiColumnSet(sibling);
</del><ins>+        if (is&lt;RenderMultiColumnSet&gt;(*sibling))
+            return downcast&lt;RenderMultiColumnSet&gt;(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-&gt;previousSibling()) {
</span><del>-        if (sibling-&gt;isRenderMultiColumnSet())
-            return toRenderMultiColumnSet(sibling);
</del><ins>+        if (is&lt;RenderMultiColumnSet&gt;(*sibling))
+            return downcast&lt;RenderMultiColumnSet&gt;(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&lt;ContentRun, 1&gt; 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)-&gt;checkRegionsWithStyling();
</del><ins>+    downcast&lt;RenderNamedFlowThread&gt;(*m_flowThread).checkRegionsWithStyling();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;RenderStyle&gt; RenderNamedFlowFragment::computeStyleInRegion(RenderElement&amp; renderer, RenderStyle&amp; 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&lt;RenderNamedFlowThread&gt;(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&amp; layerOwner() const { return *toRenderLayerModelObject(parent()); }
</del><ins>+    RenderLayerModelObject&amp; layerOwner() const { return downcast&lt;RenderLayerModelObject&gt;(*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&lt;RenderNamedFlowFragment&gt;(m_regionList.first());
</ins><span class="cx">     if (!firstFragment)
</span><span class="cx">         return;
</span><span class="cx">     if (style().writingMode() == firstFragment-&gt;style().writingMode())
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">     else {
</span><span class="cx">         // Find the first region &quot;greater&quot; than renderNamedFlowFragment.
</span><span class="cx">         auto it = regionList.begin();
</span><del>-        while (it != regionList.end() &amp;&amp; !compareRenderNamedFlowFragments(renderNamedFlowFragment, toRenderNamedFlowFragment(*it)))
</del><ins>+        while (it != regionList.end() &amp;&amp; !compareRenderNamedFlowFragments(renderNamedFlowFragment, downcast&lt;RenderNamedFlowFragment&gt;(*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-&gt;isValid());
</span><span class="cx"> 
</span><del>-    RenderNamedFlowFragment* renderNamedFlowFragment = toRenderNamedFlowFragment(renderRegion);
</del><ins>+    RenderNamedFlowFragment&amp; renderNamedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*renderRegion);
</ins><span class="cx">     resetMarkForDestruction();
</span><span class="cx"> 
</span><del>-    if (renderNamedFlowFragment-&gt;parentNamedFlowThread() &amp;&amp; renderNamedFlowFragment-&gt;parentNamedFlowThread()-&gt;dependsOn(this)) {
</del><ins>+    if (renderNamedFlowFragment.parentNamedFlowThread() &amp;&amp; renderNamedFlowFragment.parentNamedFlowThread()-&gt;dependsOn(this)) {
</ins><span class="cx">         // The order of invalid regions is irrelevant.
</span><del>-        m_invalidRegionList.add(renderNamedFlowFragment);
</del><ins>+        m_invalidRegionList.add(&amp;renderNamedFlowFragment);
</ins><span class="cx">         // Register ourself to get a notification when the state changes.
</span><del>-        renderNamedFlowFragment-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.add(this);
</del><ins>+        renderNamedFlowFragment.parentNamedFlowThread()-&gt;m_observerThreadsSet.add(this);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    addFragmentToNamedFlowThread(renderNamedFlowFragment);
</del><ins>+    addFragmentToNamedFlowThread(&amp;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-&gt;parentNamedFlowThread()) {
-        if (!renderNamedFlowFragment-&gt;isValid()) {
-            ASSERT(m_invalidRegionList.contains(renderNamedFlowFragment));
-            m_invalidRegionList.remove(renderNamedFlowFragment);
-            renderNamedFlowFragment-&gt;parentNamedFlowThread()-&gt;m_observerThreadsSet.remove(this);
</del><ins>+    RenderNamedFlowFragment&amp; renderNamedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*renderRegion);
+    if (renderNamedFlowFragment.parentNamedFlowThread()) {
+        if (!renderNamedFlowFragment.isValid()) {
+            ASSERT(m_invalidRegionList.contains(&amp;renderNamedFlowFragment));
+            m_invalidRegionList.remove(&amp;renderNamedFlowFragment);
+            renderNamedFlowFragment.parentNamedFlowThread()-&gt;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-&gt;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(&amp;renderNamedFlowFragment));
+    bool wasFirst = m_regionList.first() == &amp;renderNamedFlowFragment;
+    m_regionList.remove(&amp;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&amp; absolutePoint, const RenderBox&amp; flowedBox)
</span><span class="cx"> {
</span><del>-    return toRenderNamedFlowThread(renderBox)-&gt;fragmentFromAbsolutePointAndBox(absolutePoint, flowedBox);
</del><ins>+    return downcast&lt;RenderNamedFlowThread&gt;(*renderBox).fragmentFromAbsolutePointAndBox(absolutePoint, flowedBox);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderNamedFlowFragment* RenderNamedFlowThread::fragmentFromAbsolutePointAndBox(const IntPoint&amp; absolutePoint, const RenderBox&amp; 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&amp; fragmentContainer = fragment-&gt;fragmentContainer();
</del><ins>+        auto&amp; fragment = downcast&lt;RenderNamedFlowFragment&gt;(**iter);
+        RenderBlockFlow&amp; 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 &amp;fragment;
</ins><span class="cx">         
</span><del>-        if (fragment == endRegion)
</del><ins>+        if (&amp;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&lt;RenderNamedFlowFragment*&gt; newValidFragments;
</span><span class="cx">     for (auto&amp; region : m_invalidRegionList) {
</span><del>-        RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region);
</del><ins>+        auto&amp; namedFlowFragment = downcast&lt;RenderNamedFlowFragment&gt;(*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-&gt;isValid() &amp;&amp; namedFlowFragment-&gt;parentNamedFlowThread());
-        if (namedFlowFragment-&gt;parentNamedFlowThread()-&gt;dependsOn(this))
</del><ins>+        ASSERT(!namedFlowFragment.isValid() &amp;&amp; namedFlowFragment.parentNamedFlowThread());
+        if (namedFlowFragment.parentNamedFlowThread()-&gt;dependsOn(this))
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        newValidFragments.append(namedFlowFragment);
</del><ins>+        newValidFragments.append(&amp;namedFlowFragment);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; 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&amp; region : m_regionList) {
</span><del>-        if (toRenderNamedFlowFragment(region)-&gt;hasCustomRegionStyle()) {
</del><ins>+        if (downcast&lt;RenderNamedFlowFragment&gt;(*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&amp; region : m_regionList)
</span><del>-        toRenderNamedFlowFragment(region)-&gt;clearObjectStyleInRegion(object);
</del><ins>+        downcast&lt;RenderNamedFlowFragment&gt;(*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&amp; renderer)
</span><span class="cx"> {
</span><del>-    if (!renderer.isRenderView()) {
</del><ins>+    if (!is&lt;RenderView&gt;(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&lt;RenderView&gt;(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)-&gt;layer()-&gt;setRepaintStatus(NeedsFullRepaint);
</del><ins>+    downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;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)-&gt;layer()-&gt;setRepaintStatus(NeedsFullRepaintForPositionedMovementLayout);
</del><ins>+    downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;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-&gt;isRenderFlowThread()) {
-        toRenderFlowThread(repaintContainer)-&gt;repaintRectangleInRegions(r);
</del><ins>+    if (is&lt;RenderFlowThread&gt;(*repaintContainer)) {
+        downcast&lt;RenderFlowThread&gt;(*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&amp; RenderObject::selectionRoot() const
</span><span class="cx"> {
</span><span class="cx">     RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><del>-    if (flowThread &amp;&amp; flowThread-&gt;isRenderNamedFlowThread())
-        return *toRenderNamedFlowThread(flowThread);
</del><ins>+    if (is&lt;RenderNamedFlowThread&gt;(flowThread))
+        return downcast&lt;RenderNamedFlowThread&gt;(*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() &amp;&amp; toRenderLayerModelObject(this)-&gt;layer()-&gt;transform()) || (containerObject &amp;&amp; containerObject-&gt;style().hasPerspective());
</del><ins>+    return (hasLayer() &amp;&amp; downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;transform()) || (containerObject &amp;&amp; containerObject-&gt;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() &amp;&amp; (layer = toRenderLayerModelObject(this)-&gt;layer()) &amp;&amp; layer-&gt;transform())
</del><ins>+    if (hasLayer() &amp;&amp; (layer = downcast&lt;RenderLayerModelObject&gt;(*this).layer()) &amp;&amp; layer-&gt;transform())
</ins><span class="cx">         transform.multiply(layer-&gt;currentTransform());
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(3D_RENDERING)
</span><span class="cx">     if (containerObject &amp;&amp; containerObject-&gt;hasLayer() &amp;&amp; containerObject-&gt;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-&gt;hasLayer());
</span><del>-        FloatPoint perspectiveOrigin = toRenderLayerModelObject(containerObject)-&gt;layer()-&gt;perspectiveOrigin();
</del><ins>+        FloatPoint perspectiveOrigin = downcast&lt;RenderLayerModelObject&gt;(*containerObject).layer()-&gt;perspectiveOrigin();
</ins><span class="cx"> 
</span><span class="cx">         TransformationMatrix perspectiveMatrix;
</span><span class="cx">         perspectiveMatrix.applyPerspective(containerObject-&gt;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-&gt;parent())
-        o = o-&gt;parent();
</del><ins>+    const RenderObject* renderer = this;
+    while (renderer-&gt;parent())
+        renderer = renderer-&gt;parent();
</ins><span class="cx"> 
</span><del>-    if (!o-&gt;isRenderView())
</del><ins>+    if (!is&lt;RenderView&gt;(*renderer))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (view)
</span><del>-        *view = &amp;const_cast&lt;RenderView&amp;&gt;(toRenderView(*o));
</del><ins>+        *view = const_cast&lt;RenderView*&gt;(downcast&lt;RenderView&gt;(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)-&gt;destroyLayer();
</del><ins>+        downcast&lt;RenderLayerModelObject&gt;(*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() &amp;&amp; toRenderLayerModelObject(this)-&gt;layer()-&gt;isComposited();
</del><ins>+    return hasLayer() &amp;&amp; downcast&lt;RenderLayerModelObject&gt;(*this).layer()-&gt;isComposited();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderObject::hitTest(const HitTestRequest&amp; request, HitTestResult&amp; result, const HitTestLocation&amp; locationInContainer, const LayoutPoint&amp; 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-&gt;isRenderNamedFlowThread())
</del><ins>+    if (!is&lt;RenderNamedFlowThread&gt;(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-&gt;currentRegion() &amp;&amp; flowThread-&gt;currentRegion()-&gt;isRenderNamedFlowFragment());
</span><span class="cx"> 
</span><del>-    return toRenderNamedFlowFragment(flowThread-&gt;currentRegion());
</del><ins>+    return downcast&lt;RenderNamedFlowFragment&gt;(flowThread-&gt;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&lt;ToValueTypeName&gt;(*renderer), is&lt;ToValueTypeName&gt;(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&lt;RenderProgress&gt; 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-&gt;lastChild();
</span><del>-    if (child &amp;&amp; !child-&gt;isRubyRun())
</del><ins>+    if (child &amp;&amp; !is&lt;RenderRubyRun&gt;(*child))
</ins><span class="cx">         child = child-&gt;previousSibling();
</span><del>-    ASSERT(!child || child-&gt;isRubyRun() || child-&gt;isBeforeContent() || child == rubyBeforeBlock(ruby));
-    return child &amp;&amp; child-&gt;isRubyRun() ? toRenderRubyRun(child) : 0;
</del><ins>+    ASSERT(!child || is&lt;RenderRubyRun&gt;(*child) || child-&gt;isBeforeContent() || child == rubyBeforeBlock(ruby));
+    return downcast&lt;RenderRubyRun&gt;(child);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline RenderRubyRun&amp; findRubyRunParent(RenderObject&amp; 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()-&gt;isRubyRun());
-
-    return &amp;toRenderRubyRun(*parent());
</del><ins>+    return downcast&lt;RenderRubyRun&gt;(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() &amp;&amp; !documentBeingDestroyed() &amp;&amp; child.isRubyText()) {
</span><span class="cx">         RenderRubyBase* base = rubyBase();
</span><span class="cx">         RenderObject* rightNeighbour = nextSibling();
</span><del>-        if (base &amp;&amp; rightNeighbour &amp;&amp; rightNeighbour-&gt;isRubyRun()) {
</del><ins>+        if (base &amp;&amp; is&lt;RenderRubyRun&gt;(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-&gt;hasRubyBase()) {
-                RenderRubyBase* rightBase = rightRun-&gt;rubyBaseSafe();
</del><ins>+            RenderRubyRun&amp; rightRun = downcast&lt;RenderRubyRun&gt;(*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-&gt;mergeChildrenWithBase(base);
</span><del>-                moveChildTo(rightRun, base);
-                rightRun-&gt;moveChildTo(this, rightBase);
</del><ins>+                moveChildTo(&amp;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()-&gt;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&amp; f, int start, int len, float xPos, HashSet&lt;const SimpleFontData*&gt;* fallbackFonts, GlyphOverflow* glyphOverflow, const RenderStyle&amp; style) const
</span><span class="cx"> {
</span><del>-    if (style.hasTextCombine() &amp;&amp; isCombineText()) {
-        const RenderCombineText&amp; combineText = toRenderCombineText(*this);
</del><ins>+    if (style.hasTextCombine() &amp;&amp; is&lt;RenderCombineText&gt;(*this)) {
+        const RenderCombineText&amp; combineText = downcast&lt;RenderCombineText&gt;(*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&amp; renderObject, const IntRect&amp; fullBarRect)
</span><span class="cx"> {
</span><span class="cx">     IntRect progressRect(fullBarRect);
</span><del>-    const RenderProgress&amp; renderProgress = toRenderProgress(renderObject);
</del><ins>+    const auto&amp; renderProgress = downcast&lt;RenderProgress&gt;(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&amp; renderer, const PaintInfo&amp; paintInfo, const IntRect&amp; rect)
</span><span class="cx"> {
</span><del>-    if (!renderer.isProgress())
</del><ins>+    if (!is&lt;RenderProgress&gt;(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-&gt;fillRect(FloatRect(rect.x(), verticalRenderingPosition, rect.width(), upperGradientHeight));
</span><span class="cx"> 
</span><del>-    const RenderProgress&amp; renderProgress = *toRenderProgress(&amp;renderer);
</del><ins>+    const auto&amp; renderProgress = downcast&lt;RenderProgress&gt;(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&amp; renderObject, const PaintInfo&amp; paintInfo, const IntRect&amp; rect)
</span><span class="cx"> {
</span><del>-    if (!renderObject.isMeter())
</del><ins>+    if (!is&lt;RenderMeter&gt;(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&lt;RenderMeter&gt;(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&amp; renderObject, const PaintInfo&amp; paintInfo, const IntRect&amp; rect)
</span><span class="cx"> {
</span><del>-    if (!renderObject.isProgress())
</del><ins>+    if (!is&lt;RenderProgress&gt;(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&amp; renderProgress = *toRenderProgress(&amp;renderObject);
</del><ins>+    const auto&amp; renderProgress = downcast&lt;RenderProgress&gt;(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&lt;RenderMeter&gt;(renderObject))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    HTMLMeterElement* element = toRenderMeter(renderObject).meterElement();
</del><ins>+    HTMLMeterElement* element = downcast&lt;RenderMeter&gt;(renderObject).meterElement();
</ins><span class="cx"> 
</span><span class="cx">     int remaining = static_cast&lt;int&gt;((1.0 - element-&gt;valueRatio()) * static_cast&lt;double&gt;(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&amp; renderObject, const PaintInfo&amp; paintInfo, const IntRect&amp; rect)
</span><span class="cx"> {
</span><del>-    if (!renderObject.isMeter())
</del><ins>+    if (!is&lt;RenderMeter&gt;(renderObject))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    HTMLMeterElement* element = toRenderMeter(renderObject).meterElement();
</del><ins>+    HTMLMeterElement* element = downcast&lt;RenderMeter&gt;(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-&gt;generatingElement();
</span><span class="cx">         if (generatingElement) {
</span><del>-            bool isRenderNamedFlowFragment = renderRegion-&gt;isRenderNamedFlowFragment();
-            if (isRenderNamedFlowFragment &amp;&amp; toRenderNamedFlowFragment(renderRegion)-&gt;hasCustomRegionStyle())
</del><ins>+            bool isRenderNamedFlowFragment = is&lt;RenderNamedFlowFragment&gt;(*renderRegion);
+            if (isRenderNamedFlowFragment &amp;&amp; downcast&lt;RenderNamedFlowFragment&gt;(*renderRegion).hasCustomRegionStyle())
</ins><span class="cx">                 ts &lt;&lt; &quot; region style: 1&quot;;
</span><span class="cx">             if (renderRegion-&gt;hasAutoLogicalHeight())
</span><span class="cx">                 ts &lt;&lt; &quot; hasAutoLogicalHeight&quot;;
</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-&gt;renderer().isRenderView())
-        writeRenderNamedFlowThreads(ts, toRenderView(l-&gt;renderer()), rootLayer, paintDirtyRect, indent, behavior);
</del><ins>+    if (is&lt;RenderView&gt;(l-&gt;renderer()))
+        writeRenderNamedFlowThreads(ts, downcast&lt;RenderView&gt;(l-&gt;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-&gt;isRenderMultiColumnSpannerPlaceholder())
</del><ins>+        if (!is&lt;RenderMultiColumnSpannerPlaceholder&gt;(m_current))
</ins><span class="cx">             return;
</span><del>-        RenderMultiColumnSpannerPlaceholder* placeholder = toRenderMultiColumnSpannerPlaceholder(m_current);
-        m_spannerStack.append(placeholder);
-        m_current = placeholder-&gt;spanner();
</del><ins>+        auto&amp; placeholder = downcast&lt;RenderMultiColumnSpannerPlaceholder&gt;(*m_current);
+        m_spannerStack.append(&amp;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-&gt;hasLayer() &amp;&amp; toRenderLayerModelObject(object)-&gt;layer()-&gt;isComposited();
</del><ins>+    return object-&gt;hasLayer() &amp;&amp; downcast&lt;RenderLayerModelObject&gt;(*object).layer()-&gt;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 &amp;&amp; !RenderStyle::autoWrap(m_lastWS) &amp;&amp; m_ignoringSpaces)
</span><span class="cx">         commitLineBreakAtCurrentWidth(renderText);
</span><span class="cx"> 
</span><del>-    if (renderText.style().hasTextCombine() &amp;&amp; m_current.renderer()-&gt;isCombineText() &amp;&amp; !toRenderCombineText(*m_current.renderer()).isCombined()) {
-        RenderCombineText&amp; combineRenderer = toRenderCombineText(*m_current.renderer());
</del><ins>+    if (renderText.style().hasTextCombine() &amp;&amp; is&lt;RenderCombineText&gt;(*m_current.renderer()) &amp;&amp; !downcast&lt;RenderCombineText&gt;(*m_current.renderer()).isCombined()) {
+        auto&amp; combineRenderer = downcast&lt;RenderCombineText&gt;(*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&lt;RenderBox&gt;(object)), lastFloatFromPreviousLine, lineInfo, width);
</span><del>-        else if (object.isText() &amp;&amp; object.style().hasTextCombine() &amp;&amp; object.isCombineText() &amp;&amp; !toRenderCombineText(object).isCombined()) {
-            toRenderCombineText(object).combineText();
-            if (toRenderCombineText(object).isCombined())
</del><ins>+        else if (is&lt;RenderCombineText&gt;(object) &amp;&amp; object.style().hasTextCombine() &amp;&amp; !downcast&lt;RenderCombineText&gt;(object).isCombined()) {
+            downcast&lt;RenderCombineText&gt;(object).combineText();
+            if (downcast&lt;RenderCombineText&gt;(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-&gt;renderer();
-    if (!renderer || !renderer-&gt;isEmbeddedObject()) {
</del><ins>+    auto* renderer = element-&gt;renderer();
+    if (!is&lt;RenderEmbeddedObject&gt;(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-&gt;isReplacementObscured();
</del><ins>+    return downcast&lt;RenderEmbeddedObject&gt;(*renderer).isReplacementObscured();
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> bool Internals::isPluginSnapshotted(Element* element, ExceptionCode&amp; 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  &lt;cdumez@apple.com&gt;
+
+        Use is&lt;&gt;() / downcast&lt;&gt;() for all remaining RenderObject subclasses
+        https://bugs.webkit.org/show_bug.cgi?id=137845
+
+        Reviewed by Darin Adler.
+
+        Use is&lt;&gt;() / downcast&lt;&gt;() 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  &lt;timothy_horton@apple.com&gt;
</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-&gt;renderer() &amp;&amp; _element-&gt;renderer()-&gt;isEmbeddedObject()) {
-        RenderEmbeddedObject* renderer = toRenderEmbeddedObject(_element-&gt;renderer());
-        renderer-&gt;setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
-    }
</del><ins>+    if (is&lt;RenderEmbeddedObject&gt;(_element-&gt;renderer()))
+        downcast&lt;RenderEmbeddedObject&gt;(*_element-&gt;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-&gt;renderer();
</del><ins>+    auto* renderer = _element-&gt;renderer();
</ins><span class="cx">     if (!renderer)
</span><span class="cx">         return NSZeroRect;
</span><span class="cx"> 
</span><del>-    return toRenderWidget(renderer)-&gt;windowClipRect();
</del><ins>+    return downcast&lt;RenderWidget&gt;(*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-&gt;renderer();
</del><ins>+    auto* renderer = _element-&gt;renderer();
</ins><span class="cx">     if (!renderer)
</span><span class="cx">         return NSZeroRect;
</span><span class="cx"> 
</span><span class="cx">     IntRect widgetRect = renderer-&gt;pixelSnappedAbsoluteClippedOverflowRect();
</span><span class="cx">     widgetRect = renderer-&gt;view().frameView().contentsToWindow(widgetRect);
</span><del>-    return intersection(toRenderWidget(renderer)-&gt;windowClipRect(), widgetRect);
</del><ins>+    return intersection(downcast&lt;RenderWidget&gt;(*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-&gt;renderer()-&gt;isEmbeddedObject())
-                toRenderEmbeddedObject(element-&gt;renderer())-&gt;setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</del><ins>+            if (is&lt;RenderEmbeddedObject&gt;(*element-&gt;renderer()))
+                downcast&lt;RenderEmbeddedObject&gt;(*element-&gt;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-&gt;renderer()-&gt;isEmbeddedObject())
-                toRenderEmbeddedObject(element-&gt;renderer())-&gt;setPluginUnavailabilityReason(RenderEmbeddedObject::InsecurePluginVersion);
</del><ins>+            if (is&lt;RenderEmbeddedObject&gt;(*element-&gt;renderer()))
+                downcast&lt;RenderEmbeddedObject&gt;(*element-&gt;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  &lt;cdumez@apple.com&gt;
+
+        Use is&lt;&gt;() / downcast&lt;&gt;() for all remaining RenderObject subclasses
+        https://bugs.webkit.org/show_bug.cgi?id=137845
+
+        Reviewed by Darin Adler.
+
+        Use is&lt;&gt;() / downcast&lt;&gt;() 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  &lt;cgarcia@igalia.com&gt;
</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-&gt;renderer())
</del><ins>+    if (!is&lt;RenderEmbeddedObject&gt;(m_pluginElement-&gt;renderer()))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (!m_pluginElement-&gt;renderer()-&gt;isEmbeddedObject())
-        return;
-
</del><span class="cx">     m_pluginElement-&gt;setNeedsStyleRecalc(SyntheticStyleChange);
</span><span class="cx"> 
</span><del>-    RenderEmbeddedObject* renderer = toRenderEmbeddedObject(m_pluginElement-&gt;renderer());
-    renderer-&gt;setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
</del><ins>+    downcast&lt;RenderEmbeddedObject&gt;(*m_pluginElement-&gt;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-&gt;renderer()-&gt;isEmbeddedObject()) {
-            RenderEmbeddedObject* renderObject = toRenderEmbeddedObject(pluginElement-&gt;renderer());
-            renderObject-&gt;setPluginUnavailabilityReasonWithDescription(RenderEmbeddedObject::InsecurePluginVersion, unavailabilityDescription);
-            replacementObscured = renderObject-&gt;isReplacementObscured();
-            renderObject-&gt;setUnavailablePluginIndicatorIsHidden(replacementObscured);
</del><ins>+        if (is&lt;RenderEmbeddedObject&gt;(*pluginElement-&gt;renderer())) {
+            auto&amp; renderObject = downcast&lt;RenderEmbeddedObject&gt;(*pluginElement-&gt;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>