More build fixes.

* UIProcess/API/mac/WKConnection.h:
* UIProcess/API/mac/WKConnection.mm:
(didReceiveMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More build fixes.

* UIProcess/API/mac/WKBrowsingContextController.mm:
* UIProcess/API/mac/WKConnection.mm:
(didReceiveMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
https://bugs.webkit.org/show_bug.cgi?id=123931

Reviewed by Sam Weinig.

Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
the search and to not need ShapeOutsideFloatOffsetMode anymore. This
moves almost all of the logic into FloatingObjects, making a small
reduction in the amount that RenderBlockFlow needs to know about the
implementation of FloatingObjects.

In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
and roundToInt itself so that all of it's callers can be simplified.

No new tests, no new behavior.

* rendering/FloatingObjects.cpp:
(WebCore::rangesIntersect):
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
(WebCore::FindNextFloatLogicalBottomAdapter::highValue):
(WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset):
* rendering/FloatingObjects.h:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::fitBelowFloats):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
(WebCore::RenderBlockFlow::getClearDelta):
* rendering/RenderBlockFlow.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove a workaround for a bug in malloc on Symbian
https://bugs.webkit.org/show_bug.cgi?id=124069

Reviewed by Sam Weinig.

* Platform/CoreIPC/ArgumentDecoder.cpp:
(CoreIPC::ArgumentDecoder::~ArgumentDecoder):
(CoreIPC::ArgumentDecoder::initialize):
* Platform/CoreIPC/ArgumentDecoder.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove code guarded with ENABLE(STREAM)
https://bugs.webkit.org/show_bug.cgi?id=123667

Reviewed by Anders Carlsson.

Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
no port enables the feature and the work on this feature has wound down after the Chromium port forked,
leaving this code unmaintained.

* fileapi/FileReaderLoader.cpp:
* fileapi/FileReaderLoader.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove more accidentally added files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modernize FrameLoader a bit
https://bugs.webkit.org/show_bug.cgi?id=124073

Reviewed by Anders Carlsson.

* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
Use std::unique_ptrs rather than OwnPtrs.

* loader/MixedContentChecker.cpp:
* loader/MixedContentChecker.h:
Switch to hold a Frame& rather than Frame*.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge IDBCursorBackendInterface and IDBCursorBackendImpl
https://bugs.webkit.org/show_bug.cgi?id=124068

Reviewed by Anders Carlsson.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBCursorBackendInterface.h: Removed.

* Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
* Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.

* Modules/indexeddb/IDBCallbacks.h:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursorWithValue.cpp:
* Modules/indexeddb/IDBCursorWithValue.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
* Modules/indexeddb/IDBTransactionBackendImpl.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::createCursorBackend):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Blind Windows build-fix attempt after r158959

* WebCore.vcxproj/WebCore.vcxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Teach SubframeLoader a bit about references
https://bugs.webkit.org/show_bug.cgi?id=124076

Reviewed by Anders Carlsson.

* html/HTMLAppletElement.cpp:
* html/HTMLFrameElementBase.cpp:
* html/HTMLMediaElement.cpp:
* loader/SubframeLoader.cpp:
* loader/SubframeLoader.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
https://bugs.webkit.org/show_bug.cgi?id=124074

Reviewed by Sam Weinig.

Just a straightforward conversion from const pointers to const references.

Also, remove unneeded argument from FloatingObjects constructor.

No new tests, no behavior change.

* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::clearLineBoxTreePointers):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::shapeInfoForFloat):
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::heightRemaining):
* rendering/FloatingObjects.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::createFloatingObjects):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Checking for TypeError in RTCPeerConnection object creation
https://bugs.webkit.org/show_bug.cgi?id=124049

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-08
Reviewed by Eric Carlson.

Source/WebCore:

If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.

Please notice that this patch does not make every tests run as expected,
RTCPeerConnectionHandlerMock needs to be update to deal with contraints.

Existing tests were updated.

* GNUmakefile.list.am:
* Modules/mediastream/RTCPeerConnection.idl:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
(WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):

LayoutTests:

Please notice that this patch does not make every tests run as expected,
RTCPeerConnectionHandlerMock needs to be update to deal with contraints.

* fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
* fast/mediastream/RTCPeerConnection-createAnswer.html:
* fast/mediastream/RTCPeerConnection-createOffer.html:
* fast/mediastream/RTCPeerConnection-datachannel.html:
* fast/mediastream/RTCPeerConnection-dtmf.html:
* fast/mediastream/RTCPeerConnection-events.html:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCPeerConnection-ice-expected.txt:
* fast/mediastream/RTCPeerConnection-ice.html:
* fast/mediastream/RTCPeerConnection-localDescription.html:
* fast/mediastream/RTCPeerConnection-onnegotiationneeded.html:
* fast/mediastream/RTCPeerConnection-remoteDescription.html:
* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:
* fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
* fast/mediastream/RTCPeerConnection-statsSelector.html:
* fast/mediastream/RTCPeerConnection.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ended event should work also when playback rate is negative
https://bugs.webkit.org/show_bug.cgi?id=123879

