Update polygon shape-outside tests for upstream changes
https://bugs.webkit.org/show_bug.cgi?id=119414

Reviewed by Alexandru Chiculita.

The refs were updated upstream to make them work properly in Blink.
This pulls in that change to keep things in sync.

* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-001-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-002-expected.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] New positioning model: support for stacked floats with shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118087

Reviewed by Alexandru Chiculita.

Import new test for stacked floats from the CSSWG's repository to
replace the old tests. The simple horizontal rectangle test is no
longer applicable now that float stacking ignores shapes, so it has
just been removed.

* TestExpectations: Remove skipping for replaced tests.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-stacked-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple-expected.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked-expected.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-stacked.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement img element's srcset attribute
https://bugs.webkit.org/show_bug.cgi?id=110252

Patch by Romain Perier <romain.perier@gmail.com> on 2013-08-01
Reviewed by Dean Jackson.

Source/WebCore:

Tests: fast/hidpi/image-srcset-simple.html
       fast/hidpi/image-srcset-src-selection.html
       fast/hidpi/image-srcset-simple.html
       fast/hidpi/image-srcset-src-selection.html
       fast/hidpi/image-srcset-only-src-attribute.html
       fast/hidpi/image-srcset-same-alternative-for-both-attributes.html
       fast/hidpi/image-srcset-invalid-inputs.html
       fast/hidpi/image-srcset-invalid-inputs-except-one.html
       fast/hidpi/image-srcset-invalid-inputs-correct-src.html
       fast/hidpi/image-srcset-change-dynamically-from-js.html
       fast/hidpi/image-srcset-remove-dynamically-from-js.html

* html/HTMLAttributeNames.in: Add srcset attribute.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
Adding initialization for new variables member.
(WebCore::HTMLImageElement::imageSourceURL):
Override this method to return the choosen image transparently to the ImageLoader.
(WebCore::HTMLImageElement::updateBestImageForScaleFactor):
New method to select the good image candidate dependending on the scale factor. This method is separated from
parsing because it will be useful for selecting a new image candidate on the fly if the device scale factor changes.
(WebCore::HTMLImageElement::updateImagesFromSrcSet):
New method for parsing the srcset attribute and build a list of images with the corresponding scale factor.
(WebCore::HTMLImageElement::parseAttribute):
Adding support for processing the image candidates, select the good one and call ImageLoader for rendering.
* html/HTMLImageElement.h:
- Adding new methods declarations.
- Adding new type definition.
- Adding new variable member to store the URL of the choosen image.
- Adding new variable member to store the index of the src image.
- Adding new Vector to store the list of images after parsing.
* html/HTMLImageElement.idl: Adding srcset attribute for the differents existing bidings.

LayoutTests:

* fast/hidpi/image-srcset-simple.html: Ensures that the good image
is selected from srcset by the user agent according to the choosen scale factor.
* fast/hidpi/image-srcset-src-selection.html: Ensures that the image
from the src attribute is collected by the parsing algorithm and selected by the user agent
when no other candidate matches the scale factor.
* fast/hidpi/image-srcset-only-src-attribute.html: Ensures that the algorithms used for srcset
does not change the behaviour of the src attribute when the srcset attribute is not defined,
even using scale factor greater than 1.
* fast/hidpi/image-srcset-same-alternative-for-both-attributes.html: Ensures that the good image
is selected by the user agent when src and srcset contain an image with a scale factor of 1.
* fast/hidpi/image-srcset-invalid-inputs.html: Ensures that the parsing and the selection
algorithms support invalid inputs. Theses ones are simply ignored.
* fast/hidpi/image-srcset-invalid-inputs-except-one.html: Ensures that a valid image
is selected even if this one is part of a set containing invalid inputs.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html: Ensures that the image from
the src attribute is choosen when srcset contains only invalid inputs, this selection
should not depend on the scale factor.
* fast/hidpi/image-srcset-change-dynamically-from-js.html: Ensures that src and srcset attributes
can be changed dynamically from javascript.
* fast/hidpi/image-srcset-remove-dynamically-from-js.html: Ensures that src attribute
can be removed dynamically from javascript.
* platform/mac/fast/hidpi/image-srcset-simple-expected.png:
* platform/mac/fast/hidpi/image-srcset-simple-expected.txt:
* platform/mac/fast/hidpi/image-srcset-src-selection-expected.png:
* platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt:
* platform/mac/fast/hidpi/image-srcset-only-src-attribute-expected.png:
* platform/mac/fast/hidpi/image-srcset-only-src-attribute-expected.txt:
* platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.png:
* platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt:
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-expected.png:
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-expected.txt:
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.png:
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt:
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.png:
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt:
* platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.png:
* platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt:
* platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.png:
* platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Minor cleanup for srcset tests
https://bugs.webkit.org/show_bug.cgi?id=119407

Reviewed by Tim Horton.

Other than small typos and style tweaks, there are three
main changes here:

1. Collect duplicated code into a helper file.
2. Make sure the tests that add or remove the attributes
can run standalone outside of DRT.
3. Update the -simple test with new images that make it
more clear what srcset is doing.

