PingLoader objects unnecessarily pass through OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=122942

Reviewed by Darin Adler.

There's no need to store new PingLoader objects into an OwnPtr just to leak them out a few lines later
into an unused variable. New objects are created through a new helper method and then left unmanaged as
they're guaranteed to destroy themselves when they receive a response of any kind.

* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage): Call the new createPingLoader method to spawn the PingLoader.
(WebCore::PingLoader::sendPing): Ditto.
(WebCore::PingLoader::sendViolationReport): Ditto.
(WebCore::PingLoader::createPingLoader): A helper method that creates a new PingLoader object
* loader/PingLoader.h: Declare the new PingLoader::createPingLoader method.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Use auto keyword to clean-up for loops
https://bugs.webkit.org/show_bug.cgi?id=123699

Reviewed by Anders Carlsson.

Start using auto keyword for loops.
Also, since region breaks (forced breaks) can be added only on boxes,
i changed RenderFlowThread::addForcedRegionBreak to use a RenderBox* instead of RenderObject*.

No change in functionality, no new tests.

* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
(WebCore::FlowThreadController::styleDidChange):
(WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
(WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
(WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
(WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
(WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
(WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
(WebCore::FlowThreadController::collectFixedPositionedLayers):
(WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
(WebCore::RenderFlowThread::getLayerListForRegion):
(WebCore::RenderFlowThread::updateLayerToRegionMappings):
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::getRegionRangeForBox):
(WebCore::RenderFlowThread::regionInRange):
(WebCore::RenderFlowThread::checkRegionsWithStyling):
(WebCore::RenderFlowThread::objectInFlowRegion):
(WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
(WebCore::RenderFlowThread::collectLayerFragments):
(WebCore::RenderFlowThread::fragmentsBoundingBox):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::nextRendererForNode):
(WebCore::RenderNamedFlowThread::previousRendererForNode):
(WebCore::RenderNamedFlowThread::dependsOn):
(WebCore::addRegionToList):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::pushDependencies):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRegionObjectsRegionStyle):
(WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
(WebCore::RenderRegion::computeChildrenStyleInRegion):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize baselines: fast/images

Unreviewed; run "webkit-patch optimize-baselines fast/images"

* fast/images/crossfade-client-not-removed-crash-expected.txt:
* fast/images/embed-image-expected.png: Renamed from LayoutTests/platform/efl/fast/images/embed-image-expected.png.
* fast/images/exif-orientation-css-expected.txt: Renamed from LayoutTests/platform/efl/fast/images/exif-orientation-css-expected.txt.
* fast/images/exif-orientation-expected.txt: Renamed from LayoutTests/platform/efl/fast/images/exif-orientation-expected.txt.
* fast/images/icon-decoding-expected.txt: Renamed from LayoutTests/platform/efl/fast/images/icon-decoding-expected.txt.
* fast/images/image-in-map-expected.png: Renamed from LayoutTests/platform/efl/fast/images/image-in-map-expected.png.
* fast/images/image-in-map-expected.txt: Renamed from LayoutTests/platform/efl/fast/images/image-in-map-expected.txt.
* fast/images/imagemap-focus-ring-zoom-expected.txt: Renamed from LayoutTests/platform/efl/fast/images/imagemap-focus-ring-zoom-expected.txt.
* fast/images/support-broken-image-delegate-expected.txt: Renamed from LayoutTests/platform/gtk/fast/images/support-broken-image-delegate-expected.txt.
* platform/efl-wk2/fast/images/imagemap-circle-focus-ring-expected.png: Renamed from LayoutTests/platform/efl/fast/images/imagemap-circle-focus-ring-expected.png.
* platform/efl-wk2/fast/images/imagemap-focus-ring-outline-color-expected.png: Renamed from LayoutTests/platform/efl/fast/images/imagemap-focus-ring-outline-color-expected.png.
* platform/efl-wk2/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Renamed from LayoutTests/platform/efl/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png.
* platform/efl-wk2/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Renamed from LayoutTests/platform/efl/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png.
* platform/efl-wk2/fast/images/imagemap-polygon-focus-ring-expected.png: Renamed from LayoutTests/platform/efl/fast/images/imagemap-polygon-focus-ring-expected.png.
* platform/efl/fast/images/crossfade-client-not-removed-crash-expected.txt: Removed.
* platform/gtk/fast/images/crossfade-client-not-removed-crash-expected.txt: Removed.
* platform/gtk/fast/images/embed-image-expected.png: Removed.
* platform/gtk/fast/images/exif-orientation-css-expected.txt: Removed.
* platform/gtk/fast/images/icon-decoding-expected.txt: Removed.
* platform/gtk/fast/images/image-in-map-expected.png: Removed.
* platform/gtk/fast/images/image-in-map-expected.txt: Removed.
* platform/gtk/fast/images/imagemap-focus-ring-zoom-expected.txt: Removed.
* platform/mac/fast/images/crossfade-client-not-removed-crash-expected.txt: Removed.
* platform/mac/fast/images/exif-orientation-css-expected.txt: Removed.
* platform/mac/fast/images/exif-orientation-expected.txt: Removed.
* platform/win-7sp0/fast/images/support-broken-image-delegate-expected.txt: Renamed from LayoutTests/platform/win/fast/images/support-broken-image-delegate-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an ancestor renderer iterator.
<https://webkit.org/b/123718>

Add ancestor iterators for renderers, analogous to element ancestor
iterators. They walk the chain of parent renderers, stopping at each
ancestor of a certain type.

Just like child renderer iterators, this requires isRendererOfType()
to be implemented for the targeted renderer class.

You use them like this:

auto frameSets = ancestorsOfType<RenderFrameSet>(*this);
for (auto frameSet = frameSets.begin(), end = frameSets.end(); frameSet != end; ++frameSet)
    frameSet->thisOrThat();

To complete the patch, I put them to use in a couple of random places.

Reviewed by Antti Koivisto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize baselines: svg/zoom

Unreviewed; run "webkit-patch optimize-baselines svg/zoom"

* platform/gtk/svg/zoom/page/zoom-background-images-expected.txt: Removed.
* platform/gtk/svg/zoom/page/zoom-coords-viewattr-01-b-expected.txt: Removed.
* platform/gtk/svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt: Removed.
* platform/gtk/svg/zoom/page/zoom-mask-with-percentages-expected.txt: Removed.
* platform/gtk/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: Removed.
* platform/gtk/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt: Removed.
* platform/gtk/svg/zoom/page/zoom-svg-as-image-expected.png: Removed.
* platform/gtk/svg/zoom/page/zoom-svg-float-border-padding-expected.txt: Removed.
* platform/gtk/svg/zoom/text/zoom-coords-viewattr-01-b-expected.txt: Removed.
* platform/gtk/svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt: Removed.
* platform/gtk/svg/zoom/text/zoom-svg-float-border-padding-expected.txt: Removed.
* svg/zoom/page/zoom-background-images-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-background-images-expected.txt.
* svg/zoom/page/zoom-coords-viewattr-01-b-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-coords-viewattr-01-b-expected.txt.
* svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt.
* svg/zoom/page/zoom-mask-with-percentages-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-mask-with-percentages-expected.txt.
* svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt.
* svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt.
* svg/zoom/page/zoom-svg-as-image-expected.png: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-svg-as-image-expected.png.
* svg/zoom/page/zoom-svg-float-border-padding-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/page/zoom-svg-float-border-padding-expected.txt.
* svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.txt: Removed.
* svg/zoom/text/zoom-coords-viewattr-01-b-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/text/zoom-coords-viewattr-01-b-expected.txt.
* svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt.
* svg/zoom/text/zoom-svg-float-border-padding-expected.txt: Renamed from LayoutTests/platform/efl/svg/zoom/text/zoom-svg-float-border-padding-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLNameCollection and friends are always rooted at a Document.
<https://webkit.org/b/123722>

Tighten WindowNameCollection and DocumentNameCollection by making
their constructors take a Document&, and add a slightly better
document() than the one we inherit from LiveNodeListBase.

Also marked the classes FINAL and made create() helpers return
PassRef instead of PassRefPtr.

Reviewed by Antti Koivisto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLTableRowsCollection is always rooted at a HTMLTableElement.
<https://webkit.org/b/123721>

Tighten up HTMLTableRowsCollection by making the create() helper
take a HTMLTableElement& and adding a HTMLSelectElement& getter.

Reviewed by Antti Koivisto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158564 268f45cc-cd09-0410-ab3c-d52691b4dbfc