WebKit-https.git
6 years agoRun tests as if they are expected to pass when --force is given.
commit-queue@webkit.org [Thu, 31 Oct 2013 18:13:10 +0000 (18:13 +0000)]
Run tests as if they are expected to pass when --force is given.
https://bugs.webkit.org/show_bug.cgi?id=112890

Patch by Tamas Gergely <gertom@inf.u-szeged.hu> on 2013-10-31
Reviewed by Ryosuke Niwa.

The --force switch of new-run-webkit-tests is now forces all tests to
be run with 'PASS' as expected result.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.__init__):
(TestExpectations._add_expectations):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
(_set_up_derived_options):

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

6 years agoChange WebPage, WebPageProxy, WebPageCreationParameters to use ViewState
barraclough@apple.com [Thu, 31 Oct 2013 18:05:25 +0000 (18:05 +0000)]
Change WebPage, WebPageProxy, WebPageCreationParameters to use ViewState
https://bugs.webkit.org/show_bug.cgi?id=123379

Reviewed by Darin Adler.

Visibility state of the Page should be stored and communicated consistently.

Remove individual visibility flags from WebPageProxy, WebPageCreationParameters,
and replace them with a ViewState, and add a ViewState member to WebPage.
Merge together all messages that convey and individual aspect of the ViewState.

Restructure WebPageProxy::viewStateDidChange to break the operation down into
three steps: 1) update m_viewState, 2) send the new ViewState to the WebProcess,
and 3) perform any further work necessary in the UIProcess.

This patch fixes a problem that if the web process crashes m_isVisible &
m_isInWindow in WebPageProxy were not updated, and could have held stale values
on reattach.

In WebPage, add a new message to update the entire ViewState - diff the prior
value against the new one to detect changes, call existing methods accordingly.

* Shared/ViewState.h:
    - Add constants 'Reset', 'AllFlags'
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
    - Removed boolean visibility flags, added viewState.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - Constructor calls updateViewState to initialize m_viewState.
(WebKit::WebPageProxy::reattachToWebProcess):
    - ViewStaet is not updated while detatched; recalculate.
(WebKit::WebPageProxy::initializeWebPage):
    - m_isVisible -> isViewVisible()
(WebKit::WebPageProxy::updateViewState):
    - Added, update m_viewState by querying the page client.
(WebKit::WebPageProxy::viewStateDidChange):
    - Restructured to use m_viewState, reordered to combine messages.
(WebKit::WebPageProxy::creationParameters):
    - Removed boolean visibility flags, added viewState.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isInWindow):
(WebKit::WebPageProxy::isViewVisible):
    - Removed boolean visibility flags, added viewState.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
    - initial state now passed as a ViewState.
(WebKit::WebPage::setIsInWindow):
    - Remove code to send reply (this is handled by setViewState).
(WebKit::WebPage::setViewState):
    - Set m_viewState - diff from prior & call methods to update.
* WebProcess/WebPage/WebPage.h:
    - Added setViewState, m_viewState.
* WebProcess/WebPage/WebPage.messages.in:
    - Add SetViewState, remove individual messages.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
    - initial state now passed as a ViewState.

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

6 years ago2013-10-31 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 31 Oct 2013 18:03:41 +0000 (18:03 +0000)]
2013-10-31  Geoffrey Garen  <ggaren@apple.com>

        Added Mark Lam as a reviewer.

        Unreviewed.

        * Scripts/webkitpy/common/config/contributors.json:

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

6 years ago[WIN] Make WebHistory compile without USE(CF)
paroga@webkit.org [Thu, 31 Oct 2013 18:02:54 +0000 (18:02 +0000)]
[WIN] Make WebHistory compile without USE(CF)
https://bugs.webkit.org/show_bug.cgi?id=122010

Reviewed by Brent Fulgham.

Add an alternative code path for !USE(CF) to be able to
compile WebHistory without the CoreFoundation library.

* COMVariantSetter.h: Add support for setting a Vector.
* WebHistory.cpp:
(createUserInfoFromArray):
(createUserInfoFromHistoryItem):
(WebHistory::removeAllItems):
(WebHistory::removeItem):
(WebHistory::addItem):
(WebHistory::visitedURL):
* WebHistory.h:

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

6 years agoWebPageCreationParameters should be consistent in Window.open
barraclough@apple.com [Thu, 31 Oct 2013 17:48:33 +0000 (17:48 +0000)]
WebPageCreationParameters should be consistent in Window.open
https://bugs.webkit.org/show_bug.cgi?id=123557

Reviewed by Sam Weinig.

When Window.open in called in WebKit2 the WebProcess sends a synchronous request to open
a page (WebPageProxy::createNewPage). The UIProcess creates a WebpageProxy, and responds
with instructions to the WebProcess to create the WebPage. The initial creation state of
the WebPage is communicated to the WebProcess via two routes (firstly an asynchronous
WebProcess::CreateWebPage message, and secondly in the synchronous response from
WebPageProxy::createNewPage). Unfortunately these responses are inconsistent with each
other. The creationParameters() for the page are calculated twice, and since the WKView
will be added to a window between the async message being sent and the synchronous reply
being returned the visibility state of the page can change.

To fix the inconsistency we can set the creation parameters at the point that the
WebPageProxy is instantiated. This will result in a functional change that is web
visible, since the page will initially be opened in a hidden/blurred state, and may
later become visible/focussed. This change is consistent with the direction we want to
evolve in. Whilst we will still probably require a synchronous message from the
WebProcess to the UIProcess on Window.open, we'll probably make this return much earlier
– having just created the WebPageProxy, but avoiding blocking the WebProcess over the
client delegate callback that opens the new window.

This fix results in a layout test result change, due to the change in behavior (page is
created blurred, and becomes focussed, resulting in a focus event being fired – rather
than the window opening directly into a focussed state). This is reported as a
progression (test is broken in WebKit1, fixed in WebKit2 after this change). In reality
the test is actually slightly broken in DRT/test-runner – the test runs differently than
in browser, since there is is no visible main window. In-browser this patch results in
no change in behavior on dom/Window/mozilla-focus-blur.html (the affected test).

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
    - call initializeCreationParameters
(WebKit::WebPageProxy::initializeCreationParameters):
    - calculate m_creationParameters
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::creationParameters):
    - Added m_creationParameters, initializeCreationParameters,
      creationParameters returns m_creationParameters

LayoutTests:

* platform/mac-wk2/fast/dom/Window: Added.
* platform/mac-wk2/fast/dom/Window/mozilla-focus-blur-expected.txt: Added.
    - This test now reports a pass on WebKit2

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

6 years agoPass an Element by reference to the PseudoElement constructor
weinig@apple.com [Thu, 31 Oct 2013 17:41:05 +0000 (17:41 +0000)]
Pass an Element by reference to the PseudoElement constructor
https://bugs.webkit.org/show_bug.cgi?id=123576

Reviewed by Andreas Kling.

* dom/Element.cpp:
(WebCore::Element::createPseudoElementIfNeeded):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
* dom/PseudoElement.h:

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

6 years agoFix a mis-merge.
ap@apple.com [Thu, 31 Oct 2013 17:39:56 +0000 (17:39 +0000)]
Fix a mis-merge.

* WebCore.xcodeproj/project.pbxproj: Remove duplicate CryptoAlgorithmRegistryMac.cpp.

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

6 years agoAdd bindings code for crypto algorithm dictionaries
ap@apple.com [Thu, 31 Oct 2013 17:33:08 +0000 (17:33 +0000)]
Add bindings code for crypto algorithm dictionaries
https://bugs.webkit.org/show_bug.cgi?id=123476

Reviewed by Sam Weinig.

JSCryptoAlgorithmDictionary reads the Algorithm, much like JSDictionary does in
simpler cases. We should see about bringing them closer together (perhaps replacing
with autogenerated code).

* crypto/parameters: Added.
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added.
* crypto/parameters/CryptoAlgorithmHmacParams.h: Added.
Added a couple specific dictionaries as an example.

* WebCore.xcodeproj/project.pbxproj: Added JSCryptoAlgorithmDictionary.
* bindings/js/JSCryptoAlgorithmDictionary.cpp: Added.
(WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
(WebCore::getHashAlgorithm):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
* bindings/js/JSCryptoAlgorithmDictionary.h: Added.

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

6 years agoPass ScriptExecutionContext by reference to from the bindings constructors
weinig@apple.com [Thu, 31 Oct 2013 17:26:35 +0000 (17:26 +0000)]
Pass ScriptExecutionContext by reference to from the bindings constructors
https://bugs.webkit.org/show_bug.cgi?id=123575

Reviewed by Andreas Kling.

Since we null check the ScriptExecutionContext before creating the c++ class,
we should be passing by reference.

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

6 years agoPaint the input tag of range type on WinCE port.
commit-queue@webkit.org [Thu, 31 Oct 2013 17:17:37 +0000 (17:17 +0000)]
Paint the input tag of range type on WinCE port.
https://bugs.webkit.org/show_bug.cgi?id=123199

Patch by Zhuang Zhigang <zhuangzg@cn.fujitsu.com> on 2013-10-31
Reviewed by Brent Fulgham.

* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintSliderTrack):
(WebCore::RenderThemeWinCE::paintSliderThumb):

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

6 years agoAdd a crypto algorithm abstraction
ap@apple.com [Thu, 31 Oct 2013 17:13:49 +0000 (17:13 +0000)]
Add a crypto algorithm abstraction
https://bugs.webkit.org/show_bug.cgi?id=123474

Reviewed by Sam Weinig.

This works slightly differently than WebCrypto implies. We have separate classes
for algorithm and its parameters, while WebCrypto puts them in the same dictionary.

* WebCore.xcodeproj/project.pbxproj: Added new files.

* crypto/CryptoAlgorithm.cpp: Added. As most algorithms don't implement most
operations, default implementations just raise an exception.
* crypto/CryptoAlgorithm.h: Added.

* crypto/CryptoAlgorithmParameters.h: Added. Base class for numerous future parameter
dictionaries, such as HmacParams or HmacKeyParams.

* crypto/CryptoAlgorithmRegistry.cpp: Added.
* crypto/CryptoAlgorithmRegistry.h: Added.
The registry decouples universal bindings code from algorithms that may or may not
be implemented on each platform.

* crypto/mac: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp: Added.
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Algorithms implemented
on Mac will be registered by this function.

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

6 years agoREGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequ...
ap@apple.com [Thu, 31 Oct 2013 16:50:03 +0000 (16:50 +0000)]
REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequest-overridemimetype-content-type-header.html are failing
https://bugs.webkit.org/show_bug.cgi?id=123548

Reviewed by Brady Eidson.

Source/WebCore:

We had code that made sure that cached 200 responses weren't used for conditional
requests. But it didn't work the other way - cached 304 responses got reused for
subsequent unconditional requests!

Adding the test uncovered this bug.

* loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse):
Should never ignore conditional headers. Code in determineRevalidationPolicy
was already undoing this for conditional requests, but we also shouldn't use
WebCore cache if it holds a 304 response to conditional request.

* loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy):
Even though the changed code is only for raw resources, I think that we can never
get a conditional request here any more.

LayoutTests:

* TestExpectations: Unskip tests that used to be affected by response-empty-arraybuffer.html

