WebKit-https.git
5 years agoOut of bounds read in IdentifierArena::makeIdentifier
ggaren@apple.com [Tue, 13 Jan 2015 01:04:37 +0000 (01:04 +0000)]
Out of bounds read in IdentifierArena::makeIdentifier
https://bugs.webkit.org/show_bug.cgi?id=140376

Patch by Alexey Proskuryakov.

Reviewed and ChangeLogged by Geoffrey Garen.

No test, since this is a small past-the-end read, which is very
difficult to turn into a reproducible failing test -- and existing tests
crash reliably using ASan.

* parser/ParserArena.h:
(JSC::IdentifierArena::makeIdentifier):
(JSC::IdentifierArena::makeIdentifierLCharFromUChar): Check for a
zero-length string input, like we do in the literal parser, since it is
not valid to dereference characters in a zero-length string.

A zero-length string is allowed in JavaScript -- for example, "".

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

5 years agoRemove support for SharedWorkers
weinig@apple.com [Tue, 13 Jan 2015 00:40:49 +0000 (00:40 +0000)]
Remove support for SharedWorkers
https://bugs.webkit.org/show_bug.cgi?id=140344

Reviewed by Anders Carlsson.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled): Deleted.
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSSharedWorkerCustom.cpp: Removed.
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::toJSWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::initScript):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* loader/FrameLoader.cpp:
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessLocalStorage):
(WebCore::SecurityOrigin::canAccessSharedWorkers): Deleted.
* platform/FeatureCounterKeys.h:
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::sharedWorkerStrategy): Deleted.
* workers/DefaultSharedWorkerRepository.cpp: Removed.
* workers/DefaultSharedWorkerRepository.h: Removed.
* workers/SharedWorker.cpp: Removed.
* workers/SharedWorker.h: Removed.
* workers/SharedWorker.idl: Removed.
* workers/SharedWorkerGlobalScope.cpp: Removed.
* workers/SharedWorkerGlobalScope.h: Removed.
* workers/SharedWorkerGlobalScope.idl: Removed.
* workers/SharedWorkerRepository.cpp: Removed.
* workers/SharedWorkerRepository.h: Removed.
* workers/SharedWorkerStrategy.h: Removed.
* workers/SharedWorkerThread.cpp: Removed.
* workers/SharedWorkerThread.h: Removed.
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope): Deleted.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createSharedWorkerStrategy): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createSharedWorkerStrategy): Deleted.
* WebCoreSupport/WebPlatformStrategies.h:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createSharedWorkerStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebKit2Prefix.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createSharedWorkerStrategy): Deleted.
(WebKit::WebPlatformStrategies::isAvailable): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Remove shared worker specific tests and update others to remove references to shared workers.

* fast/constructors/constructor-as-function-crash-expected.txt:
* fast/constructors/constructor-as-function-crash.html:
* fast/dom/call-a-constructor-as-a-function-expected.txt:
* fast/dom/call-a-constructor-as-a-function.html:
* fast/workers/resources/create-shared-worker-frame.html: Removed.
* fast/workers/resources/shared-worker-common.js: Removed.
* fast/workers/resources/shared-worker-count-connections.js: Removed.
* fast/workers/resources/shared-worker-create-common.js: Removed.
* fast/workers/resources/shared-worker-exception.js: Removed.
* fast/workers/resources/shared-worker-iframe.html: Removed.
* fast/workers/resources/shared-worker-lifecycle.js: Removed.
* fast/workers/resources/shared-worker-name.js: Removed.
* fast/workers/resources/shared-worker-script-error.js: Removed.
* fast/workers/shared-worker-constructor-expected.txt: Removed.
* fast/workers/shared-worker-constructor.html: Removed.
* fast/workers/shared-worker-context-gc-expected.txt: Removed.
* fast/workers/shared-worker-context-gc.html: Removed.
* fast/workers/shared-worker-event-listener-expected.txt: Removed.
* fast/workers/shared-worker-event-listener.html: Removed.
* fast/workers/shared-worker-exception-expected.txt: Removed.
* fast/workers/shared-worker-exception.html: Removed.
* fast/workers/shared-worker-frame-lifecycle-expected.txt: Removed.
* fast/workers/shared-worker-frame-lifecycle.html: Removed.
* fast/workers/shared-worker-gc-expected.txt: Removed.
* fast/workers/shared-worker-gc.html: Removed.
* fast/workers/shared-worker-in-iframe-expected.txt: Removed.
* fast/workers/shared-worker-in-iframe.html: Removed.
* fast/workers/shared-worker-lifecycle-expected.txt: Removed.
* fast/workers/shared-worker-lifecycle.html: Removed.
* fast/workers/shared-worker-load-error-expected.txt: Removed.
* fast/workers/shared-worker-load-error.html: Removed.
* fast/workers/shared-worker-location-expected.txt: Removed.
* fast/workers/shared-worker-location.html: Removed.
* fast/workers/shared-worker-messageevent-source-expected.txt: Removed.
* fast/workers/shared-worker-messageevent-source.html: Removed.
* fast/workers/shared-worker-name-expected.txt: Removed.
* fast/workers/shared-worker-name.html: Removed.
* fast/workers/shared-worker-navigator-expected.txt: Removed.
* fast/workers/shared-worker-navigator.html: Removed.
* fast/workers/shared-worker-replace-global-constructor-expected.txt: Removed.
* fast/workers/shared-worker-replace-global-constructor.html: Removed.
* fast/workers/shared-worker-replace-self-expected.txt: Removed.
* fast/workers/shared-worker-replace-self.html: Removed.
* fast/workers/shared-worker-script-error-expected.txt: Removed.
* fast/workers/shared-worker-script-error.html: Removed.
* fast/workers/shared-worker-shared-expected.txt: Removed.
* fast/workers/shared-worker-shared.html: Removed.
* fast/workers/shared-worker-simple-expected.txt: Removed.
* fast/workers/shared-worker-simple.html: Removed.
* fast/workers/shared-worker-storagequota-query-usage-expected.txt: Removed.
* fast/workers/shared-worker-storagequota-query-usage.html: Removed.
* fast/workers/worker-crash-with-invalid-location-expected.txt:
* fast/workers/worker-crash-with-invalid-location.html:
* http/tests/resources/js-test-pre.js:
(startWorker):
(.worker.port.onmessage): Deleted.
(.self.onconnect.workerPort.onmessage): Deleted.
(.self.onconnect): Deleted.
* http/tests/security/contentSecurityPolicy/resources/shared-worker-make-xhr.js: Removed.
* http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html: Removed.
* http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked-expected.txt: Removed.
* http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html: Removed.
* http/tests/security/cross-origin-shared-worker-allowed-expected.txt: Removed.
* http/tests/security/cross-origin-shared-worker-allowed.html: Removed.
* http/tests/security/cross-origin-shared-worker-expected.txt: Removed.
* http/tests/security/cross-origin-shared-worker.html: Removed.
* http/tests/security/resources/cross-origin-iframe-for-shared-worker.html: Removed.
* http/tests/security/resources/iframe-for-storage-blocking-changed-shared-worker.html: Removed.
* http/tests/security/resources/shared-worker.js: Removed.
* http/tests/security/same-origin-shared-worker-blocked-expected.txt: Removed.
* http/tests/security/same-origin-shared-worker-blocked.html: Removed.
* http/tests/security/storage-blocking-loosened-shared-worker-expected.txt: Removed.
* http/tests/security/storage-blocking-loosened-shared-worker.html: Removed.
* http/tests/security/storage-blocking-strengthened-shared-worker-expected.txt: Removed.
* http/tests/security/storage-blocking-strengthened-shared-worker.html: Removed.
* http/tests/websocket/tests/hybi/workers/close-in-shared-worker-expected.txt: Removed.
* http/tests/websocket/tests/hybi/workers/close-in-shared-worker.html: Removed.
* http/tests/websocket/tests/hybi/workers/shared-worker-simple-expected.txt: Removed.
* http/tests/websocket/tests/hybi/workers/shared-worker-simple.html: Removed.
* http/tests/workers/shared-worker-importScripts-expected.txt: Removed.
* http/tests/workers/shared-worker-importScripts.html: Removed.
* http/tests/workers/shared-worker-invalid-url-expected.txt: Removed.
* http/tests/workers/shared-worker-invalid-url.html: Removed.
* http/tests/workers/shared-worker-redirect-expected.txt: Removed.
* http/tests/workers/shared-worker-redirect.html: Removed.
* http/tests/xmlhttprequest/workers/resources/shared-worker-create.js: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-access-control-basic-get-fail-non-simple-expected.txt: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-access-control-basic-get-fail-non-simple.html: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-close-expected.txt: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-close.html: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-methods-async-expected.txt: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-methods-async.html: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-methods-expected.txt: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-methods.html: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-referer-expected.txt: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-referer.html: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-xhr-file-not-found-expected.txt: Removed.
* http/tests/xmlhttprequest/workers/shared-worker-xhr-file-not-found.html: Removed.
* js/dom/constructor-length.html:
* js/dom/global-constructors-attributes-expected.txt:
* js/dom/global-constructors-attributes-shared-worker-expected.txt: Removed.
* js/dom/global-constructors-attributes-shared-worker.html: Removed.
* platform/efl/http/tests/xmlhttprequest/workers/shared-worker-methods-async-expected.txt: Removed.
* platform/efl/http/tests/xmlhttprequest/workers/shared-worker-methods-expected.txt: Removed.
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-shared-worker-expected.txt: Removed.
* platform/gtk/http/tests/xmlhttprequest/workers/shared-worker-methods-async-expected.txt: Removed.
* platform/gtk/http/tests/xmlhttprequest/workers/shared-worker-methods-expected.txt: Removed.
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/ios-sim-deprecated/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/ios-sim-deprecated/fast/js/constructor-length-expected.txt:
* platform/ios-sim-deprecated/fast/js/global-constructors-expected.txt:
* platform/ios-sim-deprecated/fast/workers/shared-worker-storagequota-query-usage-expected.txt: Removed.
* platform/ios-sim-deprecated/http/tests/security/cross-origin-shared-worker-allowed-expected.txt: Removed.
* platform/ios-sim-deprecated/http/tests/security/cross-origin-shared-worker-expected.txt: Removed.
* platform/ios-sim-deprecated/js/dom/global-constructors-attributes-expected.txt:
* platform/ios-sim-deprecated/storage/indexeddb/basics-shared-workers-expected.txt: Removed.
* platform/ios-simulator/js/dom/constructor-length-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk2/TestExpectations:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/fast/dom/call-a-constructor-as-a-function-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-shared-worker-expected.txt: Removed.
* resources/js-test-pre.js:
(startWorker):
(.worker.port.onmessage): Deleted.
(.self.onconnect.workerPort.onmessage): Deleted.
(.self.onconnect): Deleted.
* resources/js-test.js:
(startWorker):
(.worker.port.onmessage): Deleted.
(.self.onconnect.workerPort.onmessage): Deleted.
(.self.onconnect): Deleted.
* storage/indexeddb/basics-shared-workers-expected.txt: Removed.
* storage/indexeddb/basics-shared-workers.html: Removed.

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

5 years agoMove a couple of API files to UIProcess/API.
andersca@apple.com [Tue, 13 Jan 2015 00:35:25 +0000 (00:35 +0000)]
Move a couple of API files to UIProcess/API.

Rubber-stamped by Tim Horton.

* UIProcess/API/APINavigationData.cpp: Renamed from Source/WebKit2/UIProcess/APINavigationData.cpp.
* UIProcess/API/APINavigationData.h: Renamed from Source/WebKit2/UIProcess/APINavigationData.h.
* UIProcess/API/APIProcessPoolConfiguration.cpp: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp.
* UIProcess/API/APIProcessPoolConfiguration.h: Renamed from Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h.
* UIProcess/API/APISession.cpp: Renamed from Source/WebKit2/UIProcess/APISession.cpp.
* UIProcess/API/APISession.h: Renamed from Source/WebKit2/UIProcess/APISession.h.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoREGRESSION(r178029): [GTK][EFL] Caused no-backing-for-clip-overlap test failures
commit-queue@webkit.org [Tue, 13 Jan 2015 00:35:24 +0000 (00:35 +0000)]
REGRESSION(r178029): [GTK][EFL] Caused no-backing-for-clip-overlap test failures
https://bugs.webkit.org/show_bug.cgi?id=140336

Patch by Byungseon Shin <sun.shin@lge.com> on 2015-01-12
Reviewed by Simon Fraser.

Avoid creating childClippingMaskLayer when renderer has not border radius nor clip path.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateChildClippingStrategy):

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

5 years ago[iOS][WK2] Push content bounds on layer tree commit to prevent drawing stale fixed...
mhock@apple.com [Tue, 13 Jan 2015 00:30:49 +0000 (00:30 +0000)]
[iOS][WK2] Push content bounds on layer tree commit to prevent drawing stale fixed position rects
https://bugs.webkit.org/show_bug.cgi?id=140264
<rdar://problem/18873545>

Reviewed by Benjamin Poulain.

When a resize occurs, we need to push the new content bounds to the web
process or stale fixed position rects may draw incorrectly.

As an example, suppose that WKWebView in UIProcess performs
_frameOrBoundsChanged with new view bounds.
Meanwhile, we'll switch to WebContentProcess and perform layout.
Switching back to UIProcess, _frameOrBoundsChanged calls WKWebView
_updateVisibleContentRects.
_updateVisibleContentRects calls WKContentView didUpdateVisibleRect with
the new bounds.
didUpdateVisibleRects in turn calls WebPageProxyIOS
computeCustomFixedPositionRect.
computeCustomFixedPositionRect asks for the content bounds from
PageClientImplIOS contentsSize which queries WKContentView's bounds
size. But those bounds are stale because the layer tree commit hasn't
occurred yet.

By informing the WKWebView of the updated content size on layer tree
commit, we ensure that the fixed position rects will be drawn correctly.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:]): Push new content bounds to the web process.

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

5 years ago[Apple] Squelch stderr log regarding negative stroke thickness
mmaxfield@apple.com [Tue, 13 Jan 2015 00:30:41 +0000 (00:30 +0000)]
[Apple] Squelch stderr log regarding negative stroke thickness
https://bugs.webkit.org/show_bug.cgi?id=140372
<rdar://problem/19426485>

Reviewed by Eric Carlson.

No new tests because there is no visible behavior change.

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformStrokeThickness):

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

5 years agoGet rid of unnecessary reimplementations of CGFloor/Ceiling
timothy_horton@apple.com [Tue, 13 Jan 2015 00:25:45 +0000 (00:25 +0000)]
Get rid of unnecessary reimplementations of CGFloor/Ceiling
https://bugs.webkit.org/show_bug.cgi?id=140375

Reviewed by Simon Fraser.

* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
(WebCore::webkit_CGCeiling): Deleted.
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):
(webkit_CGFloor): Deleted.
Delete unnecessary code, use the real CGFloor/Ceiling instead.

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
(webkit_CGCeiling): Deleted.
Delete unnecessary code, use the real CGFloor/Ceiling instead.

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

5 years agoREGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
timothy_horton@apple.com [Mon, 12 Jan 2015 23:57:17 +0000 (23:57 +0000)]
REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
https://bugs.webkit.org/show_bug.cgi?id=140373
<rdar://problem/19447156>

Reviewed by Simon Fraser.

* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):
Expand the window margin to the nearest integer.
The window was already being pixel-snapped, but then we'd translate by
the non-integral margin when building up the layer tree.
It's OK to do this on 2x because it's fine to have the margin be bigger
than needed.

* platform/spi/cg/CoreGraphicsSPI.h:
Add a CGCeiling to match CGFloor.

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

5 years agoGuard web thread stuff with USE(WEB_THREAD) instead of PLATFORM(IOS).
akling@apple.com [Mon, 12 Jan 2015 23:53:12 +0000 (23:53 +0000)]
Guard web thread stuff with USE(WEB_THREAD) instead of PLATFORM(IOS).

