WebKit-https.git
6 years ago[GTK] [CMake] build-webkit-options.txt is not generated during a fresh build
berto@igalia.com [Tue, 18 Mar 2014 13:44:28 +0000 (13:44 +0000)]
[GTK] [CMake] build-webkit-options.txt is not generated during a fresh build
https://bugs.webkit.org/show_bug.cgi?id=130388

Reviewed by Sergio Villar Senin.

* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache): make sure that the build directory
exists before attempting to create a file in it.

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

6 years ago[EFL] fontconfig-2.8.0 is not compliant with C++11 leading to a build break
commit-queue@webkit.org [Tue, 18 Mar 2014 12:51:19 +0000 (12:51 +0000)]
[EFL] fontconfig-2.8.0 is not compliant with C++11 leading to a build break
https://bugs.webkit.org/show_bug.cgi?id=130336

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2014-03-18
Reviewed by Gyuyoung Kim.

Compilation with gcc 4.8.x results in 'invalid suffix on literal; C++11
requires a space between literal and string macro [-Wliteral-suffix]'
warning treated as error.

This patch applies a solution from r162448 to the EFL port.

* efl/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Added.
* efl/jhbuild.modules: Added appropriate patch section.

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

6 years ago[EFL] Update baselines and test expectations
ryuan.choi@samsung.com [Tue, 18 Mar 2014 11:56:53 +0000 (11:56 +0000)]
[EFL] Update baselines and test expectations
https://bugs.webkit.org/show_bug.cgi?id=130387

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-18

* fast/events/touch/touch-slider-expected.txt:
* fast/events/touch/touch-slider-no-js-touch-listener-expected.txt:
Update baselines after enabling TOUCH_SLIDER macro (r165722).
* platform/efl-wk2/TestExpectations:
fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html
is failing after adding in r165587
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
Update baselines after refactoring Path to Path2D (r165651).

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

6 years ago[EFL] Update baselines and test expectations
commit-queue@webkit.org [Tue, 18 Mar 2014 10:06:37 +0000 (10:06 +0000)]
[EFL] Update baselines and test expectations
https://bugs.webkit.org/show_bug.cgi?id=130249111

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-18

* fast/events/touch/touch-slider-expected.txt:
* fast/events/touch/touch-slider-no-js-touch-listener-expected.txt:
Update baselines after enabling TOUCH_SLIDER macro (r165722).
* platform/efl-wk2/TestExpectations:
fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html
is failing after adding in r165587
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
Update baselines after refactoring Path to Path2D (r165651).

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

6 years agoRename ElementDescendantIterator to TypedElementDescendantIterator.
akling@apple.com [Tue, 18 Mar 2014 09:42:58 +0000 (09:42 +0000)]
Rename ElementDescendantIterator to TypedElementDescendantIterator.
Romper-stubbed by Antti "Latte Lung" Koivisto.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/ElementDescendantIterator.h: Removed.
* dom/ElementIterator.h:
* dom/TypedElementDescendantIterator.h: Added.
(WebCore::TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator):
(WebCore::TypedElementDescendantIterator<ElementType>::operator):
(WebCore::TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator):
(WebCore::TypedElementDescendantConstIterator<ElementType>::operator):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::begin):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::end):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::first):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::last):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::begin):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::end):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::first):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::last):
(WebCore::descendantsOfType):

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

6 years agoAdd blend mode property to dumped information in GraphicsLayer.
commit-queue@webkit.org [Tue, 18 Mar 2014 08:51:55 +0000 (08:51 +0000)]
Add blend mode property to dumped information in GraphicsLayer.
https://bugs.webkit.org/show_bug.cgi?id=130331

Patch by Ion Rosca <rosca@adobe.com> on 2014-03-18
Reviewed by Simon Fraser.

Source/WebCore:

Functionality is not changed, therefore no new tests added.
I adjusted the affected test results generated with layerTreeAsText.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):

LayoutTests:

* css3/compositing/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer-expected.txt:
* css3/compositing/blend-mode-parent-of-composited-blended-has-layer-expected.txt:
* css3/compositing/blend-mode-with-composited-descendant-should-have-layer-expected.txt:

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

6 years agowebdatabase: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
svillar@igalia.com [Tue, 18 Mar 2014 08:50:52 +0000 (08:50 +0000)]
webdatabase: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
https://bugs.webkit.org/show_bug.cgi?id=130347

Reviewed by Darin Adler.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::openDatabaseMutex):
(WebCore::notificationMutex):
(WebCore::notificationQueue):

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

6 years ago[GTK] URTFB after r165789. Stub function added.
ossy@webkit.org [Tue, 18 Mar 2014 07:15:30 +0000 (07:15 +0000)]
[GTK] URTFB after r165789. Stub function added.

* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::setBundleParameter):

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

6 years agoUnreviewed, EFL build fix after r165789
ljaehun.lim@samsung.com [Tue, 18 Mar 2014 07:02:36 +0000 (07:02 +0000)]
Unreviewed, EFL build fix after r165789

* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::setBundleParameter): Implemented.

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

6 years agoRevert the erroneous change made by Xcode.
rniwa@webkit.org [Tue, 18 Mar 2014 04:55:44 +0000 (04:55 +0000)]
Revert the erroneous change made by Xcode.

* WebKit.xcodeproj/project.pbxproj:

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

6 years ago[GTK] Build fix for debug build
jaepark@webkit.org [Tue, 18 Mar 2014 04:55:14 +0000 (04:55 +0000)]
[GTK] Build fix for debug build

Unreviewed.

finalizedListItem was actually used in ASSERT.  So, use ASSERT_UNUSED
instead of ASSERT.

* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
(webkitBackForwardListItemFinalized):

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

6 years agoV8 regexp spends most of its time in operationGetById
msaboff@apple.com [Tue, 18 Mar 2014 03:46:10 +0000 (03:46 +0000)]
V8 regexp spends most of its time in operationGetById
https://bugs.webkit.org/show_bug.cgi?id=130380

Reviewed by Filip Pizlo.

Added String.length case to tryCacheGetByID that will only help the BaseLine JIT.
When V8 regexp is run from the command line, this nets a 2% performance improvement.
When the test is run for a longer amount of time, there is much less benefit as the
DFG will emit the appropriate code for String.length.  This does remove
operationGetById as the hottest function whne run from the command line.

* jit/Repatch.cpp:
(JSC::tryCacheGetByID):

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

6 years agoAdd one-deep cache to opaque roots hashset.
akling@apple.com [Tue, 18 Mar 2014 03:28:19 +0000 (03:28 +0000)]
Add one-deep cache to opaque roots hashset.
<https://webkit.org/b/130357>

The vast majority of WebCore JS wrappers will have their Document*
as the root(). This change adds a simple optimization where we cache
the last lookup and avoid going to the hashset for repeated queries.

Looks like 0.4% progression on DYEB on my MBP.

Reviewed by Mark Hahnenberg.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/OpaqueRootSet.h: Added.
(JSC::OpaqueRootSet::OpaqueRootSet):
(JSC::OpaqueRootSet::contains):
(JSC::OpaqueRootSet::isEmpty):
(JSC::OpaqueRootSet::clear):
(JSC::OpaqueRootSet::add):
(JSC::OpaqueRootSet::size):
(JSC::OpaqueRootSet::begin):
(JSC::OpaqueRootSet::end):
* heap/SlotVisitor.h:

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

6 years agoImplement Math.hypot
commit-queue@webkit.org [Tue, 18 Mar 2014 03:21:22 +0000 (03:21 +0000)]
Implement Math.hypot
https://bugs.webkit.org/show_bug.cgi?id=129486

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-03-17
Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncHypot):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/math-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/math.js:

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

6 years ago[WK2] Getting rid of compilation warnings
thiago.lacerda@openbossa.org [Tue, 18 Mar 2014 03:17:44 +0000 (03:17 +0000)]
[WK2] Getting rid of compilation warnings
https://bugs.webkit.org/show_bug.cgi?id=130348

Reviewed by Benjamin Poulain.

* UIProcess/API/APIHistoryClient.h:
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didChangeBackForwardList):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/API/APIUIClient.h:
(API::UIClient::exceededDatabaseQuota):
(API::UIClient::saveDataToFileInDownloadsFolder):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/APISession.cpp:
(API::generateID):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewStateDidChange):

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

6 years agoAdd RemoteCommandListener support to MediaSessionManager.
jer.noble@apple.com [Tue, 18 Mar 2014 03:16:43 +0000 (03:16 +0000)]
Add RemoteCommandListener support to MediaSessionManager.
https://bugs.webkit.org/show_bug.cgi?id=130354

Reviewed by Eric Carlson.

Listen for remote commands in MediaSessionManager.

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::addSession):
(WebCore::MediaSessionManager::removeSession):
* platform/audio/MediaSessionManager.h:

Add RemoteCommandListener to the project files:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

6 years agoRemove most uses of deprecatedCharacter in WTF
darin@apple.com [Tue, 18 Mar 2014 03:00:06 +0000 (03:00 +0000)]
Remove most uses of deprecatedCharacter in WTF
https://bugs.webkit.org/show_bug.cgi?id=130317

Reviewed by Andreas Kling.

Re-landing after fixing the "80 instead of 0x80" typo in equalLatin1WithUTF8.

* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
non-ASCII path.
(WTF::SubstringTranslator8::hash): Added.
(WTF::SubstringTranslator8::equal): Added.
(WTF::SubstringTranslator16::hash): Renamed class.
(WTF::SubstringTranslator16::equal): Ditto.
(WTF::AtomicString::add): Added an 8-bit code path to the substring case.

* wtf/text/Base64.cpp:
(WTF::base64Decode): Added an 8 bit code path.
(WTF::base64URLDecode): Ditto.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
without first using is8Bit. Need to return later to remove use of deprecatedCharacters.

* wtf/unicode/UTF8.cpp:
(WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
are ASCII. Also removed the aEnd argument, since the caller only calls this when the
lengths are equal.
(WTF::Unicode::equalLatin1WithUTF8): Added.
* wtf/unicode/UTF8.h: Updated as described above.

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

6 years agowebkitpy test rebaseline.
rniwa@webkit.org [Tue, 18 Mar 2014 02:45:24 +0000 (02:45 +0000)]
webkitpy test rebaseline.

* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_default_args):

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

6 years agoUpdate the bundle parameters dictionary and send out KVO notifications
andersca@apple.com [Tue, 18 Mar 2014 01:52:15 +0000 (01:52 +0000)]
Update the bundle parameters dictionary and send out KVO notifications
https://bugs.webkit.org/show_bug.cgi?id=130379
<rdar://problem/16213914>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObject:forBundleParameter:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
(-[WKWebProcessBundleParameters setParameter:forKey:]):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setInjectedBundleParameter):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

