Attempt to fix Windows DRT link issue.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move policy client into WKPage.cpp and get rid of WebPolicyClient files
https://bugs.webkit.org/show_bug.cgi?id=127536

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/WebPolicyClient.cpp: Removed.
* UIProcess/WebPolicyClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion failure in WebCore::PseudoElement::didRecalcStyle()
<https://bugs.webkit.org/show_bug.cgi?id=126761>
<rdar://problem/15793540>

Source/WebCore:

Reviewed by Andy Estes.

Test: fast/images/animate-list-item-image-assertion.html

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
Check isRenderImage() rather than isImage() before casting to
RenderImage.

* editing/ios/EditorIOS.mm:
(WebCore::getImage):
Ditto.

* editing/mac/EditorMac.mm:
(WebCore::getImage):
Ditto.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::didAttachRenderers):
Ditto.

* loader/ImageLoader.cpp:
(WebCore::ImageLoader::renderImageResource):
Ditto.

* page/DragController.cpp:
(WebCore::getCachedImage):
Ditto.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
(WebCore::RenderLayerBacking::updateImageContents):
Ditto.

Source/WebKit/mac:

Some areas of code were erroneously checking the value of
RenderObject::isImage() rather than RenderObject::isRenderImage()
before casting the object to RenderImage.

This could lead to an assertion failure for RenderListMarkers, which
may return true for isImage(), but are not RenderImages.

Reviewed by Andy Estes.

* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
Check isRenderImage() rather than isImage() before casting to
RenderImage.

Source/WebKit2:

Reviewed by Andy Estes.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
Check isRenderImage() rather than isImage() before casting to
RenderImage.

LayoutTests:

Reviewed by Andy Estes.

* fast/images/animate-list-item-image-assertion-expected.txt: Added.
* fast/images/animate-list-item-image-assertion.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remote Inspector uses the Page pointer before the page is created on iOS
https://bugs.webkit.org/show_bug.cgi?id=127534

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-23
Reviewed by Joseph Pecoraro.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor TimelineRecordBar combining logic into a helper function.

https://bugs.webkit.org/show_bug.cgi?id=127530

Reviewed by Joseph Pecoraro.

* UserInterface/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/NetworkTimelineOverviewGraph.css:
(.timeline-overview-graph.network):
(.timeline-overview-graph.network > .graph-row > .timeline-record-bar):
Cleaned up since we are using TimelineRecordBar.

* UserInterface/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph.prototype.reset):
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
(WebInspector.TimelineDataGridNode.prototype.refreshGraph):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/TimelineRecordBar.css:
(.timeline-record-bar.unfinished > .segment):
(.timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(:focus .selected .timeline-record-bar > .segment.inactive):
Improved selected appearance and don't assume .segment.inactive exists.

* UserInterface/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar):
(WebInspector.TimelineRecordBar.createCombinedBars.compareByActiveStartTime): Added.
(WebInspector.TimelineRecordBar.createCombinedBars): Added.
(WebInspector.TimelineRecordBar.prototype.get renderMode): Added.
(WebInspector.TimelineRecordBar.prototype.set renderMode): Added.
(WebInspector.TimelineRecordBar.prototype.set records):
(WebInspector.TimelineRecordBar.prototype.refresh):
Lazy create DOM elements. Support rendering one or both segments. Doing this lets
combined inactive segments to sit behind multiple active segments.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Implement SQLite backing store 'get' support
https://bugs.webkit.org/show_bug.cgi?id=127502

Reviewed by Tim Horton.

Source/WebCore:

Get a KeyRange from a KeyRangeData:
* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
* Modules/indexeddb/IDBKeyRangeData.h:

Add collation function support to SQLiteDatabase:
* platform/sql/SQLiteDatabase.cpp:
(WebCore::destroyCollationFunction):
(WebCore::callCollationFunction):
(WebCore::SQLiteDatabase::setCollationFunction):
(WebCore::SQLiteDatabase::removeCollationFunction):
* platform/sql/SQLiteDatabase.h:

* WebCore.exp.in:

Source/WebKit2:

This makes get of a single IDBKey work, and lays the groundwork for getting an IDBKeyRange.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Add custom collation
  to the Records table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Install the custom collator.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::collate): Collation function to be filled in later.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Dragging from inner side of video to outside causes a crash
https://bugs.webkit.org/show_bug.cgi?id=126338

Reviewed by Jer Noble.

Source/WebCore:

The crash happens while dragging mouse cursor through timeline control to outside
of video region. This is beacause media controls are selected with the drag.
The media controls disappear when mouse cursor goes outside of video though
the dragging/selection proceeds. If once media controls are hidden, related element
lose their renderers. However the drag is still under going. it requires shadowPseudoId
of the selected controls. Untorntunately, SliderThumbElement/SliderContainerElement
don't return a static value for the shadowPseudoId unlike other media controls,
but they need a renderer to determine it. This is the reason of crash.

Test: media/media-controller-drag-crash.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):

LayoutTests:

This tests that dragging through timeslider control to outside of video causes a crash.
The crash happened on both gtk+ and efl ports not using MEDIA_CONTROL_SCRIPT.

* media/media-controller-drag-crash-expected.txt: Added.
* media/media-controller-drag-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support NSInteger argument type for encoding/decoding invocations.
https://bugs.webkit.org/show_bug.cgi?id=127522

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-01-23
Reviewed by Dan Bernstein.

Add support for NSInteger argument type ('q') for remote invocations.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE][Mac] Crash when reloading a page during playback
https://bugs.webkit.org/show_bug.cgi?id=126903

Reviewed by Eric Carlson.

Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
callback block even after being removed with -removeTimeObserver:, which is tracked by
<rdar://problem/15798050>. Work around this problem by passing a WeakPtr into the block
and bail early if the owning media player has been destroyed.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):


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