Dan pointed out that we should guard WebThreadIsLockedOrDisabled() with
USE(WEB_THREAD) to communicate our ambitions to someday have an iOS
build of WebKit that doesn't need any of that.

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::resume):

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

5 years agoFix build for non-iOS platforms. :|
akling@apple.com [Mon, 12 Jan 2015 23:42:48 +0000 (23:42 +0000)]
Fix build for non-iOS platforms. :|

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::resume):

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

5 years ago[Freetype] Don't use non-scalable fonts.
clopez@igalia.com [Mon, 12 Jan 2015 23:32:26 +0000 (23:32 +0000)]
[Freetype] Don't use non-scalable fonts.
https://bugs.webkit.org/show_bug.cgi?id=31931

Reviewed by Martin Robinson.

No new tests needed.

* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::createFontPlatformData): Prefer scalable fonts.

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

5 years agoGeolocation objects shouldn't prevent page caching.
akling@apple.com [Mon, 12 Jan 2015 23:14:24 +0000 (23:14 +0000)]
Geolocation objects shouldn't prevent page caching.
<https://webkit.org/b/140369>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Enable the code for suspend/resume of Geolocation objects on all platforms
instead of just iOS. This allows pages using geolocation to use page cache
instead of reloading on back/forward navigation.

Test: fast/history/page-cache-geolocation.html

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::resetAllGeolocationPermission):
(WebCore::Geolocation::stop):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
* Modules/geolocation/Geolocation.h:

LayoutTests:

Take the existing test for this and make it not-specific-to-iOS.
Also remove a test whose only purpose was confirming that we don't cache these pages.

* fast/dom/Geolocation/no-page-cache-expected.txt: Removed.
* fast/dom/Geolocation/no-page-cache.html: Removed.
* fast/dom/Geolocation/script-tests/no-page-cache.js: Removed.
* fast/history/page-cache-geolocation-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation-expected.txt.
* fast/history/page-cache-geolocation.html: Renamed from LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/page-cache-geolocation.js.
* fast/history/resources/page-cache-helper.html: Added.
* platform/ios-sim-deprecated/iphone/fast/history/page-cache-geolocation-expected.txt: Removed.
* platform/ios-sim-deprecated/iphone/fast/history/page-cache-geolocation.html: Removed.
* platform/ios-sim-deprecated/iphone/fast/history/script-tests/page-cache-geolocation.js: Removed.
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/ios/fast/history/page-cache-geolocation.html: Removed.

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

5 years agoMake fast/css/first-letter-skip-out-of-flow.html a ref-test
rego@igalia.com [Mon, 12 Jan 2015 22:40:29 +0000 (22:40 +0000)]
Make fast/css/first-letter-skip-out-of-flow.html a ref-test
https://bugs.webkit.org/show_bug.cgi?id=140324

Reviewed by Andreas Kling.

* fast/css/first-letter-skip-out-of-flow-expected.html: Added.
* platform/efl/fast/css/first-letter-skip-out-of-flow-expected.png: Removed.
* platform/efl/fast/css/first-letter-skip-out-of-flow-expected.txt: Removed.
* platform/gtk/fast/css/first-letter-skip-out-of-flow-expected.png: Removed.
* platform/gtk/fast/css/first-letter-skip-out-of-flow-expected.txt: Removed.
* platform/ios-sim-deprecated/fast/css/first-letter-skip-out-of-flow-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/css/first-letter-skip-out-of-flow-expected.txt: Removed.
* platform/mac-mountainlion/fast/css/first-letter-skip-out-of-flow-expected.txt: Removed.
* platform/mac/fast/css/first-letter-skip-out-of-flow-expected.png: Removed.
* platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt: Removed.

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

5 years agoLog navigation types using DiagnosticLoggingClient
cdumez@apple.com [Mon, 12 Jan 2015 22:30:59 +0000 (22:30 +0000)]
Log navigation types using DiagnosticLoggingClient
https://bugs.webkit.org/show_bug.cgi?id=140323

Reviewed by Darin Adler.

Log navigation types using DiagnosticLoggingClient to help us understand
what types of navigations are common and give us an estimate on the
total number of navigations.

* loader/FrameLoader.cpp:
(WebCore::logNavigation):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::logNavigationWithFeatureCounter): Deleted.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::navigationKey):
* page/DiagnosticLoggingKeys.h:

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

5 years agoWeb Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
burg@cs.washington.edu [Mon, 12 Jan 2015 22:02:56 +0000 (22:02 +0000)]
Web Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
https://bugs.webkit.org/show_bug.cgi?id=140367

Reviewed by Andreas Kling.

* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::loadResource): use copyRef() instead of move(),
since we check the callback after giving it to the loader client.

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

5 years agoMove DatabaseBackend functions back to Database
andersca@apple.com [Mon, 12 Jan 2015 21:58:08 +0000 (21:58 +0000)]
Move DatabaseBackend functions back to Database
https://bugs.webkit.org/show_bug.cgi?id=140368

Reviewed by Sam Weinig.

* Modules/webdatabase/Database.cpp:
(WebCore::Database::openAndVerifyVersion):
(WebCore::Database::close):
(WebCore::Database::performOpenAndVerify):
(WebCore::Database::scheduleTransaction):
(WebCore::Database::runTransaction):
(WebCore::Database::scheduleTransactionStep):
(WebCore::Database::inProgressTransactionCompleted):
(WebCore::Database::transactionClient):
(WebCore::Database::transactionCoordinator):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::openAndVerifyVersion): Deleted.
(WebCore::DatabaseBackend::performOpenAndVerify): Deleted.
(WebCore::DatabaseBackend::close): Deleted.
(WebCore::DatabaseBackend::runTransaction): Deleted.
(WebCore::DatabaseBackend::inProgressTransactionCompleted): Deleted.
(WebCore::DatabaseBackend::scheduleTransaction): Deleted.
(WebCore::DatabaseBackend::scheduleTransactionStep): Deleted.
(WebCore::DatabaseBackend::transactionClient): Deleted.
(WebCore::DatabaseBackend::transactionCoordinator): Deleted.
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::recordDatabaseOpen):
(WebCore::DatabaseThread::recordDatabaseClosed):
(WebCore::SameDatabasePredicate::SameDatabasePredicate):
(WebCore::DatabaseThread::unscheduleDatabaseTasks):
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::create):
(WebCore::SQLTransactionBackend::SQLTransactionBackend):
* Modules/webdatabase/SQLTransactionBackend.h:
(WebCore::SQLTransactionBackend::database):

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

5 years agoAddressing post-review comment after r178292
mmaxfield@apple.com [Mon, 12 Jan 2015 21:12:17 +0000 (21:12 +0000)]
Addressing post-review comment after r178292
https://bugs.webkit.org/show_bug.cgi?id=136769

Unreviewed.

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):

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

5 years agoMake delegates conform to formal delegate protocols
andersca@apple.com [Mon, 12 Jan 2015 21:07:59 +0000 (21:07 +0000)]
Make delegates conform to formal delegate protocols
https://bugs.webkit.org/show_bug.cgi?id=140370

Reviewed by Dan Bernstein.

Source/WebKit/mac:

* DefaultDelegates/WebDefaultPolicyDelegate.h:
* WebCoreSupport/WebInspectorClient.mm:
Add protocols to the interface declarations.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController prepareForMenu:withEvent:]):
(-[WebActionMenuController _defaultMenuItemsForDataDetectedText]):
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _updateImmediateActionItem]):
(-[WebImmediateActionController _menuItemForDataDetectedText]):
Cast to id when trying to invoke delegate methods that aren't on WebUIDelegate.

Tools:

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::numberOfPendingGeolocationPermissionRequests):
(TestRunner::setGeolocationPermission):

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

5 years agoAllow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
mmaxfield@apple.com [Mon, 12 Jan 2015 20:55:09 +0000 (20:55 +0000)]
Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
https://bugs.webkit.org/show_bug.cgi?id=136769

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.

No new tests because the define is off by default. Tests will come soon, I promise.

* Configurations/FeatureDefines.xcconfig:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
do the transcode and take the non-SVG path.
(WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
CachedFont::ensureCustomFontData()
* css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
bytes around.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
transcode if the ENABLE is on, then treat as if the font is any old webfont.
(WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
element. Modify it to take a pointer to a (possibly external) document within which
to search.
* loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
and CachedFont::getSVGFontById()

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

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

5 years agoClean up FrameTree::traverseNext() traversals of main frames
zandobersek@gmail.com [Mon, 12 Jan 2015 20:22:53 +0000 (20:22 +0000)]
Clean up FrameTree::traverseNext() traversals of main frames
https://bugs.webkit.org/show_bug.cgi?id=140338

Reviewed by Andreas Kling.

There's no reason to pass the main frame as the stayWithin parameter
to FrameTree::traverseNext() when traversing over that same main frame.

Source/WebCore:

* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
* replay/SerializationMethods.cpp:
(WebCore::frameIndexFromFrame):
(WebCore::frameFromFrameIndex):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithSpotlight):

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

5 years agoMulti-rect TextIndicators are vertically flipped in WebKit1
timothy_horton@apple.com [Mon, 12 Jan 2015 20:22:10 +0000 (20:22 +0000)]
Multi-rect TextIndicators are vertically flipped in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=140350
<rdar://problem/19441243>

Reviewed by Beth Dakin.

* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
(WebCore::TextIndicator::TextIndicator):
* page/TextIndicator.h:
(WebCore::TextIndicator::selectionRectInRootViewCoordinates):
(WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
(WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
(WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
Compute, store, and use TextIndicator's selectionRect and textBoundingRect
in root view coordinates instead of window coordinates; this way, each
WebKit can do the conversion itself, and the rootView vs. window flipping
isn't wrongly factored into textRectsInBoundingRectCoordinates.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
Adjust to the field name changes.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:]):
Convert the textBoundingRect from root view to screen coordinates.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::drawRect):
Adjust to the new name, and use contentsToRootView when comparing against
the stored m_findIndicatorRect.

* WebView/WebView.mm:
(-[WebView _setTextIndicator:fadeOut:]):
Convert the textBoundingRect from root view to screen coordinates.

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

5 years agoUnreviewed, rolling out r178281.
commit-queue@webkit.org [Mon, 12 Jan 2015 20:02:32 +0000 (20:02 +0000)]
Unreviewed, rolling out r178281.
https://bugs.webkit.org/show_bug.cgi?id=140366

Broke many media tests (Requested by ap on #webkit).

Reverted changeset:

"defaultPlaybackRate not respected when set before source is
loaded"
https://bugs.webkit.org/show_bug.cgi?id=140282
http://trac.webkit.org/changeset/178281

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

5 years agoMerge DatabaseBackendContext into DatabaseContext
andersca@apple.com [Mon, 12 Jan 2015 19:43:31 +0000 (19:43 +0000)]
Merge DatabaseBackendContext into DatabaseContext
https://bugs.webkit.org/show_bug.cgi?id=140365

Reviewed by Antti Koivisto.

* CMakeLists.txt:
* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::DatabaseBackend):
* Modules/webdatabase/DatabaseBackend.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::DatabaseBackendBase):
* Modules/webdatabase/DatabaseBackendBase.h:
(WebCore::DatabaseBackendBase::databaseContext):
* Modules/webdatabase/DatabaseBackendContext.cpp: Removed.
* Modules/webdatabase/DatabaseBackendContext.h: Removed.
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::securityOrigin):
(WebCore::DatabaseContext::isContextThread):
(WebCore::DatabaseContext::backend): Deleted.
* Modules/webdatabase/DatabaseContext.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::interruptAllDatabasesForContext):
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::interruptAllDatabasesForContext):
(WebCore::DatabaseServer::openDatabase):
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::canEstablishDatabase):
(WebCore::DatabaseTracker::retryCanEstablishDatabase):
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
* Modules/webdatabase/SQLTransactionClient.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

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

5 years agoMake WebResourceDelegate a formal protocol as well
andersca@apple.com [Mon, 12 Jan 2015 18:50:00 +0000 (18:50 +0000)]
Make WebResourceDelegate a formal protocol as well
https://bugs.webkit.org/show_bug.cgi?id=140364

Reviewed by Dan Bernstein.

* WebView/WebResourceLoadDelegate.h:

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

5 years agoDelegates should be formal protocols
andersca@apple.com [Mon, 12 Jan 2015 18:41:38 +0000 (18:41 +0000)]
Delegates should be formal protocols
https://bugs.webkit.org/show_bug.cgi?id=140360
rdar://problem/17380856

Reviewed by Dan Bernstein.

This is the first half of this change. The second half involves actually changing the delegate properties to be protocols.

* DefaultDelegates/WebDefaultUIDelegate.h:
* Misc/WebDownload.h:
* WebView/WebEditingDelegate.h:
* WebView/WebFrameLoadDelegate.h:
* WebView/WebPolicyDelegate.h:
* WebView/WebUIDelegate.h:

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

5 years agoUnreviewed, rolling out r178266.
commit-queue@webkit.org [Mon, 12 Jan 2015 18:26:11 +0000 (18:26 +0000)]
Unreviewed, rolling out r178266.
https://bugs.webkit.org/show_bug.cgi?id=140363

