<!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>[210436] trunk/Source/WebCore</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/210436">210436</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2017-01-06 06:05:29 -0800 (Fri, 06 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Give RenderObject a Page& getter.
<https://webkit.org/b/166735>
Reviewed by Darin Adler.
The render tree should now only ever be live while in a Frame that's connected to a Page.
Hence we can give RenderObject a Page& getter and simplify a lot of code that previously
had to get the Page from Document (or Frame) and perform null checks on it.
* dom/Document.cpp:
(WebCore::Document::destroyRenderTree): Assert that the Page is present when we tear the render tree down.
* page/Frame.cpp:
(WebCore::Frame::willDetachPage): Assert that there's no render tree when we're about to detach from the Page.
Also added a comment explaining the two main ways that render trees die.
* rendering/RenderObject.h:
(WebCore::RenderObject::page): Added. So neat!
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::estimatedLoadingProgress):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::chooseInterpolationQuality):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::layout):
(WebCore::RenderAttachment::baselinePosition):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
(WebCore::setupWheelEventTestTrigger):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintFocusRing):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::shouldUnavailablePluginMessageBeButton):
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
(WebCore::RenderEmbeddedObject::getCursor):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::isActive):
(WebCore::RenderLayer::didStartScroll):
(WebCore::RenderLayer::didEndScroll):
(WebCore::RenderLayer::didUpdateScroll):
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::setupFontSubpixelQuantization):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::updateOverflowControlsLayers):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
(WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
(WebCore::RenderLayerBacking::useGiantTiles):
(WebCore::RenderLayerBacking::verifyNotPainting):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::scrollingCoordinatorFromLayer): Deleted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::updateScrollingLayerWithClient):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
(WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::layerBecameNonComposited):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::pageScaleFactor):
(WebCore::RenderLayerCompositor::zoomedOutPageScaleFactor):
(WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
(WebCore::RenderLayerCompositor::registerAllScrollingLayers):
(WebCore::RenderLayerCompositor::scrollingCoordinator):
(WebCore::RenderLayerCompositor::graphicsLayerFactory):
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
(WebCore::RenderLayerCompositor::page):
* rendering/RenderLayerCompositor.h:
* rendering/RenderListBox.cpp:
(WebCore::setupWheelEventTestTrigger):
(WebCore::RenderListBox::setScrollTop):
(WebCore::RenderListBox::isActive):
(WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::theme):
* rendering/RenderObject.h:
(WebCore::RenderObject::page):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::addSearchResult):
(WebCore::RenderSearchField::showPopup):
(WebCore::RenderSearchField::valueChanged):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::updateControlStatesForRenderer):
(WebCore::RenderTheme::isActive):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
(WebCore::RenderThemeMac::paintSliderThumb):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced):
* rendering/RenderView.cpp:
(WebCore::RenderView::pageNumberForBlockProgressionOffset):
(WebCore::RenderView::pageCount):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingImageQualityControllercpp">trunk/Source/WebCore/rendering/ImageQualityController.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderAttachmentcpp">trunk/Source/WebCore/rendering/RenderAttachment.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderEmbeddedObjectcpp">trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderHTMLCanvascpp">trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderIFramecpp">trunk/Source/WebCore/rendering/RenderIFrame.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderImagecpp">trunk/Source/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</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="#trunkSourceWebCorerenderingRenderLayerCompositorh">trunk/Source/WebCore/rendering/RenderLayerCompositor.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</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="#trunkSourceWebCorerenderingRenderSearchFieldcpp">trunk/Source/WebCore/rendering/RenderSearchField.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderSnapshottedPlugIncpp">trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemecpp">trunk/Source/WebCore/rendering/RenderTheme.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderVideocpp">trunk/Source/WebCore/rendering/RenderVideo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveForDocumentcpp">trunk/Source/WebCore/style/StyleResolveForDocument.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/ChangeLog        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -1,3 +1,140 @@
</span><ins>+2017-01-06 Andreas Kling <akling@apple.com>
+
+ Give RenderObject a Page& getter.
+ <https://webkit.org/b/166735>
+
+ Reviewed by Darin Adler.
+
+ The render tree should now only ever be live while in a Frame that's connected to a Page.
+ Hence we can give RenderObject a Page& getter and simplify a lot of code that previously
+ had to get the Page from Document (or Frame) and perform null checks on it.
+
+ * dom/Document.cpp:
+ (WebCore::Document::destroyRenderTree): Assert that the Page is present when we tear the render tree down.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::willDetachPage): Assert that there's no render tree when we're about to detach from the Page.
+ Also added a comment explaining the two main ways that render trees die.
+
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::page): Added. So neat!
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::estimatedLoadingProgress):
+ * rendering/ImageQualityController.cpp:
+ (WebCore::ImageQualityController::chooseInterpolationQuality):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint):
+ * rendering/RenderAttachment.cpp:
+ (WebCore::RenderAttachment::layout):
+ (WebCore::RenderAttachment::baselinePosition):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintCaret):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleDidChange):
+ (WebCore::setupWheelEventTestTrigger):
+ (WebCore::RenderBox::setScrollLeft):
+ (WebCore::RenderBox::setScrollTop):
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::paintFocusRing):
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::shouldUnavailablePluginMessageBeButton):
+ (WebCore::RenderEmbeddedObject::paint):
+ (WebCore::RenderEmbeddedObject::paintReplaced):
+ (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
+ (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
+ (WebCore::RenderEmbeddedObject::getCursor):
+ * rendering/RenderHTMLCanvas.cpp:
+ (WebCore::RenderHTMLCanvas::paintReplaced):
+ * rendering/RenderIFrame.cpp:
+ (WebCore::RenderIFrame::flattenFrame):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::paintReplaced):
+ (WebCore::RenderImage::paintAreaElementFocusRing):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::~RenderLayer):
+ (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
+ (WebCore::RenderLayer::scrollRectToVisible):
+ (WebCore::RenderLayer::isActive):
+ (WebCore::RenderLayer::didStartScroll):
+ (WebCore::RenderLayer::didEndScroll):
+ (WebCore::RenderLayer::didUpdateScroll):
+ (WebCore::RenderLayer::createScrollbar):
+ (WebCore::RenderLayer::setupFontSubpixelQuantization):
+ (WebCore::RenderLayer::calculateClipRects):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::RenderLayerBacking):
+ (WebCore::RenderLayerBacking::createGraphicsLayer):
+ (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
+ (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
+ (WebCore::RenderLayerBacking::paintContents):
+ (WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
+ (WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
+ (WebCore::RenderLayerBacking::useGiantTiles):
+ (WebCore::RenderLayerBacking::verifyNotPainting):
+ (WebCore::RenderLayerBacking::startAnimation):
+ (WebCore::scrollingCoordinatorFromLayer): Deleted.
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
+ (WebCore::RenderLayerCompositor::scheduleLayerFlushNow):
+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+ (WebCore::updateScrollingLayerWithClient):
+ (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
+ (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
+ (WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
+ (WebCore::RenderLayerCompositor::layerBecameNonComposited):
+ (WebCore::RenderLayerCompositor::updateBacking):
+ (WebCore::RenderLayerCompositor::pageScaleFactor):
+ (WebCore::RenderLayerCompositor::zoomedOutPageScaleFactor):
+ (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
+ (WebCore::RenderLayerCompositor::updateLayerForHeader):
+ (WebCore::RenderLayerCompositor::updateLayerForFooter):
+ (WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
+ (WebCore::RenderLayerCompositor::attachRootLayer):
+ (WebCore::RenderLayerCompositor::detachRootLayer):
+ (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
+ (WebCore::RenderLayerCompositor::registerAllScrollingLayers):
+ (WebCore::RenderLayerCompositor::scrollingCoordinator):
+ (WebCore::RenderLayerCompositor::graphicsLayerFactory):
+ (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
+ (WebCore::RenderLayerCompositor::page):
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderListBox.cpp:
+ (WebCore::setupWheelEventTestTrigger):
+ (WebCore::RenderListBox::setScrollTop):
+ (WebCore::RenderListBox::isActive):
+ (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
+ (WebCore::RenderListBox::createScrollbar):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::theme):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::page):
+ * rendering/RenderSearchField.cpp:
+ (WebCore::RenderSearchField::addSearchResult):
+ (WebCore::RenderSearchField::showPopup):
+ (WebCore::RenderSearchField::valueChanged):
+ * rendering/RenderSnapshottedPlugIn.cpp:
+ (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint):
+ (WebCore::RenderTheme::updateControlStatesForRenderer):
+ (WebCore::RenderTheme::isActive):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
+ (WebCore::RenderThemeMac::paintSliderThumb):
+ * rendering/RenderVideo.cpp:
+ (WebCore::RenderVideo::paintReplaced):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::pageNumberForBlockProgressionOffset):
+ (WebCore::RenderView::pageCount):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::paintReplaced):
+ * style/StyleResolveForDocument.cpp:
+ (WebCore::Style::resolveForDocument):
+
</ins><span class="cx"> 2017-01-05 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> TextFragmentIterator::runWidth does not need typename CharacterType<> anymore.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -1421,11 +1421,7 @@
</span><span class="cx"> if (isLoaded())
</span><span class="cx"> return 1.0;
</span><span class="cx">
</span><del>- Page* page = m_renderer->document().page();
- if (!page)
- return 0;
-
- return page->progress().estimatedProgress();
</del><ins>+ return m_renderer->page().progress().estimatedProgress();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int AccessibilityRenderObject::layoutCount() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/dom/Document.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -2195,6 +2195,8 @@
</span><span class="cx"> void Document::destroyRenderTree()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasLivingRenderTree());
</span><ins>+ ASSERT(frame());
+ ASSERT(page());
</ins><span class="cx">
</span><span class="cx"> // Prevent Widget tree changes from committing until the RenderView is dead and gone.
</span><span class="cx"> WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/page/Frame.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -787,6 +787,17 @@
</span><span class="cx">
</span><span class="cx"> script().clearScriptObjects();
</span><span class="cx"> script().updatePlatformScriptObjects();
</span><ins>+
+ // We promise that the Frame is always connected to a Page while the render tree is live.
+ //
+ // The render tree can be torn down in a few different ways, but the two important ones are:
+ //
+ // - When calling Frame::setView() with a null FrameView*. This is always done before calling
+ // Frame::willDetachPage (this function.) Hence the assertion below.
+ //
+ // - When adding a document to the page cache, the tree is torn down before instantiating
+ // the CachedPage+CachedFrame object tree.
+ ASSERT(!document() || !document()->renderView());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Frame::disconnectOwnerElement()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingImageQualityControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/ImageQualityController.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/ImageQualityController.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/ImageQualityController.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // There is no need to hash scaled images that always use low quality mode when the page demands it. This is the iChat case.
</span><del>- if (m_renderView.frame().page()->inLowQualityImageInterpolationMode()) {
</del><ins>+ if (m_renderView.page().inLowQualityImageInterpolationMode()) {
</ins><span class="cx"> double totalPixels = static_cast<double>(image.width()) * static_cast<double>(image.height());
</span><span class="cx"> if (totalPixels > cInterpolationCutoff)
</span><span class="cx"> return InterpolationLow;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -497,14 +497,12 @@
</span><span class="cx"> paintSelection(context, boxOrigin, lineStyle, font, selectionPaintStyle.fillColor);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (Page* page = renderer().frame().page()) {
- // FIXME: Right now, InlineTextBoxes never call addRelevantUnpaintedObject() even though they might
- // legitimately be unpainted if they are waiting on a slow-loading web font. We should fix that, and
- // when we do, we will have to account for the fact the InlineTextBoxes do not always have unique
- // renderers and Page currently relies on each unpainted object having a unique renderer.
- if (paintInfo.phase == PaintPhaseForeground)
- page->addRelevantRepaintedObject(&renderer(), IntRect(boxOrigin.x(), boxOrigin.y(), logicalWidth(), logicalHeight()));
- }
</del><ins>+ // FIXME: Right now, InlineTextBoxes never call addRelevantUnpaintedObject() even though they might
+ // legitimately be unpainted if they are waiting on a slow-loading web font. We should fix that, and
+ // when we do, we will have to account for the fact the InlineTextBoxes do not always have unique
+ // renderers and Page currently relies on each unpainted object having a unique renderer.
+ if (paintInfo.phase == PaintPhaseForeground)
+ renderer().page().addRelevantRepaintedObject(&renderer(), IntRect(boxOrigin.x(), boxOrigin.y(), logicalWidth(), logicalHeight()));
</ins><span class="cx">
</span><span class="cx"> // 2. Now paint the foreground, including text and decorations like underline/overline (in quirks mode only).
</span><span class="cx"> String alternateStringToRender;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderAttachmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderAttachment.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderAttachment.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderAttachment.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderAttachment::layout()
</span><span class="cx"> {
</span><del>- LayoutSize newIntrinsicSize = document().page()->theme().attachmentIntrinsicSize(*this);
</del><ins>+ LayoutSize newIntrinsicSize = theme().attachmentIntrinsicSize(*this);
</ins><span class="cx"> m_minimumIntrinsicWidth = std::max(m_minimumIntrinsicWidth, newIntrinsicSize.width());
</span><span class="cx"> newIntrinsicSize.setWidth(m_minimumIntrinsicWidth);
</span><span class="cx"> setIntrinsicSize(newIntrinsicSize);
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">
</span><span class="cx"> int RenderAttachment::baselinePosition(FontBaseline, bool, LineDirectionMode, LinePositionMode) const
</span><span class="cx"> {
</span><del>- return document().page()->theme().attachmentBaseline(*this);
</del><ins>+ return theme().attachmentBaseline(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -1643,8 +1643,8 @@
</span><span class="cx"> caretPainter = frame().selection().caretRendererWithoutUpdatingLayout();
</span><span class="cx"> isContentEditable = frame().selection().selection().hasEditableStyle();
</span><span class="cx"> } else {
</span><del>- caretPainter = frame().page()->dragCaretController().caretRenderer();
- isContentEditable = frame().page()->dragCaretController().isContentEditable();
</del><ins>+ caretPainter = page().dragCaretController().caretRenderer();
+ isContentEditable = page().dragCaretController().isContentEditable();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (caretPainter == this && (isContentEditable || caretBrowsing)) {
</span><span class="lines">@@ -1651,7 +1651,7 @@
</span><span class="cx"> if (type == CursorCaret)
</span><span class="cx"> frame().selection().paintCaret(paintInfo.context(), paintOffset, paintInfo.rect);
</span><span class="cx"> else
</span><del>- frame().page()->dragCaretController().paintDragCaret(&frame(), paintInfo.context(), paintOffset, paintInfo.rect);
</del><ins>+ page().dragCaretController().paintDragCaret(&frame(), paintInfo.context(), paintOffset, paintInfo.rect);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -435,7 +435,7 @@
</span><span class="cx"> if (rootStyleChanged && is<RenderBlockFlow>(rootRenderer) && downcast<RenderBlockFlow>(*rootRenderer).multiColumnFlowThread())
</span><span class="cx"> downcast<RenderBlockFlow>(*rootRenderer).updateStylesForColumnChildren();
</span><span class="cx">
</span><del>- if (isBodyRenderer && pagination.mode != Pagination::Unpaginated && frame().page()->paginationLineGridEnabled()) {
</del><ins>+ if (isBodyRenderer && pagination.mode != Pagination::Unpaginated && page().paginationLineGridEnabled()) {
</ins><span class="cx"> // Propagate the body font back up to the RenderView and use it as
</span><span class="cx"> // the basis of the grid.
</span><span class="cx"> if (newStyle.fontDescription() != view().style().fontDescription()) {
</span><span class="lines">@@ -599,16 +599,12 @@
</span><span class="cx"> return hasOverflowClip() && layer() ? layer()->scrollPosition().y() : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void setupWheelEventTestTrigger(RenderLayer& layer, Frame* frame)
</del><ins>+static void setupWheelEventTestTrigger(RenderLayer& layer)
</ins><span class="cx"> {
</span><del>- if (!frame)
</del><ins>+ Page& page = layer.renderer().page();
+ if (!page.expectsWheelEventTriggers())
</ins><span class="cx"> return;
</span><del>-
- Page* page = frame->page();
- if (!page || !page->expectsWheelEventTriggers())
- return;
-
- layer.scrollAnimator().setWheelEventTestTrigger(page->testTrigger());
</del><ins>+ layer.scrollAnimator().setWheelEventTestTrigger(page.testTrigger());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderBox::setScrollLeft(int newLeft)
</span><span class="lines">@@ -615,7 +611,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!hasOverflowClip() || !layer())
</span><span class="cx"> return;
</span><del>- setupWheelEventTestTrigger(*layer(), document().frame());
</del><ins>+ setupWheelEventTestTrigger(*layer());
</ins><span class="cx"> layer()->scrollToXPosition(newLeft, RenderLayer::ScrollOffsetClamped);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -623,7 +619,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!hasOverflowClip() || !layer())
</span><span class="cx"> return;
</span><del>- setupWheelEventTestTrigger(*layer(), document().frame());
</del><ins>+ setupWheelEventTestTrigger(*layer());
</ins><span class="cx"> layer()->scrollToYPosition(newTop, RenderLayer::ScrollOffsetClamped);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -2034,11 +2034,11 @@
</span><span class="cx"> for (auto rect : pixelSnappedFocusRingRects)
</span><span class="cx"> path.addRect(rect);
</span><span class="cx"> }
</span><del>- paintInfo.context().drawFocusRing(path, document().page()->focusController().timeSinceFocusWasSet(), needsRepaint);
</del><ins>+ paintInfo.context().drawFocusRing(path, page().focusController().timeSinceFocusWasSet(), needsRepaint);
</ins><span class="cx"> } else
</span><del>- paintInfo.context().drawFocusRing(pixelSnappedFocusRingRects, document().page()->focusController().timeSinceFocusWasSet(), needsRepaint);
</del><ins>+ paintInfo.context().drawFocusRing(pixelSnappedFocusRingRects, page().focusController().timeSinceFocusWasSet(), needsRepaint);
</ins><span class="cx"> if (needsRepaint)
</span><del>- document().page()->focusController().setFocusedElementNeedsRepaint();
</del><ins>+ page().focusController().setFocusedElementNeedsRepaint();
</ins><span class="cx"> #else
</span><span class="cx"> paintInfo.context().drawFocusRing(pixelSnappedFocusRingRects, style.outlineWidth(), style.outlineOffset(), style.visitedDependentColor(CSSPropertyOutlineColor));
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderEmbeddedObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -155,10 +155,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-static bool shouldUnavailablePluginMessageBeButton(Document& document, RenderEmbeddedObject::PluginUnavailabilityReason pluginUnavailabilityReason)
</del><ins>+static bool shouldUnavailablePluginMessageBeButton(Page& page, RenderEmbeddedObject::PluginUnavailabilityReason pluginUnavailabilityReason)
</ins><span class="cx"> {
</span><del>- Page* page = document.page();
- return page && page->chrome().client().shouldUnavailablePluginMessageBeButton(pluginUnavailabilityReason);
</del><ins>+ return page.chrome().client().shouldUnavailablePluginMessageBeButton(pluginUnavailabilityReason);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderEmbeddedObject::setPluginUnavailabilityReason(PluginUnavailabilityReason pluginUnavailabilityReason)
</span><span class="lines">@@ -239,20 +238,18 @@
</span><span class="cx">
</span><span class="cx"> void RenderEmbeddedObject::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
</span><span class="cx"> {
</span><del>- Page* page = frame().page();
-
</del><span class="cx"> // The relevant repainted object heuristic is not tuned for plugin documents.
</span><del>- bool countsTowardsRelevantObjects = page && !document().isPluginDocument() && paintInfo.phase == PaintPhaseForeground;
</del><ins>+ bool countsTowardsRelevantObjects = !document().isPluginDocument() && paintInfo.phase == PaintPhaseForeground;
</ins><span class="cx">
</span><span class="cx"> if (isPluginUnavailable()) {
</span><span class="cx"> if (countsTowardsRelevantObjects)
</span><del>- page->addRelevantUnpaintedObject(this, visualOverflowRect());
</del><ins>+ page().addRelevantUnpaintedObject(this, visualOverflowRect());
</ins><span class="cx"> RenderReplaced::paint(paintInfo, paintOffset);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (countsTowardsRelevantObjects)
</span><del>- page->addRelevantRepaintedObject(this, visualOverflowRect());
</del><ins>+ page().addRelevantRepaintedObject(this, visualOverflowRect());
</ins><span class="cx">
</span><span class="cx"> RenderWidget::paint(paintInfo, paintOffset);
</span><span class="cx"> }
</span><span class="lines">@@ -325,7 +322,7 @@
</span><span class="cx"> context.setFillColor(replacementTextColor());
</span><span class="cx"> context.drawBidiText(font, run, FloatPoint(labelX, labelY));
</span><span class="cx">
</span><del>- if (shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason)) {
</del><ins>+ if (shouldUnavailablePluginMessageBeButton(page(), m_pluginUnavailabilityReason)) {
</ins><span class="cx"> arrowRect.inflate(-replacementArrowCirclePadding);
</span><span class="cx">
</span><span class="cx"> context.beginTransparencyLayer(1.0);
</span><span class="lines">@@ -349,7 +346,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderEmbeddedObject::getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, FloatRect& indicatorRect, FloatRect& replacementTextRect, FloatRect& arrowRect, FontCascade& font, TextRun& run, float& textWidth) const
</span><span class="cx"> {
</span><del>- bool includesArrow = shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason);
</del><ins>+ bool includesArrow = shouldUnavailablePluginMessageBeButton(page(), m_pluginUnavailabilityReason);
</ins><span class="cx">
</span><span class="cx"> contentRect = contentBoxRect();
</span><span class="cx"> contentRect.moveBy(roundedIntPoint(accumulatedOffset));
</span><span class="lines">@@ -596,7 +593,7 @@
</span><span class="cx">
</span><span class="cx"> void RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent(Event* event)
</span><span class="cx"> {
</span><del>- if (!shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason))
</del><ins>+ if (!shouldUnavailablePluginMessageBeButton(page(), m_pluginUnavailabilityReason))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!is<MouseEvent>(*event))
</span><span class="lines">@@ -620,8 +617,7 @@
</span><span class="cx"> setUnavailablePluginIndicatorIsPressed(false);
</span><span class="cx"> }
</span><span class="cx"> if (m_mouseDownWasInUnavailablePluginIndicator && isInUnavailablePluginIndicator(mouseEvent)) {
</span><del>- if (Page* page = document().page())
- page->chrome().client().unavailablePluginButtonClicked(&element, m_pluginUnavailabilityReason);
</del><ins>+ page().chrome().client().unavailablePluginButtonClicked(&element, m_pluginUnavailabilityReason);
</ins><span class="cx"> }
</span><span class="cx"> m_mouseDownWasInUnavailablePluginIndicator = false;
</span><span class="cx"> event->setDefaultHandled();
</span><span class="lines">@@ -634,7 +630,7 @@
</span><span class="cx">
</span><span class="cx"> CursorDirective RenderEmbeddedObject::getCursor(const LayoutPoint& point, Cursor& cursor) const
</span><span class="cx"> {
</span><del>- if (showsUnavailablePluginIndicator() && shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason) && isInUnavailablePluginIndicator(point)) {
</del><ins>+ if (showsUnavailablePluginIndicator() && shouldUnavailablePluginMessageBeButton(page(), m_pluginUnavailabilityReason) && isInUnavailablePluginIndicator(point)) {
</ins><span class="cx"> cursor = handCursor();
</span><span class="cx"> return SetCursor;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderHTMLCanvascpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -80,10 +80,8 @@
</span><span class="cx"> if (clip)
</span><span class="cx"> paintInfo.context().clip(snappedIntRect(contentBoxRect));
</span><span class="cx">
</span><del>- if (Page* page = frame().page()) {
- if (paintInfo.phase == PaintPhaseForeground)
- page->addRelevantRepaintedObject(this, intersection(replacedContentRect, contentBoxRect));
- }
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantRepaintedObject(this, intersection(replacedContentRect, contentBoxRect));
</ins><span class="cx">
</span><span class="cx"> InterpolationQualityMaintainer interpolationMaintainer(context, ImageQualityController::interpolationQualityFromStyle(style()));
</span><span class="cx"> canvasElement().paint(context, replacedContentRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderIFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderIFrame.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderIFrame.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderIFrame.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -72,11 +72,9 @@
</span><span class="cx">
</span><span class="cx"> bool RenderIFrame::flattenFrame() const
</span><span class="cx"> {
</span><del>- Frame* frame = iframeElement().document().frame();
</del><ins>+ bool enabled = frame().settings().frameFlatteningEnabled();
</ins><span class="cx">
</span><del>- bool enabled = frame && frame->settings().frameFlatteningEnabled();
-
- if (!enabled || !frame->page())
</del><ins>+ if (!enabled)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (style().width().isFixed() && style().height().isFixed()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderImage.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -361,14 +361,12 @@
</span><span class="cx"> GraphicsContext& context = paintInfo.context();
</span><span class="cx"> float deviceScaleFactor = document().deviceScaleFactor();
</span><span class="cx">
</span><del>- Page* page = frame().page();
-
</del><span class="cx"> if (!imageResource().hasImage() || imageResource().errorOccurred()) {
</span><span class="cx"> if (paintInfo.phase == PaintPhaseSelection)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantUnpaintedObject(this, visualOverflowRect());
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantUnpaintedObject(this, visualOverflowRect());
</ins><span class="cx">
</span><span class="cx"> if (cWidth > 2 && cHeight > 2) {
</span><span class="cx"> LayoutUnit borderWidth = LayoutUnit(1 / deviceScaleFactor);
</span><span class="lines">@@ -434,8 +432,8 @@
</span><span class="cx"> } else if (imageResource().hasImage() && cWidth > 0 && cHeight > 0) {
</span><span class="cx"> RefPtr<Image> img = imageResource().image(cWidth, cHeight);
</span><span class="cx"> if (!img || img->isNull()) {
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantUnpaintedObject(this, visualOverflowRect());
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantUnpaintedObject(this, visualOverflowRect());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -450,14 +448,14 @@
</span><span class="cx">
</span><span class="cx"> paintIntoRect(context, snapRectToDevicePixels(replacedContentRect, deviceScaleFactor));
</span><span class="cx">
</span><del>- if (cachedImage() && page && paintInfo.phase == PaintPhaseForeground) {
</del><ins>+ if (cachedImage() && paintInfo.phase == PaintPhaseForeground) {
</ins><span class="cx"> // For now, count images as unpainted if they are still progressively loading. We may want
</span><span class="cx"> // to refine this in the future to account for the portion of the image that has painted.
</span><span class="cx"> LayoutRect visibleRect = intersection(replacedContentRect, contentBoxRect);
</span><span class="cx"> if (cachedImage()->isLoading())
</span><del>- page->addRelevantUnpaintedObject(this, visibleRect);
</del><ins>+ page().addRelevantUnpaintedObject(this, visibleRect);
</ins><span class="cx"> else
</span><del>- page->addRelevantRepaintedObject(this, visibleRect);
</del><ins>+ page().addRelevantRepaintedObject(this, visibleRect);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -482,9 +480,6 @@
</span><span class="cx"> if (paintInfo.context().paintingDisabled() && !paintInfo.context().updatingControlTints())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!document().page())
- return;
-
</del><span class="cx"> Element* focusedElement = document().focusedElement();
</span><span class="cx"> if (!is<HTMLAreaElement>(focusedElement))
</span><span class="cx"> return;
</span><span class="lines">@@ -517,9 +512,9 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> bool needsRepaint;
</span><del>- paintInfo.context().drawFocusRing(path, document().page()->focusController().timeSinceFocusWasSet(), needsRepaint);
</del><ins>+ paintInfo.context().drawFocusRing(path, page().focusController().timeSinceFocusWasSet(), needsRepaint);
</ins><span class="cx"> if (needsRepaint)
</span><del>- document().page()->focusController().setFocusedElementNeedsRepaint();
</del><ins>+ page().focusController().setFocusedElementNeedsRepaint();
</ins><span class="cx"> #else
</span><span class="cx"> paintInfo.context().drawFocusRing(path, outlineWidth, areaElementStyle->outlineOffset(), areaElementStyle->visitedDependentColor(CSSPropertyOutlineColor));
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -365,10 +365,8 @@
</span><span class="cx"> destroyScrollbar(HorizontalScrollbar);
</span><span class="cx"> destroyScrollbar(VerticalScrollbar);
</span><span class="cx">
</span><del>- if (renderer().frame().page()) {
- if (ScrollingCoordinator* scrollingCoordinator = renderer().frame().page()->scrollingCoordinator())
- scrollingCoordinator->willDestroyScrollableArea(*this);
- }
</del><ins>+ if (auto* scrollingCoordinator = renderer().page().scrollingCoordinator())
+ scrollingCoordinator->willDestroyScrollableArea(*this);
</ins><span class="cx">
</span><span class="cx"> if (m_reflection)
</span><span class="cx"> removeReflection();
</span><span class="lines">@@ -1525,8 +1523,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
</span><span class="cx"> {
</span><del>- Page* page = renderer().frame().page();
- return page && page->settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
</del><ins>+ return renderer().frame().settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RenderLayer* RenderLayer::enclosingTransformedAncestor() const
</span><span class="lines">@@ -2586,8 +2583,7 @@
</span><span class="cx"> // This only has an effect on the Mac platform in applications
</span><span class="cx"> // that put web views into scrolling containers, such as Mac OS X Mail.
</span><span class="cx"> // The canAutoscroll function in EventHandler also knows about this.
</span><del>- if (Page* page = frameView.frame().page())
- page->chrome().scrollRectIntoView(snappedIntRect(absoluteRect));
</del><ins>+ page().chrome().scrollRectIntoView(snappedIntRect(absoluteRect));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2850,8 +2846,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderLayer::isActive() const
</span><span class="cx"> {
</span><del>- Page* page = renderer().frame().page();
- return page && page->focusController().isActive();
</del><ins>+ return page().focusController().isActive();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static int cornerStart(const RenderLayer& layer, int minX, int maxX, int thickness)
</span><span class="lines">@@ -3000,21 +2995,18 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void RenderLayer::didStartScroll()
</span><span class="cx"> {
</span><del>- if (Page* page = renderer().frame().page())
- page->chrome().client().didStartOverflowScroll();
</del><ins>+ page().chrome().client().didStartOverflowScroll();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayer::didEndScroll()
</span><span class="cx"> {
</span><del>- if (Page* page = renderer().frame().page())
- page->chrome().client().didEndOverflowScroll();
</del><ins>+ page().chrome().client().didEndOverflowScroll();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayer::didUpdateScroll()
</span><span class="cx"> {
</span><span class="cx"> // Send this notification when we scroll, since this is how we keep selection updated.
</span><del>- if (Page* page = renderer().frame().page())
- page->chrome().client().didLayout(ChromeClient::Scroll);
</del><ins>+ page().chrome().client().didLayout(ChromeClient::Scroll);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -3158,10 +3150,8 @@
</span><span class="cx"> else {
</span><span class="cx"> widget = Scrollbar::createNativeScrollbar(*this, orientation, RegularScrollbar);
</span><span class="cx"> didAddScrollbar(widget.get(), orientation);
</span><del>- if (Page* page = renderer().frame().page()) {
- if (page->expectsWheelEventTriggers())
- scrollAnimator().setWheelEventTestTrigger(page->testTrigger());
- }
</del><ins>+ if (page().expectsWheelEventTriggers())
+ scrollAnimator().setWheelEventTestTrigger(page().testTrigger());
</ins><span class="cx"> }
</span><span class="cx"> renderer().view().frameView().addChild(widget.get());
</span><span class="cx"> return widget.releaseNonNull();
</span><span class="lines">@@ -4081,18 +4071,14 @@
</span><span class="cx">
</span><span class="cx"> bool scrollingOnMainThread = true;
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><del>- if (Page* page = renderer().frame().page()) {
- if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
- scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(renderer().view().frameView());
- }
</del><ins>+ if (ScrollingCoordinator* scrollingCoordinator = page().scrollingCoordinator())
+ scrollingOnMainThread = scrollingCoordinator->shouldUpdateScrollLayerPositionSynchronously(renderer().view().frameView());
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // FIXME: We shouldn't have to disable subpixel quantization for overflow clips or subframes once we scroll those
</span><span class="cx"> // things on the scrolling thread.
</span><span class="cx"> bool contentsScrollByPainting = (renderer().hasOverflowClip() && !usesCompositedScrolling()) || (renderer().frame().ownerElement());
</span><del>- bool isZooming = false;
- if (Page* page = renderer().frame().page())
- isZooming = !page->chrome().client().hasStablePageScaleFactor();
</del><ins>+ bool isZooming = !page().chrome().client().hasStablePageScaleFactor();
</ins><span class="cx"> if (scrollingOnMainThread || contentsScrollByPainting || isZooming) {
</span><span class="cx"> didQuantizeFonts = context.shouldSubpixelQuantizeFonts();
</span><span class="cx"> context.setShouldSubpixelQuantizeFonts(false);
</span><span class="lines">@@ -7008,14 +6994,14 @@
</span><span class="cx"> Frame& frame = renderer().frame();
</span><span class="cx"> if (!filterInfo.renderer()) {
</span><span class="cx"> RefPtr<FilterEffectRenderer> filterRenderer = FilterEffectRenderer::create();
</span><del>- filterRenderer->setFilterScale(frame.page()->deviceScaleFactor());
</del><ins>+ filterRenderer->setFilterScale(page().deviceScaleFactor());
</ins><span class="cx"> filterRenderer->setRenderingMode(frame.settings().acceleratedFiltersEnabled() ? Accelerated : Unaccelerated);
</span><span class="cx"> filterInfo.setRenderer(WTFMove(filterRenderer));
</span><span class="cx">
</span><span class="cx"> // We can optimize away code paths in other places if we know that there are no software filters.
</span><span class="cx"> renderer().view().setHasSoftwareFilters(true);
</span><del>- } else if (filterInfo.renderer()->filterScale() != frame.page()->deviceScaleFactor()) {
- filterInfo.renderer()->setFilterScale(frame.page()->deviceScaleFactor());
</del><ins>+ } else if (filterInfo.renderer()->filterScale() != page().deviceScaleFactor()) {
+ filterInfo.renderer()->setFilterScale(page().deviceScaleFactor());
</ins><span class="cx"> filterInfo.renderer()->clearIntermediateResults();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -134,6 +134,8 @@
</span><span class="cx"> void addChild(RenderLayer* newChild, RenderLayer* beforeChild = nullptr);
</span><span class="cx"> RenderLayer* removeChild(RenderLayer*);
</span><span class="cx">
</span><ins>+ Page& page() const { return renderer().page(); }
+
</ins><span class="cx"> void removeOnlyThisLayer();
</span><span class="cx"> void insertOnlyThisLayer();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -91,16 +91,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// Get the scrolling coordinator in a way that works inside RenderLayerBacking's destructor.
-static ScrollingCoordinator* scrollingCoordinatorFromLayer(RenderLayer& layer)
-{
- Page* page = layer.renderer().frame().page();
- if (!page)
- return 0;
-
- return page->scrollingCoordinator();
-}
-
</del><span class="cx"> RenderLayerBacking::RenderLayerBacking(RenderLayer& layer)
</span><span class="cx"> : m_owningLayer(layer)
</span><span class="cx"> , m_viewportConstrainedNodeID(0)
</span><span class="lines">@@ -115,24 +105,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> , m_backgroundLayerPaintsFixedRootBackground(false)
</span><span class="cx"> {
</span><del>- Page* page = renderer().frame().page();
-
- if (layer.isRootLayer() && page) {
</del><ins>+ if (layer.isRootLayer()) {
</ins><span class="cx"> m_isMainFrameRenderViewLayer = renderer().frame().isMainFrame();
</span><del>- m_usingTiledCacheLayer = page->chrome().client().shouldUseTiledBackingForFrameView(renderer().frame().view());
</del><ins>+ m_usingTiledCacheLayer = renderer().page().chrome().client().shouldUseTiledBackingForFrameView(renderer().frame().view());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> createPrimaryGraphicsLayer();
</span><span class="cx">
</span><del>- if (m_usingTiledCacheLayer && page) {
</del><ins>+ if (m_usingTiledCacheLayer) {
</ins><span class="cx"> TiledBacking* tiledBacking = this->tiledBacking();
</span><span class="cx">
</span><del>- tiledBacking->setIsInWindow(page->isInWindow());
</del><ins>+ tiledBacking->setIsInWindow(renderer().page().isInWindow());
</ins><span class="cx">
</span><span class="cx"> if (m_isMainFrameRenderViewLayer)
</span><span class="cx"> tiledBacking->setUnparentsOffscreenTiles(true);
</span><span class="cx">
</span><del>- tiledBacking->setScrollingPerformanceLoggingEnabled(page->settings().scrollingPerformanceLoggingEnabled());
</del><ins>+ tiledBacking->setScrollingPerformanceLoggingEnabled(renderer().page().settings().scrollingPerformanceLoggingEnabled());
</ins><span class="cx"> adjustTiledBackingCoverage();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -159,9 +147,7 @@
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<GraphicsLayer> RenderLayerBacking::createGraphicsLayer(const String& name, GraphicsLayer::Type layerType)
</span><span class="cx"> {
</span><del>- GraphicsLayerFactory* graphicsLayerFactory = 0;
- if (Page* page = renderer().frame().page())
- graphicsLayerFactory = page->chrome().client().graphicsLayerFactory();
</del><ins>+ auto* graphicsLayerFactory = renderer().page().chrome().client().graphicsLayerFactory();
</ins><span class="cx">
</span><span class="cx"> std::unique_ptr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, *this, layerType);
</span><span class="cx">
</span><span class="lines">@@ -1421,7 +1407,7 @@
</span><span class="cx"> scrollCornerLayerChanged = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer)) {
</del><ins>+ if (auto* scrollingCoordinator = m_owningLayer.page().scrollingCoordinator()) {
</ins><span class="cx"> if (horizontalScrollbarLayerChanged)
</span><span class="cx"> scrollingCoordinator->scrollableAreaScrollbarLayerDidChange(m_owningLayer, HorizontalScrollbar);
</span><span class="cx"> if (verticalScrollbarLayerChanged)
</span><span class="lines">@@ -1675,7 +1661,7 @@
</span><span class="cx"> if (!m_scrollingNodeID && !m_viewportConstrainedNodeID)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer);
</del><ins>+ auto* scrollingCoordinator = m_owningLayer.page().scrollingCoordinator();
</ins><span class="cx"> if (!scrollingCoordinator)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -2409,8 +2395,7 @@
</span><span class="cx"> void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase paintingPhase, const FloatRect& clip)
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>- if (Page* page = renderer().frame().page())
- page->setIsPainting(true);
</del><ins>+ renderer().page().setIsPainting(true);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // The dirtyRect is in the coords of the painting root.
</span><span class="lines">@@ -2448,8 +2433,7 @@
</span><span class="cx"> context.restore();
</span><span class="cx"> }
</span><span class="cx"> #ifndef NDEBUG
</span><del>- if (Page* page = renderer().frame().page())
- page->setIsPainting(false);
</del><ins>+ renderer().page().setIsPainting(false);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2538,27 +2522,23 @@
</span><span class="cx"> if (!m_isMainFrameRenderViewLayer)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (Page* page = renderer().frame().page())
- return page->settings().aggressiveTileRetentionEnabled();
- return false;
</del><ins>+ return renderer().frame().settings().aggressiveTileRetentionEnabled();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderLayerBacking::shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const
</span><span class="cx"> {
</span><del>- if (Page* page = renderer().frame().page())
- return page->settings().temporaryTileCohortRetentionEnabled();
- return true;
</del><ins>+ return renderer().frame().settings().temporaryTileCohortRetentionEnabled();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderLayerBacking::useGiantTiles() const
</span><span class="cx"> {
</span><del>- return renderer().frame().page()->settings().useGiantTiles();
</del><ins>+ return renderer().frame().settings().useGiantTiles();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> void RenderLayerBacking::verifyNotPainting()
</span><span class="cx"> {
</span><del>- ASSERT(!renderer().frame().page() || !renderer().frame().page()->isPainting());
</del><ins>+ ASSERT(!renderer().page().isPainting());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -2610,7 +2590,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (renderer().frame().page() && !renderer().frame().page()->settings().acceleratedCompositedAnimationsEnabled())
</del><ins>+ if (!renderer().frame().settings().acceleratedCompositedAnimationsEnabled())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> bool didAnimate = false;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -314,10 +314,8 @@
</span><span class="cx"> // We allow the chrome to override the settings, in case the page is rendered
</span><span class="cx"> // on a chrome that doesn't allow accelerated compositing.
</span><span class="cx"> if (hasAcceleratedCompositing) {
</span><del>- if (Page* page = this->page()) {
- m_compositingTriggers = page->chrome().client().allowedCompositingTriggers();
- hasAcceleratedCompositing = m_compositingTriggers;
- }
</del><ins>+ m_compositingTriggers = page().chrome().client().allowedCompositingTriggers();
+ hasAcceleratedCompositing = m_compositingTriggers;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> showDebugBorders = settings.showDebugBorders();
</span><span class="lines">@@ -399,8 +397,7 @@
</span><span class="cx"> void RenderLayerCompositor::scheduleLayerFlushNow()
</span><span class="cx"> {
</span><span class="cx"> m_hasPendingLayerFlush = false;
</span><del>- if (Page* page = this->page())
- page->chrome().client().scheduleCompositingLayerFlush();
</del><ins>+ page().chrome().client().scheduleCompositingLayerFlush();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayerCompositor::scheduleLayerFlush(bool canThrottle)
</span><span class="lines">@@ -417,16 +414,6 @@
</span><span class="cx"> scheduleLayerFlushNow();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
-ChromeClient* RenderLayerCompositor::chromeClient() const
-{
- Page* page = m_renderView.frameView().frame().page();
- if (!page)
- return nullptr;
- return &page->chrome().client();
-}
-#endif
-
</del><span class="cx"> void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
</span><span class="cx"> {
</span><span class="cx"> // FrameView::flushCompositingStateIncludingSubframes() flushes each subframe,
</span><span class="lines">@@ -473,9 +460,8 @@
</span><span class="cx"> updateScrollCoordinatedLayersAfterFlushIncludingSubframes();
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- ChromeClient* client = this->chromeClient();
- if (client && isFlushRoot)
- client->didFlushCompositingLayers();
</del><ins>+ if (isFlushRoot)
+ page().chrome().client().didFlushCompositingLayers();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> ++m_layerFlushCount;
</span><span class="lines">@@ -519,17 +505,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: Can we make |layer| const RenderLayer&?
</span><del>-static void updateScrollingLayerWithClient(RenderLayer& layer, ChromeClient* client)
</del><ins>+static void updateScrollingLayerWithClient(RenderLayer& layer, ChromeClient& client)
</ins><span class="cx"> {
</span><del>- if (!client)
- return;
-
</del><span class="cx"> RenderLayerBacking* backing = layer.backing();
</span><span class="cx"> ASSERT(backing);
</span><span class="cx">
</span><span class="cx"> bool allowHorizontalScrollbar = !scrollbarHasDisplayNone(layer.horizontalScrollbar());
</span><span class="cx"> bool allowVerticalScrollbar = !scrollbarHasDisplayNone(layer.verticalScrollbar());
</span><del>- client->addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer(),
</del><ins>+ client.addOrUpdateScrollingLayer(layer.renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer(),
</ins><span class="cx"> layer.scrollableContentsSize(), allowHorizontalScrollbar, allowVerticalScrollbar);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -538,10 +521,8 @@
</span><span class="cx"> registerAllViewportConstrainedLayers();
</span><span class="cx">
</span><span class="cx"> if (!m_scrollingLayersNeedingUpdate.isEmpty()) {
</span><del>- ChromeClient* chromeClient = this->chromeClient();
-
</del><span class="cx"> for (auto* layer : m_scrollingLayersNeedingUpdate)
</span><del>- updateScrollingLayerWithClient(*layer, chromeClient);
</del><ins>+ updateScrollingLayerWithClient(*layer, page().chrome().client());
</ins><span class="cx"> m_scrollingLayersNeedingUpdate.clear();
</span><span class="cx"> }
</span><span class="cx"> m_scrollingLayersNeedingUpdate.clear();
</span><span class="lines">@@ -592,10 +573,7 @@
</span><span class="cx"> void RenderLayerCompositor::notifyFlushBeforeDisplayRefresh(const GraphicsLayer*)
</span><span class="cx"> {
</span><span class="cx"> if (!m_layerUpdater) {
</span><del>- PlatformDisplayID displayID = 0;
- if (Page* page = this->page())
- displayID = page->chrome().displayID();
-
</del><ins>+ PlatformDisplayID displayID = page().chrome().displayID();
</ins><span class="cx"> m_layerUpdater = std::make_unique<GraphicsLayerUpdater>(*this, displayID);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -611,9 +589,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (usingTiledBacking) {
</span><span class="cx"> ++m_layersWithTiledBackingCount;
</span><del>-
- if (Page* page = this->page())
- graphicsLayer->tiledBacking()->setIsInWindow(page->isInWindow());
</del><ins>+ graphicsLayer->tiledBacking()->setIsInWindow(page().isInWindow());
</ins><span class="cx"> } else {
</span><span class="cx"> ASSERT(m_layersWithTiledBackingCount > 0);
</span><span class="cx"> --m_layersWithTiledBackingCount;
</span><span class="lines">@@ -789,7 +765,7 @@
</span><span class="cx"> enableCompositingMode(false);
</span><span class="cx">
</span><span class="cx"> // Inform the inspector that the layer tree has changed.
</span><del>- InspectorInstrumentation::layerTreeDidChange(page());
</del><ins>+ InspectorInstrumentation::layerTreeDidChange(&page());
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -800,10 +776,6 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Frame& frame = m_renderView.frameView().frame();
</span><del>- Page* page = frame.page();
- if (!page)
- return;
-
</del><span class="cx"> PageOverlayController& pageOverlayController = frame.mainFrame().pageOverlayController();
</span><span class="cx"> pageOverlayController.willAttachRootLayer();
</span><span class="cx"> childList.append(&pageOverlayController.documentOverlayRootLayer());
</span><span class="lines">@@ -812,7 +784,7 @@
</span><span class="cx"> void RenderLayerCompositor::layerBecameNonComposited(const RenderLayer& layer)
</span><span class="cx"> {
</span><span class="cx"> // Inform the inspector that the given RenderLayer was destroyed.
</span><del>- InspectorInstrumentation::renderLayerDestroyed(page(), layer);
</del><ins>+ InspectorInstrumentation::renderLayerDestroyed(&page(), layer);
</ins><span class="cx">
</span><span class="cx"> ASSERT(m_compositedLayerCount > 0);
</span><span class="cx"> --m_compositedLayerCount;
</span><span class="lines">@@ -1010,10 +982,8 @@
</span><span class="cx"> if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
</span><span class="cx"> scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><del>- if (Page* page = this->page()) {
- updateLayerForHeader(page->headerHeight());
- updateLayerForFooter(page->footerHeight());
- }
</del><ins>+ updateLayerForHeader(page().headerHeight());
+ updateLayerForFooter(page().footerHeight());
</ins><span class="cx"> #endif
</span><span class="cx"> if (m_renderView.frameView().frame().settings().backgroundShouldExtendBeyondPage())
</span><span class="cx"> m_rootContentLayer->setMasksToBounds(false);
</span><span class="lines">@@ -2939,14 +2909,12 @@
</span><span class="cx">
</span><span class="cx"> float RenderLayerCompositor::pageScaleFactor() const
</span><span class="cx"> {
</span><del>- Page* page = this->page();
- return page ? page->pageScaleFactor() : 1;
</del><ins>+ return page().pageScaleFactor();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float RenderLayerCompositor::zoomedOutPageScaleFactor() const
</span><span class="cx"> {
</span><del>- Page* page = this->page();
- return page ? page->zoomedOutPageScaleFactor() : 0;
</del><ins>+ return page().zoomedOutPageScaleFactor();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float RenderLayerCompositor::contentsScaleMultiplierForNewTiles(const GraphicsLayer*) const
</span><span class="lines">@@ -2953,10 +2921,8 @@
</span><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> LegacyTileCache* tileCache = nullptr;
</span><del>- if (Page* page = this->page()) {
- if (FrameView* frameView = page->mainFrame().view())
- tileCache = frameView->legacyTileCache();
- }
</del><ins>+ if (FrameView* frameView = page().mainFrame().view())
+ tileCache = frameView->legacyTileCache();
</ins><span class="cx">
</span><span class="cx"> if (!tileCache)
</span><span class="cx"> return 1;
</span><span class="lines">@@ -3139,8 +3105,7 @@
</span><span class="cx"> if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
</span><span class="cx"> scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
</span><span class="cx">
</span><del>- if (Page* page = this->page())
- page->chrome().client().didAddHeaderLayer(m_layerForHeader.get());
</del><ins>+ page().chrome().client().didAddHeaderLayer(m_layerForHeader.get());
</ins><span class="cx">
</span><span class="cx"> return m_layerForHeader.get();
</span><span class="cx"> }
</span><span class="lines">@@ -3178,8 +3143,7 @@
</span><span class="cx"> if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
</span><span class="cx"> scrollingCoordinator->frameViewRootLayerDidChange(m_renderView.frameView());
</span><span class="cx">
</span><del>- if (Page* page = this->page())
- page->chrome().client().didAddFooterLayer(m_layerForFooter.get());
</del><ins>+ page().chrome().client().didAddFooterLayer(m_layerForFooter.get());
</ins><span class="cx">
</span><span class="cx"> return m_layerForFooter.get();
</span><span class="cx"> }
</span><span class="lines">@@ -3250,8 +3214,7 @@
</span><span class="cx">
</span><span class="cx"> m_rootExtendedBackgroundColor = color;
</span><span class="cx">
</span><del>- if (Page* page = this->page())
- page->chrome().client().pageExtendedBackgroundColorDidChange(color);
</del><ins>+ page().chrome().client().pageExtendedBackgroundColorDidChange(color);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><span class="cx"> if (!m_layerForOverhangAreas)
</span><span class="lines">@@ -3502,15 +3465,11 @@
</span><span class="cx"> break;
</span><span class="cx"> case RootLayerAttachedViaChromeClient: {
</span><span class="cx"> Frame& frame = m_renderView.frameView().frame();
</span><del>- Page* page = frame.page();
- if (!page)
- return;
-
- page->chrome().client().attachRootGraphicsLayer(&frame, rootGraphicsLayer());
</del><ins>+ page().chrome().client().attachRootGraphicsLayer(&frame, rootGraphicsLayer());
</ins><span class="cx"> if (frame.isMainFrame()) {
</span><span class="cx"> PageOverlayController& pageOverlayController = frame.mainFrame().pageOverlayController();
</span><span class="cx"> pageOverlayController.willAttachRootLayer();
</span><del>- page->chrome().client().attachViewOverlayGraphicsLayer(&frame, &pageOverlayController.viewOverlayRootLayer());
</del><ins>+ page().chrome().client().attachViewOverlayGraphicsLayer(&frame, &pageOverlayController.viewOverlayRootLayer());
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -3551,13 +3510,9 @@
</span><span class="cx"> }
</span><span class="cx"> case RootLayerAttachedViaChromeClient: {
</span><span class="cx"> Frame& frame = m_renderView.frameView().frame();
</span><del>- Page* page = frame.page();
- if (!page)
- return;
-
- page->chrome().client().attachRootGraphicsLayer(&frame, 0);
</del><ins>+ page().chrome().client().attachRootGraphicsLayer(&frame, 0);
</ins><span class="cx"> if (frame.isMainFrame())
</span><del>- page->chrome().client().attachViewOverlayGraphicsLayer(&frame, 0);
</del><ins>+ page().chrome().client().attachViewOverlayGraphicsLayer(&frame, 0);
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case RootLayerUnattached:
</span><span class="lines">@@ -3582,9 +3537,6 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> Frame& frame = m_renderView.frameView().frame();
</span><del>- Page* page = frame.page();
- if (!page)
- return;
</del><span class="cx">
</span><span class="cx"> // The attachment can affect whether the RenderView layer's paintsIntoWindow() behavior,
</span><span class="cx"> // so call updateDrawsContent() to update that.
</span><span class="lines">@@ -4007,8 +3959,7 @@
</span><span class="cx"> layerMap.add(layer->backing()->graphicsLayer()->platformLayer(), WTFMove(constraints));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (ChromeClient* client = this->chromeClient())
- client->updateViewportConstrainedLayers(layerMap, stickyContainerMap);
</del><ins>+ page().chrome().client().updateViewportConstrainedLayers(layerMap, stickyContainerMap);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayerCompositor::unregisterAllViewportConstrainedLayers()
</span><span class="lines">@@ -4020,33 +3971,23 @@
</span><span class="cx"> if (scrollingCoordinator())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (ChromeClient* client = this->chromeClient()) {
- LayerMap layerMap;
- StickyContainerMap stickyContainerMap;
- client->updateViewportConstrainedLayers(layerMap, stickyContainerMap);
- }
</del><ins>+ LayerMap layerMap;
+ StickyContainerMap stickyContainerMap;
+ page().chrome().client().updateViewportConstrainedLayers(layerMap, stickyContainerMap);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayerCompositor::registerAllScrollingLayers()
</span><span class="cx"> {
</span><del>- ChromeClient* client = this->chromeClient();
- if (!client)
- return;
-
</del><span class="cx"> for (auto* layer : m_scrollingLayers)
</span><del>- updateScrollingLayerWithClient(*layer, client);
</del><ins>+ updateScrollingLayerWithClient(*layer, page().chrome().client());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayerCompositor::unregisterAllScrollingLayers()
</span><span class="cx"> {
</span><del>- ChromeClient* client = this->chromeClient();
- if (!client)
- return;
-
</del><span class="cx"> for (auto* layer : m_scrollingLayers) {
</span><span class="cx"> RenderLayerBacking* backing = layer->backing();
</span><span class="cx"> ASSERT(backing);
</span><del>- client->removeScrollingLayer(layer->renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer());
</del><ins>+ page().chrome().client().removeScrollingLayer(layer->renderer().element(), backing->scrollingLayer()->platformLayer(), backing->scrollingContentsLayer()->platformLayer());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -4068,11 +4009,9 @@
</span><span class="cx"> if (m_renderView.document().pageCacheState() != Document::NotInPageCache)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (ChromeClient* client = this->chromeClient()) {
- PlatformLayer* scrollingLayer = backing.scrollingLayer()->platformLayer();
- PlatformLayer* contentsLayer = backing.scrollingContentsLayer()->platformLayer();
- client->removeScrollingLayer(layer.renderer().element(), scrollingLayer, contentsLayer);
- }
</del><ins>+ PlatformLayer* scrollingLayer = backing.scrollingLayer()->platformLayer();
+ PlatformLayer* contentsLayer = backing.scrollingContentsLayer()->platformLayer();
+ page().chrome().client().removeScrollingLayer(layer.renderer().element(), scrollingLayer, contentsLayer);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4100,25 +4039,14 @@
</span><span class="cx">
</span><span class="cx"> ScrollingCoordinator* RenderLayerCompositor::scrollingCoordinator() const
</span><span class="cx"> {
</span><del>- if (Page* page = this->page())
- return page->scrollingCoordinator();
-
- return nullptr;
</del><ins>+ return page().scrollingCoordinator();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> GraphicsLayerFactory* RenderLayerCompositor::graphicsLayerFactory() const
</span><span class="cx"> {
</span><del>- if (Page* page = this->page())
- return page->chrome().client().graphicsLayerFactory();
-
- return nullptr;
</del><ins>+ return page().chrome().client().graphicsLayerFactory();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Page* RenderLayerCompositor::page() const
-{
- return m_renderView.frameView().frame().page();
-}
-
</del><span class="cx"> void RenderLayerCompositor::setLayerFlushThrottlingEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx"> m_layerFlushThrottlingEnabled = enabled;
</span><span class="lines">@@ -4176,12 +4104,7 @@
</span><span class="cx"> #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
</span><span class="cx"> RefPtr<DisplayRefreshMonitor> RenderLayerCompositor::createDisplayRefreshMonitor(PlatformDisplayID displayID) const
</span><span class="cx"> {
</span><del>- Frame& frame = m_renderView.frameView().frame();
- Page* page = frame.page();
- if (!page)
- return nullptr;
-
- if (auto monitor = page->chrome().client().createDisplayRefreshMonitor(displayID))
</del><ins>+ if (auto monitor = page().chrome().client().createDisplayRefreshMonitor(displayID))
</ins><span class="cx"> return monitor;
</span><span class="cx">
</span><span class="cx"> return DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor(displayID);
</span><span class="lines">@@ -4216,4 +4139,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+Page& RenderLayerCompositor::page() const
+{
+ return m_renderView.page();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx"> void updateScrollCoordinatedLayersAfterFlushIncludingSubframes();
</span><span class="cx"> void updateScrollCoordinatedLayersAfterFlush();
</span><span class="cx">
</span><del>- Page* page() const;
</del><ins>+ Page& page() const;
</ins><span class="cx">
</span><span class="cx"> GraphicsLayerFactory* graphicsLayerFactory() const;
</span><span class="cx"> ScrollingCoordinator* scrollingCoordinator() const;
</span><span class="lines">@@ -437,9 +437,6 @@
</span><span class="cx"> bool requiresCompositingForScrolling(const RenderLayer&) const;
</span><span class="cx">
</span><span class="cx"> void updateCustomLayersAfterFlush();
</span><del>-
- ChromeClient* chromeClient() const;
-
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void updateScrollCoordinationForThisFrame(ScrollingNodeID);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -734,16 +734,12 @@
</span><span class="cx"> return m_indexOffset * itemHeight();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void setupWheelEventTestTrigger(RenderListBox& renderer, Frame* frame)
</del><ins>+static void setupWheelEventTestTrigger(RenderListBox& renderer)
</ins><span class="cx"> {
</span><del>- if (!frame)
</del><ins>+ if (!renderer.page().expectsWheelEventTriggers())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- Page* page = frame->page();
- if (!page || !page->expectsWheelEventTriggers())
- return;
-
- renderer.scrollAnimator().setWheelEventTestTrigger(page->testTrigger());
</del><ins>+ renderer.scrollAnimator().setWheelEventTestTrigger(renderer.page().testTrigger());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderListBox::setScrollTop(int newTop)
</span><span class="lines">@@ -752,7 +748,7 @@
</span><span class="cx"> int index = newTop / itemHeight();
</span><span class="cx"> if (index < 0 || index >= numItems() || index == m_indexOffset)
</span><span class="cx"> return;
</span><del>- setupWheelEventTestTrigger(*this, document().frame());
</del><ins>+ setupWheelEventTestTrigger(*this);
</ins><span class="cx"> scrollToOffsetWithoutAnimation(VerticalScrollbar, index);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -792,8 +788,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderListBox::isActive() const
</span><span class="cx"> {
</span><del>- Page* page = frame().page();
- return page && page->focusController().isActive();
</del><ins>+ return page().focusController().isActive();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderListBox::invalidateScrollbarRect(Scrollbar& scrollbar, const IntRect& rect)
</span><span class="lines">@@ -861,8 +856,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
</span><span class="cx"> {
</span><del>- Page* page = frame().page();
- return page && page->settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
</del><ins>+ return frame().settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScrollableArea* RenderListBox::enclosingScrollableArea() const
</span><span class="lines">@@ -905,10 +899,8 @@
</span><span class="cx"> else {
</span><span class="cx"> widget = Scrollbar::createNativeScrollbar(*this, VerticalScrollbar, theme().scrollbarControlSizeForPart(ListboxPart));
</span><span class="cx"> didAddScrollbar(widget.get(), VerticalScrollbar);
</span><del>- if (Page* page = frame().page()) {
- if (page->expectsWheelEventTriggers())
- scrollAnimator().setWheelEventTestTrigger(page->testTrigger());
- }
</del><ins>+ if (page().expectsWheelEventTriggers())
+ scrollAnimator().setWheelEventTestTrigger(page().testTrigger());
</ins><span class="cx"> }
</span><span class="cx"> view().frameView().addChild(widget.get());
</span><span class="cx"> return widget.releaseNonNull();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -142,8 +142,7 @@
</span><span class="cx">
</span><span class="cx"> RenderTheme& RenderObject::theme() const
</span><span class="cx"> {
</span><del>- ASSERT(document().page());
- return document().page()->theme();
</del><ins>+ return page().theme();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderObject::isDescendantOf(const RenderObject* ancestor) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -515,6 +515,7 @@
</span><span class="cx">
</span><span class="cx"> Document& document() const { return m_node.document(); }
</span><span class="cx"> Frame& frame() const;
</span><ins>+ Page& page() const;
</ins><span class="cx">
</span><span class="cx"> // Returns the object containing this one. Can be different from parent for positioned elements.
</span><span class="cx"> // If repaintContainer and repaintContainerSkipped are not null, on return *repaintContainerSkipped
</span><span class="lines">@@ -1007,6 +1008,14 @@
</span><span class="cx"> return *document().frame();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline Page& RenderObject::page() const
+{
+ // The render tree will always be torn down before Frame is disconnected from Page,
+ // so it's safe to assume Frame::page() is non-null as long as there are live RenderObjects.
+ ASSERT(frame().page());
+ return *frame().page();
+}
+
</ins><span class="cx"> inline AnimationController& RenderObject::animation() const
</span><span class="cx"> {
</span><span class="cx"> return frame().animation();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSearchFieldcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSearchField.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSearchField.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderSearchField.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> if (value.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (frame().page()->usesEphemeralSession())
</del><ins>+ if (page().usesEphemeralSession())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_recentSearches.removeAllMatching([value] (const RecentSearch& recentSearch) {
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">
</span><span class="cx"> const AtomicString& name = autosaveName();
</span><span class="cx"> if (!m_searchPopup)
</span><del>- m_searchPopup = document().page()->chrome().createSearchPopupMenu(this);
</del><ins>+ m_searchPopup = page().chrome().createSearchPopupMenu(this);
</ins><span class="cx">
</span><span class="cx"> m_searchPopup->saveRecentSearches(name, m_recentSearches);
</span><span class="cx"> }
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!m_searchPopup)
</span><del>- m_searchPopup = document().page()->chrome().createSearchPopupMenu(this);
</del><ins>+ m_searchPopup = page().chrome().createSearchPopupMenu(this);
</ins><span class="cx">
</span><span class="cx"> if (!m_searchPopup->enabled())
</span><span class="cx"> return;
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx"> const AtomicString& name = autosaveName();
</span><span class="cx"> if (!name.isEmpty()) {
</span><span class="cx"> if (!m_searchPopup)
</span><del>- m_searchPopup = document().page()->chrome().createSearchPopupMenu(this);
</del><ins>+ m_searchPopup = page().chrome().createSearchPopupMenu(this);
</ins><span class="cx"> m_searchPopup->saveRecentSearches(name, m_recentSearches);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderSnapshottedPlugIncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> if (!image)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_snapshotResource->setCachedImage(new CachedImage(image, view().frameView().frame().page()->sessionID()));
</del><ins>+ m_snapshotResource->setCachedImage(new CachedImage(image, page().sessionID()));
</ins><span class="cx"> repaint();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx"> FloatRect devicePixelSnappedRect = snapRectToDevicePixels(rect, deviceScaleFactor);
</span><span class="cx">
</span><span class="cx"> #if USE(NEW_THEME)
</span><del>- float pageScaleFactor = box.document().page() ? box.document().page()->pageScaleFactor() : 1.0f;
</del><ins>+ float pageScaleFactor = box.page().pageScaleFactor();
</ins><span class="cx">
</span><span class="cx"> switch (part) {
</span><span class="cx"> case CheckboxPart:
</span><span class="lines">@@ -753,7 +753,7 @@
</span><span class="cx"> ControlStates newStates = extractControlStatesForRenderer(box);
</span><span class="cx"> controlStates.setStates(newStates.states());
</span><span class="cx"> if (isFocused(box))
</span><del>- controlStates.setTimeSinceControlWasFocused(box.document().page()->focusController().timeSinceFocusWasSet());
</del><ins>+ controlStates.setTimeSinceControlWasFocused(box.page().focusController().timeSinceFocusWasSet());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ControlStates::States RenderTheme::extractControlStatesForRenderer(const RenderObject& o) const
</span><span class="lines">@@ -784,13 +784,9 @@
</span><span class="cx"> return states;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool RenderTheme::isActive(const RenderObject& o) const
</del><ins>+bool RenderTheme::isActive(const RenderObject& renderer) const
</ins><span class="cx"> {
</span><del>- Page* page = o.document().page();
- if (!page)
- return false;
-
- return page->focusController().isActive();
</del><ins>+ return renderer.page().focusController().isActive();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RenderTheme::isChecked(const RenderObject& o) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -1475,12 +1475,11 @@
</span><span class="cx">
</span><span class="cx"> void RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary(NSCell* cell, const RenderObject& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
</span><span class="cx"> {
</span><del>- Page* page = renderer.document().page();
</del><span class="cx"> bool shouldDrawFocusRing = isFocused(renderer) && renderer.style().outlineStyleIsAuto();
</span><del>- bool shouldUseImageBuffer = renderer.style().effectiveZoom() != 1 || page->pageScaleFactor() != 1;
</del><ins>+ bool shouldUseImageBuffer = renderer.style().effectiveZoom() != 1 || renderer.page().pageScaleFactor() != 1;
</ins><span class="cx"> bool shouldDrawCell = true;
</span><del>- if (ThemeMac::drawCellOrFocusRingWithViewIntoContext(cell, paintInfo.context(), rect, documentViewFor(renderer), shouldDrawCell, shouldDrawFocusRing, shouldUseImageBuffer, page->deviceScaleFactor()))
- page->focusController().setFocusedElementNeedsRepaint();
</del><ins>+ if (ThemeMac::drawCellOrFocusRingWithViewIntoContext(cell, paintInfo.context(), rect, documentViewFor(renderer), shouldDrawCell, shouldDrawFocusRing, shouldUseImageBuffer, renderer.page().deviceScaleFactor()))
+ renderer.page().focusController().setFocusedElementNeedsRepaint();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const IntSize* RenderThemeMac::menuListSizes() const
</span><span class="lines">@@ -1607,7 +1606,7 @@
</span><span class="cx">
</span><span class="cx"> bool shouldDrawCell = true;
</span><span class="cx"> bool shouldDrawFocusRing = false;
</span><del>- float deviceScaleFactor = o.document().page()->deviceScaleFactor();
</del><ins>+ float deviceScaleFactor = o.page().deviceScaleFactor();
</ins><span class="cx"> bool shouldUseImageBuffer = deviceScaleFactor != 1 || zoomLevel != 1;
</span><span class="cx"> ThemeMac::drawCellOrFocusRingWithViewIntoContext(sliderThumbCell, paintInfo.context(), unzoomedRect, view, shouldDrawCell, shouldDrawFocusRing, shouldUseImageBuffer, deviceScaleFactor);
</span><span class="cx"> [sliderThumbCell setControlView:nil];
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderVideocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderVideo.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderVideo.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderVideo.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -160,24 +160,22 @@
</span><span class="cx"> MediaPlayer* mediaPlayer = videoElement().player();
</span><span class="cx"> bool displayingPoster = videoElement().shouldDisplayPosterImage();
</span><span class="cx">
</span><del>- Page* page = frame().page();
-
</del><span class="cx"> if (!displayingPoster && !mediaPlayer) {
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantUnpaintedObject(this, visualOverflowRect());
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantUnpaintedObject(this, visualOverflowRect());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> LayoutRect rect = videoBox();
</span><span class="cx"> if (rect.isEmpty()) {
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantUnpaintedObject(this, visualOverflowRect());
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantUnpaintedObject(this, visualOverflowRect());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> rect.moveBy(paintOffset);
</span><span class="cx">
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantRepaintedObject(this, rect);
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantRepaintedObject(this, rect);
</ins><span class="cx">
</span><span class="cx"> LayoutRect contentRect = contentBoxRect();
</span><span class="cx"> contentRect.moveBy(paintOffset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -1434,7 +1434,7 @@
</span><span class="cx"> unsigned RenderView::pageNumberForBlockProgressionOffset(int offset) const
</span><span class="cx"> {
</span><span class="cx"> int columnNumber = 0;
</span><del>- const Pagination& pagination = frameView().frame().page()->pagination();
</del><ins>+ const Pagination& pagination = page().pagination();
</ins><span class="cx"> if (pagination.mode == Pagination::Unpaginated)
</span><span class="cx"> return columnNumber;
</span><span class="cx">
</span><span class="lines">@@ -1459,7 +1459,7 @@
</span><span class="cx">
</span><span class="cx"> unsigned RenderView::pageCount() const
</span><span class="cx"> {
</span><del>- const Pagination& pagination = frameView().frame().page()->pagination();
</del><ins>+ const Pagination& pagination = page().pagination();
</ins><span class="cx"> if (pagination.mode == Pagination::Unpaginated)
</span><span class="cx"> return 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -241,20 +241,18 @@
</span><span class="cx"> if (svgSVGElement().hasEmptyViewBox())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Page* page = frame().page();
-
</del><span class="cx"> // Don't paint if we don't have kids, except if we have filters we should paint those.
</span><span class="cx"> if (!firstChild()) {
</span><span class="cx"> auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</span><span class="cx"> if (!resources || !resources->filter()) {
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantUnpaintedObject(this, visualOverflowRect());
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantUnpaintedObject(this, visualOverflowRect());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (page && paintInfo.phase == PaintPhaseForeground)
- page->addRelevantRepaintedObject(this, visualOverflowRect());
</del><ins>+ if (paintInfo.phase == PaintPhaseForeground)
+ page().addRelevantRepaintedObject(this, visualOverflowRect());
</ins><span class="cx">
</span><span class="cx"> // Make a copy of the PaintInfo because applyTransform will modify the damage rect.
</span><span class="cx"> PaintInfo childPaintInfo(paintInfo);
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveForDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveForDocument.cpp (210435 => 210436)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveForDocument.cpp        2017-01-06 09:47:25 UTC (rev 210435)
+++ trunk/Source/WebCore/style/StyleResolveForDocument.cpp        2017-01-06 14:05:29 UTC (rev 210436)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> documentStyle.setColumnGap(pagination.gap);
</span><span class="cx"> if (renderView.multiColumnFlowThread())
</span><span class="cx"> renderView.updateColumnProgressionFromStyle(documentStyle);
</span><del>- if (renderView.frame().page()->paginationLineGridEnabled()) {
</del><ins>+ if (renderView.page().paginationLineGridEnabled()) {
</ins><span class="cx"> documentStyle.setLineGrid("-webkit-default-pagination-grid");
</span><span class="cx"> documentStyle.setLineSnap(LineSnapContain);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>