[webkit-changes] [167192] trunk

2014-04-13 Thread darin
Title: [167192] trunk








Revision 167192
Author da...@apple.com
Date 2014-04-13 01:05:57 -0700 (Sun, 13 Apr 2014)


Log Message
REGRESSION (r166860): ASSERTION FAILED: !isCalculated() on fast/css/image-set-value-not-removed-crash.html
https://bugs.webkit.org/show_bug.cgi?id=131480

Reviewed by Andreas Kling.

Source/WebCore:

Fixes intermittent assertion failure in fast/css/image-set-value-not-removed-crash.html.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForImageSliceSide): Added. Helper used below in valueForNinePieceImageSlice.
Handles calculated values by returning 0; incorrect but predictable.
(WebCore::valueForNinePieceImageSlice): Updated to call valueForImageSliceSide.
(WebCore::positionOffsetValue): Use nullptr.
(WebCore::ComputedStyleExtractor::propertyValue): Updated to call positionOffsetValue
by its new name. Removed get from the name.
(WebCore::positionOffsetValue): Renamed from getPositionOffsetValue.

* platform/Length.h: Made isCalculated public.

LayoutTests:

* platform/mac/TestExpectations: Unskip the test now that the assertion is fixed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
trunk/Source/WebCore/platform/Length.h




Diff

Modified: trunk/LayoutTests/ChangeLog (167191 => 167192)

--- trunk/LayoutTests/ChangeLog	2014-04-13 01:50:18 UTC (rev 167191)
+++ trunk/LayoutTests/ChangeLog	2014-04-13 08:05:57 UTC (rev 167192)
@@ -1,3 +1,12 @@
+2014-04-13  Darin Adler  da...@apple.com
+
+REGRESSION (r166860): ASSERTION FAILED: !isCalculated() on fast/css/image-set-value-not-removed-crash.html
+https://bugs.webkit.org/show_bug.cgi?id=131480
+
+Reviewed by Andreas Kling.
+
+* platform/mac/TestExpectations: Unskip the test now that the assertion is fixed.
+
 2014-04-12  Filip Pizlo  fpi...@apple.com
 
 Make slow-stress tests run faster by running fewer VM variants.


Modified: trunk/LayoutTests/platform/mac/TestExpectations (167191 => 167192)

--- trunk/LayoutTests/platform/mac/TestExpectations	2014-04-13 01:50:18 UTC (rev 167191)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2014-04-13 08:05:57 UTC (rev 167192)
@@ -1352,5 +1352,3 @@
 webkit.org/b/130972 transitions/3d/interrupted-transition.html [ Pass Failure Timeout ]
 
 webkit.org/b/130942 fast/preloader/document-write.html [ Pass Failure ]
-
-webkit.org/b/131480 [ Debug ] fast/css/image-set-value-not-removed-crash.html [ Skip ]


Modified: trunk/Source/WebCore/ChangeLog (167191 => 167192)

--- trunk/Source/WebCore/ChangeLog	2014-04-13 01:50:18 UTC (rev 167191)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 08:05:57 UTC (rev 167192)
@@ -1,3 +1,23 @@
+2014-04-12  Darin Adler  da...@apple.com
+
+REGRESSION (r166860): ASSERTION FAILED: !isCalculated() on fast/css/image-set-value-not-removed-crash.html
+https://bugs.webkit.org/show_bug.cgi?id=131480
+
+Reviewed by Andreas Kling.
+
+Fixes intermittent assertion failure in fast/css/image-set-value-not-removed-crash.html.
+
+* css/CSSComputedStyleDeclaration.cpp:
+(WebCore::valueForImageSliceSide): Added. Helper used below in valueForNinePieceImageSlice.
+Handles calculated values by returning 0; incorrect but predictable.
+(WebCore::valueForNinePieceImageSlice): Updated to call valueForImageSliceSide.
+(WebCore::positionOffsetValue): Use nullptr.
+(WebCore::ComputedStyleExtractor::propertyValue): Updated to call positionOffsetValue
+by its new name. Removed get from the name.
+(WebCore::positionOffsetValue): Renamed from getPositionOffsetValue.
+
+* platform/Length.h: Made isCalculated public.
+
 2014-04-12  Andy Estes  aes...@apple.com
 
 Fix the iOS build after r167183.


Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (167191 => 167192)

--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2014-04-13 01:50:18 UTC (rev 167191)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2014-04-13 08:05:57 UTC (rev 167192)
@@ -447,62 +447,63 @@
 }
 }
 
+static PassRefPtrCSSPrimitiveValue valueForImageSliceSide(const Length length)
+{
+// These values can be percentages, numbers, or while an animation of mixed types is in progress,
+// a calculation that combines a percentage and a number.
+if (length.isPercentNotCalculated())
+return cssValuePool().createValue(length.percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
+if (length.isFixed())
+return cssValuePool().createValue(length.value(), CSSPrimitiveValue::CSS_NUMBER);
+
+// Calculating the actual length currently in use would require most of the code from RenderBoxModelObject::paintNinePieceImage.
+// And even if we could do that, it's not clear if that's exactly what we'd want during animation.
+// FIXME: For now, just return 0.
+ASSERT(length.isCalculated());

[webkit-changes] [167193] trunk

2014-04-13 Thread commit-queue
Title: [167193] trunk








Revision 167193
Author commit-qu...@webkit.org
Date 2014-04-13 02:33:30 -0700 (Sun, 13 Apr 2014)


Log Message
[GStreamer] No CORS support for media elements
https://bugs.webkit.org/show_bug.cgi?id=99037

Patch by Youenn Fablet youenn.fab...@crf.canon.fr on 2014-04-13
Reviewed by Philippe Normand.

Source/WebCore:

Added CORS access control check to media sources when crossorigin attribute is set.

Added getter to CORS access control check status (used to compute whether the stream is tainted or not).
Related test is http/tests/security/video-cross-origin-readback.html.

Disabled access to cross-origin streams that fail CORS check when crossorigin attribute is set.
Related test is http/tests/security/video-cross-origin-accessfailure.html.

Tests: http/tests/security/video-cross-origin-accessfailure.html
   http/tests/security/video-cross-origin-accesssameorigin.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::didPassCORSAccessCheck): Return whether media is cross-origin (tainted) or not by querying the gstreamer source layer.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Added MediaPlayerPrivateGStreamer::didPassCORSAccessCheck declaration.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart): Passed CORS mode parameter to the streaming client. In case of CORS check failure, stop the resource loading.
(webKitSrcPassedCORSAccessCheck): Return whether CORS access control check was done and successful.
(StreamingClient::handleResponseReceived): Take a parameter to assign the CORS access control check result.
(CachedResourceStreamingClient::CachedResourceStreamingClient): Updated setting of the ResourceLoaderOptions according CORS mode.
(CachedResourceStreamingClient::responseReceived): Check CORS and pass result to handleResponseReceived.
(ResourceHandleStreamingClient::didReceiveResponse): No CORS check.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: Added webKitSrcPassedCORSAccessCheck declaration.

LayoutTests:

http/tests/security/video-cross-origin-accessfailure.html verifies that cross-origin streams that fail CORS check
are not played when crossorigin attribute is set.
 http/tests/security/video-cross-origin-accesssameorigin.html verifies that access to same-origin streams
are played when crossorigin attribute is set.

* http/tests/security/video-cross-origin-accessfailure-expected.txt: Added.
* http/tests/security/video-cross-origin-accessfailure.html: Added.
* http/tests/security/video-cross-origin-accesssameorigin-expected.txt: Added.
* http/tests/security/video-cross-origin-accesssameorigin.html: Added.
* platform/efl/TestExpectations: Enabled http/tests/security/video-cross-origin-readback.html.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Disabled http/tests/security/video-cross-origin-accessfailure.html.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/efl/TestExpectations
trunk/LayoutTests/platform/gtk/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h


Added Paths

trunk/LayoutTests/http/tests/security/video-cross-origin-accessfailure-expected.txt
trunk/LayoutTests/http/tests/security/video-cross-origin-accessfailure.html
trunk/LayoutTests/http/tests/security/video-cross-origin-accesssameorigin-expected.txt
trunk/LayoutTests/http/tests/security/video-cross-origin-accesssameorigin.html


