WebKit-https.git
8 years agoPrecision updates in WebAudio.
commit-queue@webkit.org [Thu, 5 Sep 2013 13:25:50 +0000 (13:25 +0000)]
Precision updates in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=119739

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2013-09-05
Reviewed by Philippe Normand.

WebAudio Specification suggests to use 'double' datatypes
for minDecibels, maxDecibels and smoothingTimeConstant in
AnalyserNode.idl and currentTime in AudioContext.idl.
Current WebKit implementation has declared these attributes
as 'float' type.

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
      https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AnalyserNode

No new tests, covered by existing tests.

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::minDecibels):
(WebCore::AnalyserNode::maxDecibels):
(WebCore::AnalyserNode::smoothingTimeConstant):
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/RealtimeAnalyser.h:
(WebCore::RealtimeAnalyser::setMinDecibels):
(WebCore::RealtimeAnalyser::minDecibels):
(WebCore::RealtimeAnalyser::setMaxDecibels):
(WebCore::RealtimeAnalyser::maxDecibels):
(WebCore::RealtimeAnalyser::setSmoothingTimeConstant):
(WebCore::RealtimeAnalyser::smoothingTimeConstant):

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

8 years ago[GTK] media/track/in-band/ layout tests introduced in r154908 are failing
commit-queue@webkit.org [Thu, 5 Sep 2013 13:22:00 +0000 (13:22 +0000)]
[GTK] media/track/in-band/ layout tests introduced in r154908 are failing
https://bugs.webkit.org/show_bug.cgi?id=120665

Patch by Brendan Long <b.long@cablelabs.com> on 2013-09-05
Reviewed by Philippe Normand.

* platform/efl/TestExpectations: Skip new media/track/in-band tests.

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

8 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Thu, 5 Sep 2013 12:34:35 +0000 (12:34 +0000)]
[Qt] Unreviewed gardening.

* platform/qt-wk1/TestExpectations: Unskipping after 155104.
* platform/qt/TestExpectations: Unskipping after r155061.

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

8 years agoReplace node() calls with generatingNode() for RenderRegion code
mihnea@adobe.com [Thu, 5 Sep 2013 10:33:05 +0000 (10:33 +0000)]
Replace node() calls with generatingNode() for RenderRegion code
https://bugs.webkit.org/show_bug.cgi?id=120397

Reviewed by Darin Adler.

As regions will become anonymous blocks nested inside elements with the flow-from property, a first step
would be to change the calls to node() with calls to generatingNode(). In the case of regions, generatingNode()
will always return an Element* and not a Node*. Therefore, to get rid of toElement() casts, i created
a specific method RenderRegion::generatingElement that will return the generating node as Element.
No new tests as no functional change was introduced.

Original patch by Catalin Badea.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
(WebCore::RenderRegion::checkRegionStyle):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::generatingElement):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList): For pseudo-elements as regions, i want to print
{pseudo} instead of {div} marker for the parent.

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

8 years agoFix SynchronousLoaderClient class for !USE(CFNETWORK) platforms
ossy@webkit.org [Thu, 5 Sep 2013 09:51:25 +0000 (09:51 +0000)]
Fix SynchronousLoaderClient class for !USE(CFNETWORK) platforms
https://bugs.webkit.org/show_bug.cgi?id=120532

Reviewed by Darin Adler.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/SynchronousLoaderClient.cpp:
* platform/network/cf/SynchronousLoaderClientCFNet.cpp: Added.
(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
(WebCore::SynchronousLoaderClient::platformBadResponseError):
* platform/network/soup/SynchronousLoaderClientSoup.cpp: Added.
(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
(WebCore::SynchronousLoaderClient::platformBadResponseError):

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

8 years agoFix unused parameter warning in WebKitAccessibleInterfaceText.cpp
jinwoo7.song@samsung.com [Thu, 5 Sep 2013 09:01:02 +0000 (09:01 +0000)]
Fix unused parameter warning in WebKitAccessibleInterfaceText.cpp
<https://webkit.org/b/120761>

Reviewed by Gyuyoung Kim.

Fix warning by removing unused parameter.

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

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

8 years agoUnreviewed. Fix build after r155083
ljaehun.lim@samsung.com [Thu, 5 Sep 2013 08:41:25 +0000 (08:41 +0000)]
Unreviewed. Fix build after r155083

Source/WTF/wtf/Vector.h:1210:48: error: ‘>>’ should be ‘> >’ within a nested template argument list

* wtf/Vector.h: Add missing space.

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

8 years agoNULL ptr in WebCore::RefCountedPropertyWrapper<WebCore::ClipPathOperation>::blend
krit@webkit.org [Thu, 5 Sep 2013 07:38:46 +0000 (07:38 +0000)]
NULL ptr in WebCore::RefCountedPropertyWrapper<WebCore::ClipPathOperation>::blend
https://bugs.webkit.org/show_bug.cgi?id=105408

Reviewed by Dean Jackson.

Source/WebCore:

Adding an early return if from or to clip-path values are 'none'. According to the
specification we shall just interpolate between two basic shapes.

http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):

LayoutTests:

Test that animation from none to a basic shape on -webkit-clip-path doesn't crash.

* css3/masking/clip-path-animation-expected.txt:
* css3/masking/clip-path-animation.html:

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

8 years ago[Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
commit-queue@webkit.org [Thu, 5 Sep 2013 07:33:38 +0000 (07:33 +0000)]
[Qt][WK1] REGRESSION(r154988): compositing/video/video-with-invalid-source.html
https://bugs.webkit.org/show_bug.cgi?id=120683

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-05
Reviewed by Philippe Normand.

Do not set pipeline state to NULL on MediaPlayerPrivateGStreamer::loadingFailed()
otherwise the bus is flushed and we never get a GST_MESSAGE_ERROR when failing to
load uris.
Also restore previous behaviour (before r154988) of not invoking loadingFailed() for
all failed manual state change attempts.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
Do not call loadingFailed() if state change fails as all manual state changes are
now done with changePipelineState().
(WebCore::MediaPlayerPrivateGStreamer::play):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Restore previous behaviour (before changeset r154988) when calling changePipelineState().
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
Do nothing if changing to READY on EOS (same behaviour as setting to NULL as it was before
changeset r154988).
(WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
Do not set pipeline state to NULL so we properly get GST_MESSAGE_ERROR on loading failures.

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

8 years agoUnreviewed, don't run fast/js tests in run-javascriptcore-tests on platforms that
fpizlo@apple.com [Thu, 5 Sep 2013 07:23:58 +0000 (07:23 +0000)]
Unreviewed, don't run fast/js tests in run-javascriptcore-tests on platforms that
can't support it because if non-bourne shells. This fixes part #2 of the Linux
bot breakage.

* Scripts/run-javascriptcore-tests:

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

8 years ago[GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
berto@igalia.com [Thu, 5 Sep 2013 07:22:01 +0000 (07:22 +0000)]
[GTK] MediaControlsGtk: fix warning in constructor due to incorrect order of attributes
https://bugs.webkit.org/show_bug.cgi?id=120703

Reviewed by Carlos Garcia Campos.

Fix member initialization so it matches their declaration [-Wreorder].

* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::MediaControlsGtk):

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

8 years agoUnreviewed, don't rely on File::Slurp. This fixes part #1 of Linux bot breakage.
fpizlo@apple.com [Thu, 5 Sep 2013 07:18:58 +0000 (07:18 +0000)]
Unreviewed, don't rely on File::Slurp. This fixes part #1 of Linux bot breakage.

* Scripts/run-javascriptcore-tests:
(readAllLines):

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

8 years agoSupport interpolation between cross-fade() images
krit@webkit.org [Thu, 5 Sep 2013 06:50:05 +0000 (06:50 +0000)]
Support interpolation between cross-fade() images
https://bugs.webkit.org/show_bug.cgi?id=119955

Reviewed by Darin Adler.

Source/WebCore:

With this patch, CSS can animate from one -webkit-cross-fade
function to another, when the input images are the same in the
same order.

* css/CSSCrossfadeValue.cpp: Added blend function.
(WebCore::blendFunc):
(WebCore::CSSCrossfadeValue::blend):
(WebCore::CSSCrossfadeValue::equals):
(WebCore::CSSCrossfadeValue::equalInputImages):
* css/CSSCrossfadeValue.h: Added save casting functions.
(WebCore::toCSSCrossfadeValue):
* css/CSSValue.h:
(WebCore::CSSValue::isCrossfadeValue):
* page/animation/CSSPropertyAnimation.cpp: Add another condition to
    interpolate between two -webkit-cross-fade functions.
(WebCore::blendFunc):

LayoutTests:

Test interpolation from one cross-fade function to another. Changed pixel test
to a ref test.

* animations/cross-fade-background-image.html:
* animations/cross-fade-background-image-expected.html: Added.
* platform/mac/animations/cross-fade-background-image-expected.png: Removed.
* platform/mac/animations/cross-fade-background-image-expected.txt: Removed.

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

8 years ago<https://webkit.org/b/118553> Hash navigation doesn't affect history when the page...
zherczeg@webkit.org [Thu, 5 Sep 2013 06:38:55 +0000 (06:38 +0000)]
<https://webkit.org/b/118553> Hash navigation doesn't affect history when the page is retrieved from appcache

Reviewed by Darin Adler.

Source/WebCore:

A new flag called keepInHistory is added to allow keeping
certain pages in the history even if they have substitute data.

Test: http/tests/appcache/history-test.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::urlForHistory):
* loader/SubstituteData.h:
(WebCore::SubstituteData::SubstituteData):
(WebCore::SubstituteData::shouldRevealToSessionHistory):
(WebCore::SubstituteData::setShouldRevealToSessionHistory):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):

LayoutTests:

* http/tests/appcache/history-test-expected.txt: Added.
* http/tests/appcache/history-test.html: Added.
* http/tests/appcache/resources/history-test.html: Added.
* http/tests/appcache/resources/history-test.manifest: Added.

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

8 years agojsc tests should have timeouts
fpizlo@apple.com [Thu, 5 Sep 2013 06:34:58 +0000 (06:34 +0000)]
jsc tests should have timeouts
https://bugs.webkit.org/show_bug.cgi?id=120725

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Add the timeout logic directly to 'jsc' because that's easier to do than
writing shell/perl code for it.

* jsc.cpp:
(timeoutThreadMain):
(main):

Tools:

Reviewed by Geoffrey Garen.

Set the timeout to 20 seconds per test for now.

* Scripts/run-javascriptcore-tests:

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

8 years agoTest background blend modes with animated gif background layers.
commit-queue@webkit.org [Thu, 5 Sep 2013 06:32:35 +0000 (06:32 +0000)]
Test background blend modes with animated gif background layers.
https://bugs.webkit.org/show_bug.cgi?id=120057

Patch by Mihai Tica <mitica@adobe.com> on 2013-09-04
Reviewed by Darin Adler.

* css3/compositing/background-blend-mode-gif-color-2.html: Added.
* css3/compositing/background-blend-mode-gif-color.html: Added.
* css3/compositing/resources/squares.gif: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.png: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-2-expected.txt: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-expected.png: Added.
* platform/mac/css3/compositing/background-blend-mode-gif-color-expected.txt: Added.

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

8 years agofast/js/dfg-* tests should wait for the concurrent JIT
fpizlo@apple.com [Thu, 5 Sep 2013 06:30:15 +0000 (06:30 +0000)]
fast/js/dfg-* tests should wait for the concurrent JIT
https://bugs.webkit.org/show_bug.cgi?id=120723

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

* runtime/TestRunnerUtils.cpp:
(JSC::numberOfDFGCompiles): This should also handle constructors.

LayoutTests:

Reviewed by Geoffrey Garen.

Add dfgShouldBe(), a handy function that covers a lot of common cases.
Also convert a bunch of tests.

* fast/js/dfg-activation-register-overwritten-in-throw-expected.txt:
* fast/js/dfg-add-not-number-expected.txt:
* fast/js/dfg-allocation-profile-watch-point-exit-expected.txt:
* fast/js/dfg-arguments-alias-escape-expected.txt:
* fast/js/dfg-arguments-cross-code-origin-expected.txt:
* fast/js/dfg-arguments-mixed-alias-expected.txt:
* fast/js/dfg-arguments-strict-mode-expected.txt:
* fast/js/dfg-arguments-unexpected-escape-expected.txt:
* fast/js/dfg-array-dead-expected.txt:
* fast/js/dfg-array-length-dead-expected.txt:
* fast/js/dfg-array-pop-value-clearing-expected.txt:
* fast/js/dfg-array-push-bad-time-expected.txt:
* fast/js/dfg-array-push-slow-put-expected.txt:
* fast/js/dfg-arrayify-when-late-prevent-extensions-expected.txt:
* fast/js/dfg-arrayify-when-prevent-extensions-expected.txt:
* fast/js/dfg-bool-to-int32-reuse-expected.txt:
* fast/js/jsc-test-list:
* fast/js/resources/js-test-pre.js:
(dfgShouldBe):
* fast/js/resources/standalone-pre.js:
(dfgShouldBe):
* fast/js/script-tests/dfg-activation-register-overwritten-in-throw.js:
(g):
* fast/js/script-tests/dfg-add-not-number.js:
* fast/js/script-tests/dfg-allocation-profile-watch-point-exit.js:
(foo):
* fast/js/script-tests/dfg-arguments-alias-escape.js:
* fast/js/script-tests/dfg-arguments-cross-code-origin.js:
* fast/js/script-tests/dfg-arguments-mixed-alias.js:
* fast/js/script-tests/dfg-arguments-strict-mode.js:
* fast/js/script-tests/dfg-arguments-unexpected-escape.js:
* fast/js/script-tests/dfg-array-dead.js:
* fast/js/script-tests/dfg-array-length-dead.js:
* fast/js/script-tests/dfg-array-pop-value-clearing.js:
* fast/js/script-tests/dfg-array-push-bad-time.js:
* fast/js/script-tests/dfg-array-push-slow-put.js:
* fast/js/script-tests/dfg-arrayify-when-late-prevent-extensions.js:
* fast/js/script-tests/dfg-arrayify-when-prevent-extensions.js:
* fast/js/script-tests/dfg-bool-to-int32-reuse.js:

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

8 years agoRemove deprecated markersForNode(Node* node).
g.czajkowski@samsung.com [Thu, 5 Sep 2013 06:29:50 +0000 (06:29 +0000)]
Remove deprecated markersForNode(Node* node).
https://bugs.webkit.org/show_bug.cgi?id=120679

Reviewed by Ryosuke Niwa.

DocumentMarkerController::markersForNode(Node* node) has been marked as
deprecated in favor of markersFor(Node*, MarkerTypes = AllMarkers()).

No new tests, no behavior change.

* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
Remove never used markersForNode(Node*).

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

8 years agoCachedPage construction should begin with a Page&.
akling@apple.com [Thu, 5 Sep 2013 06:20:09 +0000 (06:20 +0000)]
CachedPage construction should begin with a Page&.
<https://webkit.org/b/120721>

Reviewed by Anders Carlsson.

We can't create a CachedPage from a null Page anyway.

* history/CachedPage.cpp:
(WebCore::CachedPage::create):
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
* history/CachedPage.h:
* history/PageCache.cpp:
(WebCore::PageCache::add):
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):

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

