Build fix: r142549 broke EFL build
https://bugs.webkit.org/show_bug.cgi?id=109527

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2013-02-11
Reviewed by Kentaro Hara.

Source/WebCore:

No new tests, no change on behavior.

* CMakeLists.txt:

Source/WebKit:

Build fix.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Add UnknownError to WebIDBDatabaseException
https://bugs.webkit.org/show_bug.cgi?id=109519

Reviewed by Adam Barth.

* public/WebIDBDatabaseException.h:
* src/AssertMatchingEnums.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] ScheduledAction::m_context can be empty, so we shouldn't
retrieve an Isolate by using m_context->GetIsolate()
https://bugs.webkit.org/show_bug.cgi?id=109523

Reviewed by Adam Barth.

Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges

Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
This can crash because ScheduledAction::m_context can be empty. Specifically,
ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
which can return an empty handle when a frame does not exist. In addition,
'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.

Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.

No tests. The Chromium crash report doesn't provide enough information
to reproduce the bug.

* bindings/v8/ScheduledAction.cpp:
(WebCore::ScheduledAction::ScheduledAction):
(WebCore):
(WebCore::ScheduledAction::~ScheduledAction):
* bindings/v8/ScheduledAction.h:
(ScheduledAction):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::WindowSetTimeoutImpl):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::SetTimeoutOrInterval):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled Chromium DEPS to r181817.  Requested by
"James Robinson" <jamesr@chromium.org> via sheriffbot.

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
https://bugs.webkit.org/show_bug.cgi?id=109127

Reviewed by Dean Jackson.

No new tests. Built and tested WebKit and Chromium with this change.

* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore):
    Define temporary typedef spanning int -> size_t change.
(WebCore::getValidationResultValue):
(WebCore::getSymbolInfo):
    Use temporary typedef.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add WebUnitTestSupport::createLayerTreeViewForTesting for webkit_unit_tests
https://bugs.webkit.org/show_bug.cgi?id=109403

Reviewed by Adam Barth.

Source/Platform:

webkit_unit_tests that need compositing support need only a simple WebLayerTreeView implementation, not the full
thing.

* chromium/public/WebCompositorSupport.h:
(WebCompositorSupport):
(WebKit::WebCompositorSupport::createLayerTreeView):
* chromium/public/WebUnitTestSupport.h:
(WebKit):
(WebUnitTestSupport):
(WebKit::WebUnitTestSupport::createLayerTreeViewForTesting):

Source/WebKit/chromium:

