build-webkit: rename --template-tag to --template-element to match ENABLE #define name
https://bugs.webkit.org/show_bug.cgi?id=105072

Reviewed by Laszlo Gombos.

* Scripts/webkitperl/FeatureList.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for tracking hit test rectangles to enable fast event rejection in the compositor
https://bugs.webkit.org/show_bug.cgi?id=103914

Reviewed by James Robinson.

Source/WebCore:

Adding support for tracking hit test target regions for the purpose of performing initial hit testing
in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that
aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main
thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event
region. This patch includes the implementation to turn this on in Chromium.

To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers
instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor
when new touch event handlers are registered or removed, or after layout much like how
nonFastScrollableRegions are currently tracked.

This implementation will not properly update the hit test rects when the renderers are inside a sub-
tree that scrolls.

This change was initially rolled out due to stale Node pointers in Document's touchEventTargets. This
patch adds a callback to remove the Node from that structure to Node's destructor. This is covered
by the touch-target-removed-crash.html test case which is also added.

Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
      platform/chromium/fast/events/touch/touch-target-removed-crash.html

* dom/Document.cpp:
(WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets
are stored as the Document they point to.
(WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and
to update the ScrollingCoordinator with the change.
(WebCore::Document::didRemoveTouchEventHandler): Ditto.
* dom/Document.h:
(WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so
expose whether there are any or not.
(WebCore::Document::touchEventTargets):
* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::updateType):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow.
(WebCore::DOMWindow::removeEventListener):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent):
* page/Frame.cpp:
(WebCore::Frame::setDocument):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler
nodes and generate the absolute hit testing rects.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to
the scrolling tree/compositor.
(ScrollingCoordinator):
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged):
(WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
(WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects):
* page/scrolling/chromium/ScrollingCoordinatorChromium.h:
(ScrollingCoordinatorChromium):
* testing/Internals.cpp:
(WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since
it's no longer stored as an int in Document.
(WebCore::Internals::touchEventTargetClientRects):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit/chromium:

Enabling touch event target region tracking.

* features.gypi:
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::requestTouchEventType):
(WebKit::WebPluginContainerImpl::~WebPluginContainerImpl):

LayoutTests:

* platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: Added.
* platform/chromium/fast/events/touch/compositor-touch-hit-rects.html: Added.
* platform/chromium/fast/events/touch/touch-target-removed-crash-expected.txt: Added.
* platform/chromium/fast/events/touch/touch-target-removed-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Prevent CookieManager from blocking the WKT thread
https://bugs.webkit.org/show_bug.cgi?id=105111

Prevent CookieManager from blocking the WKT Thread.

PR 265603

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-12-17
Reviewed by Rob Buis.

Adding some guards to CookieManager so it will return immedately
if getCookie functions are called when the database isn't loaded yet.

setCookie functions will be redispatched until the database is ready.

* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::CookieManager):
(WebCore::CookieManager::setCookies):
(WebCore::CookieManager::getCookie):
(WebCore::CookieManager::generateHtmlFragmentForCookies):
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::removeAllCookies):
(WebCore::CookieManager::getBackingStoreCookies):
(WebCore::CookieManager::setPrivateMode):
(WebCore::CookieManager::removeCookieWithName):
* platform/blackberry/CookieManager.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: move --lint-test-files code into its own module
https://bugs.webkit.org/show_bug.cgi?id=105077

Reviewed by Eric Seidel.

It really didn't need to be in run_webkit_tests.py anymore.
This patch adds a new lint-test-expectations scripts to Tools/Scripts;
rwt --lint-test-files is still supported for backwards compatibility
for now.

* Scripts/lint-test-expectations: Added.
* Scripts/webkitpy/layout_tests/lint_test_expectations.py: Added.
(lint):
(main):
* Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py: Added.
(FakePort):
(FakePort.__init__):
(FakePort.test_configuration):
(FakePort.expectations_dict):
(FakePort.skipped_layout_tests):
(FakePort.all_test_configurations):
(FakePort.configuration_specifier_macros):
(FakePort.get_option):
(FakeFactory):
(FakeFactory.__init__):
(FakeFactory.get):
(FakeFactory.all_port_names):
(LintTest):
(LintTest.test_all_configurations):
(LintTest.test_lint_test_files):
(LintTest.test_lint_test_files__errors):
(MainTest):
(MainTest.test_success):
(MainTest.test_success.interrupting_lint):
(MainTest.test_success.successful_lint):
(MainTest.test_success.exception_raising_lint):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(main):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(StreamTestingMixin.assertNotEmpty):

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