Property Changed

trunk/LayoutTests/platform/mac/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (167192 => 167193)

--- trunk/LayoutTests/ChangeLog	2014-04-13 08:05:57 UTC (rev 167192)
+++ trunk/LayoutTests/ChangeLog	2014-04-13 09:33:30 UTC (rev 167193)
@@ -1,3 +1,23 @@
+2014-04-13  Youenn Fablet  youenn.fab...@crf.canon.fr
+
+[GStreamer] No CORS support for media elements
+https://bugs.webkit.org/show_bug.cgi?id=99037
+
+Reviewed by Philippe Normand.
+
+http/tests/security/video-cross-origin-accessfailure.html verifies that cross-origin streams that fail CORS check
+are not played when crossorigin attribute is set.
+ http/tests/security/video-cross-origin-accesssameorigin.html verifies that access to same-origin streams
+are played when crossorigin attribute is set.
+
+* http/tests/security/video-cross-origin-accessfailure-expected.txt: Added.
+* http/tests/security/video-cross-origin-accessfailure.html: Added.
+* http/tests/security/video-cross-origin-accesssameorigin-expected.txt: Added.
+* http/tests/security/video-cross-origin-accesssameorigin.html: 

[webkit-changes] [167194] trunk/Source/WebKit2

2014-04-13 Thread carlosgc
Title: [167194] trunk/Source/WebKit2








Revision 167194
Author carlo...@webkit.org
Date 2014-04-13 02:46:34 -0700 (Sun, 13 Apr 2014)


Log Message
Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (167193 => 167194)

--- trunk/Source/WebKit2/ChangeLog	2014-04-13 09:33:30 UTC (rev 167193)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-13 09:46:34 UTC (rev 167194)
@@ -1,3 +1,10 @@
+2014-04-13  Carlos Garcia Campos  cgar...@igalia.com
+
+Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.
+
+* UIProcess/API/gtk/WebKitWebViewBase.cpp:
+(webkitWebViewBaseCreateWebPage):
+
 2014-04-12  Andy Estes  aes...@apple.com
 
 [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader


Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (167193 => 167194)

--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-04-13 09:33:30 UTC (rev 167193)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp	2014-04-13 09:46:34 UTC (rev 167194)
@@ -993,7 +993,7 @@
 #if HAVE(GTK_SCALE_FACTOR)
 // We attach this here, because changes in scale factor are passed directly to the page proxy.
 priv-pageProxy-setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase)));
-g_signal_connect(object, notify::scale-factor, G_CALLBACK(scaleFactorChanged), NULL);
+g_signal_connect(webkitWebViewBase, notify::scale-factor, G_CALLBACK(scaleFactorChanged), nullptr);
 #endif
 
 webkitWebViewBaseUpdatePreferences(webkitWebViewBase);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [167195] trunk/Source

2014-04-13 Thread commit-queue
Title: [167195] trunk/Source








Revision 167195
Author commit-qu...@webkit.org
Date 2014-04-13 04:23:23 -0700 (Sun, 13 Apr 2014)


Log Message
Unreviewed, rolling out r167168 and r167194.
https://bugs.webkit.org/show_bug.cgi?id=131589

Caused massive ASSERTION failures on the GTK Debug bot
(Requested by philn on #webkit).

Reverted changesets:

[GTK] Add HighDPI support for non-accelerated compositing
contents
https://bugs.webkit.org/show_bug.cgi?id=131562
http://trac.webkit.org/changeset/167168

Source/WebCore:

Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
r167168.
http://trac.webkit.org/changeset/167194

Source/WebKit2:

Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
r167168.
http://trac.webkit.org/changeset/167194

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h
trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp
trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.h
trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp
trunk/Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
trunk/Source/WebKit2/UIProcess/cairo/BackingStoreCairo.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (167194 => 167195)

--- trunk/Source/WebCore/ChangeLog	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 11:23:23 UTC (rev 167195)
@@ -1,3 +1,22 @@
+2014-04-13  Commit Queue  commit-qu...@webkit.org
+
+Unreviewed, rolling out r167168 and r167194.
+https://bugs.webkit.org/show_bug.cgi?id=131589
+
+Caused massive ASSERTION failures on the GTK Debug bot
+(Requested by philn on #webkit).
+
+Reverted changesets:
+
+[GTK] Add HighDPI support for non-accelerated compositing
+contents
+https://bugs.webkit.org/show_bug.cgi?id=131562
+http://trac.webkit.org/changeset/167168
+
+Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
+r167168.
+http://trac.webkit.org/changeset/167194
+
 2014-04-13  Youenn Fablet  youenn.fab...@crf.canon.fr
 
 [GStreamer] No CORS support for media elements


Modified: trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h (167194 => 167195)

--- trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/cairo/WidgetBackingStore.h	2014-04-13 11:23:23 UTC (rev 167195)
@@ -49,17 +49,11 @@
 virtual cairo_surface_t* cairoSurface() = 0;
 virtual void scroll(const IntRect scrollRect, const IntSize scrollOffset) = 0;
 const IntSize size() { return m_size; }
-
-WidgetBackingStore(const IntSize size, float deviceScaleFactor)
-: m_size(size)
-, m_deviceScaleFactor(deviceScaleFactor)
-{ }
-
+WidgetBackingStore(const IntSize size) : m_size(size) { }
 virtual ~WidgetBackingStore() { }
 
-protected:
+private:
 IntSize m_size;
-float m_deviceScaleFactor;
 };
 
 } // namespace WebCore


Modified: trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp (167194 => 167195)

--- trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp	2014-04-13 09:46:34 UTC (rev 167194)
+++ trunk/Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp	2014-04-13 11:23:23 UTC (rev 167195)
@@ -26,10 +26,8 @@
 
 namespace WebCore {
 
-static PassRefPtrcairo_surface_t createSurfaceForBackingStore(PlatformWidget widget, IntSize size, float deviceScaleFactor)
+static PassRefPtrcairo_surface_t createSurfaceForBackingStore(PlatformWidget widget, const IntSize size)
 {
-size.scale(deviceScaleFactor);
-
 #if PLATFORM(GTK)
 return adoptRef(gdk_window_create_similar_surface(gtk_widget_get_window(widget), CAIRO_CONTENT_COLOR_ALPHA, size.width(), size.height()));
 #else
@@ -38,20 +36,20 @@
 #endif
 }
 
-PassOwnPtrWidgetBackingStore WidgetBackingStoreCairo::create(PlatformWidget widget, const IntSize size, float deviceScaleFactor)
+PassOwnPtrWidgetBackingStore WidgetBackingStoreCairo::create(PlatformWidget widget, const IntSize size)
 {
-return adoptPtr(new WidgetBackingStoreCairo(widget, size, deviceScaleFactor));
+return adoptPtr(new WidgetBackingStoreCairo(widget, size));
 }
 
 // We keep two copies of the surface here, which will double the memory usage, but increase
 // scrolling performance since we do not have to keep reallocating a memory region during
 // quick scrolling requests.
-WidgetBackingStoreCairo::WidgetBackingStoreCairo(PlatformWidget widget, const IntSize size, float deviceScaleFactor)
-: WidgetBackingStore(size, deviceScaleFactor)
-, m_surface(createSurfaceForBackingStore(widget, size, deviceScaleFactor))
-, m_scrollSurface(createSurfaceForBackingStore(widget, size, deviceScaleFactor))

[webkit-changes] [167196] trunk/Source/WebCore

2014-04-13 Thread zandobersek
Title: [167196] trunk/Source/WebCore








Revision 167196
Author zandober...@gmail.com
Date 2014-04-13 07:18:48 -0700 (Sun, 13 Apr 2014)


Log Message
Remove unnecessary uses of std::move() in return statements
https://bugs.webkit.org/show_bug.cgi?id=131457

Reviewed by Darin Adler.

Don't use std::move() in return statements unless necessary as it inhibits
named return value optimizations as performed by compilers.

* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::create):
* html/FormController.cpp:
(WebCore::FormController::createSavedFormStateMap):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* platform/RemoteCommandListener.cpp:
(WebCore::RemoteCommandListener::create):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
* platform/ios/RemoteCommandListenerIOS.mm:
(WebCore::RemoteCommandListener::create):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFilters):
* rendering/style/CounterDirectives.cpp:
(WebCore::clone):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/battery/BatteryManager.cpp
trunk/Source/WebCore/html/FormController.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
trunk/Source/WebCore/platform/RemoteCommandListener.cpp
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
trunk/Source/WebCore/platform/ios/RemoteCommandListenerIOS.mm
trunk/Source/WebCore/rendering/RenderGrid.cpp
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/style/CounterDirectives.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (167195 => 167196)

