Expose FeatureObserver data to WebKit clients
        https://bugs.webkit.org/show_bug.cgi?id=113613

        Reviewed by Sam Weinig.

        FeatureObserver used to depend on chromium-only HistogramSupport, which is not
        really usable on Mac at least.

        Instead of adding parallel feature reporting machinery, I'm adding a way to
        generically relay the data from FeatureObserver to port code.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadWithDocumentLoader):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::reportMemoryUsage):
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::previousURL):
        Exposed m_previousURL, renaming it to follow WebKit style.

        * page/FeatureObserver.cpp:
        (WebCore::FeatureObserver::~FeatureObserver):
        (WebCore::FeatureObserver::updateMeasurements):
        * page/FeatureObserver.h:
        (WebCore::FeatureObserver::accumulatedFeatureBits):
        Exposed the data to clients, and made reporting through HistogramSupport
        chromium only for clarity.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Flexitems no longer default min-width to min-content
https://bugs.webkit.org/show_bug.cgi?id=111790

Reviewed by Tony Chang.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Disallow auto as a valid min-size value.

* css/html.css:
(input::-webkit-datetime-edit):
(input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container):
(input[type="range"]::-webkit-slider-runnable-track):
Remove now unnecessary min-width: 0's.

* css/mediaControlsChromium.css:
(audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
(video::-webkit-media-controls-enclosure):
Set a flex-shrink: 0 to avoid shrinking these items below the designated height.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computeReplacedLogicalWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
Remove all the unneeded SizeType arguments now that we don't need to
specially handle MinSize in all these functions.

* rendering/RenderBox.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::styleWillChange):
(WebCore::RenderButton::setupInnerStyle):
No longer need to explicitly set min-width:0.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
Remove the code for specially handling auto.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::maxPageLogicalHeight):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
Remove all the now unneeded SizeType arguments.

* rendering/style/RenderStyle.h:
Change the default min-size back to 0.

Source/WebKit2: Crash when "willSendRequest" causes the ResourceLoader to be cancelled.
<rdar://problem/13531679> and https://bugs.webkit.org/show_bug.cgi?id=113616

Patch by Brady Eidson <beidson@apple.com> on 2013-03-29
Reviewed by Alexey Proskuryakov.

These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed.
A RefPtr<> protector fixes that.

Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader.

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer.
(WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed.
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto
(WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore
  ResourceLoader, and null check it before delivering the "didFinishLoader" call.
* WebProcess/Network/WebResourceLoader.h:

LayoutTests: Flexitems no longer default min-width to min-content
https://bugs.webkit.org/show_bug.cgi?id=111790

Reviewed by Tony Chang.

* css3/flexbox/content-height-with-scrollbars.html:
* css3/flexbox/cross-axis-scrollbar.html:
Set flex:none to avoid flex-shrinking.

* css3/flexbox/flex-item-min-size-expected.txt: Removed.
* css3/flexbox/flex-item-min-size.html: Removed.
These tests are now redundant with tests in fast/css-intrinsic-dimensions.

* css3/flexbox/flexbox-baseline.html:
Set flex:none to avoid flex-shrinking.

* css3/flexbox/line-wrapping.html:
Auto-size the flex items so that the column flexboxes have an auto-height.

* css3/flexbox/preferred-widths.html:
Set flex:none to avoid flex-shrinking.

* fast/css/auto-min-size-expected.txt:
* fast/css/auto-min-size.html:
Update to no longer allow parsing auto as a valid value for min-width/min-height.

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