8 years agosetAttributeNode() does not set the new value to an existing attribute if specified...
a.bah@samsung.com [Thu, 5 Sep 2013 06:05:16 +0000 (06:05 +0000)]
setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.
https://bugs.webkit.org/show_bug.cgi?id=120293

Reviewed by Darin Adler.

Source/WebCore:

setAttributeNode() performs a case-insensitive search for an existing
attribute. If an existing attribute is found, it retrieves the index of
such an attribute. For setting the attribute's new value, we call upon
setAttributeInternal() to which both the index as well as the name of
the attribute is passed.
The name passed to this method is the same as the one passed to the
setAttributeNode() API from the webpage and thus can be in any case.

However, setAttributeInternal() uses this name to get the corresponding
existing attribute node. Since this retrieval is not case-insensitive,
the existing node is not returned and thus the new value is not set on
the existing node.
We should instead use the passed index and use that to retrieve the
existing node.

Note that obtaining the attribute's value using getAttributeNode() would
still return the correct value, i.e. the new one.

Also, this change shall make our behavior similar to that of FF and IE.

Test: fast/dom/Element/setAttributeNode-for-existing-attribute.html

* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
If the passed index is not equal to attributeNotFound, we use that index
to retrieve the existing attribute.

LayoutTests:

* fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt: Added.
* fast/dom/Element/setAttributeNode-for-existing-attribute.html: Added.
Layout testcase for verifying that the new attribute value is set properly
if an existing attribute with the same name exists.

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

8 years agorun-javascriptcore-tests should run-fast-jsc as well
fpizlo@apple.com [Thu, 5 Sep 2013 04:44:02 +0000 (04:44 +0000)]
run-javascriptcore-tests should run-fast-jsc as well
https://bugs.webkit.org/show_bug.cgi?id=120722

Tools:

Reviewed by Geoffrey Garen.

Makes run-javascriptcore-tests run the fast/js tests via run-fast-jsc tool.
Integrates run-fast-jsc's error reporting into run-javascriptcore-tests.

* Scripts/run-javascriptcore-tests:
(printThingsFound):

LayoutTests:

Reviewed by Geoffrey Garen.

Make all run-fast-jsc tests pass:

- We should always define successfullyParsed and we shouldn't falsify it
  when a test fails. This was already true in js-test-pre.

- Object-defineProperty() depends on DOM-like global object behavior.
  Remove the test from the run-fast-jsc list.

* fast/js/jsc-test-list:
* fast/js/resources/standalone-pre.js:
(testFailed):

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

8 years agoCachedFrame construction should begin with a Frame&.
akling@apple.com [Thu, 5 Sep 2013 03:13:24 +0000 (03:13 +0000)]
CachedFrame construction should begin with a Frame&.
<https://webkit.org/b/120719>

Reviewed by Anders Carlsson.

We can't create a CachedFrame from a null Frame anyway.

* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptCachedFrameData.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedFrame.h:
(WebCore::CachedFrame::create):
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):

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

8 years agorun-fast-jsc should work with new-school fast/js tests that loop until the DFG tiers up
fpizlo@apple.com [Thu, 5 Sep 2013 03:09:57 +0000 (03:09 +0000)]
run-fast-jsc should work with new-school fast/js tests that loop until the DFG tiers up
https://bugs.webkit.org/show_bug.cgi?id=120697

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

* API/JSCTestRunnerUtils.cpp:
(JSC::numberOfDFGCompiles):
(JSC::setNeverInline):
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionNeverInlineFunction):
(functionNumberOfDFGCompiles):
* runtime/TestRunnerUtils.cpp: Added.
(JSC::getExecutable):
(JSC::numberOfDFGCompiles):
(JSC::setNeverInline):
* runtime/TestRunnerUtils.h: Added.

LayoutTests:

* fast/js/resources/standalone-pre.js:
(testPassed):
(testFailed):
(dfgCompiled):

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

8 years agoSet "render tree being torn down" flag a bit earlier.
akling@apple.com [Thu, 5 Sep 2013 03:04:58 +0000 (03:04 +0000)]
Set "render tree being torn down" flag a bit earlier.
<https://webkit.org/b/120717>

Reviewed by Anders Carlsson.

Set the flag at the start of Document::detach() so everyone can get a chance
to avoid unnecessary work, not just renderers.

* dom/Document.cpp:
(WebCore::Document::detach):

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

8 years agoIntroduce a version of SunSpider that runs for a really long time (about 1 sec on...
fpizlo@apple.com [Thu, 5 Sep 2013 02:53:16 +0000 (02:53 +0000)]
Introduce a version of SunSpider that runs for a really long time (about 1 sec on my machine)

Rubber stamped by Mark Hahnenberg.

This isn't meant for serious VM-to-VM performance comparisons, but it is useful
to see how these benchmarks behave when they're completely warmed up.

* LongSpider: Added.
* LongSpider/3d-cube.js: Added.
(DrawLine):
(CalcCross):
(CalcNormal):
(CreateP):
(MMulti):
(VMulti):
(VMulti2):
(MAdd):
(Translate):
(RotateX):
(RotateY):
(RotateZ):
(DrawQube):
(Loop):
(Init):
* LongSpider/3d-morph.js: Added.
(loops.3500.nx.120.nz.120.morph):
* LongSpider/3d-raytrace.js: Added.
(createVector):
(sqrLengthVector):
(lengthVector):
(addVector):
(subVector):
(scaleVector):
(normaliseVector):
(add):
(sub):
(scalev):
(dot):
(scale):
(cross):
(normalise):
(transformMatrix):
(invertMatrix):
(Triangle):
(Triangle.prototype.intersect):
(Scene):
(Scene.prototype.intersect):
(Scene.prototype.blocked):
(Camera):
(Camera.prototype.generateRayPair):
(renderRows):
(Camera.prototype.render):
(raytraceScene.floorShader):
(raytraceScene):
(arrayToCanvasCommands):
* LongSpider/access-binary-trees.js: Added.
(TreeNode):
(TreeNode.prototype.itemCheck):
(bottomUpTree):
* LongSpider/access-fannkuch.js: Added.
(fannkuch):
* LongSpider/access-nbody.js: Added.
(Body):
(Body.prototype.offsetMomentum):
(Jupiter):
(Saturn):
(Uranus):
(Neptune):
(Sun):
(NBodySystem):
(NBodySystem.prototype.advance):
(NBodySystem.prototype.energy):
* LongSpider/access-nsieve.js: Added.
(pad):
(nsieve):
(sieve):
* LongSpider/bitops-3bit-bits-in-byte.js: Added.
(fast3bitlookup):
(TimeFunc):
* LongSpider/bitops-bits-in-byte.js: Added.
(bitsinbyte):
(TimeFunc):
* LongSpider/bitops-nsieve-bits.js: Added.
(pad):
(primes):
(sieve):
* LongSpider/controlflow-recursive.js: Added.
(ack):
(fib):
(tak):
* LongSpider/crypto-aes.js: Added.
(Cipher):
(SubBytes):
(ShiftRows):
(MixColumns):
(AddRoundKey):
(KeyExpansion):
(SubWord):
(RotWord):
(AESEncryptCtr):
(AESDecryptCtr):
(escCtrlChars):
* LongSpider/crypto-md5.js: Added.
(hex_md5):
(b64_md5):
(str_md5):
(hex_hmac_md5):
(b64_hmac_md5):
(str_hmac_md5):
(md5_vm_test):
(core_md5):
(md5_cmn):
(md5_ff):
(md5_gg):
(md5_hh):
(md5_ii):
(core_hmac_md5):
(safe_add):
(bit_rol):
(str2binl):
(binl2str):
(binl2hex):
(binl2b64):
* LongSpider/crypto-sha1.js: Added.
(hex_sha1):
(b64_sha1):
(str_sha1):
(hex_hmac_sha1):
(b64_hmac_sha1):
(str_hmac_sha1):
(sha1_vm_test):
(core_sha1):
(sha1_ft):
(sha1_kt):
(core_hmac_sha1):
(safe_add):
(rol):
(str2binb):
(binb2str):
(binb2hex):
(binb2b64):
* LongSpider/date-format-tofte.js: Added.
(arrayExists):
(.a):
(.A):
(.B):
(.d):
(.D):
(.F):
(.g):
(.G):
(.h):
(.H):
(.i):
(.j):
(.l):
(.L):
(.m):
(.M):
(.n):
(.O):
(.r):
(.S):
(.s):
(.t):
(.U):
(.W):
(.w):
(.Y):
(.y):
(.z):
(Date.prototype.formatDate):
* LongSpider/date-format-xparb.js: Added.
(Date.prototype.dateFormat):
(Date.createNewFormat):
(Date.getFormatCode):
(Date.parseDate):
(Date.createParser):
(Date.formatCodeToRegex):
(Date.prototype.getTimezone):
(Date.prototype.getGMTOffset):
(Date.prototype.getDayOfYear):
(Date.prototype.getWeekOfYear):
(Date.prototype.isLeapYear):
(Date.prototype.getFirstDayOfMonth):
(Date.prototype.getLastDayOfMonth):
(Date.prototype.getDaysInMonth):
(Date.prototype.getSuffix):
(String.escape):
* LongSpider/math-cordic.js: Added.
(FIXED):
(FLOAT):
(DEG2RAD):
(cordicsincos):
(cordic):
* LongSpider/math-partial-sums.js: Added.
(partial):
* LongSpider/math-spectral-norm.js: Added.
(A):
(Au):
(Atu):
(AtAu):
(spectralnorm):
* LongSpider/string-base64.js: Added.
(toBase64):
(base64ToString):
* LongSpider/string-fasta.js: Added.
(rand):
(makeCumulative):
(fastaRepeat):
(fastaRandom):
* LongSpider/string-tagcloud.js: Added.
(.Array.prototype.toJSONString):
(.Boolean.prototype.toJSONString):
(.Date.prototype.toJSONString):
(.Number.prototype.toJSONString):
(.Object.prototype.toJSONString):
(.):

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

8 years agoFix AutodrainedPool.h to compile without errors under ARC.
mrowe@apple.com [Thu, 5 Sep 2013 02:44:28 +0000 (02:44 +0000)]
Fix AutodrainedPool.h to compile without errors under ARC.

Rubber-stamped by Anders Carlsson.

* wtf/AutodrainedPool.h: Some versions of Clang complain about any use of NSAutoreleasePool under ARC.
Change the type of the member variable to id to work around this. Since the implementation file is compiled
under manual reference counting, everything will work fine.

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

8 years agoCached Page and Frame don't need to be ref-counted.
akling@apple.com [Thu, 5 Sep 2013 01:41:18 +0000 (01:41 +0000)]
Cached Page and Frame don't need to be ref-counted.
<https://webkit.org/b/120710>

Reviewed by Anders Carlsson.

- CachedPage is owned by HistoryItem.
- CachedFrame is owned by CachedPage.

Remove the ref counting from these objects to make the code less confusing.

The only place that used this was in FrameLoader::commitProvisionalLoad() which
took a temporary ref on the CachedPage. Switched this to using a raw pointer.

* history/CachedFrame.h:
(WebCore::CachedFrame::create):
* history/CachedPage.cpp:
(WebCore::CachedPage::create):
* history/CachedPage.h:
* history/HistoryItem.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
* loader/FrameLoader.h:

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

8 years ago[EFL][WK2] Move ShouldGoToBackForwardListItem to the list of passing API tests
commit-queue@webkit.org [Thu, 5 Sep 2013 01:22:49 +0000 (01:22 +0000)]
[EFL][WK2] Move ShouldGoToBackForwardListItem to the list of passing API tests
https://bugs.webkit.org/show_bug.cgi?id=120646

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-09-04
Reviewed by Gyuyoung Kim.

* TestWebKitAPI/PlatformEfl.cmake: Move ShouldGoToBackForwardListItem to the
list of passing tests, since it started to pass after r154045.

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

8 years agoUnreviewed. Windows build fix and WebCore project cleanup.
roger_fong@apple.com [Thu, 5 Sep 2013 01:05:27 +0000 (01:05 +0000)]
Unreviewed. Windows build fix and WebCore project cleanup.

* WebCore.vcxproj/WebCore.vcxproj.filters:
* rendering/RenderingAllInOne.cpp:

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

8 years agoDe-indent Vector.h.
andersca@apple.com [Thu, 5 Sep 2013 01:04:54 +0000 (01:04 +0000)]
De-indent Vector.h.

Rubber-stamped by Andreas Kling.

I'm cleaning up Vector and making it work with move-only objects, and the namespace WTF
indentation is driving me crazy.

* wtf/Vector.h:

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

8 years ago<https://webkit.org/b/120707> Make WebKit's localizable strings mechanism usable...
mrowe@apple.com [Thu, 5 Sep 2013 00:49:56 +0000 (00:49 +0000)]
<https://webkit.org/b/120707> Make WebKit's localizable strings mechanism usable under ARC

WebKit's localizable strings mechanism is also used outside of WebKit so it needs to work
both with and without ARC.

Reviewed by Anders Carlsson.

* Misc/WebLocalizableStrings.h: Mark the bundle member as unretained. This matches how the
member is used within WebLocalizableStrings.mm.

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

8 years agoRenamed StackIterator to StackVisitor.
mark.lam@apple.com [Thu, 5 Sep 2013 00:40:15 +0000 (00:40 +0000)]
Renamed StackIterator to StackVisitor.
https://bugs.webkit.org/show_bug.cgi?id=120706.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Also did some minor refactoring:
- Renamed StackIterator::iterate() to StackVisitor::visit().
- Make StackVisitor::visit() a static method.
- Move the instantiation of the StackVisitor instance into StackVisitor::visit()
  from CallFrame::iterate().
- Removed StackIterator::resetIterator() and inline its body into the
  StackVisitor constructor since this is the only remaining caller of it.

* API/JSContextRef.cpp:
(BacktraceFunctor::operator()):
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* interpreter/CallFrame.h:
(JSC::ExecState::iterate):
* interpreter/Interpreter.cpp:
(JSC::DumpRegisterFunctor::operator()):
(JSC::unwindCallFrame):
(JSC::getStackFrameCodeType):
(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):
* interpreter/Interpreter.h:
* interpreter/StackIterator.cpp: Removed.
* interpreter/StackIterator.h: Removed.
* interpreter/StackVisitor.cpp: Copied from Source/JavaScriptCore/interpreter/StackIterator.cpp.
(JSC::StackVisitor::StackVisitor):
(JSC::StackVisitor::gotoNextFrame):
(JSC::StackVisitor::readFrame):
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::readInlinedFrame):
(JSC::StackVisitor::Frame::codeType):
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::toString):
(JSC::StackVisitor::Frame::arguments):
(JSC::StackVisitor::Frame::computeLineAndColumn):
(JSC::StackVisitor::Frame::retrieveExpressionInfo):
(JSC::StackVisitor::Frame::setToEnd):
(JSC::StackVisitor::Frame::print):
(DebugPrintFrameFunctor::operator()):
* interpreter/StackVisitor.h: Copied from Source/JavaScriptCore/interpreter/StackIterator.h.
(JSC::StackVisitor::visit):
* jsc.cpp:
(FunctionJSCStackFunctor::operator()):
* profiler/ProfileGenerator.cpp:
(JSC::AddParentForConsoleStartFunctor::operator()):
* runtime/JSFunction.cpp:
(JSC::RetrieveArgumentsFunctor::operator()):
(JSC::RetrieveCallerFunctionFunctor::operator()):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::GlobalFuncProtoSetterFunctor::operator()):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):