--- trunk/Source/WebCore/ChangeLog	2014-04-13 11:23:23 UTC (rev 167195)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 14:18:48 UTC (rev 167196)
@@ -1,3 +1,32 @@
+2014-04-13  Zan Dobersek  zdober...@igalia.com
+
+Remove unnecessary uses of std::move() in return statements
+https://bugs.webkit.org/show_bug.cgi?id=131457
+
+Reviewed by Darin Adler.
+
+Don't use std::move() in return statements unless necessary as it inhibits
+named return value optimizations as performed by compilers.
+
+* Modules/battery/BatteryManager.cpp:
+(WebCore::BatteryManager::create):
+* html/FormController.cpp:
+(WebCore::FormController::createSavedFormStateMap):
+* html/canvas/WebGLRenderingContext.cpp:
+(WebCore::WebGLRenderingContext::create):
+* platform/RemoteCommandListener.cpp:
+(WebCore::RemoteCommandListener::create):
+* platform/graphics/ca/GraphicsLayerCA.cpp:
+(WebCore::GraphicsLayer::create):
+* platform/ios/RemoteCommandListenerIOS.mm:
+(WebCore::RemoteCommandListener::create):
+* rendering/RenderGrid.cpp:
+(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
+* rendering/RenderLayer.cpp:
+(WebCore::RenderLayer::setupFilters):
+* rendering/style/CounterDirectives.cpp:
+(WebCore::clone):
+
 2014-04-13  Commit Queue  commit-qu...@webkit.org
 
 Unreviewed, rolling out r167168 and r167194.


Modified: trunk/Source/WebCore/Modules/battery/BatteryManager.cpp (167195 => 167196)

--- trunk/Source/WebCore/Modules/battery/BatteryManager.cpp	2014-04-13 11:23:23 UTC (rev 167195)
+++ trunk/Source/WebCore/Modules/battery/BatteryManager.cpp	2014-04-13 14:18:48 UTC (rev 167196)
@@ -36,7 +36,7 @@
 {
 auto batteryManager = adoptRef(*new BatteryManager(navigator));
 batteryManager.get().suspendIfNeeded();
-return std::move(batteryManager);
+return batteryManager;
 }
 
 BatteryManager::~BatteryManager()


Modified: trunk/Source/WebCore/html/FormController.cpp (167195 => 167196)

--- trunk/Source/WebCore/html/FormController.cpp	2014-04-13 11:23:23 UTC (rev 167195)
+++ trunk/Source/WebCore/html/FormController.cpp	2014-04-13 14:18:48 UTC (rev 167196)
@@ -407,7 +407,7 @@
 formState = std::make_uniqueSavedFormState();
 formState-appendControlState(control-name(), control-type(), control-saveFormControlState());
 }
-return std::move(stateMap);
+return stateMap;
 }
 
 VectorString FormController::formElementsState() const


Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (167195 => 167196)

--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2014-04-13 11:23:23 UTC (rev 167195)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2014-04-13 14:18:48 UTC (rev 167196)
@@ -439,7 +439,7 @@
 LOG(WebGL, Create a WebGL context that looks real, but will require a policy resolution if used.);
 std::unique_ptrWebGLRenderingContext renderingContext(new WebGLRenderingContext(canvas, attributes));
 renderingContext-suspendIfNeeded();
-return std::move(renderingContext);
+return renderingContext;
 }
 
 HostWindow* hostWindow = 

[webkit-changes] [167197] trunk/Source/WebCore

2014-04-13 Thread zandobersek
Title: [167197] trunk/Source/WebCore








Revision 167197
Author zandober...@gmail.com
Date 2014-04-13 07:59:41 -0700 (Sun, 13 Apr 2014)


Log Message
Unreviewed build fix after r167196.

* platform/RemoteCommandListener.cpp:
(WebCore::RemoteCommandListener::create): Fall back to using the new operator
for allocating RemoteCommandListener object. Using std::make_unique() requires
for the operator to be public, which doesn't work well with the static create()
method.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/RemoteCommandListener.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (167196 => 167197)

--- trunk/Source/WebCore/ChangeLog	2014-04-13 14:18:48 UTC (rev 167196)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 14:59:41 UTC (rev 167197)
@@ -1,5 +1,15 @@
 2014-04-13  Zan Dobersek  zdober...@igalia.com
 
+Unreviewed build fix after r167196.
+
+* platform/RemoteCommandListener.cpp:
+(WebCore::RemoteCommandListener::create): Fall back to using the new operator
+for allocating RemoteCommandListener object. Using std::make_unique() requires
+for the operator to be public, which doesn't work well with the static create()
+method.
+
+2014-04-13  Zan Dobersek  zdober...@igalia.com
+
 Remove unnecessary uses of std::move() in return statements
 https://bugs.webkit.org/show_bug.cgi?id=131457
 


Modified: trunk/Source/WebCore/platform/RemoteCommandListener.cpp (167196 => 167197)

--- trunk/Source/WebCore/platform/RemoteCommandListener.cpp	2014-04-13 14:18:48 UTC (rev 167196)
+++ trunk/Source/WebCore/platform/RemoteCommandListener.cpp	2014-04-13 14:59:41 UTC (rev 167197)
@@ -31,7 +31,7 @@
 #if !PLATFORM(IOS)
 std::unique_ptrRemoteCommandListener RemoteCommandListener::create(RemoteCommandListenerClient client)
 {
-return std::make_uniqueRemoteCommandListener(client);
+return std::unique_ptrRemoteCommandListener(new RemoteCommandListener(client));
 }
 #endif
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [167198] trunk/Source/WebCore

2014-04-13 Thread simon . fraser
Title: [167198] trunk/Source/WebCore








Revision 167198
Author simon.fra...@apple.com
Date 2014-04-13 09:41:29 -0700 (Sun, 13 Apr 2014)


Log Message
[iOS WK2] Hook up scrolling tree nodes when coming out of the page cache
https://bugs.webkit.org/show_bug.cgi?id=131577

Reviewed by Tim Horton.

The call to scrollingCoordinator-frameViewRootLayerDidChange() was inside
a #if !PLATFORM(IOS) block, but now that we use the ScrollingCoordinator
for WK2 we want to call this.

* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/HistoryController.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (167197 => 167198)

--- trunk/Source/WebCore/ChangeLog	2014-04-13 14:59:41 UTC (rev 167197)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 16:41:29 UTC (rev 167198)
@@ -1,3 +1,17 @@
+2014-04-13  Simon Fraser  simon.fra...@apple.com
+
+[iOS WK2] Hook up scrolling tree nodes when coming out of the page cache
+https://bugs.webkit.org/show_bug.cgi?id=131577
+
+Reviewed by Tim Horton.
+
+The call to scrollingCoordinator-frameViewRootLayerDidChange() was inside
+a #if !PLATFORM(IOS) block, but now that we use the ScrollingCoordinator
+for WK2 we want to call this.
+
+* loader/HistoryController.cpp:
+(WebCore::HistoryController::restoreScrollPositionAndViewState):
+
 2014-04-13  Zan Dobersek  zdober...@igalia.com
 
 Unreviewed build fix after r167196.


Modified: trunk/Source/WebCore/loader/HistoryController.cpp (167197 => 167198)

--- trunk/Source/WebCore/loader/HistoryController.cpp	2014-04-13 14:59:41 UTC (rev 167197)
+++ trunk/Source/WebCore/loader/HistoryController.cpp	2014-04-13 16:41:29 UTC (rev 167198)
@@ -126,8 +126,6 @@
 // through to the client. It's currently used only for the PDF view on Mac.
 m_frame.loader().client().restoreViewState();
 