Broke a JSC test (Requested by ap on #webkit).

Reverted changeset:

"Local JSArray* "keys" in objectConstructorKeys() is not
marked during garbage collection"
https://bugs.webkit.org/show_bug.cgi?id=140348
http://trac.webkit.org/changeset/178266

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

5 years agodefaultPlaybackRate not respected when set before source is loaded
jer.noble@apple.com [Mon, 12 Jan 2015 18:15:07 +0000 (18:15 +0000)]
defaultPlaybackRate not respected when set before source is loaded
https://bugs.webkit.org/show_bug.cgi?id=140282

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-defaultplaybackrate-before-load.html

When the HTMLMediaElement is notified that the media player's rate has changed, it asks
for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
value. So the end result is that the value from defaultPlaybackRate is overwritten by
the default value of 1 in MediaPlayer.

Rather than caching the requested rate in MediaPlayer, cache the value reported by
MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
value is still used for estimating the current time during playback.

Add MediaPlayerPrivate interface method to return the current playback rate.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
(WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
    of effectivePlaybackRate();
(WebCore::HTMLMediaElement::ended): Ditto.
(WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
(WebCore::HTMLMediaElement::endedPlayback): Ditto.
(WebCore::HTMLMediaElement::updatePlayState): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
(WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
    requestedPlaybackRate() if playing and 0 if not.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
(WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
(WebCore::MediaPlayer::setRate): Do not cache the rate.
(WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::rate): Added.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
    Do not cache the requested rate.
(WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
(WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
(WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
(WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.

LayoutTests:

* media/video-defaultplaybackrate-before-load-expected.txt: Added.
* media/video-defaultplaybackrate-before-load.html: Added.

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

5 years agoMerge DatabaseBase into Database
andersca@apple.com [Mon, 12 Jan 2015 18:09:10 +0000 (18:09 +0000)]
Merge DatabaseBase into Database
https://bugs.webkit.org/show_bug.cgi?id=140345

Reviewed by Antti Koivisto.

* CMakeLists.txt:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::runTransaction):
(WebCore::Database::logErrorMessage):
* Modules/webdatabase/Database.h:
(WebCore::Database::scriptExecutionContext):
* Modules/webdatabase/DatabaseBackendBase.cpp:
* Modules/webdatabase/DatabaseBackendBase.h:
(WebCore::DatabaseBackendBase::setFrontend):
* Modules/webdatabase/DatabaseBase.cpp: Removed.
* Modules/webdatabase/DatabaseBase.h: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

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

5 years agoLocal JSArray* "keys" in objectConstructorKeys() is not marked during garbage collection
msaboff@apple.com [Mon, 12 Jan 2015 16:29:22 +0000 (16:29 +0000)]
Local JSArray* "keys" in objectConstructorKeys() is not marked during garbage collection
https://bugs.webkit.org/show_bug.cgi?id=140348

Reviewed by Mark Lam.

Move the address of the local variable that is used to demarcate the top of the stack for
conservative roots down to MachineThreads::gatherFromCurrentThread() since it also gets
the register values using setjmp().  That way we don't lose any callee save register
contents between Heap::markRoots(), where it was set, and gatherFromCurrentThread().
If we lose any JSObject* that are only in callee save registers, they will be GC'ed
erroneously.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::gatherStackRoots):
* heap/Heap.h:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::gatherConservativeRoots):
* heap/MachineStackMarker.h:

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

5 years agoModernize and streamline HTMLTokenizer
darin@apple.com [Mon, 12 Jan 2015 16:22:50 +0000 (16:22 +0000)]
Modernize and streamline HTMLTokenizer
https://bugs.webkit.org/show_bug.cgi?id=140166

Reviewed by Sam Weinig.

Source/WebCore:

* html/parser/AtomicHTMLToken.h:
(WebCore::AtomicHTMLToken::initializeAttributes): Removed unneeded assertions
based on fields I removed.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Change to use updateStateFor
to set the initial state when parsing a fragment, since it implements the same
rule taht the tokenizerStateForContextElement function did.
(WebCore::HTMLDocumentParser::pumpTokenizer): Updated to use the revised
interfaces for HTMLSourceTracker and HTMLTokenizer.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Changed to take a
TokenPtr instead of an HTMLToken, so we can clear out the TokenPtr earlier
for non-character tokens, and let them get cleared later for character tokens.
(WebCore::HTMLDocumentParser::insert): Pass references.
(WebCore::HTMLDocumentParser::append): Ditto.
(WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan): Ditto.

* html/parser/HTMLDocumentParser.h: Updated argument type for constructTreeFromHTMLToken
and removed now-unneeded m_token data members.

* html/parser/HTMLEntityParser.cpp: Removed unneeded uses of the inline keyword.
(WebCore::HTMLEntityParser::consumeNamedEntity): Replaced two uses of
advanceAndASSERT with just plain advance; there's really no need to assert the
character is the one we just got out of the string.

* html/parser/HTMLInputStream.h: Moved the include of TextPosition.h here from
its old location since this class has two data members that are OrdinalNumber.

* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser): Removed most of the
initialization, since it's now done by defaults.
(WebCore::extractCharset): Rewrote this to be a non-member function, and to
use a for loop, and to handle quote marks in a simpler way. Also changed it
to return a StringView so we don't have to allocate a new string.
(WebCore::HTMLMetaCharsetParser::processMeta): Use a modern for loop, and
also take a token argument since it's no longer a data member.
(WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Use a modern for
loop, StringView instead of string, and don't bother naming the local enum.
(WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Updated for the new
way of getting tokens from the tokenizer.

* html/parser/HTMLMetaCharsetParser.h: Got rid of some data members and
tightened up the formatting a little. Don't bother allocating the tokenizer
on the heap.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::TokenPreloadScanner): Removed unneeded
initialization.
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner): Ditto.
(WebCore::HTMLPreloadScanner::scan): Changed to take a reference.

* html/parser/HTMLPreloadScanner.h: Removed unneeded includes, typedefs,
and forward declarations. Removed explicit declaration of the destructor,
since the default one works. Removed unused createCheckpoint and rewindTo
functions. Gave initial values for various data members. Marked the device
scale factor const beacuse it's set in the constructor and never changed.
Also removed the unneeded isSafeToSendToAnotherThread.

* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::isSafeToSendToAnotherThread): Deleted.

* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::PreloadRequest): Removed unneeded calls to
isolatedCopy. Also removed isSafeToSendToAnotherThread.

* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::startToken): Renamed. Changed to keep state
 in the source tracker itself, not the token.
(WebCore::HTMLSourceTracker::endToken): Ditto.
(WebCore::HTMLSourceTracker::source): Renamed. Changed to use the state
from the source tracker.

* html/parser/HTMLSourceTracker.h: Removed unneeded include of HTMLToken.h.
Renamed functions, removed now-unneeded comment.

* html/parser/HTMLToken.h: Cut down on the fields used by the source tracker.
It only needs to know the start and end of each attribute, not each part of
each attribute. Removed setBaseOffset, setEndOffset, length, addNewAttribute,
beginAttributeName, endAttributeName, beginAttributeValue, endAttributeValue,
m_baseOffset and m_length. Added beginAttribute and endAttribute.
(WebCore::HTMLToken::clear): No need to zero m_length or m_baseOffset any more.
(WebCore::HTMLToken::length): Deleted.
(WebCore::HTMLToken::setBaseOffset): Deleted.
(WebCore::HTMLToken::setEndOffset): Deleted.
(WebCore::HTMLToken::beginStartTag): Only null out m_currentAttribute if we
are compiling in assertions.
(WebCore::HTMLToken::beginEndTag): Ditto.
(WebCore::HTMLToken::addNewAttribute): Deleted.
(WebCore::HTMLToken::beginAttribute): Moved the code from addNewAttribute in
here and set the start offset.
(WebCore::HTMLToken::beginAttributeName): Deleted.
(WebCore::HTMLToken::endAttributeName): Deleted.
(WebCore::HTMLToken::beginAttributeValue): Deleted.
(WebCore::HTMLToken::endAttributeValue): Deleted.

* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLToken::endAttribute): Added. Sets the end offset.
(WebCore::HTMLToken::appendToAttributeName): Updated assertion.
(WebCore::HTMLToken::appendToAttributeValue): Ditto.
(WebCore::convertASCIIAlphaToLower): Renamed from toLowerCase and changed
so it's legal to call on lower case letters too.
(WebCore::vectorEqualsString): Changed to take a string literal rather than
a WTF::String.
(WebCore::HTMLTokenizer::inEndTagBufferingState): Made this a member function.
(WebCore::HTMLTokenizer::HTMLTokenizer): Updated for data member changes.
(WebCore::HTMLTokenizer::bufferASCIICharacter): Added. Optimized version of
bufferCharacter for the common case where we know the character is ASCII.
(WebCore::HTMLTokenizer::bufferCharacter): Moved this function here from the
header since it's only used inside the class.
(WebCore::HTMLTokenizer::emitAndResumeInDataState): Moved this here, renamed
it and removed the state argument.
(WebCore::HTMLTokenizer::emitAndReconsumeInDataState): Ditto.
(WebCore::HTMLTokenizer::emitEndOfFile): More of the same.
(WebCore::HTMLTokenizer::saveEndTagNameIfNeeded): Ditto.
(WebCore::HTMLTokenizer::haveBufferedCharacterToken): Ditto.
(WebCore::HTMLTokenizer::flushBufferedEndTag): Updated since m_token is now
the actual token, not just a pointer.
(WebCore::HTMLTokenizer::flushEmitAndResumeInDataState): Renamed this and
removed the state argument.
(WebCore::HTMLTokenizer::processToken): This function, formerly nextToken,
is now the internal function used by nextToken. Updated its contents to use
simpler macros, changed code to set m_state when returning, rather than
constantly setting it when cycling through states, switched style to use
early return/goto rather than lots of else statements, took out unneeded
braces now that BEGIN/END_STATE handles the braces, collapsed upper and
lower case letter handling in many states, changed lookAhead call sites to
use the new advancePast function instead.
(WebCore::HTMLTokenizer::updateStateFor): Set m_state directly instead of
calling a setstate function.
(WebCore::HTMLTokenizer::appendToTemporaryBuffer): Moved here from header.
(WebCore::HTMLTokenizer::temporaryBufferIs): Changed argument type to
a literal instead of a WTF::String.
(WebCore::HTMLTokenizer::appendToPossibleEndTag): Renamed and changed type
to be a UChar instead of LChar, although all characters will be ASCII.
(WebCore::HTMLTokenizer::isAppropriateEndTag): Marked const, and changed
type from size_t to unsigned.

* html/parser/HTMLTokenizer.h: Changed interface of nextToken so it returns
a TokenPtr so code doesn't have to understand special rules about when to
work with an HTMLToken and when to clear it. Made most functions private,
and made the State enum private as well. Replaced the state and setState
functions with more specific functions for the few states we need to deal
with outside the class. Moved function bodies outside the class definition
so it's easier to read the class definition.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to use the
new set state functions instead of setState.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.

* html/parser/InputStreamPreprocessor.h: Marked the constructor explicit,
and mde it take a reference rather than a pointer.

* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Updated to use the
new set state functions instead of setState.

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::decodedSnippetForName): Updated for name change.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Updated for changes to
attribute range tracking.
(WebCore::XSSAuditor::decodedSnippetForJavaScript): Updated for name change.
(WebCore::XSSAuditor::isSafeToSendToAnotherThread): Deleted.

* html/parser/XSSAuditor.h: Deleted isSafeToSendToAnotherThread.

* html/track/WebVTTTokenizer.cpp: Removed the local state variable from
WEBVTT_ADVANCE_TO; there is no need for it.
(WebCore::WebVTTTokenizer::WebVTTTokenizer): Use a reference instead of a
pointer for the preprocessor.
(WebCore::WebVTTTokenizer::nextToken): Ditto. Also removed the state local
variable and the switch statement, replacing with labels instead since we
go between states with goto.

* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::operator=): Changed the return type to be non-const
to match normal C++ design rules.
(WebCore::SegmentedString::pushBack): Renamed from prepend since this is not a
general purpose prepend function. Also fixed assertions to not use the strangely
named "escaped" function, since we are deleting it.
(WebCore::SegmentedString::append): Ditto.
(WebCore::SegmentedString::advancePastNonNewlines): Renamed from advance, since
the function only works for non-newlines.
(WebCore::SegmentedString::currentColumn): Got rid of unneeded local variable.
(WebCore::SegmentedString::advancePastSlowCase): Moved here from header and
renamed. This function now consumes the characters if they match.

* platform/text/SegmentedString.h: Made the changes mentioned above.
(WebCore::SegmentedString::excludeLineNumbers): Deleted.
(WebCore::SegmentedString::advancePast): Renamed from lookAhead. Also changed
behavior so the characters are consumed.
(WebCore::SegmentedString::advancePastIgnoringCase): Ditto.
(WebCore::SegmentedString::advanceAndASSERT): Deleted.
(WebCore::SegmentedString::advanceAndASSERTIgnoringCase): Deleted.
(WebCore::SegmentedString::escaped): Deleted.

* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::isHexDigit): Deleted.
(WebCore::unconsumeCharacters): Updated for name change.
(WebCore::consumeCharacterReference): Removed unneeded name for local enum,
renamed local variable "cc" to character. Changed code to use helpers like
isASCIIAlpha and toASCIIHexValue. Removed unneeded use of advanceAndASSERT,
since we don't really need to assert the character we just extracted.

* xml/parser/MarkupTokenizerInlines.h:
(WebCore::isTokenizerWhitespace): Renamed argument to character.
(WebCore::advanceStringAndASSERTIgnoringCase): Deleted.
(WebCore::advanceStringAndASSERT): Deleted.
Changed all the macro implementations so they set m_state only when
returning from the function and just use goto inside the state machine.

Source/WTF:

* wtf/Forward.h: Removed PassRef, added OrdinalNumber and TextPosition.

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

5 years agoAX: [ATK] Whether to show the title attribute, if there is a label with the attribute...
commit-queue@webkit.org [Mon, 12 Jan 2015 13:50:02 +0000 (13:50 +0000)]
AX: [ATK] Whether to show the title attribute, if there is a label with the attribute for?
https://bugs.webkit.org/show_bug.cgi?id=139986

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2015-01-12
Reviewed by Chris Fleizach.

* accessibility/radio-button-title-label.html:
   This test is also suitable for EFL and GTK port.
* platform/efl/TestExpectations:
* platform/efl/accessibility/radio-button-title-label-expected.txt: Added.
* platform/gtk/TestExpectations:
* platform/gtk/accessibility/radio-button-title-label-expected.txt: Added.

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

5 years agoFix lint-test-files warnings in TestExpectations files.
commit-queue@webkit.org [Mon, 12 Jan 2015 10:42:48 +0000 (10:42 +0000)]
Fix lint-test-files warnings in TestExpectations files.
https://bugs.webkit.org/show_bug.cgi?id=140351

Unreviewed gardening.

Removed the test cases from TestExpectations files.

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2015-01-12

* platform/efl/TestExpectations:
* platform/wk2/TestExpectations:

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

5 years agoEnable Vector bounds checking for ElementDescendantIterator.
akling@apple.com [Mon, 12 Jan 2015 04:33:38 +0000 (04:33 +0000)]
Enable Vector bounds checking for ElementDescendantIterator.
<https://webkit.org/b/140346>

Reviewed by Sam Weinig.

I had originally disabled Vector bounds checking for
ElementDescendantIterator's internal ancestor stack, but upon
re-running performance benchmarks, it appears to have little-to-no
measurable benefit.

This change adds back the bounds checking.

* dom/ElementDescendantIterator.h:

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

5 years ago[CoordinatedGraphics] Suspend or resume when visibility is changed
ryuan.choi@navercorp.com [Mon, 12 Jan 2015 02:47:04 +0000 (02:47 +0000)]
[CoordinatedGraphics] Suspend or resume when visibility is changed
https://bugs.webkit.org/show_bug.cgi?id=140285

Reviewed by Gyuyoung Kim.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Copied the logic from TiledCoreAnimationDrawingArea.
(WebKit::CoordinatedDrawingArea::viewStateDidChange):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:

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

5 years agoDrop legacy SVGCSSStyleSelector.cpp
cdumez@apple.com [Mon, 12 Jan 2015 00:17:50 +0000 (00:17 +0000)]
Drop legacy SVGCSSStyleSelector.cpp
https://bugs.webkit.org/show_bug.cgi?id=140342

Reviewed by Antti Koivisto.

Drop legacy SVGCSSStyleSelector.cpp by porting the remaining SVG CSS
properties to the generated StyleBuilder. This patch also removes
support for the "LegacyStyleBuilder" option in CSSPropertyNames.in
as all properties have now been ported over.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Drop SVGCSSStyleSelector.cpp file as it was removed.

* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp: Removed.
* css/StyleBuilder.h:
StyleBuilder::applyProperty() no longer need to return a boolean as
it now handles ALL CSS properties.

* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueBaselineShift):
(WebCore::StyleBuilderCustom::applyInitialFill):
(WebCore::StyleBuilderCustom::applyInheritFill):
(WebCore::StyleBuilderCustom::applyValueFill):
(WebCore::StyleBuilderCustom::applyInitialStroke):
(WebCore::StyleBuilderCustom::applyInheritStroke):
(WebCore::StyleBuilderCustom::applyValueStroke):
(WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow):
(WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow):
(WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow):
Move 'fill', 'stroke' and '-webkit-svg-shadow' to the new
StyleBuilder.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:

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

5 years agoRemove FontCachePurgePreventer
antti@apple.com [Sun, 11 Jan 2015 22:58:09 +0000 (22:58 +0000)]
Remove FontCachePurgePreventer
https://bugs.webkit.org/show_bug.cgi?id=139628

Reviewed by Anders Carlsson.

This stack type is bug prone and invasive. A missing FontCachePurgePreventer in a code that touches fonts is always
a hard-to-detect bug and there are many places that need it. Instead purge the font cache on top of the runloop.

