[BlackBerry] Crash running layout tests
https://bugs.webkit.org/show_bug.cgi?id=114503

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-12
Reviewed by Xan Lopez.

Hit an assertion in ~GuardedPointerBase when DRT is
deleted. DumpRenderTree class derives from
BlackBerry::Platform::LayoutTestClient that derives from
BlackBerry::Platform::GuardedPointerBase, so the DRT pointer
should no be released with delete but with
BlackBerry::Platform::deleteGuardedObject().

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r145869): Right-click on SWF contents displays the context menu at the wrong place.
<http://webkit.org/b/113836>
<rdar://problem/13587624>

Reviewed by Anders "Wesley Crusher" Carlsson.

Mac plugins expect flipped-Y screen coordinates, while DOM APIs speak in unflipped coordinates,
and we were mixing them up in the window frame caching optimization.

Solve this by having the UIProcess send both flipped and unflipped window frames to the WebProcess.
The flipped frame is passed on to plugins, and the unflipped frame is used for window.screenX/Y etc.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):

    No need to retrieve the window frame here as WebPageProxy::windowAndViewFramesChanged() will
    always override it anyway.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::windowFrameInUnflippedScreenCoordinates):
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Webkit fails to build webkit2gtk-tests-resources.gresource.
https://bugs.webkit.org/show_bug.cgi?id=114485

Patch by Hanyee Kim <choco@company100.net> on 2013-04-12
Reviewed by Martin Robinson.

Generating webkit2gtk-tests-resources.gresource can be failed due to
the non-existing target directory.
We need to make target directory before generating it.

* UIProcess/API/gtk/tests/GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] r148257 broke the build
https://bugs.webkit.org/show_bug.cgi?id=114512

Build fix.

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Add document-loaded signal to WebKitWebPage
https://bugs.webkit.org/show_bug.cgi?id=110614

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-12
Reviewed by Carlos Garcia Campos.

Add a new signal document-loaded to WebKitWebPage that will be emitted
when the DOM document has been loaded for the main frame.

* UIProcess/API/gtk/tests/TestWebExtensions.cpp:
(documentLoadedCallback):
(testDocumentLoadedSignal):
(beforeAll): Add test for document-loaded signal.
* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(documentLoadedCallback):
(pageCreatedCallback):
(methodCallCallback): Add new D-Bus signal DocumentLoaded in order to
test document-loaded signal.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_class_init):
(webkitWebPageCreate): Add document-loaded signal and emit it when
didFinishDocumentLoadForFrame is called.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Enable spellchecking tests added in r141471
https://bugs.webkit.org/show_bug.cgi?id=108525

Reviewed by Darin Adler.

Source/WebCore:

Made automatic quote substitution, dash substitution, text replacement, and spelling correction
togglable via internals object. These functions are no-op when text replacement is not used.

This allows us to disable automatic spelling correction in spellcheck tests.

Enabled several tests added in r141471.

* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
null whenever frame() is not null.
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
(WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
(WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
(WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
* testing/Internals.h:
* testing/Internals.idl:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
(resetDefaultsToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Updated the tests not to assume spelling correction suggestions were listed in a context menu since
only Chromium port did this.

* editing/spelling/resources/util.js:
(initSpellTest): Disable automatic text replacements.

* editing/spelling/spelling-with-underscore-selection-expected.txt: Removed.
* editing/spelling/spelling-with-underscore-selection.html: Removed.

This test erroneously assumed a specific word breaking behavior that doesn't include the underscore
when selecting a word especially since Chromium was the only port that was running these tests.

* editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt: Removed.
* editing/spelling/spelling-double-clicked-word-with-underscores.html: Removed.

Ditto.

* editing/spelling/spelling-should-select-single-word-expected.txt: Removed.
* editing/spelling/spelling-should-select-single-word.html: Removed.

Removed since this test doesn't do anything useful without the assertion for the context menu.

* editing/spelling/spelling-double-clicked-word-expected.txt:
* editing/spelling/spelling-double-clicked-word.html:
* editing/spelling/spelling-exactly-selected-word-expected.txt:
* editing/spelling/spelling-exactly-selected-word.html:
* editing/spelling/spelling-with-punctuation-selection-expected.txt:
* editing/spelling/spelling-with-punctuation-selection.html:
* editing/spelling/spelling-with-whitespace-selection-expected.txt:
* editing/spelling/spelling-with-whitespace-selection.html:

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Some ligatures are applied across different fronts
https://bugs.webkit.org/show_bug.cgi?id=113604

Reviewed by Darin Adler.

The bug was caused by applyFontTransforms applying ligatures without updating the font data in the glyph buffer.

Suppose we have characters AB and A uses font X and B uses font Y. Further suppose that we have ligatures for AB
in Y. The problem was that WithIterator::advanceInternal calls applyFontTransforms on AB to apply this ligature
even though A and B use different fonts. Since X doesn't contain the same ligature for A to be paired with that
of B in X, we get a blank A.

Fixed the bug by resetting lastGlyphCount after calling applyFontTransforms. This ensures that we don't call
applyFontTransforms across different fonts.

No new tests since this requires a variant of Osaka font that doesn't come with OS X.

The bug 114482 tracks the effort to add a test for this bug fix. I've already asked someone to create a custom
font for us so that we can test this bug fix but that's going to a while.

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/13126204> [Mac] Tweak sandbox profile.

        Reviewed by Anders Carlsson.

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
        * WebProcess/com.apple.WebProcess.sb.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support "forced" subtitles
https://bugs.webkit.org/show_bug.cgi?id=114460

Reviewed by Jer Noble.

Source/WebCore: 

Test: media/track/track-forced-subtitles.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup): Enable a forced track if nothing else is enabled.
(WebCore::HTMLMediaElement::configureTextTracks): Include forced tracks with captions+subtitles.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::InbandTextTrack): Deal with kind=forced.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::forcedKeyword): New keyword.
(WebCore::TextTrack::isValidKindKeyword): Include forced.
(WebCore::TextTrack::platformTextTrack): Ditto.
* html/track/TextTrack.h:

* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::primaryAudioTrackLanguageOverride): New override to support testing.
* page/CaptionUserPreferences.h:

* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Support forced tracks.
* platform/graphics/InbandTextTrackPrivate.h:

* platform/graphics/PlatformTextTrack.h: Add Forced, minor cleanup.

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by enhancement: log cue position.

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::kind): Support forced.
(WebCore::InbandTextTrackPrivateAVFObjC::label): Drive-by cleanup.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Don't filter out forced tracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Log the language returned.

* testing/Internals.cpp:
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride): New.
(WebCore::Internals::setCaptionDisplayMode): New.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests: 

* media/content/CC+Subtitles.m4v: Added.
* media/track/track-forced-subtitles-in-band-expected.txt: Added.
* media/track/track-forced-subtitles-in-band.html: Added.
* media/trackmenu-test.js:

* platform/efl/TestExpectations: Skip new test.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Web Process crash when the UI process finishes too early
https://bugs.webkit.org/show_bug.cgi?id=112729

Reviewed by Anders Carlsson.

The problem is when creating the GSocket in the WorkQeue for the
socket descriptor. GLib considers a programmer error to create a
GSocket providing an invalid socket and finishes the process with
g_error(). We are actually providing a valid socket when creating
the GSocket, but it can be invalidated by the worker thread while
the GSocket is being created. This is because
registerEventSourceHandler is called from the main thread and
unregisterEventSourceHandler can be called from the worker
thread. We are currently registering two event handlers, one to
read data from the socket and another one to close the CoreIPC
connection when the socket connection is broken. Every event
source registered uses its own GSocket (even if the file
descriptor is actually the same), so that when the UI process
finishes too early, the first event handler can be executed in the
worker thread, closing the socket descriptor, while the main
thread is creating the GSocket for the second one.
We don't really need to use a separate event handler to monitor
the connection, because GSocket always notifies when condition is
G_IO_HUP and G_IO_ERR even if they haven't been explicitly set in
g_socket_create_source(). We can register socket event sources
differently, providing also a function to be called when the
connection is closed, using a single socket and the same even source.

* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::platformInvalidate):
(CoreIPC::Connection::open): Register a single socket event
handler providing also a function to be called when the connection
is closed.
* Platform/WorkQueue.h:
(WorkQueue):
* Platform/gtk/WorkQueueGtk.cpp: The EventSource class has been
split, moving everyting specific to socket event source to a
derived class SocketEventSource.
(WorkQueue::EventSource::EventSource):
(WorkQueue::EventSource::performWork):
(WorkQueue::EventSource::performWorkOnce):
(WorkQueue::EventSource::performWorkOnTermination):
(WorkQueue::EventSource::deleteEventSource):
(WorkQueue::EventSource):
(WorkQueue::SocketEventSource):
(WorkQueue::SocketEventSource::SocketEventSource):
(WorkQueue::SocketEventSource::cancel):
(WorkQueue::SocketEventSource::didClose):
(WorkQueue::SocketEventSource::checkCondition):
(WorkQueue::SocketEventSource::eventCallback):
(WorkQueue::registerSocketEventHandler):
(WorkQueue::unregisterSocketEventHandler):
(WorkQueue::dispatchOnSource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove bogus change

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TimeRanges::nearest() returns incorrect results.
https://bugs.webkit.org/show_bug.cgi?id=114483

Reviewed by Eric Carlson.

.:

Add symbols needed by WebCoreTestSupport to exports list.

* Source/autotools/symbols.filter:

Source/WebCore:

Test: media/timeranges-nearest.html

TimeRanges::nearest() has had an incorrect algorithm since its
addition, which has gone unnoticed because no media engine supports
seekable ranges with greater than one entry, and no media engine
seekable ranges with startTime values > 0.

Fix the algorithm used to walk a TimeRanges object; return the closest
time, not the smallest delta between range and target time.
* html/TimeRanges.cpp:
(TimeRanges::nearest):

Add some internal functions to allow us to write LayoutTests for
TimeRanges objects:
* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::Internals::createTimeRanges):
(WebCore::Internals::closestTimeToTimeRanges):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Add symbols needed by WebCoreTestSupport to the exports list.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

Add symbols needed by WebCoreTestSupport to the exports list.

* WebKit.vcproj/WebKitExports.def.in:

LayoutTests:

* media/timeranges-nearest-expected.txt: Added.
* media/timeranges-nearest.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r147942, r148026, and r148092.
http://trac.webkit.org/changeset/147942
http://trac.webkit.org/changeset/148026
http://trac.webkit.org/changeset/148092
https://bugs.webkit.org/show_bug.cgi?id=114521