-// Don't restore scroll point on iOS as FrameLoaderClient::restoreViewState() does that.
-#if !PLATFORM(IOS)
 // FIXME: There is some scrolling related work that needs to happen whenever a page goes into the
 // page cache and similar work that needs to occur when it comes out. This is where we do the work
 // that needs to happen when we exit, and the work that needs to happen when we enter is in
@@ -140,14 +138,16 @@
 scrollingCoordinator-frameViewRootLayerDidChange(view);
 }
 
+#if !PLATFORM(IOS)
+// Don't restore scroll point on iOS as FrameLoaderClient::restoreViewState() does that.
 if (!view-wasScrolledByUser()) {
 if (page  m_frame.isMainFrame()  m_currentItem-pageScaleFactor())
 page-setPageScaleFactor(m_currentItem-pageScaleFactor(), m_currentItem-scrollPoint());
 else
 view-setScrollPosition(m_currentItem-scrollPoint());
 }
+#endif
 }
-#endif
 }
 
 void HistoryController::updateBackForwardListForFragmentScroll()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [167200] trunk/Source/WebCore

2014-04-13 Thread psolanki
Title: [167200] trunk/Source/WebCore








Revision 167200
Author psola...@apple.com
Date 2014-04-13 12:20:11 -0700 (Sun, 13 Apr 2014)


Log Message
Move early return out of dispatch_async() block so we can return from willSendRequest quickly
https://bugs.webkit.org/show_bug.cgi?id=131478
rdar://problem/16575535

Reviewed by Alexey Proskuryakov.

Do a quick check to see if we need to synthesize the redirect response on the dispatch queue
and return from willSendRequest callback quickly instead of always doing an effectively synchronous
call to the main thread. We can't call synthesizeRedirectResponseIfNecessary on the dispatch
queue since that accesses the ResourceRequest.

No new tests because no change in functionality.

* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest): Save the
request scheme to use later for early return from willSendRequest.
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (167199 => 167200)

--- trunk/Source/WebCore/ChangeLog	2014-04-13 18:01:54 UTC (rev 167199)
+++ trunk/Source/WebCore/ChangeLog	2014-04-13 19:20:11 UTC (rev 167200)
@@ -1,3 +1,24 @@
+2014-04-10  Pratik Solanki  psola...@apple.com
+
+Move early return out of dispatch_async() block so we can return from willSendRequest quickly
+https://bugs.webkit.org/show_bug.cgi?id=131478
+rdar://problem/16575535
+
+Reviewed by Alexey Proskuryakov.
+
+Do a quick check to see if we need to synthesize the redirect response on the dispatch queue
+and return from willSendRequest callback quickly instead of always doing an effectively synchronous
+call to the main thread. We can't call synthesizeRedirectResponseIfNecessary on the dispatch
+queue since that accesses the ResourceRequest.
+
+No new tests because no change in functionality.
+
+* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
+* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
+(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest): Save the
+request scheme to use later for early return from willSendRequest.
+(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
+
 2014-04-08  Oliver Hunt  oli...@apple.com
 
 Rewrite Function.bind as a builtin


Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h (167199 => 167200)

--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h	2014-04-13 18:01:54 UTC (rev 167199)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegate.h	2014-04-13 19:20:11 UTC (rev 167200)
@@ -94,6 +94,7 @@
 
 protected:
 ResourceHandle* m_handle;
+RetainPtrCFStringRef m_originalScheme;
 };
 
 } // namespace WebCore.


Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp (167199 => 167200)

--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp	2014-04-13 18:01:54 UTC (rev 167199)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp	2014-04-13 19:20:11 UTC (rev 167200)
@@ -62,8 +62,12 @@
 return !!m_handle;
 }
 
-void ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest(CFMutableURLRequestRef)
+void ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest(CFMutableURLRequestRef request)
 {
+CFURLRef requestURL = CFURLRequestGetURL(request);
+if (!requestURL)
+return;
+m_originalScheme = adoptCF(CFURLCopyScheme(requestURL));
 }
 
 void ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling(CFURLConnectionRef connection)
@@ -73,6 +77,15 @@
 
 CFURLRequestRef ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest(CFURLRequestRef cfRequest, CFURLResponseRef originalRedirectResponse)
 {
+// If the protocols of the new request and the current request match, this is not an HSTS redirect and we don't need to synthesize a redirect response.
+if (!originalRedirectResponse) {
+RetainPtrCFStringRef newScheme = adoptCF(CFURLCopyScheme(CFURLRequestGetURL(cfRequest)));
+if (CFStringCompare(newScheme.get(), m_originalScheme.get(), kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
+CFRetain(cfRequest);
+return cfRequest;
+}
+}
+
 

[webkit-changes] [167201] trunk/Source/WebKit2

2014-04-13 Thread psolanki
Title: [167201] trunk/Source/WebKit2








Revision 167201
Author psola...@apple.com
Date 2014-04-13 12:23:43 -0700 (Sun, 13 Apr 2014)


Log Message
Don't use ImportanceAssertion on iOS
https://bugs.webkit.org/show_bug.cgi?id=131481
rdar://problem/16575830

Reviewed by Darin Adler.

We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.

* Platform/IPC/MessageDecoder.cpp:
* Platform/IPC/MessageDecoder.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/mac/ImportanceAssertion.h:

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp
trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h
trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp
trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h




Diff

Modified: trunk/Source/WebKit2/ChangeLog (167200 => 167201)

--- trunk/Source/WebKit2/ChangeLog	2014-04-13 19:20:11 UTC (rev 167200)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-13 19:23:43 UTC (rev 167201)
@@ -1,3 +1,19 @@
+2014-04-13  Pratik Solanki  psola...@apple.com
+
+Don't use ImportanceAssertion on iOS
+https://bugs.webkit.org/show_bug.cgi?id=131481
+rdar://problem/16575830
+
+Reviewed by Darin Adler.
+
+We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.
+
+* Platform/IPC/MessageDecoder.cpp:
+* Platform/IPC/MessageDecoder.h:
+* Platform/IPC/mac/ConnectionMac.cpp:
+(IPC::Connection::receiveSourceEventHandler):
+* Platform/IPC/mac/ImportanceAssertion.h:
+
 2014-04-13  Commit Queue  commit-qu...@webkit.org
 
 Unreviewed, rolling out r167168 and r167194.


Modified: trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp (167200 => 167201)

--- trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp	2014-04-13 19:20:11 UTC (rev 167200)
+++ trunk/Source/WebKit2/Platform/IPC/MessageDecoder.cpp	2014-04-13 19:23:43 UTC (rev 167201)
@@ -31,7 +31,7 @@
 #include MessageFlags.h
 #include StringReference.h
 
-#if PLATFORM(IOS) || PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#if PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 #include ImportanceAssertion.h
 #endif
 
@@ -66,7 +66,7 @@
 return m_messageFlags  DispatchMessageWhenWaitingForSyncReply;
 }
 
-#if PLATFORM(IOS) || PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#if PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 void MessageDecoder::setImportanceAssertion(std::unique_ptrImportanceAssertion assertion)
 {
 m_importanceAssertion = std::move(assertion);


Modified: trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h (167200 => 167201)

--- trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h	2014-04-13 19:20:11 UTC (rev 167200)
+++ trunk/Source/WebKit2/Platform/IPC/MessageDecoder.h	2014-04-13 19:23:43 UTC (rev 167201)
@@ -46,7 +46,7 @@
 bool isSyncMessage() const;
 bool shouldDispatchMessageWhenWaitingForSyncReply() const;
 
-#if PLATFORM(IOS) || PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#if PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 void setImportanceAssertion(std::unique_ptrImportanceAssertion);
 #endif
 
@@ -57,7 +57,7 @@
 
 uint64_t m_destinationID;
 
-#if PLATFORM(IOS) || PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#if PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 std::unique_ptrImportanceAssertion m_importanceAssertion;
 #endif
 };


Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp (167200 => 167201)

--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp	2014-04-13 19:20:11 UTC (rev 167200)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp	2014-04-13 19:23:43 UTC (rev 167201)
@@ -416,7 +416,7 @@
 std::unique_ptrMessageDecoder decoder = createMessageDecoder(header);
 ASSERT(decoder);
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#if PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 decoder-setImportanceAssertion(std::make_uniqueImportanceAssertion(header));
 #endif
 


Modified: trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h (167200 => 167201)

--- trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h	2014-04-13 19:20:11 UTC (rev 167200)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h	2014-04-13 19:23:43 UTC (rev 167201)
@@ -26,7 +26,7 @@
 #ifndef ImportanceAssertion_h
 #define ImportanceAssertion_h
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#if PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 
 #if __has_include(libproc_internal.h)
 #include libproc_internal.h
@@ -58,6 +58,6 @@
 
 }
 
