[EFL][Qt] fast/regions/autowidth-normalflow-maxwidth.html is failing
https://bugs.webkit.org/show_bug.cgi?id=104160

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-12-06
Reviewed by Kenneth Rohde Christiansen.

The test fast/regions/autowidth-normalflow-maxwidth.html is failing for EFL and Qt
because the test expects that the text of the test would fit in 400 pixels,
but both for Qt and for EFL, the text requires more than that.
Changed the test and the expectation ref-test to allow 450 pixels.

* fast/regions/autowidth-normalflow-maxwidth-expected.html:
* fast/regions/autowidth-normalflow-maxwidth.html:
* platform/efl-wk2/TestExpectations:
* platform/qt-5.0-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix the build if the path contains "+" character
https://bugs.webkit.org/show_bug.cgi?id=104120

Reviewed by Tor Arne Vestbø.

The second parameter of qmake's replace() is regular expression, so
we have to escape special characters in paths passed to replace().

* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/default_pre.prf:
* qmake/mkspecs/features/functions.prf:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Mac] Fix libxslt and libxml2 config tests
https://bugs.webkit.org/show_bug.cgi?id=104164

Reviewed by Simon Hausmann.

Source/WebCore:

Since libxml2 is a dependency for libxslt and is not used
standalone the configurations for it should also depend on
whether XSLT is enabled.
Also avoid using pkg-config on Mac, instead use direct
include paths and add needed libraries to the linker.

No new tests needed.

* WebCore.pri:

Tools:

We should not use pkg-config on Mac instead use direct include
paths and add needed libraries to the linker options to detect
libxslt and libxml2 provided by the system.
Previously we would always fall back to qtxmlpatterns.

* qmake/config.tests/libxml2/libxml2.pro:
* qmake/config.tests/libxslt/libxslt.pro:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Adding missing platform-specific baselines.

* platform/gtk/fast/text/decorations-with-text-combine-expected.png: Added.
* platform/gtk/fast/text/decorations-with-text-combine-expected.txt: Added.
* platform/gtk/fast/text/orientation-sideways-expected.png: Added.
* platform/gtk/fast/text/orientation-sideways-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Fix destination path in Source/PlatformEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=104237

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2012-12-06
Reviewed by Laszlo Gombos.

Remove InspectorBackendCommands.js when copying it for the consistency in Source/PlatformEfl.cmake.

* Source/PlatformEfl.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136795.
http://trac.webkit.org/changeset/136795
https://bugs.webkit.org/show_bug.cgi?id=104257

Asserts on EFL WebKit2 Debug bot (Requested by yael on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-06

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setRootLayerID):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136788.
http://trac.webkit.org/changeset/136788
https://bugs.webkit.org/show_bug.cgi?id=104260

Asserts on EFL WebKit2 Debug bot (Requested by yael on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-06

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerState):
(WebKit::LayerTreeRenderer::setRootLayerID):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] QWebView uses the mobile style and doesn't follow Qt's style
https://bugs.webkit.org/show_bug.cgi?id=104134

Reviewed by Simon Hausmann.

Another issue introduced by r136235.
Fix the order of initialization of the styleFactory and creation of the
WebCore Page. Since the latter has a RenderTheme member and the creation
of the appropriate RenderTheme type (QStyle-backed) is dependant on having
first initialized the theme factory function, we need to postpone this just
a little bit.

* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::QWebPageAdapter):
(QWebPageAdapter::initializeWebCorePage): Added.
* WebCoreSupport/QWebPageAdapter.h:
* WidgetApi/qwebpage.cpp:
(QWebPagePrivate::QWebPagePrivate): call initializeWebCorePage only after
having initialized WebKitWidgets related logic (QStyle hooks in this case).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TextTrack's .cues not ordered correctly when two cues have the same .startTime
https://bugs.webkit.org/show_bug.cgi?id=103266

Patch by Antoine Quint <graouts@apple.com> on 2012-12-06
Reviewed by Eric Carlson.

Source/WebCore:

Adding a new method TextTrackCueList::updateCueIndex() to update the list of
cues after changing the .startTime or .endTime of a TextTrackCue. I elected to
add a new method to TextTrackCueList rather than calling remove() and then add()
on the list from TextTrack::cueDidChange() so that the nature of the operation
is abstracted and we can easily change the way we keep the cue list sorted at
a later time should we choose to.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::cueDidChange):
* html/track/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::updateCueIndex):
(WebCore):
* html/track/TextTrackCueList.h:
(TextTrackCueList):

LayoutTests:

Unskip an Opera test that we now pass. Note that the original test has two issues that prompted
changes in this patch. The first issue is https://www.w3.org/Bugs/Public/show_bug.cgi?id=20066
and I've elected to comment the sub-test that fails and tracking turning it back on when the test
is corrected with https://bugs.webkit.org/show_bug.cgi?id=104255. The second issue was in the sub-test
that revealed the failure covered by this bug and had an issue acknowledged by the author
(see https://www.w3.org/Bugs/Public/show_bug.cgi?id=20066) so I fixed it in our repository.

* media/track/opera/interfaces/TextTrack/cues-expected.txt: Added.
* media/track/opera/interfaces/TextTrack/cues.html:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, update an expected file.

* platform/qt/ietestcenter/css3/bordersbackgrounds/background_position_three_four_values-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SVG <use> element inside an svg-as-image fails
https://bugs.webkit.org/show_bug.cgi?id=104007

Reviewed by Eric Seidel.

Upon redraw, SVGImage calls layout on the document it is drawing into
the image if the image, provided it believes the redraw does not need
to be delayed. Unfortunately, when an SVG <use> element is modified
(by animation, say) and regenerates its shadow tree, the destructors
invoke redraw, causing the SVGImage to call layout on something that
is in the process of being deleted. That's bad.

This change causes SVGImage to always delay the redraw. It is the most robust
way to protect against this problem, as there may be any number of
ways to cause this issue (a node being deleted in an svg-as-image
target) and this protects against them all.

The test case crashes in Asan Chromium.

Source/WebCore: 

Test: svg/as-image/animated-use-as-image-crash.html

* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageContentChanged): Always redraw on the timer.

LayoutTests: 

* platform/chromium-win/svg/custom/use-disappears-after-style-update-expected.png: Changed as a result of this change.
* svg/as-image/animated-use-as-image-crash-expected.txt: Added.
* svg/as-image/animated-use-as-image-crash.html: Added.
* svg/as-image/resources/animated-href-on-use.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speech Recognition API: Change the error code to a string on SpeechRecognitionError
https://bugs.webkit.org/show_bug.cgi?id=104254

Reviewed by Adam Barth.

Source/WebCore:

SpeechRecognitionError::code (numeric value) has been changed to SpeechRecognitionError::error (string)
in the latest specification.

http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error

Existing tests modified to cover this patch.

* Modules/speech/SpeechRecognitionError.cpp:
(WebCore::ErrorCodeToString):
(WebCore):
(WebCore::SpeechRecognitionError::create):
(WebCore::SpeechRecognitionError::SpeechRecognitionError):
* Modules/speech/SpeechRecognitionError.h:
(SpeechRecognitionErrorInit):
(WebCore::SpeechRecognitionError::error):
(SpeechRecognitionError):
* Modules/speech/SpeechRecognitionError.idl:

Source/WebKit/chromium:

Minor WebCore type changes.

* src/AssertMatchingEnums.cpp:
* src/SpeechRecognitionClientProxy.cpp:
(WebKit::SpeechRecognitionClientProxy::didReceiveError):

Tools:

Changes the mock error function to take a string instead of an int.

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::setMockSpeechRecognitionError):
* DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
(WebTestRunner::ErrorTask::ErrorTask):
(MockWebSpeechRecognizer::setError):
* DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
(MockWebSpeechRecognizer):

LayoutTests:

Adjusting tests.

* fast/events/constructors/speech-recognition-error-constructor-expected.txt:
* fast/events/constructors/speech-recognition-error-constructor.html:
* fast/speech/scripted/speechrecognition-errors-expected.txt:
* fast/speech/scripted/speechrecognition-errors.html:
* fast/speech/scripted/speechrecognitionerror-basics-expected.txt:
* fast/speech/scripted/speechrecognitionerror-basics.html:
* platform/chromium/fast/events/constructors/speech-recognition-error-constructor-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Unreviewed gardening after r136415.

r136415 enables the CSS3 background position offsets therefore this
expected png needs to be updated with the new result (the correct one
actually). It was not failing on the bot as the Apple Mac bot does not
seem to run pixel tests.

* platform/mac/ietestcenter/css3/bordersbackgrounds/background_position_three_four_values-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] [WK2] fast/dom/vertical-scrollbar-in-rtl.html makes fast/regions tests flaky
https://bugs.webkit.org/show_bug.cgi?id=104139

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-12-06
Reviewed by Kenneth Rohde Christiansen.

Resize the window back to 800x600 between tests.
This should be a no-op if the test did not resize the window.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
UndoManager layout tests should be removed
https://bugs.webkit.org/show_bug.cgi?id=104246

Reviewed by Adam Barth.

The UndoManager feature support was removed from the source tree
in r133326. The layout tests should be removed as well. As with
the feature implementation, these too can be restored back when needed.