The purge timer could in principle fire in a nested runloop. However we should never have unreferenced
SimpleFontData objects in the stack in such case (GlyphData objects don't currently ref the font) because those
only occur during layout and painting. Layout and painting can't trigger a nested runloops as there would be
bigger problems.

Purging may also be triggered synchronously by a memory notification. That case won't have any GlyphDatas in the stack either.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::paintContents):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::FontCache):
(WebCore::FontCache::fontForFamily):
(WebCore::FontCache::purgeTimerFired):
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCache.h:
(WebCore::FontCache::disablePurging): Deleted.
(WebCore::FontCache::enablePurging): Deleted.
(WebCore::FontCachePurgePreventer::FontCachePurgePreventer): Deleted.
(WebCore::FontCachePurgePreventer::~FontCachePurgePreventer): Deleted.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::emphasisMarkAscent):
(WebCore::Font::emphasisMarkDescent):
(WebCore::Font::emphasisMarkHeight):
(WebCore::Font::drawEmphasisMarks):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
(WebCore::createDragImageForLink):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
* rendering/RenderThemeIOS.mm:
(WebCore::adjustInputElementButtonStyle):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::subtreeChildWasAdded):
(WebCore::RenderSVGText::subtreeStyleDidChange):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::RenderSVGText::removeChild):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):

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

5 years ago[SVG -> OTF Converter] Implement ligatures
mmaxfield@apple.com [Sun, 11 Jan 2015 22:55:43 +0000 (22:55 +0000)]
[SVG -> OTF Converter] Implement ligatures
https://bugs.webkit.org/show_bug.cgi?id=137094

Reviewed by Dan Bernstein.

Use the "liga" OpenType feature to implement ligatures inside the GSUB table.

Tests: svg/W3C-SVG-1.1/fonts-glyph-04-t.svg
       svg/W3C-SVG-1.1/text-text-06-t.svg
       svg/text/kerning.svg
       svg/text/multichar-glyph.svg

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::grow):
(WebCore::SVGToOTFFontConverter::appendCMAPTable): Use StringView::codePoints().
(WebCore::SVGToOTFFontConverter::firstGlyph): Returns the first element of the input
vector, along with some ASSERTs.
(WebCore::SVGToOTFFontConverter::appendLigatureSubtable):
(WebCore::SVGToOTFFontConverter::appendScriptSubtable): Used inside appendGSUBTable.
(WebCore::SVGToOTFFontConverter::appendGSUBTable): Updating for ligatures.
(WebCore::codepointToString): Wrapper around U16_APPEND().
(WebCore::SVGToOTFFontConverter::glyphsForCodepoint): Call codepointToString and look
in internal map.
(WebCore::SVGToOTFFontConverter::addCodepointRanges): Use glyphsForCodepoint().
(WebCore::SVGToOTFFontConverter::appendLigatureGlyphs): Ligatures are implemented as
mapping a sequence of glyphs to another glyph inside OpenType. However, SVG models
ligatures as mapping a sequence of codepoints to a glyph. This function makes dummy
glyphs for all the codepoints that we don't have glyphs for and appends them to
m_glyphs.
(WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Use appendEmptyGlyph() and
call appendLigatureGlyphs().

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

5 years agoFix typo in testate.c error messages
eric.carlson@apple.com [Sun, 11 Jan 2015 22:14:36 +0000 (22:14 +0000)]
Fix typo in testate.c error messages
https://bugs.webkit.org/show_bug.cgi?id=140305

Reviewed by Geoffrey Garen.

* API/tests/testapi.c:
(main): "... script did not timed out ..." -> "... script did not time out ..."

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

5 years agoMove more SVG CSS properties to the new StyleBuilder
cdumez@apple.com [Sun, 11 Jan 2015 20:04:11 +0000 (20:04 +0000)]
Move more SVG CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140340

Reviewed by Antti Koivisto.

Move more SVG CSS properties to the new StyleBuilder by introducing
the necessary converters in StyleBuilderConverter.

* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
(WebCore::roundToNearestGlyphOrientationAngle): Deleted.
(WebCore::angleToGlyphOrientation): Deleted.
(WebCore::colorFromSVGColorCSSValue): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertNumber):
(WebCore::StyleBuilderConverter::convertNumberOrAuto):
(WebCore::StyleBuilderConverter::convertOpacity):
(WebCore::StyleBuilderConverter::convertSVGURIReference):
(WebCore::StyleBuilderConverter::convertSVGColor):
(WebCore::StyleBuilderConverter::convertGlyphOrientation):
(WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
* rendering/style/RenderStyle.h:

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

5 years agoGeoff is organized, but he is not an organization.
mitz@apple.com [Sun, 11 Jan 2015 18:20:37 +0000 (18:20 +0000)]
Geoff is organized, but he is not an organization.

Rubber-stamped by Anders Carlsson.

* bmalloc.xcodeproj/project.pbxproj: Removed the ORGANIZATIONNAME project attribute.

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

5 years agoediting/spelling/grammar-paste.html is flaky in debug after r177682
ap@apple.com [Sun, 11 Jan 2015 09:17:56 +0000 (09:17 +0000)]
editing/spelling/grammar-paste.html is flaky in debug after r177682
https://bugs.webkit.org/show_bug.cgi?id=139903

* TestExpectations: The test if flaky on release bots too, updating expectations.

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

5 years agobuild-webkit: silence output of 'which'
commit-queue@webkit.org [Sat, 10 Jan 2015 23:29:57 +0000 (23:29 +0000)]
build-webkit: silence output of 'which'
https://bugs.webkit.org/show_bug.cgi?id=140278

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-01-10
Reviewed by Daniel Bates.

Use a more elegent test for the existance of ninja and eclipse.

* Scripts/webkitdirs.pm:
(commandExists): Don't assume the command supports --version
(canUseNinja): Use commandExists()
(canUseEclipse): Use commandExists()

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

5 years agoUnreviewed build fix. Removed the stale code.
rniwa@webkit.org [Sat, 10 Jan 2015 22:02:28 +0000 (22:02 +0000)]
Unreviewed build fix. Removed the stale code.

* public/admin/triggerables.php:

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

5 years ago[Xcode, iOS] Files are recompiled when alternating between using make and the Xcode IDE
mitz@apple.com [Sat, 10 Jan 2015 21:57:32 +0000 (21:57 +0000)]
[Xcode, iOS] Files are recompiled when alternating between using make and the Xcode IDE
https://bugs.webkit.org/show_bug.cgi?id=140339

Reviewed by Mark Rowe.

* Makefile.shared: Run xcodebuild with the same PATH with which the Xcode IDE runs. This
prevents unnecessary rebuilding due to PATH differences.

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

5 years agoUnreviewed buildfix for !ENABLE(INSPECTOR) builds after r178201.
ossy@webkit.org [Sat, 10 Jan 2015 18:59:39 +0000 (18:59 +0000)]
Unreviewed buildfix for !ENABLE(INSPECTOR) builds after r178201.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):

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

5 years ago[WinCairo] Accelerated compositing has stopped working.
commit-queue@webkit.org [Sat, 10 Jan 2015 14:57:35 +0000 (14:57 +0000)]
[WinCairo] Accelerated compositing has stopped working.
https://bugs.webkit.org/show_bug.cgi?id=140334

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-01-10
Reviewed by Brent Fulgham.

The method GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly()
is not updating the backingstore anymore, we need to call the new method
GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers().

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::flushPendingLayerChanges):
(AcceleratedCompositingContext::flushAndRenderLayers):

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

5 years ago[ThreadedCompositor] Prevent excessive rendering call.
yoon@igalia.com [Sat, 10 Jan 2015 12:07:26 +0000 (12:07 +0000)]
[ThreadedCompositor] Prevent excessive rendering call.
https://bugs.webkit.org/show_bug.cgi?id=140297

Reviewed by Žan Doberšek.

Not to waste CPU time on waiting V-Sync interval, the update timer of
compositing thread should be throttled.

In case of updating scene state, this update timer should be called as
soon as possible. However, when CoordinatedGraphicsScene requests update
viewport to advance the animations, this call should be scheduled for
a next frame.

No new tests. No change in functionality.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::CompositingRunLoop::CompositingRunLoop):
(WebKit::CompositingRunLoop::setUpdateTimer):
(WebKit::CompositingRunLoop::updateTimerFired):
(WebKit::ThreadedCompositor::setNeedsDisplay):
(WebKit::ThreadedCompositor::updateViewport):
(WebKit::ThreadedCompositor::scheduleDisplayImmediately):
(WebKit::ThreadedCompositor::didChangeVisibleRect):
(WebKit::ThreadedCompositor::scheduleDisplayIfNeeded): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

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

5 years agoMove 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties to the new...
cdumez@apple.com [Sat, 10 Jan 2015 08:49:32 +0000 (08:49 +0000)]
Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140327

Reviewed by Sam Weinig.

Move 'kerning' / 'paint-order' / 'stroke-dasharray' SVG CSS properties
to the new StyleBuilder by introducing the necessary converters in
StyleBuilderConverter.

* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSVGLength):
(WebCore::StyleBuilderConverter::convertSVGLengthVector):
(WebCore::StyleBuilderConverter::convertStrokeDashArray):
(WebCore::StyleBuilderConverter::convertPaintOrder):
* svg/SVGLength.cpp:
(WebCore::SVGLength::fromCSSPrimitiveValue):
* svg/SVGLength.h:

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

5 years agoUpdate the output format for run-api-tests
weinig@apple.com [Sat, 10 Jan 2015 08:01:32 +0000 (08:01 +0000)]
Update the output format for run-api-tests
https://bugs.webkit.org/show_bug.cgi?id=140332

Reviewed by Dan Bernstein.

Changes the output format for run-api-tests be a bit simpler (no longer
indented based on suite, as we were not really using suite very well) but
also include details in the case of failure.

Changes verbose mode to no longer spew out the gtest default printer output,
as the custom printer now includes the failure information.

* Scripts/run-api-tests:
(runTestsBySuite):
(runTest):
Augment the custom gtest printer by replacing the tokens "**PASS**" and "**FAIL**"
with colorized variants and strip out leaks spew (the leaks can be added back using
the new --show-leaks argument).

* TestWebKitAPI/TestsController.cpp:
(TestWebKitAPI::Printer::OnTestPartResult):
(TestWebKitAPI::Printer::OnTestEnd):
(TestWebKitAPI::TestsController::run):
Implement a custom result printer that just prints out the information we want.

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

5 years agoTry to fix the GTK and EFL builds.
weinig@apple.com [Sat, 10 Jan 2015 05:48:54 +0000 (05:48 +0000)]
Try to fix the GTK and EFL builds.

* CMakeLists.txt:

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

5 years agoPerf dashboard should have the ability to post A/B testing builds
rniwa@webkit.org [Sat, 10 Jan 2015 05:26:49 +0000 (05:26 +0000)]
Perf dashboard should have the ability to post A/B testing builds
https://bugs.webkit.org/show_bug.cgi?id=140317

Rubber-stamped by Simon Fraser.

This patch adds the support for triggering A/B testing from the perf dashboard.

We add a few new tables to the database. "build_triggerables", which represents a set of builders
that accept A/B testing. "triggerable_repositories" associates each "triggerable" with a fixed set
of repositories for which an arbitrary revision can be specified for A/B testing.
"triggerable_configurations" specifies a triggerable available on a given test on a given platform.
"roots" table which specifies the revision used in a given root set in each repository.

* init-database.sql: Added "build_triggerables", "triggerable_repositories",
"triggerable_configurations", and "roots" tables. Added references to "build_triggerables",
"platforms", and "tests" tables as well as columns to store status, status url, and creation time
to build_requests table. Also made each test group's name unique in a given analysis task as it
would be confusing to have multiple test groups of the same name.

* public/admin/tests.php: Added the UI and the code to associate a test with a triggerable.

* public/admin/triggerables.php: Added. Manages the list of triggerables as well as repositories
for which a specific revision can be set in an A/B testing on a given triggerable.

* public/api/build-requests.php: Added. Returns the list of open build requests on a specified
triggerable. Also updates the status' and the status urls of specified build requests when
buildRequestUpdates is provided in the raw POST data.
(main):

* public/api/runs.php:
(fetch_runs_for_config): Don't include results associated with a build request, meaning they are
results of an A/B testing.

* public/api/test-groups.php:
(main): Use the newly added BuildRequestsFetcher. Also merged fetch_test_groups_for_task back.

* public/api/triggerables.php: Added.
(main): Returns a list of triggerables or a triggerable associated with a given analysis task.

* public/include/admin-header.php:

* public/include/build-requests-fetcher.php: Added. Extracted from public/api/test-groups.php.
(BuildRequestsFetcher): This class abstracts the process of fetching a list of builds requests
and root sets used in those requests.D
(BuildRequestsFetcher::__construct):
(BuildRequestsFetcher::fetch_for_task):
(BuildRequestsFetcher::fetch_for_group):
(BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable):
(BuildRequestsFetcher::has_results):
(BuildRequestsFetcher::results):
(BuildRequestsFetcher::results_with_resolved_ids):
(BuildRequestsFetcher::results_internal):
(BuildRequestsFetcher::root_sets):
(BuildRequestsFetcher::fetch_roots_for_set):

* public/include/db.php:
(Database::prefixed_column_names): Don't return "$prefix_" when there are no columns.
(Database::insert_row): Support taking an empty array for values. This is useful in "root_sets"
table since it only has the primary key, id, column.
(Database::select_or_insert_row):
(Database::update_or_insert_row):
(Database::update_row): Added.
(Database::_select_update_or_insert_row): Takes an extra argument specifying whether a new row
should be inserted when no row matches the specified criteria. This is used while updating
build_requests' status and url in public/api/build-requests.php since we shouldn't be inserting
new build requests in that API.
(Database::select_rows): Also use "1 == 1" in the select query when the query criteria is empty.
This is used in public/api/triggerables.php when no analysis task is specified.

* public/include/json-header.php:
(find_triggerable_for_task): Added. Finds a triggerable available on a given test. We return the
triggerable associated with the closest ancestor of the test. Since issuing a new query for each
ancestor test is expensive, we retrieve triggerable for all ancestor tests at once and manually
find the closest ancestor with a triggerable.

* public/include/report-processor.php:
(ReportProcessor::process):
(ReportProcessor::resolve_build_id): Associate a build request with the newly created build
if jobId or buildRequest is specified.

* public/include/test-name-resolver.php:
(TestNameResolver::map_metrics_to_tests): Store the entire metric row instead of its name so that
test_exists_on_platform can use it. The last diff in public/admin/tests.php adopts this change.
(TestNameResolver::test_exists_on_platform): Added. Returns true iff the test has ever run on
a given platform.

* public/include/test-path-resolver.php: Added.
(TestPathResolver): This class abstracts the ancestor chains of a test. It retrieves the entire
"tests" table to do this since there could be arbitrary number of ancestors for a given test.
This class is a lot more lightweight than TestNameResolver, which retrieves a whole bunch of tables
in order to compute full test metric names.
(TestPathResolver::__construct):
(TestPathResolver::ancestors_for_test): Returns the ordered list of ancestors from the closest to
the highest (a test without a parent).
(TestPathResolver::path_for_test): Returns a test "path", the ordered list of test names from
the highest ancestor to the test itself.
(TestPathResolver::ensure_id_to_test_map): Fetches "tests" table to construct id_to_test_map.

* public/privileged-api/create-test-group.php: Added. An API to create A/B testing groups.
(main):
(commit_sets_from_root_sets): Given a dictionary of repository names to a pair of revisions
for sets A and B respectively, returns a pair of arrays, each of which contains the corresponding
set of "commits" for sets A and B respectively. e.g. {"WebKit": [1, 2], "Safari": [3, 4]} will
result in [[WebKit commit at r1, Safari commit at r3], [WebKit commit at r2, Safari commit at r4]].

* public/v2/analysis.js:
(App.AnalysisTask.testGroups): Takes arguments so that set('testGroups') will invalidate the cache.
(App.AnalysisTask.triggerable): Added. Retrieves the triggerable associated with the task lazily.
(App.TestGroup.rootSets): Added. Returns the list of root set ids used in this A/B testing group.
(App.TestGroup.create): Added. Creates a new A/B testing group.
(App.Triggerable): Added.
(App.TriggerableAdapter): Added.
(App.TriggerableAdapter.buildURL): Added.
(App.BuildRequest.testGroup): Renamed from group.
(App.BuildRequest.orderLabel): Added. One-based index to be used in labels.
(App.BuildRequest.config): Added. Returns either 'A' or 'B' depending on the configuration used
in this build request.
(App.BuildRequest.status): Added.
(App.BuildRequest.statusLabel): Added. Returns a human friendly label for the current status.
(App.BuildRequest): Removed buildNumber, buildBuilder, as well as buildTime as they're unused.