"r147942 is buggy. Rollback all the patches depending on it."
(Requested by abucur on #webkit).


Source/WebCore:

* dom/ContainerNode.cpp:
(WebCore::willRemoveChildren):
(WebCore):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore):
* dom/Document.h:
(Document):
* dom/Node.cpp:
* dom/Node.h:
(Node):
* dom/NodeTraversal.cpp:
* dom/NodeTraversal.h:
(ElementTraversal):
(NodeTraversal):
* dom/Range.cpp:
(WebCore::boundaryNodeChildrenWillBeRemoved):
(WebCore):
(WebCore::Range::nodeChildrenWillBeRemoved):
* dom/Range.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::attach):
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::updateItemValues):
(WebCore::HTMLOListElement::recalculateItemCount):
* rendering/RenderCounter.cpp:
(WebCore::previousInPreOrder):
(WebCore::previousSiblingOrParent):
(WebCore::parentElement):
(WebCore::nextInPreOrder):
* rendering/RenderListItem.cpp:
(WebCore::enclosingList):
(WebCore::RenderListItem::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderListItem.h:
(RenderListItem):

LayoutTests:

* fast/dom/MutationObserver/added-out-of-order-expected.txt:
* fast/dom/MutationObserver/added-out-of-order.html:
* fast/dom/Range/range-remove-children-event-expected.txt: Removed.
* fast/dom/Range/range-remove-children-event.html: Removed.
* fast/dom/containerNode-expected.txt: Added.
* fast/dom/containerNode.html: Added.
* fast/dom/shadow/shadow-and-list-elements-expected.html:
* fast/events/mutation-during-innerHTML-expected.txt: Removed.
* fast/events/mutation-during-innerHTML.html: Removed.
* fast/lists/positioned-count-crash-expected.txt:
* fast/regions/counters/extract-list-items-001-expected.html: Removed.
* fast/regions/counters/extract-list-items-001.html: Removed.
* fast/regions/counters/extract-list-items-002-expected.html: Removed.
* fast/regions/counters/extract-list-items-002.html: Removed.
* fast/regions/counters/extract-list-items-003-expected.html: Removed.
* fast/regions/counters/extract-list-items-003.html: Removed.
* fast/regions/counters/extract-list-items-004-expected.html: Removed.
* fast/regions/counters/extract-list-items-004.html: Removed.
* fast/regions/counters/extract-list-items-005-expected.html: Removed.
* fast/regions/counters/extract-list-items-005.html: Removed.
* fast/regions/counters/extract-list-items-006-expected.html: Removed.
* fast/regions/counters/extract-list-items-006.html: Removed.
* fast/regions/counters/extract-list-items-007-expected.html: Removed.
* fast/regions/counters/extract-list-items-007.html: Removed.
* fast/regions/counters/extract-list-items-008-expected.html: Removed.
* fast/regions/counters/extract-list-items-008.html: Removed.
* fast/regions/counters/extract-list-items-009-expected.html: Removed.
* fast/regions/counters/extract-list-items-009.html: Removed.
* fast/regions/counters/extract-list-items-010-expected.html: Removed.
* fast/regions/counters/extract-list-items-010.html: Removed.
* fast/regions/counters/extract-list-items-011-expected.html: Removed.
* fast/regions/counters/extract-list-items-011.html: Removed.
* fast/regions/counters/extract-list-items-012-expected.html: Removed.
* fast/regions/counters/extract-list-items-012.html: Removed.
* fast/regions/counters/extract-list-items-013-expected.html: Removed.
* fast/regions/counters/extract-list-items-013.html: Removed.
* fast/regions/counters/extract-list-items-014-expected.html: Removed.
* fast/regions/counters/extract-list-items-014.html: Removed.
* fast/regions/counters/extract-list-items-015-expected.html: Removed.
* fast/regions/counters/extract-list-items-015.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-001-expected.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-001.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-002-expected.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-divs-002.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs-expected.html: Removed.
* fast/regions/counters/extract-numbered-paragraphs.html: Removed.
* fast/regions/counters/extract-numbered-spans-display-only-some-expected.html: Removed.
* fast/regions/counters/extract-numbered-spans-display-only-some.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-001-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-001.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-002-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-002.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-003-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-003.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-001-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-001.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-002-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-002.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-003-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-003.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-004-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-004.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005-expected.html: Removed.
* fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005.html: Removed.
* fast/regions/counters/extract-unordered-lists-in-regions-expected.html: Removed.
* fast/regions/counters/extract-unordered-lists-in-regions.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
All tests crash on Windows
https://bugs.webkit.org/show_bug.cgi?id=114522

Reviewed by Ryosuke Niwa.

In the MSVC++ ABI, a member function pointer will have a different size depending on whether the
class it belongs to is defined or not. Because of this, when passing member function pointers as parameters
it's important to ensure that the class is known by both the caller and the callee.

* WebFrame.cpp:
Include PolicyChecker.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for MediaPlayer::minTimeSeekable()
https://bugs.webkit.org/show_bug.cgi?id=114484

Reviewed by Eric Carlson.

Plumb a new minTimeSeekable() method through MediaPlayer and
MediaPlayerPrivate and use this new method in the existing
HTMLMediaElement::minTimeSeekable() method.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::minTimeSeekable): Pass to MediaPlayer.
* platform/graphics/MediaPlayer.cpp:
(WebCore::NullMediaPlayerPrivate::minTimeSeekable): Return 0.
(WebCore::MediaPlayer::minTimeSeekable): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekable): Define in terms of
    minTimeSeekable()
(WebCore::MediaPlayerPrivateInterface::minTimeSeekable): Default to 0.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
    Initialize new m_cachedMinTimeSeekable ivar.
(WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble):
    Renamed from maxTimeSeekable().
(WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Added.
    Cache value of platformMinTimeSeekable().
(WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
    Reset m_cachedMinTimeSeekable.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): float -> double.
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
    Added. Retrieve the lowest value from -[m_playerItem seekableTimeRanges].
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
    float -> double.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit Queues should capitalize K in Wk2
https://bugs.webkit.org/show_bug.cgi?id=114524

Reviewed by Philippe Normand.

* QueueStatusServer/model/queues.py:
(Queue.display_name):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Lower the pango dependency
https://bugs.webkit.org/show_bug.cgi?id=114520

Reviewed by Carlos Garcia Campos.

* Source/autotools/Versions.m4: Only depend on Pango 1.30.0 instead of
Pango 1.32.0. 1.32.0 isn't strictly necessary and the version of GTK+ that
we depend on (3.6.0) depends on 1.30.0.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Split GtkAuthenticationDialog in two widgets
https://bugs.webkit.org/show_bug.cgi?id=103644

Reviewed by Xan Lopez.

Source/WebCore:

The current GtkAuthenticationDialog implements both the common
logic and widgets to implement a real GtkDialog and a widget to be
embedded in any container. WebKit1 uses a GtkDialog while WebKit2
embeds the dialog in the WebView. This patch splits the code to
leave in Platform only the code that is actually common, leaving
the widget implementation to the WebKit layer, using a dialog in
WebKit1 and embedding auth widget in the WebView in WebKit2.

* GNUmakefile.list.am: Add new files to compilation.
* platform/gtk/GtkAuthenticationDialog.cpp: Removed.
* platform/gtk/GtkAuthenticationDialog.h: Removed.
* platform/gtk/WebKitAuthenticationWidget.cpp: Added.
(_WebKitAuthenticationWidgetPrivate):
(packTwoColumnLayoutInBox):
(createLabel):
(createEntry):
(webkitAuthenticationWidgetInitialize):
(webkitAuthenticationWidgetFinalize):
(webkit_authentication_widget_init):
(webkit_authentication_widget_class_init):
(webkitAuthenticationWidgetNew):
(webkitAuthenticationWidgetCreateCredential):
(webkitAuthenticationWidgetGetChallenge):
* platform/gtk/WebKitAuthenticationWidget.h: Added.
(_WebKitAuthenticationWidget):
(_WebKitAuthenticationWidgetClass):

Source/WebKit/gtk:

* GNUmakefile.am: Add new files to compilation.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
Use helper createAuthenticationDialog() to create and show the
auth dialog.
* webkit/webkitauthenticationdialog.cpp: Added.
(authenticationDialogResponseCallback):
(createAuthenticationDialog):
* webkit/webkitauthenticationdialog.h: Added.
* webkit/webkitsoupauthdialog.cpp:
(sessionAuthenticate): Ditto.

Source/WebKit2:

* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: Removed.
* UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Removed.
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: Added.
(webkitAuthenticationDialogAuthenticate): Use the
AuthenticationChallengeProxy to authenticate and destroy the dialog.
(okButtonClicked): Call webkitAuthenticationDialogAuthenticate()
with the credential.
(cancelButtonClicked): Call
webkitAuthenticationDialogAuthenticate() with a NULL credential to
continue without credential.
(webkitAuthenticationDialogInitialize): Build the UI.
(webkitAuthenticationDialogDraw): Draw a background.
(webkitAuthenticationDialogMap): Grab default button.
(webkitAuthenticationDialogConstructed): Create a GtkStyleContext
with the GtkWindow path to draw the widget background like a real
dialog.
(webkit_authentication_dialog_class_init):
(webkitAuthenticationDialogNew): Create a new
WebKitAuthenticationDialog widget.
* UIProcess/API/gtk/WebKitAuthenticationDialog.h: Added.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewHandleAuthenticationChallenge): Create a
WebKitAuthenticationDialog widget and pass add it to the
container.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate): Updated to use the widget directly.
(webkitWebViewChildIsInternalWidget): Ditto.
(webkitWebViewBaseAddAuthenticationDialog): Ditto.
(webkitWebViewBaseCancelAuthenticationDialog): Ditto.
(webkitWebViewBaseContainerRemove): Ditto.
(webkitWebViewBaseContainerForall): Ditto.
(resizeWebKitWebViewBaseFromAllocation): Ditto.
(webkitWebViewBaseFocus): Ditto.
(webkitWebViewBaseDestroy): Destroy the auth widget is present.
(webkit_web_view_base_class_init): Add implementation for
GtkWidgetClass::destroy.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

Tools:

* gtk/generate-gtkdoc:
(get_webkit2_options): Do not generate api docs for
WebKitAuthenticationDialog which is private in WebKit2.
(get_webkit1_options): Do not generate api docs for
webkitauthenticationdialog which is private in WebKit1.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
(AVFoundation) WebKit fails to detect live stream.
https://bugs.webkit.org/show_bug.cgi?id=114474

Reviewed by Eric Carlson.

Remove a workaround (added by r88944) for an error in an Apple.com javascript
media controller. The error has been fixed, and the workaround is causing problems
with other media streams.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/13334446> [Mac] Tweak sandbox profile.

        Reviewed by Jessie Berlin.

        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:



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