[CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing.
https://bugs.webkit.org/show_bug.cgi?id=102104

Patch by Alexis Menard <alexis@webkit.org> on 2012-11-23
Reviewed by Julien Chaffraix.

Add new tests to cover the new parsing for the background position
property. For now the computed style checks are commented out because
the rendering part of the feature is not yet implemented (i.e.
FillLayer does not contain yet the feature and this is what
CSSComputedStyleDeclaration is using).

* fast/backgrounds/background-position-parsing-2-expected.txt:
* fast/backgrounds/background-position-parsing-2.html:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: update test expectations for
svg/hixie/perf/007.xml

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: text failures in:
* inspector/console/command-line-api-inspect.html
* inspector/runtime/runtime-localStorage-getProperties.html
https://bugs.webkit.org/show_bug.cgi?id=103161

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: updated test expectations for failure in
* svg/batik/text/textPosition2.svg
https://bugs.webkit.org/show_bug.cgi?id=103148

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused ScrollByPixelVelocity
https://bugs.webkit.org/show_bug.cgi?id=102840

Reviewed by Sam Weinig.

Source/WebCore:

https://bugs.webkit.org/show_bug.cgi?id=80311 wrongly introduced a new
kind of scroll: "ScrollByPixelVelocity". This code is not used on any platform
and will not be of use in the future so this patch removes it.

No new tests: code removal/cleanup.

* page/EventHandler.cpp:
(WebCore::EventHandler::defaultWheelEventHandler):
(WebCore::EventHandler::handleGestureEvent):
* platform/PlatformWheelEvent.h:
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::handleWheelEvent):
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
(WebCore::ScrollAnimatorNone::scroll):
(WebCore::ScrollAnimatorNone::cancelAnimations):
(WebCore::ScrollAnimatorNone::animationTimerFired):
* platform/ScrollAnimatorNone.h:
(ScrollAnimatorNone):
* platform/ScrollTypes.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scroll):

Source/WebKit/chromium:

Removed test for deleted code.

* tests/ScrollAnimatorNoneTest.cpp:

Source/WTF:

The GESTURE_ANIMATION feature turns on code in WebCore is unused.
Remove it.

No new tests: code removal/cleanup.

* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Define platform limitations in platform layer
https://bugs.webkit.org/show_bug.cgi?id=103160

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-11-23
Reviewed by Rob Buis.

Taking length as const unsigned in checkSpellingOfStringAsync.
This value is unchanging and should never be less than 0, even
in an error case.

Internally reviewed by Mike Fenton.

* Api/WebPageClient.h:
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::requestCheckingOfString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Any function that can log things should be able to easily log them to a memory buffer as well
https://bugs.webkit.org/show_bug.cgi?id=103000

Reviewed by Sam Weinig.

Source/JavaScriptCore: 

Change all users of WTF::dataFile() to expect a PrintStream& rather than a FILE*.

* bytecode/Operands.h:
(JSC::OperandValueTraits::dump):
(JSC::dumpOperands):
(JSC):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::dump):
* dfg/DFGAbstractState.h:
(AbstractState):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::dump):
* dfg/DFGCommon.h:
(JSC::DFG::NodeIndexTraits::dump):
* dfg/DFGStructureAbstractValue.h:
(JSC::DFG::StructureAbstractValue::dump):
* dfg/DFGVariableEvent.cpp:
(JSC::DFG::VariableEvent::dump):
(JSC::DFG::VariableEvent::dumpFillInfo):
(JSC::DFG::VariableEvent::dumpSpillInfo):
* dfg/DFGVariableEvent.h:
(VariableEvent):
* disassembler/Disassembler.h:
(JSC):
(JSC::tryToDisassemble):
* disassembler/UDis86Disassembler.cpp:
(JSC::tryToDisassemble):

Source/WTF: 

We have a number of places where we pass around a FILE* as a target to which to print
some logging information. But the purpose of passing FILE* instead of always assuming
that we should dump to stderr is that it may be sometimes useful to send the logging
information elsewhere. Unfortunately, FILE* isn't quite powerful enough: it's combersome
to use it to send logging to a string, for example.
        
We could get around this by using <iostream> and <sstream>, but so far this aspect of
C++ has not been part of the WebKit coding conventions. Personally I find <iostream>
awkward due to its abuse of operator overloading.
        
So this patch introduces the PrintStream abstract class, which offers printf-like
functionality while completely abstracting the destination and mechanism of the printing
output. It would be trivial to implement a StringPrintStream, for example. This will feed
into work on https://bugs.webkit.org/show_bug.cgi?id=102999.
        