* public/v2/app.js:
(App.AnalysisTaskController.testGroups): Added.
(App.AnalysisTaskController.possibleRepetitionCounts): Added.
(App.AnalysisTaskController.updateRoots): Renamed from roots. This is also no longer a property
but an observer that updates "roots" property. Filter out the repositories that are not accepted
by the associated triggerable as they will be ignored.
(App.AnalysisTaskController.actions.createTestGroup): Added.

* public/v2/index.html: Updated the UI, and added a form element to trigger createTestGroup action.

* tools/sync-with-buildbot.py: Added. This scripts posts new builds on buildbot and reports back
the status of those builds to the perf dashboard. A similar script can be written to support
other continuous builds systems.
(main): Fetches the list of pending builds as well as currently running or completed builds from
a buildbot, and report new statuses of builds requests to the perf dashboard. It will then schedule
a single new build on each builder with no pending builds, and marks the set of open build requests
that have been scheduled to run on the buildbot but not found in the first step as stale.
(load_config): Loads a JSON that contains the configurations for each builder. e.g.
[
    {
        "platform": "mac-mavericks",
        "test": ["Parser", "html5-full-render.html"],
        "builder": "Trunk Syrah Production Perf AB Tests",
        "arguments": {
            "forcescheduler": "force-mac-mavericks-release-perf",
            "webkit_revision": "$WebKit",
            "jobid": "$buildRequest"
        }
    }
]

(find_request_updates): Return a list of build request status updates to make based on the pending
builds as well as in-progress and completed builds on each builder on the buildbot. When a build is
completed, we use the special status "failedIfNotCompleted" which results in "failed" status only
if the build request had not been completed. This is necessary because a failed build will not
report its failed-ness back to the perf dashboard in some cases; e.g. lost slave or svn up failure.
(update_and_fetch_build_requests): Submit the build request status updates and retrieve the list
of open requests the perf dashboard has.
(find_stale_request_updates): Compute the list of build requests that have been scheduled on the
buildbot but not found in find_request_updates. These build requests are lost. e.g. a master reboot
or human canceling a build may trigger such a state.
(schedule_request): Schedules a build with the arguments specified in the configuration JSON after
replacing repository names with their revisions and buildRequest with the build request id.
(config_for_request): Finds a builder for the test and the platform of a build request.
(fetch_json): Fetches a JSON from the specified URL, optionally with BasicAuth.
(property_value_from_build): Returns the value of a specific property in a buildbot build.
(request_id_from_build): Returns the build request id of a given buildbot build if there is one.

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

5 years agoCTTE: GeolocationController always has a client.
akling@apple.com [Sat, 10 Jan 2015 03:53:54 +0000 (03:53 +0000)]
CTTE: GeolocationController always has a client.
<https://webkit.org/b/140330>

Reviewed by Anders Carlsson.

Change GeolocationController::m_client to be a reference and remove
a whole bunch of unnecessary null checks.

* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController):
(WebCore::GeolocationController::~GeolocationController):
(WebCore::GeolocationController::addObserver):
(WebCore::GeolocationController::removeObserver):
(WebCore::GeolocationController::requestPermission):
(WebCore::GeolocationController::cancelPermissionRequest):
(WebCore::GeolocationController::lastPosition):
(WebCore::GeolocationController::viewStateDidChange):
(WebCore::provideGeolocationTo):
* Modules/geolocation/GeolocationController.h:
(WebCore::GeolocationController::client):

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

5 years agoBreakpoint doesn't fire in this HTML5 game
msaboff@apple.com [Sat, 10 Jan 2015 02:44:56 +0000 (02:44 +0000)]
Breakpoint doesn't fire in this HTML5 game
https://bugs.webkit.org/show_bug.cgi?id=140269

Reviewed by Mark Lam.

Source/JavaScriptCore:

When parsing a single line cached function, use the lineStartOffset of the
location where we found the cached function instead of the cached lineStartOffset.
The cache location's lineStartOffset has not been adjusted for any possible
containing functions.

This change is not needed for multi-line cached functions.  Consider the
single line source:

function outer(){function inner1(){doStuff();}; (function inner2() {doMoreStuff()})()}

The first parser pass, we parse and cache inner1() and inner2() with a lineStartOffset
of 0.  Later when we parse outer() and find inner1() in the cache, SourceCode start
character is at outer()'s outermost open brace.  That is what we should use for
lineStartOffset for inner1().  When done parsing inner1() we set the parsing token
to the saved location for inner1(), including the lineStartOffset of 0.  We need
to use the value of lineStartOffset before we started parsing inner1().  That is
what the fix does.  When we parse inner2() the lineStartOffset will be correct.

For a multi-line function, the close brace is guaranteed to be on a different line
than the open brace.  Hence, its lineStartOffset will not change with the change of
the SourceCode start character

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):

LayoutTests:

New tests that set breakpoints in functions with various line split
combinations.

* inspector/debugger/breakpoint-columns-expected.txt: Added.
* inspector/debugger/breakpoint-columns.html: Added.
* inspector/debugger/resources/column-breakpoints-1.js: Added.
(columnTest1.x):
(columnTest1):
(columnTest2.x):
(columnTest2.f):
(columnTest3.x):
(columnTest3.f):
(runColumnTest1):
(runColumnTest2):
(runColumnTest3):
* inspector/debugger/resources/column-breakpoints-2.js: Added.
(columnTest4.x):
(columnTest4.f):
(columnTest5.x):
(columnTest5):
(runColumnTest4):
(runColumnTest5):

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

5 years agoCalling clearSelection on a detached RenderObject leads to segfault.
zalan@apple.com [Sat, 10 Jan 2015 02:12:01 +0000 (02:12 +0000)]
Calling clearSelection on a detached RenderObject leads to segfault.
https://bugs.webkit.org/show_bug.cgi?id=140275

Reviewed by Simon Fraser.

We collect selection rects and compute selection gaps in order to
paint/clear selection. With certain content, we need to be able
to walk the tree up to a particular container to compute the selection rect.
However this container might not be available when the selection is part of a detached tree.
This is a null-check fix to ensure we don't crash in such cases, but in the long run
selection gaps and rect should be cached between two layouts so that we don't need to
keep collecting/recomputing them. Tracked here: webkit.org/b/140321

Source/WebCore:

Test: editing/selection/clearselection-on-detached-subtree-crash.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
* rendering/RenderView.cpp:
(WebCore::RenderView::clearSelection):

LayoutTests:

* editing/selection/clearselection-on-detached-subtree-crash-expected.txt: Added.
* editing/selection/clearselection-on-detached-subtree-crash.html: Added.

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

5 years agoRemove more sync database code
andersca@apple.com [Sat, 10 Jan 2015 02:00:45 +0000 (02:00 +0000)]
Remove more sync database code
https://bugs.webkit.org/show_bug.cgi?id=140328

Reviewed by Sam Weinig.

* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::DatabaseBackend):
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::DatabaseBackendBase):
* Modules/webdatabase/DatabaseBackendBase.h:
(WebCore::DatabaseBackendBase::isSyncDatabase): Deleted.
* Modules/webdatabase/DatabaseBasicTypes.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseBackend):
(WebCore::DatabaseManager::openDatabase):
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::openDatabase):
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseServer.h:

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

5 years agoFix the iOS build after <http://trac.webkit.org/changeset/178213>
dbates@webkit.org [Sat, 10 Jan 2015 01:50:39 +0000 (01:50 +0000)]
Fix the iOS build after <trac.webkit.org/changeset/178213>
(https://bugs.webkit.org/show_bug.cgi?id=140310)

Patch by Daniel Bates <dabates@apple.com> on 2015-01-09

* platform/spi/cocoa/CoreTextSPI.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):

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

5 years agoGet rid of legacy StyleBuilder switch in StyleResolver.cpp
cdumez@apple.com [Sat, 10 Jan 2015 01:48:44 +0000 (01:48 +0000)]
Get rid of legacy StyleBuilder switch in StyleResolver.cpp
https://bugs.webkit.org/show_bug.cgi?id=140315

Reviewed by Sam Weinig.

Get rid of legacy StyleBuilder switch in StyleResolver.cpp now that most
properties have been ported to the new generated StyleBuilder in previous
patches. The properties that remained in this switch were shorthand
properties or other properties that do not require any handling in the
StyleBuilder.

To achieve this, this patch introduces 2 parameters in
CSSPropertyNames.in:
- SkipBuilder: Indicates that no StyleBuilder code should be generated
  for this property.
- Shorthand: Indicates that this is a shorthand property, which therefore
  does not use the StyleBuilder. makeprop.pl will merely generate
  assertions for such properties, to validate that this is a shorthand
  property and that the StyleBuilder code is never reached.

* css/CSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:

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

5 years agoTestWebKitAPI should print out the lists that fail at the end
weinig@apple.com [Sat, 10 Jan 2015 01:29:50 +0000 (01:29 +0000)]
TestWebKitAPI should print out the lists that fail at the end
https://bugs.webkit.org/show_bug.cgi?id=140329

Reviewed by Tim Horton.

* Scripts/run-api-tests:
(runTestsBySuite):
Print out failures and timeouts in all modes, not just verbose.

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

5 years ago[Win] Build fix after r178219.
bfulgham@apple.com [Sat, 10 Jan 2015 01:15:55 +0000 (01:15 +0000)]
[Win] Build fix after r178219.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj: Remove PaintHooks.asm references in project file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

Source/WebKit:

Update the project file settings to understand how to process assembly files.
Also tidy up the plugin code in the project hieararchy.

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

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

5 years agoWeb Inspector: Uncaught Exception in ProbeManager deleting breakpoint
joepeck@webkit.org [Sat, 10 Jan 2015 01:04:36 +0000 (01:04 +0000)]
Web Inspector: Uncaught Exception in ProbeManager deleting breakpoint
https://bugs.webkit.org/show_bug.cgi?id=140279
rdar://problem/19422299

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

* runtime/MapData.cpp:
(JSC::MapData::replaceAndPackBackingStore):
The cell table also needs to have its values fixed.

LayoutTests:

* js/map-repack-with-object-keys-expected.txt: Added.
* js/map-repack-with-object-keys.html: Added.
* js/script-tests/map-repack-with-object-keys.js: Added.

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

5 years agoLog which ActiveDOMObject(s) can't be suspended for PageCache.
akling@apple.com [Sat, 10 Jan 2015 00:43:48 +0000 (00:43 +0000)]
Log which ActiveDOMObject(s) can't be suspended for PageCache.
<https://webkit.org/b/139697>

Reviewed by Chris Dumez.

Give ActiveDOMObject a pure virtual activeDOMObjectName() so we can
find their names.

Dump the names of all the ActiveDOMObjects that fail to suspend when
we're trying to put a page into PageCache.

* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
* Modules/mediastream/RTCStatsRequestImpl.h:
* Modules/mediastream/RTCVoidRequestImpl.h:
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.h:
* Modules/webaudio/AudioContext.h:
* Modules/webdatabase/DatabaseContext.h:
* Modules/websockets/WebSocket.h:
* WebCore.exp.in:
* css/FontLoader.h:
* dom/ActiveDOMObject.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
* dom/ScriptExecutionContext.h:
* fileapi/FileReader.h:
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.h:
* html/PublicURLManager.h:
* html/canvas/WebGLRenderingContext.h:
* page/EventSource.h:
* page/SuspendableTimer.h:
* workers/AbstractWorker.h:
* xml/XMLHttpRequest.h:

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

5 years agoGet rid of the database strategy
andersca@apple.com [Sat, 10 Jan 2015 00:34:40 +0000 (00:34 +0000)]
Get rid of the database strategy
https://bugs.webkit.org/show_bug.cgi?id=140322

Reviewed by Sam Weinig.

Source/WebCore:

* CMakeLists.txt:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
(WebCore::DatabaseManager::DatabaseManager):
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/DatabaseStrategy.cpp: Removed.
* platform/DatabaseStrategy.h: Removed.
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::databaseStrategy): Deleted.

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createDatabaseStrategy): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createDatabaseStrategy): Deleted.
* WebCoreSupport/WebPlatformStrategies.h:

Source/WebKit2:

* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createDatabaseStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createDatabaseStrategy): Deleted.
(WebKit::WebPlatformStrategies::getDatabaseServer): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

5 years agoMake bmalloc work with ASan
ggaren@apple.com [Sat, 10 Jan 2015 00:30:57 +0000 (00:30 +0000)]
Make bmalloc work with ASan
https://bugs.webkit.org/show_bug.cgi?id=140194

Reviewed by Mark Lam.

* asan/asan.xcconfig: No need to disable FastMalloc; bmalloc supports
ASan automatically (by forwarding to system malloc at runtime).

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

5 years ago[Cocoa] Remove deprecated WKRenderingProgressEvents
mitz@apple.com [Sat, 10 Jan 2015 00:20:25 +0000 (00:20 +0000)]
[Cocoa] Remove deprecated WKRenderingProgressEvents
https://bugs.webkit.org/show_bug.cgi?id=140325

Reviewed by Anders Carlsson.

* Shared/API/Cocoa/WKRenderingProgressEvents.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:

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

5 years agoMove the Windows only plug-in code to WebKit/win
andersca@apple.com [Sat, 10 Jan 2015 00:16:52 +0000 (00:16 +0000)]
Move the Windows only plug-in code to WebKit/win
https://bugs.webkit.org/show_bug.cgi?id=140133

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

Source/WebKit/win:

* Plugins/PaintHooks.asm: Renamed from Source/WebCore/plugins/win/PaintHooks.asm.
* Plugins/PluginDatabase.cpp: Renamed from Source/WebCore/plugins/PluginDatabase.cpp.
(WebCore::persistentPluginMetadataCachePath):
(WebCore::PluginDatabase::PluginDatabase):
(WebCore::PluginDatabase::installedPlugins):
(WebCore::PluginDatabase::isMIMETypeRegistered):
(WebCore::PluginDatabase::addExtraPluginDirectory):
(WebCore::PluginDatabase::refresh):
(WebCore::PluginDatabase::plugins):
(WebCore::PluginDatabase::preferredPluginCompare):
(WebCore::PluginDatabase::pluginForMIMEType):
(WebCore::PluginDatabase::MIMETypeForExtension):
(WebCore::PluginDatabase::findPlugin):
(WebCore::PluginDatabase::setPreferredPluginForMIMEType):
(WebCore::PluginDatabase::fileExistsAndIsNotDisabled):
(WebCore::PluginDatabase::getDeletedPlugins):
(WebCore::PluginDatabase::add):
(WebCore::PluginDatabase::remove):
(WebCore::PluginDatabase::clear):
(WebCore::PluginDatabase::removeDisabledPluginFile):
(WebCore::PluginDatabase::addDisabledPluginFile):
(WebCore::PluginDatabase::defaultPluginDirectories):
(WebCore::PluginDatabase::isPreferredPluginDirectory):
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::fillBufferWithContentsOfFile):
(WebCore::readUTF8String):
(WebCore::readTime):
(WebCore::PluginDatabase::loadPersistentMetadataCache):
(WebCore::writeUTF8String):
(WebCore::writeTime):
(WebCore::PluginDatabase::updatePersistentMetadataCache):
(WebCore::PluginDatabase::isPersistentMetadataCacheEnabled):
(WebCore::PluginDatabase::setPersistentMetadataCacheEnabled):
(WebCore::PluginDatabase::persistentMetadataCachePath):
(WebCore::PluginDatabase::setPersistentMetadataCachePath):
* Plugins/PluginDatabase.h: Renamed from Source/WebCore/plugins/PluginDatabase.h.
(WebCore::PluginDatabase::setPluginDirectories):
(WebCore::PluginDatabase::pluginDirectories):
* Plugins/PluginDatabaseWin.cpp: Renamed from Source/WebCore/plugins/win/PluginDatabaseWin.cpp.
(WebCore::addPluginPathsFromRegistry):
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::parseVersionString):
(WebCore::compareVersions):
(WebCore::addMozillaPluginDirectories):
(WebCore::addWindowsMediaPlayerPluginDirectory):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
(WebCore::safariPluginsDirectory):
(WebCore::addMacromediaPluginDirectories):
(WebCore::PluginDatabase::defaultPluginDirectories):
(WebCore::PluginDatabase::isPreferredPluginDirectory):
* Plugins/PluginDebug.cpp: Renamed from Source/WebCore/plugins/PluginDebug.cpp.
(WebCore::prettyNameForNPError):
(WebCore::prettyNameForDrawingModel):
(WebCore::prettyNameForEventModel):
(WebCore::prettyNameForNPNVariable):
(WebCore::prettyNameForNPPVariable):
(WebCore::prettyNameForNPNURLVariable):
* Plugins/PluginDebug.h: Renamed from Source/WebCore/plugins/PluginDebug.h.
* Plugins/PluginMessageThrottlerWin.cpp: Renamed from Source/WebCore/plugins/win/PluginMessageThrottlerWin.cpp.
(WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
(WebCore::PluginMessageThrottlerWin::~PluginMessageThrottlerWin):
(WebCore::PluginMessageThrottlerWin::appendMessage):
(WebCore::PluginMessageThrottlerWin::processQueuedMessage):
(WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
(WebCore::PluginMessageThrottlerWin::allocateMessage):
(WebCore::PluginMessageThrottlerWin::isInlineMessage):
(WebCore::PluginMessageThrottlerWin::freeMessage):
* Plugins/PluginMessageThrottlerWin.h: Renamed from Source/WebCore/plugins/win/PluginMessageThrottlerWin.h.
* Plugins/PluginPackage.cpp: Renamed from Source/WebCore/plugins/PluginPackage.cpp.
(WebCore::PluginPackage::~PluginPackage):
(WebCore::PluginPackage::freeLibrarySoon):
(WebCore::PluginPackage::freeLibraryTimerFired):
(WebCore::PluginPackage::compare):
(WebCore::PluginPackage::PluginPackage):
(WebCore::PluginPackage::unload):
(WebCore::PluginPackage::unloadWithoutShutdown):
(WebCore::PluginPackage::setEnabled):
(WebCore::PluginPackage::createPackage):
(WebCore::PluginPackage::createPackageFromCache):
(WebCore::PluginPackage::determineQuirks):
(WebCore::PluginPackage::determineModuleVersionFromDescription):
(WebCore::getListFromVariantArgs):
(WebCore::makeSource):
(WebCore::NPN_Evaluate):
(WebCore::NPN_Invoke):
(WebCore::PluginPackage::initializeBrowserFuncs):
(WebCore::PluginPackage::hash):
(WebCore::PluginPackage::equal):
(WebCore::PluginPackage::compareFileVersion):
(WebCore::PluginPackage::ensurePluginLoaded):
* Plugins/PluginPackage.h: Renamed from Source/WebCore/plugins/PluginPackage.h.
(WebCore::PluginPackage::name):
(WebCore::PluginPackage::description):
(WebCore::PluginPackage::path):
(WebCore::PluginPackage::fileName):
(WebCore::PluginPackage::parentDirectory):
(WebCore::PluginPackage::module):
(WebCore::PluginPackage::lastModified):
(WebCore::PluginPackage::mimeToDescriptions):
(WebCore::PluginPackage::mimeToExtensions):
(WebCore::PluginPackage::isEnabled):
(WebCore::PluginPackage::pluginFuncs):
(WebCore::PluginPackage::quirks):
(WebCore::PluginPackage::version):
(WebCore::PluginPackage::fullMIMEDescription):
(WebCore::PluginPackageHash::hash):
(WebCore::PluginPackageHash::equal):
* Plugins/PluginPackageWin.cpp: Renamed from Source/WebCore/plugins/win/PluginPackageWin.cpp.
(WebCore::getVersionInfo):
(WebCore::PluginPackage::isPluginBlacklisted):
(WebCore::PluginPackage::determineQuirks):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
(WebCore::PluginPackage::hash):
(WebCore::PluginPackage::equal):
(WebCore::PluginPackage::NPVersion):
* Plugins/PluginQuirkSet.h: Renamed from Source/WebCore/plugins/PluginQuirkSet.h.
(WebCore::PluginQuirkSet::PluginQuirkSet):
(WebCore::PluginQuirkSet::add):
(WebCore::PluginQuirkSet::contains):
* Plugins/PluginStream.cpp: Renamed from Source/WebCore/plugins/PluginStream.cpp.
(WebCore::streams):
(WebCore::PluginStream::PluginStream):
(WebCore::PluginStream::~PluginStream):
(WebCore::PluginStream::start):
(WebCore::PluginStream::stop):
(WebCore::lastModifiedDate):
(WebCore::PluginStream::startStream):
(WebCore::PluginStream::ownerForStream):
(WebCore::PluginStream::cancelAndDestroyStream):
(WebCore::PluginStream::destroyStream):
(WebCore::PluginStream::delayDeliveryTimerFired):
(WebCore::PluginStream::deliverData):
(WebCore::PluginStream::sendJavaScriptStream):
(WebCore::PluginStream::didReceiveResponse):
(WebCore::PluginStream::didReceiveData):
(WebCore::PluginStream::didFail):
(WebCore::PluginStream::didFinishLoading):
(WebCore::PluginStream::wantsAllStreams):
* Plugins/PluginStream.h: Renamed from Source/WebCore/plugins/PluginStream.h.
(WebCore::PluginStreamClient::~PluginStreamClient):
(WebCore::PluginStreamClient::streamDidFinishLoading):
(WebCore::PluginStream::create):
(WebCore::PluginStream::setLoadManually):
* Plugins/PluginView.cpp: Renamed from Source/WebCore/plugins/PluginView.cpp.
(WebCore::instanceMap):
(WebCore::scriptStringIfJavaScriptURL):
(WebCore::PluginView::popPopupsStateTimerFired):
(WebCore::PluginView::windowClipRect):
(WebCore::PluginView::setFrameRect):
(WebCore::PluginView::frameRectsChanged):
(WebCore::PluginView::clipRectChanged):
(WebCore::PluginView::handleEvent):
(WebCore::PluginView::init):
(WebCore::PluginView::startOrAddToUnstartedList):
(WebCore::PluginView::start):
(WebCore::PluginView::mediaCanStart):
(WebCore::PluginView::~PluginView):
(WebCore::PluginView::stop):
(WebCore::PluginView::setCurrentPluginView):
(WebCore::PluginView::currentPluginView):
(WebCore::createUTF8String):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::scheduleRequest):
(WebCore::PluginView::load):
(WebCore::makeURL):
(WebCore::PluginView::getURLNotify):
(WebCore::PluginView::getURL):
(WebCore::PluginView::postURLNotify):
(WebCore::PluginView::postURL):
(WebCore::PluginView::newStream):
(WebCore::PluginView::write):
(WebCore::PluginView::destroyStream):
(WebCore::PluginView::status):
(WebCore::PluginView::setValue):
(WebCore::PluginView::invalidateTimerFired):
(WebCore::PluginView::pushPopupsEnabledState):
(WebCore::PluginView::popPopupsEnabledState):
(WebCore::PluginView::arePopupsAllowed):
(WebCore::PluginView::setJavaScriptPaused):
(WebCore::PluginView::npObject):
(WebCore::PluginView::bindingInstance):
(WebCore::PluginView::disconnectStream):
(WebCore::PluginView::setParameters):
(WebCore::PluginView::PluginView):
(WebCore::PluginView::focusPluginElement):
(WebCore::PluginView::didReceiveResponse):
(WebCore::PluginView::didReceiveData):
(WebCore::PluginView::didFinishLoading):
(WebCore::PluginView::didFail):
(WebCore::PluginView::setCallingPlugin):
(WebCore::PluginView::isCallingPlugin):
(WebCore::PluginView::create):
(WebCore::PluginView::freeStringArray):
(WebCore::startsWithBlankLine):
(WebCore::locationAfterFirstBlankLine):
(WebCore::findEOL):
(WebCore::capitalizeRFC822HeaderFieldName):
(WebCore::parseRFC822HeaderFields):
(WebCore::PluginView::handlePost):
(WebCore::PluginView::invalidateWindowlessPluginRect):
(WebCore::PluginView::paintMissingPluginIcon):
(WebCore::PluginView::userAgent):
(WebCore::PluginView::userAgentStatic):
(WebCore::PluginView::lifeSupportTimerFired):
(WebCore::PluginView::keepAlive):
(WebCore::PluginView::getValueStatic):
(WebCore::PluginView::getValue):
(WebCore::getFrame):
(WebCore::PluginView::getValueForURL):
(WebCore::PluginView::setValueForURL):
(WebCore::PluginView::getAuthenticationInfo):
(WebCore::PluginView::privateBrowsingStateChanged):
* Plugins/PluginView.h: Renamed from Source/WebCore/plugins/PluginView.h.
(WebCore::PluginRequest::PluginRequest):
(WebCore::PluginRequest::frameLoadRequest):
(WebCore::PluginRequest::notifyData):
(WebCore::PluginRequest::sendNotification):
(WebCore::PluginRequest::shouldAllowPopups):
(WebCore::PluginManualLoader::~PluginManualLoader):
(WebCore::PluginView::plugin):
(WebCore::PluginView::instance):
(WebCore::PluginView::status):
(WebCore::PluginView::streamDidFinishLoading):
(WebCore::PluginView::parentFrame):
(WebCore::PluginView::pluginsPage):
(WebCore::PluginView::mimeType):
(WebCore::PluginView::url):
(WebCore::PluginView::pluginWndProc):
(WebCore::PluginView::platformPluginWidget):
(WebCore::PluginView::setPlatformPluginWidget):
(WebCore::toPluginView):
* Plugins/PluginViewWin.cpp: Renamed from Source/WebCore/plugins/win/PluginViewWin.cpp.
(windowHandleForPageClient):
(WebCore::PluginView::hookedBeginPaint):
(WebCore::PluginView::hookedEndPaint):
(WebCore::hook):
(WebCore::setUpOffscreenPaintingHooks):
(WebCore::registerPluginView):
(WebCore::PluginView::PluginViewWndProc):
(WebCore::isWindowsMessageUserGesture):
(WebCore::contentsToNativeWindow):
(WebCore::PluginView::wndProc):
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::setFocus):
(WebCore::PluginView::show):
(WebCore::PluginView::hide):
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::paintIntoTransformedContext):
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setParent):
(WebCore::PluginView::setParentVisible):
(WebCore::PluginView::setNPWindowRect):
(WebCore::PluginView::handlePostReadFile):
(WebCore::PluginView::platformGetValueStatic):
(WebCore::PluginView::platformGetValue):
(WebCore::PluginView::invalidateRect):
(WebCore::PluginView::invalidateRegion):
(WebCore::PluginView::forceRedraw):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::platformDestroy):
(WebCore::PluginView::snapshot):
* Plugins/npapi.cpp: Renamed from Source/WebCore/plugins/npapi.cpp.
(pluginViewForInstance):
(NPN_MemAlloc):
(NPN_MemFree):
(NPN_MemFlush):
(NPN_ReloadPlugins):
(NPN_RequestRead):
(NPN_GetURLNotify):
(NPN_GetURL):
(NPN_PostURLNotify):
(NPN_PostURL):
(NPN_NewStream):
(NPN_Write):
(NPN_DestroyStream):
(NPN_UserAgent):
(NPN_Status):
(NPN_InvalidateRect):
(NPN_InvalidateRegion):
(NPN_ForceRedraw):
(NPN_GetValue):
(NPN_SetValue):
(NPN_GetJavaEnv):
(NPN_GetJavaPeer):
(NPN_PushPopupsEnabledState):
(NPN_PopPopupsEnabledState):
(NPN_PluginThreadAsyncCall):
(NPN_GetValueForURL):
(NPN_SetValueForURL):
(NPN_GetAuthenticationInfo):
(NPN_PopUpContextMenu):

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

5 years agoMove Navigation creation out of the Cocoa layer and down into the WebPageProxy level
weinig@apple.com [Sat, 10 Jan 2015 00:00:08 +0000 (00:00 +0000)]
Move Navigation creation out of the Cocoa layer and down into the WebPageProxy level
https://bugs.webkit.org/show_bug.cgi?id=140319

Reviewed by Anders Carlsson.

- Adds WebNavigationState, a class at the WebPageProxy level to handle the creation
  and storage of Navigations. Starts moving some of the functionality from NavigationState
  there.

* UIProcess/API/APINavigation.cpp:
(API::Navigation::Navigation):
* UIProcess/API/APINavigation.h:
(API::Navigation::create):
(API::Navigation::navigationID):
Have each Navigation store its navigationID and generate it via the WebNavigationState
that is passed to the constructor.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
Update for WebPageProxy functions returning the Navigations directly, rather than
the navigationID.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Remove creation of the load request navigation which is now handled by the WebPageProxy.

(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
(WebKit::NavigationState::LoaderClient::didDestroyNavigation):
(WebKit::NavigationState::LoaderClient::processDidCrash):
Change to get/take/remove Navigations from the WebPageProxy's WebNavigationState

(WebKit::NavigationState::createLoadRequestNavigation): Deleted.
(WebKit::NavigationState::createBackForwardNavigation): Deleted.
(WebKit::NavigationState::createReloadNavigation): Deleted.
(WebKit::NavigationState::createLoadDataNavigation): Deleted.
Move Navigation creation to WebNavigationState.

* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
(WebKit::WebFrameListenerProxy::receivedPolicyDecision):
* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::navigation):
(WebKit::WebFrameListenerProxy::setNavigation):
(WebKit::WebFrameListenerProxy::navigationID): Deleted.
(WebKit::WebFrameListenerProxy::setNavigationID): Deleted.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision):
* UIProcess/WebFrameProxy.h:
Store a Navigation rather than a navigationID on the WebFrameListenerProxy.

* UIProcess/WebNavigationState.cpp: Added.
(WebKit::WebNavigationState::WebNavigationState):
(WebKit::WebNavigationState::~WebNavigationState):
(WebKit::WebNavigationState::createLoadRequestNavigation):
(WebKit::WebNavigationState::createBackForwardNavigation):
(WebKit::WebNavigationState::createReloadNavigation):
(WebKit::WebNavigationState::createLoadDataNavigation):
(WebKit::WebNavigationState::navigation):
(WebKit::WebNavigationState::takeNavigation):
(WebKit::WebNavigationState::didDestroyNavigation):
(WebKit::WebNavigationState::clearAllNavigations):
* UIProcess/WebNavigationState.h: Added.
(WebKit::WebNavigationState::generateNavigationID):
New class to manage navigations.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::generateNavigationID): Deleted.
Create navigations directly rather than generating a navigation ID and letting
the API level create Navigation.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::navigationState):
Add WebNavigationState member and accessor.

* WebKit2.xcodeproj/project.pbxproj:
Add WebNavigationState.h/cpp

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

5 years agoAnother Windows build fix.
andersca@apple.com [Fri, 9 Jan 2015 23:57:13 +0000 (23:57 +0000)]
Another Windows build fix.

* DerivedSources.cpp:

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

5 years agoplugins/crash-restoring-plugin-page-from-page-cache.html and plugins/netscape-plugin...
cdumez@apple.com [Fri, 9 Jan 2015 23:41:07 +0000 (23:41 +0000)]
plugins/crash-restoring-plugin-page-from-page-cache.html and plugins/netscape-plugin-page-cache-works.html timing out on Intel Debug WebKit2 testers
https://bugs.webkit.org/show_bug.cgi?id=81392

Reviewed by Alexey Proskuryakov.