* editing/undomanager: Removed.
* editing/undomanager/automatic-transaction-attribute-expected.txt: Removed.
* editing/undomanager/automatic-transaction-attribute.html: Removed.
* editing/undomanager/automatic-transaction-data-expected.txt: Removed.
* editing/undomanager/automatic-transaction-data.html: Removed.
* editing/undomanager/automatic-transaction-node-expected.txt: Removed.
* editing/undomanager/automatic-transaction-node.html: Removed.
* editing/undomanager/document-has-undomanager-expected.txt: Removed.
* editing/undomanager/document-has-undomanager.html: Removed.
* editing/undomanager/domtransaction-survives-gc-expected.txt: Removed.
* editing/undomanager/domtransaction-survives-gc.html: Removed.
* editing/undomanager/undomanager-isolated-world-expected.txt: Removed.
* editing/undomanager/undomanager-isolated-world.html: Removed.
* editing/undomanager/undomanager-item-expected.txt: Removed.
* editing/undomanager/undomanager-item.html: Removed.
* editing/undomanager/undomanager-reenter-expected.txt: Removed.
* editing/undomanager/undomanager-reenter.html: Removed.
* editing/undomanager/undomanager-transact-expected.txt: Removed.
* editing/undomanager/undomanager-transact.html: Removed.
* editing/undomanager/undomanager-undo-redo-expected.txt: Removed.
* editing/undomanager/undomanager-undo-redo.html: Removed.
* editing/undomanager/undoscopehost-use-after-free-expected.txt: Removed.
* editing/undomanager/undoscopehost-use-after-free.html: Removed.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-4.8/TestExpectations:
* platform/qt-mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use ownerNode() instead of base() in HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=104244

Reviewed by Adam Barth.

Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
Notice that the definition of base(), which this patch removes, is "return ownerNode()".

* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::indexSetter):
(WebCore::JSHTMLOptionsCollection::remove):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateOpaqueRootForGC):
* bindings/scripts/IDLAttributes.txt:
* bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::removeCallback):
(WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::ownerNode):
* dom/WebKitNamedFlow.h:
(WebKitNamedFlow):
* dom/WebKitNamedFlow.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.h:
(HTMLCollection):
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::HTMLFormControlsCollection::create):
(WebCore::HTMLFormControlsCollection::formControlElements):
(WebCore::HTMLFormControlsCollection::formImageElements):
(WebCore::HTMLFormControlsCollection::namedItem):
(WebCore::HTMLFormControlsCollection::updateNameCache):
* html/HTMLFormControlsCollection.idl:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::~HTMLNameCollection):
(WebCore::HTMLNameCollection::virtualItemAfter):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::remove):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLOptionsCollection.idl:
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::updateRefElements):
(WebCore::HTMLPropertiesCollection::namedItem):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::virtualItemAfter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change
https://bugs.webkit.org/show_bug.cgi?id=104269

Reviewed by Kenneth Rohde Christiansen.

Since the ViewportInfoItem of MiniBrowser is created before the
WebView finishes construction, thus before the viewport controller
has been instantiated, the shown device pixel ratio was incorrect.
Additionally QWebKitTest's notification signal was also not emitted
when the value changed.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
(WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Should apply link highlight to largest enclosing node with a handCursor.
https://bugs.webkit.org/show_bug.cgi?id=104264

Reviewed by Adrienne Walker.

Source/WebKit/chromium:

Link highlights sometimes only apply to part of a link, if we select an enclosed
node (e.g. font changes in link text). The highlight should be applied to the
largest enclosing node that still has handCursor set.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::bestTouchLinkNode):

LayoutTests:

Add layout test to cover new functionality.

* platform/chromium-linux/compositing/gestures/gesture-tapHighlight-simple-nested.html: Added.
* platform/chromium-linux/platform/chromium-linux/compositing/gestures/gesture-tapHighlight-simple-nested-expected.png: Added.
* platform/chromium-linux/platform/chromium-linux/compositing/gestures/gesture-tapHighlight-simple-nested-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test expectations update
https://bugs.webkit.org/show_bug.cgi?id=104007

Unreviewed expectations update.

* platform/chromium-win/svg/custom/use-disappears-after-style-update-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Optimize binary size by removing dead sections on unix/gcc
https://bugs.webkit.org/show_bug.cgi?id=102827

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2012-12-06
Reviewed by Kenneth Rohde Christiansen.

Turn on -ffunction-sections -fdata-sections --gc-section flags
on unix for the gcc toolchain for release builds to optimize binary
size for the Efl port.

* Source/cmake/OptionsEfl.cmake:

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