This also sets us up for creating templatized print() and println() methods that will
allow us to say things like out.print("count = ", count, "\n"), but that is the topic
of https://bugs.webkit.org/show_bug.cgi?id=103009.
        
This patch also changes dataLog() to use FilePrintStream internally, and WTF::dataFile()
now returns a FilePrintStream&. Any previous users of WTF::dataFile() have been changed
to expect a PrintStream&.

* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/DataLog.cpp:
(WTF):
(WTF::initializeLogFileOnce):
(WTF::initializeLogFile):
(WTF::dataFile):
(WTF::dataLogV):
(WTF::dataLogString):
* wtf/DataLog.h:
(WTF):
* wtf/FilePrintStream.cpp: Added.
(WTF):
(WTF::FilePrintStream::FilePrintStream):
(WTF::FilePrintStream::~FilePrintStream):
(WTF::FilePrintStream::vprintf):
(WTF::FilePrintStream::flush):
* wtf/FilePrintStream.h: Added.
(WTF):
(FilePrintStream):
(WTF::FilePrintStream::file):
* wtf/PrintStream.cpp: Added.
(WTF):
(WTF::PrintStream::PrintStream):
(WTF::PrintStream::~PrintStream):
(WTF::PrintStream::printf):
(WTF::PrintStream::print):
(WTF::PrintStream::println):
(WTF::PrintStream::flush):
(WTF::print):
* wtf/PrintStream.h: Added.
(WTF):
(PrintStream):
(WTF::print):
(WTF::println):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
listMarkerText() should create 8 bit strings when possible
https://bugs.webkit.org/show_bug.cgi?id=103011

Reviewed by Filip Pizlo.

Made processing of marker text items use 8 bit strings where possible in order to reduce 16 bit strings.

Changes covered by existing tests.

* rendering/RenderListMarker.cpp:
(WebCore::toRoman): Changed character constants and buffer to build string to LChar's
(WebCore::toAlphabeticOrNumeric): Made a template based on character type.
(WebCore::toSymbolic): Made a template based on character type.
(WebCore::toAlphabetic): Made a template based on character type.
(WebCore::toNumeric): Added character type template parameter.
(WebCore::listMarkerText): Changed character constants to LChar where possible.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135575.
http://trac.webkit.org/changeset/135575
https://bugs.webkit.org/show_bug.cgi?id=103169