Unskip those 2 plugins / page cache tests as they seem to be passing on
WK2 nowadays.

* platform/wk2/TestExpectations:

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

5 years ago[iOS] Make DumpRenderTree build with public SDK
dbates@webkit.org [Fri, 9 Jan 2015 23:40:25 +0000 (23:40 +0000)]
[iOS] Make DumpRenderTree build with public SDK
https://bugs.webkit.org/show_bug.cgi?id=140311

Reviewed by Sam Weinig.

Source/WebKit2:

Add more SPI declarations.

* Platform/spi/ios/UIKitSPI.h:

Tools:

Use CGRound() instead of the obsolete macro function _ROUNDF_ (defined in
header UIKit/UIMath.h), and std::max() instead of the macro function MAX.
Additionally, remove unused header CoreGraphics/CGFontDB.h.

* DumpRenderTree/mac/DumpRenderTree.mm:
(-[ScrollViewResizerDelegate view:didSetFrame:oldFrame:asResultOfZoom:]):

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

5 years ago[iOS] Support additional text styles.
enrica@apple.com [Fri, 9 Jan 2015 23:36:04 +0000 (23:36 +0000)]
[iOS] Support additional text styles.
https://bugs.webkit.org/show_bug.cgi?id=140310
rdar://problem/18568864

Reviewed by Joseph Pecoraro.

Source/WebCore:

Add support for three new text styles.

* css/CSSValueKeywords.in:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):

Source/WebInspectorUI:

Add support for three new text styles.

* UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Updates the existing test to include the new text styles.

* platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt:
* platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html:

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

5 years agoFix Windows build.
andersca@apple.com [Fri, 9 Jan 2015 23:35:16 +0000 (23:35 +0000)]
Fix Windows build.

* bindings/js/JSBindingsAllInOne.cpp:

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

5 years agoRemove more worker database code
andersca@apple.com [Fri, 9 Jan 2015 23:28:28 +0000 (23:28 +0000)]
Remove more worker database code
https://bugs.webkit.org/show_bug.cgi?id=140320

Reviewed by Tim Horton.

* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):

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

5 years agoAfter updating tests to use kerning, ligatures, and printer fonts, some tests fail
eric.carlson@apple.com [Fri, 9 Jan 2015 23:16:46 +0000 (23:16 +0000)]
After updating tests to use kerning, ligatures, and printer fonts, some tests fail
https://bugs.webkit.org/show_bug.cgi?id=139968

* platform/mac/TestExpectations: Add more flaky tests.

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

5 years agoRemove more sync database code
andersca@apple.com [Fri, 9 Jan 2015 23:15:35 +0000 (23:15 +0000)]
Remove more sync database code
https://bugs.webkit.org/show_bug.cgi?id=140318

Reviewed by Sam Weinig.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webdatabase/DatabaseBackendSync.cpp: Removed.
* Modules/webdatabase/DatabaseBackendSync.h: Removed.
* Modules/webdatabase/DatabaseCallback.h:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabaseSync): Deleted.
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::createDatabase):
* Modules/webdatabase/DatabaseSync.cpp: Removed.
* Modules/webdatabase/DatabaseSync.h: Removed.
* Modules/webdatabase/DatabaseSync.idl: Removed.
* Modules/webdatabase/SQLStatementSync.cpp: Removed.
* Modules/webdatabase/SQLStatementSync.h: Removed.
* Modules/webdatabase/SQLTransactionBackendSync.cpp: Removed.
* Modules/webdatabase/SQLTransactionBackendSync.h: Removed.
* Modules/webdatabase/SQLTransactionSync.cpp: Removed.
* Modules/webdatabase/SQLTransactionSync.h: Removed.
* Modules/webdatabase/SQLTransactionSync.idl: Removed.
* Modules/webdatabase/SQLTransactionSyncCallback.h: Removed.
* Modules/webdatabase/SQLTransactionSyncCallback.idl: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSQLTransactionSyncCustom.cpp: Removed.

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

5 years agoCache-control should be set only on api/runs
rniwa@webkit.org [Fri, 9 Jan 2015 22:39:33 +0000 (22:39 +0000)]
Cache-control should be set only on api/runs
https://bugs.webkit.org/show_bug.cgi?id=140312

Reviewed by Andreas Kling.

Some JSON APIs such as api/analysis-tasks can't be cached even for a short period of time (e.g. a few minutes)
since they can be modified by the user on demand. Since only api/runs.php takes a long time to generate JSONs,
just set cache-control there instead of json-header.php which is used by other JSON APIs.

Also set date_default_timezone_set in db.php since we never use non-UTC timezone in our scripts.

* public/api/analysis-tasks.php:
* public/api/runs.php: Set the cache control headers.
* public/api/test-groups.php:
* public/include/db.php: Set the default timezone to UTC.
* public/include/json-header.php: Don't set the cache control headers.

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

5 years agoWeb Inspector: Remove or use TimelineAgent Resource related event types
commit-queue@webkit.org [Fri, 9 Jan 2015 22:26:25 +0000 (22:26 +0000)]
Web Inspector: Remove or use TimelineAgent Resource related event types
https://bugs.webkit.org/show_bug.cgi?id=140155

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-09
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Remove unused / stale Timeline event types.

* inspector/protocol/Timeline.json:

Source/WebCore:

Remove unused timeline events. The frontend was ignoring these events
and was often already getting nearly identical data from the Network domain.

* WebCore.exp.in:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendRequestImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
(WebCore::InspectorInstrumentation::didFailLoadingImpl):
(WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl): Deleted.
(WebCore::InspectorInstrumentation::willReceiveResourceDataImpl): Deleted.
(WebCore::InspectorInstrumentation::didReceiveResourceDataImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didScheduleResourceRequest): Deleted.
(WebCore::InspectorInstrumentation::willReceiveResourceData): Deleted.
(WebCore::InspectorInstrumentation::didReceiveResourceData): Deleted.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::didScheduleResourceRequest): Deleted.
(WebCore::InspectorTimelineAgent::willSendResourceRequest): Deleted.
(WebCore::InspectorTimelineAgent::willReceiveResourceData): Deleted.
(WebCore::InspectorTimelineAgent::didReceiveResourceData): Deleted.
(WebCore::InspectorTimelineAgent::willReceiveResourceResponse): Deleted.
(WebCore::InspectorTimelineAgent::didReceiveResourceResponse): Deleted.
(WebCore::InspectorTimelineAgent::didFinishLoadingResource): Deleted.
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createScheduleResourceRequestData): Deleted.
(WebCore::TimelineRecordFactory::createResourceSendRequestData): Deleted.
(WebCore::TimelineRecordFactory::createResourceReceiveResponseData): Deleted.
(WebCore::TimelineRecordFactory::createResourceFinishData): Deleted.
(WebCore::TimelineRecordFactory::createReceiveResourceData): Deleted.
* inspector/TimelineRecordFactory.h:
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
(WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest): Deleted.
* loader/ResourceLoadScheduler.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveData):
(WebCore::ResourceLoader::didReceiveBuffer):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray):

Source/WebKit2:

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):

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

5 years agoapi/report-commit should authenticate with a slave name and password
rniwa@webkit.org [Fri, 9 Jan 2015 22:25:31 +0000 (22:25 +0000)]
api/report-commit should authenticate with a slave name and password
https://bugs.webkit.org/show_bug.cgi?id=140308

Reviewed by Benjamin Poulain.

Use a slave name and a password to authenticate new commit reports.

* public/api/report-commits.php:
(main):
* public/include/json-header.php:
(verify_slave): Renamed and repurposed from verify_builder in report-commits.php. Now authenticates with
a slave name and a password instead of a builder name and a password.
* tests/api-report-commits.js: Updated tests.
* tools/pull-svn.py:
(main): Renamed variables.
(submit_commits): Submits slaveName and slavePassword instead of builderName and builderPassword.

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

5 years ago[iOS] Fix the WebKit2 build with the public SDK
dbates@webkit.org [Fri, 9 Jan 2015 22:24:59 +0000 (22:24 +0000)]
[iOS] Fix the WebKit2 build with the public SDK

Forward declare class WebView.

* Platform/spi/ios/UIKitSPI.h:

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

5 years agoUpdate r177745, one of the review comments was not integrated
benjamin@webkit.org [Fri, 9 Jan 2015 22:15:44 +0000 (22:15 +0000)]
Update r177745, one of the review comments was not integrated

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-01-09

* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
I cq+ before Dhi could make an update and this was left out.

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

5 years ago[iOS] Add iOS-specific tests and consolidate iOS-specific accessibility tests
dbates@webkit.org [Fri, 9 Jan 2015 22:14:09 +0000 (22:14 +0000)]
[iOS] Add iOS-specific tests and consolidate iOS-specific accessibility tests

Copied iOS-specific tests from directory LayoutTests/platform/ios-sim-deprecated/iphone
to LayoutTests/platform/ios-simulator/ios and fixed references to external JavaScript
scripts and external style sheets. Moved iOS-specific tests in directories LayoutTests/platform/ios-sim/accessibility
and LayoutTests/platform/ios-simulator/ios-accessibility into LayoutTests/platform/ios-simulator/ios/accessibility.

I will remove directory LayoutTests/platform/ios-sim-deprecated, including
LayoutTests/platform/ios-sim-deprecated/iphone, in a subsequent commit.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt.
* platform/ios-simulator/ios/accessibility/press-fires-touch-events.html: Renamed from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html.
* platform/ios-simulator/ios/accessibility/set-value-expected.txt: Copied from LayoutTests/platform/ios-sim/accessibility/set-value-expected.txt.
* platform/ios-simulator/ios/accessibility/set-value.html: Renamed from LayoutTests/platform/ios-sim/accessibility/set-value.html.
* platform/ios-simulator/ios/compositing/overlap-page-scale-expected.txt: Added.
[...]

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

5 years agoMark css3/background/background-repeat-space-content.html as ImgaeOnlyFailure
akling@apple.com [Fri, 9 Jan 2015 22:13:06 +0000 (22:13 +0000)]
Mark css3/background/background-repeat-space-content.html as ImgaeOnlyFailure

This test is failing with a subtle pixel difference, need to figure out what's
going on, but results are not visually wrong.

* TestExpectations:

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

5 years agoFix error handling of ContentExtensionsManager when the top level input is unusable
benjamin@webkit.org [Fri, 9 Jan 2015 21:57:05 +0000 (21:57 +0000)]
Fix error handling of ContentExtensionsManager when the top level input is unusable
https://bugs.webkit.org/show_bug.cgi?id=140284

Reviewed by Andreas Kling.

There are a couple of ways the WebProcess would crash if the input
is really really bad:
-If the JSON is unreadable, we can have an exception or decodedRules can be null.
-On any of the error, we cannot return immediately or we will skip vm.clear().

This patch adds a branch to fix the first issue.

For the second issue, a new function, loadEncodedRules(), encapsulate all the early
returns to make sure we execute the end of loadExtension().

* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadEncodedRules):
(WebCore::ContentExtensions::ExtensionsManager::loadExtension):

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

5 years agoSimplify LineWidth::wrapNextToShapeOutside()
bjonesbe@adobe.com [Fri, 9 Jan 2015 21:25:08 +0000 (21:25 +0000)]
Simplify LineWidth::wrapNextToShapeOutside()
https://bugs.webkit.org/show_bug.cgi?id=140304

Reviewed by Zoltan Horvath.

This function used to manually check to see if the entire height of
the line would have enough space next to the float. However, the code
to compute the offsets will do this automatically (and probably a lot
faster), if the line height is passed in. This patch does just that.

No new tests, no behavior change.

* rendering/line/LineWidth.cpp:
(WebCore::availableWidthAtOffset): Remove now unused override, allow
    passing in lineHeight.
(WebCore::LineWidth::wrapNextToShapeOutside): Pass the lineHeight
    when computing the available width, so we don't need to check
    isWholeLineFit anymore.
(WebCore::isWholeLineFit): Deleted.

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

5 years ago[CSS Shapes] content inside second shape area when two floats interact
bjonesbe@adobe.com [Fri, 9 Jan 2015 21:01:53 +0000 (21:01 +0000)]
[CSS Shapes] content inside second shape area when two floats interact
https://bugs.webkit.org/show_bug.cgi?id=137702

Reviewed by Zalan Bujtas.

Source/WebCore:

If a float has a shape-outside, we cannot assume that it has a uniform
width for the height of the float, so we cannot use simple line
layout.

Test: fast/shapes/shape-outside-floats/shape-outside-text-overlap-float.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Don't use simple line layout
    if we have shape-outside. Also, rename floatRenderer to
    floatingObject, since the variable doesn't contain a renderer.

LayoutTests:

* fast/shapes/shape-outside-floats/shape-outside-text-overlap-float-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-text-overlap-float.html: Added.

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

5 years agoAllow HTTPS + 'Cache-control: no-store' sub-frames into the page cache
cdumez@apple.com [Fri, 9 Jan 2015 20:59:05 +0000 (20:59 +0000)]
Allow HTTPS + 'Cache-control: no-store' sub-frames into the page cache
https://bugs.webkit.org/show_bug.cgi?id=140302

Reviewed by Andreas Kling.

Source/WebCore:

Allow HTTPS + 'Cache-control: no-store' sub-frames into the page cache.
We already restore 'no-store' sub-resources on history navigation from
the memory cache so there is no reason for our page cache policy to be
more restrictive.

We should align our memory cache / history navigation policy with our
page cache policy.

For now, 'no-store' main resources are not restored from either cache
(memory cache / page cache) on history navigation though. This behavior
does not change.

Test: http/tests/navigation/https-no-store-subframe-in-page-cache.html

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):

LayoutTests:

Add a layout test to make sure a page is restored from the page cache
on history navigation, even though its has an HTTPS sub-frame with
"cache-control: no-cache".

* http/tests/navigation/https-no-store-subframe-in-page-cache-expected.txt: Added.
* http/tests/navigation/https-no-store-subframe-in-page-cache.html: Added.
* http/tests/navigation/resources/https-no-store-subframe-in-page-cache.html: Added.
* http/tests/navigation/resources/no-store-frame.php: Added.

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

5 years agoTry to trigger a rebuild of generated JS bindings.
andersca@apple.com [Fri, 9 Jan 2015 20:57:36 +0000 (20:57 +0000)]
Try to trigger a rebuild of generated JS bindings.

* bindings/scripts/CodeGeneratorJS.pm:

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

5 years agoAdd support for SVG CSS Properties to the new StyleBuilder
cdumez@apple.com [Fri, 9 Jan 2015 20:32:18 +0000 (20:32 +0000)]
Add support for SVG CSS Properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140277

Reviewed by Andreas Kling.

Update the new StyleBuilder generator to add support for SVG CSS
Properties whose methods are on SVGRenderStyle instead of RenderStyle.

A new "SVG" parameter is now supported by makeprop.pl to correctly
generate such properties.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/SVGCSSPropertyNames.in: Removed.
Merged SVG CSS properties into CSSPropertyNames.in. I personally don't
think having a separate file for SVG CSS properties is really helpful.

* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
Drop legacy StyleBuilder code for several SVG properties and generate
them instead. Those are trivial and do not require any custom code or
converter.

* css/StyleResolver.cpp:
Update the id of the first low-priority property.

* css/makeprop.pl:
Add support for SVG CSS Properties whose methods are on SVGRenderStyle
instead of RenderStyle.

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

5 years agoStart removing Web Database support from workers
andersca@apple.com [Fri, 9 Jan 2015 20:30:21 +0000 (20:30 +0000)]
Start removing Web Database support from workers
https://bugs.webkit.org/show_bug.cgi?id=140271

Reviewed by Sam Weinig.

Source/WebCore:

Remove WorkerGlobalScopeWebDatabase which is the entry point for web database in workers.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Removed.
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Removed.
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Remove Web Database worker tests.