Source/WebCore:

No new tests.

* ForwardingHeaders/interpreter/StackIterator.h: Removed.
* ForwardingHeaders/interpreter/StackVisitor.h: Copied from Source/WebCore/ForwardingHeaders/interpreter/StackIterator.h.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::operator()):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::CreateScriptCallStackFunctor::operator()):
(WebCore::CreateScriptCallStackForConsoleFunctor::operator()):

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

8 years agoAX: when no other label on provided on form elements, WebKit should fall back to...
commit-queue@webkit.org [Wed, 4 Sep 2013 22:55:52 +0000 (22:55 +0000)]
AX: when no other label on provided on form elements, WebKit should fall back to using @title
https://bugs.webkit.org/show_bug.cgi?id=112842

Patch by Samuel White <samuel_white@apple.com> on 2013-09-04
Reviewed by Chris Fleizach.

Source/WebCore:

Don't let input elements include empty labels in their accessibility title.

Test: platform/mac/accessibility/input-title.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::titleElementText):

LayoutTests:

Added test to ensure that input elements are computing their
accessibility title as expected.

* platform/mac/accessibility/input-title-expected.txt: Added.
* platform/mac/accessibility/input-title.html: Added.

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

8 years agoMake ImageQualityController per-RenderView.
akling@apple.com [Wed, 4 Sep 2013 22:47:58 +0000 (22:47 +0000)]
Make ImageQualityController per-RenderView.
<https://webkit.org/b/120702>

Reviewed by Anders Carlsson.

Move ImageQualityController to its own files and add a RenderView::imageQualityController()
getter instead of using a global map for all render trees.

This avoids having to unregister every renderer (well, every RenderBoxModelObject) from the
global hash map during render tree teardown.

It also simplifies the live resize optimization a bit since it can now short-circuit if
the RenderView's FrameView is being resized. (Previously there could be any number of
RenderViews present in the map.)

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/ImageQualityController.cpp: Added.
* rendering/ImageQualityController.h: Added.

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

8 years agoUnreviewed Build fix for Windows DebugSuffix configuration.
roger_fong@apple.com [Wed, 4 Sep 2013 22:46:07 +0000 (22:46 +0000)]
Unreviewed Build fix for Windows DebugSuffix configuration.

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

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

8 years agoRefining the StackIterator callback interface.
mark.lam@apple.com [Wed, 4 Sep 2013 22:33:57 +0000 (22:33 +0000)]
Refining the StackIterator callback interface.
https://bugs.webkit.org/show_bug.cgi?id=120695.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Introduce CallFrame::iterate() which instantiates a StackIterator and
invoke its iterate() method with the passed in functor. The only place
where the client code gets access to the StackIterator now is as an
argument to the client's functor.

* API/JSContextRef.cpp:
(JSContextCreateBacktrace):
* interpreter/CallFrame.cpp:
* interpreter/CallFrame.h:
(JSC::ExecState::iterate):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpRegisters):
(JSC::Interpreter::getStackTrace):
(JSC::Interpreter::unwind):
* interpreter/StackIterator.cpp:
(JSC::StackIterator::StackIterator):
(DebugPrintFrameFunctor::DebugPrintFrameFunctor):
(DebugPrintFrameFunctor::operator()):
(debugPrintCallFrame):
(debugPrintStack):
* interpreter/StackIterator.h:
(JSC::StackIterator::iterate):
* jsc.cpp:
(functionJSCStack):
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::addParentForConsoleStart):
* runtime/JSFunction.cpp:
(JSC::retrieveArguments):
(JSC::RetrieveCallerFunctionFunctor::operator()):
(JSC::retrieveCallerFunction):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetPrototypeOf):

Source/WebCore:

No new tests.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::SendFunctor):
(WebCore::SendFunctor::line):
(WebCore::SendFunctor::url):
(WebCore::SendFunctor::operator()):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):

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

8 years agoRemove unnecessary RenderView.h inclusion from headers.
akling@apple.com [Wed, 4 Sep 2013 22:28:36 +0000 (22:28 +0000)]
Remove unnecessary RenderView.h inclusion from headers.
<https://webkit.org/b/120365>

Reviewed by Anders Carlsson.

RenderView.h was overzealously included by RenderText and RenderTextTrackCue,
making it unpleasant to edit on my laptop.

* rendering/RenderText.h:
* rendering/RenderTextTrackCue.h:

    Don't include RenderView.h here, do it in .cpp files.

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

8 years agoFixing a typo in demo files and screenshot.
bdakin@apple.com [Wed, 4 Sep 2013 22:28:19 +0000 (22:28 +0000)]
Fixing a typo in demo files and screenshot.

* blog-files/regions/pizza-is-amazing.png: Replaced.
* demos/regions/pizza-regions-manifesto-regionstyling.html:
* demos/regions/pizza-regions-manifesto.html:

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

8 years agoEditor::m_removedAnchor is unused
ap@apple.com [Wed, 4 Sep 2013 22:20:39 +0000 (22:20 +0000)]
Editor::m_removedAnchor is unused
https://bugs.webkit.org/show_bug.cgi?id=120701

Reviewed by Ryosuke Niwa.

* editing/Editor.h: Removed m_removedAnchor. It was not only unused, but also broken,
as we didn't reset it when navigating.

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

8 years agoDocument::updateHoverActiveState() should allow for deferred style recalcs
psolanki@apple.com [Wed, 4 Sep 2013 22:16:01 +0000 (22:16 +0000)]
Document::updateHoverActiveState() should allow for deferred style recalcs
https://bugs.webkit.org/show_bug.cgi?id=120700

Reviewed by Simon Fraser.

Add an extra argument to Document::updateHoverActiveState() to specify if a style recalc
should be done. The default value keeps the current behavior of doing a style recalc. iOS
touch handling code will pass in DeferRecalcStyleIfNeeded to avoid the work.

No new tests because no functional changes.

* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:

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

8 years ago[mac] PDFDocumentImage should use PDFKit to draw
timothy_horton@apple.com [Wed, 4 Sep 2013 22:08:26 +0000 (22:08 +0000)]
[mac] PDFDocumentImage should use PDFKit to draw
https://bugs.webkit.org/show_bug.cgi?id=120651
<rdar://problem/12810731>

Reviewed by Alexey Proskuryakov.

Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.

Test: fast/images/pdf-as-image-with-annotations.html

* WebCore.xcodeproj/project.pbxproj:
Add PDFDocumentImageMac.mm.

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
We don't need to initialize m_document anymore because it's now a RetainPtr.
Initialize m_hasPage to false.

(WebCore::PDFDocumentImage::~PDFDocumentImage):
We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.

(WebCore::PDFDocumentImage::size):
Use expandedIntSize for explicitness.

(WebCore::PDFDocumentImage::applyRotationForPainting):
Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
Also, explicitly use std::min instead of importing the whole std namespace.

(WebCore::PDFDocumentImage::dataChanged):
Assert that we don't re-enter dataChanged after we've created a document,
because it seems like that shouldn't happen - we only create a document when
we've supposedly received all data, and it would be nice if we didn't have
all this varying code to deal with SharedBuffers changing out from under each other.
Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
replace it with a different implementation that creates a PDFDocument.

(WebCore::PDFDocumentImage::setCurrentPage):
Make all page-number-related things unsigned, since they are in CG and PDFKit,
and add m_hasPage to denote whether we've acquired a valid page yet.
Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
Remove setCurrentPage itself, as we never use a page other than the first page;
we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.

(WebCore::PDFDocumentImage::draw):
Fix a weird comment.
Factor code that actually draws the PDF out into drawPDFPage.

The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):

(WebCore::PDFDocumentImage::createPDFDocument):
Factored out of dataChanged(); I only kept the !PLATFORM(MAC) branch.

(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Factored out of setCurrentPage().
Use deg2rad since we have it.

(WebCore::PDFDocumentImage::pageCount):
(WebCore::PDFDocumentImage::drawPDFPage):
Factored out of draw().
Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).

* platform/graphics/cg/PDFDocumentImage.h:
Unindent all the things, as we don't indent the first level inside a namespace scope.
Forward-declare PDFDocument.
Make m_currentPage unsigned as it should be.
Add m_hasPage.
Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.

* platform/graphics/mac/PDFDocumentImageMac.mm: Added.
Soft-link in PDFKit and specifically the PDFDocument class.