* http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt:
* http/tests/xmlhttprequest/response-empty-arraybuffer.html:
Fix a stupid typo. This test actually fully passes.

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

6 years agoCryptoAlgorithmDescriptionBuilder should support producing nested algorithms
ap@apple.com [Thu, 31 Oct 2013 16:28:14 +0000 (16:28 +0000)]
CryptoAlgorithmDescriptionBuilder should support producing nested algorithms
https://bugs.webkit.org/show_bug.cgi?id=123461

Reviewed by Darin Adler.

To add a nested algorithm, clone a builder with createEmptyClone(), fill it,
and add it using add().

* bindings/js/JSCryptoAlgorithmBuilder.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
(WebCore::JSCryptoAlgorithmBuilder::createEmptyClone):
(WebCore::JSCryptoAlgorithmBuilder::add): Keep VM in a local variable for marginally
better performance.

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

6 years ago[WK2][GTK] enable-media-stream Setting
philn@webkit.org [Thu, 31 Oct 2013 15:35:02 +0000 (15:35 +0000)]
[WK2][GTK] enable-media-stream Setting
https://bugs.webkit.org/show_bug.cgi?id=123145

Reviewed by Anders Carlsson.

Source/WebCore:

* page/Settings.in: new mediaStreamEnabled setting.

Source/WebKit2:

* Shared/WebPreferencesStore.h: New MediaStreamEnabled boolean preference.
* UIProcess/API/C/WKPreferences.cpp: MediaStreamEnabled getter and
setter functions.
(WKPreferencesSetMediaStreamEnabled):
(WKPreferencesGetMediaStreamEnabled):
* UIProcess/API/C/WKPreferences.h:
* UIProcess/API/gtk/WebKitSettings.cpp: Add a enable-media-stream
property to the GTK WebKitSettings class. It will act as a facade
to the MediaStreamEnabled preference.
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_media_stream):
(webkit_settings_set_enable_media_stream):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Test enable-media-stream websetting.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
Allow WKTR to override the MediaStreamEnabled preference.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update MediaStreamEnabled
along with the other settings.

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

6 years agoManage SVGPathByteStream through std::unique_ptr
zandobersek@gmail.com [Thu, 31 Oct 2013 15:29:28 +0000 (15:29 +0000)]
Manage SVGPathByteStream through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=123467

Reviewed by Anders Carlsson.

Manage SVGPathByteStream objects through std::unique_ptr. Constructors for the class are made public
so std::make_unique can be used with the class.

* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::constructFromString):
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::createPath):
* svg/SVGAnimatedType.h:
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::SVGPathByteStream): Takes a const Data object that's then copied.
(WebCore::SVGPathByteStream::copy): Made const.
* svg/SVGPathByteStreamBuilder.cpp: Remove an unnecessary include.
* svg/SVGPathByteStreamBuilder.h: Ditto.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
* svg/SVGPathElement.h:
* svg/SVGPathUtilities.cpp:
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
(WebCore::addToSVGPathByteStream):

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

6 years ago[EFL] Rebaselining after r158186
commit-queue@webkit.org [Thu, 31 Oct 2013 15:29:17 +0000 (15:29 +0000)]
[EFL] Rebaselining after r158186
https://bugs.webkit.org/show_bug.cgi?id=123571

Unreviewed gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-10-31

* platform/efl/editing/deleting/smart-delete-003-expected.txt: Rebaselining after r158186.
* platform/efl/editing/deleting/smart-delete-004-expected.txt: Rebaselining after r158186.
* platform/efl/editing/selection/after-line-wrap-expected.txt: Rebaselining after r157851.

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

6 years agoRemoving m_maxDeadCapacity condition in fast path in MemoryCache::prune().
commit-queue@webkit.org [Thu, 31 Oct 2013 14:07:48 +0000 (14:07 +0000)]
Removing m_maxDeadCapacity condition in fast path in MemoryCache::prune().
https://bugs.webkit.org/show_bug.cgi?id=115631

Patch by Marcin Bychawski <m.bychawski@samsung.com> on 2013-10-31
Reviewed by Brent Fulgham.

If the m_maxDeadSize and m_deadSize are both 0, the method unnecessairly tries to prune resources.

No new tests, covered by existing ones.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::prune):

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

6 years agoWeb Inspector: Remove stale optional native memory instrumentation protocol params
commit-queue@webkit.org [Thu, 31 Oct 2013 12:02:51 +0000 (12:02 +0000)]
Web Inspector: Remove stale optional native memory instrumentation protocol params
https://bugs.webkit.org/show_bug.cgi?id=123552

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

Source/WebCore:

* inspector/Inspector.json:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
* inspector/InspectorTimelineAgent.h:

Source/WebInspectorUI:

* UserInterface/InspectorBackendCommands.js:

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

6 years ago[GTK] Undefined references to RenderObject::style() when disabling video support
zandobersek@gmail.com [Thu, 31 Oct 2013 09:14:49 +0000 (09:14 +0000)]
[GTK] Undefined references to RenderObject::style() when disabling video support
https://bugs.webkit.org/show_bug.cgi?id=123492

Reviewed by Carlos Garcia Campos.

* platform/gtk/RenderThemeGtk2.cpp: Disabling video support removes indirect inclusion of the RenderElement.h
header, causing undefined references to RenderObject::style(). The RenderElement.h header should be included
instead of RenderObject.h as the former defines the RenderObject::style() inline and also includes the latter.
* platform/gtk/RenderThemeGtk3.cpp: Ditto.

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

6 years ago[EFL] Add baselines for spelling tests added in r157900.
g.czajkowski@samsung.com [Thu, 31 Oct 2013 08:55:48 +0000 (08:55 +0000)]
[EFL] Add baselines for spelling tests added in r157900.

Unreviewed gardening.

* platform/efl/editing/spelling/centering-misspelling-dots-expected.png: Added.
* platform/efl/editing/spelling/centering-misspelling-dots-expected.txt: Added.
* platform/efl/editing/spelling/misspelling-dots-dont-extend-beyond-words-expected.png: Added.
* platform/efl/editing/spelling/misspelling-dots-dont-extend-beyond-words-expected.txt: Added.

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

6 years agoUnreviewed EFL gardening. Add 5 printing tests to EFL TestExpectations.
gyuyoung.kim@samsung.com [Thu, 31 Oct 2013 08:44:43 +0000 (08:44 +0000)]
Unreviewed EFL gardening. Add 5 printing tests to EFL TestExpectations.
EFL port doesn't fully support printing functionality yet.

* platform/efl/TestExpectations:

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

6 years ago[EFL] accessibility/textbox-role-reports-selection.html is failing
commit-queue@webkit.org [Thu, 31 Oct 2013 08:38:28 +0000 (08:38 +0000)]
[EFL] accessibility/textbox-role-reports-selection.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112017

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-31
Reviewed by Mario Sanchez Prada.

Source/WebCore:

getSelectionOffsetsForObject() now returns proper start/end offsets for
selections "touching" the object's front border.

No new tests, covered by existing ones.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getSelectionOffsetsForObject):

LayoutTests:

Removed failure expectations.

* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.

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

6 years ago.: [EFL][GLES] OpenGL should be an optional
ryuan.choi@samsung.com [Thu, 31 Oct 2013 07:11:07 +0000 (07:11 +0000)]
.: [EFL][GLES] OpenGL should be an optional
https://bugs.webkit.org/show_bug.cgi?id=123399

Reviewed by Noam Rosenthal.

* Source/cmake/OptionsEfl.cmake:
Refactor the check routine of GL dependencies to use OpenGL as optional.

Source/WebCore: [EFL][GLES] OpenGL should be optional
https://bugs.webkit.org/show_bug.cgi?id=123399

Reviewed by Noam Rosenthal.

* CMakeLists.txt: Make OpenGL dependencies as optional.
* PlatformEfl.cmake:
Move OpenGL macro to OptionsEfl.cmake and make Xcomposite and XRender as optional.
* platform/graphics/OpenGLESShims.h:
Removed GL_COLOR_ATTACHMENT0_EXT because it was added to gl2ext.h since r153064
* platform/graphics/surfaces/GraphicsSurfaceToken.h:
Removed wrong GLX guard.
(WebCore::GraphicsSurfaceToken::GraphicsSurfaceToken):
(WebCore::GraphicsSurfaceToken::operator!=):
(WebCore::GraphicsSurfaceToken::isValid):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
Removed unnecessary OpenGLShims.h

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

6 years ago[webcore/editing] remove extra header includes from cpp files.
commit-queue@webkit.org [Thu, 31 Oct 2013 06:41:24 +0000 (06:41 +0000)]
[webcore/editing] remove extra header includes from cpp files.
https://bugs.webkit.org/show_bug.cgi?id=123524

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-30
Reviewed by Ryosuke Niwa.

Removing redundant header files.

* editing/AlternativeTextController.cpp:
* editing/ApplyBlockElementCommand.cpp:
* editing/ApplyStyleCommand.cpp:
* editing/BreakBlockquoteCommand.cpp:
* editing/DeleteButton.cpp:
* editing/DeleteButtonController.cpp:
* editing/DeleteSelectionCommand.cpp:
* editing/DictationCommand.cpp:
* editing/EditCommand.cpp:
* editing/EditingStyle.cpp:
* editing/EditorCommand.cpp:
* editing/FrameSelection.cpp:
* editing/IndentOutdentCommand.cpp:
* editing/InsertLineBreakCommand.cpp:
* editing/InsertParagraphSeparatorCommand.cpp:
* editing/MarkupAccumulator.h:
* editing/RemoveFormatCommand.cpp:
* editing/RenderedPosition.cpp:
* editing/ReplaceSelectionCommand.cpp:
* editing/SpellChecker.cpp:
* editing/SpellingCorrectionCommand.cpp:
* editing/SurroundingText.cpp:
* editing/TextCheckingHelper.cpp:
* editing/TextIterator.cpp:
* editing/TypingCommand.cpp:
* editing/VisibleSelection.cpp:
* editing/VisibleUnits.cpp:
* editing/WrapContentsInDummySpanCommand.cpp:
* editing/htmlediting.cpp:

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

6 years agoUnreviewed, rolling out r158299.
commit-queue@webkit.org [Thu, 31 Oct 2013 06:32:43 +0000 (06:32 +0000)]
Unreviewed, rolling out r158299.
http://trac.webkit.org/changeset/158299
https://bugs.webkit.org/show_bug.cgi?id=123558

caused assertion failures in fast/canvas/canvas-color-
serialization.html and fast/forms/input-text-paste-
maxlength.html (Requested by rniwa on #webkit).

* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):

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

6 years agoIDB Database versions are uint64_t, not int64_t
beidson@apple.com [Thu, 31 Oct 2013 06:27:02 +0000 (06:27 +0000)]
IDB Database versions are uint64_t, not int64_t
https://bugs.webkit.org/show_bug.cgi?id=123556

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* Modules/indexeddb/IDBBackingStoreInterface.h:

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::openConnection):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:

* Modules/indexeddb/IDBFactoryBackendInterface.h:

* Modules/indexeddb/IDBPendingOpenCall.h:
(WebCore::IDBPendingOpenCall::create):
(WebCore::IDBPendingOpenCall::version):
(WebCore::IDBPendingOpenCall::IDBPendingOpenCall):

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):

* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:

* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::open):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

Source/WebKit2:

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

* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
(WebKit::WebProcessIDBDatabaseBackend::openConnection):
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:

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

6 years ago[Gtk] Build is failing after r158317
commit-queue@webkit.org [Thu, 31 Oct 2013 06:25:12 +0000 (06:25 +0000)]
[Gtk] Build is failing after r158317
https://bugs.webkit.org/show_bug.cgi?id=123544

Patch by Brendan Long <b.long@cablelabs.com> on 2013-10-30
Reviewed by Alexey Proskuryakov.

No new tests since this just fixes the build.

* GNUmakefile.list.am: Add JSCryptoKey.cpp and JSCryptoKey.h

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

6 years agoManage EllipsisBox objects with unique_ptr.
akling@apple.com [Thu, 31 Oct 2013 05:51:52 +0000 (05:51 +0000)]
Manage EllipsisBox objects with unique_ptr.
<https://webkit.org/b/123554>

Use smart pointers to store ellipsis boxes instead of new/delete.

Reviewed by Anders Carlsson.

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

6 years ago[Gtk] Build is failing after r158317
ap@apple.com [Thu, 31 Oct 2013 05:37:06 +0000 (05:37 +0000)]
[Gtk] Build is failing after r158317
https://bugs.webkit.org/show_bug.cgi?id=123544

Use a correct style for JSC includes.

* ForwardingHeaders/runtime/JSPromise.h: Added.
* ForwardingHeaders/runtime/JSPromiseResolver.h: Added.
* bindings/js/JSDOMPromise.h:

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

6 years agoAdd two crash expectations per bug 123555.
rniwa@webkit.org [Thu, 31 Oct 2013 05:02:03 +0000 (05:02 +0000)]
Add two crash expectations per bug 123555.

* TestExpectations:

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

6 years agoReplace InlineBox::destroy() with regular virtual destruction.
akling@apple.com [Thu, 31 Oct 2013 04:15:24 +0000 (04:15 +0000)]
Replace InlineBox::destroy() with regular virtual destruction.
<https://webkit.org/b/123550>

Move logic out of destroy() and its overloads into good ol' virtual
destructors instead.

Reviewed by Anders Carlsson.

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

6 years agoTeach the style checker about ENUM_CLASS
ap@apple.com [Thu, 31 Oct 2013 04:11:02 +0000 (04:11 +0000)]
Teach the style checker about ENUM_CLASS
https://bugs.webkit.org/show_bug.cgi?id=123528

Reviewed by Andy Estes.

* Scripts/webkitpy/style/checkers/cpp.py:
(_EnumState.process_clean_line): Make content of an ENUM_CLASS declaration
equivalent to enum content for checking.
(check_braces): Allow semicolon at the end.

* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(NoNonVirtualDestructorsTest.test_enum_casing):
(NoNonVirtualDestructorsTest.test_enum_trailing_semicolon):
(WebKitStyleTest.test_braces):
Test it.

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

6 years agoAssertion failure in js/dom/global-constructors-attributes-dedicated-worker.html
fpizlo@apple.com [Thu, 31 Oct 2013 03:52:23 +0000 (03:52 +0000)]
Assertion failure in js/dom/global-constructors-attributes-dedicated-worker.html
https://bugs.webkit.org/show_bug.cgi?id=123551
<rdar://problem/15356238>

Reviewed by Mark Hahnenberg.

WatchpointSets have always had this "fire everything on deletion" policy because it
seemed like a good fail-safe at the time I first implemented WatchpointSets. But
it's actually causing bugs rather than providing safety:

- Everyone who registers Watchpoints with WatchpointSets have separate mechanisms
  for either keeping the WatchpointSets alive or noticing when they are collected.
  So this wasn't actually providing any safety.

  One example of this is Structures, where:

  - CodeBlocks that register Watchpoints on Structure's WatchpointSet will also
    register weak references to the Structure, and the GC will jettison a CodeBlock
    if the Structure(s) it cares about dies.

  - StructureStubInfos that register Watchpoints on Structure's WatchpointSet will
    also be cleared by GC if the Structures die.

- The WatchpointSet destructor would get invoked from finalization/destruction.
  This would then cause CodeBlock::jettison() to be called on a CodeBlock, but that
  method requires doing things that access heap objects. This would usually cause
  problems on VM destruction, since then the CodeBlocks would still be alive but the
  whole heap would be destroyed.

This also ensures that CodeBlock::jettison() cannot cause a GC. This is safe since
that method doesn't really allocate objects, and it is likely necessary because
jettison() may be called from deep in the stack.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettison):
* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::~WatchpointSet):
* bytecode/Watchpoint.h:

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

6 years agoFixed a potential race condition around the initializtion of WKObject’s target.
mitz@apple.com [Thu, 31 Oct 2013 03:37:00 +0000 (03:37 +0000)]
Fixed a potential race condition around the initializtion of WKObject’s target.

Reviewed by Mark Rowe.

* Shared/Cocoa/WKObject.mm:
(initializeTargetIfNeeded): Removed the early return if _target is non-nil. As Mark pointed
out, when stores are reordered relative to other stores, it is possible for the early return
to occur while the object _target is pointing to is not yet valid.

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

6 years agokill-old-processes should kill Web Socket script
rniwa@webkit.org [Thu, 31 Oct 2013 03:07:58 +0000 (03:07 +0000)]
kill-old-processes should kill Web Socket script
https://bugs.webkit.org/show_bug.cgi?id=123546

Reviewed by Benjamin Poulain.

* BuildSlaveSupport/kill-old-processes:
(main):

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

6 years agoREGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and
rniwa@webkit.org [Thu, 31 Oct 2013 02:36:12 +0000 (02:36 +0000)]
REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and
xmlhttprequest-overridemimetype-content-type-header.html are failing
https://bugs.webkit.org/show_bug.cgi?id=123548

Add the failing test expectation.

* TestExpectations:

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

6 years agoSimplifying MediaStream and MediStreamDescriptor creation
commit-queue@webkit.org [Thu, 31 Oct 2013 01:15:20 +0000 (01:15 +0000)]
Simplifying MediaStream and MediStreamDescriptor creation
https://bugs.webkit.org/show_bug.cgi?id=123443

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

The internal process of creating a MediaStream and MediaStreamDescriptor was quite confusing and spread.
We can take advantage of the platform implementation of MediaStreamTrack (aka MediaStreamTrackPrivate)
and simplify the whole process.
A new constructor that receives vectors of MediaStreamTrackPrivate objects were added, then the check
if a source already exists or if the tracks are all ended are now made in MediaStreamDescriptor.

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create): Removed unnecessary variables in one create method and using new
MediaStreamDescriptor::create method that receives vector of MediaStreamTrackPrivate objects as parameter.

* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): Removed passing flag to
MediaStreamDescriptor create.

* platform/mediastream/MediaStreamDescriptor.cpp:
(WebCore::MediaStreamDescriptor::create): Removed EndedAtCreationFlag parameter, because this is being
handled inside constructor by analyzing the tracks or sources passed.
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Adding new constructor that receives vector of
MediaStreamTrackPrivate as parameter.

(WebCore::MediaStreamDescriptor::addTrack): Changed to store the track's source in the object.

(WebCore::MediaStreamDescriptor::removeTrack):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::numberOfAudioTracks):
(WebCore::MediaStreamDescriptor::audioTracks):
(WebCore::MediaStreamDescriptor::numberOfVideoTracks):
(WebCore::MediaStreamDescriptor::videoTracks):
* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::MockMediaStreamCenter::createMediaStream): Removing flag that is being passed to
MediaStreamDescriptor's create method.

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

6 years agoVersioning.
lforschler@apple.com [Thu, 31 Oct 2013 01:07:31 +0000 (01:07 +0000)]
Versioning.

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

6 years ago[Win] Legible Output callbacks should happen on notification queue
bfulgham@apple.com [Thu, 31 Oct 2013 00:50:06 +0000 (00:50 +0000)]
[Win] Legible Output callbacks should happen on notification queue
https://bugs.webkit.org/show_bug.cgi?id=123545

Reviewed by Eric Carlson.

Modify the callback creation for Legible Output items so that they
are made on our notification queue. The use of the main queue was a
holdover from some temporary code used during earlier development.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::AVFWrapper): Assert this happens on the main thread.
(WebCore::AVFWrapper::~AVFWrapper): Ditto.
(WebCore::destroyAVFWrapper): Ditto.
(WebCore::AVFWrapper::createPlayer): Ditto.
(WebCore::AVFWrapper::createPlayerItem): Ditto.
Also, instruct LegibleOutput callbacks to happen on our notification
queue, rather than the main thread.
(WebCore::AVFWrapper::createAVCFVideoLayer): Assert this happens on the main thread.
(WebCore::AVFWrapper::destroyVideoLayer): Ditto.
(WebCore::AVFWrapper::createImageGenerator): Ditto.
(WebCore::AVFWrapper::destroyImageGenerator): Ditto.

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

6 years agoXHR.response is null when requesting empty file as arraybuffer
ap@apple.com [Thu, 31 Oct 2013 00:32:58 +0000 (00:32 +0000)]
XHR.response is null when requesting empty file as arraybuffer
https://bugs.webkit.org/show_bug.cgi?id=123457

Source/WebCore:

Reviewed by Sam Weinig.

Test: http/tests/xmlhttprequest/response-empty-arraybuffer.html

* xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseArrayBuffer): Don't do this.

LayoutTests:

Based on a Blink test by yusukesuzuki@chromium.org.

Reviewed by Sam Weinig.

Failures in expected results appear to mean that Blink caches XHR responses in more
cases. It's not directly related to the patch.

* http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt: Added.
* http/tests/xmlhttprequest/response-empty-arraybuffer.html: Added.

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

6 years agoAX: AXFocused not exposed on ARIA menuitems
samuel_white@apple.com [Thu, 31 Oct 2013 00:31:43 +0000 (00:31 +0000)]
AX: AXFocused not exposed on ARIA menuitems
https://bugs.webkit.org/show_bug.cgi?id=123494

Reviewed by Chris Fleizach.

Source/WebCore:

ARIA menuitems should expose AXFocused accessibility attribute.

Test: platform/mac/accessibility/aria-menuitem-focus.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):

LayoutTests:

Adding test to make sure ARIA menuitems expose each piece of their focus state correctly.

* platform/mac/accessibility/aria-menuitem-focus-expected.txt: Added.
* platform/mac/accessibility/aria-menuitem-focus.html: Added.

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

6 years agoWeb Inspector: Remove basic uses of InspectorState from agents
commit-queue@webkit.org [Thu, 31 Oct 2013 00:26:12 +0000 (00:26 +0000)]
Web Inspector: Remove basic uses of InspectorState from agents
https://bugs.webkit.org/show_bug.cgi?id=123534

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

* inspector/InspectorAgent.h:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::disable):
(WebCore::InspectorAgent::evaluateForTestInFrontend):
(WebCore::InspectorAgent::inspect):
InspectorAgentState::inspectorAgentEnabled -> m_enabled.

* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::enable):
Remove unused state.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::enable):
(WebCore::InspectorCSSAgent::disable):
(WebCore::InspectorCSSAgent::startSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
Remove unused states. Make CSSAgentState::isSelectorProfiling check profile object exists or not.

* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::disable):
Remove unused state, member variable already existed.

* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
ConsoleAgentState::consoleMessagesEnabled already had m_enabled.
ConsoleAgentState::monitoringXHR -> m_monitoringXHREnabled.

* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::clearFrontend):
(WebCore::InspectorDOMAgent::setDocument):
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::mainFrameDOMContentLoaded):
DOMAgentState::documentRequested -> m_documentRequested.

* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
DOMDebuggerAgentState::pauseOnAllXHRs -> m_pauseOnAllXHRsEnabled.

* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::enable):
(WebCore::InspectorDOMStorageAgent::disable):
(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
DOMStorageAgentState::domStorageAgentEnabled -> m_enabled.

* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::disable):
Remove unused state, m_enabled already existed.

* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::enabled):
(WebCore::InspectorDebuggerAgent::clearFrontend):
(WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
DebuggerAgentState::pauseOnExceptionsState removed, never read.
DebuggerAgentState::debuggerEnabled -> m_enabled.

* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorHeapProfilerAgent::clearFrontend):
(WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
HeapProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.

* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::enable):
(WebCore::InspectorIndexedDBAgent::disable):
Remove unused state, never read.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::enable):
(WebCore::InspectorLayerTreeAgent::disable):
Remove unused state, did not need to be read.

* inspector/InspectorPageAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::webViewResized):
(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setDeviceMetricsOverride):
(WebCore::InspectorPageAgent::deviceMetricsChanged):
(WebCore::InspectorPageAgent::setShowPaintRects):
(WebCore::InspectorPageAgent::setShowDebugBorders):
(WebCore::InspectorPageAgent::setShowFPSCounter):
(WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
(WebCore::InspectorPageAgent::setScriptExecutionDisabled):
(WebCore::InspectorPageAgent::applyScreenWidthOverride):
(WebCore::InspectorPageAgent::applyScreenHeightOverride):
(WebCore::InspectorPageAgent::didPaint):
(WebCore::InspectorPageAgent::didLayout):
(WebCore::InspectorPageAgent::updateTouchEventEmulationInPage):
(WebCore::InspectorPageAgent::setTouchEmulationEnabled):
(WebCore::InspectorPageAgent::setEmulatedMedia):
(WebCore::InspectorPageAgent::applyEmulatedMedia):
PageAgentState::pageAgentScreenWidthOverride -> m_screenWidthOverride.
PageAgentState::pageAgentScreenHeightOverride -> m_screenHeightOverride.
PageAgentState::pageAgentFontScaleFactorOverride -> m_fontScaleFactorOverride.
PageAgentState::pageAgentFitWindow -> m_fitWindowOverride.
PageAgentState::pageAgentShowPaintRects -> m_showPaintRects.
PageAgentState::pageAgentEmulatedMedia -> m_emulatedMedia.
Remove other unused states.

* inspector/InspectorProfilerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
(WebCore::InspectorProfilerAgent::enabled):
ProfilerAgentState::profileHeadersRequested -> m_profileHeadersRequested.
Remove other unused states.

* inspector/InspectorResourceAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::~InspectorResourceAgent):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::applyUserAgentOverride):
(WebCore::InspectorResourceAgent::enable):
(WebCore::InspectorResourceAgent::disable):
(WebCore::InspectorResourceAgent::setUserAgentOverride):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
ResourceAgentState::resourceAgentEnabled -> m_enabled.
ResourceAgentState::cacheDisabled -> m_cacheDisabled.
ResourceAgentState::userAgentOverride -> m_userAgentOverride (this already existed and was unused).

* inspector/InspectorTimelineAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
(WebCore::InspectorTimelineAgent::setDOMCounters):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
TimelineAgentState::timelineAgentEnabled -> m_enabled.
TimelineAgentState::includeDomCounters -> m_includeDOMCounters.
Remove other unused states.

* inspector/InspectorWorkerAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::clearFrontend):
(WebCore::InspectorWorkerAgent::enable):
(WebCore::InspectorWorkerAgent::disable):
(WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
(WebCore::InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
WorkerAgentState::workerInspectionEnabled -> m_enabled.
WorkerAgentState::autoconnectToWorkers -> m_shouldPauseDedicatedWorkerOnStart.

* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::enable):
(WebCore::PageRuntimeAgent::disable):
Remove unused state, not read.

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

6 years agoRemove code for Mac Lion
rniwa@webkit.org [Thu, 31 Oct 2013 00:14:28 +0000 (00:14 +0000)]
Remove code for Mac Lion
https://bugs.webkit.org/show_bug.cgi?id=123542

Reviewed by Anders Carlsson.

Source/WebCore:

Removed the code for Mac OS X 10.7.

* platform/graphics/ImageBuffer.h:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::context):
(WebCore::ImageBuffer::flushContext):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::imageSourceOptions):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollAnimationEnabledForSystem):
* platform/mac/ScrollElasticityController.mm:
(WebCore::reboundDeltaForElasticDelta):
* platform/mac/ThemeMac.mm:
(WebCore::updateStates):
(WebCore::paintCheckbox):
(WebCore::paintRadio):
(WebCore::paintButton):
* platform/mac/WebCoreNSCellExtras.h:
* platform/mac/WebCoreNSCellExtras.m:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::textField):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView attachRootLayer:]):
* WebView/WebView.mm:

Source/WebKit2:

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillMoveToWindow:]):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

* wtf/Platform.h:

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

6 years agoSet svn:ignore for .pyc files created for test-webkitpy.
ap@apple.com [Wed, 30 Oct 2013 23:59:25 +0000 (23:59 +0000)]
Set svn:ignore for .pyc files created for test-webkitpy.

* Scripts/webkitpy/layout_tests/reftests: Added property svn:ignore.
* Scripts/webkitpy/performance_tests: Added property svn:ignore.
* Scripts/webkitpy/to_be_moved: Added property svn:ignore.
* Scripts/webkitpy/w3c: Added property svn:ignore.

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

6 years agoDelete the expected results for Lion.
rniwa@webkit.org [Wed, 30 Oct 2013 23:50:41 +0000 (23:50 +0000)]
Delete the expected results for Lion.

Rubber-stamped by Anders Carlsson.

* platform/mac-lion: Removed.

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

6 years ago[iOS] Upstream Source/WebKit/ios/
aestes@apple.com [Wed, 30 Oct 2013 23:48:35 +0000 (23:48 +0000)]
[iOS] Upstream Source/WebKit/ios/
https://bugs.webkit.org/show_bug.cgi?id=123470

Reviewed by Sam Weinig.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/ios:

* DefaultDelegates/WebDefaultFormDelegate.h: Added.
* DefaultDelegates/WebDefaultFormDelegate.m: Added.
* DefaultDelegates/WebDefaultFrameLoadDelegate.h: Added.
* DefaultDelegates/WebDefaultFrameLoadDelegate.m: Added.
* DefaultDelegates/WebDefaultResourceLoadDelegate.h: Added.
* DefaultDelegates/WebDefaultResourceLoadDelegate.m: Added.
* DefaultDelegates/WebDefaultUIKitDelegate.h: Added.
* DefaultDelegates/WebDefaultUIKitDelegate.m: Added.
* Misc/EmojiFallbackFontSelector.cpp: Added.
* Misc/EmojiFallbackFontSelector.h: Added.
* Misc/MemoryMeasure.h: Added.
* Misc/MemoryMeasure.mm: Added.
* Misc/WebGeolocationCoreLocationProvider.h: Added.
* Misc/WebGeolocationCoreLocationProvider.mm: Added.
* Misc/WebGeolocationProviderIOS.h: Added.
* Misc/WebGeolocationProviderIOS.mm: Added.
* Misc/WebNSStringDrawing.h: Added.
* Misc/WebNSStringDrawing.mm: Added.
* Misc/WebNSStringExtrasIOS.h: Added.
* Misc/WebNSStringExtrasIOS.m: Added.
* Misc/WebNSStringExtrasIPhone.h: Added.
* Misc/WebUIKitSupport.h: Added.
* Misc/WebUIKitSupport.mm: Added.
* Storage/WebSQLiteDatabaseTrackerClient.h: Added.
* Storage/WebSQLiteDatabaseTrackerClient.mm: Added.
* WebCoreSupport/PopupMenuIOS.h: Added.
* WebCoreSupport/PopupMenuIOS.mm: Added.
* WebCoreSupport/SearchPopupMenuIOS.cpp: Added.
* WebCoreSupport/SearchPopupMenuIOS.h: Added.
* WebCoreSupport/WebCaretChangeListener.h: Added.
* WebCoreSupport/WebChromeClientIOS.h: Added.
* WebCoreSupport/WebChromeClientIOS.mm: Added.
* WebCoreSupport/WebFixedPositionContent.h: Added.
* WebCoreSupport/WebFixedPositionContent.mm: Added.
* WebCoreSupport/WebFixedPositionContentInternal.h: Added.
* WebCoreSupport/WebFrameIOS.h: Added.
* WebCoreSupport/WebFrameIOS.mm: Added.
* WebCoreSupport/WebFrameIPhone.h: Added.
* WebCoreSupport/WebGeolocation.mm: Added.
* WebCoreSupport/WebGeolocationInternal.h: Added.
* WebCoreSupport/WebGeolocationPrivate.h: Added.
* WebCoreSupport/WebMIMETypeRegistry.h: Added.
* WebCoreSupport/WebMIMETypeRegistry.mm: Added.
* WebCoreSupport/WebSelectionRect.h: Added.
* WebCoreSupport/WebSelectionRect.m: Added.
* WebCoreSupport/WebVisiblePosition.h: Added.
* WebCoreSupport/WebVisiblePosition.mm: Added.
* WebCoreSupport/WebVisiblePositionInternal.h: Added.
* WebKit.iOS.exp: Added.
* WebView/WebFrameViewWAKCompatibility.m: Added.
* WebView/WebMailDelegate.h: Added.
* WebView/WebPDFViewIOS.h: Added.
* WebView/WebPDFViewIOS.mm: Added.
* WebView/WebPDFViewIPhone.h: Added.
* WebView/WebPDFViewPlaceholder.h: Added.
* WebView/WebPDFViewPlaceholder.mm: Added.
* WebView/WebPlainWhiteView.h: Added.
* WebView/WebPlainWhiteView.mm: Added.
* WebView/WebUIKitDelegate.h: Added.

Source/WebKit/mac:

* Configurations/WebKit.xcconfig: Excluded some iOS files from the Mac build.

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

6 years ago85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()
ap@apple.com [Wed, 30 Oct 2013 23:43:06 +0000 (23:43 +0000)]
85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()
when there is a stale WebKitTestRunner preference
https://bugs.webkit.org/show_bug.cgi?id=115115

Reviewed by Darin Adler.

Source/WebCore:

* page/Settings.cpp:
(WebCore::Settings::setMockScrollbarsEnabled):
(WebCore::Settings::setUsesOverlayScrollbars):
Added FIXMEs.

Tools:

Delete stale preferences on launch.

* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize): Now that we don't have preferences stored from
the previous run, we need th reinstate them before creating a WKView. Not all preferences
can be applied to an existing view retroactively.
(WTR::TestController::resetPreferencesToConsistentValues): Split out of resetStateToConsistentValues,
because there is no injected bundle yet when calling this function from initialize().

* WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting): Delete
the preferences.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize):
Added some FIXMEs.

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

