[Cocoa] Notify WKWebProcessPlugInLoadDelegate when a frame is removed from the frame hierarchy
https://bugs.webkit.org/show_bug.cgi?id=128239

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Declared new
delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didRemoveFrameFromHierarchy): Implemented this page loader client callback by calling the
load delegate.
(setUpPageLoaderClient): Set the above callback in the client structure.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose more WKWebProcessPlugInFrame properties
https://bugs.webkit.org/show_bug.cgi?id=128240

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Declared new properties.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame URL]): Added.
(-[WKWebProcessPlugInFrame childFrames]): Added.
(-[WKWebProcessPlugInFrame containsAnyFormElements]): Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Malloc called beneath MachineThreads::gatherFromOtherThread(), while forbidden
https://bugs.webkit.org/show_bug.cgi?id=128202

Reviewed by Geoffrey Garen.

This patch uses the new GCSegmentedArray to replace the Vector that was used 
to record the set of currently executing CodeBlocks during the conservative 
stack scan. This is primarily to avoid the possibility of the Vector resizing 
while FastMalloc is forbidden.

* heap/BlockAllocator.h:
* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::CodeBlockSet):
(JSC::CodeBlockSet::rememberCurrentlyExecutingCodeBlocks):
* heap/CodeBlockSet.h:
* heap/GCSegmentedArray.h:
(JSC::GCSegmentedArray::begin):
(JSC::GCSegmentedArray::end):
(JSC::GCSegmentedArrayIterator::GCSegmentedArrayIterator):
(JSC::GCSegmentedArrayIterator::get):
(JSC::GCSegmentedArrayIterator::operator*):
(JSC::GCSegmentedArrayIterator::operator->):
(JSC::GCSegmentedArrayIterator::operator==):
(JSC::GCSegmentedArrayIterator::operator!=):
(JSC::GCSegmentedArrayIterator::operator++):
* heap/Heap.cpp:
(JSC::Heap::Heap):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Simplify BasicShapeInset::path
https://bugs.webkit.org/show_bug.cgi?id=127920

Reviewed by David Hyatt.

I introduced a new static helper function called floatSizeForLengthSize
in order to simplify BasicShapeInset::path method.

No new tests, no behavior change.

* rendering/style/BasicShapes.cpp:
(WebCore::floatSizeForLengthSize): New helper function.
(WebCore::BasicShapeInset::path):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Simplify CSSBasicShapeInset::cssText
https://bugs.webkit.org/show_bug.cgi?id=127841

Reviewed by David Hyatt.

I introduced the updateCornerRadiusWidthAndHeight helper function, which makes the code of cssText method clearer.

No new tests, no behavior change.

* css/CSSBasicShapes.cpp:
(WebCore::updateCornerRadiusWidthAndHeight): Add helper function.
(WebCore::CSSBasicShapeInset::cssText):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SVG preserveAspectRatio=none is not honored.
https://bugs.webkit.org/show_bug.cgi?id=111402

Reviewed by Andreas Kling.

Source/WebCore:

Previously, preserveAspectRatio=none had no effect on SVG images. This change fixes this so
we follow the special handling of preserveAspectRatio on images as defined in the spec:
http://www.w3.org/TR/SVG/single-page.html, 7.8 The ‘preserveAspectRatio’ attribute.

Images that depend on a container size (such as SVG images) require a call to
setContainerSizeForRenderer(...) to set this size. By passing the image's intrinsic size
as the container size, the non-uniform scaling defined in the spec will be achieved.

Merged from Blink: https://chromiumcodereview.appspot.com/14964004

Test: svg/custom/image-with-preserveAspectRatio-none.html

* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::updateImageViewport):

LayoutTests:

New test for SVG with preserveAspectRatio=none.

Merged from Blink: https://chromiumcodereview.appspot.com/14964004

* svg/custom/image-with-preserveAspectRatio-none-expected.html: Added.
* svg/custom/image-with-preserveAspectRatio-none.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Tests compositing/columns/composited-rl-paginated-repaint.html and
compositing/columns/composited-lr-paginated-repaint.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=128255

* platform/mac-wk2/TestExpectations: Marked them as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add expectations for two flaky media layout tests
https://bugs.webkit.org/show_bug.cgi?id=128253

Unreviewed EFL layout tests gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-02-05

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] [iOS] No video on embedded YouTube
https://bugs.webkit.org/show_bug.cgi?id=128237

Reviewed by Sam Weinig.

We were using the wrong #if directive; PLUGIN_PROXY_FOR_VIDEO is an ENABLE not a USE.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: ImageLoader is always owned by an Element.
<https://webkit.org/b/128254>

- Codify this by making the constructor take Element& or better.
- Make element() return Element&.
- Marked HTMLImageLoader and SVGImageLoader final.
- Made the ImageLoader constructor protected.

Reviewed by Sam Weinig.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::HTMLImageLoader):
(WebCore::HTMLImageLoader::dispatchLoadEvent):
(WebCore::HTMLImageLoader::sourceURI):
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLImageLoader.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::imageLoader):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::startLoadingImage):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didAttachRenderers):
(WebCore::HTMLVideoElement::parseAttribute):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::renderImageResource):
(WebCore::ImageLoader::updatedHasPendingEvent):
(WebCore::ImageLoader::timerFired):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
(WebCore::ImageLoader::dispatchPendingLoadEvent):
(WebCore::ImageLoader::dispatchPendingErrorEvent):
* loader/ImageLoader.h:
(WebCore::ImageLoader::element):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::SVGImageLoader):
(WebCore::SVGImageLoader::~SVGImageLoader):
(WebCore::SVGImageLoader::dispatchLoadEvent):
(WebCore::SVGImageLoader::sourceURI):
* svg/SVGImageLoader.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Dynamically created element with image valued shape-outside doesn't update automatically
https://bugs.webkit.org/show_bug.cgi?id=128187

Reviewed by Dean Jackson.

Source/WebCore:

Corrected the way shape-outside handles the completion of an image load. Move
the shape-outside imageChanged() logic from RenderBlock to RenderBox and call
markShapeOutsideDependentsForLayout() instead of parent()->setNeedsLayoutAndPrefWidthsRecalc().
The latter did not deal with descendants of the shape element's siblings correctly and it
failed when the shape element was inserted dynamically. The markShapeOutsideDependentsForLayout()
method can't be called during layout, so the imageChanged() code checks for that. The only
scenario where imageChanged() can be called during layout (that I've discovered so far anyway)
is when an SVG Image is renderered  with drawImage(). The Shape::createRasterShape() does this,
and the corresponding imageChanged() notification can be safely ignored.

Test: fast/shapes/shape-outside-floats/shape-outside-insert-svg-shape.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::imageChanged):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::imageChanged):

LayoutTests:

* fast/shapes/shape-outside-floats/shape-outside-insert-svg-shape-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-insert-svg-shape.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove leftover seamless iframe logic from containerForRepaint().
<https://webkit.org/b/128235>

The parent-flow-thread-in-different-document case is no longer
relevant after <iframe seamless> was removed.

Reviewed by David Hyatt.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containerForRepaint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HashMap can't be used with std::unique_ptr as value when it has a custom deleter
https://bugs.webkit.org/show_bug.cgi?id=128250

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2014-02-05
Reviewed by Darin Adler.

The problem is that the HashMap is using a unique_ptr with the
default deleter, so that when trying to move the unique_ptr the
deleters don't match.

* wtf/HashTraits.h: Add the deleter also in the template
definitation of the parent class for the HashTraits<std::unique_ptr<T, Deleter>>

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