(WebCore::PDFDocumentImage::createPDFDocument):
Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
(with respect to the SharedBuffer's data being appended to in secret), because we've waited
for the document to finish loading before getting here.

(WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
Ask PDFKit for the page's rotation.

(WebCore::PDFDocumentImage::pageCount):
Ask PDFKit for the page count.

(WebCore::PDFDocumentImage::drawPDFPage):
Paint the current page of the PDF. Note that we do not apply the rotation here
via applyRotationForPainting because PDFKit will do it itself.

* platform/mac/SoftLinking.h:
I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
of the umbrella framework and the subframework, so I could use it to soft link
Quartz.framework's PDFKit.framework.

* fast/images/pdf-as-image-with-annotations-expected.html: Added.
* fast/images/pdf-as-image-with-annotations.html: Added.
* fast/images/resources/annotation.pdf: Added.
Add a test that ensures that PDF-in-<img> draws simple annotations.

* platform/mac/fast/images/pdf-as-image-landscape-expected.png:
* platform/mac/fast/images/pdf-as-image-landscape-expected.txt:
Extremely minor rebaselines probably due to PDFKit handling rotation in the new implementation.

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

8 years agoUnreviewed Windows build fix.
roger_fong@apple.com [Wed, 4 Sep 2013 22:04:37 +0000 (22:04 +0000)]
Unreviewed Windows build fix.

* WebCore.vcxproj/WebCoreCommon.props:

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

8 years agoCheck that XMLHttpRequest.response returns null or a json object as specified in...
rniwa@webkit.org [Wed, 4 Sep 2013 22:01:48 +0000 (22:01 +0000)]
Check that XMLHttpRequest.response returns null or a json object as specified in the spec according to readyState value.
https://bugs.webkit.org/show_bug.cgi?id=120690

Reviewed by Darin Adler.

Merge https://chromium.googlesource.com/chromium/blink/+/d667a115b0fd8f5e11a24d8db44388a990abf543

* http/tests/xmlhttprequest/resources/test.json: Added.
* http/tests/xmlhttprequest/response-json-and-readystate-expected.txt: Added.
* http/tests/xmlhttprequest/response-json-and-readystate.html: Added.

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

8 years ago[WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate
berto@igalia.com [Wed, 4 Sep 2013 21:59:27 +0000 (21:59 +0000)]
[WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate
https://bugs.webkit.org/show_bug.cgi?id=117733

Reviewed by Martin Robinson.

If the GL context cannot be created then an invalid
LayerTreeHostGtk object will be returned.

This patch disables accelerated compositing if the system doesn't
support it.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewUpdateSettings):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseUpdatePreferences):
(webkitWebViewBaseCreateWebPage):
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

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

8 years agoFloatingObjects should manage cleaning it's line box tree pointers itself
bjonesbe@adobe.com [Wed, 4 Sep 2013 21:35:56 +0000 (21:35 +0000)]
FloatingObjects should manage cleaning it's line box tree pointers itself
https://bugs.webkit.org/show_bug.cgi?id=120692

Reviewed by David Hyatt.

This is another step in properly encapsulating FloatingObjects.
Instead of having RenderBlock walk and clear the line box tree
pointers, create a method for the behavior, and have RenderBlock call
that.

In addtion, add a proper destructor to FloatingObjects, so that
RenderBlock does not have to explicitly delete the set in
FloatingObjects.

And as a bonus, fix the ordering of an if to avoid the expensive
descendantChild check.

This is a port of a Blink patch by Eric Seidel.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::FloatingObjects::~FloatingObjects):
(WebCore::RenderBlock::FloatingObjects::clearLineBoxTreePointers):
(WebCore::RenderBlock::FloatingObjects::clear):
* rendering/RenderBlock.h:

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

8 years agoJSGenericTypedArrayViewConstructor.h is referenced twice in the XCode project build...
benjamin@webkit.org [Wed, 4 Sep 2013 21:06:44 +0000 (21:06 +0000)]
JSGenericTypedArrayViewConstructor.h is referenced twice in the XCode project build section, causing warnings
https://bugs.webkit.org/show_bug.cgi?id=120698

Reviewed by Darin Adler.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

8 years agoUpload demo and images for a potential blog post.
bdakin@apple.com [Wed, 4 Sep 2013 20:48:55 +0000 (20:48 +0000)]
Upload demo and images for a potential blog post.

* blog-files/regions: Added.
* blog-files/regions/pizza-is-amazing.png: Added.
* demos/regions: Added.
* demos/regions/pizza-regions-manifesto-regionstyling.html: Added.
* demos/regions/pizza-regions-manifesto.html: Added.
* demos/regions/yellow-pizza.jpg: Added.

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

8 years agoRemove HTMLDialogElement layout tests after r154835
ossy@webkit.org [Wed, 4 Sep 2013 20:45:07 +0000 (20:45 +0000)]
Remove HTMLDialogElement layout tests after r154835
https://bugs.webkit.org/show_bug.cgi?id=120680

Reviewed by Darin Adler.

* fast/dom/HTMLDialogElement/: Removed.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

8 years agoActually include new results
oliver@apple.com [Wed, 4 Sep 2013 20:16:21 +0000 (20:16 +0000)]
Actually include new results

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

8 years agoRename customCssText -> customCSSText to match WebKit style
timothy_horton@apple.com [Wed, 4 Sep 2013 20:13:30 +0000 (20:13 +0000)]
Rename customCssText -> customCSSText to match WebKit style
https://bugs.webkit.org/show_bug.cgi?id=120694

Reviewed by Simon Fraser.

No new tests, just a rename.

* WebCore.order:
* css/CSSAspectRatioValue.cpp:
(WebCore::CSSAspectRatioValue::customCSSText):
* css/CSSAspectRatioValue.h:
* css/CSSBorderImageSliceValue.cpp:
(WebCore::CSSBorderImageSliceValue::customCSSText):
* css/CSSBorderImageSliceValue.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::customCSSText):
(WebCore::CSSCalcPrimitiveValue::customCSSText):
(WebCore::CSSCalcBinaryOperation::customCSSText):
* css/CSSCalculationValue.h:
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::customCSSText):
* css/CSSCanvasValue.h:
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::customCSSText):
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::customCSSText):
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::customCSSText):
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::customCSSText):
* css/CSSFontFaceSrcValue.h:
* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::customCSSText):
* css/CSSFunctionValue.h:
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::customCSSText):
(WebCore::CSSRadialGradientValue::customCSSText):
* css/CSSGradientValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::customCSSText):
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCSSText):
* css/CSSImageValue.h:
* css/CSSInheritedValue.cpp:
(WebCore::CSSInheritedValue::customCSSText):
* css/CSSInheritedValue.h:
* css/CSSInitialValue.cpp:
(WebCore::CSSInitialValue::customCSSText):
* css/CSSInitialValue.h:
* css/CSSLineBoxContainValue.cpp:
(WebCore::CSSLineBoxContainValue::customCSSText):
* css/CSSLineBoxContainValue.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::customCSSText):
(WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
* css/CSSPrimitiveValue.h:
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::customCSSText):
* css/CSSReflectValue.h:
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::customCSSText):
(WebCore::CSSCubicBezierTimingFunctionValue::customCSSText):
(WebCore::CSSStepsTimingFunctionValue::customCSSText):
* css/CSSTimingFunctionValue.h:
* css/CSSUnicodeRangeValue.cpp:
(WebCore::CSSUnicodeRangeValue::customCSSText):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::customCSSText):
* css/CSSValueList.h:
* css/FontFeatureValue.cpp:
(WebCore::FontFeatureValue::customCSSText):
* css/FontFeatureValue.h:
* css/FontValue.cpp:
(WebCore::FontValue::customCSSText):
* css/FontValue.h:
* css/ShadowValue.cpp:
(WebCore::ShadowValue::customCSSText):
* css/ShadowValue.h:
* css/WebKitCSSArrayFunctionValue.cpp:
(WebCore::WebKitCSSArrayFunctionValue::customCSSText):
* css/WebKitCSSArrayFunctionValue.h:
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::customCSSText):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSMatFunctionValue.cpp:
(WebCore::WebKitCSSMatFunctionValue::customCSSText):
* css/WebKitCSSMatFunctionValue.h:
* css/WebKitCSSMixFunctionValue.cpp:
(WebCore::WebKitCSSMixFunctionValue::customCSSText):
* css/WebKitCSSMixFunctionValue.h:
* css/WebKitCSSSVGDocumentValue.cpp:
(WebCore::WebKitCSSSVGDocumentValue::customCSSText):
* css/WebKitCSSSVGDocumentValue.h:
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::customCSSText):
* css/WebKitCSSShaderValue.h:
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::customCSSText):
* css/WebKitCSSTransformValue.h:
* svg/SVGColor.cpp:
(WebCore::SVGColor::customCSSText):
* svg/SVGColor.h:
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::customCSSText):
* svg/SVGPaint.h:

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

8 years agoAX: aria-valuetext property not exposing AXValueDescription
cfleizach@apple.com [Wed, 4 Sep 2013 19:57:18 +0000 (19:57 +0000)]
AX: aria-valuetext property not exposing AXValueDescription
https://bugs.webkit.org/show_bug.cgi?id=120375

Reviewed by Darin Adler.

Source/WebCore:

Expose value based attributes for incrementor roles (which are called spinbuttons by ARIA).

Test: platform/mac/accessibility/spinbutton-valuedescription.html

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

LayoutTests:

* platform/mac/accessibility/spinbutton-valuedescription-expected.txt: Added.
* platform/mac/accessibility/spinbutton-valuedescription.html: Added.

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

8 years ago<https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when...
commit-queue@webkit.org [Wed, 4 Sep 2013 19:52:25 +0000 (19:52 +0000)]
<https://webkit.org/b/119622> [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads

Patch by Javier Fernandez <jfernandez@igalia.com> on 2013-09-04
Reviewed by David Hyatt.

Source/WebCore:

When using CSS Regions is usual that the RenderTree doesn't match
the DOM Tree in terms of relative position of the nodes. Besides,
usually the content of a certain node is split and spread across
multiple blocks, rendered in different positions.

Regarding the Selection, this problem is even more important; the
selection direction changes when crossing the FlowThread
boundaries. This weird behavior is also present in other layouts
using non-regular positioning mechanisms, like absolute,
static. However, for those layouts the RenderTree preserves the
order of the nodes, unlike the CSS Regions layout model.

Because of how the RenderTree is generated with CSS Regions, the
RenderView::setSelection algorithm is not able to repaint some of
the rectangles defined during the selection process. In order to
face this issue, the proposed fix determines whether it should
backwards traversing the RenderTree, from the "stop" node to the
RenderView node.

Test: fast/regions/selecting-text-through-different-region-flows-2.html

* rendering/RenderView.cpp:
(WebCore::getNextOrPrevRenderObjectBasedOnDirection): Added.
(WebCore::RenderView::setSelection):

LayoutTests:

* fast/regions/selecting-text-through-different-region-flows-2-expected.html: Added.
* fast/regions/selecting-text-through-different-region-flows-2.html: Added.

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

8 years agoGet MEDIA_STREAM compiling on OSX
eric.carlson@apple.com [Wed, 4 Sep 2013 19:21:16 +0000 (19:21 +0000)]
Get MEDIA_STREAM compiling on OSX
https://bugs.webkit.org/show_bug.cgi?id=120650

Reviewed by Darin Adler.

No new tests, the code changed doesn't run on OSX yet.

* DerivedSources.make: Add MediaStream idl files.

* Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.

* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
    need a MediaConstraint copy constructor.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::send): Remove an unused parameter name.
* Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
(WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
(WebCore::RTCPeerConnection::remoteDescription): Ditto.

* Modules/mediastream/RTCSessionDescription.cpp:
(WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
* Modules/mediastream/RTCSessionDescription.h: Ditto.
* Modules/mediastream/RTCSessionDescription.idl: Ditto.

* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
    doesn't cause ref count churn.
* Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.

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

* bindings/js/JSRTCStatsResponseCustom.cpp:
(WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
    Use propertyNameToAtomicString instead of propertyNameToString
(WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of
    propertyNameToString because namedItem takes an AtomicString.

* platform/mediastream/mac: Added.
* platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
* platform/mediastream/mac/MediaStreamCenterMac.h: Added.

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

8 years agoASSERT in MarkedAllocator::allocateSlowCase is wrong
mhahnenberg@apple.com [Wed, 4 Sep 2013 19:06:30 +0000 (19:06 +0000)]
ASSERT in MarkedAllocator::allocateSlowCase is wrong
https://bugs.webkit.org/show_bug.cgi?id=120639

Reviewed by Oliver Hunt.

ASSERT(!m_heap->shouldCollect()) is no longer true due to our use of the GC
deferral mechanism. We could technically be beyond our byte allocation limit,
but still not try to collect due to deferral. This patch amends shouldCollect()
to return false if GC is currently deferred.

* heap/Heap.h:
(JSC::Heap::shouldCollect):

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

8 years agoRenderSVGResource shouldn't trigger relayout during render tree teardown.
akling@apple.com [Wed, 4 Sep 2013 18:50:54 +0000 (18:50 +0000)]
RenderSVGResource shouldn't trigger relayout during render tree teardown.
<https://webkit.org/b/120689>
<rdar://problem/14908967>

Reviewed by Antti Koivisto.

The new assertion in FrameView::scheduleRelayoutOfSubtree() caught a fish!
We were doing some unnecessary relayout scheduling while tearing down SVG
resource renderers.

* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):

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

8 years ago[iOS] Fix the build following <http://trac.webkit.org/changeset/154903>
dbates@webkit.org [Wed, 4 Sep 2013 18:35:53 +0000 (18:35 +0000)]
[iOS] Fix the build following <trac.webkit.org/changeset/154903>
(https://bugs.webkit.org/show_bug.cgi?id=120540)

* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree): Use address operator and dot-notation when
passing Element to CheckForVisibilityChangeOnRecalcStyle and calling
Element::renderStyle(), respectively.

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

8 years agoFix fast/storage/serialized script value, and add new tests for Map and Set
oliver@apple.com [Wed, 4 Sep 2013 18:32:10 +0000 (18:32 +0000)]
Fix fast/storage/serialized script value, and add new tests for Map and Set
https://bugs.webkit.org/show_bug.cgi?id=120688

Reviewed by Steve Falkenburg.

Update for new version number, and adding binary tests for Map and Set
serialisation

* fast/storage/serialized-script-value.html:

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

8 years agoMove logical dimension getters/setters to FloatingObject from RenderBlock
bjonesbe@adobe.com [Wed, 4 Sep 2013 18:01:27 +0000 (18:01 +0000)]
Move logical dimension getters/setters to FloatingObject from RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=120686

Reviewed by David Hyatt.

This is the first step in decoupling FloatingObject, FloatingObjects,
et al from RenderBlock. It is not ideal that the methods take a bool;
however, passing down the actual writing mode would require
refactoring the way that RenderBlock stores this information, which is
a task for the future.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::repaintOverhangingFloats): Use new methods.
(WebCore::RenderBlock::insertFloatingObject):  Ditto.
(WebCore::RenderBlock::removeFloatingObject): Ditto.
(WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
(WebCore::RenderBlock::computeLogicalLocationForFloat): Ditto.
(WebCore::RenderBlock::positionNewFloats): Ditto.
(WebCore::::updateOffsetIfNeeded): Ditto.
(WebCore::::collectIfNeeded): Ditto.
(WebCore::::getHeightRemaining): Ditto.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::nextFloatLogicalBottomBelow): Ditto.
(WebCore::RenderBlock::lowestFloatLogicalBottom): Ditto.
(WebCore::RenderBlock::clearFloats): Ditto.
(WebCore::RenderBlock::addOverhangingFloats): Ditto.
(WebCore::RenderBlock::hasOverhangingFloat): Ditto.
(WebCore::RenderBlock::addIntrudingFloats): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::logicalTop): Moved from RenderBlock::logicalTopForFloat
(WebCore::RenderBlock::FloatingObject::logicalBottom): Moved from RenderBlock::logicalBottomForFloat
(WebCore::RenderBlock::FloatingObject::logicalLeft): Moved from RenderBlock::logicalLeftForFloat
(WebCore::RenderBlock::FloatingObject::logicalRight): Moved from RenderBlock::logicalRightForFloat
(WebCore::RenderBlock::FloatingObject::logicalWidth): Moved from RenderBlock::logicalWidthForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalTop): Moved from RenderBlock::pixelSnappedLogicalTopForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalBottom): Moved from RenderBlock::pixelSnappedLogicalBottomForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalLeft): Moved from RenderBlock::pixelSnappedLogicalLeftForFloat
(WebCore::RenderBlock::FloatingObject::pixelSnappedLogicalRight): Moved from RenderBlock::pixelSnappedLogicalRightForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalTop): Moved from RenderBlock::setLogicalTopForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalLeft): Moved from RenderBlock::setLogicalLeftForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalHeight): Moved from RenderBlock::setLogicalHeightForFloat
(WebCore::RenderBlock::FloatingObject::setLogicalWidth): Moved from RenderBlock::setLogicalWidthForFloat
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Use new methods.
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Ditto.
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Ditto.
(WebCore::RenderBlock::positionNewFloatOnLine): Ditto.

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

8 years agoREGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
commit-queue@webkit.org [Wed, 4 Sep 2013 17:53:59 +0000 (17:53 +0000)]
REGRESSION(r154977): Do not urlencode soup message on ResourceRequest::toSoupMessage()
https://bugs.webkit.org/show_bug.cgi?id=120681

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-04
Reviewed by Martin Robinson.

Do not call soup_message_set_uri with soupURI() (url encoded uri) on
ResourceRequest::toSoupMessage().

* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
(WebCore::ResourceRequest::toSoupMessage):
Split common code from updateSoupMessage/toSoupMessage into updateSoupMessageMembers.

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

8 years ago[GTK] add support for subtitles on webkit2GTK
commit-queue@webkit.org [Wed, 4 Sep 2013 17:39:03 +0000 (17:39 +0000)]
[GTK] add support for subtitles on webkit2GTK
https://bugs.webkit.org/show_bug.cgi?id=117008

By activating subtitles support on webkit2GTK, the video player
recognizes and use text <tracks> inside <video> elements.

Patch by Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> on 2013-09-04
Reviewed by Martin Robinson.

Source/WebCore:

Layout tests (track-menu) should cover this change.

* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-track-list):
(video::-webkit-media-controls-closed-captions-track-list h3):
(video::-webkit-media-controls-closed-captions-track-list ul):
(video::-webkit-media-controls-closed-captions-track-list li):
(video::-webkit-media-controls-closed-captions-track-list li.selected):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtkEventListener::create):
(WebCore::MediaControlsGtkEventListener::cast):
(WebCore::MediaControlsGtkEventListener::MediaControlsGtkEventListener):
(WebCore::MediaControlsGtk::MediaControlsGtk):
(WebCore::MediaControlsGtk::initializeControls):
(WebCore::MediaControlsGtk::setMediaController):
(WebCore::MediaControlsGtk::reset):
(WebCore::MediaControlsGtk::makeTransparent):
(WebCore::MediaControlsGtk::toggleClosedCaptionTrackList):
(WebCore::MediaControlsGtk::showClosedCaptionTrackList):
(WebCore::MediaControlsGtk::hideClosedCaptionTrackList):
(WebCore::MediaControlsGtk::handleClickEvent):
(WebCore::MediaControlsGtk::eventListener):
(WebCore::MediaControlsGtkEventListener::handleEvent):
(WebCore::MediaControlsGtkEventListener::operator==):
* html/shadow/MediaControlsGtk.h:
* page/CaptionUserPreferences.cpp:
(WebCore::trackDisplayName):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackSubtitlesText):
(WebCore::textTrackOffMenuItemText):
(WebCore::textTrackNoLabelText):
* platform/gtk/RenderThemeGtk.h:

LayoutTests:

* platform/gtk/TestExpectations:

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

8 years agoUse OwnPtr in the RenderLayerFilterInfo map
darin@apple.com [Wed, 4 Sep 2013 16:43:06 +0000 (16:43 +0000)]
Use OwnPtr in the RenderLayerFilterInfo map
https://bugs.webkit.org/show_bug.cgi?id=120619

Reviewed by Anders Carlsson.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer): Use FilterInfo::remove directly instead of
going through removeFilterInfoIfNeeded function.
(WebCore::RenderLayer::paintsWithFilters): Rearranged #if a little bit and tweaked
the comment.
(WebCore::RenderLayer::requiresFullLayerImageForFilters): Use && instead of ternary.
(WebCore::RenderLayer::filterRenderer): Use FilterInfo::getIfExists directly instead
of going through filterInfo function.
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): Use FilterInfo::get
directly instead of going through filterInfo function. Also use references instead
of pointers.
(WebCore::shouldDoSoftwarePaint): Marked this simple function, used only once, as
inline.
(WebCore::paintForFixedRootBackground): Ditto.
(WebCore::RenderLayer::setupFilters): Use FilterInfo::getIfExists directly instead
of going through filterInfo function. Also get rendererer out of filterInfo instead
of calling filterRenderer.
(WebCore::RenderLayer::updateOrRemoveFilterClients): Use FilterInfo::get and
FilterInfo::getIfExists directly instead of using ensureFilterInfo and
filterInfo functions.
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Use FilterInfo::getIfExists
and FilterInfo::get directly instead of using filterInfo function.

* rendering/RenderLayer.h: Removed the ifdefs around forward declarations; overkill,
since there is no harm in a few extras. Marked the RenderLayer class FINAL. Removed the
no-longer-needed filterInfo, ensureFilterInfo, removeFilterInfoIfNeeded, hasFilterInfo,
and setHasFilterInfo functions. Mark everything private instead of protected since
there are no classes derived from this one. Made FilterInfo an embedded class so it
can get at the m_hasFilterInfo data member directly and has a shorter name.

* rendering/RenderLayerFilterInfo.cpp: Removed the ifs around includes, which were
overkill, since there is little harm including a few extra files.
(WebCore::RenderLayer::FilterInfo::map): Added. Returns the single global map.
(WebCore::RenderLayer::FilterInfo::getIfExists): Renamed from filterInfoForRenderLayer.
Also changed to take a reference instead of a pointer, and to use the new filterMap.
(WebCore::RenderLayer::FilterInfo::get): Renamed from createFilterInfoForRenderLayerIfNeeded.
Also changed to take a reference instead of a pointer, to use the new filterMap, and
to use add to avoid hashing twice when adding a new layer to the map.
(WebCore::RenderLayer::FilterInfo::remove): Renamed from removeFilterInfoForRenderLayer.
Also changed to take a reference instead of a pointer and eliminated the explicit
delete since we use OwnPtr now.
(WebCore::RenderLayer::FilterInfo::FilterInfo): Take a reference instead of a pointer.
(WebCore::RenderLayer::FilterInfo::~FilterInfo): Updated class name.
(WebCore::RenderLayer::FilterInfo::setRenderer): Ditto.
(WebCore::RenderLayer::FilterInfo::notifyFinished): Update since m_layer is a reference.
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Update to iterate in a
slightly more idiomatic and efficient way. Also update since m_layer is a reference.
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
(WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded): Ditto.
(WebCore::RenderLayer::FilterInfo::updateCustomFilterClients): Ditto. Also switched to
a raw pointer for CustomFilterProgram*.
(WebCore::RenderLayer::FilterInfo::removeCustomFilterClients): Ditto.

* rendering/RenderLayerFilterInfo.h: Removed the ifs around includes, which were
overkill, since there is little harm including a few extra files. Changed to be a
member class of RenderLayer, marked the class FINAL, and changed the style of the
conditionals around the base classes. Renamed functions. Made overrides private and
used OVERRIDE. Changed functions to take references instead of pointers. Did some
small style cleanup. Made deleteOwnedPtr a friend so we can keep the destructor private.
Moved the typedef of RenderLayerFilterInfoMap into the class and named it just Map.
Got rid of s_filterMap and instead added a function named just map().

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

8 years agoSimplify subtree relayout scheduling a bit.
akling@apple.com [Wed, 4 Sep 2013 16:41:36 +0000 (16:41 +0000)]
Simplify subtree relayout scheduling a bit.
<https://webkit.org/b/120684>

Reviewed by Antti Koivisto.

Subtree relayout scheduling should only happen while there's a render tree up,
the code can freely assume that there's a RenderView present.

Added an assertion that the render tree isn't being torn down. This should catch
renderers doing unnecessary work during document detach and could be a source
of "performance freebies."

I also un-nested scheduleRelayoutOfSubtree() with early-return style to make
the code more human-readable.

* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::scheduleRelayout):

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

8 years ago[Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
commit-queue@webkit.org [Wed, 4 Sep 2013 16:39:53 +0000 (16:39 +0000)]
[Coordinated Graphics] Remove unused method in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=120664

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-09-04
Reviewed by Darin Adler.

CoordinatedGraphicsLayer::hasPendingVisibleChanges is not used as of
r148952.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

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

8 years agoUnreviewed, rolling out r154989.
commit-queue@webkit.org [Wed, 4 Sep 2013 15:43:34 +0000 (15:43 +0000)]
Unreviewed, rolling out r154989.
http://trac.webkit.org/changeset/154989
https://bugs.webkit.org/show_bug.cgi?id=120678

This patch might broke apps using webkitgtk not from the main
thread (Requested by msanchez on #webkit).

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunAsModal):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):

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

8 years ago[CSS Shapes] Revise the ShapeInterval set operations' implementation
hmuller@adobe.com [Wed, 4 Sep 2013 15:43:30 +0000 (15:43 +0000)]
[CSS Shapes] Revise the ShapeInterval set operations' implementation
https://bugs.webkit.org/show_bug.cgi?id=120349

Reviewed by Alexandru Chiculita.

Revised the ShapeIntervals unite, intersect, and subtract operations to
improve efficiency and clarity.

No new tests are required, this is just an internal refactoring.

* rendering/shapes/PolygonShape.cpp:
(WebCore::computeOverlappingEdgeXProjections): Removed call to ShapeInterval<T>sortVector(), since calling std::sort directly is simpler.
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::contains): True if the interval parameter is within this interval.
(WebCore::ShapeInterval::intersect): Substantially revised version of the original method.
(WebCore::ShapeInterval::uniteVectors): Ditto.
(WebCore::ShapeInterval::intersectVectors): Ditto.
(WebCore::ShapeInterval::subtractVectors): Ditto.

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

8 years ago[Qt] Unreviewed bot greening.
zarvai@inf.u-szeged.hu [Wed, 4 Sep 2013 15:37:00 +0000 (15:37 +0000)]
[Qt] Unreviewed bot greening.

* platform/qt-wk1/TestExpectations: Skipping after r154988.
* platform/qt/TestExpectations: Skipping after r154828.

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

8 years ago[ATK] Adds an accessibility support to access a value of the color control element
commit-queue@webkit.org [Wed, 4 Sep 2013 14:19:02 +0000 (14:19 +0000)]
[ATK] Adds an accessibility support to access a value of the color control element
https://bugs.webkit.org/show_bug.cgi?id=114354

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-04
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Implements a possibility of retrieving a value of the color control element.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):

Tools:

Added accessibility role of the color control element.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(roleToString):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::roleToString):

LayoutTests:

Moving mac's color-well-expected.txt result to base accessibility folder.
Unskipping accessibility/color-well.html for EFL port.