* fast/workers/storage/change-version-handle-reuse-sync-expected.txt: Removed.
* fast/workers/storage/change-version-handle-reuse-sync.html: Removed.
* fast/workers/storage/change-version-handle-reuse-worker-expected.txt: Removed.
* fast/workers/storage/change-version-handle-reuse-worker.html: Removed.
* fast/workers/storage/change-version-sync-expected.txt: Removed.
* fast/workers/storage/change-version-sync.html: Removed.
* fast/workers/storage/empty-statement-sync-expected.txt: Removed.
* fast/workers/storage/empty-statement-sync.html: Removed.
* fast/workers/storage/execute-sql-args-sync-expected.txt: Removed.
* fast/workers/storage/execute-sql-args-sync.html: Removed.
* fast/workers/storage/execute-sql-args-worker-expected.txt: Removed.
* fast/workers/storage/execute-sql-args-worker.html: Removed.
* fast/workers/storage/executesql-accepts-only-one-statement-sync-expected.txt: Removed.
* fast/workers/storage/executesql-accepts-only-one-statement-sync.html: Removed.
* fast/workers/storage/interrupt-database-expected.txt: Removed.
* fast/workers/storage/interrupt-database-sync-expected.txt: Removed.
* fast/workers/storage/interrupt-database-sync.html-disabled: Removed.
* fast/workers/storage/interrupt-database.html: Removed.
* fast/workers/storage/multiple-databases-garbage-collection-expected.txt: Removed.
* fast/workers/storage/multiple-databases-garbage-collection.html: Removed.
* fast/workers/storage/multiple-transactions-expected.txt: Removed.
* fast/workers/storage/multiple-transactions-on-different-handles-expected.txt: Removed.
* fast/workers/storage/multiple-transactions-on-different-handles-sync-expected.txt: Removed.
* fast/workers/storage/multiple-transactions-on-different-handles-sync.html: Removed.
* fast/workers/storage/multiple-transactions-on-different-handles.html: Removed.
* fast/workers/storage/multiple-transactions.html: Removed.
* fast/workers/storage/open-database-creation-callback-sync-expected.txt: Removed.
* fast/workers/storage/open-database-creation-callback-sync.html: Removed.
* fast/workers/storage/open-database-empty-version-sync-expected.txt: Removed.
* fast/workers/storage/open-database-empty-version-sync.html: Removed.
* fast/workers/storage/open-database-inputs-sync-expected.txt: Removed.
* fast/workers/storage/open-database-inputs-sync.html: Removed.
* fast/workers/storage/open-database-set-empty-version-sync-expected.txt: Removed.
* fast/workers/storage/open-database-set-empty-version-sync.html: Removed.
* fast/workers/storage/open-database-while-transaction-in-progress-expected.txt: Removed.
* fast/workers/storage/open-database-while-transaction-in-progress-sync-expected.txt: Removed.
* fast/workers/storage/open-database-while-transaction-in-progress-sync.html: Removed.
* fast/workers/storage/open-database-while-transaction-in-progress.html: Removed.
* fast/workers/storage/read-and-write-transactions-dont-run-together-expected.txt: Removed.
* fast/workers/storage/read-and-write-transactions-dont-run-together.html: Removed.
* fast/workers/storage/resources/change-version-handle-reuse-sync.js: Removed.
* fast/workers/storage/resources/change-version-sync-1.js: Removed.
* fast/workers/storage/resources/change-version-sync-2.js: Removed.
* fast/workers/storage/resources/database-worker-controller.js: Removed.
* fast/workers/storage/resources/database-worker.js: Removed.
* fast/workers/storage/resources/empty-statement-sync.js: Removed.
* fast/workers/storage/resources/execute-sql-args-sync.js: Removed.
* fast/workers/storage/resources/executesql-accepts-only-one-statement-sync.js: Removed.
* fast/workers/storage/resources/interrupt-database-sync.js: Removed.
* fast/workers/storage/resources/interrupt-database.js: Removed.
* fast/workers/storage/resources/multiple-transactions-on-different-handles-sync.js: Removed.
* fast/workers/storage/resources/multiple-transactions-sync.js: Removed.
* fast/workers/storage/resources/open-database-creation-callback-sync.js: Removed.
* fast/workers/storage/resources/open-database-empty-version-sync.js: Removed.
* fast/workers/storage/resources/open-database-inputs-sync.js: Removed.
* fast/workers/storage/resources/open-database-set-empty-version-sync.js: Removed.
* fast/workers/storage/resources/open-database-while-transaction-in-progress-sync.js: Removed.
* fast/workers/storage/resources/sql-data-types-sync.js: Removed.
* fast/workers/storage/resources/sql-exception-codes-sync.js: Removed.
* fast/workers/storage/resources/test-authorizer-sync.js: Removed.
* fast/workers/storage/resources/test-inputs-common.js: Removed.
* fast/workers/storage/resources/transaction-in-transaction-sync.js: Removed.
* fast/workers/storage/resources/use-same-database-in-page-and-workers.js: Removed.
* fast/workers/storage/sql-data-types-sync-expected.txt: Removed.
* fast/workers/storage/sql-data-types-sync.html: Removed.
* fast/workers/storage/sql-exception-codes-sync-expected.txt: Removed.
* fast/workers/storage/sql-exception-codes-sync.html: Removed.
* fast/workers/storage/test-authorizer-expected.txt: Removed.
* fast/workers/storage/test-authorizer-sync-expected.txt: Removed.
* fast/workers/storage/test-authorizer-sync.html: Removed.
* fast/workers/storage/test-authorizer.html: Removed.
* fast/workers/storage/transaction-in-transaction-sync-expected.txt: Removed.
* fast/workers/storage/transaction-in-transaction-sync.html: Removed.
* fast/workers/storage/use-same-database-in-page-and-workers-expected.txt: Removed.
* fast/workers/storage/use-same-database-in-page-and-workers.html: Removed.
* http/tests/security/cross-origin-worker-websql-allowed-expected.txt: Removed.
* http/tests/security/cross-origin-worker-websql-allowed.html: Removed.
* http/tests/security/cross-origin-worker-websql-expected.txt: Removed.
* http/tests/security/cross-origin-worker-websql.html: Removed.

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

5 years ago[Win] Unreviewed test gardening.
bfulgham@apple.com [Fri, 9 Jan 2015 20:19:41 +0000 (20:19 +0000)]
[Win] Unreviewed test gardening.

* platform/win/TestExpectations: Unskip fast/canvas/canvas-path-addPath.html now
that it doesn't crash anymore.

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

5 years ago[Win] Layout Test fast/canvas/canvas-path-addPath.html is failing
bfulgham@apple.com [Fri, 9 Jan 2015 20:17:41 +0000 (20:17 +0000)]
[Win] Layout Test fast/canvas/canvas-path-addPath.html is failing
https://bugs.webkit.org/show_bug.cgi?id=140303
<rdar://problem/19428865>

Reviewed by Simon Fraser.

Although the code clearly states that CG doesn't allow adding a path to itself,
and branches to handle this case, it simply uses the branch to try adding the
path to itself (ignoring the copy it just made)!

Fix this copy/paste bug so that we use the copy and avoid violating the CG
API contract.

* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::addPath): Fix path used.

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

5 years agoMake WKNavigation bridged to API::Navigation (Take 2)
weinig@apple.com [Fri, 9 Jan 2015 20:10:31 +0000 (20:10 +0000)]
Make WKNavigation bridged to API::Navigation (Take 2)
https://bugs.webkit.org/show_bug.cgi?id=140272

Reviewed by Dan Bernstein.

* Shared/API/APIObject.h:
Add Navigation.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Bridge to WKNavigation.

* UIProcess/API/APINavigation.cpp: Added.
(API::Navigation::Navigation):
(API::Navigation::~Navigation):
* UIProcess/API/APINavigation.h: Added.
(API::Navigation::create):
(API::Navigation::request):
Add initial implementation.

* UIProcess/API/Cocoa/WKNavigation.mm:
(-[WKNavigation dealloc]):
(-[WKNavigation _request]):
(-[WKNavigation _apiObject]):
* UIProcess/API/Cocoa/WKNavigationInternal.h:
(API::wrapper):
Implement bridging to API::Navigation and get the request from the underlying object.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _restoreSessionState:andNavigate:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation):
(WebKit::NavigationState::createBackForwardNavigation):
(WebKit::NavigationState::createReloadNavigation):
(WebKit::NavigationState::createLoadDataNavigation):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame):
Switch to storing API::Navigations.

* WebKit2.xcodeproj/project.pbxproj:
Add the new files.

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

5 years agoWeb Inspector: REGRESSION: Navigation sidebar can show blank next to the Console...
timothy@apple.com [Fri, 9 Jan 2015 20:08:48 +0000 (20:08 +0000)]
Web Inspector: REGRESSION: Navigation sidebar can show blank next to the Console view
https://bugs.webkit.org/show_bug.cgi?id=140291

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Don't restore collapsed false if selectedSidebarPanel is null.
(WebInspector._sidebarCollapsedStateDidChange): Support a _ignoreNavigationSidebarPanelCollapsedEvent flag
to avoid setting _navigationSidebarCollapsedSetting.
(WebInspector._navigationSidebarPanelSelected): Force collapsed if selectedSidebarPanel is null.
(WebInspector._contentBrowserCurrentContentViewDidChange): Set _ignoreNavigationSidebarPanelCollapsedEvent
when forcing the collapsed state to avoid setting _navigationSidebarCollapsedSetting and calling
_updateContentViewForCurrentNavigationSidebar.

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

5 years ago[Cocoa] Make decoded image data purgeable ASAP.
akling@apple.com [Fri, 9 Jan 2015 20:07:17 +0000 (20:07 +0000)]
[Cocoa] Make decoded image data purgeable ASAP.
<https://webkit.org/b/140298>

Reviewed by Antti Koivisto.

Mark decoded images as "transient" which makes CoreGraphics mark
the backing stores as purgeable shortly after they're used.

The decoded representation will remain in CoreGraphics's caches
indefinitely unless the kernel gets starved and needs the pages.

Most resources will now reach a state where the encoded data is
mmap'ed from disk cache (once the entire resource is downloaded)
and the decoded data is purgeable.

This also has the side effect of making the MemoryCache more
palatial since the decoded data cost can be deducted for images,
allowing us to cache more resources.

Note that the worst case for this new behavior would be something
like hovering below 100% memory utilization and constantly having
to drop and re-decode images. While churny, it still beats
crashing the process, plus there's tiling to remove many of the
reasons we'd need the decoded data.

* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::createFrameAtIndex):

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

5 years agoRename GraphicsLayerAnimation to TextureMapperAnimation
yoon@igalia.com [Fri, 9 Jan 2015 19:55:56 +0000 (19:55 +0000)]
Rename GraphicsLayerAnimation to TextureMapperAnimation
https://bugs.webkit.org/show_bug.cgi?id=140296

Reviewed by Martin Robinson.

Source/WebCore:

GraphicsLayerAnimation is only used by TextureMapper and CoordinatedGraphics.
This should be placed in the platform/graphics/texmap.
And this patch also changes its name to TextureMapperAnimation to remove ambiguity.

No new tests because this is a simply refactoring.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):
(WebCore::GraphicsLayerTextureMapper::setAnimations):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperAnimation.cpp: Renamed from Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp.
* platform/graphics/texmap/TextureMapperAnimation.h: Renamed from Source/WebCore/platform/graphics/GraphicsLayerAnimation.h.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setAnimations):
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

Source/WebKit2:

GraphicsLayerAnimation is changed to TextureMapperAnimation
* Scripts/webkit/messages.py:
(headers_for_type):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TextureMapperAnimation>::encode):
(IPC::ArgumentCoder<TextureMapperAnimation>::decode):
(IPC::ArgumentCoder<TextureMapperAnimations>::encode):
(IPC::ArgumentCoder<TextureMapperAnimations>::decode):
(IPC::ArgumentCoder<GraphicsLayerAnimation>::encode): Deleted.
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Deleted.
(IPC::ArgumentCoder<GraphicsLayerAnimations>::encode): Deleted.
(IPC::ArgumentCoder<GraphicsLayerAnimations>::decode): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:

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

5 years ago[Win] Temporarily disable all media tests.
bfulgham@apple.com [Fri, 9 Jan 2015 19:41:13 +0000 (19:41 +0000)]
[Win] Temporarily disable all media tests.

* platform/win/TestExpectations:

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

5 years agoFontCache should only deal with SimpleFontData
antti@apple.com [Fri, 9 Jan 2015 19:33:40 +0000 (19:33 +0000)]
FontCache should only deal with SimpleFontData
https://bugs.webkit.org/show_bug.cgi?id=140293

Reviewed by Andreas Kling.

FontCache::fontForFamilyAtIndex hands out FontData objects and calls to FontSelector. That sort
of code does not belong to the cache layer. Move the functionality up to FontGlyphs.

* platform/graphics/Font.cpp:
(WebCore::Font::operator==):
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::isLoadingCustomFonts):
* platform/graphics/Font.h:
(WebCore::Font::loadingCustomFonts): Deleted.
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::similarFontPlatformData):

    Generic null implementation to reduce #ifs.

(WebCore::FontCache::fontForFamilyAtIndex): Deleted.
* platform/graphics/FontCache.h:

    Unfriend FontGlyphs.

* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::isLoadingCustomFonts):

    We can figure thus out cheaply without caching a bit.

(WebCore::realizeNextFamily):
(WebCore::FontGlyphs::realizeFontDataAt):

    Reorganize a bit to make the logic clearer.
    Get rid of the strange cAllFamiliesScanned constant.

(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):

    Loop until null, that always works.

* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::loadingCustomFonts): Deleted.
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::similarFontPlatformData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::similarFontPlatformData):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::dashesForIntersectionsWithRect):

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

5 years agoplatform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration...
ap@apple.com [Fri, 9 Jan 2015 19:29:40 +0000 (19:29 +0000)]
platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html fails on Retina machines
https://bugs.webkit.org/show_bug.cgi?id=140300

Reviewed by Simon Fraser.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::updateWindowScaleForTest):
(WTR::TestController::configureViewForTest):
* WebKitTestRunner/TestController.h:

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

5 years agoUpdate expectations for fast/text/atsui-rtl-override-selection.html, which also
ap@apple.com [Fri, 9 Jan 2015 19:29:10 +0000 (19:29 +0000)]
Update expectations for fast/text/atsui-rtl-override-selection.html, which also
fails on Mountain Lion after enabling kerning and ligatures.

* platform/mac/TestExpectations:

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

5 years agoREGRESSION(r177925): It broke the !ENABLE(INSPECTOR) build
ossy@webkit.org [Fri, 9 Jan 2015 19:27:50 +0000 (19:27 +0000)]
REGRESSION(r177925): It broke the !ENABLE(INSPECTOR) build
https://bugs.webkit.org/show_bug.cgi?id=140098

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/InspectorBackendDispatcher.h: Missing ENABLE(INSPECTOR) guard added.

Source/WebCore:

* inspector/InspectorInstrumentationCookie.cpp: Removed ENABLE(INSPECTOR) guard,
becaue InspectorInstrumentationCookie is used everywhere unconditionally.
* inspector/InspectorInstrumentationCookie.h: Removed ENABLE(INSPECTOR) guard.
* loader/appcache/ApplicationCacheGroup.h: Removed ENABLE(INSPECTOR) guard around
m_currentResourceIdentifier, because it is used unconditionally in the cpp.

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

5 years ago[EFL] Fix crash introduced in r178029
commit-queue@webkit.org [Fri, 9 Jan 2015 18:58:29 +0000 (18:58 +0000)]
[EFL] Fix crash introduced in r178029
https://bugs.webkit.org/show_bug.cgi?id=140289

Patch by Byungseon Shin <sun.shin@lge.com> on 2015-01-09
Reviewed by Martin Robinson.

Clearing childClippingMaskLayer of CoordinatedGraphics should be called
before clearing childClippingLayer.

No new tests, covered by existing tests.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):

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