* tests/GraphicsLayerChromiumTest.cpp:
(WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
* tests/ScrollingCoordinatorChromiumTest.cpp:
(WebKit::FakeWebViewClient::initializeLayerTreeView):

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

Broke the build, won't compile. (Requested by alancutter on
#webkit).

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

Source/Platform:

* chromium/public/WebCompositorSupport.h:
(WebCompositorSupport):
(WebKit::WebCompositorSupport::createLayerTreeView):
* chromium/public/WebUnitTestSupport.h:

Source/WebKit/chromium:

* tests/GraphicsLayerChromiumTest.cpp:
(WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
* tests/ScrollingCoordinatorChromiumTest.cpp:
(WebKit::FakeWebViewClient::initializeLayerTreeView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r142549): Remove web intents code
https://bugs.webkit.org/show_bug.cgi?id=109532

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2013-02-11
Reviewed by Nico Weber.

Remove remaning code related to web intents.

No new tests, no change on behavior.

* UseJSC.cmake:
* bindings/js/JSIntentConstructor.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Apply page scale to all WebInputEvent types
https://bugs.webkit.org/show_bug.cgi?id=109370

Reviewed by James Robinson.

Previously we only adjusted a few common input event types by page
scale, but in fact almost every position and size in WebInputEvents
requires it.

I also took the opportunity to change some WebGestureEvent members to
floats (which I checked causes no warnings in Chromium-side code with
GCC or Clang).

New WebInputEventConversionTest: InputEventsScaling

* public/WebInputEvent.h:
(WebKit::WebGestureEvent::WebGestureEvent):
* src/WebInputEventConversion.cpp:
(WebKit::widgetScaleFactor):
(WebKit):
(WebKit::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
(WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
(WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
(WebKit::PlatformTouchPointBuilder::PlatformTouchPointBuilder):
(WebKit::updateWebMouseEventFromWebCoreMouseEvent):
(WebKit::WebMouseEventBuilder::WebMouseEventBuilder):
(WebKit::addTouchPoints):
(WebKit::WebTouchEventBuilder::WebTouchEventBuilder):
(WebKit::WebGestureEventBuilder::WebGestureEventBuilder):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
(WebKit::WebViewImpl::hasTouchEventHandlersAt):
(WebKit::WebViewImpl::handleInputEvent):
* tests/WebInputEventConversionTest.cpp:
(WebCore::TEST):
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
https://bugs.webkit.org/show_bug.cgi?id=109158

Reviewed by Kent Tamura.

Source/WebCore:

The calendar picker button's icon and position where wrong when rtl.

Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html

* Resources/pagepopups/calendarPicker.css:
(.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
(.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
(.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
* Resources/pagepopups/calendarPicker.js:
(YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
(YearMonthController.prototype._attachRightButtonsTo): Ditto.

LayoutTests:

* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png: Added.
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png:
* platform/chromium/TestExpectations:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split each RuleSet and feature out from StyleResolver into its own class.
https://bugs.webkit.org/show_bug.cgi?id=107777

Reviewed by Dimitri Glazkov.

Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.

No tests. No change in behavior.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/DocumentRuleSets.cpp: Added.
(WebCore):
(WebCore::DocumentRuleSets::DocumentRuleSets):
(WebCore::DocumentRuleSets::~DocumentRuleSets):
(WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
(WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
(WebCore::makeRuleSet): Ditto.
(WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
(WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
(WebCore::DocumentRuleSets::collectFeatures): Ditto.
(WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
* css/DocumentRuleSets.h: Added.
(WebCore):
(DocumentRuleSets):
(WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
(WebCore::DocumentRuleSets::userStyle): Ditto.
(WebCore::DocumentRuleSets::features): Ditto.
(WebCore::DocumentRuleSets::sibling): Ditto.
(WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
(WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
(WebCore::StyleResolver::matchUserRules): Ditto.
(WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
(WebCore::StyleResolver::locateCousinList): Ditto.
(WebCore::StyleResolver::canShareStyleWithElement): Ditto.
(WebCore::StyleResolver::locateSharedStyle): Ditto.
(WebCore::StyleResolver::styleForPage): Ditto.
(WebCore::StyleResolver::checkRegionStyle): Ditto.
(WebCore::StyleResolver::applyProperty): Ditto.
(WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
* css/StyleResolver.h:
(WebCore::StyleResolver::scopeResolver):
(StyleResolver):
(WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
(WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
(WebCore::StyleResolver::usesFirstLineRules): Ditto.
(WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
(WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
(WebCore::StyleResolver::hasSelectorForClass): Ditto.
(WebCore::StyleResolver::hasSelectorForId): Ditto.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] setCookiesFromDOM function does not save cookies to disk.
https://bugs.webkit.org/show_bug.cgi?id=109285

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-02-11
Reviewed by Brent Fulgham.

Write cookies to disk by using the Curl easy api.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::setCookiesFromDOM):Write cookie to disk.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
(WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
* platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Factor EventContext and introduces MouseOrFocusEventContext.
https://bugs.webkit.org/show_bug.cgi?id=109278

Reviewed by Dimitri Glazkov.

To supoort Touch event retargeting (bug 107800), we have to factor
event retargeting code so that it can support not only MouseEvent or FocusEvent,
but also other events.

This is the first attempt to refactor event retargeting code, a
separated patch from bug 109156.  EventContext is now factored and
MouseOrFocusEventContext was introduced to support MouseEvent or
FocusEvent separately.

In following patches, I'll introduce TouchEventContext and
TouchEventDispatchMediator to support Touch event retargeting.

No new tests. No change in functionality.

* dom/EventContext.cpp:
(WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
(WebCore::EventContext::~EventContext):
(WebCore):
(WebCore::EventContext::handleLocalEvents):
(WebCore::EventContext::isMouseOrFocusEventContext):
(WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):  New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
(WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
(WebCore::MouseOrFocusEventContext::handleLocalEvents):
(WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
* dom/EventContext.h:
(EventContext):
(WebCore::EventContext::node):
(WebCore::EventContext::target):
(WebCore::EventContext::currentTargetSameAsTarget):
(WebCore):
(MouseOrFocusEventContext):
(WebCore::MouseOrFocusEventContext::relatedTarget):
(WebCore::MouseOrFocusEventContext::setRelatedTarget):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedTargetAdjuster::adjust):
(WebCore::EventDispatcher::adjustRelatedTarget):
(WebCore::EventDispatcher::ensureEventPath):  Renamad from ensureEventAncestors. Use the DOM Core terminology.
(WebCore::EventDispatcher::dispatchEvent):
(WebCore::EventDispatcher::dispatchEventAtCapturing):
(WebCore::EventDispatcher::dispatchEventAtTarget):
(WebCore::EventDispatcher::dispatchEventAtBubbling):
(WebCore::EventDispatcher::dispatchEventPostProcess):
(WebCore::EventDispatcher::topEventContext):
* dom/EventDispatcher.h:
(EventRelatedTargetAdjuster):
(EventDispatcher):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::eventHasListeners):
(WebCore::InspectorInstrumentation::willDispatchEventImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willDispatchEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
https://bugs.webkit.org/show_bug.cgi?id=109534

Reviewed by Anders Carlsson.

Source/WebCore: 

* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::show):
* editing/Editor.cpp:
(WebCore):
* editing/Editor.h:
(Editor):
* loader/EmptyClients.h:
(WebCore::EmptyEditorClient::shouldDeleteRange):
(EmptyEditorClient):
(WebCore::EmptyEditorClient::shouldShowDeleteInterface):
* page/EditorClient.h:
(EditorClient):

Source/WebKit/blackberry: 

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore):
* WebCoreSupport/EditorClientBlackBerry.h:
(EditorClientBlackBerry):

Source/WebKit/chromium: 

* src/EditorClientImpl.cpp:
(WebKit):
* src/EditorClientImpl.h:
(EditorClientImpl):

Source/WebKit/efl: 

* WebCoreSupport/EditorClientEfl.cpp:
(WebCore):
* WebCoreSupport/EditorClientEfl.h:
(EditorClientEfl):

Source/WebKit/gtk: 

* WebCoreSupport/EditorClientGtk.cpp:
(WebKit):
* WebCoreSupport/EditorClientGtk.h:
(EditorClient):
* webkit/webkitwebview.cpp:
(webkit_web_view_class_init):

Source/WebKit/mac: 

* WebCoreSupport/WebEditorClient.h:

Source/WebKit/qt: 

* WebCoreSupport/EditorClientQt.cpp:
(WebCore):
* WebCoreSupport/EditorClientQt.h:
(EditorClientQt):

Source/WebKit/win: 

* WebCoreSupport/WebEditorClient.cpp:
* WebCoreSupport/WebEditorClient.h:
(WebEditorClient):

Source/WebKit/wince: 

* WebCoreSupport/EditorClientWinCE.cpp:
(WebKit):
* WebCoreSupport/EditorClientWinCE.h:
(EditorClientWinCE):

Source/WebKit/wx: 

* WebKitSupport/EditorClientWx.cpp:
(WebCore):
* WebKitSupport/EditorClientWx.h:
(EditorClientWx):

Source/WebKit2: 

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit):
* WebProcess/WebCoreSupport/WebEditorClient.h:

Source/WTF: 

* wtf/Platform.h:

Tools: 

* DumpRenderTree/gtk/EditingCallbacks.cpp:
(shouldShowDeleteInterfaceForElement):


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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: remove the DidChangeScrollPosition message.
https://bugs.webkit.org/show_bug.cgi?id=108051

Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-11
Reviewed by Noam Rosenthal.
Signed off for WebKit2 by Benjamin Poulain.

Currently, we use the DidChangeScrollPosition message to send the scroll
position that WebCore used in this frame to UI Process. We had to have
some member variables for the DidChangeScrollPosition message.
However, we can send a scroll position via the DidRenderFrame message,
because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
updated at the moment of flushing. So we can remove the
DidChangeScrollPosition message and some redundant member variables.

Source/WebCore:

No tests. No change in behavior.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::flushLayerChanges):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(CoordinatedGraphicsScene):

Source/WebKit2:

* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::didRenderFrame):
(WebKit):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
(CoordinatedLayerTreeHostProxy):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
  Remove the DidChangeScrollPosition message.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
  Send a scroll position via the DidChangeScrollPosition message.
(WebKit::CoordinatedLayerTreeHost::syncLayerState):
  Don't send a scroll position because flushPendingLayerChanges() does
  that. In addition, it is weird to check if we must send a scroll
  position at the moment of sending the SyncLayerState message of every
  layers.
(WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
https://bugs.webkit.org/show_bug.cgi?id=108922

Source/WebCore:

Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-11
Reviewed by Noam Rosenthal.

Currently, CoordinatedGraphicsScene has two methods to know contents
size: setContentsSize() and setVisibleContentsRect(). Contents size is
used when adjusting a scroll position, but adjustment is not needed
because EFL and Qt platform code (currently PageViewportController)
already adjusts a scroll position, and it is natural for each platform
to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
not know contents size.

In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
to get CoordinatedGraphicsScene.

This patch can only be tested manually since there is no automated
testing facilities for in-motion touch.
Test: ManualTests/fixed-position.html
      ManualTests/nested-fixed-position.html

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setScrollPosition):
(WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(CoordinatedGraphicsScene):

Source/WebKit2:

Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-11
Reviewed by Noam Rosenthal.
Signed off for WebKit2 by Benjamin Poulain.

Currently, CoordinatedGraphicsScene has two methods to know contents
size: setContentsSize() and setVisibleContentsRect(). Contents size is
used when adjusting a scroll position, but adjustment is not needed
because EFL and Qt platform code (currently PageViewportController)
already adjusts a scroll position, and it is natural for each platform
to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
not know contents size.

In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
to get CoordinatedGraphicsScene.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPagePrivate::updateSize):
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebView::setSize):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
(CoordinatedLayerTreeHostProxy):
* UIProcess/efl/PageClientLegacyImpl.cpp:
(WebKit::PageClientLegacyImpl::didChangeContentsSize):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeContentsSize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Track language selection should be sticky
https://bugs.webkit.org/show_bug.cgi?id=109466

Reviewed by Dean Jackson.

.: 

* Source/autotools/symbols.filter: Export PageGroup::captionPreferences and Page::initGroup.

Source/WebCore: 

Choosing a text track from the caption menu should make that track's language the
preferred caption language. Turning captions off from the menu should disable captions
in videos loaded subsequently.

OS X has system support for these settings, so changes made by DRT should not change the
settings on the user's system. Add support for all other ports in DRT only.

Test: media/track/track-user-preferences.html

* WebCore.exp.in: Export PageGroup::captionPreferences().

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
(WebCore::HTMLMediaElement::attach): Ditto.
(WebCore::HTMLMediaElement::detach): Ditto.
(WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
    preferredLanguageFromList change.
(WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
    caption language as appropriate.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
(WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().

* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.

* page/CaptionUserPreferences.h:
(WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
(WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
(WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
(WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
(WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
(WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
(WebCore::CaptionUserPreferences::testingMode): Ditto.
(WebCore::CaptionUserPreferences::setTestingMode): Ditto.
(WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.

* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
(WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
(WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
(WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
    registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
(WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
    unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
(WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
(WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
(WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.

* page/PageGroup.cpp:
(WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
    available from the caption preference object.
(WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::PageGroup::userPrefersCaptions): Ditto.
(WebCore::PageGroup::userHasCaptionPreferences): Ditto.
(WebCore::PageGroup::captionFontSizeScale): Ditto.
* page/PageGroup.h:

* platform/Language.cpp:
(WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
    the system list.
* platform/Language.h:

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState): Disable caption testing mode.
(WebCore::Internals::Internals): Enable caption testing mode so the user's system
    preferences are not modified.

LayoutTests: 

* media/track/track-user-preferences-expected.txt: Added.
* media/track/track-user-preferences.html: Added.

* platform/chromium/TestExpectations: Skip new test, it depends on the track menu.
* platform/efl/TestExpectations: Ditto.
* platform/gtk/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add WebUnitTestSupport::createLayerTreeViewForTesting for webkit_unit_tests
https://bugs.webkit.org/show_bug.cgi?id=109403

Reviewed by Adam Barth.

Source/Platform:

webkit_unit_tests that need compositing support need only a simple WebLayerTreeView implementation, not the full
thing.

* chromium/public/WebCompositorSupport.h:
(WebCompositorSupport):
(WebKit::WebCompositorSupport::createLayerTreeView):
* chromium/public/WebUnitTestSupport.h:
(WebKit):
(WebUnitTestSupport):
(WebKit::WebUnitTestSupport::createLayerTreeViewForTesting):

Source/WebKit/chromium:

* tests/GraphicsLayerChromiumTest.cpp:
(WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
* tests/ScrollingCoordinatorChromiumTest.cpp:
(WebKit::FakeWebViewClient::initializeLayerTreeView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Get rid of WebAnimationController
https://bugs.webkit.org/show_bug.cgi?id=109235

Patch by James Robinson <jamesr@chromium.org> on 2013-02-11
Reviewed by Benjamin Poulain.

Source/WebKit/chromium:

* public/WebAnimationController.h: Removed.
* public/WebFrame.h:
(WebFrame):
* src/WebAnimationControllerImpl.cpp: Removed.
* src/WebAnimationControllerImpl.h: Removed.
* src/WebFrameImpl.cpp:
* src/WebFrameImpl.h:
(WebFrameImpl):

Tools:

* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::TestRunner):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(TestRunner):

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