* accessibility/color-well-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/color-well-expected.txt.
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:

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

8 years agoUse Vector<Ref<T>> in three random WebCore loops.
akling@apple.com [Wed, 4 Sep 2013 13:59:19 +0000 (13:59 +0000)]
Use Vector<Ref<T>> in three random WebCore loops.
<https://webkit.org/b/120661>

Reviewed by Darin Adler.

Clean up three little loops to use Refs to avoid null checking known-valid objects.
Also apply auto, reserveInitialCapacity and uncheckedAppend as appropriate.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::invalidate):

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

8 years ago[GTK] Color of input button's text broken with recent gnome-themes-standard
csaavedra@igalia.com [Wed, 4 Sep 2013 13:44:25 +0000 (13:44 +0000)]
[GTK] Color of input button's text broken with recent gnome-themes-standard
https://bugs.webkit.org/show_bug.cgi?id=120581

Reviewed by Carlos Garcia Campos.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): add the "text-button" class.
(WebCore::RenderThemeGtk::systemColor): Use the ACTIVE state flag,
as this is the one actually used for button labels.

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

8 years agoREGRESSION (r132328): /WebKit2APITests/TestWebKitAccessibility unit test is failing
mario@webkit.org [Wed, 4 Sep 2013 13:31:12 +0000 (13:31 +0000)]
REGRESSION (r132328): /WebKit2APITests/TestWebKitAccessibility unit test is failing
https://bugs.webkit.org/show_bug.cgi?id=100408

Unreviewed gardening. Unskip TestWebKitAccessibility after
manually checking that it's running properly in the bot.

* Scripts/run-gtk-tests:
(TestRunner): Unskipped TestWebKitAccessibility.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 12:42:21 +0000 (12:42 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding failure expectation for accessibility/image-map1.html after r155022.
* platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt: Rebaselining after 155008.

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

8 years ago[Qt] Unreviewed bot greening.
zarvai@inf.u-szeged.hu [Wed, 4 Sep 2013 11:39:21 +0000 (11:39 +0000)]
[Qt] Unreviewed bot greening.

* platform/qt-wk2/compositing/images/direct-image-object-fit-expected.txt: Rebaselining after r154921.
* platform/qt-wk2/compositing/reflections/direct-image-object-fit-reflected-expected.txt: Ditto.
* platform/qt/TestExpectations: Skip after r155008.

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

8 years ago[Qt] Unreviewed gardening. Skip failing tests and added platform specifix expected...
kadam@inf.u-szeged.hu [Wed, 4 Sep 2013 10:53:21 +0000 (10:53 +0000)]
[Qt] Unreviewed gardening. Skip failing tests and added platform specifix expected result.

* platform/qt-wk1/inspector/console/command-line-api-expected.txt: Added after r154998.
* platform/qt/TestExpectations:

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

8 years ago[Qt] Use correct library paths for prefix builds on Mac.
michael.bruning@digia.com [Wed, 4 Sep 2013 10:50:09 +0000 (10:50 +0000)]
[Qt] Use correct library paths for prefix builds on Mac.
https://bugs.webkit.org/show_bug.cgi?id=120635

Reviewed by Tor Arne Vestbø.

Due to a change of scope of the qmake force_independent configuration
flag, the library paths in QtWebKit builds on the Mac are set to the
QtWebKit build directory even for production builds.

This patch sets the correct library paths for prefixed production builds
while keeping the scope of the force_independent flag for non-production
builds.

* Source/api.pri:
* Source/widgetsapi.pri:

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

8 years agoUnreviewed GTK gardening. Rebaselining 7 accessibility tests after r154976.
zandobersek@gmail.com [Wed, 4 Sep 2013 10:33:57 +0000 (10:33 +0000)]
Unreviewed GTK gardening. Rebaselining 7 accessibility tests after r154976.

* platform/gtk/accessibility/lists-expected.txt:
* platform/gtk/accessibility/plugin-expected.txt:
* platform/gtk/accessibility/table-detection-expected.txt:
* platform/gtk/accessibility/table-one-cell-expected.txt:
* platform/gtk/accessibility/table-with-aria-role-expected.txt:
* platform/gtk/accessibility/table-with-rules-expected.txt:
* platform/gtk/accessibility/transformed-element-expected.txt:

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

8 years ago[GTK] Add support for the Wayland build target
zandobersek@gmail.com [Wed, 4 Sep 2013 10:19:34 +0000 (10:19 +0000)]
[GTK] Add support for the Wayland build target
https://bugs.webkit.org/show_bug.cgi?id=120627

Reviewed by Gustavo Noronha Silva.

.:

Add support for building the GTK port with Wayland as the target. The Wayland target can be the sole target
that's enabled, or it can be enabled in parallel with the X11 target.

Each of those two targets, when enabled, checks for the corresponding GTK+ windowing dependency being present.
In the case of only the Wayland target being enabled, the accelerated compositing feature is disabled at
build-time as the feature is not yet supported under the Wayland display protocol. X11-based plugin support is
also disabled under that configuration, even if the WebKitPluginProcess is still built but is left non-operational.
GLX support is also disabled if not building the X11 target.

The Wayland target can be enabled through using the --with-target configuration option that now accepts two
additional values:
- 'wayland' - only enables the Wayland target,
- 'x11,wayland' - enables the X11 and Wayland targets that are to be built in parallel.

This makes it possible to build the GTK port of WebKit with the Wayland target, relying solely on the GTK+
dependency that only has the Wayland backend enabled, and removes linking against any X11-related library.
Note that at the moment there seem to be other dependencies that still link to X11-related libraries.
Complete functionality is not yet guaranteed, but is of course the goal.

* Source/autotools/FindDependencies.m4: Store the version of the basic GTK+ dependency that was found.
This is later used to check that the GTK+ X11 and GTK+ Wayland dependencies are of the same version. The
X11-specific dependencies are grouped into one section (apart from the XComposite and XDamage dependencies),
also checking for the GTK+ X11 dependency. If the X11 target is not enabled, the GLX dependency is disabled.
Additionally check for the GTK+ Wayland dependency if the Wayland target is enabled.
We only check for the presence and correct version of the GTK+ X11 and Wayland dependencies, if necessary.
Check for the XComposite and XDamage dependencies if the X11 target is enabled (in addition to the OpenGL
headers being present).
In case of the Wayland target being enabled while the X11 target is not, disable the accelerated compositing
feature as there's no support yet for it under the Wayland display protocol.
* Source/autotools/PrintBuildConfiguration.m4: The build configuration should now print out 'GDK targets'.
* Source/autotools/ReadCommandLineArguments.m4: The --with-target option can now take two additional values,
'wayland' and 'x11,wayland'. The first one enables only the Wayland target, while the second one enables both
X11 and Wayland targets. This makes it possible to build the GTK port with both X11 and Wayland display protocols
supported in the same build.
We must now check the outcoming with_target variable to see if the special case of building one or both of the
possible parallel targets was chosen. We define with_x11_target and with_wayland_target variables if the
with_target value applies to that case.
* Source/autotools/SetupAutoconfHeader.m4: Do not define the XP_UNIX macro on builds that enable the Wayland-only
target. It should still be defined if we're building both X11 and Wayland targets in parallel.
* Source/autotools/SetupAutomake.m4: Define TARGET_X11 and TARGET_WAYLAND Automake conditionals if the new
with_x11_target or with_wayland_target variables were set, respectively. Additionall, define the TARGET_X11_OR_WAYLAND
Automake conditional if we're building either of the two targets.

Source/WebCore:

* GNUmakefile.list.am: Reorder the Source/WebCore/plugins/np* source files.
The X11-specific source files should only be included if the X11 target is being built. PluginPackageNone and
PluginViewNone source files must be included in non-X11-target builds. Other source files that were previously
guarded with the TARGET_X11 conditional should also be built for the Wayland target, so the new TARGET_X11_OR_WAYLAND
conditional is used. If neither of those two targets is being built we fall back to adding source files to the build
as necessary by the actual build target.
* platform/gtk/GtkVersioning.c:
(gdk_screen_get_monitor_workarea): Additionally guard bits of code that depend on the GDK_WINDOWING_X11 macro being
defined - these should only be built when building the X11 target, checked for with PLATFORM(X11).

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::createBackingStore): Additionally guard the <gdk/gdkx.h> inclusion and the inclusion and use of
WidgetBackingStoreGtkX11 with PLATFORM(X11), ensuring this code is built when also building with X11 target
enabled. GDK_WINDOWING_X11 macro can be defined even if the X11 target is disabled.

Source/WebKit2:

* GNUmakefile.list.am: Build X11-specific NetscapePluginModule and NetscapePlugin classes if building the X11 target,
fall back to the generic, empty classes otherwise.
* PluginProcess/unix/PluginProcessMainUnix.cpp:
(WebKit::PluginProcessMainUnix): Guard the NetscapePluginModule::scanPlugin() invocation with PLUGIN_ARCHITECTURE(X11),
it's at the moment specific to the X11 implementation of the Netscape plugins.
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Guard PluginProcessProxy::scanPlugin() with PLUGIN_ARCHITECTURE(X11),
just like it's guarded in the PluginProcessProxy class declaration.
* UIProcess/cairo/BackingStoreCairo.cpp: Additionally guard <gdk/gdkx.h> and WidgetBackingStoreGtkX11 inclusion and use
with PLATFORM(X11), this code should only be built when building the X11 target.
(WebKit::createBackingStoreForGTK):
* UIProcess/gtk/WebPageProxyGtk.cpp: Guard the createPluginContainer() and windowedPluginGeometryDidChange() methods and their
helper functions and objects with PLUGIN_ARCHITECTURE(X11), just like they're guarded in the WebPageProxy class declaration.
* config.h: Only define PLUGIN_ARCHITECTURE_X11 to 1 if we're actually building the X11 target.

Tools:

* GNUmakefile.am: Define the additional macros also if building the Wayland target.

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

8 years ago[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
mario@webkit.org [Wed, 4 Sep 2013 10:11:00 +0000 (10:11 +0000)]
[GTK] Reimplement atk_text_get_text_*_offset for SENTENCE boundaries
https://bugs.webkit.org/show_bug.cgi?id=114873

Reviewed by Chris Fleizach.

Re-implement these functions without using GailTextUtil nor Pango.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextWordForBoundary): Renamed from webkitAccessibleTextGetWordForBoundary,
to keep it consistent with names for new functions.
(isSentenceBoundary): Helper function to know when we are either
at the beginning or the end of a sentence.
(isWhiteSpaceBetweenSentences): It returns true if we are in the
middle of a white space between sentences. Useful for implementing
the SENTENCE_END boundary type.
(sentenceAtPositionForAtkBoundary): New helper function to find the
sentence at a given position considering values of AtkTextBoundary.
(webkitAccessibleTextSentenceForBoundary): New function,
implementing atk_text_get_text_*_offset for SENTENCE.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
SENTENCE boundaries with webkitAccessibleTextSentenceForBoundary().

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

8 years ago[CSS Regions] Fix failing tests on ML WK2 after r154973
abucur@adobe.com [Wed, 4 Sep 2013 10:09:42 +0000 (10:09 +0000)]
[CSS Regions] Fix failing tests on ML WK2 after r154973
https://bugs.webkit.org/show_bug.cgi?id=120672

Reviewed by Antti Koivisto.

The two tests are failing because the reference tests create backings for the fixed elements layers.
Regions are not yet accelerated, don't create backings and this difference of behaviour causes a
slight shift in the background color of the fixed elements.

