[Qt] Remove qt-5.0-wk2 from the baseline search paths because the migration of expectations to qt-wk2 is done.
https://bugs.webkit.org/show_bug.cgi?id=120464

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-08-30
Reviewed by Jocelyn Turcotte.

* Scripts/webkitpy/port/qt.py:
(QtPort._search_paths):
* Scripts/webkitpy/port/qt_unittest.py:
(QtPortTest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove AttachContext
https://bugs.webkit.org/show_bug.cgi?id=120518

Reviewed by Andreas Kling.

This type is not useful anymore. Just pass the precomputed style to attachRenderTree and reattach-or-not flag to detachRenderTree.

* style/StyleResolveTree.cpp:
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::attachChildren):
(WebCore::Style::attachShadowRoot):
(WebCore::Style::attachRenderTree):
(WebCore::Style::detachChildren):
(WebCore::Style::detachShadowRoot):
(WebCore::Style::detachRenderTree):
(WebCore::Style::reattachRenderTree):
(WebCore::Style::resolveLocal):
* style/StyleResolveTree.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Resolve unused parameter warning in WKBundlePageOverlay.cpp
https://bugs.webkit.org/show_bug.cgi?id=120521

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-30
Reviewed by Andreas Kling.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayFractionFadedIn):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [CSS Masking] -webkit-mask-repeat: space does not work
Added the space option to background-repeat and -webkit-mask-repeat.
With the property value 'space', the background or mask image gets repeated as often as it fits within the background positioning
area. The repeated images are spaced equally to fill the unused area.
https://bugs.webkit.org/show_bug.cgi?id=119324

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-30
Reviewed by Dirk Schulze.

Tests: css3/background/background-repeat-space-border.html
       css3/background/background-repeat-space-content.html
       css3/background/background-repeat-space-padding.html
       css3/masking/mask-repeat-space-border.html
       css3/masking/mask-repeat-space-content.html
       css3/masking/mask-repeat-space-padding.html

* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern): Passed the space values to the image buffer.
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled): Added the space values when computing the location of the tile.
* platform/graphics/Image.h: Added the space property.
(WebCore::Image::spaceSize):
(WebCore::Image::setSpaceSize):
* platform/graphics/ImageBuffer.h: Added the space property.
(WebCore::ImageBuffer::spaceSize):
(WebCore::ImageBuffer::setSpaceSize):
* platform/graphics/cg/ImageBufferCG.cpp: Passed the space values when copying an image.
(WebCore::ImageBuffer::copyImage):
* platform/graphics/cg/ImageCG.cpp: Added the space values when creating a platform pattern.
(WebCore::Image::drawPattern):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Computed the space values on x and y axis.
(WebCore::getSpace):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Pass the space values to the Image class.
* rendering/RenderBoxModelObject.h: Added the space property.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
* svg/graphics/SVGImage.cpp: Passed the space property to the created image.
(WebCore::SVGImage::drawPatternForContainer):
* svg/graphics/SVGImageForContainer.cpp: Passed the space property to the image property.
(WebCore::SVGImageForContainer::drawPattern):

LayoutTests: [CSS Masking] -webkit-mask-repeat: space does not work
Added tests to verify correct usage of background-repeat: space and mask-repeat: space.
Added one test for each possible mask/background clip: border, padding and content
https://bugs.webkit.org/show_bug.cgi?id=119324

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-30
Reviewed by Dirk Schulze.

* css3/background/background-repeat-space-border-expected.html: Added.
* css3/background/background-repeat-space-border.html: Added.
* css3/background/background-repeat-space-content-expected.html: Added.
* css3/background/background-repeat-space-content.html: Added.
* css3/background/background-repeat-space-padding-expected.html: Added.
* css3/background/background-repeat-space-padding.html: Added.
* css3/masking/mask-repeat-space-border-expected.html: Added.
* css3/masking/mask-repeat-space-border.html: Added.
* css3/masking/mask-repeat-space-content-expected.html: Added.
* css3/masking/mask-repeat-space-content.html: Added.
* css3/masking/mask-repeat-space-padding-expected.html: Added.
* css3/masking/mask-repeat-space-padding.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Added platform specific expected files after r15470 and r154780.
Unreviewed gardening.

