setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
https://bugs.webkit.org/show_bug.cgi?id=120293

Reviewed by Darin Adler.

Source/WebCore:

setAttributeNode() performs a case-insensitive search for an existing
attribute. If an existing attribute is found, it retrieves the index of
such an attribute. For setting the attribute's new value, we call upon
setAttributeInternal() to which both the index as well as the name of
the attribute is passed.
The name passed to this method is the same as the one passed to the
setAttributeNode() API from the webpage and thus can be in any case.

However, setAttributeInternal() uses this name to get the corresponding
existing attribute node. Since this retrieval is not case-insensitive,
the existing node is not returned and thus the new value is not set on
the existing node.
We should instead use the passed index and use that to retrieve the
existing node.

Note that obtaining the attribute's value using getAttributeNode() would
still return the correct value, i.e. the new one.

Also, this change shall make our behavior similar to that of FF and IE.

Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html

* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
If the passed index is not equal to attributeNotFound, we use that index
to retrieve the existing attribute.

LayoutTests:

* fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt: Added.
* fast/dom/Element/setAttributeNode-for-existing-attribute.html: Added.
Layout testcase for verifying that the new attribute value is set properly
if an existing attribute with the same name exists.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CachedPage construction should begin with a Page&.
<https://webkit.org/b/120721>

Reviewed by Anders Carlsson.

We can't create a CachedPage from a null Page anyway.

* history/CachedPage.cpp:
(WebCore::CachedPage::create):
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
* history/CachedPage.h:
* history/PageCache.cpp:
(WebCore::PageCache::add):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove deprecated markersForNode(Node* node).
https://bugs.webkit.org/show_bug.cgi?id=120679

Reviewed by Ryosuke Niwa.

DocumentMarkerController::markersForNode(Node* node) has been marked as
deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).

No new tests, no behavior change.

* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
Remove never used markersForNode(Node*).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/js/dfg-* tests should wait for the concurrent JIT
https://bugs.webkit.org/show_bug.cgi?id=120723

Source/JavaScriptCore: 

Reviewed by Geoffrey Garen.
        
* runtime/TestRunnerUtils.cpp:
(JSC::numberOfDFGCompiles): This should also handle constructors.

LayoutTests: 

Reviewed by Geoffrey Garen.
        
Add dfgShouldBe(), a handy function that covers a lot of common cases.
Also convert a bunch of tests.

* fast/js/dfg-activation-register-overwritten-in-throw-expected.txt:
* fast/js/dfg-add-not-number-expected.txt:
* fast/js/dfg-allocation-profile-watch-point-exit-expected.txt:
* fast/js/dfg-arguments-alias-escape-expected.txt:
* fast/js/dfg-arguments-cross-code-origin-expected.txt:
* fast/js/dfg-arguments-mixed-alias-expected.txt:
* fast/js/dfg-arguments-strict-mode-expected.txt:
* fast/js/dfg-arguments-unexpected-escape-expected.txt:
* fast/js/dfg-array-dead-expected.txt:
* fast/js/dfg-array-length-dead-expected.txt:
* fast/js/dfg-array-pop-value-clearing-expected.txt:
* fast/js/dfg-array-push-bad-time-expected.txt:
* fast/js/dfg-array-push-slow-put-expected.txt:
* fast/js/dfg-arrayify-when-late-prevent-extensions-expected.txt:
* fast/js/dfg-arrayify-when-prevent-extensions-expected.txt:
* fast/js/dfg-bool-to-int32-reuse-expected.txt:
* fast/js/jsc-test-list:
* fast/js/resources/js-test-pre.js:
(dfgShouldBe):
* fast/js/resources/standalone-pre.js:
(dfgShouldBe):
* fast/js/script-tests/dfg-activation-register-overwritten-in-throw.js:
(g):
* fast/js/script-tests/dfg-add-not-number.js:
* fast/js/script-tests/dfg-allocation-profile-watch-point-exit.js:
(foo):
* fast/js/script-tests/dfg-arguments-alias-escape.js:
* fast/js/script-tests/dfg-arguments-cross-code-origin.js:
* fast/js/script-tests/dfg-arguments-mixed-alias.js:
* fast/js/script-tests/dfg-arguments-strict-mode.js:
* fast/js/script-tests/dfg-arguments-unexpected-escape.js:
* fast/js/script-tests/dfg-array-dead.js:
* fast/js/script-tests/dfg-array-length-dead.js:
* fast/js/script-tests/dfg-array-pop-value-clearing.js:
* fast/js/script-tests/dfg-array-push-bad-time.js:
* fast/js/script-tests/dfg-array-push-slow-put.js:
* fast/js/script-tests/dfg-arrayify-when-late-prevent-extensions.js:
* fast/js/script-tests/dfg-arrayify-when-prevent-extensions.js:
* fast/js/script-tests/dfg-bool-to-int32-reuse.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test background blend modes with animated gif background layers.
https://bugs.webkit.org/show_bug.cgi?id=120057