6 years agoTry to fix the !WK_API_ENABLED Mac build.
mitz@apple.com [Wed, 30 Oct 2013 23:13:49 +0000 (23:13 +0000)]
Try to fix the !WK_API_ENABLED Mac build.

* Shared/Cocoa/APIObject.mm:

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

6 years ago[Cocoa] Make all API objects have Cocoa wrappers, and delegate refcounting to those...
mitz@apple.com [Wed, 30 Oct 2013 22:49:20 +0000 (22:49 +0000)]
[Cocoa] Make all API objects have Cocoa wrappers, and delegate refcounting to those wrappers
https://bugs.webkit.org/show_bug.cgi?id=123394

Reviewed by Darin Adler.

All wrappers conform to a new WKObject protocol and contain the wrapped object inline.
APIObject-derived classes override operator new to call newObject, which allocates the
wrapper and returns a pointer to the inline API object.

There are three kinds of wrapper classes: (a) classes that inherit directly from NSObject
and implement their API by calling the wrapped object (example: WKBackForwardList),
(b) internal classes that inherit from a class cluster, and implement the primitive methods
of the class cluster by calling the wrapped object (example: WKNSArray), and (c) internal
classes that inerit from the new WKObject class, and proxy to an object of some public type,
which is created from the wrapped object (example: WKNSURL).

* Shared/APIObject.h:
(WebKit::APIObject::wrapper): Added this getter.
(WebKit::TypedAPIObject::operator new): Added override that calls newObject.
* Shared/Cocoa/APIObject.mm: Added.
(WebKit::APIObject::ref): Retains the wrapper.
(WebKit::APIObject::deref): Releases the wrapper. When the wrapper is deallocated, it calls
the API object destructor.
(WebKit::APIObject::newObject): Allocates the wrapper and returns a pointer to the API
object inside the wrapper.

* Shared/Cocoa/WKNSArray.h:
(WebKit::wrapper): Added. Returns an ImmutableArray’s wrapper as an NSArray.
Replaced the RefPtr<ImmutableArray> ivar with space for an ImmutableArray to live inside
the wrapper.
(-[WKNSArray dealloc]): Calls the ImmutableArray destructor.
(-[WKNSArray count]): Updated for ivar change.
(-[WKNSArray objectAtIndex:]): Ditto.
(-[WKNSArray _apiObject]): Returns the wrapped ImmutableArray.

* Shared/Cocoa/WKNSObjectExtras.h: Removed.
* Shared/Cocoa/WKNSObjectExtras.mm: Removed.

* Shared/Cocoa/WKNSString.h: Added.
* Shared/Cocoa/WKNSString.mm: Added.
(-[WKNSString _web_createTarget]): Override this WKObject method to create an NSString from
the WebString.
(-[WKNSString copyWithZone:]): Retains self.

* Shared/Cocoa/WKNSURL.h: Added.
* Shared/Cocoa/WKNSURL.mm: Added.
(-[WKNSURL _web_createTarget]): Override this WKObject method to create an NSURL from
the WebURL.
(-[WKNSURL copyWithZone:]): Retains self.

* Shared/Cocoa/WKObject.h: Added.
* Shared/Cocoa/WKObject.mm: Added.
(-[WKObject dealloc]): Calls the destructor of the wrapped object and releases the target
object.
(initializeTargetIfNeeded): Helper function. Tries to create the target exactly once.
(-[WKObject isEqual:]): NSObject override that creates and compares to the target
object if necessary.
(-[WKObject hash]): NSObject override that creates and hashes the target object if
there is one.
(-[WKObject isKindOfClass:]): NSObject override that delegates to the target object.
(-[WKObject isMemberOfClass:]): Ditto.
(-[WKObject respondsToSelector:]): NSObject override that creates the target object if
necessary and returns whether it or self responds to the selector.
(-[WKObject conformsToProtocol:]): Similarly for protocols.
(-[WKObject forwardingTargetForSelector:]): NSObject override that creates the target object
if necessary and returns it as the target.
(-[WKObject description]): NSObject override that creates the target object if necessary and
forwards to it.
(-[WKObject _web_createTarget]): Added. The base implementation returns nil.
(-[WKObject _apiObject]): Returns the wrapped object.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController backForwardList]): Changed to return the existing wrapper.
(didChangeBackForwardList): Changed to use existing wrappers.

Replaced the RefPtr<WebBackForwardList> ivar with space for a WebBackForwardList to live
inside the wrapper.
(-[WKBackForwardList dealloc]): Call the WebBackForwardList destructor.
(toWKBackForwardListItem): Changed to us the existing wrapper.
(-[WKBackForwardList currentItem]): Updated for ivar change.
(-[WKBackForwardList backItem]): Ditto.
(-[WKBackForwardList forwardItem]): Ditto.
(-[WKBackForwardList itemAtIndex:]): Ditto.
(-[WKBackForwardList backListCount]): Ditto.
(-[WKBackForwardList forwardListCount]): Ditto,
(-[WKBackForwardList backListWithLimit:]): Ditto, and also changed to use the
ImmutableArray’s existing wrapper.
(-[WKBackForwardList forwardListWithLimit:]): Ditto.
(-[WKBackForwardList _apiObject]): Returns the WebBackForwardListItem.
* UIProcess/Cocoa/WKBackForwardListInternal.h:
(WebKit::wrapper): Added. Returns a WebBackForwardList’s wrapper as a WKBackForwardList.

* UIProcess/Cocoa/WKBackForwardListItem.mm:
Replaced the RefPtr<WebBackForwardListItem> ivar with space for a WebBackForwardListItem to
live inside the wrapper.
(-[WKBackForwardListItem dealloc]): Call the WebBackForwardListItem destructor.
(-[WKBackForwardListItem URL]): Updated for ivar change, and changed to make an NSURL
directly instead of going through a wrapper.
(-[WKBackForwardListItem title]): Updated for ivar change, and changed to use
String’s operator NSString*.
(-[WKBackForwardListItem originalURL]): Updated for ivar change, and changed to make an
NSURL directly instead of going through a wrapper.
(-[WKBackForwardListItem _apiObject]): Returns the WebBackForwardListItem.
(-[WKBackForwardListItem _item]): Ditto.
* UIProcess/Cocoa/WKBackForwardListItemInternal.h:
(WebKit::wrapper): Added. Returns a WebBackForwardListItem’s wrapper as a
WKBackForwardListItem.

* UIProcess/WebColorPickerResultListenerProxy.h: Changed into a TypedAPIObject.

* UIProcess/WebFormSubmissionListenerProxy.h:
(WebKit::WebFormSubmissionListenerProxy::operator new): Override to call newObject.

* UIProcess/WebFramePolicyListenerProxy.h:
(WebKit::WebFramePolicyListenerProxy::operator new): Ditto.

* WebKit2.xcodeproj/project.pbxproj: Updated for file additions and removals.

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

6 years agoUnreviewed, fix C Loop LLINT build.
mark.lam@apple.com [Wed, 30 Oct 2013 22:47:56 +0000 (22:47 +0000)]
Unreviewed, fix C Loop LLINT build.

* bytecode/CodeBlockJettisoningWatchpoint.cpp:
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
(JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):

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

6 years agoUnreviewed, fix FTL build.
fpizlo@apple.com [Wed, 30 Oct 2013 22:34:09 +0000 (22:34 +0000)]
Unreviewed, fix FTL build.

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):

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

6 years agoTake line boxes out of the arena.
akling@apple.com [Wed, 30 Oct 2013 22:27:59 +0000 (22:27 +0000)]
Take line boxes out of the arena.
<https://webkit.org/b/123533>

Stop arena-allocating line boxes so we can move forward on improving
render tree memory management. This will also allow more rendering
code to take advantage of malloc optimizations.

This will likely regress performance on some micro-benchmarks, but
it's something we want to do sooner rather than later so we have time
to restabilize it. All improvements to the simple line layout's
coverage will help with recouping whatever is regressed.

BiDi runs are the only remaining user of the arena now.

Reviewed by Antti Koivisto

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

6 years agoWeb Inspector: Remove InspectorAgent::restore functionality
commit-queue@webkit.org [Wed, 30 Oct 2013 22:17:27 +0000 (22:17 +0000)]
Web Inspector: Remove InspectorAgent::restore functionality
https://bugs.webkit.org/show_bug.cgi?id=123525

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

Remove unused InspectorAgent restore functionality.

* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorBaseAgent.cpp:
* inspector/InspectorBaseAgent.h:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.cpp:
* inspector/PageRuntimeAgent.h:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerInspectorController.h:

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

6 years agoTry to fix the 32-bit build.
andersca@apple.com [Wed, 30 Oct 2013 22:12:04 +0000 (22:12 +0000)]
Try to fix the 32-bit build.

* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm:
* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Bundle.mm:

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

6 years agoREGRESSION(r158288): media/media-can-play-mpeg4-video.html fails
jer.noble@apple.com [Wed, 30 Oct 2013 22:07:27 +0000 (22:07 +0000)]
REGRESSION(r158288): media/media-can-play-mpeg4-video.html fails
https://bugs.webkit.org/show_bug.cgi?id=123530

Reviewed by Eric Carlson.

Source/WebCore:

Lower case the mime type before passing it along to MediaPlayer.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):

LayoutTests:

* TestExpectations:

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

6 years agoAdd a way to fulfill promises from DOM code
ap@apple.com [Wed, 30 Oct 2013 22:05:47 +0000 (22:05 +0000)]
Add a way to fulfill promises from DOM code
https://bugs.webkit.org/show_bug.cgi?id=123466

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Make JSPromise.h and JSPromiseResolver.h
private headers for WebCore to use.

* runtime/JSPromise.h:
* runtime/JSPromiseResolver.h:
Export functions that JSDOMPromise will use.

Source/WebCore:

This is not perfect, as it strongly ties DOM code to JavaScript. In the future, we
can make it better e.g. by subclassing, so that only a base interface would be exposed.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSBindingsAllInOne.cpp:
* WebCore.xcodeproj/project.pbxproj:
Added JSDOMPromise.

* bindings/js/JSDOMPromise.cpp: Added.

* bindings/js/JSDOMPromise.h: Added.
(WebCore::PromiseWrapper::create):
(WebCore::PromiseWrapper::fulfill): A random set of specializations that I needed
in WebCrypto code so far.
(WebCore::PromiseWrapper::reject): Ditto.

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

6 years agoBegin fleshing out an API test for WKRemoteObjectRegistry
andersca@apple.com [Wed, 30 Oct 2013 21:51:42 +0000 (21:51 +0000)]
Begin fleshing out an API test for WKRemoteObjectRegistry
https://bugs.webkit.org/show_bug.cgi?id=123531

Reviewed by Andreas Kling.

Source/WebKit2:

* Shared/API/Cocoa/WKRemoteObjectInterface.h:
Add WK_API_CLASS annotation.

* Shared/API/Cocoa/WKRemoteObjectRegistry.h:
Add WK_API_CLASS annotation.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
Add a WebConnection ivar.

(-[WKRemoteObjectRegistry _initWithConnectionRef:]):
Add SPI to create an WKRemoteObjectRegistry object with an existing WKConnectionRef.

