Add optional debug logging when we fall into/out of threaded scrolling
https://bugs.webkit.org/show_bug.cgi?id=93898
<rdar://problem/12089098>

Reviewed by Simon Fraser.

Add logging when we enter and exit the threaded scrolling mode, and logs the reasons we
fall into main-thread scrolling.

The logging output looks like this:
    SCROLLING: Switching to main-thread scrolling mode. Time: 15843.554718 Reason(s): viewport-constrained objects
    SCROLLING: Switching to threaded scrolling mode. Time: 15844.550866
    SCROLLING: Switching to main-thread scrolling mode. Time: 15845.551214 Reason(s): viewport-constrained objects
    SCROLLING: Switching to threaded scrolling mode. Time: 15846.552619
    SCROLLING: Switching to main-thread scrolling mode. Time: 15847.553587 Reason(s): viewport-constrained objects
    SCROLLING: Switching to threaded scrolling mode. Time: 15848.554084

No new tests, as this is just debugging logging.

* WebCore.xcodeproj/project.pbxproj:
Expose ScrollingTreeState.h as a private header.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
(WebCore::ScrollingTreeNode::update):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThreadReason):
(ScrollingTreeNode):
* page/scrolling/ScrollingTreeState.cpp:
(WebCore::ScrollingTreeState::ScrollingTreeState):
(WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThreadReason):
* page/scrolling/ScrollingTreeState.h:
(WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThreadReason):
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason):
Rename updateShouldUpdateScrollLayerPositionOnMainThread to updateShouldUpdateScrollLayerPositionOnMainThreadReason (and related).

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::hasNonLayerViewportConstrainedObjects):
Renamed from hasNonLayerFixedObjects to match the rest of the renames going on.
(WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThreadReason):
Construct a bitfield describing the reasons we fall into main-thread scrolling mode.

* page/scrolling/ScrollingTreeState.h:
(ScrollingTreeState):
Add ReasonsForUpdatingScrollLayerPositionOnMainThread enum, with the current reasons that we might fallback to main-thread scrolling.

* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore):
(WebCore::ScrollingTreeNodeMac::update): Log every time scrolling mode changes.
(WebCore::ScrollingTreeNodeMac::scrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
(WebCore::logThreadedScrollingMode): Pretty-print the scrolling mode and shouldUpdateScrollLayerPositionOnMainThreadReason.

Update the scrolling tree's scrollingPerformanceLoggingEnabled preference
before the early-return if we don't have layer debugging borders on.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make CSSPrimitiveValue::cleanup() handle all UnitTypes, fixing memory leak in the process.
https://bugs.webkit.org/show_bug.cgi?id=95938

Reviewed by Andreas Kling.

Several unit types have been added without updating the cleanup function, including CSS_VARIABLE_NAME.
I've added all the existing unit types back in and cast m_primitiveUnitType (a bitfield in CSSValue)
to the enum type to ensure the compiler catches any future errors.

No test added, but switch made to use enum type so we can't accidentally fail to update this function again.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cleanup):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Support the permission function of the Web Notification.
https://bugs.webkit.org/show_bug.cgi?id=90603

Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-09-07
Reviewed by Gyuyoung Kim.

Implement permission related functions of Web Notifications.
checkPermission for Notification.permissionLevel().
requestPermission for Notification.requestPermission().
In addition, if the application(like a browser) has permitted domains already,
it can be cached using ewk_view_notification_permissions_store.

* WebCoreSupport/NotificationPresenterClientEfl.cpp:
(WebCore::NotificationPresenterClientEfl::NotificationPresenterClientEfl):
(WebCore::NotificationPresenterClientEfl::requestPermission):
(WebCore::NotificationPresenterClientEfl::checkPermission):
(WebCore::NotificationPresenterClientEfl::addToPermissionCache):
(WebCore):
(WebCore::NotificationPresenterClientEfl::setPermission):
* WebCoreSupport/NotificationPresenterClientEfl.h:
(WebCore):
(NotificationPresenterClientEfl):
(WebCore::NotificationPresenterClientEfl::requestPermission):
(WebCore::NotificationPresenterClientEfl::cancelRequestsForPermission):
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
(ewk_view_notification_permission_store):
(ewk_view_notification_permissions_set):
(ewk_view_notification_permission_request):
* ewk/ewk_view.h:
* ewk/ewk_view_private.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Scrolling performance logging should use WTFLogAlways instead of printf
https://bugs.webkit.org/show_bug.cgi?id=96080

Reviewed by Dan Bernstein.

Use WTF logging facilities instead of printf() for scrolling performance logging.

* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore::ScrollingTreeNodeMac::logExposedUnfilledArea):
* platform/graphics/ca/mac/WebTileLayer.mm:
(-[WebTileLayer logFilledFreshTile]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Use ASCIILiteral for cursorStringMap.
https://bugs.webkit.org/show_bug.cgi?id=96072

Reviewed by Gyuyoung Kim.

This patch converts static strings of cursorStringMap to use ASCIILiteral
as recommended by http://trac.webkit.org/wiki/EfficientStrings.

* platform/efl/EflScreenUtilities.cpp:
(WebCore::CursorMap::CursorMap):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add APIs to enable or disable the mouse events of the ewk_view.
https://bugs.webkit.org/show_bug.cgi?id=88631

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2012-09-07
Reviewed by Gyuyoung Kim.

We can turn on/off the mouse events of the ewk_view using the mouse
events enabling API. This API can be used when we want to turn off the
mouse events on the touchscreen device to process the touch events
instead of the mouse events.

* UIProcess/API/efl/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_Ewk_View_Private_Data::_Ewk_View_Private_Data):
(_ewk_view_smart_add):
(ewk_view_mouse_events_enabled_set):
(ewk_view_mouse_events_enabled_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

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