* fast/regions/fixed-inside-named-flow-zIndex-expected.html:
* fast/regions/fixed-inside-named-flow-zIndex.html:
* fast/regions/fixed-pos-region-in-nested-flow-expected.html:
* fast/regions/fixed-pos-region-in-nested-flow.html:

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 09:41:24 +0000 (09:41 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding failure expectations for tests introduced in r154875, r154906 and r154954.
* platform/gtk/animations/cross-fade-background-image-expected.png: Rebaselining after r154906.
* platform/gtk/animations/cross-fade-background-image-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-border-image-source-expected.png: Ditto.
* platform/gtk/animations/cross-fade-border-image-source-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-list-style-image-expected.png: Ditto.
* platform/gtk/animations/cross-fade-list-style-image-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.png: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.txt: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-image-expected.png: Ditto.
* platform/gtk/animations/cross-fade-webkit-mask-image-expected.txt: Ditto.

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

8 years ago[Qt] Unreviewed bot greening.
zarvai@inf.u-szeged.hu [Wed, 4 Sep 2013 09:29:38 +0000 (09:29 +0000)]
[Qt] Unreviewed bot greening.

* platform/qt-wk2/fast/regions/element-in-named-flow-absolute-from-fixed-expected.txt: Added.
* platform/qt-wk2/fast/regions/element-in-named-flow-fixed-from-absolute-expected.txt: Added.
* platform/qt-wk2/fast/regions/element-inflow-fixed-from-outflow-static-expected.txt: Added.
* platform/qt-wk2/fast/regions/element-outflow-static-from-inflow-fixed-expected.txt: Added.
* platform/qt/TestExpectations: Skip after r155014.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 08:56:41 +0000 (08:56 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Manage the current accessibility layout test failures
after r154697, r154781 and r154976.

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

8 years ago[CSS Regions] Extend the RenderRegionRange class to include overflow information...
abucur@adobe.com [Wed, 4 Sep 2013 08:26:41 +0000 (08:26 +0000)]
[CSS Regions] Extend the RenderRegionRange class to include overflow information + apply the layout overflow
https://bugs.webkit.org/show_bug.cgi?id=116299

Reviewed by David Hyatt.

Source/WebCore:

Patch for computing overflow for boxes per region and applying it for layout overflow.
The approach is based on adding a RenderOverflow object inside the RenderBoxRegionInfo
structure. The RenderOverflow object is manipulated by the RenderRegion using some utility
functions that receive the target box as a parameter.
When computing the portion of a box inside a region it is necessary to split the border
rect of the box between regions. This means mapping the rectangle in the flow thread
coordinates, making the split and then remapping the fragment in the box coordinates.
For now, this is not optimized and walks the render tree to compute the block offsets.
The function getRegionRangeForBox is used to determine in what regions a box should
be rendered into. The range is computed at layout time and it depends on the height of
the box, if its unsplittable for fragmentation etc.
The patch also propagates the layout overflow to the regions. This enables to correctly
display scrollbars when chaining varying size regions (currently the horizontal overflow
is as wide as the widest region for all the regions). Unsplittable boxes will also generate
layout overflow in the start region so they can be scrolled and fully reachable. This
functionality depends on fixing the visual overflow and adapting the layout to take into
account the unsplittable box. Besides this, the relative positioning and transforms are applied
at a fragment level. This is in line with the CSS3 Break specification:
http://dev.w3.org/csswg/css-break/#transforms

Tests: fast/regions/overflow-scrollable-rel-pos-fragment.html
       fast/regions/overflow-scrollable-rotated-fragment.html
       fast/regions/overflow-scrollable-unsplittable-fragment.html
       fast/regions/overflow-scrollable-varying-width-1.html
       fast/regions/overflow-scrollable-varying-width-2.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::clearLayoutOverflow):
(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::relayoutForPagination):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::addOverflowFromInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clientBoxRectInRegion):
(WebCore::RenderBox::addVisualEffectOverflow):
(WebCore::RenderBox::applyVisualEffectOverflow):
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::clearOverflow):
* rendering/RenderBox.h:
* rendering/RenderBoxRegionInfo.h:
(WebCore::RenderBoxRegionInfo::createOverflow):
(WebCore::RenderBoxRegionInfo::overflow):
(WebCore::RenderBoxRegionInfo::clearOverflow):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::mapFromLocalToFlowThread):
(WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addRegionsOverflowFromChild):
(WebCore::RenderFlowThread::addRegionsLayoutOverflow):
(WebCore::RenderFlowThread::clearRegionsOverflow):
* rendering/RenderFlowThread.h:
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::setRenderBoxRegionInfo):
(WebCore::RenderRegion::ensureOverflowForBox):
(WebCore::RenderRegion::rectFlowPortionForBox):
(WebCore::RenderRegion::addLayoutOverflowForBox):
(WebCore::RenderRegion::addVisualOverflowForBox):
(WebCore::RenderRegion::layoutOverflowRectForBox):
(WebCore::RenderRegion::visualOverflowRectForBox):
(WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation):
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
* rendering/RenderRegion.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::computeOverflowFromCells):

LayoutTests:

Add tests for layout overflow propagation. Some tests disable the visual representation of the overflow.
This is because the visual overflow in regions is not yet fixed. The tests will be revisited when the
visual overflow is implemented.
Some repaint tests are rebased because a new repaint is issued on the regions when they compute the layout
overflow.

* fast/regions/element-in-named-flow-absolute-from-fixed-expected.txt: Rebased.
* fast/regions/element-in-named-flow-fixed-from-absolute-expected.txt: Rebased.
* fast/regions/element-inflow-fixed-from-outflow-static-expected.txt: Rebased.
* fast/regions/element-outflow-static-from-inflow-fixed-expected.txt: Rebased.
* fast/regions/overflow-scrollable-rel-pos-fragment-expected.html: Added.
* fast/regions/overflow-scrollable-rel-pos-fragment.html: Added.
* fast/regions/overflow-scrollable-rotated-fragment-expected.html: Added.
* fast/regions/overflow-scrollable-rotated-fragment.html: Added.
* fast/regions/overflow-scrollable-unsplittable-fragment-expected.html: Added.
* fast/regions/overflow-scrollable-unsplittable-fragment.html: Added.
* fast/regions/overflow-scrollable-varying-width-1-expected.html: Added.
* fast/regions/overflow-scrollable-varying-width-1.html: Added.
* fast/regions/overflow-scrollable-varying-width-2-expected.html: Added.
* fast/regions/overflow-scrollable-varying-width-2.html: Added.

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

8 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 4 Sep 2013 08:25:07 +0000 (08:25 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Skipping the media/track/in-band test set that's failing on the GTK port.

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

8 years ago[GStreamer] cannot play live streams
commit-queue@webkit.org [Wed, 4 Sep 2013 08:21:17 +0000 (08:21 +0000)]
[GStreamer] cannot play live streams
https://bugs.webkit.org/show_bug.cgi?id=116831

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-04
Reviewed by Philippe Normand.

Source/WebCore:

Fix issues with rtsp streams embedded on <video> not loading.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Do not reset pipeline to READY state on STATE_CHANGE_ASYNC when entering PAUSED state for
live streams, otherwise we enter an endless loop of READY->PAUSED->READY->PAUSED when
starting playback.

Tools:

Fix timeout issues with rtspsrc/udpsrc gstreamer elements.

* gtk/jhbuild.modules:
* gtk/patches/rtspsrc-timeout-on-udpsrc-is-in-nanoseconds.patch: Added.
* gtk/patches/udpsrc-improve-timeouts.patch: Added.
Changed gstreamer jhbuild modules to use tarball repos (required to add patches)
and added 2 patches to gst-plugins-good to fix timeout issues with rtsp streams.
Both patches are applied upstream and can be removed once a new gstreamer release
is out (up to 1.0.10 the patches are not included) and we bump the requirements.

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

8 years agoThe DFG should be able to tier-up and OSR enter into the FTL
fpizlo@apple.com [Wed, 4 Sep 2013 06:26:04 +0000 (06:26 +0000)]
The DFG should be able to tier-up and OSR enter into the FTL
https://bugs.webkit.org/show_bug.cgi?id=112838

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

This adds the ability for the DFG to tier-up into the FTL. This works in both
of the expected tier-up modes:

Replacement: frequently called functions eventually have their entrypoint
replaced with one that goes into FTL-compiled code. Note, this will be a
slow-down for now since we don't yet have LLVM calling convention integration.

OSR entry: code stuck in hot loops gets OSR'd into the FTL from the DFG.

This means that if the DFG detects that a function is an FTL candidate, it
inserts execution counting code similar to the kind that the baseline JIT
would use. If you trip on a loop count in a loop header that is an OSR
candidate (it's not an inlined loop), we do OSR; otherwise we do replacement.
OSR almost always also implies future replacement.

OSR entry into the FTL is really cool. It uses a specialized FTL compile of
the code, where early in the DFG pipeline we replace the original root block
with an OSR entrypoint block that jumps to the pre-header of the hot loop.
The OSR entrypoint loads all live state at the loop pre-header using loads
from a scratch buffer, which gets populated by the runtime's OSR entry
preparation code (FTL::prepareOSREntry()). This approach appears to work well
with all of our subsequent optimizations, including prediction propagation,
CFA, and LICM. LLVM seems happy with it, too. Best of all, it works naturally
with concurrent compilation: when we hit the tier-up trigger we spawn a
compilation plan at the bytecode index from which we triggered; once the
compilation finishes the next trigger will try to enter, at that bytecode
index. If it can't - for example because the code has moved on to another
loop - then we just try again. Loops that get hot enough for OSR entry (about
25,000 iterations) will probably still be running when a concurrent compile
finishes, so this doesn't appear to be a big problem.

This immediately gives us a 70% speed-up on imaging-gaussian-blur. We could
get a bigger speed-up by adding some more intelligence and tweaking LLVM to
compile code faster. Those things will happen eventually but this is a good
start. Probably this code will see more tuning as we get more coverage in the
FTL JIT, but I'll worry about that in future patches.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::hasOptimizedReplacement):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
* bytecode/CodeBlock.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
(JSC::DFG::compile):
* dfg/DFGDriver.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::killBlockAndItsContents):
(JSC::DFG::Graph::killUnreachableBlocks):
* dfg/DFGGraph.h:
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::reconstruct):
(JSC::DFG::JITCode::checkIfOptimizationThresholdReached):
(JSC::DFG::JITCode::optimizeNextInvocation):
(JSC::DFG::JITCode::dontOptimizeAnytimeSoon):
(JSC::DFG::JITCode::optimizeAfterWarmUp):
(JSC::DFG::JITCode::optimizeSoon):
(JSC::DFG::JITCode::forceOptimizationSlowPathConcurrently):
(JSC::DFG::JITCode::setOptimizationThresholdBasedOnCompilationResult):
* dfg/DFGJITCode.h:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
(JSC::DFG::JITFinalizer::finalizeCommon):
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::createPreHeader):
(JSC::DFG::LoopPreHeaderCreationPhase::run):
* dfg/DFGLoopPreHeaderCreationPhase.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasUnlinkedLocal):
(JSC::DFG::Node::unlinkedLocal):
* dfg/DFGNodeType.h:
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntrypointCreationPhase.cpp: Added.
(JSC::DFG::OSREntrypointCreationPhase::OSREntrypointCreationPhase):
(JSC::DFG::OSREntrypointCreationPhase::run):
(JSC::DFG::performOSREntrypointCreation):
* dfg/DFGOSREntrypointCreationPhase.h: Added.
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPlan.h:
* dfg/DFGPredictionInjectionPhase.cpp:
(JSC::DFG::PredictionInjectionPhase::run):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTierUpCheckInjectionPhase.cpp: Added.
(JSC::DFG::TierUpCheckInjectionPhase::TierUpCheckInjectionPhase):
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::performTierUpCheckInjection):
* dfg/DFGTierUpCheckInjectionPhase.h: Added.
* dfg/DFGToFTLDeferredCompilationCallback.cpp: Added.
(JSC::DFG::ToFTLDeferredCompilationCallback::ToFTLDeferredCompilationCallback):
(JSC::DFG::ToFTLDeferredCompilationCallback::~ToFTLDeferredCompilationCallback):
(JSC::DFG::ToFTLDeferredCompilationCallback::create):
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):
* dfg/DFGToFTLDeferredCompilationCallback.h: Added.
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp: Added.
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::~ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::create):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h: Added.
* dfg/DFGWorklist.cpp:
(JSC::DFG::globalWorklist):
* dfg/DFGWorklist.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCapabilities.h:
* ftl/FTLForOSREntryJITCode.cpp: Added.
(JSC::FTL::ForOSREntryJITCode::ForOSREntryJITCode):
(JSC::FTL::ForOSREntryJITCode::~ForOSREntryJITCode):
(JSC::FTL::ForOSREntryJITCode::ftlForOSREntry):
(JSC::FTL::ForOSREntryJITCode::initializeEntryBuffer):
* ftl/FTLForOSREntryJITCode.h: Added.
(JSC::FTL::ForOSREntryJITCode::entryBuffer):
(JSC::FTL::ForOSREntryJITCode::setBytecodeIndex):
(JSC::FTL::ForOSREntryJITCode::bytecodeIndex):
(JSC::FTL::ForOSREntryJITCode::countEntryFailure):
(JSC::FTL::ForOSREntryJITCode::entryFailureCount):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileBlock):
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileExtractOSREntryLocal):
(JSC::FTL::LowerDFGToLLVM::compileGetLocal):
(JSC::FTL::LowerDFGToLLVM::addWeakReference):
* ftl/FTLOSREntry.cpp: Added.
(JSC::FTL::prepareOSREntry):
* ftl/FTLOSREntry.h: Added.
* ftl/FTLOutput.h:
(JSC::FTL::Output::crashNonTerminal):
(JSC::FTL::Output::crash):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* interpreter/Register.h:
(JSC::Register::unboxedDouble):
* jit/JIT.cpp:
(JSC::JIT::emitEnterOptimizationCheck):
* jit/JITCode.cpp:
(JSC::JITCode::ftlForOSREntry):
* jit/JITCode.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::ensureWorklist):
* runtime/VM.h:

LayoutTests:

Reviewed by Mark Hahnenberg.

Fix marsaglia to check the result instead of printing, and add a second
version that relies on OSR entry.

* fast/js/regress/marsaglia-osr-entry-expected.txt: Added.
* fast/js/regress/marsaglia-osr-entry.html: Added.
* fast/js/regress/script-tests/marsaglia-osr-entry.js: Added.
(marsaglia):
* fast/js/regress/script-tests/marsaglia.js:

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

8 years agoAX: REGRESSION: @title is exposed as AXDescription when label label from contents...
cfleizach@apple.com [Wed, 4 Sep 2013 06:13:39 +0000 (06:13 +0000)]
AX: REGRESSION: @title is exposed as AXDescription when label label from contents already exists.
https://bugs.webkit.org/show_bug.cgi?id=120550

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Resolve a FIXME from the accessible name computation refactoring so that alternative text for links do not
show up in the title field and do not duplicate naming when a title tag is used.

