[WK2] Fitler touch events only based on touch start
https://bugs.webkit.org/show_bug.cgi?id=128354

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-07
Reviewed by Simon Fraser.

Touch Events track their target, we should not test the touch regions
again after a touch sequence starts.

This patch adds a boolean flag to know if we are sending events to the WebProcess
(m_isTrackingTouchEvents). The flag is updated every time a touch sequence starts.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::shouldStartTrackingTouchEvents):
(WebKit::WebPageProxy::handleTouchEvent):
* UIProcess/WebPageProxy.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebGL doesn't update with remotely hosted layers
https://bugs.webkit.org/show_bug.cgi?id=128390

Reviewed by Simon Fraser.

PlatformCALayerRemote was intercepting the setNeedsDisplay calls to
WebGL layers, and thus causing them to not draw. Fix this by adding an
override in PlatformCALayerRemoteCustom to check if it is a WebGLLayer
and call setNeedsDisplay directly.

* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(PlatformCALayerRemoteCustom::setNeedsDisplay):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Should report user input to PageThrottler
https://bugs.webkit.org/show_bug.cgi?id=128398

Reviewed by Tim Horton.

Make sure we wake from AppNap if there is user interaction.

Source/WebCore: 

* page/PageThrottler.h:
(WebCore::PageThrottler::didReceiveUserInput):
(WebCore::PageThrottler::pluginDidEvaluate):
    - added, these call reportInterestingEvent()

Source/WebKit2: 

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
    - reportInterestingEvent() -> pluginDidEvaluate()
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
    - call didReceiveUserInput()



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Eliminate race between XPC connection queue and Notification queue
https://bugs.webkit.org/show_bug.cgi?id=128384

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-02-07
Reviewed by Timothy Hatcher.

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::RemoteInspector):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::setupXPCConnectionIfNeeded):
Create the queue to use for RemoteInspector xpc connection
management and the connection itself.

* inspector/remote/RemoteInspectorXPCConnection.h:
* inspector/remote/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection):
Use the passed in queue instead of creating one for itself.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update TextTrack API to current spec
https://bugs.webkit.org/show_bug.cgi?id=122218

Refactoring VTTCue out of TextTrackCue.

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-vttcue.html

* CMakeLists.txt: Add VTTCue and rename RenderTextTrackCue to RenderVTTCue.
* DerivedSources.cpp: Same.
* DerivedSources.make: Same.
* GNUmakefile.list.am: Same.
* PlatformGTK.cmake:  Same.
* WebCore.vcxproj/WebCore.vcxproj: Same.
* WebCore.vcxproj/WebCore.vcxproj.filters: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJS): Use VTTCue DOM wrapper for VTTCue and its subclasses.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Convert to VTTCue as needed.
(WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
* html/HTMLMediaElement.h: Only print cue.text in debug output if the cue type has a .text attribute
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Convert to VTTCue as needed, and fix TextTrackCueBox to VTTCueBox.
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Convert to VTTCue as needed.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): Use refactored VTTCue attributes.
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Use VTTCue's constructor instead of deprecated TextTrackCue constructor.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::setMode): Convert to VTTCue as needed.
(WebCore::TextTrack::hasCue): Make this function only accept VTTCues, since it's only used for them anyway, and convert existing cues to VTTCues as needed.
* html/track/TextTrack.h: Same as hasCue above.
* html/track/TextTrackCue.cpp: Refactor a lot of code out. Everything that was removed went to VTTCue.cpp.
(WebCore::TextTrackCue::create): For backwards compatibility, just call VTTCue::create().
(WebCore::TextTrackCue::TextTrackCue): Refactor a lot of code out.
(WebCore::TextTrackCue::~TextTrackCue): Same.
(WebCore::TextTrackCue::didChange): Same.
(WebCore::TextTrackCue::setIsActive): Same.
* html/track/TextTrackCue.h: Same.
* html/track/TextTrackCue.idl: Remove VTTCue attributes and add custom toJS function.
* html/track/TextTrackCueGeneric.cpp: Use VTTCue instead of TextTrackCue.
* html/track/TextTrackCueGeneric.h: Same.
* html/track/VTTCue.cpp: Copied from Source/WebCore/html/track/TextTrackCue.cpp.
* html/track/VTTCue.h: Copied from Source/WebCore/html/track/TextTrackCue.h.
* html/track/VTTCue.idl: Copied from Source/WebCore/html/track/TextTrackCue.idl.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::getNewCues): Use VTTCue instead of TextTrackCue.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride): Use VTTCueBox instead of TextTrackCueBox.
* rendering/RenderVTTCue.cpp: Renamed from Source/WebCore/rendering/RenderTextTrackCue.cpp. Changed to use VTTCue instead of TextTrackCue.
* rendering/RenderVTTCue.h: Renamed from Source/WebCore/rendering/RenderTextTrackCue.h. Changed to use VTTCue instead of TextTrackCue.
* rendering/RenderingAllInOne.cpp: Rename RenderTextTrackCue to RenderVTTCue.