(-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
Add SPI that will be used to process incoming messages from an existing WKConnectionRef.

* Shared/API/Cocoa/WKRemoteObjectRegistryPrivate.h: Added.
Add SPI header.

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

Tools:

Add a very simple test that doesn't really test anything for now.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2ObjC/WKRemoteObjectRegistry.mm: Added.
* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Bundle.mm: Added.
* TestWebKitAPI/Tests/mac/WKRemoteObjectRegistry_Shared.h: Added.

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

6 years agoAdjust CallFrameHeader's ReturnPC and CallFrame locations to match the native ABI .
mark.lam@apple.com [Wed, 30 Oct 2013 21:26:46 +0000 (21:26 +0000)]
Adjust CallFrameHeader's ReturnPC and CallFrame locations to match the native ABI .
https://bugs.webkit.org/show_bug.cgi?id=123444.

Reviewed by Geoffrey Garen.

- Introduced an explicit CallerFrameAndPC struct.
- A CallFrame is expected to start with a CallerFrameAndPC struct.
- The Register class no longer supports CallFrame* and Instruction*.

  These hides the differences between JSVALUE32_64 and JSVALUE64 in
  terms of managing the callerFrame() and returnPC() values.

- Convert all uses of JSStack::CallerFrame and JSStack::ReturnPC to
  go through CallFrame to access the appropriate values and offsets.
  CallFrame, in turn, will access the callerFrame and returnPC via
  the CallerFrameAndPC struct.

- InlineCallFrame will provide offsets for its callerFrame and
  returnPC. It will make use of CallFrame::callerFrameOffset() and
  CallerFrame::returnPCOffset() to compute these.

* bytecode/CodeOrigin.h:
(JSC::InlineCallFrame::callerFrameOffset):
(JSC::InlineCallFrame::returnPCOffset):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compileExceptionHandlers):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::calleeFrameSlot):
(JSC::DFG::SpeculativeJIT::calleeArgumentSlot):
(JSC::DFG::SpeculativeJIT::calleeFrameTagSlot):
(JSC::DFG::SpeculativeJIT::calleeFramePayloadSlot):
(JSC::DFG::SpeculativeJIT::calleeArgumentTagSlot):
(JSC::DFG::SpeculativeJIT::calleeArgumentPayloadSlot):
- Prefixed all the above with callee since they apply to the callee frame.
(JSC::DFG::SpeculativeJIT::calleeFrameCallerFrame):
- Added to set the callerFrame pointer in the callee frame.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLink.cpp:
(JSC::FTL::compileEntry):
(JSC::FTL::link):
* interpreter/CallFrame.h:
(JSC::ExecState::callerFrame):
(JSC::ExecState::callerFrameOffset):
(JSC::ExecState::returnPC):
(JSC::ExecState::hasReturnPC):
(JSC::ExecState::clearReturnPC):
(JSC::ExecState::returnPCOffset):
(JSC::ExecState::setCallerFrame):
(JSC::ExecState::setReturnPC):
(JSC::ExecState::callerFrameAndPC):
* interpreter/JSStack.h:
* interpreter/Register.h:
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitPutToCallFrameHeader):
- Convert to using storePtr() here and simplify the code.
(JSC::AssemblyHelpers::emitGetCallerFrameFromCallFrameHeaderPtr):
(JSC::AssemblyHelpers::emitPutCallerFrameToCallFrameHeader):
(JSC::AssemblyHelpers::emitGetReturnPCFromCallFrameHeaderPtr):
(JSC::AssemblyHelpers::emitPutReturnPCToCallFrameHeader):
- Helpers to emit gets/puts of the callerFrame and returnPC.
(JSC::AssemblyHelpers::addressForByteOffset):
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompile):
(JSC::JIT::privateCompileExceptionHandlers):
* jit/JITCall.cpp:
(JSC::JIT::compileCallEval):
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileOpCall):
* jit/JITInlines.h:
(JSC::JIT::unmap):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_ret_object_or_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_end):
* jit/JITOperations.cpp:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::returnJSValue):
(JSC::SpecializedThunkJIT::returnDouble):
(JSC::SpecializedThunkJIT::returnInt32):
(JSC::SpecializedThunkJIT::returnJSCell):
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
(JSC::nativeForGenerator):

* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LowLevelInterpreter.asm:
- Updated offsets and asserts to match the new CallFrame layout.

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

6 years agocontentEditable deleting lists when list items are block level
commit-queue@webkit.org [Wed, 30 Oct 2013 21:16:56 +0000 (21:16 +0000)]
contentEditable deleting lists when list items are block level
https://bugs.webkit.org/show_bug.cgi?id=122602

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-30
Reviewed by Ryosuke Niwa.

Source/WebCore:

When listitems are styled with display:block/float then inserting paragraph
twice at end of listitem delete entire list. Generally when listitem is empty
then we delete the listitem on inserting paragraph. In this issue, on inserting
first paragraph one empty listitem is created, and on inserting second paragraph
we try to delete that empty listitem. but it misbehave becasue of incomplete
definition of htmlediting::isLisItem() and entire list is deleted.

htmlediting::isListItem() check only render object to decide whether it is
list or not, so if any LI element is block level then isListItem return false.
Now after this patch if parent of current node is list element then node is
treated as listItem.

Test: editing/execCommand/hit-enter-twice-atendof-block-styled-listitem.html

* editing/htmlediting.cpp:
(WebCore::isListItem): Modified condition to check if parent node is list;

LayoutTests:

Testcase: When listitem is styled with display:block then inserting
paragraph twice at the end of listitem should not remove entire list.

* editing/execCommand/hit-enter-twice-atendof-block-styled-listitem-expected.txt: Added.
* editing/execCommand/hit-enter-twice-atendof-block-styled-listitem.html: Added.

TestCase: When listitem is made of custom tag(<item>) and css(display:list-item)
then inserting paragraph twice at the end of listitem should not remove entire list.

* editing/execCommand/hit-enter-twice-atendof-custom-listitem-expected.txt: Added.
* editing/execCommand/hit-enter-twice-atendof-custom-listitem.html: Added.

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

6 years agoUnreviewed, fix Mac.
fpizlo@apple.com [Wed, 30 Oct 2013 20:59:18 +0000 (20:59 +0000)]
Unreviewed, fix Mac.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::RegisterAllocationOffset::checkOffsets):
(JSC::AbstractMacroAssembler::checkRegisterAllocationAgainstBranchRange):

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

6 years agoAdd a failing test expectation on media/media-can-play-mpeg4-video.html after r158288.
rniwa@webkit.org [Wed, 30 Oct 2013 20:57:19 +0000 (20:57 +0000)]
Add a failing test expectation on media/media-can-play-mpeg4-video.html after r158288.
The failure is tracked by the bug 123530.

Also rebaseline Mountain Lion results.

* TestExpectations:
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:

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

6 years agoUnreviewed. Update NEWS and Versions.m4 for 2.3.1 release.
jer.noble@apple.com [Wed, 30 Oct 2013 20:51:42 +0000 (20:51 +0000)]
Unreviewed. Update NEWS and Versions.m4 for 2.3.1 release.

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-10-29

* Source/autotools/Versions.m4: Bump version numbers.

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

6 years agoLet Page::renderTreeSize() be the number of renderers.
akling@apple.com [Wed, 30 Oct 2013 20:40:38 +0000 (20:40 +0000)]
Let Page::renderTreeSize() be the number of renderers.
<https://webkit.org/b/123518>
<rdar://problem/15348679>

The old metric was "number of bytes allocated in RenderArena" and
that was heading towards obsolescence, fast.

Instead, keep a count of RenderObjects instantiated on RenderView.
While a bit ugly, this lets us move forward with rendering memory
model improvements without breaking features.

Reviewed by Beth Dakin.

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

6 years agoWebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
commit-queue@webkit.org [Wed, 30 Oct 2013 20:32:27 +0000 (20:32 +0000)]
WebKit/win/WebKitGraphics.h:void WebDrawText(WebTextRenderInfo*); is never called
https://bugs.webkit.org/show_bug.cgi?id=123485

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-30
Reviewed by Brent Fulgham.

Source/WebCore:

WebDrawText is the only caller of WebCoreDrawTextAtPoint, so we can
delete that as well.

Because there is no behavior difference, no new tests are necessary.

* platform/win/WebCoreTextRenderer.cpp:
* platform/win/WebCoreTextRenderer.h:

Source/WebKit:

Deleting the function

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

Removed unused WebDrawText implementation.

* WebKitGraphics.cpp:
* WebKitGraphics.h:

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

6 years agoUnreviewed, fix Windows.
fpizlo@apple.com [Wed, 30 Oct 2013 20:22:40 +0000 (20:22 +0000)]
Unreviewed, fix Windows.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettison):

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

6 years agoUnreviewed, fix Windows.
fpizlo@apple.com [Wed, 30 Oct 2013 20:14:48 +0000 (20:14 +0000)]
Unreviewed, fix Windows.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::addFrequentExitSite):

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

6 years agoRemove unnecessary touch
fpizlo@apple.com [Wed, 30 Oct 2013 20:13:08 +0000 (20:13 +0000)]
Remove unnecessary touch

Rubber stamped by Mark Hahnenberg.

* Scripts/run-jsc-stress-tests:

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

6 years agoAX: Add samuel_white@apple.com to accessibility watchlist cc rules
samuel_white@apple.com [Wed, 30 Oct 2013 20:03:53 +0000 (20:03 +0000)]
AX: Add samuel_white@apple.com to accessibility watchlist cc rules
https://bugs.webkit.org/show_bug.cgi?id=123515

Reviewed by Chris Fleizach.

Adding myself and jcraig@apple.com (per his request) to the accessibility watchlist. Also
updating contributors.json with permission from bweinstein@apple.com to make this possible.

* Scripts/webkitpy/common/config/contributors.json:
* Scripts/webkitpy/common/config/watchlist:

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

6 years agoAdd InvalidationPoints to the DFG and use them for all watchpoints
fpizlo@apple.com [Wed, 30 Oct 2013 19:58:08 +0000 (19:58 +0000)]
Add InvalidationPoints to the DFG and use them for all watchpoints
https://bugs.webkit.org/show_bug.cgi?id=123472

Reviewed by Mark Hahnenberg.

This makes a fundamental change to how watchpoints work in the DFG.

Previously, a watchpoint was an instruction whose execution semantics were something
like:

    if (watchpoint->invalidated)
        exit

We would implement this without any branch by using jump replacement.

This is a very good optimization. But it's a bit awkward once you get a lot of
watchpoints: semantically we will have lots of these branches in the code, which the
compiler needs to reason about even though they don't actually result in any emitted
code.

Separately, we also had a mechanism for jettisoning a CodeBlock. This mechanism would
be invoked if a CodeBlock exited a lot. It would ensure that a CodeBlock wouldn't be
called into again, but it would do nothing for CodeBlocks that were already on the
stack.

This change flips jettisoning and watchpoint invalidation on their heads. Now, the jump
replacement has nothing to do with watchpoints; instead it's something that happens if
you ever jettison a CodeBlock. Jump replacement is now an all-or-nothing operation over
all of the potential call-return safe-exit-points in a CodeBlock. We call these
"InvalidationPoint"s. A watchpoint instruction is now "lowered" by having the DFG
collect all of the watchpoint sets that the CodeBlock cares about, and then registering
a CodeBlockJettisoningWatchpoint with all of them. That is, if the watchpoint fires, it
jettisons the CodeBlock, which in turn ensures that the CodeBlock can't be called into
(because the entrypoint now points to baseline code) and can't be returned into
(because returning exits to baseline before the next bytecode instruction).

