timothy_horton@apple.com [Fri, 27 Jun 2014 02:11:00 +0000 (02:11 +0000)]
[iOS][WK2] Implement WKPDFView smart magnification
https://bugs.webkit.org/show_bug.cgi?id=134269
<rdar://problem/
17272825>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _currentContentView]):
(contentZoomScale):
Factor _currentContentView out of contentZoomScale.
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _contentRectForUserInteraction]):
Use it in a bunch more places so we query the right view when zooming/scrolling for smart magnification.
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView scrollViewDidScroll:]):
(-[WKPDFView _revalidateViews]):
(-[WKPDFView zoom:to:atPoint:kind:]):
(-[WKPDFView resetZoom:]):
Implement zoom:to:atPoint:kind: and resetZoom: UIPDFPageViewDelegate methods.
Convert the rects/points and forward them on to the WKWebView to do the zoom.
resetZoom: doesn't provide the gesture origin, so we zoom out using the view center as our origin.
Avoid parenting new UIPDFPageViews while starting a zoom; they'll end up with a bizarre
animation on them and go flying across the screen (even before _isAnimatingZoom is set).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170515
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Fri, 27 Jun 2014 02:05:15 +0000 (02:05 +0000)]
[WK2] Pinch-zoom shadows can overlap headers and footers
https://bugs.webkit.org/show_bug.cgi?id=134372
<rdar://problem/
16004095>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::shadowLayerPositionForFrame):
(WebKit::shadowLayerBoundsForFrame):
Compute the initial shadow layer and shadow bounds exactly as RenderLayerCompositor does
(in updateRootLayerPosition and friends). Also, clip the shadow layer to the old document rect,
otherwise it can extend over top of the header/footers. The content is automatically clipped to
this rect by the root content layer, but the shadow is outside of that.
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
Pass all of the arguments to constrainScrollPositionForOverhang, not just half of them.
There's still a bug where we constrain incorrectly with header/footer layers, but that
will be addressed elsewhere.
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
Make use of the new helpers.
* WebCore.exp.in:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
Put header/footer layers in front of the root content layer instead of behind.
Ideally nothing would ever overlap them, but this will give them precedence regardless.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170514
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Fri, 27 Jun 2014 01:10:48 +0000 (01:10 +0000)]
[Win] Always NULL-terminate the string in createUTF8String()
<http://webkit.org/b/134353>
<rdar://problem/
17471783>
Reviewed by Brent Fulgham.
* plugins/PluginView.cpp:
(WebCore::createUTF8String): Pull out CString length into local
variable. Switch to use memcpy. Always NULL-terminate the
string.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170513
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Fri, 27 Jun 2014 00:28:14 +0000 (00:28 +0000)]
[MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
https://bugs.webkit.org/show_bug.cgi?id=134367
Reviewed by Darin Adler.
Add a couple of null-checks to protect against methods being called in the brief time
between when the object is created and when it's asked to load.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170512
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Fri, 27 Jun 2014 00:27:05 +0000 (00:27 +0000)]
Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
https://bugs.webkit.org/show_bug.cgi?id=134289
Reviewed by Darin Adler.
If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow.
No new tests, covered by existing tests.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::verifyProtocolHandlerScheme):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170511
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Thu, 26 Jun 2014 23:59:10 +0000 (23:59 +0000)]
[Win] Fix potential buffer overrun in DLLLauncher
https://bugs.webkit.org/show_bug.cgi?id=134351
<rdar://problem/
17469185>
Reviewed by Darin Adler.
* win/DLLLauncher/DLLLauncherMain.cpp: Correct error
in end-of-buffer calculation.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170510
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Thu, 26 Jun 2014 23:53:37 +0000 (23:53 +0000)]
Don't leak WKBrowsingContextControllers
https://bugs.webkit.org/show_bug.cgi?id=134368
<rdar://problem/
17476582>
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView browsingContextController]):
Adoption is important.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170508
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Thu, 26 Jun 2014 23:44:31 +0000 (23:44 +0000)]
[WK1] Use native touch event's timestamp for DOM touch event
https://bugs.webkit.org/show_bug.cgi?id=134326
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-26
Reviewed by Enrica Casucci.
* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
Use device event timestamp to get more accurate timing information. This also removes
the variance introduced by WebKit when computing velocity/acceleration/etc.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170506
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
b.kelemen@samsung.com [Thu, 26 Jun 2014 23:17:55 +0000 (23:17 +0000)]
Memcache migth not be pruned when it should for https pages
https://bugs.webkit.org/show_bug.cgi?id=134361
Reviewed by Geoffrey Garen.
There is no reason we should not try to prune in case of a https resource.
No observable change in behavior, no tests.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):
Call prune unconditionally and remove an unnecessary branch.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170504
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Thu, 26 Jun 2014 23:15:36 +0000 (23:15 +0000)]
REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
https://bugs.webkit.org/show_bug.cgi?id=133882
<rdar://problem/
17271965>
Reviewed by Brady Eidson.
Source/WebCore:
This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
which still use the improved approach, and don't count against 6 connections.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::resourcePrioritiesEnabled):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
Source/WebKit2:
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
Same fix as in WebCore.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170503
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
tgergely.u-szeged@partner.samsung.com [Thu, 26 Jun 2014 23:07:19 +0000 (23:07 +0000)]
[EFL] Missing dependency between freetype6 and fontconfig libs.
https://bugs.webkit.org/show_bug.cgi?id=134190
Reviewed by Gyuyoung Kim.
The external dependencies contain the freetype6 and the fontconfig libs.
The fontconfig lib requires freetype, but the dependency is not set in
the efl/jhbuild.modules file. So, during building the external libs,
fontconfig uses the freetype package of the system, while WebKit
binaries will use freetype from the WebKitBuild/Dependency directory.
There are more similar dependencies that were not indicated in the
jhbuild.modules file.
* efl/jhbuild.modules:
Added dependencies between libs.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170502
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Thu, 26 Jun 2014 23:03:10 +0000 (23:03 +0000)]
Bump FastMalloc thread cache max size to 1MB on iOS.
<https://webkit.org/b/134365>
The previous limit (512kB) comes from the old days of very-low-memory
devices, and we can now afford to spend another 512kB here.
Note that we already have a mechanism to purge FastMalloc caches on
system memory pressure.
Looks like a ~400ms progression on PLT.
Reviewed by Geoff Garen.
* wtf/FastMalloc.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170501
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Thu, 26 Jun 2014 22:37:01 +0000 (22:37 +0000)]
Remove use of PlatformStrategies for Gamepad API.
https://bugs.webkit.org/show_bug.cgi?id=134348
Source/WebCore:
Reviewed by Dean Jackson.
No new tests (Not yet a tested config)
Introduce a virtual GamepadProvider with a process-global shared provider.
The base implementation of the GamepadProvider does nothing.
* platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
(WebCore::GamepadProvider::shared):
(WebCore::GamepadProvider::setSharedProvider):
(WebCore::GamepadProvider::startMonitoringGamepads):
(WebCore::GamepadProvider::stopMonitoringGamepads):
(WebCore::GamepadProvider::platformGamepads):
* platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
(WebCore::GamepadProvider::~GamepadProvider):
* platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
(WebCore::GamepadProviderClient::~GamepadProviderClient):
GamepadManager is now a GamepadProviderClient:
* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::GamepadManager):
(WebCore::GamepadManager::registerNavigator):
(WebCore::GamepadManager::unregisterNavigator):
* Modules/gamepad/GamepadManager.h:
Remove the GamepadStrategy altogether:
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::gamepadStrategy): Deleted.
Call to the shared GamepadProvider instead of the strategy:
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::gamepads):
(WebCore::NavigatorGamepad::gamepadsBecameVisible):
(WebCore::NavigatorGamepad::gamepadConnected):
HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
* platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
(WebCore::deviceMatchingDictionary):
(WebCore::deviceAddedCallback):
(WebCore::deviceRemovedCallback):
(WebCore::deviceValuesChangedCallback):
(WebCore::HIDGamepadProvider::shared):
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
(WebCore::HIDGamepadProvider::startMonitoringGamepads):
(WebCore::HIDGamepadProvider::stopMonitoringGamepads):
(WebCore::HIDGamepadProvider::deviceAdded):
(WebCore::HIDGamepadProvider::deviceRemoved):
(WebCore::HIDGamepadProvider::valuesChanged):
(WebCore::HIDGamepadProvider::removeGamepadForDevice):
* platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
(WebCore::HIDGamepadProvider::platformGamepads):
(WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/HIDGamepad.h: Fix incorrect comment
Source/WebKit:
Reviewed by Dean Jackson.
* WebKit.xcodeproj/project.pbxproj:
Source/WebKit/mac:
Reviewed by Dean Jackson.
Remove all the GamepadStrategy gunk:
* WebCoreSupport/WebHIDGamepadController.mm: Removed.
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createGamepadStrategy): Deleted.
(WebPlatformStrategies::startMonitoringGamepads): Deleted.
(WebPlatformStrategies::stopMonitoringGamepads): Deleted.
(WebPlatformStrategies::platformGamepads): Deleted.
Instead, install the HIDGamepadProvider as the shared GamepadProvider:
* WebView/WebView.mm:
(WebKitInitializeGamepadProviderIfNecessary):
(-[WebView _commonInitializationWithFrameName:groupName:]):
Source/WebKit/win:
Reviewed by Dean Jackson.
* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createGamepadStrategy): Deleted.
* WebCoreSupport/WebPlatformStrategies.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170500
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Thu, 26 Jun 2014 22:22:40 +0000 (22:22 +0000)]
Skip memcmp()ing fully downloaded resources after they become mmap()able.
<https://webkit.org/b/134362>
When we receive word that a downloaded resource is now available for mmap()ing
from the file system, we don't need to compare against the buffered data,
since even if there were a mismatch, the cached version should be the canonical one.
This was added as belt-and-suspenders while the supporting mechanism was being
developed in CFNetwork, and there's no evidence of a race today. This change
turns the runtime checks into debug-only assertions.
Saves ~300ms of main thread time on PLT.
Reviewed by Geoff Garen.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170499
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
l.gombos@samsung.com [Thu, 26 Jun 2014 22:18:57 +0000 (22:18 +0000)]
Define TARGET_OS_IPHONE to 0 for non-darwin ports
https://bugs.webkit.org/show_bug.cgi?id=134347
Reviewed by Darin Adler.
A follow-up to r169880 to make it easier to reason about
the code. The purpose of this change to allow
"#if TARGET_OS_IPHONE" in public header files.
* wtf/Platform.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170498
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jonowells@apple.com [Thu, 26 Jun 2014 22:15:43 +0000 (22:15 +0000)]
Web Inspector: Command-/ (slash) now auto-comments code via CodeMirror 4. Should remove as command to pause
https://bugs.webkit.org/show_bug.cgi?id=134313
Reviewed by Timothy Hatcher.
Changed alternate command to pause/resume from command-slash to command-backslash.
Command-slash sets/unsets comments in all code editors.
* UserInterface/Models/KeyboardShortcut.js: Added Backslash.
* UserInterface/Views/DebuggerSidebarPanel.js: Changed pauseOrResumeAlternateKeyboardShortcut to use Backslash instead of Slash.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170497
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Jun 2014 22:12:41 +0000 (22:12 +0000)]
[iOS] Remove User Default for iOS TextField Debugging
https://bugs.webkit.org/show_bug.cgi?id=134356
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-26
Reviewed by Timothy Hatcher.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170496
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Thu, 26 Jun 2014 21:23:02 +0000 (21:23 +0000)]
[iOS] Add API for opting into character selection granularity
https://bugs.webkit.org/show_bug.cgi?id=134354
Reviewed by Geoff Garen.
* Shared/API/Cocoa/WKFoundation.h: Added a definition of WK_ENUM_AVAILABLE_IOS.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
(WKSelectionGranularity): Added this enum with two values, one representing dynamic
granularity( the current, default behavior) and one representing character granularity.
Delcared new selectionGranularity property.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]): Copy the _selectionGranularity ivar.
* UIProcess/ios/WKContentViewInteraction.mm:
(toUIWebSelectionMode): Added this helper function for mapping WKSelectionGranularity values
to UIWebSelectionMode values.
(-[WKContentView setupInteraction]): Use a selection assistant with the mode specified in
the configuration.
(-[WKContentView _stopAssistingKeyboard]): Ditto.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Changed the behavior of the loupe gesture type in
non-editable text to select a word, rather than an empty range, matching the UITextView
behavior.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170495
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adachan@apple.com [Thu, 26 Jun 2014 20:37:08 +0000 (20:37 +0000)]
Change the target membership of WKBackForwardListPrivate.h from WebKit2 to WebKit.
Rubber-stamped by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170492
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Thu, 26 Jun 2014 20:17:56 +0000 (20:17 +0000)]
Remove a useless return in WebPageProxyIOS
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-26
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
Darin caught this mistake in r170460.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170491
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Thu, 26 Jun 2014 18:49:45 +0000 (18:49 +0000)]
[MSE] Refactoring: Use C++11 for-loops in SourceBuffer.
https://bugs.webkit.org/show_bug.cgi?id=134352
Reviewed by Darin Adler.
Use C++11 style for-loops where appropriate in SourceBuffer now that the
SampleMap ordered objects support them.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
(WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
(WebCore::SourceBuffer::validateInitializationSegment):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170488
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Thu, 26 Jun 2014 18:32:57 +0000 (18:32 +0000)]
[iOS]: Tapping <button> outside of a form is no longer working
https://bugs.webkit.org/show_bug.cgi?id=134319
<rdar://problem/
17213346>
Reviewed by Daniel Bates.
Restore behavior of allowing <button> clicks outside of <form>.
This used to be iOS behavior before it was removed in favor of the
OpenSource (Android?) behavior. Now, willRespondToMouseClickEvents
is only used by iOS, so lets restore the iOS behavior.
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170487
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Thu, 26 Jun 2014 18:31:36 +0000 (18:31 +0000)]
Unreviewed build-fix. Remove unintentionial rename of MediaTime.h -> MediaTimeHash.h.
* Modules/mediasource/SampleMap.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170486
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 26 Jun 2014 18:29:57 +0000 (18:29 +0000)]
[iOS] no need to deactivate audio session
https://bugs.webkit.org/show_bug.cgi?id=134350
Reviewed by Jer Noble.
* platform/audio/mac/MediaSessionManagerMac.cpp:
(MediaSessionManager::updateSessionState): Don't bother calling
AudioSession::setActive(false), WebCore's audio session will be deactivated
automatically if another application begins playing audio.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170485
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Thu, 26 Jun 2014 18:17:36 +0000 (18:17 +0000)]
[MSE] Refactoring: Differentiate between SampleMap decode and presentation order methods
https://bugs.webkit.org/show_bug.cgi?id=134349
Reviewed by Geoffrey Garen.
Refactor SampleMap to clarify the distinction between methods which return decode-order
iterators and ones which retun presentation-order iterators.
Add two classes, PresentationOrderSampleMap and DecodeOrderSampleMap, to contain the actual
MediaTime-to-Sample maps, and move the methods returning presentation-order and decode-order
iterators to each, respectively. Rename the {presentation,decode}{Begin,End}() methods to
begin() and end() so the objects can be used in C++11 for-loops.
Update all the call sites in SourceBuffer to use the new ordered objects.
* Modules/mediasource/SampleMap.cpp:
(WebCore::SampleIsLessThanMediaTimeComparator::operator()): Use new ordered objects.
(WebCore::SampleIsGreaterThanMediaTimeComparator::operator()): Ditto.
(WebCore::SampleMap::clear): Ditto.
(WebCore::SampleMap::addSample): Ditto.
(WebCore::SampleMap::removeSample): Ditto.
(WebCore::PresentationOrderSampleMap::findSampleContainingPresentationTime): Renamed from SampleMap version.
(WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Ditto.
(WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Ditto.
(WebCore::PresentationOrderSampleMap::reverseFindSampleContainingPresentationTime): Ditto.
(WebCore::PresentationOrderSampleMap::reverseFindSampleBeforePresentationTime): Ditto.
(WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Ditto.
(WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Ditto.
(WebCore::DecodeOrderSampleMap::findSyncSamplePriorToDecodeIterator): Ditto.
(WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
(WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Ditto.
(WebCore::PresentationOrderSampleMap::findSamplesBetweenPresentationTimes): Ditto.
(WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRange): Ditto.
(WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
* Modules/mediasource/SampleMap.h:
(WebCore::PresentationOrderSampleMap::begin): Renamed from presentationBegin().
(WebCore::PresentationOrderSampleMap::end): Renamed from presentationEnd().
(WebCore::PresentationOrderSampleMap::rbegin): Renamed from reversePresentationBegin().
(WebCore::PresentationOrderSampleMap::rend): Renamed from reversePresentationEnd().
(WebCore::DecodeOrderSampleMap::begin): Renamed from decodeBegin().
(WebCore::DecodeOrderSampleMap::end): Renamed from decodeEnd().
(WebCore::DecodeOrderSampleMap::rbegin): Renamed from reverseDecodeBegin().
(WebCore::DecodeOrderSampleMap::rend): Renamed from reverseDecodeEnd().
(WebCore::SampleMap::SampleMap): Create new ordered objects.
(WebCore::SampleMap::sizeInBytes): Use new ordered objects.
(WebCore::SampleMap::decodeOrder): Simple accessor.
(WebCore::SampleMap::presentationOrder): Simple accessor.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Use new ordered objects.
(WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Ditto.
(WebCore::SourceBuffer::removeCodedFrames): Ditto.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
(WebCore::SourceBuffer::bufferedSamplesForTrackID): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170484
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Thu, 26 Jun 2014 17:22:00 +0000 (17:22 +0000)]
[Win] Expose Cache Information to WinLauncher
https://bugs.webkit.org/show_bug.cgi?id=134318
Reviewed by Dean Jackson.
Source/JavaScriptCore:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing
MemoryStatistics files to the WIndows build.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
Source/WebKit:
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd: Copy the
CFDictionaryPropertyBag header to WebKit API directory.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Expose the dictionary accessor for the CFDictionaryPropertyBag.
Source/WebKit/win:
* Interfaces/IWebCoreStatistics.idl: Add missing
API added to WebKit since this was last updated.
* WebCache.cpp:
(WebCache::statistics): Add missing elements for
purgable and purged data.
* WebCoreStatistics.cpp: Provide implementaions.
* WebCoreStatistics.h: Ditto.
Tools:
* WinLauncher/Common.cpp: Update for new dialog.
* WinLauncher/WinLauncher.cpp: Add support for WebCache
and WebCoreStatistics.
* WinLauncher/WinLauncher.h:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc:
Update for new Cache Dialog.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props: Link to
WTF.lib
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h: Update
for new Dialog.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170483
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Thu, 26 Jun 2014 17:01:13 +0000 (17:01 +0000)]
Add an undo group for each dictated utterance in WebKit
https://bugs.webkit.org/show_bug.cgi?id=134086
Applied review comments from Sam Weinig.
Move the associated USE #define into Platform.h.
Source/WebCore:
* WebCore.xcodeproj/project.pbxproj:
* editing/mac/TextUndoInsertionMarkup.h: Removed.
* editing/mac/TextUndoInsertionMarkupMac.h:
Source/WebKit2:
* UIProcess/PageClient.h:
Source/WTF:
* wtf/Platform.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170482
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Thu, 26 Jun 2014 16:52:21 +0000 (16:52 +0000)]
[Win] Unreviewed gardening. Use consistent line-endings in file.
* WinLauncher/WinLauncher.h: Use '\n' EOL marker, not DOS-style
'\r\n' EOL.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170481
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Thu, 26 Jun 2014 15:30:23 +0000 (15:30 +0000)]
DFG::FunctionWhitelist::parseFunctionNamesInFile does not close file
<http://webkit.org/b/134343>
<rdar://problem/
17459487>
Reviewed by Michael Saboff.
* dfg/DFGFunctionWhitelist.cpp:
(JSC::DFG::FunctionWhitelist::parseFunctionNamesInFile):
Close the file handle, and log an error on failure.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170480
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Thu, 26 Jun 2014 15:00:19 +0000 (15:00 +0000)]
[EFL][WK2] Fix Debug Build Error in Webcore module.
https://bugs.webkit.org/show_bug.cgi?id=134345
Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-06-26
Reviewed by Zalan Bujtas.
Use static cast to change the type of variable to fix error
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setDrawRange):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170479
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Thu, 26 Jun 2014 14:05:48 +0000 (14:05 +0000)]
[Mac] allow host application to canonicalize media urls
https://bugs.webkit.org/show_bug.cgi?id=134329
Reviewed by Dean Jackson.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::canonicalURL): New, use NSURLProtocol to canonicalize a URL.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Call canonicalURL.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170478
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Thu, 26 Jun 2014 07:48:08 +0000 (07:48 +0000)]
[GTK] Add padding for future expansion to WebKitDOMEventTargetIface
https://bugs.webkit.org/show_bug.cgi?id=134298
Reviewed by Martin Robinson.
* bindings/gobject/WebKitDOMEventTarget.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170476
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Thu, 26 Jun 2014 07:45:38 +0000 (07:45 +0000)]
[GTK] Add support for constants in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=133983
Reviewed by Martin Robinson.
* bindings/gobject/webkitdom.symbols: Add stable constants.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateHeader): Add constants to the header.
(Generate): Pass the interface object to GenerateHeader to get the constants
(IsInterfaceSymbol): Helper function that returns whether the given
symbol belongs to the interface. Check also constants now.
(ReadStableSymbols): Use IsInterfaceSymbol().
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170475
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rego@igalia.com [Thu, 26 Jun 2014 07:30:01 +0000 (07:30 +0000)]
[CSS Grid Layout] Properly support for z-index on grid items
https://bugs.webkit.org/show_bug.cgi?id=103329
Reviewed by Benjamin Poulain.
From Blink r157620 by <jchaffraix@chromium.org> and r172402 by
<wangxianzhu@chromium.org>.
Source/WebCore:
The specification says that grid should match flexbox and force
grid items to be stacking context if z-index is set, regardless
of 'position'. After this change, this is what happens.
Previously z-index changes of static positioned objects were ignored.
However, z-index is applicable for some static positioned objects,
such as grid items. Ignoring them makes the object not to be properly
painted on z-index change.
As StyleResolver has ensured that z-index is non-auto only if
applicable, RenderStyle::changeRequiresLayerRepaint() should not check
again (with inconsistent conditions).
Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html
fast/css-grid-layout/grid-item-z-index-stacking-context.html
fast/css-grid-layout/grid-item-z-index-support.html
* css/StyleResolver.cpp:
(WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent
display is flexbox or grid.
(WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index
condition.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks
out of non-static positioned objects if.
LayoutTests:
* css3/blending/repaint/blend-mode-turn-off-isolation-expected.txt: Test rebaseline.
* fast/css-grid-layout/grid-item-z-index-change-repaint-expected.html: Added.
* fast/css-grid-layout/grid-item-z-index-change-repaint.html: Added.
* fast/css-grid-layout/grid-item-z-index-stacking-context-expected.html: Added.
* fast/css-grid-layout/grid-item-z-index-stacking-context.html: Added.
* fast/css-grid-layout/grid-item-z-index-support-expected.txt: Added.
* fast/css-grid-layout/grid-item-z-index-support.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170474
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
lforschler@apple.com [Thu, 26 Jun 2014 07:25:58 +0000 (07:25 +0000)]
Versioning.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170473
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
roger_fong@apple.com [Thu, 26 Jun 2014 06:45:17 +0000 (06:45 +0000)]
Don't allow sudden termination while writing to local storage.
https://bugs.webkit.org/show_bug.cgi?id=134254.
<rdar://problem/
15093854>.
Reviewed by Darin Adler.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
Disable sudden termination when a database update is scheduled.
(WebKit::LocalStorageDatabase::updateDatabase):
Re-enable sudden termination when the update completes.
* UIProcess/Storage/LocalStorageDatabase.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170471
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
llango.u-szeged@partner.samsung.com [Thu, 26 Jun 2014 06:41:34 +0000 (06:41 +0000)]
[JavaScriptCore] Make build-jsc output format better.
https://bugs.webkit.org/show_bug.cgi?id=133547
Reviewed by Ryosuke Niwa.
* Scripts/build-jsc: Emit built time information on successful builds.
(writeCongrats):
* Scripts/build-webkit: Move formatBuildTime function into webkitdirs.pm.
(cMakeArgsFromFeatures):
(formatBuildTime): Deleted.
* Scripts/webkitdirs.pm:
(formatBuildTime):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170470
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Thu, 26 Jun 2014 06:35:24 +0000 (06:35 +0000)]
HIDGamepad should use CFIndex when looping
https://bugs.webkit.org/show_bug.cgi?id=134337
Reviewed by Dan Bernstein.
* platform/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::initElementsFromArray): Replace int with CFIndex, and use
a local variable for CFArrayCount.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170469
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Jun 2014 05:28:14 +0000 (05:28 +0000)]
Build fix attempt after r170465.
* platform/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::initElementsFromArray):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170468
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Thu, 26 Jun 2014 05:25:32 +0000 (05:25 +0000)]
[Mac] Radio buttons and checkboxes vanish when redrawn
https://bugs.webkit.org/show_bug.cgi?id=134335
Reviewed by Dan Bernstein.
I screwed up when landing r170343 by moving some code around
which broke the logic. We need to query the animation
state for controls after we draw (both statically and animated).
* platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton): We need to check the state of animation again, after
we draw.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170467
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Thu, 26 Jun 2014 05:00:13 +0000 (05:00 +0000)]
[iOS][WK2] Update the long press interactions correctly when an overflow scroll view scrolls
https://bugs.webkit.org/show_bug.cgi?id=134334
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-25
Reviewed by Simon Fraser.
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewWillStartPanGesture):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::overflowScrollViewWillStartPanGesture):
(WebKit::PageClientImpl::overflowScrollViewDidScroll):
(WebKit::PageClientImpl::scrollViewWillStartPanGesture): Deleted.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
(WebKit::WebPageProxy::overflowScrollViewDidScroll):
(WebKit::WebPageProxy::scrollViewWillStartPanGesture): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170466
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Thu, 26 Jun 2014 04:49:34 +0000 (04:49 +0000)]
Add HID-based gamepad implementation for Mac
https://bugs.webkit.org/show_bug.cgi?id=134324
Reviewed by Dean Jackson.
Source/WebCore:
No new tests (Not yet a tested config)
* Modules/gamepad/Gamepad.cpp:
(WebCore::Gamepad::Gamepad):
(WebCore::Gamepad::updateFromPlatformGamepad): Update the Gamepad’s data from the passed-in PlatformGamepad.
* Modules/gamepad/Gamepad.h:
* Modules/gamepad/GamepadButton.h:
(WebCore::GamepadButton::create): Change to use Ref instead of RefPtr.
GamepadManager is a GamepadStrategyClient that receives notifications from the platform gamepad implementation
and forwards them to NavigatorGamepad objects. In the future it will also handle event dispatch and exposing
gamepads to the API layer when a button is pressed:
* Modules/gamepad/GamepadManager.cpp: Added.
(WebCore::GamepadManager::shared):
(WebCore::GamepadManager::GamepadManager):
(WebCore::GamepadManager::platformGamepadConnected):
(WebCore::GamepadManager::platformGamepadDisconnected):
(WebCore::GamepadManager::registerNavigator):
(WebCore::GamepadManager::unregisterNavigator):
* Modules/gamepad/GamepadManager.h:
The NavigatorGamepad supplement actually manages visibility of Gamepads on a per-DOMWindow basis:
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::NavigatorGamepad):
(WebCore::NavigatorGamepad::~NavigatorGamepad):
(WebCore::NavigatorGamepad::from):
(WebCore::NavigatorGamepad::gamepads):
(WebCore::NavigatorGamepad::gamepadsBecameVisible):
(WebCore::NavigatorGamepad::gamepadConnected):
(WebCore::NavigatorGamepad::gamepadDisconnected):
* Modules/gamepad/NavigatorGamepad.h:
(WebCore::NavigatorGamepad::navigationStart):
HIDGamepad is a PlatformGamepad that wraps an IOHIDDeviceRef and keeps input values updated:
* platform/mac/HIDGamepad.cpp: Added.
(WebCore::HIDGamepad::HIDGamepad):
(WebCore::HIDGamepad::initElements):
(WebCore::HIDGamepad::initElementsFromArray):
(WebCore::HIDGamepad::maybeAddButton):
(WebCore::HIDGamepad::maybeAddAxis):
(WebCore::HIDGamepad::valueChanged):
* platform/mac/HIDGamepad.h: Added.
(WebCore::HIDGamepadElement::HIDGamepadElement):
(WebCore::HIDGamepadElement::~HIDGamepadElement):
(WebCore::HIDGamepadElement::isButton):
(WebCore::HIDGamepadElement::isAxis):
(WebCore::HIDGamepadButton::HIDGamepadButton):
(WebCore::HIDGamepadAxis::HIDGamepadAxis):
(WebCore::HIDGamepad::hidDevice):
HIDGamepadListener wraps an IOHIDManagerRef and continuously listens for changes to Gamepad-type
devices plugged in to the system:
* platform/mac/HIDGamepadListener.cpp: Added.
(WebCore::deviceMatchingDictionary):
(WebCore::deviceAddedCallback):
(WebCore::deviceRemovedCallback):
(WebCore::deviceValuesChangedCallback):
(WebCore::HIDGamepadListener::shared):
(WebCore::HIDGamepadListener::HIDGamepadListener):
(WebCore::HIDGamepadListener::indexForNewlyConnectedDevice):
(WebCore::HIDGamepadListener::deviceAdded):
(WebCore::HIDGamepadListener::deviceRemoved):
(WebCore::HIDGamepadListener::valuesChanged):
(WebCore::HIDGamepadListener::removeGamepadForDevice):
* platform/mac/HIDGamepadListener.h: Copied from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
(WebCore::HIDGamepadListenerClient::~HIDGamepadListenerClient):
(WebCore::HIDGamepadListener::setClient):
(WebCore::HIDGamepadListener::platformGamepads):
(WebCore::HIDGamepadListener::setShouldDispatchCallbacks):
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
Source/WebKit:
* WebKit.xcodeproj/project.pbxproj:
Source/WebKit/mac:
Add a class that acts as an intermediary between the GamepadStrategyClient
and the HIDGamepadListener:
* WebCoreSupport/WebHIDGamepadController.h:
* WebCoreSupport/WebHIDGamepadController.mm:
(WebHIDGamepadController::shared):
(WebHIDGamepadController::WebHIDGamepadController):
(WebHIDGamepadController::gamepadConnected):
(WebHIDGamepadController::gamepadDisconnected):
(WebHIDGamepadController::registerGamepadStrategyClient):
(WebHIDGamepadController::unregisterGamepadStrategyClient):
Implement the strategies by using the HIDGamepadListener:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::startMonitoringGamepads):
(WebPlatformStrategies::stopMonitoringGamepads):
(WebPlatformStrategies::platformGamepads):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170465
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Thu, 26 Jun 2014 04:44:24 +0000 (04:44 +0000)]
WebProgressTracker updates progress too frequently
https://bugs.webkit.org/show_bug.cgi?id=134185
Reviewed by Tim Horton.
The old code throttled the progress update to when either 100ms has passed or the delta is at least 2%
but this was still not enough in pages that loaded in sub-seconds. The new code always throttles it at 200ms.
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::incrementProgress):
* loader/ProgressTracker.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170464
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 26 Jun 2014 04:15:52 +0000 (04:15 +0000)]
[iOS WK2] Page jumps when rubber-banding on azuremagazine.com
https://bugs.webkit.org/show_bug.cgi?id=134238
<rdar://problem/
16918228>
Reviewed by Benjamin Poulain.
If the scroll view is in the process of rubber-banding when -setContentSize: is called,
it clamps the scroll offsets between zero and the max value, which visibly interrupts the
rubberband. This can easily happen now that we continually send scroll events to the page
on scrolling, especially when pages like azuremagazine.com do fake sticky by toggling
in-flow elements into position:fixed.
Fix by computing the amount of rubber-band before calling -setContentSize:, and then
restoring the contentOffset with the same amount of rubber-band even when the content size
is different, for top/left rubberbands.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView _currentTopLeftRubberbandAmount]):
(-[WKScrollView _restoreContentOffsetWithRubberbandAmount:]):
(-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170463
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 26 Jun 2014 04:15:50 +0000 (04:15 +0000)]
[iOS WK2] Fixed position elements jump around when zooming
https://bugs.webkit.org/show_bug.cgi?id=134328
<rdar://problem/
17447048>
Reviewed by Zalan Bujtas.
If a given remote layer tree commit contains changes of layers for viewport-constrained
objects, then the associated scrolling tree also needs to show that the layers changed,
since we need to re-run the "viewport changed" logic in the UI process to get the
layers correctly positioned for the current zoom level.
The bug was that page scale changes resulted in small "pixel alignment" position
changes which touched layers, but we didn't commit any scrolling tree changes. So
the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
update to adjust them for the current transient zoom.
Fix by making use of the existing "alignment offset" field in the ViewportConstraints
data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
nodes were updated.
Source/WebCore:
* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::operator==):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::pixelAlignmentOffset):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateGeometry):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
Source/WebKit2:
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170462
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Thu, 26 Jun 2014 04:15:40 +0000 (04:15 +0000)]
[iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view
https://bugs.webkit.org/show_bug.cgi?id=134323
Reviewed by Benjamin Poulain.
Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements
out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale
relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width.
The width is clamped to get reasonable behavior on wide pages.
* page/FrameView.cpp:
(WebCore::FrameView::rectForViewportConstrainedObjects):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170461
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Thu, 26 Jun 2014 04:15:32 +0000 (04:15 +0000)]
REGRESSION (r170325): UI process crashes in lastCommittedLayerTreeTransactionID() when the Web Content process crashes
https://bugs.webkit.org/show_bug.cgi?id=134284
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-25
Reviewed by Simon Fraser.
The crash was caused by the access to the Drawing Area after the crash.
This lead to discovering another bug: m_lastVisibleContentRectUpdate could have been updated after WebPageProxy::resetState(),
which in turn would prevent valid updates when a new WebProcess is created.
This patch fixes both issues by moving the VisibleContentRectUpdateInfo to be internal to WebPageProxy,
then early return if we get there in an invalid state.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170460
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Thu, 26 Jun 2014 03:59:10 +0000 (03:59 +0000)]
Add new platform gamepad abstractions
https://bugs.webkit.org/show_bug.cgi?id=134325
Reviewed by Dean Jackson.
Source/WebCore:
No new tests (Not yet a tested config)
- GamepadStrategy lets ports customize the 3 basic behaviors needed for a gamepad
implementation to feed the API in WebCore.
- GamepadStrategyClient gives arbitrary objects in WebCore the ability to register
for callbacks with the GamepadStrategy.
- PlatformGamepad is a platform-agnostic object that represents the data that
feeds into the Gamepad object that is exposed to web content.
The code in this patch is dead as-is, but https://bugs.webkit.org/show_bug.cgi?id=134324
will contain an immediate follow-up patch that uses it.
Makes sense to review them separately.
* WebCore.xcodeproj/project.pbxproj:
* platform/GamepadStrategy.h: Added.
(WebCore::GamepadStrategy::~GamepadStrategy):
* platform/GamepadStrategyClient.h: Added.
(WebCore::GamepadStrategyClient::~GamepadStrategyClient):
* platform/PlatformGamepad.h: Added.
(WebCore::PlatformGamepad::~PlatformGamepad):
(WebCore::PlatformGamepad::id):
(WebCore::PlatformGamepad::lastUpdateTime):
(WebCore::PlatformGamepad::connectTime):
(WebCore::PlatformGamepad::PlatformGamepad):
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::gamepadStrategy):
(WebCore::PlatformStrategies::PlatformStrategies):
Source/WebKit/mac:
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createGamepadStrategy):
(WebPlatformStrategies::startMonitoringGamepads):
(WebPlatformStrategies::stopMonitoringGamepads):
(WebPlatformStrategies::platformGamepads):
Source/WebKit/win:
* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createGamepadStrategy):
* WebCoreSupport/WebPlatformStrategies.h:
Source/WebKit2:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createGamepadStrategy):
* NetworkProcess/NetworkProcessPlatformStrategies.h:
Actually return a GamepadStrategy in WK2 with no implementation for now:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createGamepadStrategy):
(WebKit::WebPlatformStrategies::startMonitoringGamepads):
(WebKit::WebPlatformStrategies::stopMonitoringGamepads):
(WebKit::WebPlatformStrategies::platformGamepads):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170459
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Thu, 26 Jun 2014 02:39:10 +0000 (02:39 +0000)]
Assertion failed: CGPathAddRoundedRect asserts on non-renderable rounded rectangle.
https://bugs.webkit.org/show_bug.cgi?id=134288
Reviewed by Simon Fraser.
Speculative fix. This changeset attempts to address a possible mantissa overflow of radius
when checking whether the rounded rectangle is renderable.
We convert both the radius and the rectangle values to CGFloat(float/double) to perform
this renderable check, instead of always using float.
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::Radii::scale): Move scale(float, float) from RoundedRect to FloatRoundedRect.
(WebCore::FloatRoundedRect::isRenderable): Add check if radius is >= 0.
* platform/graphics/FloatRoundedRect.h:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::Radii::scale):
(WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): use FloatRoundeRect::Radii.
* platform/graphics/RoundedRect.h:
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::platformAddPathForRoundedRect): use epsilon() to ensure width/height is always >= even with mantissa overflow.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170458
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ljaehun.lim@samsung.com [Thu, 26 Jun 2014 02:10:59 +0000 (02:10 +0000)]
Unreviewed, CMake build fix after r170450
* CMakeLists.txt: Add ProcessAssertion.cpp and ProcessThrottler.cpp.
* UIProcess/ProcessAssertion.cpp: Replace #import with #include.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170457
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jonowells@apple.com [Thu, 26 Jun 2014 01:34:53 +0000 (01:34 +0000)]
Web Inspector: Rules panel's strikethrough gets confused at -webkit-align-items: flex-start;
https://bugs.webkit.org/show_bug.cgi?id=133515
Reviewed by Timothy Hatcher.
The CSS style declaration text editor uses the author's shortest instance of prefix whitespace
to create an indentation baseline for the style editor. This needs to consider the possibility
that there is no whitespace prefixing one of the rules. Also clarified a FIXME line.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js: Account for zero-length whitespace.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170456
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Thu, 26 Jun 2014 01:22:08 +0000 (01:22 +0000)]
[MSE] removeCodedFrames() can remove more than it should
https://bugs.webkit.org/show_bug.cgi?id=134320
Reviewed by Geoff Garen.
removeCodedFrames() can remove more samples than it should because it compares an iterator
in presentation timespace to one in decode timespace. Clean up this code by removing frames
in decode order. Rename variables and add comments to make explicit which timespace defines
the iterators being used.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::removeCodedFrames):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170455
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Thu, 26 Jun 2014 01:04:47 +0000 (01:04 +0000)]
compositing/visible-rect/iframe-no-layers.html is broken and confusing
https://bugs.webkit.org/show_bug.cgi?id=134317
Reviewed by Simon Fraser.
The test doesn't wait for scrolling to occur and has unnecessary style stanzas.
* compositing/visible-rect/iframe-no-layers.html:
* compositing/visible-rect/resources/subframe-with-layers.html:
* platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/ios-sim/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170454
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Thu, 26 Jun 2014 00:55:29 +0000 (00:55 +0000)]
[WK2] Shadow layer is in the wrong place while pinch-zooming
https://bugs.webkit.org/show_bug.cgi?id=134321
Reviewed by Dan Bernstein.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
The anchor point of the shadow layer changed, so we no longer need to shift our position to the center.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170453
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Thu, 26 Jun 2014 00:52:25 +0000 (00:52 +0000)]
Fixed crashes after r170450.
Reviewed by Tim Horton.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Removed iOS platform #ifdef around
initialization of m_throttler.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170452
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin@apple.com [Thu, 26 Jun 2014 00:51:05 +0000 (00:51 +0000)]
Crash in ScrollingTree::isRubberBandInProgress()
https://bugs.webkit.org/show_bug.cgi?id=134316
-and corresponding-
<rdar://problem/
16247911>
Reviewed by Geoffrey Garen.
Source/WebCore:
This crash appears to have been caused by http://trac.webkit.org/changeset/161276
which moved the ScrollingNode creation code from ScrollingTree over to
ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we
believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
even though the ScrollingTree was kept alive by the bind call to propagate
commitNewTreeState() over to the scrolling thread. The fix is to move node
creation back to the ScrollingTree and to use the this pointer to create new
nodes rather than the ScrollingCoordinator's ScrollingTree pointer.
Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/AsyncScrollingCoordinator.h:
Re-name createNode to createScrollingTreeNode().
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTree.h:
Remove this implementation of createNode that called into the
ScrollingCoordinator.
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::createNode): Deleted.
* page/scrolling/ThreadedScrollingTree.h:
Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/ios/ScrollingCoordinatorIOS.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.
Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::createScrollingTreeNode):
(WebCore::ScrollingTreeIOS::createNode): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.h:
Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.
Add the implementation of createScrollingTreeNode() for the Mac to
ScrollingTreeMac since it can create Mac-specific nodes.
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeMac.h:
Source/WebKit2:
Move all ScrollingTreeNode creation from ScrollingCoordinator subclasses into
ScrollingTree subclasses.
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
(WebKit::RemoteScrollingTree::createNode): Deleted.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170451
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Thu, 26 Jun 2014 00:34:58 +0000 (00:34 +0000)]
Web process should become active when sent a message that requires a callback
https://bugs.webkit.org/show_bug.cgi?id=134315
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Removed one-off code to
acquire an activity token, now that WebPageProxy::takeSnapshot does it automatically for us.
* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::CallbackBase): Made this constructor take and adopt an activity
token.
(WebKit::GenericCallback::create): Added an optional activity token parameter.
(WebKit::GenericCallback::GenericCallback): Pass the activity token to the CallbackBase
constructor.
(WebKit::CallbackMap::put): Added an activity token parameter, which is passed along to
GenericCallback::create.
* UIProcess/ProcessAssertion.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
This copy includes generic no-op implementations for platforms that don’t have assertions.
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):
* UIProcess/ProcessAssertion.h: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.h.
Changed platform #ifdefs to make this usable by all platforms.
* UIProcess/ProcessThrottler.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.mm.
Removed iOS platform #ifdef.
* UIProcess/ProcessThrottler.h: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.h.
Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand): Create a background activity token and pass it
along to CallbackMap::put.
(WebKit::WebPageProxy::runJavaScriptInMainFrame): Ditto.
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation): Ditto.
(WebKit::WebPageProxy::getSourceForFrame): Ditto.
(WebKit::WebPageProxy::getContentsAsString): Ditto.
(WebKit::WebPageProxy::getBytecodeProfile): Ditto.
(WebKit::WebPageProxy::getSelectionOrContentsAsString): Ditto.
(WebKit::WebPageProxy::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPageProxy::getMainResourceDataOfFrame): Ditto.
(WebKit::WebPageProxy::getResourceDataFromFrame): Ditto.
(WebKit::WebPageProxy::getWebArchiveOfFrame): Ditto.
(WebKit::WebPageProxy::getMarkedRangeAsync): Ditto.
(WebKit::WebPageProxy::getSelectedRangeAsync): Ditto.
(WebKit::WebPageProxy::characterIndexForPointAsync): Ditto.
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync): Ditto.
(WebKit::WebPageProxy::takeSnapshot): Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspend): Moved from WebProcessProxyIOS.mm.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
* UIProcess/WebProcessProxy.h: Removed iOS platform #ifdef.
* UIProcess/WebProcessProxy.messages.in: Ditto.
* UIProcess/ios/ProcessAssertionIOS.mm: Renamed from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWithGesture): Changed to pass the function directly to
CallbackMap::put, along with a background activity token.
(WebKit::WebPageProxy::updateSelectionWithTouches): Ditto.
(WebKit::WebPageProxy::requestAutocorrectionData): Ditto.
(WebKit::WebPageProxy::applyAutocorrection): Ditto.
(WebKit::WebPageProxy::requestDictationContext): Ditto.
(WebKit::WebPageProxy::requestAutocorrectionContext): Ditto.
(WebKit::WebPageProxy::selectWithTwoTouches): Ditto.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendProcessWillSuspend): Moved to WebProcessProxy.cpp.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): Create a background
activity token and pass it along to CallbackMap::put.
* WebKit2.xcodeproj/project.pbxproj: Updated for moves and copies.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Moved iOS platform #ifdef.
* WebProcess/WebProcess.h: Ditto.
* WebProcess/WebProcess.messages.in: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170450
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
enrica@apple.com [Thu, 26 Jun 2014 00:33:07 +0000 (00:33 +0000)]
iOS build fix after trac.webkit.org/changeset/170447.
Unreviewed.
* editing/mac/TextUndoInsertionMarkup.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170449
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
barraclough@apple.com [Wed, 25 Jun 2014 23:58:13 +0000 (23:58 +0000)]
Should _updateVisibilityState on view hide/unhide.
https://bugs.webkit.org/show_bug.cgi?id=134314
rdar://
17171803
Reviewed by Sam Weinig.
* WebView/WebView.mm:
(-[WebView viewDidHide]):
(-[WebView viewDidUnhide]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170448
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Wed, 25 Jun 2014 23:50:44 +0000 (23:50 +0000)]
Add an undo group for each dictated utterance in WebKit
https://bugs.webkit.org/show_bug.cgi?id=134086
Reviewed by Enrica Casucci.
Source/WebCore:
Provide a mechanism for ending the current undo group on a text insertion.
This allows a stream of text, that is normally part of one undo group, to be
broken up so that subsequent undo commands will only undo portions of the text stream.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/mac/TextUndoInsertionMarkup.h: Added.
* editing/mac/TextUndoInsertionMarkup.mm: Added.
(WebCore::shouldRegisterInsertionUndoGroup):
(WebCore::registerInsertionUndoGrouping):
Source/WebKit/mac:
* WebView/WebHTMLView.mm:
(-[WebHTMLView validAttributesForMarkedText]):
(-[WebHTMLView insertText:]):
Source/WebKit2:
* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView validAttributesForMarkedText]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::registerInsertionUndoGrouping):
(WebKit::WebPageProxy::insertTextAsync):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::registerInsertionUndoGrouping):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::registerInsertionUndoGrouping):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::insertDictatedTextAsync):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync):
Tools:
Create a method for creating attributed strings with the undo insertion marker.
* DumpRenderTree/mac/TextInputController.m:
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController stringWithUndoGroupingInsertion:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170447
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Wed, 25 Jun 2014 23:41:19 +0000 (23:41 +0000)]
[Win] Whoops! DirectX SDK is still needed.
* building/tools.html: Put DirectX instruction back.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170446
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Jun 2014 23:13:24 +0000 (23:13 +0000)]
[iOS]: WK2 Inspector Node Search
https://bugs.webkit.org/show_bug.cgi?id=134279
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-25
Reviewed by Benjamin Poulain.
Source/WebCore:
* WebCore.exp.in:
Export Node::inspect for WebKit2.
Source/WebKit2:
* UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h: Added.
* UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm: Added.
(-[WKInspectorNodeSearchGestureRecognizer locationInView:]):
(-[WKInspectorNodeSearchGestureRecognizer _processTouches:state:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesBegan:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesMoved:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesEnded:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesCancelled:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer reset]):
Gesture recognizer that tracks a single touch, updates as that touch
moves, and ends when that touch is cancelled or ends. The location
of the gesture recognizer is the location of the touch it was tracking.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
Handle the inspector node search gesture recognizer if needed.
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
Helpers to add and remove the default gestures.
(-[WKContentView _enableInspectorNodeSearch]):
(-[WKContentView _disableInspectorNodeSearch]):
When node search is enabled, remove all gesture recognizers and
replace with a single inspector node search gesture recognizer.
Likewise, inverse that when disabled.
(-[WKContentView _inspectorNodeSearchRecognized:]):
Notify the WebProcess of new touch positions during node search.
(-[WKContentView hasSelectablePositionAtPoint:]):
When inspector node search is enabled, disable selection.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::inspectorNodeSearchMovedToPosition):
Send a mouse move to the new location. WebCore will update the highlight.
(WebKit::WebPage::inspectorNodeSearchEndedAtPosition):
Inspect the node at the location.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _enableInspectorNodeSearch]):
(-[WKWebView _disableInspectorNodeSearch]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::enableInspectorNodeSearch):
(WebKit::PageClientImpl::disableInspectorNodeSearch):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::inspectorNodeSearchMovedToPosition):
(WebKit::WebPageProxy::inspectorNodeSearchEndedAtPosition):
(WebKit::WebPageProxy::enableInspectorNodeSearch):
(WebKit::WebPageProxy::disableInspectorNodeSearch):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::didSetSearchingForNode):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::enableInspectorNodeSearch):
(WebKit::WebPage::disableInspectorNodeSearch):
Pass the inspector node search state up from the WebProcess
to the WKContentView in the UIProcess. Likewise some messages
in the reverse direction.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170445
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dburkart@apple.com [Wed, 25 Jun 2014 22:58:01 +0000 (22:58 +0000)]
Add support for 5-tuple versioning.
Reviewed by David Farler.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170444
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 25 Jun 2014 22:45:20 +0000 (22:45 +0000)]
[MSE][Mac] REGRESSION(r170336) - zero tolerance seeks are ignored.
https://bugs.webkit.org/show_bug.cgi?id=134310
Reviewed by Brent Fulgham.
Tests for zero tolerance seeks were inadvertantly reversed in r170336.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170443
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Wed, 25 Jun 2014 22:37:37 +0000 (22:37 +0000)]
<rdar://problem/
17448049> REGRESSION (r170254): Input methods don’t work
https://bugs.webkit.org/show_bug.cgi?id=134311
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getSelectedRangeAsync): Removed code that accidentally put the
callback function into a throwaway EditingRangeCallback.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170442
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Wed, 25 Jun 2014 21:59:54 +0000 (21:59 +0000)]
2014-06-25 Geoffrey Garen <ggaren@apple.com>
Build fix.
Unreviewed.
* runtime/JSDateMath.cpp:
(JSC::parseDateFromNullTerminatedCharacters):
* runtime/VM.cpp:
(JSC::VM::resetDateCache): Use std::numeric_limits instead of QNaN
constant since that constant doesn't exist anymore.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170441
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren@apple.com [Wed, 25 Jun 2014 21:51:45 +0000 (21:51 +0000)]
Unreviewed, rolling out r166876.
Caused some ECMA test262 failures
Reverted changeset:
"Date object needs to check for ES5 15.9.1.14 TimeClip limit."
https://bugs.webkit.org/show_bug.cgi?id=131248
http://trac.webkit.org/changeset/166876
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170440
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy_horton@apple.com [Wed, 25 Jun 2014 21:43:14 +0000 (21:43 +0000)]
[iOS][WK2] Rotating a zoomed PDF leads to weird scrolling behavior
https://bugs.webkit.org/show_bug.cgi?id=134286
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _computePageAndDocumentFrames]):
The WKPDFView frame and scroll view content size need to be scaled.
(-[WKPDFView web_setScrollView:]): Deleted.
(-[WKPDFView web_initWithFrame:webView:]):
Get rid of _documentFrame, and don't set it at initWithFrame: time (it's not useful yet).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170439
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 25 Jun 2014 21:32:49 +0000 (21:32 +0000)]
[MSE][Mac] Pause playback when readyState drops below HAVE_FUTURE_DATA, and do not complete seek until it rises above HAVE_METADATA.
https://bugs.webkit.org/show_bug.cgi?id=134306
Reviewed by Eric Carlson.
Pause the synchronizer before seeking, and do not resume the synchronizer until it both reports that the seek completed,
and that the readyState rises above HAVE_METADATA. In every other location where we change the rate of the synchronizer,
gate that rate change on the above.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Check shouldBePlaying().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Unset m_seekCompleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Pause the synchronizer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Check shouldBePlaying().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying): Test m_seeking, !m_seekCompleted, and the readyState.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): Set m_seekCompleted; check shouldBePlaying() and play if appropriate.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170438
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jer.noble@apple.com [Wed, 25 Jun 2014 21:31:35 +0000 (21:31 +0000)]
[MSE] Update monitorSourceBuffers to match recent spec changes
https://bugs.webkit.org/show_bug.cgi?id=134305
Reviewed by Eric Carlson.
In W3C bug #24347, the text for the third clause of Source Buffer Monitoring was updated. Update our
implementation to match the new text.
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::monitorSourceBuffers):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170437
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Wed, 25 Jun 2014 21:04:17 +0000 (21:04 +0000)]
And peavo@outlook.com <peavo@outlook.com>
Use references instead of pointers in RenderTheme.
https://bugs.webkit.org/show_bug.cgi?id=134261
Reviewed by Zalan Bujtas.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::shouldHaveSpinButton):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::updateAppearance):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::adjustSizeConstraints):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
(WebCore::RenderThemeEfl::supportsFocusRing):
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::adjustCheckboxStyle):
(WebCore::RenderThemeEfl::adjustRadioStyle):
(WebCore::RenderThemeEfl::adjustButtonStyle):
(WebCore::RenderThemeEfl::adjustMenuListStyle):
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::adjustTextFieldStyle):
(WebCore::RenderThemeEfl::adjustTextAreaStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldStyle):
(WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
(WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeEfl::animationDurationForProgressBar):
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::supportsFocusRing):
(WebCore::RenderThemeGtk::adjustButtonStyle):
(WebCore::RenderThemeGtk::adjustMenuListStyle):
(WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldStyle):
(WebCore::RenderThemeGtk::adjustSliderTrackStyle):
(WebCore::RenderThemeGtk::adjustSliderThumbStyle):
(WebCore::borderRadiiFromStyle):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaSliderThumb):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
(WebCore::RenderThemeGtk::adjustProgressBarStyle):
(WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeGtk::animationDurationForProgressBar):
(WebCore::RenderThemeGtk::calculateProgressRect):
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::setToggleSize):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::RenderThemeGtk::comboBoxArrowSize):
(WebCore::RenderThemeGtk::getComboBoxPadding):
(WebCore::RenderThemeGtk::popupInternalPaddingLeft):
(WebCore::RenderThemeGtk::popupInternalPaddingRight):
(WebCore::RenderThemeGtk::popupInternalPaddingTop):
(WebCore::RenderThemeGtk::popupInternalPaddingBottom):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::setToggleSize):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::popupInternalPaddingLeft):
(WebCore::RenderThemeGtk::popupInternalPaddingRight):
(WebCore::RenderThemeGtk::popupInternalPaddingTop):
(WebCore::RenderThemeGtk::popupInternalPaddingBottom):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::layout):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
* rendering/RenderMediaControls.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle):
(RenderMenuList::computeIntrinsicLogicalWidths):
(RenderMenuList::menuStyle):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::updateLogicalWidth):
(WebCore::RenderMeter::computeLogicalHeight):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::updateAnimationState):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::isControlStyled):
(WebCore::RenderTheme::supportsFocusRing):
(WebCore::RenderTheme::stateChanged):
(WebCore::RenderTheme::adjustCheckboxStyle):
(WebCore::RenderTheme::adjustRadioStyle):
(WebCore::RenderTheme::adjustButtonStyle):
(WebCore::RenderTheme::adjustInnerSpinButtonStyle):
(WebCore::RenderTheme::adjustTextFieldStyle):
(WebCore::RenderTheme::adjustTextAreaStyle):
(WebCore::RenderTheme::adjustMenuListStyle):
(WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
(WebCore::RenderTheme::adjustMeterStyle):
(WebCore::RenderTheme::meterSizeForBounds):
(WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
(WebCore::RenderTheme::animationDurationForProgressBar):
(WebCore::RenderTheme::adjustProgressBarStyle):
(WebCore::RenderTheme::shouldHaveSpinButton):
(WebCore::RenderTheme::adjustMediaControlStyle):
(WebCore::RenderTheme::adjustSliderTrackStyle):
(WebCore::RenderTheme::adjustSliderThumbStyle):
(WebCore::RenderTheme::adjustSliderThumbSize):
(WebCore::RenderTheme::adjustSearchFieldStyle):
(WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::supportsHover):
(WebCore::RenderTheme::minimumMenuListSize):
(WebCore::RenderTheme::popupInternalPaddingLeft):
(WebCore::RenderTheme::popupInternalPaddingRight):
(WebCore::RenderTheme::popupInternalPaddingTop):
(WebCore::RenderTheme::popupInternalPaddingBottom):
(WebCore::RenderTheme::popupMenuSize):
(WebCore::RenderTheme::setCheckboxSize):
(WebCore::RenderTheme::setRadioSize):
(WebCore::RenderTheme::setButtonSize):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustCheckboxStyle):
(WebCore::RenderThemeIOS::isControlStyled):
(WebCore::RenderThemeIOS::adjustRadioStyle):
(WebCore::RenderThemeIOS::popupInternalPaddingRight):
(WebCore::RenderThemeIOS::adjustRoundBorderRadius):
(WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
(WebCore::RenderThemeIOS::adjustSliderTrackStyle):
(WebCore::RenderThemeIOS::adjustSliderThumbSize):
(WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeIOS::animationDurationForProgressBar):
(WebCore::RenderThemeIOS::adjustSearchFieldStyle):
(WebCore::RenderThemeIOS::adjustButtonStyle):
(WebCore::RenderThemeIOS::setButtonSize):
(WebCore::RenderThemeIOS::shouldHaveSpinButton):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::isControlStyled):
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::sizeForFont):
(WebCore::RenderThemeMac::sizeForSystemFont):
(WebCore::RenderThemeMac::setSizeFromFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::adjustTextFieldStyle):
(WebCore::RenderThemeMac::adjustTextAreaStyle):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::meterSizeForBounds):
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::levelIndicatorFor):
(WebCore::RenderThemeMac::progressBarRectForBounds):
(WebCore::RenderThemeMac::minimumProgressBarHeight):
(WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeMac::animationDurationForProgressBar):
(WebCore::RenderThemeMac::adjustProgressBarStyle):
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::RenderThemeMac::adjustMenuListStyle):
(WebCore::RenderThemeMac::popupInternalPaddingLeft):
(WebCore::RenderThemeMac::popupInternalPaddingRight):
(WebCore::RenderThemeMac::popupInternalPaddingTop):
(WebCore::RenderThemeMac::popupInternalPaddingBottom):
(WebCore::RenderThemeMac::popupMenuSize):
(WebCore::RenderThemeMac::minimumMenuListSize):
(WebCore::RenderThemeMac::adjustSliderTrackStyle):
(WebCore::RenderThemeMac::adjustSliderThumbStyle):
(WebCore::RenderThemeMac::setSearchCellState):
(WebCore::RenderThemeMac::setSearchFieldSize):
(WebCore::RenderThemeMac::adjustSearchFieldStyle):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeMac::adjustSliderThumbSize):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::isControlStyled):
(WebCore::RenderThemeSafari::adjustRepaintRect):
(WebCore::RenderThemeSafari::baselinePosition):
(WebCore::RenderThemeSafari::controlSizeForFont):
(WebCore::RenderThemeSafari::sizeForFont):
(WebCore::RenderThemeSafari::sizeForSystemFont):
(WebCore::RenderThemeSafari::setSizeFromFont):
(WebCore::RenderThemeSafari::setFontFromControlSize):
(WebCore::RenderThemeSafari::controlSizeForSystemFont):
(WebCore::RenderThemeSafari::paintCheckbox):
(WebCore::RenderThemeSafari::setCheckboxSize):
(WebCore::RenderThemeSafari::paintRadio):
(WebCore::RenderThemeSafari::setRadioSize):
(WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
(WebCore::RenderThemeSafari::adjustButtonStyle):
(WebCore::RenderThemeSafari::setButtonSize):
(WebCore::RenderThemeSafari::adjustTextFieldStyle):
(WebCore::RenderThemeSafari::adjustTextAreaStyle):
(WebCore::RenderThemeSafari::paintMenuList):
(WebCore::RenderThemeSafari::adjustMenuListStyle):
(WebCore::RenderThemeSafari::popupInternalPaddingLeft):
(WebCore::RenderThemeSafari::popupInternalPaddingRight):
(WebCore::RenderThemeSafari::popupInternalPaddingTop):
(WebCore::RenderThemeSafari::popupInternalPaddingBottom):
(WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
(WebCore::RenderThemeSafari::minimumMenuListSize):
(WebCore::RenderThemeSafari::adjustSliderThumbStyle):
(WebCore::RenderThemeSafari::adjustSliderThumbSize):
(WebCore::RenderThemeSafari::setSearchFieldSize):
(WebCore::RenderThemeSafari::adjustSearchFieldStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeSafari::adjustMeterStyle):
(WebCore::RenderThemeSafari::meterSizeForBounds):
(WebCore::RenderThemeSafari::paintMeter):
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::supportsHover):
(WebCore::RenderThemeWin::supportsFocusRing):
(WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeWin::setCheckboxSize):
(WebCore::RenderThemeWin::paintTextField):
(WebCore::RenderThemeWin::paintMenuList):
(WebCore::RenderThemeWin::adjustMenuListStyle):
(WebCore::RenderThemeWin::adjustMenuListButtonStyle):
(WebCore::RenderThemeWin::adjustSliderThumbSize):
(WebCore::RenderThemeWin::adjustSearchFieldStyle):
(WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeWin::adjustMeterStyle):
(WebCore::RenderThemeWin::meterSizeForBounds):
(WebCore::RenderThemeWin::paintMeter):
* rendering/RenderThemeWin.h:
(WebCore::RenderThemeWin::paintCheckbox):
(WebCore::RenderThemeWin::paintRadio):
(WebCore::RenderThemeWin::setRadioSize):
(WebCore::RenderThemeWin::paintTextArea):
(WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
(WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
(WebCore::RenderThemeWin::adjustButtonStyle):
(WebCore::RenderThemeWin::adjustTextFieldStyle):
(WebCore::RenderThemeWin::adjustTextAreaStyle):
(WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170435
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Wed, 25 Jun 2014 20:42:23 +0000 (20:42 +0000)]
[Mac] Update the time base of event's timestamp when the system time changes
https://bugs.webkit.org/show_bug.cgi?id=134293
Reviewed by Anders Carlsson.
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::cachedStartupTimeIntervalSince1970): Since events timestamps are absolute time, they also
need to be updated if the system clock changes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170434
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
krit@webkit.org [Wed, 25 Jun 2014 19:03:47 +0000 (19:03 +0000)]
Add all blend modes to feBlend
feBlend should support all blend modes from CSS and Canvas
https://bugs.webkit.org/show_bug.cgi?id=134296
Source/WebCore:
Reviewed by Dean Jackson.
Add all blend modes to <feBlend> (the SVG filter primitive) that are also
supported by HTML Canvas and CSS.
In addition, add "normal" blend mode to HTML Canvas as requested by the
CSS Compositing and Blending specification. (Referenced from HTML Canvas.)
With this change, SVG, CSS and Canvas truly share the same blend modes and
even the same keywords. This is much easier to for web authors.
http://www.w3.org/TR/2014/CR-compositing-1-
20140220/#ltblendmodegt
Test: svg/filters/feBlend-all-blendmodes.svg
* platform/graphics/GraphicsTypes.cpp: Reorder blend mode text streams to match
enumeration order. Add a new function to parse blend modes independent of
compositing modes. Add a string "normal" that is supported by CSS, feBlend and
HTML Canvas now.
(WebCore::parseBlendMode):
(WebCore::parseCompositeAndBlendOperator):
* platform/graphics/GraphicsTypes.h: Reorder BlendMode enumeration values to match
the SVG JS enumeration for blend modes.
* platform/graphics/cpu/arm/filters/FEBlendNEON.h: Move all software code that is no
longer required by the software path but still used by NEON here.
(WebCore::FEBlend::platformApplySoftware):
(WebCore::FEBlend::platformApplyNEON):
* platform/graphics/filters/FEBlend.cpp:
Use drawImageBuffer() to blend the results of previous filter primitives. This
allows removing more than 60% of the code.
(WebCore::FEBlend::FEBlend):
(WebCore::FEBlend::create):
(WebCore::FEBlend::blendMode):
(WebCore::FEBlend::setBlendMode):
(WebCore::FEBlend::platformApplySoftware):
(WebCore::FEBlend::dump):
(WebCore::FEBlend::externalRepresentation):
(WebCore::feBlendNormal): Deleted.
(WebCore::feBlendMultiply): Deleted.
(WebCore::feBlendScreen): Deleted.
(WebCore::feBlendDarken): Deleted.
(WebCore::feBlendLighten): Deleted.
(WebCore::feBlendUnknown): Deleted.
(WebCore::platformApply): Deleted.
(WebCore::FEBlend::platformApplyGeneric): Deleted.
(WebCore::operator<<): Deleted.
* platform/graphics/filters/FEBlend.h:
* svg/SVGAnimatedEnumeration.cpp: Use the global BlendMode enumeration.
(WebCore::enumerationValueForTargetAttribute):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::SVGFEBlendElement): Use the global BlendMode enumeration.
No new enumeration values added or exposed to SVG DOM as requested by SVG WG.
(WebCore::SVGFEBlendElement::parseAttribute):
* svg/SVGFEBlendElement.h: Replace BlendModeType with global BlendMode enumeration. Remove
blend mode parsing code and use the code in GraphicsTypes instead.
(WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
(WebCore::SVGPropertyTraits<BlendMode>::toString):
(WebCore::SVGPropertyTraits<BlendModeType>::highestEnumValue): Deleted.
(WebCore::SVGPropertyTraits<BlendModeType>::toString): Deleted.
(WebCore::SVGPropertyTraits<BlendModeType>::fromString): Deleted.
LayoutTests:
Added tests for new blend modes in feBlend as well as a test for 'normal' blend mode
on HTML Canvas.
Reviewed by Dean Jackson.
* fast/canvas/canvas-blend-image-expected.txt:
* fast/canvas/canvas-blend-solid-expected.txt:
* fast/canvas/script-tests/canvas-blend-image.js: Test 'normal' blend mode in Canvas.
(prepareTestScenario):
* fast/canvas/script-tests/canvas-blend-solid.js: Ditto.
(prepareTestScenario):
* platform/mac/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt: DRT output is lowercase now.
* platform/mac/svg/filters/feBlend-all-blendmodes-expected.png: Added.
* platform/mac/svg/filters/feBlend-all-blendmodes-expected.txt: Added.
* svg/filters/feBlend-all-blendmodes.svg: Added. Tests all blend modes now supported by feBlend.
* svg/filters/feBlend-invalid-mode.xhtml: Add an upper bound check as well.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170433
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Wed, 25 Jun 2014 17:34:52 +0000 (17:34 +0000)]
Provide javascript aware backtrace script for lldb
https://bugs.webkit.org/show_bug.cgi?id=134276
Reviewed by Jer Noble.
* lldb/lldb_webkit.py:
(__lldb_init_module):
(btjs): New scripted command to display a backtrace that shows JavaScript frames with details.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170432
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Wed, 25 Jun 2014 17:24:28 +0000 (17:24 +0000)]
[Win] Unreviewed gardening.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Update to
put various files in proper IDE categories.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170431
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Wed, 25 Jun 2014 17:00:04 +0000 (17:00 +0000)]
Unreviewed iOS build fix after r170425.
* accessibility/AccessibilityProgressIndicator.cpp:
* accessibility/AccessibilityProgressIndicator.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170430
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cfleizach@apple.com [Wed, 25 Jun 2014 16:56:42 +0000 (16:56 +0000)]
AX: Crash at com.apple.WebCore: WebCore::AlternativeTextController::removeDictationAlternativesForMarker + 43
https://bugs.webkit.org/show_bug.cgi?id=134226
Reviewed by Enrica Casucci.
Source/WebCore:
Unchecked access of details pointer in the Document marker led to the crash.
It seems erroneous to allow creation of a DocumentMarker without details when one is expected, because it
carries the dictation context (not just the description).
Also, add in ASSERTs to catch scenarios where a nullptr might be passed in.
Test: platform/mac/editing/input/crash-for-empty-text-alternative.html
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarker::DocumentMarker):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
LayoutTests:
* platform/mac-wk2/TestExpectations:
Skip test on wk2 because dictation related tests are not yet supported (89401)
* platform/mac/editing/input/crash-for-empty-text-alternative-expected.txt: Added.
* platform/mac/editing/input/crash-for-empty-text-alternative.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170429
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Jun 2014 16:37:19 +0000 (16:37 +0000)]
[Win64] ASM LLINT is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=130638
Source/JavaScriptCore:
This patch adds a new LLINT assembler backend for Win64, and implements it.
It makes adjustments to follow the Win64 ABI spec. where it's found to be needed.
Also, LLINT and JIT is enabled for Win64.
Patch by peavo@outlook.com <peavo@outlook.com> on 2014-06-25
Reviewed by Mark Lam.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added JITStubsMSVC64.asm.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
* JavaScriptCore/JavaScriptCore.vcxproj/jsc/jscCommon.props: Increased stack size to avoid stack overflow in tests.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.sh: Generate assembler source file for Win64.
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::call): Follow Win64 ABI spec.
* jit/JITStubsMSVC64.asm: Added.
* jit/Repatch.cpp:
(JSC::emitPutTransitionStub): Compile fix.
* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator): Follow Win64 ABI spec.
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions): Ditto.
* llint/LLIntOfflineAsmConfig.h: Enable new llint backend for Win64.
* llint/LowLevelInterpreter.asm: Implement new Win64 backend, and follow Win64 ABI spec.
* llint/LowLevelInterpreter64.asm: Ditto.
* offlineasm/asm.rb: Compile fix.
* offlineasm/backends.rb: Add new llint backend for Win64.
* offlineasm/settings.rb: Compile fix.
* offlineasm/x86.rb: Implement new llint Win64 backend.
Source/WTF:
Patch by peavo@outlook.com <peavo@outlook.com> on 2014-06-25
Reviewed by Mark Lam.
* wtf/Platform.h: Enable LLINT and JIT for Win64.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170428
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
m.pakula@samsung.com [Wed, 25 Jun 2014 15:09:10 +0000 (15:09 +0000)]
REGRESSION (r170426) Broke two python tests
https://bugs.webkit.org/show_bug.cgi?id=134299
Reviewed by Csaba Osztrogonác.
* Scripts/webkitpy/port/efl.py:
(EflPort._search_paths): Added search path for efl-wk2.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170427
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
m.pakula@samsung.com [Wed, 25 Jun 2014 12:25:20 +0000 (12:25 +0000)]
[EFL] Remove WebKit1 related code from scripts
https://bugs.webkit.org/show_bug.cgi?id=134195
Reviewed by Laszlo Gombos.
After removing WebKit1 from EFL port, still there is some code left related to DumpRenderTree,
EWebLauncher. Also running layout tests does not require adding -2/--webkit-test-runner switch.
* Scripts/run-launcher: MiniBrowser now runs as default without -2 switch.
* Scripts/webkitdirs.pm:
(builtDylibPathForName): Remove reference to libewebkit.so
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options): Script runs WKTR by default.
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner.__init__): Ditto.
* Scripts/webkitpy/port/efl.py:
(EflPort._search_paths): Remove efl-wk2 from baseline search path.
(EflPort.show_results_html_file): Run MiniBrowser as result viewer.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170426
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
l.gombos@samsung.com [Wed, 25 Jun 2014 12:04:42 +0000 (12:04 +0000)]
Remove build guard for progress element
https://bugs.webkit.org/show_bug.cgi?id=134292
Reviewed by Benjamin Poulain.
.:
The build flag is no longer needed as it is always on.
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:
Source/WebCore:
The build flag is no longer needed as it is always on.
No new tests as there is no new behaviour.
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::create):
(WebCore::AccessibilityProgressIndicator::valueForRange):
(WebCore::AccessibilityProgressIndicator::maxValueForRange):
(WebCore::AccessibilityProgressIndicator::minValueForRange):
(WebCore::AccessibilityProgressIndicator::progressElement):
* accessibility/AccessibilityProgressIndicator.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
* css/html.css:
(progress::-webkit-progress-value):
* html/HTMLProgressElement.cpp:
* html/HTMLProgressElement.h:
* html/HTMLProgressElement.idl:
* html/HTMLTagNames.in:
* html/shadow/ProgressShadowElement.cpp:
* html/shadow/ProgressShadowElement.h:
* platform/efl/DefaultTheme/CMakeLists.txt:
* platform/efl/DefaultTheme/default.edc:
* platform/efl/RenderThemeEfl.cpp:
(WebCore::toEdjeGroup):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::paintProgressBar):
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::calculateProgressRect):
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::RenderThemeGtk::paintProgressBar):
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintProgressBar):
* rendering/RenderObject.h:
(WebCore::RenderObject::isSnapshottedPlugIn):
(WebCore::RenderObject::isProgress):
* rendering/RenderProgress.cpp:
* rendering/RenderProgress.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
(WebCore::RenderTheme::progressBarRectForBounds):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintProgressBar):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:
Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:
Source/WTF:
The build flag is no longer needed as it is always on.
* wtf/FeatureDefines.h:
Tools:
* Scripts/webkitperl/FeatureList.pm:
WebKitLibraries:
* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:
LayoutTests:
Remove PROGRESS_ELEMENT from the comment to reflect the change.
* fast/dom/wrapper-classes.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170425
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Wed, 25 Jun 2014 10:43:28 +0000 (10:43 +0000)]
Unreviewed. Update GObject DOM bindings test results after r170422.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
(WebKit::wrapTestActiveDOMObject):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(WebKit::wrapTestCallback):
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
(WebKit::wrapTestCustomNamedGetter):
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
(WebKit::wrapTestEventConstructor):
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
(WebKit::wrapTestEventTarget):
* bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
(WebKit::wrapTestException):
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
(WebKit::wrapTestGenerateIsReachable):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(WebKit::wrapTestInterface):
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
(WebKit::wrapTestMediaQueryListListener):
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
(WebKit::wrapTestNamedConstructor):
* bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
(WebKit::wrapTestNode):
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
(WebKit::wrapTestNondeterministic):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(WebKit::wrapTestObj):
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
(WebKit::wrapTestOverloadedConstructors):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(WebKit::wrapTestSerializedScriptValueInterface):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(WebKit::wrapTestTypedefs):
* bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
(WebKit::wrapattribute):
* bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
(WebKit::wrapreadonly):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170424
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Wed, 25 Jun 2014 10:38:28 +0000 (10:38 +0000)]
[GTK] Windowed plugins visibility doesn't work
https://bugs.webkit.org/show_bug.cgi?id=131487
Reviewed by Anders Carlsson.
Implement plugins visibility changes and add a new message to
notify the UI process when a windowed plugin is shown/hidden to
show/hide the plugin widget.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::visibilityDidChange): Add
implementation to notify the plugin about visibility change.
(WebKit::PluginControllerProxy::windowedPluginVisibilityDidChange):
Send WindowedPluginVisibilityDidChange to the plugin proxy.
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in: Add VisibilityDidChange message.
* UIProcess/WebPageProxy.h: Add windowedPluginVisibilityDidChange
to handle WindowedPluginVisibilityDidChange message.
* UIProcess/WebPageProxy.messages.in: Add WindowedPluginVisibilityDidChange message.
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::windowedPluginVisibilityDidChange):
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::createPluginContainer): Do not show the
plugins by default.
(WebKit::WebPageProxy::windowedPluginVisibilityDidChange): Show or hide the plugin widget.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin): Initialize m_isVisible.
(WebKit::NetscapePlugin::visibilityDidChange): Add visible parameter and save it in m_isVisible
member, calling platformVisibilityDidChange() only when it has actually changed.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformVisibilityDidChange): Notify the controller about visibility change.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::visibilityDidChange): Send VisibilityDidChange message to the plugin controller proxy.
(WebKit::PluginProxy::windowedPluginVisibilityDidChange): Notify the controller about visibility change.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in: Add WindowedPluginVisibilityDidChange message.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin): Also call viewVisibilityDidChange() when the plugin is initialized.
(WebKit::PluginView::setParentVisible): Override this Widget method to update the plugin visibility when parent
widget is shown/hidden.
(WebKit::PluginView::viewVisibilityDidChange): Pass visible parameter to visibilityDidChange().
(WebKit::PluginView::windowedPluginVisibilityDidChange): Send WindowedPluginVisibilityDidChange message to the UI process.
* WebProcess/Plugins/PluginView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170423
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Jun 2014 06:54:48 +0000 (06:54 +0000)]
[GTK] Some of DOM bindings macros are misnamed
https://bugs.webkit.org/show_bug.cgi?id=121543
Patch by Tomas Popela <tpopela@redhat.com> on 2014-06-24
Reviewed by Carlos Garcia Campos.
As we are using WebKitDOM as a namespace we should unify all type macros
to have WEBKIT_DOM_TYPE prefix instead of WEBKIT_TYPE_DOM. Also add
more exceptions to decamelize function in GObject bindings generator
to fix the names of bindings for BR, HR, UL, OL, DL and LI elements.
Source/WebCore:
* bindings/gobject/GObjectEventListener.cpp:
(WebCore::GObjectEventListener::handleEvent):
* bindings/gobject/WebKitDOMEventTarget.h:
* bindings/gobject/WebKitDOMNodeFilter.h:
* bindings/gobject/WebKitDOMObject.h:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(decamelize):
(GetParentGObjType):
(GenerateProperty):
(GenerateHeader):
(GenerateCFile):
(GenerateEventTargetIface):
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
(WebKit::wrapFloat64Array):
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
(WebKit::wrapTestActiveDOMObject):
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(WebKit::wrapTestCallback):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
(WebKit::wrapTestCustomNamedGetter):
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
(WebKit::wrapTestEventConstructor):
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
(WebKit::wrapTestEventTarget):
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
* bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
(WebKit::wrapTestException):
* bindings/scripts/test/GObject/WebKitDOMTestException.h:
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
(WebKit::wrapTestGenerateIsReachable):
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(WebKit::wrapTestInterface):
(webkit_dom_test_interface_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
(WebKit::wrapTestMediaQueryListListener):
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
(WebKit::wrapTestNamedConstructor):
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
(WebKit::wrapTestNode):
* bindings/scripts/test/GObject/WebKitDOMTestNode.h:
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
(WebKit::wrapTestNondeterministic):
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(WebKit::wrapTestObj):
(webkit_dom_test_obj_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
(WebKit::wrapTestOverloadedConstructors):
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(WebKit::wrapTestSerializedScriptValueInterface):
(webkit_dom_test_serialized_script_value_interface_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(WebKit::wrapTestTypedefs):
(webkit_dom_test_typedefs_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
(WebKit::wrapattribute):
* bindings/scripts/test/GObject/WebKitDOMattribute.h:
* bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
(WebKit::wrapreadonly):
* bindings/scripts/test/GObject/WebKitDOMreadonly.h:
Tools:
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeFilterTest.cpp:
* gtk/webkitdom.py:
(WebKitDOMDocGeneratorSections._dom_class_decamelize):
(WebKitDOMDocGeneratorSections.write_section):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170422
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
msaboff@apple.com [Wed, 25 Jun 2014 06:45:50 +0000 (06:45 +0000)]
Add support routines to provide descriptive JavaScript backtraces
https://bugs.webkit.org/show_bug.cgi?id=134278
Reviewed by Mark Lam.
* interpreter/CallFrame.cpp:
(JSC::CallFrame::dump):
(JSC::CallFrame::describeFrame):
* interpreter/CallFrame.h:
* runtime/JSCJSValue.cpp:
(JSC::JSValue::dumpForBacktrace):
* runtime/JSCJSValue.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170421
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Wed, 25 Jun 2014 06:44:36 +0000 (06:44 +0000)]
Run the FastMalloc scavenger thread on iOS as well.
<https://webkit.org/b/134287>
<rdar://problem/
17446198>
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170420
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fred.wang@free.fr [Wed, 25 Jun 2014 06:31:21 +0000 (06:31 +0000)]
[EFL] Install Latin Modern Math on the bots
https://bugs.webkit.org/show_bug.cgi?id=134153
Reviewed by Gyuyoung Kim.
* efl/jhbuild.modules: Switch back to https://github.com/ for the webkitgtk-test-fonts.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170419
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fred.wang@free.fr [Wed, 25 Jun 2014 04:56:32 +0000 (04:56 +0000)]
Tools: [EFL] [GTK] Use Latin Modern Math in the jhbuild environments.
https://bugs.webkit.org/show_bug.cgi?id=134153
Reviewed by Martin Robinson.
* efl/jhbuild.modules: Use webkitgtk-test-fonts.git instead of the zip archive and upgrade to 0.0.5.
* gtk/jhbuild.modules: Upgrade webkitgtk-test-fonts to 0.0.5.
LayoutTests: [EFL] [GTK] Update the MathML test references.
https://bugs.webkit.org/show_bug.cgi?id=134153
Reviewed by Martin Robinson.
We update the GTK references after the move to Latin Modern Math.
* mathml/presentation/bug95015-expected.html: hide the base X since it is causing antialiasing diff.
* mathml/presentation/bug95015.html: ditto
* platform/efl/TestExpectations: enable some tests again (the references must be updated).
* platform/gtk/TestExpectations: enable OpenType MATH test again, mark mo-stacked-glyphs as failing.
* platform/gtk/mathml/presentation/menclose-notation-default-longdiv-expected.txt: update reference.
* platform/gtk/mathml/presentation/mo-stretch-expected.png: ditto
* platform/gtk/mathml/presentation/mo-stretch-expected.txt: ditto
* platform/gtk/mathml/presentation/roots-expected.png: ditto
* platform/gtk/mathml/presentation/roots-expected.txt: ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170418
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Wed, 25 Jun 2014 04:30:40 +0000 (04:30 +0000)]
Unreviewed, rolling out r170414.
https://bugs.webkit.org/show_bug.cgi?id=134291
the patch added a test that fails on almost every Mac tester
(Requested by rniwa on #webkit).
Reverted changeset:
"Tiles on bottom of screen are not always allocated when
necessary"
https://bugs.webkit.org/show_bug.cgi?id=134272
http://trac.webkit.org/changeset/170414
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170417
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jonowells@apple.com [Wed, 25 Jun 2014 03:13:23 +0000 (03:13 +0000)]
Web Inspector: clicking "Show All Nodes" button throws TypeError
https://bugs.webkit.org/show_bug.cgi?id=133701
Reviewed by Timothy Hatcher.
The method used for isEventWithinDisclosureTriangle needs to consider the possibility that the
targeted TreeElement isn't contained within the visible DOM, for instance in the case of the
"Show All Nodes" button immediately after it is pressed.
* UserInterface/Views/TreeOutline.js:
(TreeElement.prototype.isEventWithinDisclosureTriangle): Check to make sure TreeElement node is in the visible DOM.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170416
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Wed, 25 Jun 2014 01:28:40 +0000 (01:28 +0000)]
Unreviewed, update my speciality.
* Scripts/webkitpy/common/config/contributors.json:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170415
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Wed, 25 Jun 2014 01:25:23 +0000 (01:25 +0000)]
Tiles on bottom of screen are not always allocated when necessary
https://bugs.webkit.org/show_bug.cgi?id=134272
Reviewed by Simon Fraser.
Source/WebCore:
The initial visibleRect is in the coordinate of the root layer, so its origin
is at the top left of the view. The initial rect we were using doesn't
include the contents inset, so it was too short, which was causing tiles near
the bottom of the screen to not always be allocated if the tile threshold was
close to the bottom of the view. Instead, we want to include the contents
inset size so the visible rect includes the entire view.
GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
the visible rect into the tiled layer's coordinate system, at which point it
is used for visible tile logic.
Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::update):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
LayoutTests:
Apply a content inset, then dump visible rects.
* platform/mac-wk2/tiled-drawing/visible-rect-content-inset-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170414
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mmaxfield@apple.com [Wed, 25 Jun 2014 01:19:25 +0000 (01:19 +0000)]
InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
https://bugs.webkit.org/show_bug.cgi?id=134173
Reviewed by Daniel Bates.
After Zalan's talks with Kling, it seems that the simple line layout code
might alleviate the need for the space savings in InlineTextBox. Given this,
it would be beneficial to be a little more safe by using unsigneds throughout.
For example, we have code like "void setLen(unsigned len) { m_len = len; }"
which might silently break if given particular inputs.
No new tests because there is no behavior change.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::truncation):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::ellipsisRectForBox):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170413
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
samuel_white@apple.com [Wed, 25 Jun 2014 00:56:17 +0000 (00:56 +0000)]
AX: Remove tight platform expectation coupling form roles-exposed layout test.
https://bugs.webkit.org/show_bug.cgi?id=134123
Reviewed by Chris Fleizach.
Don't enforce platform specific differences in the test itself. This is what the various expectation files are for.
* accessibility/roles-exposed-expected.txt:
* accessibility/roles-exposed.html:
* platform/mac-mountainlion/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170412
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Wed, 25 Jun 2014 00:53:24 +0000 (00:53 +0000)]
Speculative 32-bit Mac build fix after r170402.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::advanceByCombiningCharacterSequence):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170411
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Wed, 25 Jun 2014 00:36:53 +0000 (00:36 +0000)]
[Win] Remove some out-of-date stuff from our instructions.
https://bugs.webkit.org/show_bug.cgi?id=134282
Reviewed by Tim Horton.
* building/build.html: Remove reference to "Platform SDK" which we don't manuall
install anymore (it's part of Visual Studio 2013).
* building/tools.html: We no longer need QuickTime SDK, QuickTime Player, or
the DirectX SDK.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170410
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Wed, 25 Jun 2014 00:18:45 +0000 (00:18 +0000)]
[iOS][WK2] We should not start potential tap activation unless the tap gesture recognizer succeed
https://bugs.webkit.org/show_bug.cgi?id=134277
<rdar://problem/
17439973>
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-24
Reviewed by Anders Carlsson.
* UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m:
(-[WKSyntheticClickTapGestureRecognizer setState:]):
We were calling the _gestureRecognizedAction even for failure states. The potential activation work
is not light on the Web Process, we should not start if we don't care about the result.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170409
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Wed, 25 Jun 2014 00:15:25 +0000 (00:15 +0000)]
[iOS][WK2] Adopt the C API of UIWebTouchEventsGestureRecognizer for touch event mapping
https://bugs.webkit.org/show_bug.cgi?id=134234
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-24
Reviewed by Tim Horton.
The C API is more efficient and expose properties we will need for other patches. This patch moves from
getting each value independently on UIWebTouchEventsGestureRecognizer to the single structure exposed
by _UIWebTouchEvent.
* Shared/NativeWebTouchEvent.h:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::convertTouchPhase):
(WebKit::extractWebTouchPoint):
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170408
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Wed, 25 Jun 2014 00:13:04 +0000 (00:13 +0000)]
WK1 WebFrameNetworkingContext cleanup: do not instanciate an empty NSString to create an empty WTF::String
https://bugs.webkit.org/show_bug.cgi?id=134222
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-24
Reviewed by Andreas Kling.
* WebCoreSupport/WebFrameNetworkingContext.mm:
(WebFrameNetworkingContext::sourceApplicationIdentifier):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170407
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Tue, 24 Jun 2014 23:50:07 +0000 (23:50 +0000)]
[iOS]: WK2 Inspector Node Highlighting
https://bugs.webkit.org/show_bug.cgi?id=134257
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-24
Reviewed by Timothy Hatcher.
Source/WebCore:
Some clients want to get highlights with the scroll applied,
others do not. Provide a CoordinateSpace param to be used for
getting a highlight (only used on iOS).
* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getHighlight):
* inspector/InspectorController.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::getHighlight):
(WebCore::buildObjectForRendererFragments):
* inspector/InspectorOverlay.h:
(WebCore::Highlight::Highlight):
* testing/Internals.cpp:
(WebCore::Internals::inspectorHighlightRects):
Source/WebKit/mac:
* WebInspector/WebNodeHighlightView.mm:
(-[WebNodeHighlightView layoutSublayers:]):
Source/WebKit2:
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Highlight>::encode):
(IPC::ArgumentCoder<Highlight>::decode):
Add a way to encode a WebCore::Highlight struct.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showInspectorHighlight:WebCore::]):
(-[WKWebView _hideInspectorHighlight]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showInspectorHighlight):
(WebKit::PageClientImpl::hideInspectorHighlight):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showInspectorHighlight):
(WebKit::WebPageProxy::hideInspectorHighlight):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
(WebKit::WebInspectorClient::hideHighlight):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::showInspectorHighlight):
(WebKit::WebPage::hideInspectorHighlight):
Send web process highlight / hideHighlight messages up to
the UIProcess so it can highlight in the WKContentView.
Pass up a WebCore::Highlight in Document coordinates.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKInspectorHighlightView initWithFrame:]):
(-[WKInspectorHighlightView dealloc]):
(-[WKInspectorHighlightView _removeAllLayers]):
(-[WKInspectorHighlightView _createLayers:]):
(findIntersectionOnLineBetweenPoints):
(quadIntersection):
(layerPathWithHole):
(layerPath):
(-[WKInspectorHighlightView _layoutForNodeHighlight:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
(-[WKInspectorHighlightView update:]):
Reuse the WebKit1 code to turn highlight float quads into CAShapeLayers.
(-[WKContentView _showInspectorHighlight:WebCore::]):
(-[WKContentView _hideInspectorHighlight]):
Show and hide the highlight view with the respective WebCore::Highlight.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170406
268f45cc-cd09-0410-ab3c-
d52691b4dbfc