6 years agoRewrite WebHTMLConverter::_elementHasOwnBackgroundColor in C++
rniwa@webkit.org [Tue, 18 Mar 2014 01:44:17 +0000 (01:44 +0000)]
Rewrite WebHTMLConverter::_elementHasOwnBackgroundColor in C++
https://bugs.webkit.org/show_bug.cgi?id=130291

Reviewed by Andreas Kling.

Extracted HTMLConverterCaches::elementHasOwnBackgroundColor.

* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::elementHasOwnBackgroundColor):
(-[WebHTMLConverter _elementHasOwnBackgroundColor:]):

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

6 years agoRewrite WebHTMLConverter::_elementIsBlockLevel in C++
rniwa@webkit.org [Tue, 18 Mar 2014 01:38:01 +0000 (01:38 +0000)]
Rewrite WebHTMLConverter::_elementIsBlockLevel in C++
https://bugs.webkit.org/show_bug.cgi?id=130287

Reviewed by Andreas Kling.

Rewrote _elementIsBlockLevel as HTMLConverterCaches::isBlockElement. Also removed the code to update
_elementIsBlockLevel in _traverseNode as computing the value of _elementIsBlockLevel is now fast.

* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::isBlockElement):
(-[WebHTMLConverter _elementIsBlockLevel:]):
(-[WebHTMLConverter _traverseNode:depth:embedded:]):
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):

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

6 years agoRewrite WebHTMLConverter::_getComputedFloat in C++
rniwa@webkit.org [Tue, 18 Mar 2014 01:35:46 +0000 (01:35 +0000)]
Rewrite WebHTMLConverter::_getComputedFloat in C++
https://bugs.webkit.org/show_bug.cgi?id=130284

Reviewed by Andreas Kling.

Rewrote _getComputedFloat as HTMLConverterCaches::floatPropertyValueForNode.

* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::floatPropertyValueForNode):
(-[WebHTMLConverter _getFloat:forNode:property:]): Now that computing the float value is fast, we don't need to
store it in the cache.
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):

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

6 years agoFix a bad URL in the ChangeLog of the previous commit.
aestes@apple.com [Tue, 18 Mar 2014 01:26:08 +0000 (01:26 +0000)]
Fix a bad URL in the ChangeLog of the previous commit.

* WebView/WebView.mm:

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

6 years agoRemove staging code added for <http://webkit.org/b/164757> [iOS] Support network...
aestes@apple.com [Tue, 18 Mar 2014 01:24:27 +0000 (01:24 +0000)]
Remove staging code added for <webkit.org/b/164757> [iOS] Support network state notification using CPNetworkObserver

Reviewed by Enrica Casucci.

* WebView/WebView.mm:

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

6 years ago--profile should imply --test-runner-count=1 in run-perf-tests
rniwa@webkit.org [Tue, 18 Mar 2014 00:58:40 +0000 (00:58 +0000)]
--profile should imply --test-runner-count=1 in run-perf-tests
https://bugs.webkit.org/show_bug.cgi?id=130375

Reviewed by Benjamin Poulain.

Use the test runner count of 1 when --profile is specified but not --test-runner-count.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args): Use -1 as the default value.
(PerfTestsRunner._collect_tests): If --test-runner-count is set (i.e. it's a positive value),
then use that value. Otherwise, if it's never set and --profile is present, test-runner-count
should be 1.

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

6 years agoWeb Inspector: Uncaught Exception in JSContext Inspector
commit-queue@webkit.org [Tue, 18 Mar 2014 00:34:28 +0000 (00:34 +0000)]
Web Inspector: Uncaught Exception in JSContext Inspector
https://bugs.webkit.org/show_bug.cgi?id=130368

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

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._accessibilitySupported):
Feature check DOMAgent as well as the function.

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

6 years agoWebKitLegacy headers should #import the relevant WebKit headers
andersca@apple.com [Tue, 18 Mar 2014 00:05:30 +0000 (00:05 +0000)]
WebKitLegacy headers should #import the relevant WebKit headers
https://bugs.webkit.org/show_bug.cgi?id=130372
<rdar://problem/16349094>

Reviewed by Dan Bernstein.

Create forwarding headers instead.

* WebKitLegacy/MigrateHeadersToLegacy.make:

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

6 years agoAddress some style nits.
timothy_horton@apple.com [Mon, 17 Mar 2014 23:53:41 +0000 (23:53 +0000)]
Address some style nits.

* UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:

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

6 years agoAddress some style nits.
simon.fraser@apple.com [Mon, 17 Mar 2014 23:49:58 +0000 (23:49 +0000)]
Address some style nits.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:

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

6 years agoAdd transparent window support back into MiniBrowser
simon.fraser@apple.com [Mon, 17 Mar 2014 23:45:12 +0000 (23:45 +0000)]
Add transparent window support back into MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=130363

Source/WebKit2:

Reviewed by Anders Carlsson.

Expose SPI for transparent window support.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Reviewed by Anders Carlsson.

Re-enable transparent window support for WK2.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController toggleTransparentWindow:]):

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

6 years agoHTMLInputElement::defaultEventHandler() shouldn't force style updates.
akling@apple.com [Mon, 17 Mar 2014 23:13:27 +0000 (23:13 +0000)]
HTMLInputElement::defaultEventHandler() shouldn't force style updates.
<https://webkit.org/b/130303>

Move the updateStyleIfNeeded() call down to TextFieldInputType instead
of doing it for every HTMLInputEvent.

There might be a better way to do this; we only want to know about this
specific element's renderer, and don't need the rest of the tree.
This is still an easy hack to avoid a lot of unnecessary work.

Reviewed by Anders Carlsson.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent):

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

6 years agoUnreviewed, rolling out r165721.
commit-queue@webkit.org [Mon, 17 Mar 2014 23:04:16 +0000 (23:04 +0000)]
Unreviewed, rolling out r165721.
https://bugs.webkit.org/show_bug.cgi?id=130367

It makes the debug bots flaky (Requested by benjaminp on
#webkit).

Reverted changeset:

"Remove most uses of deprecatedCharacter in WTF"
https://bugs.webkit.org/show_bug.cgi?id=130317
http://trac.webkit.org/changeset/165721

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

6 years agoUndo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
ap@apple.com [Mon, 17 Mar 2014 22:42:13 +0000 (22:42 +0000)]
Undo some accidental Gtk changes from trac.webkit.org/changeset/165759

* UIProcess/WebPageProxy.cpp:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years ago[WK2] URTBF after r165755 for non Apple platforms, stub functions added.
ossy@webkit.org [Mon, 17 Mar 2014 22:30:10 +0000 (22:30 +0000)]
[WK2] URTBF after r165755 for non Apple platforms, stub functions added.

* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::platformInitialize):
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::platformInitialize):

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

6 years agoMove convertToRange() helper to cross-platform WebPage.cpp
ap@apple.com [Mon, 17 Mar 2014 22:28:25 +0000 (22:28 +0000)]
Move convertToRange() helper to cross-platform WebPage.cpp
https://bugs.webkit.org/show_bug.cgi?id=130365

Reviewed by Tim Horton.

Also renamed it to rangeFromEditingLocationAndLength().

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::rangeFromEditingLocationAndLength):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::insertText):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::firstRectForCharacterRange):

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

6 years agoFollow-up fix.
andersca@apple.com [Mon, 17 Mar 2014 22:25:42 +0000 (22:25 +0000)]
Follow-up fix.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:

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

6 years ago[WebVTT] Extending WebVTT Rendering with Regions
bfulgham@apple.com [Mon, 17 Mar 2014 22:15:23 +0000 (22:15 +0000)]
[WebVTT] Extending WebVTT Rendering with Regions
https://bugs.webkit.org/show_bug.cgi?id=109822

Reviewed by Eric Carlson.

Merged from Blink (patch by Victor Carbune vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/0cdebc1d76d41bfcb9c4b022e54a4fbff132225d

No new tests, as this feature is not active in default builds. New tests will be added
in an upcoming bug.

* css/mediaControls.css:
(video::-webkit-media-text-track-region):
(video::-webkit-media-text-track-region-container):
(video::-webkit-media-text-track-region-container.scrolling):
(video::-webkit-media-text-track-display):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::~TextTrack):
* html/track/TextTrackCue.cpp:
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::textTrackCueContainerScrollingClass):
(WebCore::TextTrackRegion::textTrackCueContainerShadowPseudoId):
(WebCore::TextTrackRegion::textTrackRegionShadowPseudoId):
(WebCore::TextTrackRegion::appendTextTrackCueBox):
(WebCore::TextTrackRegion::displayLastTextTrackCueBox):
(WebCore::TextTrackRegion::willRemoveTextTrackCueBox):
(WebCore::TextTrackRegion::getDisplayTree):
(WebCore::TextTrackRegion::prepareRegionDisplayTree):
(WebCore::TextTrackRegion::startTimer):
(WebCore::TextTrackRegion::stopTimer):
(WebCore::TextTrackRegion::scrollTimerFired):
* html/track/TextTrackRegion.h:
(WebCore::TextTrackRegion::create):
(WebCore::TextTrackRegion::isScrollingRegion):
(WebCore::TextTrackRegion::ownerDocument):
* html/track/TextTrackRegion.idl:
* html/track/TextTrackRegionList.cpp:
(WebCore::TextTrackRegionList::getRegionById):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):
(WebCore::VTTCue::setIsActive):
(WebCore::VTTCue::removeDisplayTree):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::createNewRegion):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::layout):

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

6 years agoWK2: support data detectors driven action sheet..
enrica@apple.com [Mon, 17 Mar 2014 22:14:35 +0000 (22:14 +0000)]
WK2: support data detectors driven action sheet..
https://bugs.webkit.org/show_bug.cgi?id=130362
<rdar://problem/16319711>

Reviewed by Benjamin Poulain.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showDataDetectorsSheet]):

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

6 years ago[GStreamer] human readable language code for tracks
b.long@cablelabs.com [Mon, 17 Mar 2014 22:13:01 +0000 (22:13 +0000)]
[GStreamer] human readable language code for tracks
https://bugs.webkit.org/show_bug.cgi?id=124514

Reviewed by Martin Robinson.

.:

* Source/autotools/FindDependencies.m4: Add gstreamer-tag-1.0.
* Source/cmake/FindGStreamer.cmake: Same.
* Source/cmake/OptionsEfl.cmake: Same.
* Source/cmake/OptionsGTK.cmake: Same.

Source/WebCore:

* PlatformEfl.cmake: Add GSTREAMER_TAG_INCLUDE_DIRS and GSTREAMER_TAG_LIBRARIES.
* PlatformGTK.cmake: Same.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use getLanguageCode() for languages instead of just getTag().

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

6 years agoFix 32-bit OS X build.
andersca@apple.com [Mon, 17 Mar 2014 21:58:53 +0000 (21:58 +0000)]
Fix 32-bit OS X build.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::platformInitialize):

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

6 years ago[Mac] Rewrite WebHTMLConverter::_computedStringForNode in C++
rniwa@webkit.org [Mon, 17 Mar 2014 21:36:43 +0000 (21:36 +0000)]
[Mac] Rewrite WebHTMLConverter::_computedStringForNode in C++
https://bugs.webkit.org/show_bug.cgi?id=130274

Reviewed by Andreas Kling.

Rewrote WebHTMLConverter::_computedStringForNode as HTMLConverterCaches::propertyValueForNode.

* platform/mac/HTMLConverter.h: Removed unused caches.
* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::computedStylePropertyForElement): Added use const String& instead of String& on property name.
(HTMLConverterCaches::inlineStylePropertyForElement): Ditto.
(HTMLConverterCaches::propertyValueForNode): Renamed and rewritten from _computedStringForNode.
(-[WebHTMLConverter _stringForNode:property:]): Simply return the computed value instead of storing it in the cache
now that the computing the value is fast.
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):

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

6 years ago[GTK][CMake] Fix WebKit2 unused parameter warnings
jaepark@webkit.org [Mon, 17 Mar 2014 21:33:47 +0000 (21:33 +0000)]
[GTK][CMake] Fix WebKit2 unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=130316

Reviewed by Martin Robinson.

* Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
* UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
* UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
* UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
* UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
* UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
* UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
* UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.

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

6 years ago[Mac] Standardize on start/length in text input IPC methods
ap@apple.com [Mon, 17 Mar 2014 21:31:33 +0000 (21:31 +0000)]
[Mac] Standardize on start/length in text input IPC methods
https://bugs.webkit.org/show_bug.cgi?id=130359

Reviewed by Anders Carlsson.

Some IPC methods used start/length, and others use start/end. This was confusing.

While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
(I want to move this code to WebPage.cpp, where it could be shared with iOS and
other platforms, as it doesn't depend on Foundation much).

* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView setMarkedText:selectedRange:replacementRange:]):
(-[WKView attributedSubstringForProposedRange:actualRange:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setComposition):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::convertToRange):
(WebKit::WebPage::firstRectForCharacterRange):

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

6 years agoRename WKThumbnailView to _WKThumbnailView
timothy_horton@apple.com [Mon, 17 Mar 2014 21:29:11 +0000 (21:29 +0000)]
Rename WKThumbnailView to _WKThumbnailView
https://bugs.webkit.org/show_bug.cgi?id=130361

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
* UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
(-[_WKThumbnailView _didTakeSnapshot:]):
(-[_WKThumbnailView viewDidMoveToWindow]):
(-[_WKThumbnailView setScale:]):
(-[_WKThumbnailView setUsesSnapshot:]):
(-[_WKThumbnailView _setThumbnailLayer:]):
(-[_WKThumbnailView _thumbnailLayer]):
* UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setThumbnailView:]):
(-[WKView _thumbnailView]):
(-[WKView _updateThumbnailViewLayer]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
* WebKit2.xcodeproj/project.pbxproj:

* MigrateHeaders.make:

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

6 years agoRemove unnecessary JSC::Handle null checks in bindings code.
akling@apple.com [Mon, 17 Mar 2014 21:24:42 +0000 (21:24 +0000)]
Remove unnecessary JSC::Handle null checks in bindings code.
<https://webkit.org/b/130356>

Use Handle::slot() directly instead of going through Handle::get().
This avoids null checking the HandleSlot, which isn't necessary here
anyway, and the code already assumes it'll never be null.

Reviewed by Gavin Barraclough.

* bindings/js/JSCSSRuleListCustom.cpp:
(WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::finalize):

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

6 years agoAX: Reducing some code by using helper function ariaElementsFromAttribute
k.czech@samsung.com [Mon, 17 Mar 2014 21:11:30 +0000 (21:11 +0000)]
AX: Reducing some code by using helper function ariaElementsFromAttribute
https://bugs.webkit.org/show_bug.cgi?id=130344

Reviewed by Chris Fleizach.

Change visibility of ariaElementsFromAttribute function from private to protected
so that other classes that derives from AccessibilityRenderObject can use it.

No new tests. No behaviour change.

* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::columnHeaders):

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

6 years agoAdd SPI for getting bundle parameters from the injected bundle
andersca@apple.com [Mon, 17 Mar 2014 20:38:28 +0000 (20:38 +0000)]
Add SPI for getting bundle parameters from the injected bundle
https://bugs.webkit.org/show_bug.cgi?id=130355

Reviewed by Dan Bernstein.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
(-[WKWebProcessBundleParameters initWithDictionary:]):
(-[WKWebProcessBundleParameters valueForKey:]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
(-[WKWebProcessPlugInController parameters]):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::InjectedBundle):
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::create):
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::bundleParameters):
(WebKit::InjectedBundle::platformInitialize):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

6 years agoREGRESSION: WebKitLegacy causes ASan build to fail
ddkilzer@apple.com [Mon, 17 Mar 2014 20:34:52 +0000 (20:34 +0000)]
REGRESSION: WebKitLegacy causes ASan build to fail
<rdar://problem/16344326>

Patch by David Farler <dfarler@apple.com> on 2014-03-17
Reviewed by David Kilzer.

* Configurations/DebugRelease.xcconfig: Remove $(inherited) from
OTHER_CFLAGS, OTHER_CPLUSPLUSFLAGS, OTHER_LDFLAGS to prevent
double complete ASAN flags.

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

6 years agoProvide preference to enable additional AVFoundation options
bfulgham@apple.com [Mon, 17 Mar 2014 20:33:20 +0000 (20:33 +0000)]
Provide preference to enable additional AVFoundation options
https://bugs.webkit.org/show_bug.cgi?id=130275

Reviewed by Eric Carlson.

../WebCore:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::doesHaveAttribute): Added.
* html/HTMLMediaElement.h:
* page/Settings.in: Add new attribute.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::doesHaveAttribute): Added stub to call private player object's
implementation of doesHaveAttribute.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::doesHaveAttribute):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::AVFWrapper::createAssetForURL): Check the <media> object,
and notify AVFoundationCF to use URI option if relevant.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Check the <media> object,
and notify AVFoundation to use URI option if relevant.

../WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h: Added new preference.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Initialize preference to false.
(-[WebPreferences isInheritURIQueryComponentEnabled]): Added.
(-[WebPreferences setEnableInheritURIQueryComponent:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Handle new preference.

../WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl: Added new preference.
* WebPreferenceKeysPrivate.h: Ditto.
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings): Initialize preference to false.
(WebPreferences::isInheritURIQueryComponentEnabled): Added.
(WebPreferences::setEnableInheritURIQueryComponent): Added.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged): Handle new preference.

../WebKit2:

* Shared/WebPreferencesStore.h: Added new preference.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetEnableInheritURIQueryComponent): Added.
(WKPreferencesGetEnableInheritURIQueryComponent): Added.
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Handle new preference.

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

6 years agoFix the 32-bit build; make the open panel make a WK1 window.
simon.fraser@apple.com [Mon, 17 Mar 2014 20:32:10 +0000 (20:32 +0000)]
Fix the 32-bit build; make the open panel make a WK1 window.

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate openDocument:]):

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

6 years ago[EME] Add NULL protections in SourceBuffer and MediaSource.
jer.noble@apple.com [Mon, 17 Mar 2014 20:23:36 +0000 (20:23 +0000)]
[EME] Add NULL protections in SourceBuffer and MediaSource.
https://bugs.webkit.org/show_bug.cgi?id=130266

Reviewed by Eric Carlson.

Add NULL checks in places which may be called after a SourceBuffer has been removed:

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::monitorSourceBuffers): Protect against a SourceBuffer being removed
    (and thus activeSourceBuffers being empty) when monitoring source buffer state.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired): Protect against SourceBuffer being removed.
(WebCore::SourceBuffer::videoTracks): Ditto.
(WebCore::SourceBuffer::audioTracks): Ditto.
(WebCore::SourceBuffer::textTracks): Ditto.
(WebCore::SourceBuffer::setActive): Ditto.
(WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
(WebCore::SourceBuffer::hasCurrentTime): Ditto.
(WebCore::SourceBuffer::canPlayThrough): Ditto.
(WebCore::SourceBuffer::hasFutureTime): Ditto, and check for an empty buffered ranges.

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

6 years ago[Mac] getAttributedSubstringFromRange arguments are incorrectly named
ap@apple.com [Mon, 17 Mar 2014 20:19:24 +0000 (20:19 +0000)]
[Mac] getAttributedSubstringFromRange arguments are incorrectly named
https://bugs.webkit.org/show_bug.cgi?id=130349

Reviewed by Tim Horton.

There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
all, but now, let's at least name them correctly.

No behavior change.

* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getAttributedSubstringFromRange):

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

6 years agoConvert MiniBrowser to use WKWebView API
simon.fraser@apple.com [Mon, 17 Mar 2014 20:10:12 +0000 (20:10 +0000)]
Convert MiniBrowser to use WKWebView API
https://bugs.webkit.org/show_bug.cgi?id=130061

Reviewed by Anders Carlsson.

Convert the MiniBrowser WK2 window to use WebKit2 API as much
as possible.

Some functionality was removed temporarily:
    - text zoom, page zoom
    - reload
    - pagination mode
    - transparent window
    - dumping source
    - window.open support
    - beforeUnload panel
    - find in page