This will allow for a sensible lowering of watchpoints to LLVM IR. It will also allow
for jettison() to be used effectively for things like breakpointing and single-stepping
in the debugger.

Well, basically, this mechanism just takes us into the HotSpot-style world where anyone
can, at any time and for any reason, request that an optimized CodeBlock is rendered
immediately invalid. You can use this for many cool things, I'm sure.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettison):
* bytecode/CodeBlock.h:
* bytecode/CodeBlockJettisoningWatchpoint.cpp: Added.
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
* bytecode/CodeBlockJettisoningWatchpoint.h: Added.
(JSC::CodeBlockJettisoningWatchpoint::CodeBlockJettisoningWatchpoint):
* bytecode/ExitKind.cpp:
(JSC::exitKindToString):
* bytecode/ExitKind.h:
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp: Added.
(JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.h: Added.
(JSC::ProfiledCodeBlockJettisoningWatchpoint::ProfiledCodeBlockJettisoningWatchpoint):
* dfg/DFGAbstractHeap.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
* dfg/DFGClobberize.cpp:
(JSC::DFG::writesOverlap):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
(JSC::DFG::AbstractHeapOverlaps::AbstractHeapOverlaps):
(JSC::DFG::AbstractHeapOverlaps::operator()):
(JSC::DFG::AbstractHeapOverlaps::result):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::invalidate):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::CommonData):
* dfg/DFGDesiredWatchpoints.cpp:
(JSC::DFG::DesiredWatchpoints::addLazily):
(JSC::DFG::DesiredWatchpoints::reallyAdd):
* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::WatchpointForGenericWatchpointSet::WatchpointForGenericWatchpointSet):
(JSC::DFG::GenericDesiredWatchpoints::addLazily):
(JSC::DFG::GenericDesiredWatchpoints::reallyAdd):
(JSC::DFG::GenericDesiredWatchpoints::areStillValid):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGInvalidationPointInjectionPhase.cpp: Added.
(JSC::DFG::InvalidationPointInjectionPhase::InvalidationPointInjectionPhase):
(JSC::DFG::InvalidationPointInjectionPhase::run):
(JSC::DFG::InvalidationPointInjectionPhase::handle):
(JSC::DFG::InvalidationPointInjectionPhase::insertInvalidationCheck):
(JSC::DFG::performInvalidationPointInjection):
* dfg/DFGInvalidationPointInjectionPhase.h: Added.
* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):
* dfg/DFGJITCompiler.h:
* dfg/DFGJumpReplacement.cpp: Added.
(JSC::DFG::JumpReplacement::fire):
* dfg/DFGJumpReplacement.h: Added.
(JSC::DFG::JumpReplacement::JumpReplacement):
* dfg/DFGNodeType.h:
* dfg/DFGOSRExitCompilationInfo.h:
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::reallyAdd):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid):
(JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWatchpointCollectionPhase.cpp: Added.
(JSC::DFG::WatchpointCollectionPhase::WatchpointCollectionPhase):
(JSC::DFG::WatchpointCollectionPhase::run):
(JSC::DFG::WatchpointCollectionPhase::handle):
(JSC::DFG::WatchpointCollectionPhase::handleEdge):
(JSC::DFG::WatchpointCollectionPhase::handleMasqueradesAsUndefined):
(JSC::DFG::WatchpointCollectionPhase::handleStringGetByVal):
(JSC::DFG::WatchpointCollectionPhase::addLazily):
(JSC::DFG::WatchpointCollectionPhase::globalObject):
(JSC::DFG::performWatchpointCollection):
* dfg/DFGWatchpointCollectionPhase.h: Added.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileStructureTransitionWatchpoint):
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::LowerDFGToLLVM::compileGlobalVarWatchpoint):
(JSC::FTL::LowerDFGToLLVM::compileCompareEqConstant):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEqConstant):
(JSC::FTL::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::LowerDFGToLLVM::equalNullOrUndefined):
(JSC::FTL::LowerDFGToLLVM::speculateNonNullObject):
* jit/JITOperations.cpp:
* jit/JumpReplacementWatchpoint.cpp: Removed.
* jit/JumpReplacementWatchpoint.h: Removed.

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

6 years agoURTBF after r158289.
ossy@webkit.org [Wed, 30 Oct 2013 19:16:17 +0000 (19:16 +0000)]
URTBF after r158289.

* CMakeLists.txt:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::createCursorBackend):

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

6 years ago[WIN] Add executable entry points to DRT and WinLauncher
paroga@webkit.org [Wed, 30 Oct 2013 19:10:47 +0000 (19:10 +0000)]
[WIN] Add executable entry points to DRT and WinLauncher
https://bugs.webkit.org/show_bug.cgi?id=121837

Reviewed by Brent Fulgham.

This allows to compile and run the executables without DLLLauncher.

* DumpRenderTree/win/DumpRenderTree.cpp:
(main):
(dllLauncherEntryPoint):
* WinLauncher/WinLauncher.cpp:
(wWinMain):
(dllLauncherEntryPoint):

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

6 years agorun-jsc-stress-tests should handle ".." in paths and "slow!" in cmd's
fpizlo@apple.com [Wed, 30 Oct 2013 19:10:20 +0000 (19:10 +0000)]
run-jsc-stress-tests should handle ".." in paths and "slow!" in cmd's
https://bugs.webkit.org/show_bug.cgi?id=123521

Reviewed by Mark Hahnenberg.

* Scripts/run-jsc-stress-tests:

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

6 years agoBuild fails with EGLConfigSelector.cpp when OpenGL ES is not used
commit-queue@webkit.org [Wed, 30 Oct 2013 19:07:45 +0000 (19:07 +0000)]
Build fails with EGLConfigSelector.cpp when OpenGL ES is not used
https://bugs.webkit.org/show_bug.cgi?id=119037

Patch by Dong-Gwan Kim <donggwan.kim@samsung.com> on 2013-10-30
Reviewed by Brent Fulgham.

Build fix for EGLConfigSelector.cpp

No new tests, no behavior change.

* platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
(WebCore::EGLConfigSelector::createConfig):

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

6 years agoRemove PCRE workaround.
commit-queue@webkit.org [Wed, 30 Oct 2013 19:03:45 +0000 (19:03 +0000)]
Remove PCRE workaround.
https://bugs.webkit.org/show_bug.cgi?id=123265

Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-10-30
Reviewed by Brent Fulgham.

* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):

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

6 years agoAdd a flaky test expectation to media/track/track-in-band-legacy-api.html
rniwa@webkit.org [Wed, 30 Oct 2013 19:02:36 +0000 (19:02 +0000)]
Add a flaky test expectation to media/track/track-in-band-legacy-api.html
The failure is tracked by the bug 123522.

* platform/mac/TestExpectations:

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

6 years agoRemote Layer Tree: Lots of ASSERT(m_children.isEmpty()); on Poster Circle
timothy_horton@apple.com [Wed, 30 Oct 2013 18:59:10 +0000 (18:59 +0000)]
Remote Layer Tree: Lots of ASSERT(m_children.isEmpty()); on Poster Circle
https://bugs.webkit.org/show_bug.cgi?id=123517

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::setSublayers):
When setting our list of sublayers, remove all of the new layers from
their parents first.

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

6 years agoExplicitly initialize base class in MediStreamTrackPrivate copy constructor
commit-queue@webkit.org [Wed, 30 Oct 2013 18:56:26 +0000 (18:56 +0000)]
Explicitly initialize base class in MediStreamTrackPrivate copy constructor
https://bugs.webkit.org/show_bug.cgi?id=123473

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

No new tests needed.

Ports that enable -Werror=extra must do that to compile.

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):

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

6 years agoMac build fix after r158291.
rniwa@webkit.org [Wed, 30 Oct 2013 18:52:26 +0000 (18:52 +0000)]
Mac build fix after r158291.

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

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

6 years agoUnreviewed, rolling out r158243.
commit-queue@webkit.org [Wed, 30 Oct 2013 18:49:31 +0000 (18:49 +0000)]
Unreviewed, rolling out r158243.
http://trac.webkit.org/changeset/158243
https://bugs.webkit.org/show_bug.cgi?id=123520

Change was wrong (Requested by smfr on #webkit).

* platform/graphics/GraphicsContext.h:
* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintCompositionUnderline):

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

6 years ago[Windows] Unreviewed build fix.
alex.christensen@flexsim.com [Wed, 30 Oct 2013 18:31:42 +0000 (18:31 +0000)]
[Windows] Unreviewed build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Added missing 32-bit and 64-bit linker symbols.

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

6 years agoFavicons are flipped in vertical direction in WinCairo builds.
commit-queue@webkit.org [Wed, 30 Oct 2013 18:22:34 +0000 (18:22 +0000)]
Favicons are flipped in vertical direction in WinCairo builds.
https://bugs.webkit.org/show_bug.cgi?id=102077

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):

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

6 years ago[MSE] Add MediaSource compatable loading functions to MediaPlayer
jer.noble@apple.com [Wed, 30 Oct 2013 18:18:28 +0000 (18:18 +0000)]
[MSE] Add MediaSource compatable loading functions to MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=123353

Reviewed by Eric Carlson.

Add methods to MediaPlayer to allow it to select the correct MediaPlayerFactory
when attempting to load a MediaSource URL.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::selectNextSourceChild):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::supportsType):
* platform/graphics/MediaPlayer.h:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):

Remove the isSupportedMediaSourceMIMEType() method:
* platform/MIMETypeRegistry.h:
* platform/efl/MIMETypeRegistryEfl.cpp:
* platform/mac/MIMETypeRegistryMac.mm:

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

6 years agoMavericks: 128 tests are failing due to pixel differences
ap@apple.com [Wed, 30 Oct 2013 18:04:41 +0000 (18:04 +0000)]
Mavericks: 128 tests are failing due to pixel differences
https://bugs.webkit.org/show_bug.cgi?id=123488

Reviewed by Simon Fraser.

Apple font preferences cannot be fully reset after they've been read, so we
need to set them using CFPreferences before initializing NSApplication.

In theory, this should be an issue on WebKit2 as well, but somehow it doesn't
appear to be. I guess we can figure out the reasons for this difference when/if
any observable problems start to occur.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting): Only set defaults here, move other work
to prepareConsistentTestingEnvironment().
(main): Call setDefaultsToConsistentValuesForTesting before [NSApplication sharedApplication]
(which is unnecessary anyway since NSUserDefaults will implicitly call it, but seems
useful to keep in case we change out approach to defaults again).

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

6 years agoUnreviewed. Update NEWS and Versions.m4 for 2.3.1 release.
beidson@apple.com [Wed, 30 Oct 2013 18:02:37 +0000 (18:02 +0000)]
Unreviewed. Update NEWS and Versions.m4 for 2.3.1 release.

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-10-29

* Source/autotools/Versions.m4: Bump version numbers.

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