LayoutTests:

* js/dom/constructor-length.html: Add VTTCue constructor.
* platform/efl/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/efl/js/dom/constructor-length-expected.txt: Same.
* js/dom/global-constructors-attributes-expected.txt: Same.
* platform/gtk-wk2/js/dom/constructor-length-expected.txt:  Same.
* platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/gtk/js/dom/constructor-length-expected.txt: Same.
* platform/gtk/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/mac/js/dom/constructor-length-expected.txt: Same.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/win/js/dom/global-constructors-attributes-expected.txt: Same.
* media/track/track-cues-cuechange-expected.txt: Cues are of type VTTCue now.
* media/track/track-cues-enter-exit-expected.txt: Same.
* media/track/track-vttcue-expected.txt: Test VTTCue interface.
* media/track/track-vttcue.html: Same.
* media/video-test.js:
(testExpected): Add "instanceof" as a valid operator.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FloatingObject::unsafeClone should not copy m_originatingLine
https://bugs.webkit.org/show_bug.cgi?id=128381

Reviewed by Andreas Kling.

Copying the originatingLine allows to break the invariant that the
floating object must only contain lines that are owned by the renderer
it is attached to.

* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::unsafeClone):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Add support for text document viewport configuration
https://bugs.webkit.org/show_bug.cgi?id=128359

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-07
Reviewed by Simon Fraser.

Source/WebCore: 

Define a set of ViewportParameters suitable for displaying text documents.
Add a documents class for text document to differentiate them from other type of documents.

* WebCore.exp.in:
* dom/Document.h:
(WebCore::Document::isTextDocument):
* html/TextDocument.cpp:
(WebCore::TextDocument::TextDocument):
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::webpageParameters):
(WebCore::ViewportConfiguration::plainTextParameters):
* page/ViewportConfiguration.h:

Source/WebKit2: 

When a text document is being loaded, use the plainText viewport parameters.

* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert r154384 and r154674 as they broke selection rect computations for text with ligatures.

Source/WebCore: 

* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::selectionRectForText):
(WebCore::Font::offsetForPosition):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText):
(WebCore::Font::selectionRectForSimpleText):
(WebCore::Font::offsetForPositionForSimpleText):
* platform/graphics/GlyphBuffer.h:
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::advanceOneCharacter):
* platform/graphics/WidthIterator.h:

LayoutTests: 

* fast/text/partial-textruns-expected.html: Removed.
* fast/text/partial-textruns.html: Removed.
* fast/text/resources/PTS55F-webfont.ttf: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make it possible for each web page to have different preferences
https://bugs.webkit.org/show_bug.cgi?id=128403

Reviewed by Tim Horton.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreate):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::setDatabasePath):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):
(WebKit::WebPageGroup::~WebPageGroup):
(WebKit::WebPageGroup::setPreferences):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::setPreferences):
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::~WebPreferences):
(WebKit::WebPreferences::addPage):
(WebKit::WebPreferences::removePage):
(WebKit::WebPreferences::update):
(WebKit::WebPreferences::updatePrivateBrowsingValue):
(WebKit::WebPreferences::anyPagesAreUsingPrivateBrowsing):
* UIProcess/WebPreferences.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using PLATFORM(MAC) in WebCore/platform except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128404

Reviewed by Anders Carlsson.