* MiniBrowser/mac/AppDelegate.h:
* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate init]):
(-[BrowserAppDelegate newWindow:]):
(-[BrowserAppDelegate applicationWillTerminate:]):
(-[BrowserAppDelegate openDocument:]):
* MiniBrowser/mac/WK2BrowserWindowController.h:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController dealloc]):
(-[WK2BrowserWindowController fetch:]):
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController reload:]):
(-[WK2BrowserWindowController goBack:]):
(-[WK2BrowserWindowController goForward:]):
(-[WK2BrowserWindowController toggleZoomMode:]):
(-[WK2BrowserWindowController resetZoom:]):
(-[WK2BrowserWindowController canResetZoom]):
(-[WK2BrowserWindowController dumpSourceToConsole:]):
(-[WK2BrowserWindowController togglePaginationMode:]):
(-[WK2BrowserWindowController validateUserInterfaceItem:]):
(-[WK2BrowserWindowController windowShouldClose:]):
(-[WK2BrowserWindowController applicationTerminating]):
(-[WK2BrowserWindowController currentZoomFactor]):
(-[WK2BrowserWindowController setCurrentZoomFactor:]):
(-[WK2BrowserWindowController toggleTransparentWindow:]):
(-[WK2BrowserWindowController observeValueForKeyPath:ofObject:change:context:]):
(-[WK2BrowserWindowController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController find:]):
(-[WK2BrowserWindowController webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[WK2BrowserWindowController webView:didStartProvisionalNavigation:]):
(-[WK2BrowserWindowController webView:didReceiveServerRedirectForProvisionalNavigation:]):
(-[WK2BrowserWindowController webView:didFailProvisionalNavigation:withError:]):
(-[WK2BrowserWindowController webView:didCommitNavigation:]):
(-[WK2BrowserWindowController webView:didFinishLoadingNavigation:]):
(-[WK2BrowserWindowController webView:didFailNavigation:withError:]):
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:

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

6 years agoWKThumbnailView should support snapshots
timothy_horton@apple.com [Mon, 17 Mar 2014 20:04:47 +0000 (20:04 +0000)]
WKThumbnailView should support snapshots
https://bugs.webkit.org/show_bug.cgi?id=130335
<rdar://problem/16255139>

Reviewed by Simon Fraser.

Add a mode where WKThumbnailView takes a software snapshot of the web content,
replacing the live layer tree with said snapshot once it returns from the
web process. This may improve animation performance in cases where the
layer tree would otherwise be very complex.

* UIProcess/API/Cocoa/WKThumbnailView.h:
Add a property, usesSnapshot, which determines whether the thumbnail view
should use the live layer tree or a snapshot of the content.

* UIProcess/API/Cocoa/WKThumbnailView.mm:
(-[WKThumbnailView initWithFrame:fromWKView:]):
(-[WKThumbnailView _viewWasUnparented]):
Clear the snapshot when unparented.

(-[WKThumbnailView _viewWasParented]):
Take a snapshot of the web content when parented, if needed.

(-[WKThumbnailView _requestSnapshotIfNeeded]):
If we're using snapshots, and haven't already dispatched an async snapshot request,
and don't already have a snapshot, request a snapshot from the web process.

When it returns, use it as the contents of the WKThumbnailView layer, and
unparent the live layer tree.

(-[WKThumbnailView setScale:]):
(-[WKThumbnailView setUsesSnapshot:]):
(-[WKThumbnailView _setThumbnailLayer:]):
(-[WKThumbnailView _thumbnailLayer]):
* UIProcess/API/Cocoa/WKThumbnailViewInternal.h:

* UIProcess/API/mac/WKView.mm:
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
(-[WKView _acceleratedCompositingModeRootLayer]):
WKView should always keep track of the current root layer, instead of totally
handing control over to WKThumbnailView when it is used.

(-[WKView _setThumbnailView:]):
(-[WKView _updateThumbnailViewLayer]):
(-[WKView _reparentLayerTreeInThumbnailView]):
If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
push the WKView's live layer tree into the thumbnail view.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeThumbnailSnapshot):
Add a message that asynchronously returns a snapshot that respects the
current thumbnail scale and position.

(WebKit::WebPage::scaledSnapshotWithOptions):
Use some nullptr.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::transform):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add a getter for the DrawingArea's transform.
Rename it to rootLayerTransform.

* WebCore.exp.in:

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

6 years agoLayout Test mathml/wbr-in-mroot-crash.html crashes
jer.noble@apple.com [Mon, 17 Mar 2014 19:27:53 +0000 (19:27 +0000)]
Layout Test mathml/wbr-in-mroot-crash.html crashes
https://bugs.webkit.org/show_bug.cgi?id=130353

Unreviewed TestExpectations update.

* platform/efl/TestExpectations:
* platform/mac/TestExpectations:

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

6 years agoUse RunLoop objects through references instead of pointers
zandobersek@gmail.com [Mon, 17 Mar 2014 18:47:33 +0000 (18:47 +0000)]
Use RunLoop objects through references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=130313

Reviewed by Andreas Kling.

Source/WebKit2:

Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
return RunLoop reference instead of a pointer.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didClose):
(WebKit::DatabaseProcess::didReceiveInvalidMessage):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::postMainThreadTask):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::getOrCreate):
(IPC::Connection::SyncMessageState::SyncMessageState):
(IPC::Connection::SyncMessageState::~SyncMessageState):
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::stopRunLoop):
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::NP_Deallocate):
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::tryPreexistingProcess):
(WebKit::createProcess):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getOrigins):
(WebKit::StorageManager::getStorageDetailsByOrigin):
* UIProcess/Storage/StorageManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::unprotectPluginFromDestruction):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):

Source/WTF:

Make RunLoop::current() and RunLoop::main() return a RunLoop reference instead
of a pointer. RunLoop::Holder now uses a Ref<RunLoop> member. Timer and TimerBase
constructors take in a RunLoop reference, with TimerBase now storing a RunLoop
reference member instead of a pointer. Platform-specific bits of the RunLoop
class are updated accordingly.

* wtf/RunLoop.cpp:
(WTF::RunLoop::Holder::Holder):
(WTF::RunLoop::Holder::runLoop):
(WTF::RunLoop::initializeMainRunLoop):
(WTF::RunLoop::current):
(WTF::RunLoop::main):
(WTF::RunLoop::isMain):
* wtf/RunLoop.h:
(WTF::RunLoop::Timer::Timer):
* wtf/cf/RunLoopCF.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
* wtf/efl/RunLoopEfl.cpp:
(WTF::RunLoop::TimerBase::TimerBase):
* wtf/gtk/RunLoopGtk.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
* wtf/win/RunLoopWin.cpp:
(WTF::RunLoop::TimerBase::TimerBase):
(WTF::RunLoop::TimerBase::start):
(WTF::RunLoop::TimerBase::stop):
(WTF::RunLoop::TimerBase::isActive):

Tools:

Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
return RunLoop reference instead of a pointer.

* TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp:
(loadedCallback):
(clickedCallback):

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

6 years ago[GTK] Don't busy loop when the socket is full
commit-queue@webkit.org [Mon, 17 Mar 2014 18:20:28 +0000 (18:20 +0000)]
[GTK] Don't busy loop when the socket is full
https://bugs.webkit.org/show_bug.cgi?id=129802

Patch by Giovanni Campagna <gcampagna@src.gnome.org> on 2014-03-17
Reviewed by Carlos Garcia Campos.

When the socket is full and we see EAGAIN or EWOULDBLOCK
(because the socket is non blocking), don't busy loop by
tring to write again, instead poll() until the socket
becomes writable.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::sendOutgoingMessage):

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

6 years agosort-export-file --help doesn't work (missing 'use')
timothy_horton@apple.com [Mon, 17 Mar 2014 17:50:16 +0000 (17:50 +0000)]
sort-export-file --help doesn't work (missing 'use')
https://bugs.webkit.org/show_bug.cgi?id=130338

Reviewed by Anders Carlsson.

* Scripts/sort-export-file:
Add a missing 'use', and fix a typo in an error message.

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

6 years ago[GTK] Update Korean translations - Jan 15, 2014
changseok.oh@collabora.com [Mon, 17 Mar 2014 17:48:01 +0000 (17:48 +0000)]
[GTK] Update Korean translations - Jan 15, 2014
https://bugs.webkit.org/show_bug.cgi?id=127001

Reviewed by Gustavo Noronha Silva.

* ko.po: Updated korean translations.

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

6 years ago[CSS Grid Layout] getComputedStyle() not using author's order when showing named...
svillar@igalia.com [Mon, 17 Mar 2014 17:30:32 +0000 (17:30 +0000)]
[CSS Grid Layout] getComputedStyle() not using author's order when showing named grid lines
https://bugs.webkit.org/show_bug.cgi?id=127837

Reviewed by David Hyatt.

Source/WebCore:

Added a couple of new Vectors to store the names of the grid lines
respecting their order. They will be used to get the right outcome
for getComputedStyle().

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::addValuesForNamedGridLinesAtIndex):
(WebCore::valueForGridTrackList):
* css/StyleResolver.cpp:
(WebCore::createGridTrackList):
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator==):

LayoutTests:

Grid line names are now shown using the exact same order as the one used in the CSS.

* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/non-named-grid-line-get-set-expected.txt:

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

6 years agoFix the !ENABLE(PROMISES) build
commit-queue@webkit.org [Mon, 17 Mar 2014 17:29:04 +0000 (17:29 +0000)]
Fix the !ENABLE(PROMISES) build
https://bugs.webkit.org/show_bug.cgi?id=130328

Patch by Zsolt Borbely <borbezs@inf.u-szeged.hu> on 2014-03-17
Reviewed by Darin Adler.

Add missing ENABLE(PROMISES) guards.

Source/JavaScriptCore:

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSPromiseDeferred.cpp:
* runtime/JSPromiseDeferred.h:
* runtime/JSPromiseReaction.cpp:
* runtime/JSPromiseReaction.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

* bindings/js/JSDOMPromise.cpp:
* bindings/js/JSDOMPromise.h:

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

6 years agoSafari should not render a cell if the <td> is empty
commit-queue@webkit.org [Mon, 17 Mar 2014 17:28:14 +0000 (17:28 +0000)]
Safari should not render a cell if the <td> is empty
https://bugs.webkit.org/show_bug.cgi?id=15273

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2014-03-17
Reviewed by Darin Adler.

Source/WebCore:

When table cell has no children and the doctype is not present or not
correct the border for that cell should not be drawn. Firefox also
follows the same behaviour hence making the changes to make it similiar
to Firefox behaviour.

Tests: fast/table/table-cell-border-doctype.html
       fast/table/table-cell-border-no-doctype.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBoxDecorations):
Added condition for not drawing the border when table cell has no child
and doctype.

LayoutTests:

* fast/table/table-cell-border-doctype-expected.html: Added.
* fast/table/table-cell-border-doctype.html: Added.
* fast/table/table-cell-border-no-doctype-expected.html: Added.
* fast/table/table-cell-border-no-doctype.html: Added.
Added new test cases to check the behaviour of table cell border when
table has doctype/no doctype and table cell has child/nochild.

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

6 years agoFix handling of <annotation> in MathMLTextElement.
fred.wang@free.fr [Mon, 17 Mar 2014 16:52:31 +0000 (16:52 +0000)]
Fix handling of <annotation> in MathMLTextElement.
https://bugs.webkit.org/show_bug.cgi?id=124128.

Reviewed by Darin Adler.

No new tests.

* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer): do not create the special RenderMathMLToken for the <annotation> tag.
(WebCore::MathMLTextElement::childShouldCreateRenderer): only allow text inside <annotation>.

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

6 years ago[GTK][CMake] Credential storage is not enabled
mrobinson@webkit.org [Mon, 17 Mar 2014 16:42:54 +0000 (16:42 +0000)]
[GTK][CMake] Credential storage is not enabled
https://bugs.webkit.org/show_bug.cgi?id=130149

Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsGTK.cmake: Add an ENABLE_CREDENTIAL_STORAGE option to the configuration
and look libsecret when it's enabled.
* Source/cmakeconfig.h.cmake: Expose the ENABLE_CREDENTIAL_STORAGE option to the build.

Source/WebCore:

* PlatformGTK.cmake: Add the libsecret include directories and link line to the build.

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

6 years ago[GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
mrobinson@webkit.org [Mon, 17 Mar 2014 16:40:27 +0000 (16:40 +0000)]
[GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
https://bugs.webkit.org/show_bug.cgi?id=130155

Reviewed by Philippe Normand.

.:

* Source/cmake/FindGTKUnixPrint.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Look for gtk+-unix-print and use it to turn on HAVE_GTK_UNIX_PRINTING.
* Source/cmakeconfig.h.cmake: Add the HAVE_GTK_UNIX_PRINTING define.

Source/WebKit2:

* PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Add GTK_UNIX_PRINT flags to the build.

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

6 years agoUnreviewed.
zandobersek@gmail.com [Mon, 17 Mar 2014 16:26:53 +0000 (16:26 +0000)]
Unreviewed.

Addressing reviewing comments by Darin in bug #130310 that I forgot
to address before landing the changes in r165732.
https://bugs.webkit.org/show_bug.cgi?id=130310

* rendering/InlineTextBox.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:

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

6 years ago[GTK] MiniBrowser fails to load injected bundle lib
carlosgc@webkit.org [Mon, 17 Mar 2014 16:14:57 +0000 (16:14 +0000)]
[GTK] MiniBrowser fails to load injected bundle lib
https://bugs.webkit.org/show_bug.cgi?id=130332

Reviewed by Anders Carlsson.

This is because WEBKIT_INJECTED_BUNDLE_PATH env var is set too late.

* MiniBrowser/gtk/main.c:
(main): Make sure WEBKIT_INJECTED_BUNDLE_PATH is set before a web
process is spawn.

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

6 years agoSpeculative build fix for ENABLE(TELEPHONE_NUMBER_DETECTION) after r165724.
jberlin@webkit.org [Mon, 17 Mar 2014 15:38:30 +0000 (15:38 +0000)]
Speculative build fix for ENABLE(TELEPHONE_NUMBER_DETECTION) after r165724.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):

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

6 years agoOnly supplement Page with UserMediaController once
zandobersek@gmail.com [Mon, 17 Mar 2014 15:02:50 +0000 (15:02 +0000)]
Only supplement Page with UserMediaController once
https://bugs.webkit.org/show_bug.cgi?id=130311

Reviewed by Darin Adler.

Don't supplement the Page with an UserMediaController object if that Page was
already supplemented with one. This avoids triggering an assertion in
Supplementable::provideSupplement() that ensures no supplement with the same key
exists yet. The cause of this is calling provideUserMediaTo() in the Internals
constructor that's using the same Page for two subsequent tests.

* Modules/mediastream/UserMediaController.cpp:
(WebCore::provideUserMediaTo):

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

6 years agoExplicitly include cstdio header for debug builds in InlineTextBox, RenderLayer,...
zandobersek@gmail.com [Mon, 17 Mar 2014 14:59:03 +0000 (14:59 +0000)]
Explicitly include cstdio header for debug builds in InlineTextBox, RenderLayer, RenderObject
https://bugs.webkit.org/show_bug.cgi?id=130310

Reviewed by Darin Adler.

Building the GTK port with Clang through CMake falls into a configuration where
the cstdio header is not indirectly included in InlineTextBox, RenderLayer and
RenderObject source files. fprintf() is required for helper functions that print
out helpful debugging information in debug builds, so the cstdio header should
be included explicitly in that case.

* rendering/InlineTextBox.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:

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

6 years ago[GTK] Cleanup WebKitDOMObject
carlosgc@webkit.org [Mon, 17 Mar 2014 13:45:06 +0000 (13:45 +0000)]
[GTK] Cleanup WebKitDOMObject
https://bugs.webkit.org/show_bug.cgi?id=130246

Reviewed by Martin Robinson.

Remove unneeded getter and fix coding style.

* bindings/gobject/WebKitDOMObject.cpp:
(webkitDOMObjectSetProperty):
(webkit_dom_object_class_init):

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

6 years ago[EFL][WK2] Restore cursor when moving mouse into webview
ryuan.choi@samsung.com [Mon, 17 Mar 2014 12:40:43 +0000 (12:40 +0000)]
[EFL][WK2] Restore cursor when moving mouse into webview
https://bugs.webkit.org/show_bug.cgi?id=130182

Reviewed by Gyuyoung Kim.

We changed mouse cursor when the type of cursor is changed.
But once mouse is moved out of webview, ewebkit will not know whether cursor
is changed or not.

So, this patch added a logic to restore the last applied type of cursor when
mouse is moved into webview again.

* UIProcess/API/efl/EwkView.cpp:
(EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
Call updateCursor to restore the last applied type of cursor.
(EwkView::EwkView):
(EwkView::updateCursor): Extracted from setCursor.
(EwkView::setCursor):
(EwkView::handleEvasObjectAdd):
* UIProcess/API/efl/EwkView.h:

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

6 years agoOne more fix after r165725.
ossy@webkit.org [Mon, 17 Mar 2014 09:50:01 +0000 (09:50 +0000)]
One more fix after r165725.

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2014-03-17
Reviewed by Csaba Osztrogonác.

* wtf/WTFThreadData.h:

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

6 years agoBuildfix after r165725 for non Mac platforms.
ossy@webkit.org [Mon, 17 Mar 2014 09:38:56 +0000 (09:38 +0000)]
Buildfix after r165725 for non Mac platforms.

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2014-03-17
Reviewed by Csaba Osztrogonác.

* wtf/WTFThreadData.h:

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

6 years ago[Mac] WTFThreadData should use _pthread_getspecific_direct().
akling@apple.com [Mon, 17 Mar 2014 08:29:12 +0000 (08:29 +0000)]
[Mac] WTFThreadData should use _pthread_getspecific_direct().
<https://webkit.org/b/130320>

Hack WTFThreadData to use a direct key for TLS access when available.
This mechanism uses a dedicated segment register and is the same way
we implement the fast path in FastMalloc.

Reviewed by Darin Adler.

* wtf/FastMalloc.cpp:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::createAndRegisterForGetspecificDirect):
* wtf/WTFThreadData.h:
(WTF::wtfThreadData):

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

6 years agoStop using deprecatedCharacters in HTMLTreeBuilder
darin@apple.com [Mon, 17 Mar 2014 08:01:27 +0000 (08:01 +0000)]
Stop using deprecatedCharacters in HTMLTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=130323

Reviewed by Andreas Kling.

Keeping this separate from other patches because of concern that this could affect
page load performance.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
Use a StringView instead of a character pointer.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::isEmpty): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeading): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): Ditto.
(WebCore::HTMLTreeBuilder::linkifyPhoneNumbers): Use StringView::upconvertedCharacters.

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

6 years agoMake some Module class constructors return PassRef.
jinwoo7.song@samsung.com [Mon, 17 Mar 2014 07:52:37 +0000 (07:52 +0000)]
Make some Module class constructors return PassRef.
https://bugs.webkit.org/show_bug.cgi?id=130282

Reviewed by Andreas Kling.

Make the constructor helpers for the following classes return PassRef
instead of PassRefPtr since they will never return null.
 - GamepadList
 - Geolocation
 - NavigatorContentUtils
 - NetworkInfoConnection
 - Notification
 - NotificationCenter
 - DeviceProximityEvent

* Modules/gamepad/GamepadList.h:
(WebCore::GamepadList::create):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::create):
* Modules/geolocation/Geolocation.h:
(WebCore::Geolocation::GeoNotifier::create):
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::NavigatorContentUtils::create):
* Modules/navigatorcontentutils/NavigatorContentUtils.h:
* Modules/networkinfo/NetworkInfoConnection.cpp:
(WebCore::NetworkInfoConnection::create):
* Modules/networkinfo/NetworkInfoConnection.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::create):
* Modules/notifications/NotificationCenter.h:
* Modules/proximity/DeviceProximityEvent.h:
(WebCore::DeviceProximityEvent::create):

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

6 years ago.: [EFL] Enable TOUCH_SLIDER macro.
commit-queue@webkit.org [Mon, 17 Mar 2014 06:49:43 +0000 (06:49 +0000)]
.: [EFL] Enable TOUCH_SLIDER macro.
https://bugs.webkit.org/show_bug.cgi?id=130186

Patch by Kim Byung Jun <bj1987.kim@samsung.com> on 2014-03-16
Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:

Tools: [EFL] Enable TOUCH_SLIDER macro
https://bugs.webkit.org/show_bug.cgi?id=130185

Patch by Kim Byung Jun <bj1987.kim@samsung.com> on 2014-03-16
Reviewed by Gyuyoung Kim.

* Scripts/webkitperl/FeatureList.pm:

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

6 years agoRemove most uses of deprecatedCharacter in WTF
darin@apple.com [Mon, 17 Mar 2014 06:37:00 +0000 (06:37 +0000)]
Remove most uses of deprecatedCharacter in WTF
https://bugs.webkit.org/show_bug.cgi?id=130317

Reviewed by Andreas Kling.

* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
non-ASCII path.
(WTF::SubstringTranslator8::hash): Added.
(WTF::SubstringTranslator8::equal): Added.
(WTF::SubstringTranslator16::hash): Renamed class.
(WTF::SubstringTranslator16::equal): Ditto.
(WTF::AtomicString::add): Added an 8-bit code path to the substring case.

* wtf/text/Base64.cpp:
(WTF::base64Decode): Added an 8 bit code path.
(WTF::base64URLDecode): Ditto.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
without first using is8Bit. Need to return later to remove use of deprecatedCharacters.