Patch by Mihai Tica <mitica@adobe.com> on 2013-09-04
Reviewed by Darin Adler.

* css3/compositing/background-blend-mode-gif-color-2.html: Added.
* css3/compositing/background-blend-mode-gif-color.html: Added.
* css3/compositing/resources/squares.gif: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.png: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.txt: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-expected.png: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
jsc tests should have timeouts
https://bugs.webkit.org/show_bug.cgi?id=120725

Source/JavaScriptCore: 

Reviewed by Geoffrey Garen.
        
Add the timeout logic directly to 'jsc' because that's easier to do than
writing shell/perl code for it.

* jsc.cpp:
(timeoutThreadMain):
(main):

Tools: 

Reviewed by Geoffrey Garen.
        
Set the timeout to 20 seconds per test for now.

* Scripts/run-javascriptcore-tests:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache

Reviewed by Darin Adler.

Source/WebCore: 

A new flag called keepInHistory is added to allow keeping
certain pages in the history even if they have substitute data.

Test: http/tests/appcache/history-test.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::urlForHistory):
* loader/SubstituteData.h:
(WebCore::SubstituteData::SubstituteData):
(WebCore::SubstituteData::shouldRevealToSessionHistory):
(WebCore::SubstituteData::setShouldRevealToSessionHistory):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):

LayoutTests: 

* http/tests/appcache/history-test-expected.txt: Added.
* http/tests/appcache/history-test.html: Added.
* http/tests/appcache/resources/history-test.html: Added.
* http/tests/appcache/resources/history-test.manifest: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support interpolation between cross-fade() images
https://bugs.webkit.org/show_bug.cgi?id=119955

Reviewed by Darin Adler.

Source/WebCore:

With this patch, CSS can animate from one -webkit-cross-fade
function to another, when the input images are the same in the
same order.

* css/CSSCrossfadeValue.cpp: Added blend function.
(WebCore::blendFunc):
(WebCore::CSSCrossfadeValue::blend):
(WebCore::CSSCrossfadeValue::equals):
(WebCore::CSSCrossfadeValue::equalInputImages):
* css/CSSCrossfadeValue.h: Added save casting functions.
(WebCore::toCSSCrossfadeValue):
* css/CSSValue.h:
(WebCore::CSSValue::isCrossfadeValue):
* page/animation/CSSPropertyAnimation.cpp: Add another condition to
    interpolate between two -webkit-cross-fade functions.
(WebCore::blendFunc):

LayoutTests:

Test interpolation from one cross-fade function to another. Changed pixel test
to a ref test.

* animations/cross-fade-background-image.html:
* animations/cross-fade-background-image-expected.html: Added.
* platform/mac/animations/cross-fade-background-image-expected.png: Removed.
* platform/mac/animations/cross-fade-background-image-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, don't rely on File::Slurp. This fixes part #1 of Linux bot breakage.

* Scripts/run-javascriptcore-tests:
(readAllLines):



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