6 years ago[MSE] Remove legacy Media Source APIs (WebKitMediaSource, WebKitSourceBuffer, WebKitS...
jer.noble@apple.com [Wed, 30 Oct 2013 18:01:33 +0000 (18:01 +0000)]
[MSE] Remove legacy Media Source APIs (WebKitMediaSource, WebKitSourceBuffer, WebKitSourceBufferList)
https://bugs.webkit.org/show_bug.cgi?id=123463

Reviewed by Eric Carlson.

Source/WebCore:

No new tests; updated test results.

Remove all reference to WebKitMediaSource, WebKitSourceBuffer, and WebKitSourceBufferList.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/mediasource/DOMURLMediaSource.idl:
* Modules/mediasource/WebKitMediaSource.cpp: Removed.
* Modules/mediasource/WebKitMediaSource.h: Removed.
* Modules/mediasource/WebKitMediaSource.idl: Removed.
* Modules/mediasource/WebKitSourceBuffer.cpp: Removed.
* Modules/mediasource/WebKitSourceBuffer.h: Removed.
* Modules/mediasource/WebKitSourceBuffer.idl: Removed.
* Modules/mediasource/WebKitSourceBufferList.cpp: Removed.
* Modules/mediasource/WebKitSourceBufferList.h: Removed.
* Modules/mediasource/WebKitSourceBufferList.idl: Removed.
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTargetFactory.in:

LayoutTests:

* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

6 years agoWeb Inspector: Fix PrettyPrinting Tool Load from Saved URL
joepeck@webkit.org [Wed, 30 Oct 2013 17:58:41 +0000 (17:58 +0000)]
Web Inspector: Fix PrettyPrinting Tool Load from Saved URL

Reviewed by Timothy Hatcher.

* Tools/PrettyPrinting/index.html:

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

6 years agoJSExport doesn't support constructors
mhahnenberg@apple.com [Wed, 30 Oct 2013 17:58:12 +0000 (17:58 +0000)]
JSExport doesn't support constructors
https://bugs.webkit.org/show_bug.cgi?id=123380

Reviewed by Geoffrey Garen.

Support for constructor-style callbacks for the Objective-C API to JSC is currently limited to
Objective-C blocks. Any clients who try to call the constructor of a JSExport-ed Objective-C class
are met with a type error stating that it cannot be called as a constructor.

It would be nice to expand JSExport's functionality to support this idiom. It is a natural
extension to JSExport and would increase the expressiveness and simplicity in both Objective-C and
JavaScript client code.

The way we'll do this is to expand the capabilities of ObjCCallbackFunction and associated classes.
Instead of constructing a normal C API object for the constructor, we'll instead allocate a full-blown
ObjCCallbackFunction object which can already properly handle being invoked as a constructor.

* API/JSWrapperMap.mm:
(copyMethodsToObject):
(allocateConstructorForCustomClass):
(-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]):
(tryUnwrapObjcObject):
* API/ObjCCallbackFunction.h:
(JSC::ObjCCallbackFunction::impl):
* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl):
(JSC::ObjCCallbackFunctionImpl::wrappedConstructor):
(JSC::ObjCCallbackFunctionImpl::isConstructible):
(JSC::ObjCCallbackFunction::getConstructData):
(JSC::ObjCCallbackFunctionImpl::name):
(JSC::ObjCCallbackFunctionImpl::call):
(objCCallbackFunctionForInvocation):
(objCCallbackFunctionForInit):
(tryUnwrapConstructor):
* API/tests/testapi.mm:
(-[TextXYZ initWithString:]):
(-[ClassA initWithA:]):
(-[ClassB initWithA:b:]):
(-[ClassC initWithA:]):
(-[ClassC initWithA:b:]):

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

6 years agoUnbreak the release build.
antti@apple.com [Wed, 30 Oct 2013 17:55:14 +0000 (17:55 +0000)]
Unbreak the release build.

* rendering/SimpleLineLayoutFunctions.cpp:

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

6 years agoA WebGL test times out sometimes.
simon.fraser@apple.com [Wed, 30 Oct 2013 17:54:12 +0000 (17:54 +0000)]
A WebGL test times out sometimes.

* platform/mac/TestExpectations:

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

6 years agoTeach the style checker how to handle Objective-C categories and NS_ENUM
aestes@apple.com [Wed, 30 Oct 2013 17:53:56 +0000 (17:53 +0000)]
Teach the style checker how to handle Objective-C categories and NS_ENUM
https://bugs.webkit.org/show_bug.cgi?id=123482

Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing_for_function_call): Allow a space before '(' in a line
starting with @interface or @implementation, since this is defining an
Objective-C category rather than a function.
(check_braces): The opening brace of an NS_ENUM should not be on its
own line.
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit tests.

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

6 years ago[Win] Compile errors when enabling DFG JIT.
commit-queue@webkit.org [Wed, 30 Oct 2013 17:49:55 +0000 (17:49 +0000)]
[Win] Compile errors when enabling DFG JIT.
https://bugs.webkit.org/show_bug.cgi?id=120998

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added files.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
* dfg/DFGAllocator.h: Removed scope.
* dfg/DFGWorklist.cpp: Use new ThreadingOnce class instead of pthread_once.
(JSC::DFG::globalWorklist):
* heap/DeferGC.h: Link fix, member needs to be public.
* jit/JITOperationWrappers.h: Added required assembler macros.

Source/WTF:

* wtf/CompilationThread.cpp: Use new ThreadingOnce class instead of pthread_once.
(WTF::initializeCompilationThreads):
* wtf/ThreadingOnce.h: Added ThreadingOnce class encapsulating pthread_once functionality.
(WTF::ThreadingOnce::ThreadingOnce):
(WTF::ThreadingOnce::~ThreadingOnce):
(WTF::ThreadingOnce::callOnce):
* wtf/text/CString.h: Export needed symbols.

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

6 years agoAdd result caching for Math.cos
commit-queue@webkit.org [Wed, 30 Oct 2013 17:47:32 +0000 (17:47 +0000)]
Add result caching for Math.cos
https://bugs.webkit.org/show_bug.cgi?id=123255

Patch by Iago Toral Quiroga <itoral@igalia.com> on 2013-10-30
Reviewed by Brent Fulgham.

* runtime/MathObject.cpp:
(JSC::mathProtoFuncCos):
* runtime/VM.h:

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

6 years agoFix memory leaks in platform/image-encoders/JPEGImageEncoder.cpp
commit-queue@webkit.org [Wed, 30 Oct 2013 17:44:59 +0000 (17:44 +0000)]
Fix memory leaks in platform/image-encoders/JPEGImageEncoder.cpp
https://bugs.webkit.org/show_bug.cgi?id=118781

Patch by Liangjun Zeng <lizeng@blackberry.com> on 2013-10-30
Reviewed by Brent Fulgham.

We can find the function "jpeg_finish_compress" call the function "jpeg_abort" at the end.
And the comments of "jpeg_abort" is "Abort processing of a JPEG compression operation,
but don't destroy the object itself". (We can find these in the "jcapimin.c" of jpeg)
So the compression object destroy need be called.
No new tests because this doesn't change functionality.

* platform/image-encoders/JPEGImageEncoder.cpp:
(WebCore::compressRGBABigEndianToJPEG):

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

6 years agoAdd debug settings for simple line layout
antti@apple.com [Wed, 30 Oct 2013 17:40:06 +0000 (17:40 +0000)]
Add debug settings for simple line layout
https://bugs.webkit.org/show_bug.cgi?id=123514

Source/WebCore:

Reviewed by Andreas Kling.

* WebCore.exp.in:
* page/Settings.in:

    Add simpleLineLayoutEnabled and simpleLineLayoutDebugBordersEnabled.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintDebugBorders):
(WebCore::SimpleLineLayout::paintFlow):

Source/WebKit2:

Reviewed by Andreas Kling.

Expose debug settings.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSimpleLineLayoutEnabled):
(WKPreferencesGetSimpleLineLayoutEnabled):
(WKPreferencesSetSimpleLineLayoutDebugBordersEnabled):
(WKPreferencesGetSimpleLineLayoutDebugBordersEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

6 years ago[WIN] Add missing USE(CFNETWORK) to WebError.h
paroga@webkit.org [Wed, 30 Oct 2013 17:33:39 +0000 (17:33 +0000)]
[WIN] Add missing USE(CFNETWORK) to WebError.h
https://bugs.webkit.org/show_bug.cgi?id=121834

Reviewed by Brent Fulgham.

WebError.cpp uses USE(CFNETWORK), so add it to the header too.

* WebError.h:

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

6 years ago[Curl] Cookies are sometimes not set in download request.
commit-queue@webkit.org [Wed, 30 Oct 2013 17:31:40 +0000 (17:31 +0000)]
[Curl] Cookies are sometimes not set in download request.
https://bugs.webkit.org/show_bug.cgi?id=123445

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

Sometimes cookies are not set in the download request because the cookie file cannot be opened,
it's already been opened by the ResourceHandleManager for writing.
This can be fixed by getting the cookie list from the share handle in ResourceHandleManager instead.
This will also improve performance, as there is no need to read and parse the cookie file for each download.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::init): Use share handle to get cookie list.

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

6 years ago[Curl][Win] Suggested filename of download is not url decoded.
commit-queue@webkit.org [Wed, 30 Oct 2013 17:29:32 +0000 (17:29 +0000)]
[Curl][Win] Suggested filename of download is not url decoded.
https://bugs.webkit.org/show_bug.cgi?id=123511

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

* WebDownloadCurl.cpp:
(WebDownload::didReceiveResponse): Url decode suggested filename.

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

6 years agoUnguard Element::childShouldCreateRenderer
changseok.oh@collabora.com [Wed, 30 Oct 2013 17:21:10 +0000 (17:21 +0000)]
Unguard Element::childShouldCreateRenderer
https://bugs.webkit.org/show_bug.cgi?id=123496

Reviewed by Andreas Kling.

Make Element::childShouldCreateRenderer normally accessible. Guarding it with flags
just leaves potential build issues.

No new tests since no functionality changed.

* dom/Element.cpp:
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:

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

6 years agoAdd stubbed out WKRemoteObjectRegistry class
andersca@apple.com [Wed, 30 Oct 2013 16:44:21 +0000 (16:44 +0000)]
Add stubbed out WKRemoteObjectRegistry class
https://bugs.webkit.org/show_bug.cgi?id=123512

Reviewed by Andreas Kling.

Also add a WKRemoteObjectInterface class that represents a remote object interface.

* Shared/API/Cocoa/WKRemoteObjectInterface.h: Added.
* Shared/API/Cocoa/WKRemoteObjectInterface.mm: Added.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
* Shared/API/Cocoa/WKRemoteObjectRegistry.h: Added.
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Added.
(-[WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years ago[EFL] accessibility/textarea-selected-text-range.html is failing
commit-queue@webkit.org [Wed, 30 Oct 2013 16:06:07 +0000 (16:06 +0000)]
[EFL] accessibility/textarea-selected-text-range.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112016

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-30
Reviewed by Mario Sanchez Prada.

Tools:

Provided implementation for AccessibilityUIElement::selectedTextRange() and
AccessibilityUIElement::setSelectedTextRange().

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::selectedTextRange): Implemented.
(AccessibilityUIElement::setSelectedTextRange): Implemented
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::selectedTextRange): Implemented.
(WTR::AccessibilityUIElement::setSelectedTextRange): Implemented.

LayoutTests:

Removed failure expectations.

* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.

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