It made all tests assert (Requested by Ossy on #webkit).

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

Source/WebKit/qt:

* Api/qwebpage.cpp:
(QWebPagePrivate::QWebPagePrivate):
* WebCoreSupport/InitWebCoreQt.cpp:
(WebKit::initializeWebKitQt):

Source/WebKit2:

* qt/MainQt.cpp:
(WebKit):
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix unused parameter compile warnings
https://bugs.webkit.org/show_bug.cgi?id=103167

Patch by Kangil Han <kangil.han@samsung.com> on 2012-11-23
Reviewed by Gyuyoung Kim.

Remove compile warning messages by omitting parameter name and using UNUSED_PARAM.

* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(webkitAccessibleHyperlinkIsSelectedLink):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextAfterOffset):
(webkitAccessibleTextGetTextAtOffset):
(webkitAccessibleTextGetTextBeforeOffset):
(webkitAccessibleTextGetOffsetAtPoint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Too many tests come to crashe after build 7830 on
EFL Linux 64-bit Release bot.

* platform/efl-wk1/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135600.
http://trac.webkit.org/changeset/135600
https://bugs.webkit.org/show_bug.cgi?id=103173

It made EFL API test is failed (Requested by gyuyoung_mbp on
#webkit).

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

* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/efl/PlatformUtilities.cpp:
(TestWebKitAPI::Util::sleep):
* TestWebKitAPI/efl/PlatformWebView.cpp:

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

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Make sure the QGLWidget context is current when creating the TextureMapper.
https://bugs.webkit.org/show_bug.cgi?id=103142

When creating the TextureMapperGL for WK1 we have to make sure
that the GL context provided by the QGLWidget is current.
Otherwise the GraphicsContext3DQt created by TextureMapperGL will pick up
the wrong pointer by calling QOpenGLContext::currentContext().

Reviewed by Kenneth Rohde Christiansen.

* WebCoreSupport/PageClientQt.cpp:
(WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Qt build fix:

Make sure QGLWidget definition is available.

* WebCoreSupport/PageClientQt.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It's confusing that return values of 'bool Node::dispatchEvent(...)' and 'bool Node::dispatchMouseEvent(..)' have the opposite meanings.
https://bugs.webkit.org/show_bug.cgi?id=103058

Reviewed by Ojan Vafai.

Refactor MouseEventDispatchMediator::dispatchEvent() and
EventHandler::dispatchMouseEvent() so that they return bool
which has the same meaning of the return value of
Node::dispatchEvent().

No tests. No change in behavior.

* dom/MouseEvent.cpp:
(WebCore::MouseEventDispatchMediator::dispatchEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135648 and r135649.
http://trac.webkit.org/changeset/135648
http://trac.webkit.org/changeset/135649
https://bugs.webkit.org/show_bug.cgi?id=103176

This change cannot be built with a qt-minimal configuration.
(Requested by zalbisser on #webkit).

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

* WebCoreSupport/PageClientQt.cpp:
(WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Check errors in EwkView callbacks usage at compile time
https://bugs.webkit.org/show_bug.cgi?id=103177

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-11-24
Reviewed by Kenneth Rohde Christiansen.

Errors in EwkView callbacks usage are now checked at compile time.

* UIProcess/API/efl/EwkViewCallbacks.h:
(CallBack):
(EwkViewCallbacks::CallBack::CallBack):
(EwkViewCallbacks::CallBack::call):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the --order option to NRWT
https://bugs.webkit.org/show_bug.cgi?id=102229

Reviewed by Dirk Pranke.

The --order option controls in what order the gathered tests will be run.
There are 3 options:
- natural, the tests are sorted in natural order,
- random, the tests are sorted in random order,
- none, the tests are kept in the order in which they were specified through
arguments or the test list.

The natural option is the default one and maintains the current behavior.

The none option is primarily intended to be used with the --test-list option,
with the test list file expected to list specific test names.
When a directory is specified as one of the paths from under which tests should
be gathered and the none option is used, that path will expand to all the tests
under it, with these tests sorted in the natural order.

Using --order=random duplicated the behavior of the --randomize-order option, so
the latter is removed.

This patch also incorporates the change with which makes it is possible to specify
a test via arguments or the test list multiple tests and then have the test run
that many times.

* Scripts/webkitpy/common/find_files.py:
(find): Accept an optional sorting key that is used to sort files found in the directories
that the given paths specify.
(_normalized_find): Both paths that are then searched for the tests and the tests that
were found are now kept in lists. This makes it possible to run a test multiple times
by specifying it multiple times through arguments or the test list file.
(_normalized_find.sort_by_directory_key):
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
(LayoutTestFinder.find_tests): Keep the paths where we should search for tests in a list.
(LayoutTestFinder.skip_tests): Subtracting from a set of paths is necessary.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.__init__): The Sharder class no longer needs a test path separator.
(Sharder.__init__): Ditto.
(Sharder._resize_shards):
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(SharderTests.get_shards): Modify the Shader initializing as required.
(SharderTests.test_multiple_locked_shards): The natural sorting and test name key unit tests
are now moved to the base Port unit tests.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._prepare_lists): Keep the test names in a list. Order that list as specified by
the new --order option.
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.tests): This method should now return a list of all the tests found in the specified
paths.
(Port._real_tests): A list is required, so no conversion to a set is made.
(Port):
(Port.test_key): Place this method here for now, but it should really move into a separate
module.
(Port._natural_sort_key): Ditto.
(Port._natural_sort_key.tryint):
(Port._virtual_tests): A list is required, so the function now operates on that rather than
on a set.
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_find_with_skipped_directories_2): Adjust the test case to check for an empty
list rather than an empty set.
(PortTest.test_dont_require_http_server):
(NaturalCompareTest): The natural sorting unit tests are placed here for now.
(NaturalCompareTest.assert_cmp):
(NaturalCompareTest.test_natural_compare):
(KeyCompareTest): The test name key unit tests are placed here for now.
(KeyCompareTest.assert_cmp):
(KeyCompareTest.test_test_key):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args): Remove the --randomize-order option, it's now possible to replicate its behavior
by using --order=random.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: Add unit tests covering
various aspects of this change.
(MainTest.test_natural_order):
(MainTest):
(MainTest.test_natural_order_test_specified_multiple_times):
(MainTest.test_random_order):
(MainTest.test_random_order_test_specified_multiple_times):
(MainTest.test_no_order):
(MainTest.test_no_order_test_specified_multiple_times):
(MainTest.test_no_order_with_directory_entries_in_natural_order):
* Scripts/webkitpy/tool/commands/queries.py:
(PrintExpectations.execute): Operate on a set of tests when printing out expectations.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: updated expectations for failures in:
* http/tests/local/drag-over-remote-content.html
https://bugs.webkit.org/show_bug.cgi?id=103181
* media/video-seek-past-end-playing.html
https://bugs.webkit.org/show_bug.cgi?id=103183

* platform/chromium/TestExpectations:

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