* wtf/unicode/UTF8.cpp:
(WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
are ASCII. Also removed the aEnd argument, since the caller only calls this when the
lengths are equal.
(WTF::Unicode::equalLatin1WithUTF8): Added.
* wtf/unicode/UTF8.h: Updated as described above.

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

6 years ago[CSSRegions]Do not compute region range for a box unless the parent has one
mihnea@adobe.com [Mon, 17 Mar 2014 06:35:27 +0000 (06:35 +0000)]
[CSSRegions]Do not compute region range for a box unless the parent has one
https://bugs.webkit.org/show_bug.cgi?id=130249

Reviewed by Andrei Bucur.

Source/WebCore:

If the containing block does not have a region range computed, do not attempt to compute
a region range for a child. In such cases, the range computation for a child can lead to
a result that is wrong, possibly leading to an incorrect clipping.

Test: fast/regions/inline-block-flowed-in-regions.html

* rendering/RenderBlock.cpp:
(WebCore::canComputeRegionRangeForBox):
(WebCore::RenderBlock::computeRegionRangeForBoxChild):
(WebCore::RenderBlock::estimateRegionRangeForBoxChild):
(WebCore::RenderBlock::updateRegionRangeForBoxChild):
* rendering/RenderFlowThread.h:

LayoutTests:

* fast/regions/inline-block-flowed-in-regions-expected.html: Added.
* fast/regions/inline-block-flowed-in-regions.html: Added.

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

6 years agoREGRESSION(r165703): JSC tests crashing in StringImpl::destroy().
akling@apple.com [Mon, 17 Mar 2014 06:15:51 +0000 (06:15 +0000)]
REGRESSION(r165703): JSC tests crashing in StringImpl::destroy().
<https://webkit.org/b/130304>

Reviewed by Anders Carlsson.

Unreviewed, restoring the old behavior of OpaqueJSString::identifier()
that doesn't put a potentially unwanted string into the Identifier table.

* API/OpaqueJSString.cpp:
(OpaqueJSString::identifier):

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

6 years ago[EFL][WK2] Add ewk_application_cache_manager APIs
ryuan.choi@samsung.com [Mon, 17 Mar 2014 05:46:10 +0000 (05:46 +0000)]
[EFL][WK2] Add ewk_application_cache_manager APIs
https://bugs.webkit.org/show_bug.cgi?id=102853

Reviewed by Gyuyoung Kim.

Implemented application cache manager to get list of origins which stores
application cache and remove specified origin or all.

* PlatformEfl.cmake: Added newly added files.
* UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
(EwkApplicationCacheManager::EwkApplicationCacheManager):
(EwkApplicationCacheManager::~EwkApplicationCacheManager):
(Get_Origins_Data::Get_Origins_Data):
(getApplicationCacheOriginsCallback):
(ewk_application_cache_manager_origins_get):
(ewk_application_cache_origins_free):
(ewk_application_cache_manager_delete_all):
(ewk_application_cache_manager_delete):
* UIProcess/API/efl/ewk_application_cache_manager.h: Added.
* UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
(EwkApplicationCacheManager::impl):
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::applicationCacheManager):
(ewk_context_application_cache_manager_get):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_security_origin_private.h:
(EwkSecurityOrigin::wkSecurityOrigin):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
(EWK2UnitTestServer::port):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
Added to test application_cache_manager.
(serverCallback):
(getOriginsCallback):
(timerCallback):
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
Added test case to test getter of application_cache_manager.
(TEST_F):

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

6 years agoCSSValueList should assert that no null values are added to it.
akling@apple.com [Mon, 17 Mar 2014 04:31:47 +0000 (04:31 +0000)]
CSSValueList should assert that no null values are added to it.
<https://webkit.org/b/130315>

Add assertions in CSSValueList's append() and prepend() that we are
not adding a null value. This caught a single place in CSSParser
that was appending an alread-released RefPtr to a CSSValueList.
That list was eventually discarded anyway (due to "foundClip" now
being true), so the fix is simply to remove the adding.

Eventually we should use Ref and PassRef all over for CSSValueList,
this is just a first step on the way.

Reviewed by Darin Adler.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillShorthand):
* css/CSSValueList.h:
(WebCore::CSSValueList::append):
(WebCore::CSSValueList::prepend):

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

6 years agoAudioBufferSourceNode stop attribute shouldn't throw exception in finished state.
gyuyoung.kim@samsung.com [Mon, 17 Mar 2014 03:41:28 +0000 (03:41 +0000)]
AudioBufferSourceNode stop attribute shouldn't throw exception in finished state.
https://bugs.webkit.org/show_bug.cgi?id=130000.

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2014-03-16
Reviewed by Jer Noble.

AudioBufferSourceNode may go to FINISHED_STATE even before "stop" method is called
as silence rendered after audio data is played out when its not looping.
A call to "stop" method after this shouldn't throw exception.

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::stop):

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

6 years agoSource/WebKit/mac: Remove all deprecatedCharacters use from WebKit directory
darin@apple.com [Mon, 17 Mar 2014 02:44:57 +0000 (02:44 +0000)]
Source/WebKit/mac: Remove all deprecatedCharacters use from WebKit directory
https://bugs.webkit.org/show_bug.cgi?id=130305

Reviewed by Andreas Kling.

* History/BinaryPropertyList.cpp:
(BinaryPropertyListSerializer::appendStringObject): Use operator[]
instead of deprecatedCharacters.

Source/WebKit/win: Remove all deprecatedCharacters use from WebKit
https://bugs.webkit.org/show_bug.cgi?id=130305

Reviewed by Andreas Kling.

* AccessibleTextImpl.cpp:
(AccessibleText::get_text): Use BString instead of SysAllocStringLen,
which handles String directly.
(AccessibleText::get_textBeforeOffset): Ditto.
(AccessibleText::get_textAfterOffset): Ditto.
(AccessibleText::get_textAtOffset): Ditto.
(AccessibleText::get_attributes): Ditto.
* DOMCSSClasses.cpp:
(DOMCSSStyleDeclaration::getPropertyValue): Ditto.
* DOMCoreClasses.cpp:
(DOMNode::nodeValue): Ditto.
(DOMElement::getAttribute): Ditto.
(DOMElement::font): Rework this to leak a string, since it returns a
pointer to a font family name's characters with no defined lifetime.

* DOMHTMLClasses.cpp:
(DOMHTMLElement::innerText): Use BString's String-based constructor,
instead of explicitly passing a character pointer.
(DOMHTMLFormElement::action): Ditto.
(DOMHTMLFormElement::method): Ditto.
(DOMHTMLInputElement::value): Ditto.
(DOMHTMLTextAreaElement::value): Ditto.

* MarshallingHelpers.cpp:
(MarshallingHelpers::PathStringToFileCFURLRef): Use String::createCFString.

* WebCoreSupport/WebEditorClient.cpp:
(WebEditorClient::checkSpellingOfString): Use StringView::upconvertedCharacters.
(WebEditorClient::checkGrammarOfString): Ditto.

* WebDataSource.cpp:
(WebDataSource::unreachableURL): Use BString's String-based constructor,
instead of explicitly passing a character pointer.

* WebDownload.cpp:
(WebDownload::bundlePathForTargetPath): Use BString instead of SysAllocStringLen.

* WebDownloadCFNet.cpp:
(WebDownload::didFinish): Use BString's String-based constructor,
instead of explicitly passing a character pointer.
* WebDownloadCurl.cpp:
(WebDownload::didReceiveResponse): Ditto.

* WebElementPropertyBag.cpp:
(convertStringToVariant): Use BString instead of SysAllocStringLen.
* WebFrame.cpp:
(WebFrame::searchForLabelsBeforeElement): Ditto.
(WebFrame::matchLabelsAgainstElement): Ditto.

* WebHistory.cpp:
(WebHistory::addVisitedLinksToPageGroup): Use a better loop and call
visitedLinkHash, since it can take a String.

* WebKitGraphics.cpp:
(CenterTruncateStringToWidth): Use StringView::getCharactersWithUpconvert.
(RightTruncateStringToWidth): Ditto.

* WebView.cpp:
(WebView::applicationNameForUserAgent): Use BString instead of SysAllocStringLen.
(WebView::customUserAgent): Ditto.
(WebView::groupName): Ditto.
(WebView::selectedText): Ditto.
(WebView::onIMERequestReconvertString): Use StringView::getCharactersWithUpconvert.

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

6 years agoWeb Inspector: generated backend commands should reflect build system ENABLE settings
bburg@apple.com [Sun, 16 Mar 2014 23:09:25 +0000 (23:09 +0000)]
Web Inspector: generated backend commands should reflect build system ENABLE settings
https://bugs.webkit.org/show_bug.cgi?id=130111

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* CMakeLists.txt:

Combine only the Inspector domains listed in INSPECTOR_DOMAINS,
instead of globbing any .json file.

* DerivedSources.make:

Force the combined inspector protocol file to be regenerated if
the content or list of domains itself changes.

Source/WebCore:

Add guards for conditional inspector domains.

For Makefile-based build systems, force regeneration of the
combined file if the list of domains has changed.

Combine only the Inspector domains listed in INSPECTOR_DOMAINS,
instead of globbing any .json file.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:

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

6 years agoFollow-up: Double values passed to fabsf() in maxScaleFromTransform()
ddkilzer@apple.com [Sun, 16 Mar 2014 21:41:47 +0000 (21:41 +0000)]
Follow-up: Double values passed to fabsf() in maxScaleFromTransform()
<http://webkit.org/b/130297>

Reviewed by Darin Adler.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::maxScaleFromTransform): Use narrowPrecisionToFloat()
instead of static_cast<float>().

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

6 years agoScriptExecutionContext::vm() should return a reference.
akling@apple.com [Sun, 16 Mar 2014 20:21:05 +0000 (20:21 +0000)]
ScriptExecutionContext::vm() should return a reference.
<https://webkit.org/b/129611>

Every ScriptExecutionContext has a VM, so this can never return null.
Made WorkerScriptController::vm() return a reference as well, since
that was needed for this change.

Reviewed by Geoffrey Garen.

* bindings/js/WorkerScriptController.h:
(WebCore::WorkerScriptController::vm):
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::vm):
* dom/ScriptExecutionContext.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):
* testing/Internals.cpp:
(WebCore::Internals::parserMetaData):

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

6 years ago[GTK][CMake] Build with -fno-rtti
zandobersek@gmail.com [Sun, 16 Mar 2014 20:13:24 +0000 (20:13 +0000)]
[GTK][CMake] Build with -fno-rtti
https://bugs.webkit.org/show_bug.cgi?id=130261

Reviewed by Martin Robinson.

.:

* Source/cmake/OptionsCommon.cmake: List the -fno-exceptions, -fno-strict-aliasing
and -fno-rtti options in the global CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (-fno-rtti
is only listed in the latter). Replace -std=gnu++0x with the official -std=c++11 option.
* Source/cmake/WebKitHelpers.cmake: Stop -fno-exceptions and -fno-strict-aliasing
from being set through the WEBKIT_SET_EXTRA_COMPILER_FLAGS macro, they are now listed
in CMAKE_C_FLAGS and CMAKE_CXX_FLAGS.
* Source/cmake/gtest/CMakeLists.txt: Build GTest code with GTEST_HAS_RTTI macro defined to 0.