Effectively, this means that links no longer use AXTitle for alternative text. They use AXDescription
like all other elements.

Test: platform/mac/accessibility/link-with-title.html

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

LayoutTests:

* accessibility/image-map1.html:
* platform/mac/accessibility/document-links-expected.txt:
* platform/mac/accessibility/image-map1-expected.txt:
* platform/mac/accessibility/link-with-title-expected.txt: Added.
* platform/mac/accessibility/link-with-title.html: Added.

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

8 years agoCodeBlock memory cost reporting should be rationalized
fpizlo@apple.com [Wed, 4 Sep 2013 05:48:06 +0000 (05:48 +0000)]
CodeBlock memory cost reporting should be rationalized
https://bugs.webkit.org/show_bug.cgi?id=120615

Source/JavaScriptCore:

Reviewed by Darin Adler.

Report the size of the instruction stream, and then remind the GC that we're
using memory when we trace.

This is a slight slow-down on some JSBench tests because it makes us GC a
bit more frequently. But I think it's well worth it; if we really want those
tests to GC less frequently then we can achieve that through other kinds of
tuning. It's better that the GC knows that CodeBlocks do in fact use memory;
what it does with that information is a somewhat orthogonal question.

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

Source/WTF:

Reviewed by Darin Adler.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::refCount):

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

8 years agoFollow up to http://trac.webkit.org/changeset/155014
enrica@apple.com [Wed, 4 Sep 2013 05:06:08 +0000 (05:06 +0000)]
Follow up to trac.webkit.org/changeset/155014

Reviewed by Alexey Proskuryakov.

In the r155014 I renamed hasLineBreakingPropertyComplexContext
to requiresComplexContextForWordBreaking but forgot to
make the same change in UnicodeWchar.h.

* wtf/unicode/wchar/UnicodeWchar.cpp:
(WTF::Unicode::requiresComplexContextForWordBreaking):
* wtf/unicode/wchar/UnicodeWchar.h:

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

8 years agoChange type of Document::doctype back to a raw pointer
darin@apple.com [Wed, 4 Sep 2013 04:53:23 +0000 (04:53 +0000)]
Change type of Document::doctype back to a raw pointer
https://bugs.webkit.org/show_bug.cgi?id=120617

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::doctype): Return a raw pointer.
(WebCore::Document::childrenChanged): Use the raw pointer.
Also added a FIXME about this code that is probably in the wrong place.
* dom/Document.h: More of the same.

* editing/markup.cpp:
(WebCore::documentTypeString): Get rid of local variable entirely,
since null is already handled right by createMarkup, and also remove
the call to get since doctype is just a raw pointer.

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

8 years agoASSERTION FAILED: frame().view() == this closing a page with SVG or video
akling@apple.com [Wed, 4 Sep 2013 04:49:23 +0000 (04:49 +0000)]
ASSERTION FAILED: frame().view() == this closing a page with SVG or video
<https://webkit.org/b/120645>

Reviewed by Antti Koivisto.

Have RenderSVGResourceContainer check if the document is being destroyed before
triggering any repaints. This replaces the previous check for a null RenderView
which meant basically the same thing.

We could add more and better assertions to catch unnecessary work during tree
teardown, but let's do that separately.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markClientForInvalidation):

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

8 years agoREGRESSION (r154967) window resize is very choppy
darin@apple.com [Wed, 4 Sep 2013 04:27:57 +0000 (04:27 +0000)]
REGRESSION (r154967) window resize is very choppy
https://bugs.webkit.org/show_bug.cgi?id=120653

Reviewed by Andreas Kling.

Andreas Kling spotted the bad change.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::waitForMessage): Roll out this incorrect change.
The code here is not the same as a call to take.

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

8 years agoFix uninitialized build warning in make_names.pl
gyuyoung.kim@samsung.com [Wed, 4 Sep 2013 03:34:13 +0000 (03:34 +0000)]
Fix uninitialized build warning in make_names.pl
https://bugs.webkit.org/show_bug.cgi?id=120658

Reviewed by Andreas Kling.

No new tests, no behavior change.

* dom/make_names.pl:
(printTypeChecks): Fixed a build warning since r154965.

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

8 years agoFix backwards branch in ~Node from r154967
darin@apple.com [Wed, 4 Sep 2013 02:46:10 +0000 (02:46 +0000)]
Fix backwards branch in ~Node from r154967
https://bugs.webkit.org/show_bug.cgi?id=120659

Reviewed by Andreas Kling.

* dom/Node.cpp:
(WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
when we did not remove the item from the table. I removed a ! from this expression
after review; bad idea.

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

8 years agoCan't select Katakana word by double-clicking.
enrica@apple.com [Wed, 4 Sep 2013 01:13:08 +0000 (01:13 +0000)]
Can't select Katakana word by double-clicking.
<rdar://problem/14654926>

Reviewed by Alexey Proskuryakov and Ryosuke Niwa.

Source/WebCore:

For some languages, like Japanese we need
to use more context for word breaking.

New test: editing/selection/doubleclick-japanese-text.html

* platform/text/TextBoundaries.h:
(WebCore::requiresContextForWordBoundary):

Source/WTF:

For some languages, like Japanese we need
to use more context for word breaking.
I've renamed the function to better reflect its use
and remove the unused hasLineBreakingPropertyComplexContextOrIdeographic.

* wtf/unicode/icu/UnicodeIcu.h:
(WTF::Unicode::requiresComplexContextForWordBreaking):

LayoutTests:

Added new test for this scenario.

* editing/selection/doubleclick-japanese-text-expected.txt: Added.
* editing/selection/doubleclick-japanese-text.html: Added.

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

8 years agoConverting StackIterator to a callback interface.
mark.lam@apple.com [Wed, 4 Sep 2013 00:26:57 +0000 (00:26 +0000)]
Converting StackIterator to a callback interface.
https://bugs.webkit.org/show_bug.cgi?id=120564.

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

* API/JSContextRef.cpp:
(BacktraceFunctor::BacktraceFunctor):
(BacktraceFunctor::operator()):
(JSContextCreateBacktrace):
* interpreter/CallFrame.cpp:
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::DumpRegisterFunctor::DumpRegisterFunctor):
(JSC::DumpRegisterFunctor::operator()):
(JSC::Interpreter::dumpRegisters):
(JSC::unwindCallFrame):
(JSC::GetStackTraceFunctor::GetStackTraceFunctor):
(JSC::GetStackTraceFunctor::operator()):
(JSC::Interpreter::getStackTrace):
(JSC::Interpreter::stackTraceAsString):
(JSC::UnwindFunctor::UnwindFunctor):
(JSC::UnwindFunctor::operator()):
(JSC::Interpreter::unwind):
* interpreter/Interpreter.h:
* interpreter/StackIterator.cpp:
(JSC::StackIterator::numberOfFrames):
(JSC::StackIterator::gotoFrameAtIndex):
(JSC::StackIterator::gotoNextFrameWithFilter):
(JSC::StackIterator::resetIterator):
(JSC::StackIterator::Frame::print):
(debugPrintCallFrame):
(DebugPrintStackFunctor::operator()):
(debugPrintStack): Added for debugging convenience.
* interpreter/StackIterator.h:
(JSC::StackIterator::Frame::index):
(JSC::StackIterator::iterate):
* jsc.cpp:
(FunctionJSCStackFunctor::FunctionJSCStackFunctor):
(FunctionJSCStackFunctor::operator()):
(functionJSCStack):
* profiler/ProfileGenerator.cpp:
(JSC::AddParentForConsoleStartFunctor::AddParentForConsoleStartFunctor):
(JSC::AddParentForConsoleStartFunctor::foundParent):
(JSC::AddParentForConsoleStartFunctor::operator()):
(JSC::ProfileGenerator::addParentForConsoleStart):
* runtime/JSFunction.cpp:
(JSC::RetrieveArgumentsFunctor::RetrieveArgumentsFunctor):
(JSC::RetrieveArgumentsFunctor::result):
(JSC::RetrieveArgumentsFunctor::operator()):
(JSC::retrieveArguments):
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::RetrieveCallerFunctionFunctor::result):
(JSC::RetrieveCallerFunctionFunctor::operator()):
(JSC::retrieveCallerFunction):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
(JSC::GlobalFuncProtoGetterFunctor::result):
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::globalFuncProtoGetter):
(JSC::GlobalFuncProtoSetterFunctor::GlobalFuncProtoSetterFunctor):
(JSC::GlobalFuncProtoSetterFunctor::allowsAccess):
(JSC::GlobalFuncProtoSetterFunctor::operator()):
(JSC::globalFuncProtoSetter):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
(JSC::ObjectConstructorGetPrototypeOfFunctor::result):
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
(JSC::objectConstructorGetPrototypeOf):

Source/WebCore:

No new tests.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::SendFunctor::SendFunctor):
(WebCore::SendFunctor::hasViableFrame):
(WebCore::SendFunctor::operator()):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
(WebCore::CreateScriptCallStackFunctor::operator()):
(WebCore::createScriptCallStack):
(WebCore::CreateScriptCallStackForConsoleFunctor::CreateScriptCallStackForConsoleFunctor):
(WebCore::CreateScriptCallStackForConsoleFunctor::operator()):

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

8 years agoTry unskipping compositing/images/positioned-image-content-rect.html
benjamin@webkit.org [Wed, 4 Sep 2013 00:16:44 +0000 (00:16 +0000)]
Try unskipping compositing/images/positioned-image-content-rect.html

Unreviewed.

* platform/mac/TestExpectations:
The test compositing/images/positioned-image-content-rect.html seems to pass reliably
on the bots and locally.
Try to unskip it.

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

8 years agoThe test inspector/geolocation-success.html is unreliable
benjamin@webkit.org [Tue, 3 Sep 2013 23:56:36 +0000 (23:56 +0000)]
The test inspector/geolocation-success.html is unreliable
https://bugs.webkit.org/show_bug.cgi?id=120655

Reviewed by Alexey Proskuryakov.

* inspector/geolocation-success.html:
The test was expecting everything would be done in the page context
when InspectorTest.evaluateInPage invoke the callback.

This is not the case, geolocation APIs are asynchronous.
The callbacks printLocation() and printError() may or may not be executed.

To fix this, the execution of each step is changed to depends on the completion
of the geolocation callback.

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

8 years agoSupport structured clone of Map and Set
oliver@apple.com [Tue, 3 Sep 2013 23:21:10 +0000 (23:21 +0000)]
Support structured clone of Map and Set
https://bugs.webkit.org/show_bug.cgi?id=120654

Reviewed by Simon Fraser.

Source/JavaScriptCore:

Make xcode copy the required headers, and add appropriate export attributes

* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSMap.h:
* runtime/JSSet.h:
* runtime/MapData.h:

Source/WebCore:

Add support for cloning Map and Set.  Fairly self explanatory change.
Needed to add Forwarding headers for the JSMap, JSSet and MapData classes.

* ForwardingHeaders/runtime/JSMap.h: Added.
* ForwardingHeaders/runtime/JSSet.h: Added.
* ForwardingHeaders/runtime/MapData.h: Added.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::isMap):
(WebCore::CloneSerializer::isSet):
(WebCore::CloneSerializer::startSet):
(WebCore::CloneSerializer::startMap):
(WebCore::CloneSerializer::serialize):
(WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible):
(WebCore::CloneDeserializer::deserialize):

LayoutTests:

Tests!

* fast/dom/Window/script-tests/postmessage-clone.js:
(set new):
(set add.set add):

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

8 years ago[CSS Shapes] Shape's content gets extra left offset when left-border is positive...
betravis@adobe.com [Tue, 3 Sep 2013 22:14:51 +0000 (22:14 +0000)]
[CSS Shapes] Shape's content gets extra left offset when left-border is positive on the content box
https://bugs.webkit.org/show_bug.cgi?id=117573

Reviewed by David Hyatt.

Source/WebCore:

Nested blocks need to take into account their offset from the shape-inside container.
The new code calculates the offset from the shape-inside container, then applies the
offset to the computed segments. The line must be moved down by the offset's height,
and each segment must be moved left by the offset's width.

Test: fast/shapes/shape-inside/shape-inside-offset-block-children.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Relayout a block child if its
new logical left would cause it to rest at a new position within a shape container.
(WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Calculate the logical
offset form a shape inside ancestor container.
(WebCore::RenderBlock::layoutBlockChild): Call relayoutShapeDescendantIfMoved with the
new position offset.
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use layout offset, rather
than just vertical offset.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Ditto.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::ShapeInsideInfo::computeSegmentsForLine): Shift segments logically left when
there is an inline offset.

LayoutTests:

Test that nested children with padding correctly apply an ancestor's shape-inside
across different writing modes.

* fast/shapes/shape-inside/shape-inside-offset-block-children-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-offset-block-children.html: Added.

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

8 years ago [Mac] WebKitTestRunner still beeps sometimes
ap@apple.com [Tue, 3 Sep 2013 21:47:45 +0000 (21:47 +0000)]
    [Mac] WebKitTestRunner still beeps sometimes
        https://bugs.webkit.org/show_bug.cgi?id=120652

        Reviewed by Tim Horton.

        In bug 107251, we disabled beeping in WebProcess, but some of the beeps happen in
        UI process (notably, AppKit beeps when handling a key equivalent returns NO).

        * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitialize):
        Use the same SPI that we use in DRT and in WebProcess to disable beeping.

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