* Configurations/WebCore.xcconfig: Removed KeyEventMac.mm from
EXCLUDED_SOURCE_FILE_NAMES_iphoneos, because that file contains !PLATFORM(IOS) guards.
Removed WheelEventMac.mm from the same definition, because that file no longer exists.
* platform/ContentFilter.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/ContextMenu.h: Ditto.
* platform/ContextMenuItem.h: Ditto.
* platform/Cursor.cpp: Ditto.
* platform/Cursor.h: Ditto.
* platform/DragData.cpp: Ditto.
* platform/DragImage.cpp: Ditto.
* platform/Language.cpp:
(WebCore::displayNameForLanguageLocale): Changed PLATFORM(MAC) to USE(CF) && !PLATFORM(WIN).
* platform/LocalizedStrings.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::contextMenuItemTagSearchWeb):
* platform/LocalizedStrings.h: Ditto.
* platform/MIMETypeRegistry.cpp: Ditto.
(WebCore::initializeSupportedImageMIMETypesForEncoding):
* platform/PasteboardStrategy.h: Ditto.
* platform/PlatformKeyboardEvent.h: Ditto.
* platform/PlatformMenuDescription.h: Ditto.
* platform/PlatformSpeechSynthesizer.h: Ditto.
* platform/PlatformWheelEvent.h: Ditto.
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/SchemeRegistry.cpp: Ditto.
(WebCore::localURLSchemes):
(WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal):
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
* platform/ScrollAnimator.cpp: Ditto.
(WebCore::ScrollAnimator::handleWheelEvent):
* platform/ScrollAnimator.h: Ditto.
* platform/ScrollView.cpp: Ditto.
* platform/ScrollView.h: Ditto.
* platform/ScrollbarThemeComposite.h: Ditto.
* platform/SharedBuffer.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around NSData-related
code.
* platform/URL.h: Changed PLATFORM(MAC) to USE(FOUNDATION) around NSURL-related code.
* platform/Widget.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/Widget.h: Ditto.
* platform/audio/AudioSession.cpp: Changed !PLATFORM(MAC) && !PLATFORM(IOS) to
!PLATFORM(COCOA).
* platform/audio/HRTFElevation.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/audio/MediaSessionManager.cpp: Ditto.
* platform/audio/mac/AudioSessionMac.cpp: Updated comment.
* platform/audio/mac/MediaSessionManagerMac.cpp: Removed PLATFORM(MAC) from Cocoa-only file.
* platform/cf/SharedBufferCF.cpp: Changed !PLATFORM(MAC) to !USE(FOUNDATION) and updated
comment.
* platform/cf/URLCF.cpp: Changed !PLATFORM(MAC) to !USE(FOUNDATION).
* platform/graphics/BitmapImage.h: Changed one instance of PLATFORM(MAC) to
USE(CG) || USE(APPKIT), and another to PLATFORM(COCOA).
* platform/graphics/DisplayRefreshMonitor.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
* platform/graphics/DisplayRefreshMonitor.h: Ditto.
* platform/graphics/FloatPoint.h: Collapsed nested #ifs into a single #if.
* platform/graphics/FloatRect.h: Ditto.
* platform/graphics/FloatSize.h: Ditto.
* platform/graphics/Font.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/graphics/Font.h: Ditto.
* platform/graphics/FontCache.cpp: Ditto.
(WebCore::FontCache::getFontData):
* platform/graphics/FontCache.h: Ditto. Also removed redundant friend class declaration.
* platform/graphics/FontGlyphs.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
* platform/graphics/GlyphPage.h: Ditto.
* platform/graphics/GraphicsContext3D.h: Ditto.
* platform/graphics/Image.h: Changed PLATFORM(MAC) to USE(APPKIT) around use of NSImage.
Changed another PLATFORM(MAC) to PLATFORM(COCOA).
* platform/graphics/IntRect.h: Collapsed nested #ifs into a single #if.
* platform/graphics/IntSize.h: Ditto.
* platform/graphics/MediaPlayer.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebCore::installedMediaEngines):
(WebCore::MediaPlayer::supportsType):
* platform/graphics/SimpleFontData.cpp: Ditto.
(WebCore::SimpleFontData::nonSyntheticItalicFontData):
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
* platform/graphics/SimpleFontData.h: Ditto.
* platform/graphics/TiledBacking.h: Ditto.
* platform/graphics/ca/GraphicsLayerCA.cpp: Ditto.
(WebCore::GraphicsLayerCA::filtersCanBeComposited):
(WebCore::GraphicsLayerCA::createPlatformCALayer):
* platform/graphics/ca/LayerFlushScheduler.h: Ditto.
* platform/graphics/ca/PlatformCAAnimation.h: Ditto.
* platform/graphics/ca/PlatformCAFilters.h: Ditto.
* platform/graphics/ca/PlatformCALayer.h: Ditto.
* platform/graphics/cg/BitmapImageCG.cpp: Ditto.
* platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
(WebCore::GraphicsContext::setAllowsFontSmoothing):
* platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Ditto.
* platform/graphics/cg/ImageBufferCG.cpp: Ditto.
* platform/graphics/cg/ImageBufferDataCG.h: Ditto.
* platform/graphics/cg/ImageCG.cpp: Ditto.
* platform/graphics/cg/ImageSourceCG.cpp: Ditto.
(WebCore::ImageSource::setData):
* platform/graphics/cg/ImageSourceCG.h: Ditto.
* platform/graphics/cg/PathCG.cpp: Ditto.
(WebCore::Path::platformAddPathForRoundedRect):
* platform/graphics/cg/PatternCG.cpp: Ditto.
* platform/graphics/gpu/DrawingBuffer.h: Ditto.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Removed PLATFORM(MAC) guards, since
this file is only used on Mac and iOS.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension): Changed the GL_EXT_draw_buffers check to
match the implementation.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Changed PLATFORM(MAC) to
PLATFORM(COCOA).
* platform/mac/KeyEventMac.mm: Added !PLATFORM(IOS).
* platform/mac/PlatformEventFactoryMac.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/mac/WebCoreSystemInterface.h: Ditto. Removed redundant check for PLATFORM(MAC).
* platform/mac/WebCoreSystemInterface.mm: Removed redundant check for PLATFORM(MAC).
* platform/network/Credential.h: Changed PLATFORM(IOS) || PLATFORM(MAC) to PLATFORM(COCOA).
* platform/network/NetworkStateNotifier.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/network/NetworkStorageSession.h: Ditto.
* platform/network/NetworkingContext.h: Ditto.
* platform/network/ProtectionSpace.cpp: Ditto.
(WebCore::ProtectionSpace::receivesCredentialSecurely):
* platform/network/ResourceHandle.cpp: Ditto.
(WebCore::ResourceHandle::clearAuthentication):
(WebCore::ResourceHandle::shouldContentSniffURL):
* platform/network/ResourceHandle.h: Ditto.
* platform/network/ResourceHandleClient.cpp: Ditto.
* platform/network/ResourceHandleClient.h: Ditto.
* platform/network/ResourceHandleInternal.h: Ditto.
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/ResourceRequestBase.cpp: Ditto.
* platform/network/cf/AuthenticationCF.h: Ditto.
* platform/network/cf/CookieStorageCFNet.cpp: Ditto.
* platform/network/cf/CredentialStorageCFNet.cpp: Ditto.
* platform/network/cf/FormDataStreamCFNet.cpp: Ditto.
* platform/network/cf/NetworkStorageSessionCFNet.cpp: Ditto.
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
* platform/network/cf/ResourceError.h: Ditto.
* platform/network/cf/ResourceHandleCFNet.cpp: Ditto.
(WebCore::ResourceHandle::createCFURLConnection):
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceRequest.h: Ditto.
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/cf/ResourceRequestCFNet.cpp: Ditto.
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cf/ResourceResponse.h: Ditto.
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
* platform/network/mac/ResourceResponseMac.mm: Ditto.
* platform/posix/FileSystemPOSIX.cpp: Changed PLATFORM(MAC) to OS(DARWIN) &&
!PLATFORM(EFL) && !PLATFORM(GTK).
* platform/text/TextBoundaries.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).



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