Tools:

* TestWebKitAPI/CMakeLists.txt: Build TestWebKitAPI with GTEST_HAS_RTTI macro
defined to 0 to prevent typeid use in included GTest headers.

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

6 years agoRemove OwnPtr.h, PassOwnPtr.h header inclusions in Source/WebCore/html/parser/ code
zandobersek@gmail.com [Sun, 16 Mar 2014 19:57:31 +0000 (19:57 +0000)]
Remove OwnPtr.h, PassOwnPtr.h header inclusions in Source/WebCore/html/parser/ code
https://bugs.webkit.org/show_bug.cgi?id=129667

Reviewed by Anders Carlsson.

Remove unnecessary inclusions of the OwnPtr.h and PassOwnPtr.h headers
in the code under Source/WebCore/html/parser/.

* html/parser/HTMLParserScheduler.h:
* html/parser/HTMLToken.h:
* html/parser/HTMLTreeBuilder.h:
* html/parser/XSSAuditor.h:
* html/parser/XSSAuditorDelegate.h:

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

6 years agoMove GTK WebKit2 code to std::unique_ptr
zandobersek@gmail.com [Sun, 16 Mar 2014 19:47:00 +0000 (19:47 +0000)]
Move GTK WebKit2 code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129672

Reviewed by Anders Carlsson.

Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.

* Shared/Downloads/Download.h:
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::platformInvalidate):
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemCreate):
(webkitContextMenuItemCreateForGtkItem):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::print):
* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::WebGtkExtensionManager::initialize):
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):
* WebProcess/soup/WebSoupRequestManager.h:

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

6 years agoFollow-up: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
ddkilzer@apple.com [Sun, 16 Mar 2014 19:25:57 +0000 (19:25 +0000)]
Follow-up: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
<http://webkit.org/b/130283>
<rdar://problem/16281477>

Reviewed by Darin Adler.

* wtf/text/StringImpl.h:
(WTF::loadUnaligned): Restore behavior prior to r165681 for
compilers other than clang.

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

6 years agoRemove uses of "cat" in DerivedSources.make outside platform-specific rules
darin@apple.com [Sun, 16 Mar 2014 18:50:23 +0000 (18:50 +0000)]
Remove uses of "cat" in DerivedSources.make outside platform-specific rules
https://bugs.webkit.org/show_bug.cgi?id=130307

Reviewed by Anders Carlsson.

* DerivedSources.make: Use "perl -pe ''" instead of "cat".

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

6 years agoWeb Inspector: vended backend commands file should be generated as part of the build
bburg@apple.com [Sun, 16 Mar 2014 18:43:54 +0000 (18:43 +0000)]
Web Inspector: vended backend commands file should be generated as part of the build
https://bugs.webkit.org/show_bug.cgi?id=130110

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Copy InspectorJSBackendCommands.js to the
private headers directory.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Copy InspectorWebBackendCommands.js to the
private headers directory.

Source/WebInspectorUI:

Copy the backend commands generated in other frameworks into our built products directory.

* Configurations/WebInspectorUIFramework.xcconfig: Set up variables so we can pull backend
commands files from the private headers directory of other frameworks.
* Scripts/copy-user-interface-resources.sh: Always ditto inspector backend commands.
* UserInterface/Protocol/InspectorJSBackendCommands.js: Removed.
* UserInterface/Protocol/InspectorWebBackendCommands.js: Removed.
* WebInspectorUI.vcxproj/WebInspectorUIPostBuild.cmd: Copy over the generated
backend commands files from the other frameworks.
* WebInspectorUI.xcodeproj/project.pbxproj: Add JavaScriptCore and WebCore as
framework dependencies so Xcode builds them first.

Source/WebKit2:

* PlatformGTK.cmake: Copy over generated inspector backend commands files.

Tools:

* Scripts/build-webkit: build WebInspectorUI after WebCore but before WebKit.

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

6 years agoRemove all uses of deprecatedCharacters from JavaScriptCore
darin@apple.com [Sun, 16 Mar 2014 17:35:53 +0000 (17:35 +0000)]
Remove all uses of deprecatedCharacters from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=130304

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* API/JSValueRef.cpp:
(JSValueMakeFromJSONString): Use characters16 in the 16-bit code path.
* API/OpaqueJSString.cpp:
(OpaqueJSString::~OpaqueJSString): Use characters 16 in the 16-bit code path.
(OpaqueJSString::identifier): Get rid of custom Identifier constructor, and
juse use the standard one that takes a String.
(OpaqueJSString::characters): Use getCharactersWithUpconvert instead of a
hand-written alternative.

* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue): Create InspectorString from String directly
instead of involving a character pointer. Use the String from Identifier
directly instead of making a new String.

* inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::createSearchRegexSource): Use StringBuilder
instead of building a String a character at a time. This is still a very slow
way to do this. Also use strchr to search for a character instead of building
a String every time just to use find on it.

* inspector/InspectorValues.cpp:
(Inspector::doubleQuoteString): Remove unnecessary trip through a
character pointer. This is still a really slow way to do this.
(Inspector::InspectorValue::parseJSON): Use StringView::upconvertedCharacters
instead of String::deprecatedCharacters. Still slow to always upconvert.

* runtime/DateConstructor.cpp: Removed unneeded include.
* runtime/DatePrototype.cpp: Ditto.

* runtime/Identifier.h: Removed deprecatedCharacters function.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode): Added a type cast to avoid ambiguity with the two character-
appending functions from JSStringBuilder. Removed unneeded code duplicating
what JSStringBuilder already does in its character append function.
(JSC::decode): Deleted code that creates a JSStringBuilder that is never used.
(JSC::parseIntOverflow): Changed lengths to unsigned. Made only the overload that
is used outside this file have external linkage. Added a new overload that takes
a StringView.
(JSC::parseInt): Use StringView::substring to call parseIntOverflow.
(JSC::globalFuncEscape): Use JSBuilder::append in a more efficient way for a
single character.

* runtime/JSGlobalObjectFunctions.h: Removed unused overloads of parseIntOverflow.

* runtime/JSStringBuilder.h: Marked this "lightly deprecated".
(JSC::JSStringBuilder::append): Overloaded for better speed with 8-bit characters.
Made one overload private. Fixed a performance bug where we would reserve capacity
in the 8-bit buffer but then append to the 16-bit buffer.

* runtime/ObjectPrototype.cpp: Removed unneeded include.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncFontsize): Use StringView::getCharactersWithUpconvert.
(JSC::stringProtoFuncLink): Ditto.

Source/WTF:

* wtf/dtoa.h:
(WTF::parseDouble): Added an overload that takes a StringView.

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

6 years ago[regression] foreign content not displayed in MathML
fred.wang@free.fr [Sun, 16 Mar 2014 17:33:48 +0000 (17:33 +0000)]
[regression] foreign content not displayed in MathML
<https://webkit.org/b/124128>

Reviewed by Chris Fleizach.

Source/WebCore:

This restores foreign content in <mtext>, <mn> and <mi> elements, but only when it is "phrasing content" as defined per the HTML5 specification. Other token elements are not handled here. This change makes mspace-units.html work again on Linux.

Tests: mathml/presentation/foreign-mi-dynamic.html
       mathml/presentation/foreign-mi.html
       mathml/presentation/foreign-mn.html
       mathml/presentation/foreign-mtext-rejected.html
       mathml/presentation/foreign-mtext.html

* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer): create a RenderMathMLToken for mn, ms and mtext.
(WebCore::isPhrasingContent): helper function to check phrasing content, as defined by the HTML spec.
(WebCore::MathMLTextElement::childShouldCreateRenderer): <mi>, <mn>, <mtext> and, <ms> now accepts phrasing content.
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::RenderMathMLToken):
(WebCore::RenderMathMLToken::updateTokenContent): initialize the m_containsElement boolean when updating the token content.
(WebCore::RenderMathMLToken::updateStyle): move <mi> specific handling in its own section and only apply the single-char rule when it does not contain elements.
* rendering/mathml/RenderMathMLToken.h: add an m_containsElement boolean to handle token element specifically.

LayoutTests:

* mathml/presentation/foreign-mi-dynamic-expected.html: Added.
* mathml/presentation/foreign-mi-dynamic.html: Added.
* mathml/presentation/foreign-mi-expected-mismatch.html: Added.
* mathml/presentation/foreign-mi.html: Added.
* mathml/presentation/foreign-mn-expected-mismatch.html: Added.
* mathml/presentation/foreign-mn.html: Added.
* mathml/presentation/foreign-mtext-expected-mismatch.html: Added.
* mathml/presentation/foreign-mtext-rejected-expected.html: Added.
* mathml/presentation/foreign-mtext-rejected.html: Added.
* mathml/presentation/foreign-mtext.html: Added.
* platform/efl/TestExpectations: reenable the test.
* platform/gtk/TestExpectations: ditto.

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

6 years agoPlatformTimeRanges::nearest() truncates closestDelta values from double to float
ddkilzer@apple.com [Sun, 16 Mar 2014 17:05:15 +0000 (17:05 +0000)]
PlatformTimeRanges::nearest() truncates closestDelta values from double to float
<http://webkit.org/b/130298>

Reviewed by Darin Adler.

Fixes the following build failures using trunk clang:

    WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
                closestDelta = fabsf(startTime - time);
                               ^
    WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: note: use function 'fabs' instead
                closestDelta = fabsf(startTime - time);
                               ^~~~~
                               fabs
    WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
                closestDelta = fabsf(endTime - time);
                               ^
    WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: note: use function 'fabs' instead
                closestDelta = fabsf(endTime - time);
                               ^~~~~
                               fabs

* platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::nearest): Extract start and end
time deltas into local variables so they don't have to be
computed twice, using fabs() instead of fabsf().

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

6 years agoFTL ArrayifyToStructure shouldn't fail every time that it actually arrayifies
fpizlo@apple.com [Sun, 16 Mar 2014 16:49:16 +0000 (16:49 +0000)]
FTL ArrayifyToStructure shouldn't fail every time that it actually arrayifies
https://bugs.webkit.org/show_bug.cgi?id=130296

Reviewed by Andreas Kling.

During the 32-bit structure ID work, the second load of the structure was removed.
That's wrong. The whole point of loading the structure ID again is that the structure
ID would have been changed by the arrayification call, and we're verifying that the
arrayification succeeded in changing the structure. If we check the old structure - as
the code was doing after the 32-bit structure ID work - then this check is guaranteed
to fail, causing a significant performance regression.