-#endif // PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
+#endif // PLATFORM(MAC)  __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
 
 #endif // ImportanceAssertion_h






___
webkit-changes mailing list
webkit-changes@lists.webkit.org

[webkit-changes] [167202] trunk/Source/WebKit2

2014-04-13 Thread aestes
Title: [167202] trunk/Source/WebKit2








Revision 167202
Author aes...@apple.com
Date 2014-04-13 13:02:13 -0700 (Sun, 13 Apr 2014)


Log Message
REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
https://bugs.webkit.org/show_bug.cgi?id=131595

Reviewed by Dan Bernstein.

Make a copy of completionHandler and release it after we're done with it.

* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (167201 => 167202)

--- trunk/Source/WebKit2/ChangeLog	2014-04-13 19:23:43 UTC (rev 167201)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-13 20:02:13 UTC (rev 167202)
@@ -1,3 +1,15 @@
+2014-04-13  Andy Estes  aes...@apple.com
+
+REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
+https://bugs.webkit.org/show_bug.cgi?id=131595
+
+Reviewed by Dan Bernstein.
+
+Make a copy of completionHandler and release it after we're done with it.
+
+* Shared/mac/CookieStorageShim.mm:
+(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
+
 2014-04-13  Pratik Solanki  psola...@apple.com
 
 Don't use ImportanceAssertion on iOS


Modified: trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm (167201 => 167202)

--- trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm	2014-04-13 19:23:43 UTC (rev 167201)
+++ trunk/Source/WebKit2/Shared/mac/CookieStorageShim.mm	2014-04-13 20:02:13 UTC (rev 167202)
@@ -116,14 +116,17 @@
 }
 
 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED = 1090
