[Qt] Expose useful WebCore::Settings
https://bugs.webkit.org/show_bug.cgi?id=100239

Reviewed by Kenneth Rohde Christiansen.

Expose the two settings CaretBrowsingEnabled and NotificationsEnabled.

Source/WebKit/qt:

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
(QWebSettings::QWebSettings):
* Api/qwebsettings.h:

Source/WebKit2:

* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferences::caretBrowsingEnabled):
(QWebPreferences::setCaretBrowsingEnabled):
(QWebPreferences::notificationsEnabled):
(QWebPreferences::setNotificationsEnabled):
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/API/qt/qwebpreferences_p_p.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: UiSourceCode should rely on the workspace as a content provider.
https://bugs.webkit.org/show_bug.cgi?id=100216

Reviewed by Pavel Feldman.

Source/WebCore:

Workspace is now passed to UISourceCode to be used as a content provider.
Content providers are now stored in the workspace/project.
Next step would be to move content providers to workspace providers.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.breakpointStorageId):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
(WebInspector.UISourceCode.prototype.contentType):
(WebInspector.UISourceCode.prototype.requestContent):
(WebInspector.UISourceCode.prototype.requestOriginalContent):
(WebInspector.UISourceCode.prototype._commitContent):
(WebInspector.UISourceCode.prototype.searchInContent):
* inspector/front-end/Workspace.js:
(WebInspector.WorkspaceController.prototype._mainFrameNavigated):
(WebInspector.Project):
(WebInspector.Project.prototype.addUISourceCode):
(WebInspector.Project.prototype.removeUISourceCode):
(WebInspector.Project.prototype.uiSourceCodes):
(WebInspector.Project.prototype.requestFileContent):
(WebInspector.Project.prototype.searchInFileContent):
(WebInspector.Workspace):
(WebInspector.Workspace.prototype.addTemporaryUISourceCode):
(WebInspector.Workspace.prototype.removeTemporaryUISourceCode):
(WebInspector.Workspace.prototype.reset):

LayoutTests:

* http/tests/inspector/compiler-script-mapping.html:
* inspector/debugger/breakpoint-manager.html:
* inspector/debugger/script-formatter-search.html:
* inspector/debugger/scripts-file-selector.html:
* inspector/debugger/scripts-panel.html:
* inspector/debugger/scripts-sorting.html:
* inspector/debugger/ui-source-code-display-name.html:
* inspector/debugger/ui-source-code.html:
* inspector/uisourcecode-revisions.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Styles pane: Don't select whole value when I select just a part
https://bugs.webkit.org/show_bug.cgi?id=100242

Patch by Nikita Vasilyev <me@elv1s.ru> on 2012-10-24
Reviewed by Alexander Pavlov.

* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
(WebInspector.StylePropertyTreeElement.prototype):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Introduce workspace provider as a content providing backend for project.
https://bugs.webkit.org/show_bug.cgi?id=100244

Reviewed by Pavel Feldman.

Source/WebCore:

Introduced WorkspaceProvider interface as a content providing backend for project.
Added NetworkWorkspaceProvider as a network based (default) implementation.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/CompilerScriptMapping.js:
(WebInspector.CompilerScriptMapping):
* inspector/front-end/DebuggerScriptMapping.js:
(WebInspector.DebuggerScriptMapping):
* inspector/front-end/NetworkUISourceCodeProvider.js:
(WebInspector.NetworkUISourceCodeProvider):
(WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
(WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
* inspector/front-end/NetworkWorkspaceProvider.js: Added.
(WebInspector.NetworkWorkspaceProvider):
(WebInspector.NetworkWorkspaceProvider.prototype.requestFileContent):
(WebInspector.NetworkWorkspaceProvider.prototype.setFileContent):
(WebInspector.NetworkWorkspaceProvider.prototype.searchInFileContent):
(WebInspector.NetworkWorkspaceProvider.prototype.addFile):
(WebInspector.NetworkWorkspaceProvider.prototype.removeFile):
(WebInspector.NetworkWorkspaceProvider.prototype.reset):
* inspector/front-end/SASSSourceMapping.js:
(WebInspector.SASSSourceMapping):
(_bindUISourceCode):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel):
(WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/Workspace.js:
(WebInspector.FileDescriptor):
(WebInspector.WorkspaceProvider):
(WebInspector.WorkspaceProvider.prototype.requestFileContent):
(WebInspector.WorkspaceProvider.prototype.searchInFileContent):
(WebInspector.WorkspaceProvider.prototype.addEventListener):
(WebInspector.WorkspaceProvider.prototype.removeEventListener):
(WebInspector.Project):
(WebInspector.Project.prototype.reset):
(WebInspector.Project.prototype._fileAdded):
(WebInspector.Project.prototype._fileRemoved):
(WebInspector.Project.prototype.requestFileContent):
(WebInspector.Project.prototype.searchInFileContent):
(WebInspector.Workspace):
(WebInspector.Workspace.prototype.addProject):
(WebInspector.Workspace.prototype.project):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:

LayoutTests:

* http/tests/inspector/compiler-script-mapping.html:
* http/tests/inspector/workspace-test.js:
(initialize_WorkspaceTest.InspectorTest.createWorkspace):
(initialize_WorkspaceTest.InspectorTest.addMockUISourceCodeToWorkspace):
* inspector/debugger/network-uisourcecode-provider.html:
* inspector/debugger/script-snippet-model.html:
* inspector/debugger/scripts-panel.html:
* inspector/uisourcecode-revisions.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow ports to override text track rendering style
https://bugs.webkit.org/show_bug.cgi?id=97800
<rdar://problem/12044964>

Reviewed by Maciej Stachowiak.

Source/WebCore:

* WebCore.exp.in: Export new WebkitSystemInterface functions.
* WebCore.xcodeproj/project.pbxproj: Add CaptionUserPreferences.h, CaptionUserPreferencesMac.mm,
    and CaptionUserPreferencesMac.h.

* css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
    background, and text independently.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
(WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
(WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
(WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
(WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
(WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
    un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
(WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from
    setClosedCaptionsVisible
* html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
    variable. Get caption font scale from theme instead of hard coding.
* html/shadow/MediaControlElements.h:

* html/track/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Change attributes from String to AtomicString.
(WebCore::TextTrack::isValidKindKeyword): Ditto.
(WebCore::TextTrack::setKind): Ditto.
(WebCore::TextTrack::setMode): Ditto.
(WebCore::TextTrack::mode): Ditto.
* html/track/TextTrack.h:
(WebCore::TextTrack::create): Ditto.
(WebCore::TextTrack::kind): Ditto.
(WebCore::TextTrack::label): Ditto.
(WebCore::TextTrack::setLabel): Ditto.
(WebCore::TextTrack::language): Ditto.
(WebCore::TextTrack::setLanguage): Ditto.

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
(WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the
    shadow pseudo id so it can be used elsewhere.
(WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
(WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the
    shadow pseudo id so it can be used elsewhere.
(WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
(WebCore::TextTrackCue::updateDisplayTree):
* html/track/TextTrackCue.h:

* page/CaptionUserPreferences.h: Added.
* page/CaptionUserPreferencesMac.h: Added.
* page/CaptionUserPreferencesMac.mm: Added.
(WebCore::userCaptionPreferencesChangedNotificationCallback):
(WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac):
(WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac):
(WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): New, passthrough to WKSI function.
(WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Ditto.
(WebCore::CaptionUserPreferencesMac::captionsWindowColor): Return Color with user's caption window color preference.
(WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption
    background color preference.
(WebCore::CaptionUserPreferencesMac::captionsTextColor): Return Color with user's caption text color preference.
(WebCore::CaptionUserPreferencesMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
(WebCore::CaptionUserPreferencesMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
    or webkit-text-stroke property.
(WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property
    with a color value.
(WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption
    text with the user's preferred text edge stye.
(WebCore::CaptionUserPreferencesMac::captionsDefaultFont): Return a String with css to style caption
    text with the user's preferred font.
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Return a String with css to style captions
    with the user's preferred style.
(WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Return the user's preferred caption font scale.
(WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Notify listeners of caption preference change.
(WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences
    changes listener.
(WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
    changes listener.
(WebCore::CaptionUserPreferencesMac::updateCaptionStyleSheetOveride): New, if theme has a captions style sheet override,
    inject it into the current page group, otherwise remove injected sheet.

* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferences):
(WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): New, passthrough to platform specific function
    of the same name.
(WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::PageGroup::userPrefersCaptions): Ditto.
(WebCore::PageGroup::userHasCaptionPreferences): Ditto.
(WebCore::PageGroup::captionFontSizeScale): Ditto.
* page/PageGroup.h:

* platform/mac/WebCoreSystemInterface.h: Updated.
* platform/mac/WebCoreSystemInterface.mm: Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize new WKSI function pointers.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize new WKSI function pointers.

WebKitLibraries:

Update WKSI header with SPI for getting the user caption appearance preferences.

* WebKitSystemInterface.h:

LayoutTests:

* media/track/track-cue-rendering-expected.txt: Update results for caption css changes.
* media/track/track-cue-rendering.html:
* platform/chromium/TestExpectations: Skip tests that need to be rebaselined.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
https://bugs.webkit.org/show_bug.cgi?id=100243

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-10-24
Reviewed by Kenneth Rohde Christiansen.

.:

Search for X11 development libraries (and thus Xext), necessary to
disable the X extensions error reporting.

* Source/cmake/OptionsEfl.cmake:

Source/WebKit2:

These errors generate noise on the reports and in some cases, like when
running perf tests, makes the test fail. By using Xext, we can add a
dummy handler to ignore these errors.

* PlatformEfl.cmake:
* WebProcess/efl/WebProcessMainEfl.cpp:
(dummyExtensionErrorHandler):
(WebKit::WebProcessMainEfl):

Tools:

These errors generate noise on the reports and in some cases, like when
running perf tests, makes the test fail. By using Xext, we can add a
dummy handler to ignore these errors.

We could have added this handler on the top level EWK API, but that
would be intrusive and could override handlers defined by the user.

* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/efl/main.cpp:
(dummyExtensionErrorHandler):
(main):

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

* platform/efl-wk1/TestExpectations: Marking shadow-dom failures after r132303
* platform/efl-wk2/TestExpectations: Marking focus failure after r132342 and drag-select failure between r132333-r132343.

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