It's actually amazing that the regression wasn't bigger. The reason is that if FTL
code pathologically exits but the equivalent DFG code doesn't, then the exponential
backoff almost perfectly guarantees that we just end up in the DFG. For this code, at
the time at least, the DFG wasn't much slower so this didn't cause too much pain.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileArrayifyToStructure):

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

6 years agoOptimize hasTagName when called on an HTMLElement
darin@apple.com [Sun, 16 Mar 2014 16:38:58 +0000 (16:38 +0000)]
Optimize hasTagName when called on an HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=130090

Reviewed by Antti Koivisto.

Source/WebCore:

Added new hasTagName functions that have the efficiency of hasLocalName.
but are safe.

Now we can always use hasTagName, and we'll get a compile time error if
we try to use an SVG tag name with an HTML element. All call sites that
use the more specific tag name types are more efficient, and call sites
that have a specific pointer type will get even more efficient checking
that is exactly what we used to get by calling hasLocalName.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasTagName): Cast explicitly to Element
since Node::hasTagName no longer works on a general QualifiedName.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isDescendantOfElementType): Use
more specific type, RenderElement, so we can call hasTagName on Element
instead of Node; eliminates an unnecessary branch.

* accessibility/AccessibilityTableColumn.cpp: Added now-needed include.
* accessibility/atk/AccessibilityObjectAtk.cpp: Ditto.

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Use
new for loop and full words for variable names. Also use nullptr instead
of 0. Call toHTMLElement and toSVGElement in code that checks hasTagName
since it's already checking isHTMLElement and isSVGElement.

* dom/Element.cpp:
(WebCore::attrNodeListMap): Use NeverDestroyed and put the vectors into
the map rather than putting pointers to a vector into the map.
(WebCore::attrNodeListForElement): Take a reference rather than a pointer,
and update for the change above.
(WebCore::ensureAttrNodeListForElement): Ditto.
(WebCore::removeAttrNodeListForElement): Ditto.
(WebCore::findAttrNodeInList): Ditto.
(WebCore::Element::isFocusable): Use lineageOfType<HTMLCanvasElement>
to fine the canvas rather than a hand-written loop.
(WebCore::Element::attrNodeList): Update for above changes.
(WebCore::Element::setAttributeNode): Ditto.
(WebCore::Element::attrIfExists): Ditto.
(WebCore::Element::ensureAttr): Ditto.
(WebCore::Element::detachAttrNodeFromElementWithValue): Ditto.
(WebCore::Element::detachAllAttrNodesFromElement): Ditto.

* dom/Element.h: Removed the overload of hasLocalName that takes a
QualifiedName and ignores the non-local-name parts of it. Callers should
use hasTagName instead, now that it's optimized appropriately. Added
overloads of hasTagName for all the specific qualified name types. It's
more efficient to use the Node versions of these functions rather than
using QualifiedName::matches to do the check. Removed the hasTagName and
hasLocalName functions from the Node class; the only convenience functions
needed in Node are the specific checks for tags from HTML, MathML, and SVG,
not the general purpose ones.

* dom/Node.h: Removed hasLocalName and replaced the single hasTagName
that takes a QualifiedName with three faster ones that take HTML, MathML,
and SVG qualified names instead. Also updated to use nullptr instead of 0.

* dom/PositionIterator.cpp: Added now-needed include.
* dom/Text.cpp: Ditto.

* dom/make_names.pl:
(printHeaderHead): Renamed an argument for clarity and added a definitions
argument, which is where we insert the classes derived from QualifiedName.
(printCppHead): Renamed an argument for clarity.
(printTypeHelpers): Use hasTagName rather than hasLocalName, since the
former is now optimized to be the same as what the latter was.
(printNamesHeaderFile): Define a class derived from QualifiedName that can
be used at compile time to avoid having to check the namespace.
(printNamesCppFile): Use the new more-specific type as needed.

* editing/ApplyStyleCommand.cpp:
(WebCore::isLegacyAppleStyleSpan): Use hasTagName instead of hasLocalName,
and references instead of pointers.
(WebCore::ApplyStyleCommand::ApplyStyleCommand): Removed uneeded explicit
construction of a smart pointer.
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun): Updated to use
the enclosingElementWithTag function by its new name.

* editing/Editor.cpp:
(WebCore::Editor::selectionUnorderedListState): Updated to use the
enclosingElementWithTag function by its new name.
(WebCore::Editor::selectionOrderedListState): Ditto.

* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApply): Use a more-specific type for the list tag.
(WebCore::InsertListCommand::doApplyForSingleParagraph): Ditto.
* editing/InsertListCommand.h: Ditto.

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Added an explicit
cast to Element in the loop that is already guarded by an isElementNode check.
Also use a modern C++ for loop.

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
Updated to use the enclosingElementWithTag function by its new name.
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Ditto.
(WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Ditto.

* editing/TypingCommand.cpp: Added now-needed includes.
* editing/VisibleUnits.cpp: Ditto.

* editing/htmlediting.cpp:
(WebCore::enclosingElementWithTag): Changed to return an Element instead of a Node,
since nodes other than elements do not have tags.
* editing/htmlediting.h: Ditto.

* editing/mac/EditorMac.mm:
(WebCore::Editor::adjustedSelectionRange): Updated to use the enclosingElementWithTag
function by its new name.
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendText): Ditto.
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): Ditto.
(WebCore::highestAncestorToWrapMarkup): Ditto.
(WebCore::createMarkupInternal): Ditto.
(WebCore::createContextualFragment): Ditto. Use hasTagName instead of hasLocalName,
since the former is now optimized to be the same as the latter was before.

* html/HTMLCollection.cpp:
(WebCore::isMatchingElement): Use hasTagName instead of hasLocalName,
since the former is now optimized to be the same as the latter was before.
(WebCore::nameShouldBeVisibleInDocumentAll): Ditto.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::ieForbidsInsertHTML): Ditto.
(WebCore::unicodeBidiAttributeForDirAuto): Ditto.
(WebCore::HTMLElement::parseBorderWidthAttribute): Ditto.
(WebCore::HTMLElement::setInnerHTML): Ditto.
(WebCore::shouldProhibitSetInnerOuterText): Ditto. Added this to share code between
setInnerText and setOuterText.
(WebCore::HTMLElement::setInnerText): Ditto.
(WebCore::HTMLElement::setOuterText): Ditto.
(WebCore::HTMLElement::rendererIsNeeded): Ditto.
(WebCore::HTMLElement::createElementRenderer): Ditto.

* html/HTMLElement.h: Added hasTagName, which hides the one inherited from Element
and takes the more-specific HTMLQualifiedName type. This means we don't need to check
the namespace at runtime because it's known at compile time. Also put the
implementation of Node::hasTagName for HTMLQualifiedName into this header.

* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName): Updated for change in return type of
HTMLNames::getHTMLTags.

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add): Use hasTagName inastead of hasLocalName.
(WebCore::HTMLSelectElement::value): Use isHTMLOptionElement instead of hasTagName.
Also use a new style for loop and emptyString() instead of "".
(WebCore::HTMLSelectElement::setValue): Ditto.
(WebCore::HTMLSelectElement::setLength): Ditto.
(WebCore::HTMLSelectElement::searchOptionsForValue): Ditto.
(WebCore::HTMLSelectElement::restoreFormControlState): Ditto.

* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::additionalPresentationAttributeStyle): Use hasTagName
instead of hasLocalName.

* html/HTMLTableRowsCollection.cpp:
(WebCore::isInSection): Updated to use hasTagName and take a reference.
(WebCore::HTMLTableRowsCollection::rowAfter): Pass a reference.

* html/parser/HTMLConstructionSite.cpp: Added now-needed include.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::createCaseMap): Updated to return a map rather than filling one in, and to
be flxible about the type of the table being used.
(WebCore::adjustSVGTagNameCase): Updated to use NeverDestroyed.
(WebCore::adjustAttributes): Added new helper so we can share more code. Updated
template argument names for clarity.
(WebCore::adjustSVGAttributes): Marked this inline, since it just turns around and
calls a single non-inline function.
(WebCore::adjustMathMLAttributes): Ditto.
(WebCore::addNamesWithPrefix): Changed to take argument by reference instead of pointer.
(WebCore::createForeignAttributesMap): Added. Factors out the map creation from the
function below.
(WebCore::adjustForeignAttributes): Updated for above changes.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to pass reference.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.

* inspector/InspectorStyleSheet.cpp: Added now-needed include.

* mathml/MathMLElement.h: Added hasTagName, which hides the one inherited from Element
and takes the more-specific MathMLQualifiedName type. This means we don't need to check
the namespace at runtime because it's known at compile time. Also put the
implementation of Node::hasTagName for MathMLQualifiedName into this header.

* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer): Use hasTagName.

* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::attributeChanged): Use hasTagName.
(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex): Ditto.
(WebCore::MathMLSelectElement::getSelectedActionChild): Ditto.
(WebCore::MathMLSelectElement::getSelectedSemanticsChild): Ditto.
(WebCore::MathMLSelectElement::updateSelectedChild): Ditto.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer): Ditto.
(WebCore::MathMLTextElement::childShouldCreateRenderer): Ditto.

* platform/gtk/PasteboardGtk.cpp: Added now-needed include.
* platform/mac/HTMLConverter.mm: Ditto.
* rendering/RenderBlockFlow.cpp: Ditto.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Use hasTagName.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::rendererForRootBackground): Ditto.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Ditto.

* rendering/RenderReplaced.cpp: Added now-needed include.

* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::RenderMathMLScripts): Use hasTagName.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): Ditto.

* svg/SVGElement.h: Added hasTagName, which hides the one inherited from Element
and takes the more-specific SVGQualifiedName type. This means we don't need to check
the namespace at runtime because it's known at compile time. Also put the
implementation of Node::hasTagName for SVGQualifiedName into this header.

* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged): Use isSVGFontFaceElement instead
of calling hasTagName.

* svg/SVGUseElement.cpp:
(WebCore::isDirectReference): Changed to take a reference and a more specific type.
(WebCore::SVGUseElement::toClipPath): Added a type cast.
(WebCore::SVGUseElement::rendererClipChild): Use more specific types so we don't
need a type cast.

* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::parseDocumentFragment): Added explicit calls to this
unusual call site that has a good reason to use hasLocalName instead of hasTagName.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Updated exports for QualifiedName -> HTMLQualifiedName change.

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

6 years agoTry to fix 32-bit Mac build.
darin@apple.com [Sun, 16 Mar 2014 15:15:57 +0000 (15:15 +0000)]
Try to fix 32-bit Mac build.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.

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