-- (void)_getCookieHeadersForTask:(NSURLSessionTask*)task completionHandler:(void (^)(CFDictionaryRef))completionHandler
+using CompletionHandlerBlock = void(^)(CFDictionaryRef);
+- (void)_getCookieHeadersForTask:(NSURLSessionTask*)task completionHandler:(CompletionHandlerBlock)completionHandler
 {
 if (!completionHandler)
 return;
 
 RetainPtrNSURLSessionTask strongTask = task;
-RunLoop::main().dispatch([strongTask, completionHandler]{
-completionHandler(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL(nullptr, (CFURLRef)[[strongTask currentRequest] URL]));
+CompletionHandlerBlock completionHandlerCopy = [completionHandler copy];
+RunLoop::main().dispatch([strongTask, completionHandlerCopy]{
+completionHandlerCopy(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL(nullptr, (CFURLRef)[[strongTask currentRequest] URL]));
+[completionHandlerCopy release];
 });
 }
 #endif






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [167203] trunk/PerformanceTests

2014-04-13 Thread ggaren
Title: [167203] trunk/PerformanceTests








Revision 167203
Author gga...@apple.com
Date 2014-04-13 16:21:20 -0700 (Sun, 13 Apr 2014)


Log Message
MallocBench record/replay should support realloc
https://bugs.webkit.org/show_bug.cgi?id=131598

Reviewed by Ryosuke Niwa.

* MallocBench/MallocBench.xcodeproj/project.pbxproj: Fixed some linkage
issues that caused us not to fully link to system malloc in the default
case. Also marked mbmalloc.dylib as required so the error message will
be clearer if we mess up.

* MallocBench/MallocBench/Interpreter.cpp:
(Interpreter::run):
* MallocBench/MallocBench/Interpreter.h: Added the realloc case, and
upgraded one-letter names to full words.

Modified Paths

trunk/PerformanceTests/ChangeLog
trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp
trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h
trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj




Diff

Modified: trunk/PerformanceTests/ChangeLog (167202 => 167203)

--- trunk/PerformanceTests/ChangeLog	2014-04-13 20:02:13 UTC (rev 167202)
+++ trunk/PerformanceTests/ChangeLog	2014-04-13 23:21:20 UTC (rev 167203)
@@ -1,3 +1,20 @@
+2014-04-13  Geoffrey Garen  gga...@apple.com
+
+MallocBench record/replay should support realloc
+https://bugs.webkit.org/show_bug.cgi?id=131598
+
+Reviewed by Ryosuke Niwa.
+
+* MallocBench/MallocBench.xcodeproj/project.pbxproj: Fixed some linkage
+issues that caused us not to fully link to system malloc in the default
+case. Also marked mbmalloc.dylib as required so the error message will
+be clearer if we mess up.
+
+* MallocBench/MallocBench/Interpreter.cpp:
+(Interpreter::run):
+* MallocBench/MallocBench/Interpreter.h: Added the realloc case, and
+upgraded one-letter names to full words.
+
 2014-04-11  Dirk Schulze  k...@webkit.org
 
 Optimize Canvas fill and drawImage with SourceIn, DestinationIn, SourceOut, and DestinationAtop using transparencyLayer.


Modified: trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp (167202 => 167203)

--- trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp	2014-04-13 20:02:13 UTC (rev 167202)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp	2014-04-13 23:21:20 UTC (rev 167203)
@@ -93,19 +93,25 @@
 for (size_t i = 0; i  opCount; ++i) {
 Op op = ops[i];
 switch (op.opcode) {
-case op_a: {
+case op_malloc: {
 m_objects[op.slot] = { mbmalloc(op.size), op.size };
 assert(m_objects[op.slot].object);
 bzero(m_objects[op.slot].object, op.size);
 break;
 }
-case op_d: {
+case op_free: {
 assert(m_objects[op.slot].object);
 assert(m_objects[op.slot].size);
 mbfree(m_objects[op.slot].object, m_objects[op.slot].size);
 m_objects[op.slot] = { 0, 0 };
 break;
 }
+case op_realloc: {
+assert(m_objects[op.slot].object);
+assert(m_objects[op.slot].size);
+m_objects[op.slot] = { mbrealloc(m_objects[op.slot].object, m_objects[op.slot].size, op.size), op.size };
+break;
+}
 default: {
 fprintf(stderr, bad opcode: %d\n, op.opcode);
 abort();


Modified: trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h (167202 => 167203)

--- trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h	2014-04-13 20:02:13 UTC (rev 167202)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h	2014-04-13 23:21:20 UTC (rev 167203)
@@ -36,7 +36,7 @@
 void run();
 
 private:
-enum Opcode { op_a, op_d };
+enum Opcode { op_malloc, op_free, op_realloc };
 struct Op { Opcode opcode; size_t slot; size_t size; };
 struct Record { void* object; size_t size; };
 


Modified: trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj (167202 => 167203)

--- trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj	2014-04-13 20:02:13 UTC (rev 167202)
+++ trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj	2014-04-13 23:21:20 UTC (rev 167203)
@@ -13,6 +13,7 @@
 		1444AE96177E8DF200F8030A /* message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1444AE94177E8DF200F8030A /* message.cpp */; };
 		14452CB0177D24460097E057 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14452CAF177D24460097E057 /* main.cpp */; };
 		14452CEF177D47110097E057 /* churn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14452CED177D47110097E057 /* churn.cpp */; };
+		1447AE8418FB4B2400B3D7FF /* libSystem.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1447AE8318FB4B2400B3D7FF /* libSystem.dylib */; };
 		1451FAED18B14B7100DB6D47 /* medium.cpp in Sources */ = {isa = 

[webkit-changes] [167204] trunk/Source/bmalloc

2014-04-13 Thread ggaren
Title: [167204] trunk/Source/bmalloc








Revision 167204
Author gga...@apple.com
Date 2014-04-13 16:28:59 -0700 (Sun, 13 Apr 2014)


Log Message
Fixed some mbmalloc exports
https://bugs.webkit.org/show_bug.cgi?id=131599

Reviewed by Ryosuke Niwa.

* bmalloc.xcodeproj/project.pbxproj: Made some headers a private part
of the project, so we can call them from API.

* bmalloc/mbmalloc.cpp: Marked the mbmalloc functions with default
visibility, so they show up as exported in the .dylib.

Modified Paths

trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc/mbmalloc.cpp
trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj




Diff

Modified: trunk/Source/bmalloc/ChangeLog (167203 => 167204)

--- trunk/Source/bmalloc/ChangeLog	2014-04-13 23:21:20 UTC (rev 167203)
+++ trunk/Source/bmalloc/ChangeLog	2014-04-13 23:28:59 UTC (rev 167204)
@@ -1,3 +1,16 @@
+2014-04-13  Geoffrey Garen  gga...@apple.com
+
+Fixed some mbmalloc exports
+https://bugs.webkit.org/show_bug.cgi?id=131599
+
+Reviewed by Ryosuke Niwa.
+
+* bmalloc.xcodeproj/project.pbxproj: Made some headers a private part
+of the project, so we can call them from API.
+
+* bmalloc/mbmalloc.cpp: Marked the mbmalloc functions with default
+visibility, so they show up as exported in the .dylib.
+
 2014-04-09  Geoffrey Garen  gga...@apple.com
 
 Put bmalloc headers in the right place


Modified: trunk/Source/bmalloc/bmalloc/mbmalloc.cpp (167203 => 167204)

--- trunk/Source/bmalloc/bmalloc/mbmalloc.cpp	2014-04-13 23:21:20 UTC (rev 167203)
+++ trunk/Source/bmalloc/bmalloc/mbmalloc.cpp	2014-04-13 23:28:59 UTC (rev 167204)
@@ -25,11 +25,13 @@
 
 #include bmalloc.h
 
+#define EXPORT __attribute__((visibility(default)))
+
 extern C {
 
-void* mbmalloc(size_t);
-void mbfree(void*, size_t);
-void* mbrealloc(void*, size_t, size_t);
+EXPORT void* mbmalloc(size_t);
+EXPORT void mbfree(void*, size_t);
+EXPORT void* mbrealloc(void*, size_t, size_t);
 
 void* mbmalloc(size_t size)
 {


Modified: trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj (167203 => 167204)

--- trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj	2014-04-13 23:21:20 UTC (rev 167203)
+++ trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj	2014-04-13 23:28:59 UTC (rev 167204)
@@ -7,6 +7,10 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		1400274918F89C1300115C97 /* Heap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DA320C18875B09007269E0 /* Heap.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1400274A18F89C2300115C97 /* VMHeap.h in Headers */ = {isa = PBXBuildFile; fileRef = 144F7BFC18BFC517003537F3 /* VMHeap.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1400274B18F89C3D00115C97 /* BoundaryTagInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 14105E7B18DBD7AF003A106E /* BoundaryTagInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1400274C18F89C3D00115C97 /* SegregatedFreeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 146BEE1E18C841C50002D5A2 /* SegregatedFreeList.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1448C30018F3754600502839 /* mbmalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1448C2FF18F3754300502839 /* mbmalloc.cpp */; };
 		1448C30118F3754C00502839 /* bmalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 1448C2FE18F3754300502839 /* bmalloc.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14CC394C18EA8858004AFE34 /* libbmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14F271BE18EA3963008C152F /* libbmalloc.a */; };
@@ -294,6 +298,7 @@
 14DD78B918F48D6B00950702 /* MediumTraits.h in Headers */,
 1448C30118F3754C00502839 /* bmalloc.h in Headers */,
 14DD789A18F48D4A00950702 /* Deallocator.h in Headers */,
+1400274C18F89C3D00115C97 /* SegregatedFreeList.h in Headers */,
 14DD788D18F48CC600950702 /* BeginTag.h in Headers */,
 14DD78CD18F48D7500950702 /* Range.h in Headers */,
 14DD789C18F48D4A00950702 /* SmallAllocator.h in Headers */,
@@ -308,9 +313,12 @@
 14DD78BA18F48D6B00950702 /* Page.h in Headers */,
 14DD78BB18F48D6B00950702 /* SmallChunk.h in Headers */,
 14DD78C918F48D7500950702 /* Inline.h in Headers */,
+1400274A18F89C2300115C97 /* VMHeap.h in Headers */,
+1400274918F89C1300115C97 /* Heap.h in Headers */,
 14DD78B818F48D6B00950702 /* MediumPage.h in Headers */,
 14DD78C518F48D7500950702 /* Algorithm.h in Headers */,
 14DD78BD18F48D6B00950702 /* SmallPage.h in Headers */,
+1400274B18F89C3D00115C97 /* BoundaryTagInlines.h in Headers */,
 14DD788E18F48CCD00950702 /* BoundaryTag.h in Headers */,
 14DD78C818F48D7500950702 /* FixedVector.h in Headers */,
 14DD78B718F48D6B00950702 /* MediumLine.h in Headers */,






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [167205] trunk/PerformanceTests

2014-04-13 Thread ggaren
Title: [167205] trunk/PerformanceTests








Revision 167205
Author gga...@apple.com
Date 2014-04-13 17:02:08 -0700 (Sun, 13 Apr 2014)


Log Message
Added some website recordings to MallocBench -- taken from Membuster
https://bugs.webkit.org/show_bug.cgi?id=131601

Reviewed by Ryosuke Niwa.

Added flickr, reddit, and theverge -- each recorded from Membuster's
cache, with and without sending Safari a low memory warning.

* MallocBench/MallocBench.xcodeproj/project.pbxproj:
* MallocBench/MallocBench/Benchmark.cpp:
* MallocBench/MallocBench/flickr.cpp: Added.
(benchmark_flickr):
(benchmark_flickr_memory_warning):
* MallocBench/MallocBench/flickr.h: Added.
* MallocBench/MallocBench/flickr.ops: Added.
* MallocBench/MallocBench/flickr_memory_warning.ops: Added.
* MallocBench/MallocBench/reddit.cpp: Added.
(benchmark_reddit):
(benchmark_reddit_memory_warning):
* MallocBench/MallocBench/reddit.h: Added.
* MallocBench/MallocBench/reddit.ops: Added.
* MallocBench/MallocBench/reddit_memory_warning.ops: Added.
* MallocBench/MallocBench/theverge.cpp: Added.
(benchmark_theverge):
(benchmark_theverge_memory_warning):
* MallocBench/MallocBench/theverge.h: Added.
* MallocBench/MallocBench/theverge.ops: Added.
* MallocBench/MallocBench/theverge_memory_warning.ops: Added.

Modified Paths

trunk/PerformanceTests/ChangeLog
trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp
trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj


Added Paths

trunk/PerformanceTests/MallocBench/MallocBench/flickr.cpp
trunk/PerformanceTests/MallocBench/MallocBench/flickr.h
trunk/PerformanceTests/MallocBench/MallocBench/flickr.ops
trunk/PerformanceTests/MallocBench/MallocBench/flickr_memory_warning.ops
trunk/PerformanceTests/MallocBench/MallocBench/reddit.cpp
trunk/PerformanceTests/MallocBench/MallocBench/reddit.h
trunk/PerformanceTests/MallocBench/MallocBench/reddit.ops
trunk/PerformanceTests/MallocBench/MallocBench/reddit_memory_warning.ops
trunk/PerformanceTests/MallocBench/MallocBench/theverge.cpp
trunk/PerformanceTests/MallocBench/MallocBench/theverge.h
trunk/PerformanceTests/MallocBench/MallocBench/theverge.ops
trunk/PerformanceTests/MallocBench/MallocBench/theverge_memory_warning.ops




Diff

Modified: trunk/PerformanceTests/ChangeLog (167204 => 167205)

--- trunk/PerformanceTests/ChangeLog	2014-04-13 23:28:59 UTC (rev 167204)
+++ trunk/PerformanceTests/ChangeLog	2014-04-14 00:02:08 UTC (rev 167205)
@@ -1,5 +1,36 @@
 2014-04-13  Geoffrey Garen  gga...@apple.com
 
+Added some website recordings to MallocBench -- taken from Membuster
+https://bugs.webkit.org/show_bug.cgi?id=131601
+
+Reviewed by Ryosuke Niwa.
+
+Added flickr, reddit, and theverge -- each recorded from Membuster's
+cache, with and without sending Safari a low memory warning.
+
+* MallocBench/MallocBench.xcodeproj/project.pbxproj:
+* MallocBench/MallocBench/Benchmark.cpp:
+* MallocBench/MallocBench/flickr.cpp: Added.
+(benchmark_flickr):
+(benchmark_flickr_memory_warning):
+* MallocBench/MallocBench/flickr.h: Added.
+* MallocBench/MallocBench/flickr.ops: Added.
+* MallocBench/MallocBench/flickr_memory_warning.ops: Added.
+* MallocBench/MallocBench/reddit.cpp: Added.
+(benchmark_reddit):
+(benchmark_reddit_memory_warning):
+* MallocBench/MallocBench/reddit.h: Added.
+* MallocBench/MallocBench/reddit.ops: Added.
+* MallocBench/MallocBench/reddit_memory_warning.ops: Added.
+* MallocBench/MallocBench/theverge.cpp: Added.
+(benchmark_theverge):
+(benchmark_theverge_memory_warning):
+* MallocBench/MallocBench/theverge.h: Added.
+* MallocBench/MallocBench/theverge.ops: Added.
+* MallocBench/MallocBench/theverge_memory_warning.ops: Added.
+
+2014-04-13  Geoffrey Garen  gga...@apple.com
+
 MallocBench record/replay should support realloc
 https://bugs.webkit.org/show_bug.cgi?id=131598
 


Modified: trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp (167204 => 167205)

--- trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp	2014-04-13 23:28:59 UTC (rev 167204)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp	2014-04-14 00:02:08 UTC (rev 167205)
@@ -29,10 +29,13 @@
 #include big.h
 #include churn.h
 #include facebook.h
+#include flickr.h
 #include fragment.h
 #include list.h
 #include medium.h
 #include message.h
+#include reddit.h
+#include theverge.h
 #include tree.h
 #include dispatch/dispatch.h
 #include iostream
@@ -68,6 +71,12 @@
 { big, benchmark_big },
 { facebook, benchmark_facebook },
 { balloon, benchmark_balloon },
+{ flickr, benchmark_flickr },
+{ reddit, benchmark_reddit },
+{ theverge, benchmark_theverge },
+{ flickr_memory_warning, benchmark_flickr_memory_warning },
+{ reddit_memory_warning, benchmark_reddit_memory_warning },
+{ theverge_memory_warning, 

[webkit-changes] [167206] trunk/Source/WTF

2014-04-13 Thread aestes
Title: [167206] trunk/Source/WTF








Revision 167206
Author aes...@apple.com
Date 2014-04-13 18:35:27 -0700 (Sun, 13 Apr 2014)


Log Message
Relax adoption requirements of RefCounted objects that are NeverDestroyed
https://bugs.webkit.org/show_bug.cgi?id=131593

Reviewed by Dan Bernstein.

RefCounted objects that are created by NeverDestroyed won't have a
RefPtr adopting them, so call relaxAdoptionRequirements().

* wtf/NeverDestroyed.h:
(WTF::NeverDestroyed::NeverDestroyed):
(WTF::NeverDestroyed::MaybeRelax::MaybeRelax):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/NeverDestroyed.h




Diff

Modified: trunk/Source/WTF/ChangeLog (167205 => 167206)

--- trunk/Source/WTF/ChangeLog	2014-04-14 00:02:08 UTC (rev 167205)
+++ trunk/Source/WTF/ChangeLog	2014-04-14 01:35:27 UTC (rev 167206)
@@ -1,3 +1,17 @@
+2014-04-13  Andy Estes  aes...@apple.com
+
+Relax adoption requirements of RefCounted objects that are NeverDestroyed
+https://bugs.webkit.org/show_bug.cgi?id=131593
+
+Reviewed by Dan Bernstein.
+
+RefCounted objects that are created by NeverDestroyed won't have a
+RefPtr adopting them, so call relaxAdoptionRequirements().
+
+* wtf/NeverDestroyed.h:
+(WTF::NeverDestroyed::NeverDestroyed):
+(WTF::NeverDestroyed::MaybeRelax::MaybeRelax):
+
 2014-04-10  Brent Fulgham  bfulg...@apple.com
 
 [Win] Clean up some 64-bit warnings from Visual Studio analyzer


Modified: trunk/Source/WTF/wtf/NeverDestroyed.h (167205 => 167206)

--- trunk/Source/WTF/wtf/NeverDestroyed.h	2014-04-14 00:02:08 UTC (rev 167205)
+++ trunk/Source/WTF/wtf/NeverDestroyed.h	2014-04-14 01:35:27 UTC (rev 167206)
@@ -29,6 +29,7 @@
 #include type_traits
 #include utility
 #include wtf/Noncopyable.h
+#include wtf/RefCounted.h
 
 // NeverDestroyed is a smart pointer like class who ensures that the destructor
 // for the given object is never called, but doesn't use the heap to allocate it.
@@ -49,7 +50,7 @@
 templatetypename... Args
 NeverDestroyed(Args... args)
 {
-new (asPtr()) T(std::forwardArgs(args)...);
+MaybeRelaxT(new (asPtr()) T(std::forwardArgs(args)...));
 }
 
 operator T() { return *asPtr(); }
@@ -63,6 +64,13 @@
 // FIXME: Investigate whether we should allocate a hunk of virtual memory
 // and hand out chunks of it to NeverDestroyed instead, to reduce fragmentation.
 typename std::aligned_storagesizeof(T), std::alignment_ofT::value::type m_storage;
+
+template typename PtrType, bool ShouldRelax = std::is_base_ofRefCountedPtrType, PtrType::value struct MaybeRelax {
+explicit MaybeRelax(PtrType*) { }
+};
+template typename PtrType struct MaybeRelaxPtrType, true {
+explicit MaybeRelax(PtrType* ptr) { ptr-relaxAdoptionRequirement(); }
+};
 };
 
 } // namespace WTF;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [167207] trunk/Source

2014-04-13 Thread aestes
Title: [167207] trunk/Source








Revision 167207
Author aes...@apple.com
Date 2014-04-13 19:57:33 -0700 (Sun, 13 Apr 2014)


Log Message
[QuickLook] Move file system-related code into WebKit
https://bugs.webkit.org/show_bug.cgi?id=131597

Reviewed by Dan Bernstein.

Source/WebCore:

QuickLookHandle should not be responsible for saving a copy of the
original document to disk as it might be running in a process that
either can't write to disk or can only write into a sandboxed
container. To account for this, we need to separate the concern of
quick look conversion from that of original document saving so that
each activity can run in the appropriate process.

Created a new interface between WebCore and WebKit by adding a client
(QuickLookHandleClient) to QuickLookHandle which is notified of incoming
bytes. A new function on FrameLoaderClient tells WebKit when a new
QuickLookHandle is created, giving WebKit the opportunity to register a
handle client. Moved the existing file system-related code as well as
code only needed by WebKit1 in QuickLookHandle into a new WebKit1
QuickLookHandleClient subclass.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj: Made QuickLookHandleClient.h Private.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::didCreateQuickLookHandle): Added.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didCreateQuickLookHandle): Called FrameLoaderClient::didCreateQuickLookHandle().
* loader/ResourceLoader.h:
* platform/network/ResourceHandle.h: Made m_quickLook a unique_ptr.
(WebCore::ResourceHandle::setQuickLookHandle): Changed to take a unique_ptr.
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didCreateQuickLookHandle): Added.
* platform/network/ios/QuickLook.h: Added m_client, gave m_converter a stronger type, and made m_nsResponse a RetainPtr.
(WebCore::QuickLookHandle::setClient): Added.
(WebCore::QuickLookHandle::firstRequestURL): Added.
(WebCore::QuickLookHandle::converter): Added.
* platform/network/ios/QuickLook.mm:
(WebCore::registerQLPreviewConverterIfNeeded):
(WebCore::createTemporaryFileForQuickLook): Made non-static.
(WebCore::emptyClient): Returned a shared empty QuickLookHandleClient.
(WebCore::QuickLookHandle::QuickLookHandle): Removed file system and WebKit1-only code.
(WebCore::QuickLookHandle::create): Changed to return a unique_ptr.
(WebCore::QuickLookHandle::nsResponse):
(WebCore::QuickLookHandle::didReceiveDataArray): Removed file system code and called QuickLookHandleClient::didReceiveDataArray() instead.
(WebCore::QuickLookHandle::didReceiveData): Removed file system code and called QuickLookHandleClient::didReceiveData() instead.
(WebCore::QuickLookHandle::didFinishLoading): Removed file system code and called QuickLookHandleClient::didFinishLoading() instead.
(WebCore::QuickLookHandle::didFail): Removed file system and WebKit1-only code, calling QuickLookHandleClient::didFail() instead.
(WebCore::QuickLookHandle::~QuickLookHandle): Removed file system and WebKit1-only code. Cleared our reference to m_client.
(WebCore::QuickLookHandle::previewFileName): Retrieved from m_converter.
(WebCore::QuickLookHandle::previewRequestURL): Ditto.
* platform/network/ios/QuickLookHandleClient.h: Added.
(WebCore::QuickLookHandleClient::~QuickLookHandleClient):
(WebCore::QuickLookHandleClient::didReceiveDataArray):
(WebCore::QuickLookHandleClient::didReceiveData):
(WebCore::QuickLookHandleClient::didFinishLoading):
(WebCore::QuickLookHandleClient::didFail):

Source/WebKit/mac:

Moved file system and WebKit1-only code from QuickLookHandle into a new
QuickLookHandleClient subclass.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit2:

* WebProcess/Network/WebResourceLoader.h: Made m_quickLookHandle a unique_ptr.
* WebProcess/ios/WebResourceLoaderIOS.mm:
(WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.exp.in
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/loader/FrameLoaderClient.h
trunk/Source/WebCore/loader/ResourceLoader.cpp
trunk/Source/WebCore/loader/ResourceLoader.h
trunk/Source/WebCore/platform/network/ResourceHandle.h
trunk/Source/WebCore/platform/network/ResourceHandleClient.h
trunk/Source/WebCore/platform/network/ios/QuickLook.h
trunk/Source/WebCore/platform/network/ios/QuickLook.mm
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h


Added Paths

trunk/Source/WebCore/platform/network/ios/QuickLookHandleClient.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (167206 => 167207)

--- trunk/Source/WebCore/ChangeLog	2014-04-14 01:35:27 UTC (rev 167206)
+++ trunk/Source/WebCore/ChangeLog	2014-04-14 02:57:33 UTC (rev 167207)
@@ -1,3 +1,61 @@
+2014-04-13  Andy Estes  

[webkit-changes] [167208] trunk/Source/WebCore

2014-04-13 Thread darin
Title: [167208] trunk/Source/WebCore








Revision 167208
Author da...@apple.com
Date 2014-04-13 21:28:25 -0700 (Sun, 13 Apr 2014)


Log Message
Use unique_ptr for FillLayer::m_next
https://bugs.webkit.org/show_bug.cgi?id=75222

Reviewed by Dan Bernstein.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFillLayer::applyInheritValue):
Renamed currChild to just child and prevChild to previousChild.
Changed code to pass ownership of the new FillLayer immediately.
Changed some loops to be for loops.
(WebCore::ApplyPropertyFillLayer::applyInitialValue): Ditto.
(WebCore::ApplyPropertyFillLayer::applyValue): Ditto.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::backgroundHasOpaqueTopLayer): Use reference
instead of pointer.
(WebCore::RenderBox::paintFillLayers): Ditto.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.

* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::FillLayer): Removed m_next initializer since it is now an
OwnPtr and initializes automatically. In a couple other places, changed m_next
initializer to use make_unique.
(WebCore::FillLayer::~FillLayer): Wrote loop for deletion of m_next.
(WebCore::FillLayer::operator=): Removed unneeded explicit deletion of m_next.
(WebCore::FillLayer::cullEmptyLayers): Ditto.
(WebCore::clipMax): Marked inline.
(WebCore::FillLayer::computeClipMax): Rewrote to use a loop instead of recursion.
(WebCore::FillLayer::containsImage): Ditto.
(WebCore::FillLayer::imagesAreLoaded): Ditto.
(WebCore::FillLayer::hasOpaqueImage): Rewrote to use  instead of multiple if.
(WebCore::FillLayer::hasImage): Rewrote to use a loop instead of recursion.
(WebCore::FillLayer::hasFixedImage): Ditto.

* rendering/style/FillLayer.h: Changed m_next to be a unique_ptr.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp
trunk/Source/WebCore/rendering/RenderBox.cpp
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
trunk/Source/WebCore/rendering/style/FillLayer.cpp
trunk/Source/WebCore/rendering/style/FillLayer.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (167207 => 167208)

--- trunk/Source/WebCore/ChangeLog	2014-04-14 02:57:33 UTC (rev 167207)
+++ trunk/Source/WebCore/ChangeLog	2014-04-14 04:28:25 UTC (rev 167208)
@@ -1,3 +1,42 @@
+2014-04-12  Darin Adler  da...@apple.com
+
+Use unique_ptr for FillLayer::m_next
+https://bugs.webkit.org/show_bug.cgi?id=75222
+
+Reviewed by Dan Bernstein.
+
+* css/DeprecatedStyleBuilder.cpp:
+(WebCore::ApplyPropertyFillLayer::applyInheritValue):
+Renamed currChild to just child and prevChild to previousChild.
+Changed code to pass ownership of the new FillLayer immediately.
+Changed some loops to be for loops.
+(WebCore::ApplyPropertyFillLayer::applyInitialValue): Ditto.
+(WebCore::ApplyPropertyFillLayer::applyValue): Ditto.
+
+* rendering/RenderBox.cpp:
+(WebCore::RenderBox::backgroundHasOpaqueTopLayer): Use reference
+instead of pointer.
+(WebCore::RenderBox::paintFillLayers): Ditto.
+* rendering/RenderBoxModelObject.cpp:
+(WebCore::RenderBoxModelObject::paintFillLayerExtended): Ditto.
+
+* rendering/style/FillLayer.cpp:
+(WebCore::FillLayer::FillLayer): Removed m_next initializer since it is now an
+OwnPtr and initializes automatically. In a couple other places, changed m_next
+initializer to use make_unique.
+(WebCore::FillLayer::~FillLayer): Wrote loop for deletion of m_next.
+(WebCore::FillLayer::operator=): Removed unneeded explicit deletion of m_next.
+(WebCore::FillLayer::cullEmptyLayers): Ditto.
+(WebCore::clipMax): Marked inline.
+(WebCore::FillLayer::computeClipMax): Rewrote to use a loop instead of recursion.
+(WebCore::FillLayer::containsImage): Ditto.
+(WebCore::FillLayer::imagesAreLoaded): Ditto.
+(WebCore::FillLayer::hasOpaqueImage): Rewrote to use  instead of multiple if.
+(WebCore::FillLayer::hasImage): Rewrote to use a loop instead of recursion.
+(WebCore::FillLayer::hasFixedImage): Ditto.
+
+* rendering/style/FillLayer.h: Changed m_next to be a unique_ptr.
+
 2014-04-13  Andy Estes  aes...@apple.com
 
 [QuickLook] Move file system-related code into WebKit


Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (167207 => 167208)

--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp	2014-04-14 02:57:33 UTC (rev 167207)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp	2014-04-14 04:28:25 UTC (rev 167208)
@@ -520,72 +520,60 @@
 if (*(styleResolver-parentStyle()-*layersFunction)() == *(styleResolver-style()-*layersFunction)())
 return;
 
-FillLayer* currChild = (styleResolver-style()-*accessLayersFunction)();
-FillLayer* prevChild = 0;
-const FillLayer* currParent =