Patch by Piotr Grad <p.grad@samsung.com> on 2013-11-08
Reviewed by Eric Carlson.

Source/WebCore:

According to W3C specification playback is ended also when playback rate is
negative and position is the earliest possible position.

Test: media/video-ended-event-negative-playback.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):

LayoutTests:

Tests if ended event is triggered for audio/video elements after
changing playback rate to negative.

* media/video-ended-event-negative-playback-expected.txt: Added.
* media/video-ended-event-negative-playback.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: remove -webkit-min and -webkit-max from CSS completions
https://bugs.webkit.org/show_bug.cgi?id=124072

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-11-08
Reviewed by Timothy Hatcher.

-webkit-min and -webkit-max are not implemented in WebCore, despite mentions of it.

* UserInterface/CSSKeywordCompletions.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
https://bugs.webkit.org/show_bug.cgi?id=123769

Reviewed by Dirk Schulze.

Source/WebCore:

Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
method now generates intervals with Y coordinates that begin at the image shape's
bounds.y - shape-margin, which may be less than 0.

The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
by the shape-margin. A non-const overload of the method was added to centralize all
access to m_intervalLists.

Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
      fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html

* rendering/shapes/RasterShape.cpp:
(WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
(WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
(WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
(WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
(WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.

LayoutTests:

Verify that lines overlap a shape-outside that extends into the top of the margin-box
do wrap around the top of the shape as well its side and bottom.

* fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=124075

Reviewed by Beth Dakin.

In r155660 I removed some scrollbar-related layouts when scrollbars
are in overlay mode.

However, ScrollView::updateScrollbars() has a case where we still need
to do multiple pases, related to its "Never ever try to both gain/lose a
scrollbar in the same pass" comment. When we avoid making a new scrollbar
because the other was removed, we need to do another pass to bring the
correct scrollbar back.

Can't test overlay scrollbars in tests.

* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
https://bugs.webkit.org/show_bug.cgi?id=124077

Reviewed by Alexey Proskuryakov.

Source/WebCore:

The abstraction is no longer needed.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.

* Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
* Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.

* Modules/indexeddb/IDBBackingStoreInterface.h:
* Modules/indexeddb/IDBCursorBackend.cpp:
* Modules/indexeddb/IDBCursorBackend.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendOperations.h:
* Modules/indexeddb/IDBTransactionCoordinator.cpp:
* Modules/indexeddb/IDBTransactionCoordinator.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Begin stubbing out a KeyedEncoder class in WebCore
https://bugs.webkit.org/show_bug.cgi?id=124079

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
Add symbol needed by WebCore.

* WebCore.xcodeproj/project.pbxproj:
Add new header file.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTree):
* history/HistoryItem.h:
Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.

* platform/KeyedCoding.h:
Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.

Source/WebKit2:

* Shared/KeyedEncoder.h: Removed.
* Shared/cf/KeyedCodingValueCF.cpp: Removed.
* Shared/cf/KeyedEncoder.cpp: Added.
Remove old keyed encoders.

(WebKit::createDictionary):
Helper function to create a mutable dictionary.
(WebKit::KeyedEncoder::KeyedEncoder):
Create the root dictionary.

(WebKit::KeyedEncoder::encodeUInt32):
Create a CFNumberRef and add it to the dictionary.

* Shared/cf/KeyedEncoder.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
Create a KeyedEncoder and encode the history tree.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Teach CanvasObserver about references
https://bugs.webkit.org/show_bug.cgi?id=124082

Reviewed by Anders Carlsson.

* css/CSSCanvasValue.cpp:
* css/CSSCanvasValue.h:
* html/HTMLCanvasElement.cpp:
* html/HTMLCanvasElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It should be easy to disable blinding on a per-architecture basis
https://bugs.webkit.org/show_bug.cgi?id=124083

Reviewed by Michael Saboff.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::haveScratchRegisterForBlinding):
(JSC::AbstractMacroAssembler::scratchRegisterForBlinding):
(JSC::AbstractMacroAssembler::canBlind):
(JSC::AbstractMacroAssembler::shouldBlindForSpecificArch):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::shouldBlind):
(JSC::MacroAssembler::store32):
(JSC::MacroAssembler::branch32):
(JSC::MacroAssembler::branchAdd32):
(JSC::MacroAssembler::branchMul32):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::canBlind):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::haveScratchRegisterForBlinding):



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