* platform/PlatformKeyboardEvent.h: Fixed a typo.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CGContextGetUserSpaceToDeviceSpaceTransform returns the wrong value on Windows.
https://bugs.webkit.org/show_bug.cgi?id=128395.

Rubberstamped by Zalan Bujtas.

The call essentially returns 0 and causes an assertion failure when running many layout tests.

* platform/graphics/cg/GraphicsContextCG.cpp: Don't make the call on Windows. We default to 1.
(WebCore::GraphicsContext::platformInit):


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

* Misc/WebElementDictionary.mm:
(+[WebElementDictionary initializeLookupTable]):
(-[WebElementDictionary _image]):
(-[WebElementDictionary _imageRect]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix bug in stack limit adjustments in JSLock.
<https://webkit.org/b/128406>

Reviewed by Geoffrey Garen.

1. JSLock::unlock() was only clearing the VM::stackPointerAtEntry when
   m_vm->stackPointerAtVMEntry == entryStackPointer. FYI,
   entryStackPointer is a field in JSLock.

   When DropAllLocks::~DropAllLocks() will call JSLock::grabAllLocks()
   to relock the JSLock, JSLock::grabAllLocks() will set a new
   entryStackPointer value. Thereafter, DropAllLocks::~DropAllLocks() will
   restore the saved VM::stackPointerAtEntry, which will now defer from
   the JSLock's entryStackPointer value.

   It turns out that when m_vm->stackPointerAtVMEntry was initialized,
   it was set to whatever value entryStackPointer is set to. At no time
   do we ever expect the 2 values to differ. The only time it differs is
   when this bug manifests.

   The fix is to remove the entryStackPointer field in JSLock and its uses
   altogether.

2. DropAllLocks was unconditionally clearing VM::stackPointerAtEntry in
   its constructor instead of letting JSLock::unlock() do the clearing.

   However, DropAllLocks will not actually drop locks if it isn't required
   to (e.g. when alwaysDropLocks is DontAlwaysDropLocks), and when we've
   already drop locks once (i.e. JSLock::m_lockDropDepth is not 0).

   We should not have cleared VM::stackPointerAtEntry here if we don't
   actually drop the locks.

* runtime/JSLock.cpp:
(JSC::JSLock::unlock):
(JSC::JSLock::DropAllLocks::DropAllLocks):



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