* platform/qt-wk1/compositing/columns/composited-lr-paginated-repaint-expected.txt: Added.
* platform/qt-wk1/compositing/columns/composited-rl-paginated-repaint-expected.txt: Added.
* platform/qt-wk1/compositing/repaint/repaint-on-layer-grouping-change-expected.png: Added.
* platform/qt-wk1/compositing/repaint/repaint-on-layer-grouping-change-expected.txt: Added.
* platform/qt-wk2/compositing/columns/ancestor-clipped-in-paginated-expected.txt: Added.
* platform/qt-wk2/compositing/columns/clipped-in-paginated-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-columns-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-columns-vertical-rl-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-in-paginated-rl-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-in-paginated-writing-mode-rl-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-lr-paginated-repaint-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-nested-columns-expected.txt: Added.
* platform/qt-wk2/compositing/columns/composited-rl-paginated-repaint-expected.txt: Added.
* platform/qt-wk2/compositing/columns/hittest-composited-in-paginated-expected.txt: Added.
* platform/qt-wk2/compositing/columns/rotated-in-paginated-expected.txt: Added.
* platform/qt-wk2/compositing/columns/untransformed-composited-in-paginated-expected.txt: Added.
* platform/qt-wk2/compositing/repaint/repaint-on-layer-grouping-change-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Node::document() should return a reference.
<https://webkit.org/b/120496>

Reviewed by Antti Koivisto.

Now that orphan DocumentType nodes also have document pointers, it's no longer
possible to have a null Node::document().

Cement this by making document() return a reference, and remove the various
null checks exposed by this.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SimpleClassVectorTraits shall be used for RuleData
https://bugs.webkit.org/show_bug.cgi?id=120526

Reviewed by Andreas Kling.

Whereas RuleData is POD type and whereas there are quite a lot of Vector<RuleData> occurrences in the code,
it makes sense to use SimpleClassVectorTraits for RuleData and hence to allow using more efficient mem functions
in vectors.

* css/RuleSet.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Skip failing grammar checking test.
Unreviewed gardening.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build fix for Document& Node::document().

* DOMCoreClasses.cpp:
(DOMNode::createInstance):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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@154881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Resolve unused parameter warning in FindController.cpp
https://bugs.webkit.org/show_bug.cgi?id=120407

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-30
Reviewed by Darin Adler.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(wordAtPositionForAtkBoundary):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Resolve unused parameter warning in FindController.cpp
https://bugs.webkit.org/show_bug.cgi?id=120516

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-30
Reviewed by Darin Adler.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Resolve unused parameter warning in WebPlatformStrategies.cpp
https://bugs.webkit.org/show_bug.cgi?id=120515

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-30
Reviewed by Darin Adler.

* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::drawRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix, remove unused parameter in UIProcess/WebColorPicker.cpp.
https://bugs.webkit.org/show_bug.cgi?id=120525

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-08-30
Reviewed by Darin Adler.

* UIProcess/WebColorPicker.cpp:
(WebKit::WebColorPicker::showColorPicker):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction after r154835. Only seen when doing a
full (clean) rebuild.

* DerivedSources.cpp: Remove reference to deleted JSHTMLDialogElement.cpp



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
StyleResolver & friends should use Document&.
<https://webkit.org/b/120527>

Reviewed by Antti Koivisto.

Document&-ify StyleResolver, ElementRuleCollector and SelectorChecker.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix unused parameter warning in graphics/cairo/GraphicsContextCairo.cpp file.
https://bugs.webkit.org/show_bug.cgi?id=120524

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-08-30
Reviewed by Darin Adler.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRectWithRoundedHole):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Possible dangling CachedResourceClient of StyleRuleImport and XSLImportRule
https://bugs.webkit.org/show_bug.cgi?id=120479

Patch by Leo Yang <leoyang@blackberry.com> on 2013-08-30
Reviewed by Darin Adler.

In StyleRuleImport::requestStyleSheet() and XSLImportRule::loadSheet() we
didn't call removeClient() for m_cachedSheet before assigning m_cachedSheet
a new value. This could leave the client as a client of the old cached
sheet and dangling after the client is deleted. Fix them by calling removeClient()
before assigning m_cacheSheet a new value.

Found by code inspection. Seems no way to test it automatically.

* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):
* xml/XSLImportRule.cpp:
(WebCore::XSLImportRule::loadSheet):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Video inside page always uses non-hardware accelerated playback
https://bugs.webkit.org/show_bug.cgi?id=120448

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createAVPlayer): Check for
D3D device. If it doesn't exist, switch to compositing mode and try again.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add USE(CFNETWORK) guard to SynchronousLoaderClient::didReceiveAuthenticationChallengedidReceiveAuthenticationChallenge()
https://bugs.webkit.org/show_bug.cgi?id=120532

Reviewed by Darin Adler.

* platform/network/SynchronousLoaderClient.h:

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