* fast/hidpi/image-srcset-change-dynamically-from-js.html:
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-invalid-inputs-except-one.html:
* fast/hidpi/image-srcset-invalid-inputs.html:
* fast/hidpi/image-srcset-only-src-attribute.html:
* fast/hidpi/image-srcset-remove-dynamically-from-js.html:
* fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
* fast/hidpi/image-srcset-simple.html:
* fast/hidpi/image-srcset-src-selection.html:
* fast/hidpi/resources/image-set-1x.png: Added.
* fast/hidpi/resources/image-set-2x.png: Added.
* fast/hidpi/resources/srcset-helper.js: Added.
* platform/mac/fast/hidpi/image-srcset-simple-expected.png:
* platform/mac/fast/hidpi/image-srcset-simple-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
srcset algorithm breaks base64 src attributes
https://bugs.webkit.org/show_bug.cgi?id=119413

Reviewed by Darin Adler.

Source/WebCore:

Base64 encoded src attributes typically have a COMMA
character which was breaking in the candidate matching
algorithm. Make sure to handle that case, and to unescape
any incoming URLs.

Slight cleanup of the srcset matching algorithm. The
candidates are now gathered from a single update
method. I've renamed the methods in the process.
This means we now reparse the srcset attribute if
only the src changes, but I think the code is
cleaner this way.

Tests: fast/hidpi/image-srcset-data-src.html
       fast/hidpi/image-srcset-data-srcset.html
       fast/hidpi/image-srcset-nomodifier.html
       fast/hidpi/image-srcset-viewport-modifiers.html

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement): No need to initialise m_bestFitImageURL.
(WebCore::HTMLImageElement::imageSourceURL): Use isEmpty() rather than checking for nullAtom.
(WebCore::HTMLImageElement::determineBestImageForScaleFactor): New renamed method that selects the best
candidate for the image source.
(WebCore::HTMLImageElement::collectImageCandidatesFromSrcSet): Gather the srcset images. Changes include
simplifying the whitespace and skipping candidates that we don't yet support.
(WebCore::HTMLImageElement::collectImageCandidateFromSrc): Add the src attribute to the list of candidates.
(WebCore::HTMLImageElement::parseAttribute): Now both attributes call determineBestImageForScaleFactor.
* html/HTMLImageElement.h: No need for m_srcImageIndex any more.

LayoutTests:

Four new tests that exercise candidate matching. In particular:
- base64 encoded src attributes
- base64 encoded srcset attributes that are escaped
- attributes without scale modifiers
- attributes that have modifiers other than scale

* fast/hidpi/image-srcset-change-dynamically-from-js.html: Minor change to add scale modifier.
* fast/hidpi/image-srcset-data-src.html: Added.
* fast/hidpi/image-srcset-data-srcset.html: Added.
* fast/hidpi/image-srcset-nomodifier.html: Added.
* fast/hidpi/image-srcset-viewport-modifiers.html: Added.
* platform/mac/fast/hidpi/image-srcset-data-src-expected.png: Added.
* platform/mac/fast/hidpi/image-srcset-data-src-expected.txt: Added.
* platform/mac/fast/hidpi/image-srcset-data-srcset-expected.png: Added.
* platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt: Added.
* platform/mac/fast/hidpi/image-srcset-nomodifier-expected.png: Added.
* platform/mac/fast/hidpi/image-srcset-nomodifier-expected.txt: Added.
* platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.png: Added.
* platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] WebKit1 Fullscreen Video Play is Broken
https://bugs.webkit.org/show_bug.cgi?id=119415

Reviewed by Jer Noble.

Source/WebCore: 

* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
call for ACFPlayerLayerSetFrame
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible):
Tear down video player when leaving Fullscreen mode and not using
the newer Fullscreen feature.
(WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper):
Disconnect from notifications for AVCFPlayerItemPresentationSizeChangedNotification,
AVCFPlayerItemDuratoinChangedNotification, and disconnect any
LegibleOutput items added to the player item.
(WebCore::AVFWrapper::createPlayerItem): Add notifications for
AVCFPlayerItemPresentationSizeChanged. 
(WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Notify
the AVCFPLayerLayer when the display size has changed.
* platform/graphics/ca/win/CACFLayerTreeHost.h:
(WebCore::CACFLayerTreeHost::manualCreateRenderer): Added.
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
(WebCore::WKCACFViewLayerTreeHost::manualCreateRenderer): Added.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Minor
cleanups.
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
Make sure a Direct3D renderer is created when building the full screen
window for Video playback.

Source/WebKit/win: 

* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings): Set accelerated
rendering on by default on systems that support it.
* WebView.cpp:
(WebView::exitFullscreen): Clean up Fullscreen video controller
once it is no longer used. This was preventing users from being
able to reenter Fullscreen mode after leaving it.
(WebView::fullScreenClientForceRepaint): Change assert to
match the member actually being used in the method.

Tools: 

* WinLauncher/WinLauncher.cpp:
(dllLauncherEntryPoint): Activate full screen mode via
IWebPreferencesInternal interface.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/14625616> http/tests/download/basic-ascii.html and http/tests/download/literal-utf-8.html fails

        Changed the PHP files to not have a BOM, which confuses some versions of PHP.
        They are both ASCII anyway.

        * http/tests/download/resources/basic-ascii.php:
        * http/tests/download/resources/literal-utf-8.php:



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