WebKit-https.git
6 years agoAdd toSVGFilterElement() and use it.
gyuyoung.kim@samsung.com [Sun, 14 Jul 2013 13:59:31 +0000 (13:59 +0000)]
Add toSVGFilterElement() and use it.
https://bugs.webkit.org/show_bug.cgi?id=118653

Reviewed by Ryosuke Niwa.

We can use toSVGFilterElement() instead of using static_cast<..> to improve readability.
Blink also uses it.

No new tests, no behavior change.

* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::resourceBoundingBox):
* rendering/svg/RenderSVGResourceFilter.h:
(WebCore::RenderSVGResourceFilter::filterUnits):
(WebCore::RenderSVGResourceFilter::primitiveUnits):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGFilterElement.h:
(WebCore::toSVGFilterElement):

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

6 years agoIntroduce toHTMLVideoElement
kangil.han@samsung.com [Sun, 14 Jul 2013 08:55:49 +0000 (08:55 +0000)]
Introduce toHTMLVideoElement
https://bugs.webkit.org/show_bug.cgi?id=118582

Reviewed by Ryosuke Niwa.

To avoid direct use of static_cast, this patch introduces toHTMLVideoElement.

Source/WebCore:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getPluginProxyParams):
* html/HTMLVideoElement.h:
(WebCore::toHTMLVideoElement):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::descendentVideoElement):
(WebCore::ancestorVideoElement):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::enterFullscreenForVideo):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoElement):

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::mediaContentUrlByElementId):
* WebCoreSupport/FullScreenVideoQt.cpp:
(WebCore::FullScreenVideoQt::enterFullScreenForNode):
(WebCore::FullScreenVideoQt::exitFullScreenForNode):

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

6 years agoUnreviewed, rolling out r151978.
commit-queue@webkit.org [Sun, 14 Jul 2013 06:12:03 +0000 (06:12 +0000)]
Unreviewed, rolling out r151978.
http://trac.webkit.org/changeset/151978
https://bugs.webkit.org/show_bug.cgi?id=118651

Caused regressions at least 3 websites (Requested by rniwa on
#webkit).

Source/JavaScriptCore:

* runtime/JSCJSValue.h:
* runtime/JSString.h:

Source/WebCore:

* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeTypeFromSignature):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:

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

6 years agoCaret should respect text background color
joone.hur@intel.com [Sun, 14 Jul 2013 06:03:05 +0000 (06:03 +0000)]
Caret should respect text background color
https://bugs.webkit.org/show_bug.cgi?id=117493

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch allows the caret to become visible in the black background
by getting the caret color from the color of the element containing
the text, not the parent element that has the contentEditable attribute.

Test: editing/caret/caret-color.html

* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):

LayoutTests:

This tests to make sure that the caret is visible in the black background
by getting the caret color from the color of the element(span) containing
the text, not the parent element(div) that has the contentEditable
attribute.

* editing/caret/caret-color-expected.txt: Added.
* editing/caret/caret-color.html: Added.
* platform/efl/editing/caret/caret-color-expected.png: Added.
* platform/mac/TestExpectations: Skip this test case.

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

6 years agoAvoid upconverting strings in various places in WebCore
rniwa@webkit.org [Sun, 14 Jul 2013 01:11:43 +0000 (01:11 +0000)]
Avoid upconverting strings in various places in WebCore
https://bugs.webkit.org/show_bug.cgi?id=118632

Reviewed by Andreas Kling.

Avoid calling String::characters() in various places since it upconverts 8-bit strings to 16-bit strings.

Merge
https://chromium.googlesource.com/chromium/blink/+/a6162e2ad7c7870e22445d3c463d17e7ac871e80
https://chromium.googlesource.com/chromium/blink/+/18095209b3f467758b83894e7b14f813f6953f81
https://chromium.googlesource.com/chromium/blink/+/fefcf2b95d55f24c60fd2e95978cf4544f3c92ca
https://chromium.googlesource.com/chromium/blink/+/8e0527b0fb33998318aedfd74b3511025f7ff294
https://chromium.googlesource.com/chromium/blink/+/feaf798b04597b0849b4000fc305264895d3eac5
https://chromium.googlesource.com/chromium/blink/+/bd1a49103a6e07b1023d2c742d8217769efbffb4

* css/CSSParser.cpp:
(WebCore::CSSParser::setupParser):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
* dom/DatasetDOMStringMap.cpp:
(WebCore::isValidAttributeName):
(WebCore::convertAttributeNameToPropertyName):
(WebCore::propertyNameMatchesAttributeName):
(WebCore::isValidPropertyName):
(WebCore::convertPropertyNameToAttributeName):
* dom/Range.cpp:
(WebCore::Range::toString):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::parseSandboxPolicy):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::markFutureAndPastNodes):

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

6 years agoparseHTMLInteger shouldn't upconvert 8-bit string
rniwa@webkit.org [Sat, 13 Jul 2013 15:32:07 +0000 (15:32 +0000)]
parseHTMLInteger shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118629

Reviewed by Sam Weinig.

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

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLInteger):

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

6 years agoUnreviewed. Add an email address and update my domain of experts.
kseo@webkit.org [Sat, 13 Jul 2013 03:44:16 +0000 (03:44 +0000)]
Unreviewed. Add an email address and update my domain of experts.

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

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

6 years agoRemove some dead stores pointed out by the clang static analyzer.
jberlin@webkit.org [Fri, 12 Jul 2013 23:59:16 +0000 (23:59 +0000)]
Remove some dead stores pointed out by the clang static analyzer.
https://bugs.webkit.org/show_bug.cgi?id=118608

Reviewed by Anders Carlsson.

* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::instantiatePlugin):
kr is never read after this point, so there is no reason to assign to it.

* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage getPluginInfoFromPLists]):
The extensions array is only used in the while loop. Move the declaration to the first place
it is used in the while loop. Since it is always reassigned at that location, and since it
is never read after the subsequent for loop, the assignment to an array containing the empty
string is never used. Remove it.
Similarly, the value of the description is always overwritten before used to assign to
mimeClassInfo.desc or to pluginInfo.desc, so the code to assign it to the empty string is
never used. Remove it.

* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]):
maxWidth is never read (and never was since it was added in r7311) after it is used on the
line above to set windowFrame.size.width.

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

6 years ago[iOS] TextTrackRepresentation not cleared when captions are disabled
eric.carlson@apple.com [Fri, 12 Jul 2013 23:35:15 +0000 (23:35 +0000)]
[iOS] TextTrackRepresentation not cleared when captions are disabled
https://bugs.webkit.org/show_bug.cgi?id=118623

Reviewed by Dean Jackson.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Do not return immediately
    when captions are disabled so the necessary cleanup happens.

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

6 years agoSource/JavaScriptCore: Optimize addStrackTraceIfNecessary to be faster in the case...
commit-queue@webkit.org [Fri, 12 Jul 2013 22:37:51 +0000 (22:37 +0000)]
Source/JavaScriptCore: Optimize addStrackTraceIfNecessary to be faster in the case when it's not necessary
https://bugs.webkit.org/show_bug.cgi?id=118328

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-12
Reviewed by Geoffrey Garen.

Retrieving the stack is costly. We want to get it only once. By moving the check
for the .stack property above the code to retrieve the stack, we ensure this.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::addStackTraceIfNecessary):

LayoutTests: By optimizing when the stack is added a two tests needed to be modifed to show correct results.
https://bugs.webkit.org/show_bug.cgi?id=118328

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-12
Reviewed by Geoffrey Garen.

* inspector/console/console-exception-stack-traces.html: This test compares the console's currect
stack with the error object's stack. The test was failing on decodeURI() and eval() which create
a new frame on the stack to execute. The console's stack was unaware of these calls and the size
of the stacks would not match. I added a check to pass if it was the specific case with decodeURI
or eval.

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

6 years ago[jhbuild] Avoid restarting from scratch failed initial checkouts
commit-queue@webkit.org [Fri, 12 Jul 2013 20:05:08 +0000 (20:05 +0000)]
[jhbuild] Avoid restarting from scratch failed initial checkouts
https://bugs.webkit.org/show_bug.cgi?id=118603

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2013-07-12
Reviewed by Martin Robinson.

If the initial checkout is interrupted midway (eg. because the internet
connection went down) config files do not get generated and that causes
the next checkout to start from scratch (the missing files cause the
script to delete the build root and the downloaded sources).

By generating the files before invoking jhbuild, subsequent runs are able
to start where the previous run left.

* Scripts/update-webkit-libs-jhbuild:
(saveJhbuildMd5): invoke it before runJhbuild().

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

6 years ago[Windows] Remove single-worker restriction on tests.
bfulgham@apple.com [Fri, 12 Jul 2013 19:51:38 +0000 (19:51 +0000)]
[Windows] Remove single-worker restriction on tests.

* Scripts/webkitpy/port/win.py: Remove restriction of one worker.

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

6 years ago[Windows] Attempt to satisfy the Open Source Windows bots.
bfulgham@apple.com [Fri, 12 Jul 2013 19:30:23 +0000 (19:30 +0000)]
[Windows] Attempt to satisfy the Open Source Windows bots.

* DerivedSources.make: Restore the HAVE_AVCF macro detection.
* config.h: Return to using HAVE_AVCF to activate AVFoundation code.

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

6 years agoUnreviewed, rolling out r152599.
commit-queue@webkit.org [Fri, 12 Jul 2013 19:05:04 +0000 (19:05 +0000)]
Unreviewed, rolling out r152599.
http://trac.webkit.org/changeset/152599
https://bugs.webkit.org/show_bug.cgi?id=118612

This patch includes a failing unit test (Requested by
mrobinson on #webkit).

* Scripts/webkitpy/style/checkers/python.py:
(Pylinter):
* Scripts/webkitpy/style/checkers/python_unittest.py:
(PythonCheckerTest.test_check):
* Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py: Removed.

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

6 years ago[Tools] Ignore missing GNUmakefile when detecting previous arch in build-webkit
commit-queue@webkit.org [Fri, 12 Jul 2013 18:57:35 +0000 (18:57 +0000)]
[Tools] Ignore missing GNUmakefile when detecting previous arch in build-webkit
https://bugs.webkit.org/show_bug.cgi?id=91223

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2013-07-12
Reviewed by Martin Robinson.

When run on a clean checkout, `build-webkit` complains that no
GNUmakefile exists when trying to detect the previously configured
architecture, but in this case there's no previous configuration so
the warning is pointless.

* Scripts/webkitdirs.pm:
(determineArchitecture): Redirect grep stderr to /dev/null.

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

6 years ago[Windows] Build correction after r152573/r152577.
bfulgham@apple.com [Fri, 12 Jul 2013 18:54:07 +0000 (18:54 +0000)]
[Windows] Build correction after r152573/r152577.
https://bugs.webkit.org/show_bug.cgi?id=118610

Reviewed by Oliver Hunt.

* jit/JITThunks.cpp:
(JSC::JITThunks::hostFunctionStub): Hand-feed MSVC++ the fact that we want the second
argument of the make_pair to be a function pointer.

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

6 years agocheck-webkit-style: Ignore false positive: Instance of 'Popen' has no 'pid' member
commit-queue@webkit.org [Fri, 12 Jul 2013 18:36:25 +0000 (18:36 +0000)]
check-webkit-style: Ignore false positive: Instance of 'Popen' has no 'pid' member
https://bugs.webkit.org/show_bug.cgi?id=118592

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-12
Reviewed by Martin Robinson.

Added a suppression for pylint false positives and a unit test.

* Scripts/webkitpy/style/checkers/python.py:
(Pylinter):
* Scripts/webkitpy/style/checkers/python_unittest.py:
(PythonCheckerTest.test_check):
(PythonCheckerTest):
(PythonCheckerTest.test_pylint_false_positives):
(PythonCheckerTest.test_pylint_false_positives._mock_handle_pylint_false_positives):
* Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py: Added.
(test_popen):

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

6 years agoUpdate CodeMirror to 7f560afa1c (3.14+).
timothy@apple.com [Fri, 12 Jul 2013 18:31:29 +0000 (18:31 +0000)]
Update CodeMirror to 7f560afa1c (3.14+).

https://bugs.webkit.org/show_bug.cgi?id=118605

Reviewed by Sam Weinig.

* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/Formatter.js:
* Tools/PrettyPrinting/FormatterContentBuilder.js:
* Tools/PrettyPrinting/codemirror.css:
* Tools/PrettyPrinting/codemirror.js:
* Tools/PrettyPrinting/css.js:
* Tools/PrettyPrinting/javascript.js:
* UserInterface/External/CodeMirror/codemirror.css:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/comment.js:
* UserInterface/External/CodeMirror/css.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/External/CodeMirror/matchbrackets.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/xml.js:

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

6 years agoUnreviewed. Add myself as a committer.
a.renevier@samsung.com [Fri, 12 Jul 2013 17:53:24 +0000 (17:53 +0000)]
Unreviewed. Add myself as a committer.

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

6 years agoImprove StringImpl::constructInternal() method
mikhail.pozdnyakov@intel.com [Fri, 12 Jul 2013 16:40:07 +0000 (16:40 +0000)]
Improve StringImpl::constructInternal() method
https://bugs.webkit.org/show_bug.cgi?id=118503

Reviewed by Benjamin Poulain.

StringImpl::constructInternal used 'if ()' statement to decide which constructor
to invoke hence compiler had to compile both branches even though optimizer would
have then removed one of those, and as the function is inline it could affect
slightly the compilation time.

The problem is solved via template specialization.

* wtf/text/StringImpl.h:
(WTF::LChar):
(WTF::UChar):

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

6 years ago[WinCairo] Compile fix.
commit-queue@webkit.org [Fri, 12 Jul 2013 16:28:46 +0000 (16:28 +0000)]
[WinCairo] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=118461

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-07-12
Reviewed by Brent Fulgham.

* config.h: Only enable AVFOUNDATION for Windows if CoreGraphics is used.

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

6 years ago[EFL] --minimal build fails while linking libwebcore_efl.so
commit-queue@webkit.org [Fri, 12 Jul 2013 14:42:08 +0000 (14:42 +0000)]
[EFL] --minimal build fails while linking libwebcore_efl.so
https://bugs.webkit.org/show_bug.cgi?id=118549

Patch by Oleg Beletski <oleg.beletski@gmail.com> on 2013-07-12
Reviewed by Christophe Dumez.

* CMakeLists.txt:
Moving file plugins/PluginPackage.cpp to ENABLE_NETSCAPE_PLUGIN_API block.

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

6 years ago[Qt] Unreviewed gardening. Skipping new failing test on Qt.
zarvai@inf.u-szeged.hu [Fri, 12 Jul 2013 13:16:05 +0000 (13:16 +0000)]
[Qt] Unreviewed gardening. Skipping new failing test on Qt.
https://bugs.webkit.org/show_bug.cgi?id=118595

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-07-12

* platform/qt/TestExpectations:

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

6 years agoUnreviewed typo fix.
ossy@webkit.org [Fri, 12 Jul 2013 12:55:17 +0000 (12:55 +0000)]
Unreviewed typo fix.

* fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt:
* fast/css-grid-layout/grid-element-change-columns-repaint.html:
* platform/qt-5.0-wk2/fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt:

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

6 years agoWeb Inspector: Pass null for sidebarPanels and role in WebInspector.Sidebar()
commit-queue@webkit.org [Fri, 12 Jul 2013 12:45:37 +0000 (12:45 +0000)]
Web Inspector: Pass null for sidebarPanels and role in WebInspector.Sidebar()
https://bugs.webkit.org/show_bug.cgi?id=118589

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-07-12
Reviewed by Timothy Hatcher.

sidebarPanels : It is necessary to get correct argument after r152141.
Without this, error messages can be displayed.
role : Could pass null for it since default value is "group".

* UserInterface/Main.js:
(WebInspector.contentLoaded):

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

6 years agoInsufficient viewport repaints when FrameView::paintsEntireContents
allan.jensen@digia.com [Fri, 12 Jul 2013 08:22:11 +0000 (08:22 +0000)]
Insufficient viewport repaints when FrameView::paintsEntireContents
https://bugs.webkit.org/show_bug.cgi?id=118562

Reviewed by Simon Fraser.

When the frameview paints entire content, the visualOverflowRect of RenderView
should be the same as the layoutOverflowRect.

This affects the requested repaints on resize of the frameview.

* rendering/RenderView.cpp:
(WebCore::RenderView::visualOverflowRect):
* rendering/RenderView.h:

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

6 years agoAdd 'partner.samsung.com' to domain affiliations
commit-queue@webkit.org [Fri, 12 Jul 2013 01:59:50 +0000 (01:59 +0000)]
Add 'partner.samsung.com' to domain affiliations
https://bugs.webkit.org/show_bug.cgi?id=118580

Patch by Bruno de Oliveira Abinader <bruno.d@partner.samsung.com> on 2013-07-11
Reviewed by Antonio Gomes.

* team.html:

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

6 years agoReplace simple_blank.swf with lines.swf for snapshotting tests.
roger_fong@apple.com [Fri, 12 Jul 2013 00:50:15 +0000 (00:50 +0000)]
Replace simple_blank.swf with lines.swf for snapshotting tests.
https://bugs.webkit.org/show_bug.cgi?id=118581.

Reviewed by Tim Horton.

* plugins/resources/lines.swf: Added.
* plugins/snapshotting/autoplay-dominant.html:
* plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html:
* plugins/snapshotting/autoplay-similar-to-dominant.html:
* plugins/snapshotting/plugin-receives-click-event.html:
* plugins/snapshotting/restart.html:
* plugins/snapshotting/simple.html:

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

6 years agoPlugins that don't support snapshotting should not all autostart.
roger_fong@apple.com [Thu, 11 Jul 2013 23:53:40 +0000 (23:53 +0000)]
Plugins that don't support snapshotting should not all autostart.
https://bugs.webkit.org/show_bug.cgi?id=118572
<rdar://problem/14324391>.

Reviewed by Dean Jackson.

Test: plugins/snapshotting/quicktime-plugin-snapshotted.html

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Pass in information about whether or not a snapshot exists
to the shadow dom.
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): We should only add the layer to the tree when the plugin
is actually playing. Otherwise we run into an issue where the contents of the layer initially appear on the screen briefly
on page load before we display the substitute for a plugin that doesn't support snapshotting.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
(WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight
to the the DisplayingSnapshot state.
* WebProcess/Plugins/PluginView.h:

* platform/mac-wk2/plugins/snapshotting/quicktime-plugin-snapshotted-expected.txt: Added.
* plugins/snapshotting/quicktime-plugin-snapshotted.html: Added.

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

6 years ago[mac] No API for getting the page visibility state of a WebView
mitz@apple.com [Thu, 11 Jul 2013 22:33:11 +0000 (22:33 +0000)]
[mac] No API for getting the page visibility state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=118578

Reviewed by Simon Fraser.

Source/WebCore:

* WebCore.exp.in: Export WebCore::Page::visibilityState().

Source/WebKit/mac:

* WebView/WebView.mm:
(kit): Added. Converts from WebCore::PageVisibilityState to WebPageVisibilityState.
(-[WebView _visibilityState]): Added.
* WebView/WebViewPrivate.h: Declared -_visibilityState.

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

6 years agoWebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an array (pointed...
jberlin@webkit.org [Thu, 11 Jul 2013 22:27:04 +0000 (22:27 +0000)]
WebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an array (pointed out by the
clang static analyzer)
https://bugs.webkit.org/show_bug.cgi?id=118533

Reviewed by Anders Carlsson.

* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):

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

6 years agoAttempt to fix the windows build.
oliver@apple.com [Thu, 11 Jul 2013 21:57:18 +0000 (21:57 +0000)]
Attempt to fix the windows build.

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

6 years ago[GTK] Unreviewed gardening. Added expected failures after r152574.
mario@webkit.org [Thu, 11 Jul 2013 21:40:31 +0000 (21:40 +0000)]
[GTK] Unreviewed gardening. Added expected failures after r152574.

* platform/gtk/TestExpectations: Added test failures.

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

6 years agoUse GOwnPtr in PluginProcessProxyUnix to manage stdOut variable
commit-queue@webkit.org [Thu, 11 Jul 2013 19:40:07 +0000 (19:40 +0000)]
Use GOwnPtr in PluginProcessProxyUnix to manage stdOut variable
https://bugs.webkit.org/show_bug.cgi?id=118568

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-07-11
Reviewed by Martin Robinson.

* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::scanPlugin):

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

6 years ago[GTK] Layout Test accessibility/deleting-iframe-destroys-axcache.html, platform/gtk...
mario@webkit.org [Thu, 11 Jul 2013 18:57:57 +0000 (18:57 +0000)]
[GTK] Layout Test accessibility/deleting-iframe-destroys-axcache.html, platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html are failing
https://bugs.webkit.org/show_bug.cgi?id=118552

Patch by Mario Sanchez Prada <mario.prada@samsung.com> on 2013-07-11
Reviewed by Chris Fleizach.

Source/WebCore:

Do not assume always that we have a RenderText renderer when
calling to toRenderText(), since we might be executing that part
of the code due to have requested to include all the children.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Add
missing guard for RenderText, needed after r152537.

LayoutTests:

Remove tests that are no longer expected to crash.

* platform/gtk/TestExpectations: Removed tests.

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

6 years agoNativeExecutable cache needs to use both call and construct functions for key
oliver@apple.com [Thu, 11 Jul 2013 18:35:35 +0000 (18:35 +0000)]
NativeExecutable cache needs to use both call and construct functions for key
https://bugs.webkit.org/show_bug.cgi?id=118545

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Make the native executable cache make use a key pair so we don't decide to
treat all subsequent functions as not being constructors.

* jit/JITThunks.cpp:
(JSC::JITThunks::hostFunctionStub):
* jit/JITThunks.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::create):
* runtime/JSCell.cpp:
(JSC::JSCell::getCallData):
(JSC::JSCell::getConstructData):

LayoutTests:

Make sure we don't decide that all bound functions aren't constructors.

* fast/js/function-bind-expected.txt:
* fast/js/script-tests/function-bind.js:

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

6 years ago[CSS Regions] In a region chain with auto-height regions, lines get their length...
abucur@adobe.com [Thu, 11 Jul 2013 16:17:37 +0000 (16:17 +0000)]
[CSS Regions] In a region chain with auto-height regions, lines get their length based only on the first region
https://bugs.webkit.org/show_bug.cgi?id=118531

Reviewed by Alexandru Chiculita.

Source/WebCore:

When computing the height a flow thread it's possible to overflow the maximum LayoutUnit and obtain a negative value.
This leads to invalid results during layout when computing the region range and the RenderBoxRegion info for the
descendant boxes of the flow thread.

This issue appears especially during the auto-height algorithm because it initializes the auto-height regions
height with the LayoutUnit::max() / 2 value. Summing two such regions overflows and results in a negative value.

The fix clamps the maximum height of the flow thread to LayoutUnit::max() / 2. This doesn't affect the auto-height
algorithm because regionAtBlockOffset() will still return the correct values as the auto-height regions content
is established and their height updated.

Tests: fast/regions/autoheight-correct-region-for-lines-2.html
       fast/regions/autoheight-correct-region-for-lines.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::maxPageLogicalHeight):

LayoutTests:

Add tests verifying the lines widths are correctly computed in auto-height regions with and without a max-height set.

* fast/regions/autoheight-correct-region-for-lines-2-expected.html: Added.
* fast/regions/autoheight-correct-region-for-lines-2.html: Added.
* fast/regions/autoheight-correct-region-for-lines-expected.html: Added.
* fast/regions/autoheight-correct-region-for-lines.html: Added.

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

6 years agoRevert r152267 and soft link WebInspectorUI.framework again.
timothy@apple.com [Thu, 11 Jul 2013 15:43:53 +0000 (15:43 +0000)]
Revert r152267 and soft link WebInspectorUI.framework again.

https://bugs.webkit.org/show_bug.cgi?id=118544

Reviewed by David Kilzer.

Source/WebCore:

* platform/mac/SoftLinking.h: Rename SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL
to SOFT_LINK_STAGED_FRAMEWORK and ASSERT since we don't want to silently
fail anymore when using this macro.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Configurations/WebKit.xcconfig:
* WebCoreSupport/WebInspectorClient.mm:
(useWebKitWebInspector):

Source/WebKit2:

* Configurations/WebKit2.xcconfig:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::inspectorReallyUsesWebKitUserInterface):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::inspectorReallyUsesWebKitUserInterface):

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

6 years ago[Coordinated Graphics] Parameter of commitSceneState should be const
commit-queue@webkit.org [Thu, 11 Jul 2013 15:17:13 +0000 (15:17 +0000)]
[Coordinated Graphics] Parameter of commitSceneState should be const
https://bugs.webkit.org/show_bug.cgi?id=118564

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-07-11
Reviewed by Noam Rosenthal.

Parameter of commitSceneState should be const as there should not be any
modifications to the passed CoordinatedGraphicsState.

Source/WebCore:

* platform/graphics/texmap/coordinated/CompositingCoordinator.h:

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::commitSceneState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

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

6 years agoNamedFlowCollection getters should follow the same pattern as HTMLCollection
commit-queue@webkit.org [Thu, 11 Jul 2013 14:54:36 +0000 (14:54 +0000)]
NamedFlowCollection getters should follow the same pattern as HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=118561

Patch by Radu Stavila <stavila@adobe.com> on 2013-07-11
Reviewed by Christophe Dumez.

Source/WebCore:

Modified item and namedItem methods from DOMNamedFlowCollection to return null instead of undefined.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22617
Completely removed the TreatReturnedNullObjectAs attribute as it was only used by the DOMNamedFlowCollection interface.

Test: fast/regions/webkit-named-flow-collection-empty-getters.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationFunctionCall):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::treatReturnedNullObjectAsUndefined):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_treat_returned_null_object_as_undefined):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj treatReturnedNullObjectAsUndefined]):
* bindings/scripts/test/TestObj.idl:
* dom/DOMNamedFlowCollection.idl:

LayoutTests:

Updated test for NamedFlowCollection getters when no named flows are created.

* fast/regions/webkit-named-flow-collection-empty-getters-expected.txt: Renamed from LayoutTests/fast/regions/webkit-named-flow-collection-undefined-expected.txt.
* fast/regions/webkit-named-flow-collection-empty-getters.html: Renamed from LayoutTests/fast/regions/webkit-named-flow-collection-undefined.html.

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

6 years agoRevert r149313: Don't check for @media rules affected by viewport changes in every...
akling@apple.com [Thu, 11 Jul 2013 14:45:45 +0000 (14:45 +0000)]
Revert r149313: Don't check for @media rules affected by viewport changes in every layout.
<rdar://problem/14277905>

Rubber-stamped by Antti Koivisto.

This changed caused more harm than good. setFrameRect() is not the only path in FrameView
that can cause media queries to need invalidation.

* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):

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

6 years agoIntroduce isHTMLTitleElement and toHTMLTitleElement
kangil.han@samsung.com [Thu, 11 Jul 2013 12:43:14 +0000 (12:43 +0000)]
Introduce isHTMLTitleElement and toHTMLTitleElement
https://bugs.webkit.org/show_bug.cgi?id=118558

Reviewed by Andreas Kling.

To enhance readability, this patch introduces isHTMLTitleElement and toHTMLTitleElement.
This also helps out to reduce duplicated use of static_cast.

* dom/Document.cpp:
(WebCore::Document::setTitle):
(WebCore::Document::removeTitle):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::removeHeadContents):
* html/HTMLTitleElement.h:
(WebCore::isHTMLTitleElement):
(WebCore::toHTMLTitleElement):

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

6 years agoRemove unused Windows CE files
paroga@webkit.org [Thu, 11 Jul 2013 11:43:53 +0000 (11:43 +0000)]
Remove unused Windows CE files
https://bugs.webkit.org/show_bug.cgi?id=118557

Reviewed by Andreas Kling.

Source/WebCore:

* platform/wince/CursorWinCE.cpp: Removed.
* platform/wince/PasteboardWinCE.cpp: Removed.
* platform/wince/SearchPopupMenuWinCE.cpp: Removed.

Source/WTF:

* wtf/wince/FastMallocWinCE.h: Removed.
* wtf/wince/MemoryManager.cpp: Removed.
* wtf/wince/MemoryManager.h: Removed.

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

6 years agoGet rid of SVGPathSeg* special casing in the bindings generator
ch.dumez@sisa.samsung.com [Thu, 11 Jul 2013 11:19:20 +0000 (11:19 +0000)]
Get rid of SVGPathSeg* special casing in the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118525

Reviewed by Kentaro Hara.

Have one header per SVGPathSeg* type so that we no longer need special casing
for them in the JSC bindings generator.

No new tests, no behavior change.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSVGPathSegCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(NativeToJSValue):
* svg/SVGPathElement.cpp:
* svg/SVGPathSegArc.h:
* svg/SVGPathSegArcAbs.h: Added.
(WebCore::SVGPathSegArcAbs::create):
(WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
(WebCore::SVGPathSegArcAbs::pathSegType):
(WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
* svg/SVGPathSegArcRel.h: Added.
(WebCore::SVGPathSegArcRel::create):
(WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
(WebCore::SVGPathSegArcRel::pathSegType):
(WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubic.h:
* svg/SVGPathSegCurvetoCubicAbs.h: Added.
(WebCore::SVGPathSegCurvetoCubicAbs::create):
(WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
(WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
(WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicRel.h: Added.
(WebCore::SVGPathSegCurvetoCubicRel::create):
(WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
(WebCore::SVGPathSegCurvetoCubicRel::pathSegType):
(WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicSmooth.h:
* svg/SVGPathSegCurvetoCubicSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicSmoothRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
(WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadratic.h:
* svg/SVGPathSegCurvetoQuadraticAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
(WebCore::SVGPathSegCurvetoQuadraticAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
(WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
(WebCore::SVGPathSegCurvetoQuadraticRel::create):
(WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
(WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticSmoothRel.h: Renamed from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegLineto.h.
(WebCore::SVGPathSegLinetoAbs::create):
(WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
(WebCore::SVGPathSegLinetoAbs::pathSegType):
(WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoHorizontal.h:
* svg/SVGPathSegLinetoHorizontalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
(WebCore::SVGPathSegLinetoHorizontalAbs::create):
(WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
(WebCore::SVGPathSegLinetoHorizontalAbs::pathSegType):
(WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoHorizontalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
(WebCore::SVGPathSegLinetoHorizontalRel::create):
(WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
(WebCore::SVGPathSegLinetoHorizontalRel::pathSegType):
(WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegLineto.h.
(WebCore::SVGPathSegLinetoRel::create):
(WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
(WebCore::SVGPathSegLinetoRel::pathSegType):
(WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoVertical.h:
* svg/SVGPathSegLinetoVerticalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
(WebCore::SVGPathSegLinetoVerticalAbs::create):
(WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
(WebCore::SVGPathSegLinetoVerticalAbs::pathSegType):
(WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoVerticalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
(WebCore::SVGPathSegLinetoVerticalRel::create):
(WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
(WebCore::SVGPathSegLinetoVerticalRel::pathSegType):
(WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
* svg/SVGPathSegListBuilder.cpp:
* svg/SVGPathSegMovetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegMoveto.h.
(WebCore::SVGPathSegMovetoAbs::create):
(WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
(WebCore::SVGPathSegMovetoAbs::pathSegType):
(WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
* svg/SVGPathSegMovetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegMoveto.h.
(WebCore::SVGPathSegMovetoRel::create):
(WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
(WebCore::SVGPathSegMovetoRel::pathSegType):
(WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):

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

6 years agoBuild fix for WinCE after r152426.
paroga@webkit.org [Thu, 11 Jul 2013 10:53:16 +0000 (10:53 +0000)]
Build fix for WinCE after r152426.

* config.h:

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

6 years ago[Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
commit-queue@webkit.org [Thu, 11 Jul 2013 10:28:43 +0000 (10:28 +0000)]
[Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=118532

Patch by Fabienne Semeria <fsemeria@nds.com> on 2013-07-11
Reviewed by Allan Sandfeld Jensen.

* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):

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

6 years ago[GTK] Unreviewed gardening. Added crash expectations in debug builds after r152537
mario@webkit.org [Thu, 11 Jul 2013 09:09:10 +0000 (09:09 +0000)]
[GTK] Unreviewed gardening. Added crash expectations in debug builds after r152537

* platform/gtk/TestExpectations: Added two crashing tests.

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

6 years ago[ATK] Refactor code for translating offsets between WebCore a11y and ATK
mario@webkit.org [Thu, 11 Jul 2013 08:36:15 +0000 (08:36 +0000)]
[ATK] Refactor code for translating offsets between WebCore a11y and ATK
https://bugs.webkit.org/show_bug.cgi?id=118179

Reviewed by Chris Fleizach.

Encapsulate better and make more clear the translation of offsets
between our ATK implementation and WebCore's accessibility layer.

Values for offsets can differ sometimes between those two worlds
due to some extra flattening we need to do in ATK based ports to
properly expose the accessibility hierarchy to ATs, which
sometimes means adding extra text elements in the exposed text
through the AtkText interface (e.g. list items markers).

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(offsetAdjustmentForListItem): Helper function to refactor code
needed to translate offsets from WebCore to ATK worlds. Currently
related to considering list item markers in LTR text only.
(webCoreOffsetToAtkOffset): Convenience function for code
readability purposes. It just calls offsetAdjustmentForListItem.
(atkOffsetToWebCoreOffset): Likewise.
(getSelectionOffsetsForObject): Use webCoreOffsetToAtkOffset.
(webkitAccessibleTextGetCaretOffset): Use webCoreOffsetToAtkOffset
to translate an offset from WebCore to ATK before returning it.
(webkitAccessibleTextSetSelection): Use atkOffsetToWebCoreOffset
to translate an offset from WebCore to ATK before using it.
(webkitAccessibleTextSetCaretOffset): Likewise.

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

6 years agoHandle "load,provisional,failed" with the on_error callback on EFL MiniBrowser
commit-queue@webkit.org [Thu, 11 Jul 2013 07:00:10 +0000 (07:00 +0000)]
Handle "load,provisional,failed" with the on_error callback on EFL MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=118538

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-07-10
Reviewed by Christophe Dumez.

When attempting some odd url such as ``foo'', MiniBrowser will now show an
error message such as "Cannot resolve hostname (foo)".

Previously, it had the following behavior if MiniBrowser was started with
such urls, e.g ``./MiniBrowser foo'':

- Debug:
It wouldt hit WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp(460) and crash.

- Release:
No asserts, naturally, but the view would remain blank, even if we tried to
change to a valid url.

* MiniBrowser/efl/main.c:
(window_create):

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

6 years ago<rdar://problem/14395759> PluginProcess sometimes logs an error about being unable...
mrowe@apple.com [Thu, 11 Jul 2013 00:13:57 +0000 (00:13 +0000)]
<rdar://problem/14395759> PluginProcess sometimes logs an error about being unable to load WebKit2.framework.

Reviewed by Alexey Proskuryakov.

* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables
specified in dynamic linker load commands are passed to the subprocess that we spawn to create
the MIME type property list.

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

6 years agoRange.getClientRects() not working correctly for partially contained vertically style...
weinig@apple.com [Wed, 10 Jul 2013 23:56:42 +0000 (23:56 +0000)]
Range.getClientRects() not working correctly for partially contained vertically styled text nodes
<rdar://problem/14305675>
https://bugs.webkit.org/show_bug.cgi?id=118447

Reviewed by David Hyatt.

Source/WebCore:

Original patch by Mac Murrett, tweaked by me.

Test: fast/dom/Range/getClientRects-vertical.html

* rendering/RenderText.cpp:
(WebCore::localQuadForTextBox):
Use the physical accessors rather than the logical ones to get the correct metrics.

LayoutTests:

* fast/dom/Range/getClientRects-vertical-expected.txt: Added.
* fast/dom/Range/getClientRects-vertical.html: Added.

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

6 years agoReduce number of header includes in SVG
ch.dumez@sisa.samsung.com [Wed, 10 Jul 2013 23:48:35 +0000 (23:48 +0000)]
Reduce number of header includes in SVG
https://bugs.webkit.org/show_bug.cgi?id=118474

Reviewed by Rob Buis.

Reduce number of header includes in SVG. In particular, SVGAnimatedPropertyMacros.h
no longer brings SVGElement.h header include. This means that the SVGElement
class can now have animated properties.

This patch is a prerequirement to merge SVGStyledElement into SVGElement.

No new tests, no behavior change.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* svg/GradientAttributes.h:
* svg/SVGAllInOne.cpp:
* svg/SVGAnimateMotionElement.cpp:
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimatedTypeAnimator.cpp: Added.
(WebCore::SVGElementAnimatedProperties::SVGElementAnimatedProperties):
(WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
(WebCore::SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator):
(WebCore::SVGAnimatedTypeAnimator::calculateFromAndToValues):
(WebCore::SVGAnimatedTypeAnimator::calculateFromAndByValues):
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
* svg/SVGAnimatedTypeAnimator.h:
* svg/SVGAnimationElement.h:
* svg/SVGCursorElement.cpp:
* svg/SVGDocumentExtensions.h:
* svg/SVGElement.cpp:
* svg/SVGElementInstanceList.cpp:
* svg/SVGElementInstanceList.h:
* svg/SVGElementRareData.h:
* svg/SVGFEImageElement.cpp:
* svg/SVGFilterElement.cpp:
* svg/SVGFitToViewBox.h:
* svg/SVGFontData.cpp:
* svg/SVGFontData.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
* svg/SVGGlyphMap.h:
* svg/SVGGradientElement.cpp:
* svg/SVGMPathElement.cpp:
* svg/SVGMPathElement.h:
* svg/SVGPathBlender.cpp:
* svg/SVGPathBlender.h:
* svg/SVGPathBuilder.cpp:
* svg/SVGPathBuilder.h:
* svg/SVGPathParser.cpp:
* svg/SVGPathParser.h:
* svg/SVGPathSegListBuilder.h:
* svg/SVGPathTraversalStateBuilder.cpp:
* svg/SVGPathTraversalStateBuilder.h:
* svg/SVGPathUtilities.h:
* svg/SVGPatternElement.cpp:
* svg/SVGPointList.h:
* svg/SVGScriptElement.cpp:
* svg/SVGStyledElement.h:
* svg/SVGTests.h:
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
* svg/SVGTransformable.h:
* svg/SVGURIReference.cpp:
* svg/SVGURIReference.h:
* svg/SVGVKernElement.cpp:
* svg/SVGVKernElement.h:
* svg/SVGZoomAndPan.h:
* svg/properties/SVGAnimatedProperty.cpp: Added.
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::commitChange):
(WebCore::SVGAnimatedProperty::animatedPropertyCache):
* svg/properties/SVGAnimatedProperty.h:
* svg/properties/SVGAnimatedPropertyMacros.h:
(WebCore::SVGSynchronizableAnimatedProperty::synchronize):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
* svg/properties/SVGListProperty.h:

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

6 years agoFix build against GTK+ 2.0
commit-queue@webkit.org [Wed, 10 Jul 2013 22:39:03 +0000 (22:39 +0000)]
Fix build against GTK+ 2.0
https://bugs.webkit.org/show_bug.cgi?id=117895

Patch by Dominique Leuenberger <dimstar@opensuse.org> on 2013-07-10
Reviewed by Martin Robinson.

GTK2 build fails for undefined GDK_IS_X11_DISPLAY
GTK 2.0 does define GDK_WINDOWING_X11,but GDK_IS_X11_DISPLAY is not
present in GTK+ 2.0. A dummy defines is sufficient, as GTK 2.0 is not
that multiple backend aware anyway...

* platform/gtk/GtkVersioning.h: Define GDK_IS_X11_DISPLAY for GTK+ 2.0
  and compatibility for gtk_widget_get_preferred_size()
* plugins/gtk/gtk2xtbin.c: Include config.h

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

6 years agoDeferring layer flushes can cause painting without layout being done
timothy_horton@apple.com [Wed, 10 Jul 2013 21:15:56 +0000 (21:15 +0000)]
Deferring layer flushes can cause painting without layout being done
https://bugs.webkit.org/show_bug.cgi?id=118493

Reviewed by Simon Fraser.

r147797 added a mechanism for the TileController to inform RenderLayerCompositor
that it had performed an action (setNeedsDisplay, etc.) that would cause CoreAnimation
to call back into us to paint in this runloop, and that it shouldn't throttle the next
layer flush.

However, if tiles were created and left unparented (because the TileController was
out-of-window), when they are later parented, we failed to inform RenderLayerCompositor
that they were about to call back for painting, and so it would happily throttle the
next layer flush, and layout would be out of date, and garbage and corruption could result.

To resolve this, rework the logic surrounding parenting existing-but-unparented tiles
to ensure that they get added to the TileController's dirtyRect.

No new tests; the bug only reproduces under specific timing circumstances, and
manifests itself as an assertion failure or garbage on the screen, so it's quite
hard to make a workable test.

* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::revalidateTiles):
- Factor out the code to parent unparented tiles so that it is shared between the
    created-new-tile and reparenting-existing-tile cases.
- Keep track of whether we updated the frame of a pre-existing tile.
- If the tile is dirty and needed to be parented (because either it's new
    or hadn't been parented before), add it to the dirty rect list.
- If the tile changed size, add it to the dirty rect list.

(WebCore::TileController::ensureTilesForRect):
Ditto everything from revalidateTiles.

(WebCore::TileController::createTileLayer):
- Explicitly mark fresh tiles as needing display, so that we can depend on
    [WebTileLayer needsDisplay] in revalidateTiles to tell us that it's dirty.

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

6 years ago[Mac] every enabled text track should be listed in the track menu
eric.carlson@apple.com [Wed, 10 Jul 2013 21:03:26 +0000 (21:03 +0000)]
[Mac] every enabled text track should be listed in the track menu
https://bugs.webkit.org/show_bug.cgi?id=118477

Reviewed by Jer Noble.

Source/WebCore:

Test: media/video-controls-captions-trackmenu-includes-enabled-track.html

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Don't select the
    "Off" menu item if a track is enabled.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Always include a track
    that is showing in the menu. Add more diagnostic logging.

LayoutTests:

* media/trackmenu-test.js: Add some new utility functions.

* media/video-controls-captions-trackmenu-includes-enabled-track-expected.txt: Added.
* media/video-controls-captions-trackmenu-includes-enabled-track.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:

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

6 years agoRemove ElementTimeControl and expose SVGAnimationElement
ch.dumez@sisa.samsung.com [Wed, 10 Jul 2013 20:40:00 +0000 (20:40 +0000)]
Remove ElementTimeControl and expose SVGAnimationElement
https://bugs.webkit.org/show_bug.cgi?id=118349

Reviewed by Rob Buis.

Source/WebCore:

Remove ElementTimeControl IDL interface and move its attributes
to the SVGAnimationElement IDL interface as per the latest SVG2
specification:
https://svgwg.org/svg2-draft/animate.html#InterfaceSVGAnimationElement

Also remove [NoInterfaceObject] IDL extended attribute from
SVGAnimationElement as it is not present in the specification.

This is one step towards removing IDL multiple inheritance in SVG and
complying with the latest SVG2 specification.

No new tests, covered by existing test cases.

* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorObjC.pm:
* svg/ElementTimeControl.h: Removed.
* svg/ElementTimeControl.idl: Removed.
* svg/SVGAnimationElement.h:
* svg/SVGAnimationElement.idl:

LayoutTests:

Rebaseline several test cases now that SVGAnimationElement is exposed
on the global Window object.

* fast/js/global-constructors-attributes-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-expected.txt:
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:
* svg/custom/global-constructors-expected.txt:

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

6 years agoWeb Inspector: "Always enable" profiling does not work
commit-queue@webkit.org [Wed, 10 Jul 2013 20:31:41 +0000 (20:31 +0000)]
Web Inspector: "Always enable" profiling does not work
https://bugs.webkit.org/show_bug.cgi?id=118487

Enable profiler when loading panel if profiler is enabled in inspector
settings.

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-07-10
Reviewed by Timothy Hatcher.

* inspector/front-end/ProfilesPanel.js:

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

6 years agoHTMLPluginElement's state should be Playing before firing mouse click event.
roger_fong@apple.com [Wed, 10 Jul 2013 19:30:59 +0000 (19:30 +0000)]
HTMLPluginElement's state should be Playing before firing mouse click event.
https://bugs.webkit.org/show_bug.cgi?id=118398.
<rdar://problem/14262126>

Reviewed by Dean Jackson.

Test: plugins/snapshotting/plugin-receives-click-event.html

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
The defaultEventHandler returns early if the state is not Playing.
This is because we only want the plugin to deal with user interaction normally if the
plugin is actually enabled (not being snapshotted).
When we click on the snapshotted plugin to start it, we mimic what would happen to the plugin
normally by dispatching another click event on top of where we just clicked.
However, we were sending the click event before setting the state to Playing which meant that our
simulated click was not being handled.
We should be setting this state before sending the click, not after.
* platform/mac-wk2/plugins/snapshotting/plugin-receives-click-event-expected.txt: Added.
* plugins/snapshotting/plugin-receives-click-event.html: Added.

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

6 years agoFix a bug in MediaStreamDescriptor::removeVideoComponent
commit-queue@webkit.org [Wed, 10 Jul 2013 18:42:39 +0000 (18:42 +0000)]
Fix a bug in MediaStreamDescriptor::removeVideoComponent
https://bugs.webkit.org/show_bug.cgi?id=118446

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-07-10
Reviewed by Eric Carlson.

MediaStreamDescriptor::removeVideoComponent is currently trying to
remove the 'videoComponent' from the wrong vector.

* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeVideoComponent):

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

6 years agoSome Java plugin instances can deadlock with the WebProcess on NPP_Destroy.
beidson@apple.com [Wed, 10 Jul 2013 18:34:19 +0000 (18:34 +0000)]
Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy.
<rdar://problem/14286390> and https://bugs.webkit.org/show_bug.cgi?id=118535

Reviewed by Alexey Proskuryakov.

* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread.
(WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread.

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

6 years agoAX: Allow requesting the full plain text for an object with textUnderElement()
mario@webkit.org [Wed, 10 Jul 2013 16:20:24 +0000 (16:20 +0000)]
AX: Allow requesting the full plain text for an object with textUnderElement()
https://bugs.webkit.org/show_bug.cgi?id=105214

Reviewed by Chris Fleizach.

Source/WebCore:

Allow specifying different function modes for textUnderElement(),
so we can effectively ask for the "normal" result (e.g to retrieve
test to be exposed as the 'title') or for the full text under the
element (without omitting any child in the subtree). This is
needed for the implementation of atk_text_get_text() in GTK/EFL.

* accessibility/AccessibilityObject.h: Add new enumeration to
specify the different modes for textUnderElement().
(WebCore::AccessibilityObject::textUnderElement): Added parameter.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText): Always return
'true' when using the "include all children" mode.
(WebCore::AccessibilityNodeObject::textUnderElement): Updated call
to shouldUseAccessiblityObjectInnerText().
* accessibility/AccessibilityNodeObject.h:

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Removed
GTK specific code and expand the usage of text iterators beyond
text render objects, using it also when in the "include all
children" mode.
* accessibility/AccessibilityRenderObject.h:

* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::getLengthForTextRange): Updated
call to textUnderElement(), preserving the previous behavior.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Updated call to textUnderElement(),
using the "include all children" mode.

LayoutTests:

Removed tests that are not longer expected to fail.

* platform/gtk/TestExpectations: Removed tests.

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

6 years agoRemove some dead code from WebNSURLExtras _web_hostString
jberlin@webkit.org [Wed, 10 Jul 2013 15:52:47 +0000 (15:52 +0000)]
Remove some dead code from WebNSURLExtras _web_hostString
https://bugs.webkit.org/show_bug.cgi?id=118519

Reviewed by Anders Carlsson.

* Misc/WebNSURLExtras.mm:
(-[NSURL _web_hostString]):
NSString initWithData:encoding: does not throw an exception when passing nil for the data, so
just delete the code that wasn't being run.

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

6 years ago[Planet WebKit] Remove my website from the list of feeds
peter@chromium.org [Wed, 10 Jul 2013 14:38:34 +0000 (14:38 +0000)]
[Planet WebKit] Remove my website from the list of feeds
https://bugs.webkit.org/show_bug.cgi?id=118510

Reviewed by Andreas Kling.

With various awesome folks at Apple having taken over the Last
Week in WebKit series and my blog now featuring Last Week in
Blink, there's no reason for it to be included on the Planet
anymore.

* config.ini:

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

6 years agoRemove the meshType from CoordinatedCustomFilterOperation
commit-queue@webkit.org [Wed, 10 Jul 2013 13:57:06 +0000 (13:57 +0000)]
Remove the meshType from CoordinatedCustomFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=118529

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-07-10
Reviewed by Noam Rosenthal.

Following the removal of the meshType from CustomFilterOperation in r149153,
remove also the meshType from CoordinatedCustomFilterOperation.

No new tests, no new functionality.

Source/WebCore:

* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
(WebCore::CoordinatedCustomFilterOperation::create): Remove unused meshType parameter.
(WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation): Ditto.
 Ditto.

Source/WebKit2:

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode): Remove dead comment.
(CoreIPC::::decode): Remove meshType from CoordinatedCustomFilterOperation
call.

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

6 years ago[GTK] Unreviewed gardening. Update new baselines after r152494 and r152478
commit-queue@webkit.org [Wed, 10 Jul 2013 10:05:25 +0000 (10:05 +0000)]
[GTK] Unreviewed gardening. Update new baselines after r152494 and r152478
https://bugs.webkit.org/show_bug.cgi?id=118527

Unreviewed GTK gardening

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-10

* platform/gtk/editing/deleting/delete-br-002-expected.txt: Updated after r152478.
* platform/gtk/editing/execCommand/outdent-blockquote-test1-expected.txt: Removed to pick general one after r152494.
* platform/gtk/editing/execCommand/outdent-blockquote-test2-expected.txt: Ditto.
* platform/gtk/editing/execCommand/outdent-blockquote-test3-expected.txt: Ditto.
* platform/gtk/editing/execCommand/outdent-blockquote-test4-expected.txt: Ditto.
* platform/gtk/fast/events/remove-target-with-shadow-in-drag-expected.txt: Updated after r152494.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_xserver_redirect-expected.txt: Updated after r152494.

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

6 years agoAX: AccessibilityNodeObject::supportsRequiredAttribute() should switch on CellRole
commit-queue@webkit.org [Wed, 10 Jul 2013 08:57:30 +0000 (08:57 +0000)]
AX: AccessibilityNodeObject::supportsRequiredAttribute() should switch on CellRole
https://bugs.webkit.org/show_bug.cgi?id=117817

Patch by James Craig <james@cookiecrook.com> on 2013-07-10
Reviewed by Chris Fleizach.

Source/WebCore:

CellRole supports the required attribute now for accessibility, according to ARIA spec.
Updated existing test coverage.

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

LayoutTests:

CellRole supports the required attribute now for accessibility, according to ARIA spec.

* platform/mac/accessibility/table-attributes-expected.txt:
* platform/mac/accessibility/table-cell-spans-expected.txt:
* platform/mac/accessibility/table-cells-expected.txt:
* platform/mac/accessibility/table-sections-expected.txt:

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

6 years agoREGRESSION(r151957): WebGL textures do not show
ossy@webkit.org [Wed, 10 Jul 2013 08:46:19 +0000 (08:46 +0000)]
REGRESSION(r151957): WebGL textures do not show
https://bugs.webkit.org/show_bug.cgi?id=118464

Reviewed by Christophe Dumez.

After r151957 decoder.frameIsCompleteAtIndex(0) doesn't trigger image decoding,
we have to call decoder.createFrameAtIndex(0) explicitly to ensure it.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):

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

6 years ago[GTK] WebKitTestRunner tries to remove an already deleted event in EventSenderProxy...
commit-queue@webkit.org [Wed, 10 Jul 2013 08:41:14 +0000 (08:41 +0000)]
[GTK] WebKitTestRunner tries to remove an already deleted event in EventSenderProxy::replaySavedEvents
https://bugs.webkit.org/show_bug.cgi?id=118509

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-10
Reviewed by Martin Robinson.

In EventSenderProxy::replaySavedEvents WebKitTestRunner can crash
when trying to remove an event already removed, if another event is
processed in the middle. By using a Deque's takeFirst, we ensure the
element is removed before we dispatch it.

fast/events/mousedown-inside-dragstart-should-not-cause-crash.html no longer
crashes after this fix is added.

* WebKitTestRunner/EventSenderProxy.h: Use a Deque instead of Vector in GTK
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::replaySavedEvents): Use takeFirst to retrieve the event
from the queue.

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

6 years agoWorkaround for x86 optimizer bug in MSVC 2012.
michael.bruning@digia.com [Wed, 10 Jul 2013 08:36:13 +0000 (08:36 +0000)]
Workaround for x86 optimizer bug in MSVC 2012.
https://bugs.webkit.org/show_bug.cgi?id=118478

Reviewed by Benjamin Poulain.

This is a workaround for a bug in the x86 MSVC 2012 optimizer.

The problem is that the range comparison gets optimized out when
the templated inline function toASCIIUpper. Copying the methods
content fixes the problem.

This is unfortunately not the nicest fix, but the alternative would
be to turn off optimization for StringImpl::upper on the x86 MSVC 2012
build, which might impact overall performance negatively.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::upper):

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

6 years ago[Qt] Unreviewed gardening.
kadam@inf.u-szeged.hu [Wed, 10 Jul 2013 08:13:15 +0000 (08:13 +0000)]
[Qt] Unreviewed gardening.
Remove platform specific expetations after r152494 because the generic is good for Qt.

* platform/qt/editing/execCommand/outdent-blockquote-test1-expected.txt: Removed after r152494.
* platform/qt/editing/execCommand/outdent-blockquote-test2-expected.txt: Removed after r152494.
* platform/qt/editing/execCommand/outdent-blockquote-test3-expected.txt: Removed after r152494.
* platform/qt/editing/execCommand/outdent-blockquote-test4-expected.txt: Removed after r152494.

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

6 years agoChange recently ratified extensions prefixes from WEBKIT_WEBGL_ to WEBGL_
commit-queue@webkit.org [Wed, 10 Jul 2013 07:41:42 +0000 (07:41 +0000)]
Change recently ratified extensions prefixes from WEBKIT_WEBGL_ to WEBGL_
https://bugs.webkit.org/show_bug.cgi?id=117786

Patch by Karol Ĺšwiniarski <k.swiniarsk2@samsung.com> on 2013-07-10
Reviewed by Dean Jackson.

According to WebGL's revision 10, extensions should be named: WEBGL_lose_context,
WEBGL_depth_texture, WEBGL_compressed_texture_s3tc.

No new tests. Covered by existing tests:
LayoutTests/webgl/conformance/extensions/get-extension.html
LayoutTests/webgl/conformance/context/context-lost.html
LayoutTests/webgl/conformance/extensions/webgl-depth-texture.html
LayoutTests/webgl/conformance/extensions/webgl-compressed-texture-s3tc.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

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

6 years agoUnreviewed build fix.
bw80.lee@samsung.com [Wed, 10 Jul 2013 06:55:46 +0000 (06:55 +0000)]
Unreviewed build fix.

* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):

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

6 years ago[EFL] tooltip callback doesn't work.
bw80.lee@samsung.com [Wed, 10 Jul 2013 06:10:15 +0000 (06:10 +0000)]
[EFL] tooltip callback doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=118522

Reviewed by Christophe Dumez.

Add missing code to connect didChangeTooltip callback.

* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::ViewClientEfl):

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

6 years agoIntroduce isSVGFontElement() and isSVGImageElement(), use them
gyuyoung.kim@samsung.com [Wed, 10 Jul 2013 05:31:50 +0000 (05:31 +0000)]
Introduce isSVGFontElement() and isSVGImageElement(), use them
https://bugs.webkit.org/show_bug.cgi?id=118504

Reviewed by Benjamin Poulain.

Let's use isFoo() to enhance readibility in svg element classes along with html's.

No new tests, there is no behavior changes.

* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::getSVGFontById):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteImageURL):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGElement.cpp:
(WebCore::SVGElement::viewportElement):
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontElement.h:
(WebCore::toSVGFontElement):
(WebCore::isSVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::associatedFontElement):
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGImageElement.h:
(WebCore::toSVGImageElement):
(WebCore::isSVGImageElement):
* svg/SVGLocatable.cpp:
(WebCore::isViewportElement):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):

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

6 years ago[EFL] Add ewk_view_device_pixel_ratio_set
ryuan.choi@samsung.com [Wed, 10 Jul 2013 03:32:35 +0000 (03:32 +0000)]
[EFL] Add ewk_view_device_pixel_ratio_set
https://bugs.webkit.org/show_bug.cgi?id=118521

Reviewed by Gyuyoung Kim.

Source/WebCore:

No new tests, covered by existing tests.

* dom/ViewportArguments.cpp: Remove PLATFORM(EFL) not to use deprecatedTargetDPI
* dom/ViewportArguments.h: Ditto.
* platform/efl/EflScreenUtilities.cpp: Removed getDPI() which is not used anymore.
* platform/efl/EflScreenUtilities.h: Ditto.

Source/WebKit/efl:

ewebkit and ewebkit2 have different approach about getting device pixel ratio.
ewebkit depends on deprecatedTargetDPI and ecore_x_dpi_get,
but ewebkit2 use Page::deviceScaleFactor.

This patch will add ewk_view_device_pixel_ratio_set and use Page::deviceScaleFactor()
instead of ViewportArguments::deprecatedTargetDPI like ewebkit2.

* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
(_ewk_view_viewport_attributes_compute): Use Page::deviceScaleFactor().
(ewk_view_viewport_attributes_get): Ditto.
(ewk_view_device_pixel_ratio_set): Added.
(ewk_view_device_pixel_ratio_get):
* ewk/ewk_view.h:
Update document of ewk_view_device_pixel_ratio_get (from ewebkit2) and
added ewk_view_device_pixel_ratio_set.

Tools:

* EWebLauncher/main.c: Added new option(-r) to test device pixel ratio.
(windowCreate):
(parseUserArguments):

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

6 years ago@readonly and @aria-readonly="false" are not exposed correctly to accessibility
commit-queue@webkit.org [Wed, 10 Jul 2013 00:39:45 +0000 (00:39 +0000)]
@readonly and @aria-readonly="false" are not exposed correctly to accessibility
https://bugs.webkit.org/show_bug.cgi?id=118475

Patch by James Craig <james@cookiecrook.com> on 2013-07-09
Reviewed by Chris Fleizach.

Source/WebCore:

Account for implicit and explicit @readonly/@aria-readonly mismatches. Updated existing test coverage.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetValueAttribute):

LayoutTests:

Updated existing test to account for implicit and explicit @readonly/@aria-readonly mismatches.

* accessibility/aria-readonly-expected.txt:
* accessibility/aria-readonly.html:

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

6 years agoUnreviewed change of my email addresses.
commit-queue@webkit.org [Tue, 9 Jul 2013 23:18:55 +0000 (23:18 +0000)]
Unreviewed change of my email addresses.
https://bugs.webkit.org/show_bug.cgi?id=100122

Patch by Bruno de Oliveira Abinader <brunoabinader@gmail.com> on 2013-07-09

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

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

6 years agoReviewed by Simon Fraser.
jer.noble@apple.com [Tue, 9 Jul 2013 22:58:45 +0000 (22:58 +0000)]
Reviewed by Simon Fraser.

Source/WebCore:

Remember the scroll position and restore after exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61956

No new tests, adds a client callback used by WebKit and WebKit2 win.

* platform/graphics/win/FullScreenController.cpp:
(FullScreenController::enterFullScreen):
(FullScreenController::exitFullScreen):
* platform/graphics/win/FullScreenControllerClient.h:

Source/WebKit/mac:

Remember the scroll position and restore after exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61956
<rdar://problem/9544461>

Call into the main FrameView to save the scroll position before swapping the
WebView into the full-screen window, and restore the scroll position after
swapping the WebView back into the browser window.

* WebView/WebFullScreenController.h:
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController windowDidEnterFullscreen:]): Save the scroll position.
(-[WebFullScreenController exitFullscreen]): Restore the scroll position.

Source/WebKit/win:

Remember the scroll position and restore after exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61956

Add support for two new FullScreenClient callbacks for saving and restoring the
scroll position of the full-screen frame.

* WebView.cpp:
(WebView::fullScreenClientSaveScrollPosition):
(WebView::fullScreenClientRestoreScrollPosition):
* WebView.h:

Source/WebKit2:

Remember the scroll position and restore after exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61956
<rdar://problem/9544461>

Call into the main FrameView to save the scroll position before swapping the
WebView into the full-screen window, and restore the scroll position after
swapping the WebView back into the browser window.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController beganExitFullScreenAnimation]):

In WebKit2, this requires some communication between the WebProcess and the
UIProcess, so add two new messages to WebFullScreenManager to be called by
its proxy.

* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::saveScrollPosition):
(WebKit::WebFullScreenManagerProxy::restoreScrollPosition):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/FullScreen/WebFullScreenManager.messages.in:
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::saveScrollPosition):
(WebKit::WebFullScreenManager::restoreScrollPosition):

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

6 years agoAuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate in WebCore...
jeffm@apple.com [Tue, 9 Jul 2013 21:00:26 +0000 (21:00 +0000)]
AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate in WebCore::mac()
https://bugs.webkit.org/show_bug.cgi?id=118518

Reviewed by Alexey Proskuryakov.

* platform/network/mac/AuthenticationMac.mm:
(WebCore::mac):
Map ProtectionSpaceAuthenticationSchemeNegotiate to NSURLAuthenticationMethodNegotiate.

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

6 years agoAuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate
jeffm@apple.com [Tue, 9 Jul 2013 20:17:41 +0000 (20:17 +0000)]
AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate
https://bugs.webkit.org/show_bug.cgi?id=118517

Reviewed by Brady Eidson.

* platform/network/mac/AuthenticationMac.mm:
(WebCore::core):
Map "NSURLAuthenticationMethodNegotiate" to ProtectionSpaceAuthenticationSchemeNegotiate.

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

6 years agoDumpRenderTree should stop sending unsupported URLs to NSWorkspace
andersca@apple.com [Tue, 9 Jul 2013 17:48:01 +0000 (17:48 +0000)]
DumpRenderTree should stop sending unsupported URLs to NSWorkspace
https://bugs.webkit.org/show_bug.cgi?id=118514
<rdar://problem/13686836>

Reviewed by Sam Weinig.

Add a new default policy delegate and override decidePolicyForNavigationAction: to not pass unhandled URLs to NSWorkspace.

* DumpRenderTree/DefaultPolicyDelegate.h: Added.
* DumpRenderTree/DefaultPolicyDelegate.m: Added.
(-[DefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Add DefaultPolicyDelegate.h and DefaultPolicyDelegate.m.

* DumpRenderTree/mac/DumpRenderTree.mm:
(allocateGlobalControllers):
Allocate a DefaultPolicyDelegate object.

(resetWebViewToConsistentStateBeforeTesting):
Set the policy delegate to the default policy delegate.

* DumpRenderTree/mac/DumpRenderTreeMac.h:
Declare the defaultPolicyDelegate object.

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setCustomPolicyDelegate):
Set the policy delegate to the default delegate if setDelegate is false.

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

6 years agoGardening to unbreak builds on the Windows bot.
mark.lam@apple.com [Tue, 9 Jul 2013 17:34:51 +0000 (17:34 +0000)]
Gardening to unbreak builds on the Windows bot.

Not reviewed.

* parser/ParserTokens.h:

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

6 years agoPrettyPatch doesn't handle UTF-8 characters correctly
mrobinson@webkit.org [Tue, 9 Jul 2013 17:30:13 +0000 (17:30 +0000)]
PrettyPatch doesn't handle UTF-8 characters correctly
https://bugs.webkit.org/show_bug.cgi?id=45760

Reviewed by Adam Roben.

* PrettyPatch/PrettyPatch.rb: Since the diff lines are typically in UTF-8 and the results
of PrettyPatch may be served by a web server or not (for instance when accessed via
webkit-patch pretty-diff), we should use a meta tag to force the page encoding to UTF-8.

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

6 years ago[Windows] Compile fix.
commit-queue@webkit.org [Tue, 9 Jul 2013 16:22:29 +0000 (16:22 +0000)]
[Windows] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=106558

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-07-09
Reviewed by Brent Fulgham.

On Windows, dispatch.h needs to be included before certain CFNetwork headers.

* WebCorePrefix.h: Include dispatch.h.

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

6 years agoFix 30% JSBench regression (caused by adding column numbers to stack traces).
mark.lam@apple.com [Tue, 9 Jul 2013 16:15:12 +0000 (16:15 +0000)]
Fix 30% JSBench regression (caused by adding column numbers to stack traces).
https://bugs.webkit.org/show_bug.cgi?id=118481.

Reviewed by Mark Hahnenberg and Geoffrey Garen.

Source/JavaScriptCore:

Previously, we already capture ExpressionRangeInfo that provides a divot for
each bytecode that can potentially throw an exception (and therefore generate
a stack trace). On first attempt to compute column numbers, we then do a walk
of the source string to record all line start positions in a table associated
with the SourceProvider. The column number can then be computed as
    divot - lineStartFor(bytecodeOffset).

The computation of this lineStarts table is the source of the 30% JSBench
performance regression.

The new code now records lineStarts as the lexer and parser scans the source
code. These lineStarts are then used to compute the column number for the
given divot, and stored in the ExpressionRangeInfo. Similarly, we also capture
the line number at the divot point and store that in the ExpressionRangeInfo.
Hence, to look up line and column numbers, we now lookup the ExpressionRangeInfo
for the bytecodeOffset, and then compute the line and column from the values
stored in the expression info.

The strategy:
1. We want to minimize perturbations to the lexer and parser. Specifically,
   the changes added should not change how it scans code, and generate bytecode.
2. We regard the divot as the source character position we are interested
   in. As such, we'll capture line and lineStart (for column) at the point
   when we capture the divot information. This ensures that the 3 values are
   consistent.

How the change is done:
1. Change the lexer to track lineStarts.
2. Change the parser to capture line and lineStarts at the point of capturing
   divots.
3. Change the parser and associated code to plumb these values all the way to
   the point that the correspoinding ExpressionRangeInfo is emitted.
4. Propagate and record SourceCode firstLine and firstLineColumnOffset to the
   the necessary places so that we can add them as needed when reifying
   UnlinkedCodeBlocks into CodeBlocks.
5. Compress the line and column number values in the ExpressionRangeInfo. In
   practice, we seldom have both large line and column numbers. Hence, we can
   encode both in an uint32_t most of the time. For the times when we encounter
   both large line and column numbers, we have a fallback to store the "fat"
   position info.
6. Emit an ExpressionRangeInfo for UnaryOp nodes to get more line and column
   number coverage.
7. Change the interpreter to use the new way of computing line and column.
8. Delete old line and column computation code that is now unused.

Misc details:
- the old lexer was tracking both a startOffset and charPosition where
  charPosition equals startOffset - SourceCode.startOffset. We now use
  startOffset exclusively throughout the system for consistency.
  All offset values (including lineStart) are relative to the start of the
  SourceProvider string. These values will only be converted to be relative
  to the SourceCode.startOffset at the very last minute i.e. when the divot
  is stored into the ExpressionRangeInfo.

  This change to use the same offset system everywhere reduces confusion
  from having to convert back and forth between the 2 systems. It also
  enables a lot of assertions to be used.

- Also fixed some bugs in the choice of divot positions to use. For example,
  both Eval and Function expressions previously used column numbers from
  the start of the expression but used the line number at the end of the
  expression. This is now fixed to use either the start or end positions
  as appropriate, but not a mix of line and columns from both.

- Why use ints instead of unsigneds for offsets and lineStarts inside the
  lexer and parser?
  Some tests (e.g. fast/js/call-base-resolution.html and
  fast/js/eval-cross-window.html) has shown that lineStart offsets can be
  prior to the SourceCode.startOffset. Keeping the lexer offsets as ints
  simplifies computations and makes it easier to maintain the assertions
  that (startOffset >= lineStartOffset).

  However, column and line numbers are always unsigned when we publish
  them to the ExpressionRangeInfo. The ints are only used inside the
  lexer and parser ... well, and bytecode generator.

- For all cases, lineStart is always captured where the divot is captured.
  However, some sputnik conformance tests have shown that we cannot honor
  line breaks for assignment statements like the following:

      eval("x\u000A*=\u000A-1;");

  In this case, the lineStart is expected to be captured at the start of
  the assignment expression instead of at the divot point in the middle.
  The assignment expression is the only special case for this.

This patch has been tested against the full layout tests both with release
and debug builds with no regression.

* API/JSContextRef.cpp:
(JSContextCreateBacktrace):
  - Updated to use the new StackFrame::computeLineAndColumn().
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
  - Added m_firstLineColumnOffset initialization.
  - Plumbed the firstLineColumnOffset into the SourceCode.
  - Initialized column for op_debug using the new way.
(JSC::CodeBlock::lineNumberForBytecodeOffset):
  - Changed to compute line number using the ExpressionRangeInfo.
(JSC::CodeBlock::columnNumberForBytecodeOffset): Added
  - Changed to compute column number using the ExpressionRangeInfo.
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::firstLineColumnOffset):
(JSC::GlobalCodeBlock::GlobalCodeBlock):
  - Plumbed firstLineColumnOffset through to the super class.
(JSC::ProgramCodeBlock::ProgramCodeBlock):
  - Plumbed firstLineColumnOffset through to the super class.
(JSC::EvalCodeBlock::EvalCodeBlock):
  - Plumbed firstLineColumnOffset through to the super class.
    But for EvalCodeBlocks, the firstLineColumnOffset is always 1
    because we're starting with a new source string with no start
    offset.
(JSC::FunctionCodeBlock::FunctionCodeBlock):
  - Plumbed firstLineColumnOffset through to the super class.

* bytecode/ExpressionRangeInfo.h:
  - Added modes for encoding line and column into a single 30-bit
    unsigned. The encoding is in 1 of 3 modes:
    1. FatLineMode: 22-bit line, 8-bit column
    2. FatColumnMode: 8-bit line, 22-bit column
    3. FatLineAndColumnMode: 32-bit line, 32-bit column
(JSC::ExpressionRangeInfo::encodeFatLineMode): Added.
  - Encodes line and column into the 30-bit position using FatLine mode.
(JSC::ExpressionRangeInfo::encodeFatColumnMode): Added.
  - Encodes line and column into the 30-bit position using FatColumn mode.
(JSC::ExpressionRangeInfo::decodeFatLineMode): Added.
  - Decodes the FatLine mode 30-bit position into line and column.
(JSC::ExpressionRangeInfo::decodeFatColumnMode): Added.
  - Decodes the FatColumn mode 30-bit position into line and column.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
  - Plumbed startColumn through.
(JSC::UnlinkedFunctionExecutable::link):
  - Plumbed startColumn through.
(JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset):
  - Computes a line number using the new way.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
  - Added decoding of line and column.
  - Added handling of the case when we do not find a fitting expression
    range info for a specified bytecodeOffset. This only happens if the
    bytecodeOffset is below the first expression range info. In that
    case, we'll use the first expression range info entry.
(JSC::UnlinkedCodeBlock::addExpressionInfo):
  - Added encoding of line and column.

* bytecode/UnlinkedCodeBlock.h:
  - Added m_expressionInfoFatPositions in RareData.
(JSC::UnlinkedFunctionExecutable::functionStartColumn):
(JSC::UnlinkedCodeBlock::shrinkToFit):
  - Removed obsoleted m_lineInfo.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCall): Plumbed line and lineStart through.
(JSC::BytecodeGenerator::emitCallEval): Plumbed line and lineStart through.
(JSC::BytecodeGenerator::emitCallVarargs): Plumbed line and lineStart through.
(JSC::BytecodeGenerator::emitConstruct): Plumbed line and lineStart through.
(JSC::BytecodeGenerator::emitDebugHook): Plumbed lineStart through.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInConditionContext):
  - Removed obsoleted m_lineInfo.
(JSC::BytecodeGenerator::emitExpressionInfo):
  - Plumbed line and lineStart through.
  - Compute the line and column to be added to the expression range info.
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowReferenceError):
(JSC::ResolveNode::emitBytecode):
(JSC::ArrayNode::toArgumentList):
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::NewExprNode::emitBytecode):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::PostfixNode::emitResolve):
(JSC::PostfixNode::emitBracket):
(JSC::PostfixNode::emitDot):
(JSC::DeleteResolveNode::emitBytecode):
(JSC::DeleteBracketNode::emitBytecode):
(JSC::DeleteDotNode::emitBytecode):
(JSC::PrefixNode::emitResolve):
(JSC::PrefixNode::emitBracket):
(JSC::PrefixNode::emitDot):
  - Plumbed line and lineStart through the above as needed.

(JSC::UnaryOpNode::emitBytecode):
  - Added emission of an ExpressionRangeInfo for the UnaryOp node.

(JSC::BinaryOpNode::emitStrcat):
(JSC::ThrowableBinaryOpNode::emitBytecode):
(JSC::InstanceOfNode::emitBytecode):
(JSC::emitReadModifyAssignment):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::AssignDotNode::emitBytecode):
(JSC::ReadModifyDotNode::emitBytecode):
(JSC::AssignBracketNode::emitBytecode):
(JSC::ReadModifyBracketNode::emitBytecode):
  - Plumbed line and lineStart through the above as needed.

(JSC::ConstStatementNode::emitBytecode):
(JSC::EmptyStatementNode::emitBytecode):
(JSC::DebuggerStatementNode::emitBytecode):
(JSC::ExprStatementNode::emitBytecode):
(JSC::VarStatementNode::emitBytecode):
(JSC::IfElseNode::emitBytecode):
(JSC::DoWhileNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::LabelNode::emitBytecode):
(JSC::ThrowNode::emitBytecode):
(JSC::TryNode::emitBytecode):
(JSC::ProgramNode::emitBytecode):
(JSC::EvalNode::emitBytecode):
(JSC::FunctionBodyNode::emitBytecode):
  - Plumbed line and lineStart through the above as needed.

* interpreter/Interpreter.cpp:
(JSC::appendSourceToError):
  - Added line and column arguments for expressionRangeForBytecodeOffset().
(JSC::StackFrame::computeLineAndColumn):
  - Replaces StackFrame::line() and StackFrame::column().
(JSC::StackFrame::expressionInfo):
  - Added line and column arguments.
(JSC::StackFrame::toString):
  - Changed to use the new StackFrame::computeLineAndColumn().
(JSC::Interpreter::getStackTrace):
  - Added the needed firstLineColumnOffset arg for the StackFrame.

* interpreter/Interpreter.h:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
(JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::createBracketAccess):
(JSC::ASTBuilder::createDotAccess):
(JSC::ASTBuilder::createRegExp):
(JSC::ASTBuilder::createNewExpr):
(JSC::ASTBuilder::createAssignResolve):
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::createBlockStatement):
(JSC::ASTBuilder::createExprStatement):
(JSC::ASTBuilder::createIfStatement):
(JSC::ASTBuilder::createForLoop):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createVarStatement):
(JSC::ASTBuilder::createReturnStatement):
(JSC::ASTBuilder::createBreakStatement):
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::createSwitchStatement):
(JSC::ASTBuilder::createWhileStatement):
(JSC::ASTBuilder::createDoWhileStatement):
(JSC::ASTBuilder::createLabelStatement):
(JSC::ASTBuilder::createWithStatement):
(JSC::ASTBuilder::createThrowStatement):
(JSC::ASTBuilder::createDebugger):
(JSC::ASTBuilder::createConstStatement):
(JSC::ASTBuilder::appendBinaryExpressionInfo):
(JSC::ASTBuilder::appendUnaryToken):
(JSC::ASTBuilder::unaryTokenStackLastStart):
(JSC::ASTBuilder::unaryTokenStackLastLineStartPosition): Added.
(JSC::ASTBuilder::assignmentStackAppend):
(JSC::ASTBuilder::createAssignment):
(JSC::ASTBuilder::setExceptionLocation):
(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeFunctionCallNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::makeAssignNode):
(JSC::ASTBuilder::makePrefixNode):
(JSC::ASTBuilder::makePostfixNode):.
  - Plumbed line, lineStart, and startColumn through the above as needed.

* parser/Lexer.cpp:
(JSC::::currentSourcePtr):
(JSC::::setCode):
  - Added tracking for sourceoffset and lineStart.
(JSC::::internalShift):
(JSC::::parseIdentifier):
  - Added tracking for lineStart.
(JSC::::parseIdentifierSlowCase):
(JSC::::parseString):
  - Added tracking for lineStart.
(JSC::::parseStringSlowCase):
(JSC::::lex):
  - Added tracking for sourceoffset.
(JSC::::sourceCode):
* parser/Lexer.h:
(JSC::Lexer::currentOffset):
(JSC::Lexer::currentLineStartOffset):
(JSC::Lexer::setOffset):
  - Added tracking for lineStart.
(JSC::Lexer::offsetFromSourcePtr): Added. conversion function.
(JSC::Lexer::sourcePtrFromOffset): Added. conversion function.
(JSC::Lexer::setOffsetFromSourcePtr):
(JSC::::lexExpectIdentifier):
  - Added tracking for sourceoffset and lineStart.

* parser/NodeConstructors.h:
(JSC::Node::Node):
(JSC::ResolveNode::ResolveNode):
(JSC::EvalFunctionCallNode::EvalFunctionCallNode):
(JSC::FunctionCallValueNode::FunctionCallValueNode):
(JSC::FunctionCallResolveNode::FunctionCallResolveNode):
(JSC::FunctionCallBracketNode::FunctionCallBracketNode):
(JSC::FunctionCallDotNode::FunctionCallDotNode):
(JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
(JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
(JSC::PostfixNode::PostfixNode):
(JSC::DeleteResolveNode::DeleteResolveNode):
(JSC::DeleteBracketNode::DeleteBracketNode):
(JSC::DeleteDotNode::DeleteDotNode):
(JSC::PrefixNode::PrefixNode):
(JSC::ReadModifyResolveNode::ReadModifyResolveNode):
(JSC::ReadModifyBracketNode::ReadModifyBracketNode):
(JSC::AssignBracketNode::AssignBracketNode):
(JSC::AssignDotNode::AssignDotNode):
(JSC::ReadModifyDotNode::ReadModifyDotNode):
(JSC::AssignErrorNode::AssignErrorNode):
(JSC::WithNode::WithNode):
(JSC::ForInNode::ForInNode):
  - Plumbed line and lineStart through the above as needed.
* parser/Nodes.cpp:
(JSC::StatementNode::setLoc): Plumbed lineStart.
(JSC::ScopeNode::ScopeNode): Plumbed lineStart.
(JSC::ProgramNode::ProgramNode): Plumbed startColumn.
(JSC::ProgramNode::create): Plumbed startColumn.
(JSC::EvalNode::create):
(JSC::FunctionBodyNode::FunctionBodyNode): Plumbed startColumn.
(JSC::FunctionBodyNode::create): Plumbed startColumn.
* parser/Nodes.h:
(JSC::Node::startOffset):
(JSC::Node::lineStartOffset): Added.
(JSC::StatementNode::firstLine):
(JSC::StatementNode::lastLine):
(JSC::ThrowableExpressionData::ThrowableExpressionData):
(JSC::ThrowableExpressionData::setExceptionSourceCode):
(JSC::ThrowableExpressionData::divotStartOffset):
(JSC::ThrowableExpressionData::divotEndOffset):
(JSC::ThrowableExpressionData::divotLine):
(JSC::ThrowableExpressionData::divotLineStart):
(JSC::ThrowableSubExpressionData::ThrowableSubExpressionData):
(JSC::ThrowableSubExpressionData::setSubexpressionInfo):
(JSC::ThrowableSubExpressionData::subexpressionDivot):
(JSC::ThrowableSubExpressionData::subexpressionStartOffset):
(JSC::ThrowableSubExpressionData::subexpressionEndOffset):
(JSC::ThrowableSubExpressionData::subexpressionLine):
(JSC::ThrowableSubExpressionData::subexpressionLineStart):
(JSC::ThrowablePrefixedSubExpressionData::ThrowablePrefixedSubExpressionData):
(JSC::ThrowablePrefixedSubExpressionData::setSubexpressionInfo):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionDivot):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionStartOffset):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionEndOffset):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionLine):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionLineStart):
(JSC::ScopeNode::startStartOffset):
(JSC::ScopeNode::startLineStartOffset):
(JSC::ProgramNode::startColumn):
(JSC::EvalNode::startColumn):
(JSC::FunctionBodyNode::startColumn):
  - Plumbed line and lineStart through the above as needed.
* parser/Parser.cpp:
(JSC::::Parser):
(JSC::::parseSourceElements):
(JSC::::parseVarDeclarationList):
(JSC::::parseConstDeclarationList):
(JSC::::parseForStatement):
(JSC::::parseBreakStatement):
(JSC::::parseContinueStatement):
(JSC::::parseReturnStatement):
(JSC::::parseThrowStatement):
(JSC::::parseWithStatement):
  - Plumbed line and lineStart through the above as needed.
(JSC::::parseFunctionBody):
  - Plumbed startColumn.
(JSC::::parseFunctionInfo):
(JSC::::parseFunctionDeclaration):
(JSC::LabelInfo::LabelInfo):
(JSC::::parseExpressionOrLabelStatement):
(JSC::::parseAssignmentExpression):
(JSC::::parseBinaryExpression):
(JSC::::parseProperty):
(JSC::::parseObjectLiteral):
(JSC::::parsePrimaryExpression):
(JSC::::parseMemberExpression):
(JSC::::parseUnaryExpression):
  - Plumbed line, lineStart, startColumn through the above as needed.
* parser/Parser.h:
(JSC::Parser::next):
(JSC::Parser::nextExpectIdentifier):
(JSC::Parser::tokenStart):
(JSC::Parser::tokenColumn):
(JSC::Parser::tokenEnd):
(JSC::Parser::tokenLineStart):
(JSC::Parser::lastTokenLine):
(JSC::Parser::lastTokenLineStart):
(JSC::::parse):
* parser/ParserTokens.h:
(JSC::JSTokenLocation::JSTokenLocation):
  - Plumbed lineStart.
(JSC::JSTokenLocation::lineStartPosition):
(JSC::JSTokenLocation::startPosition):
(JSC::JSTokenLocation::endPosition):
* parser/SourceCode.h:
(JSC::SourceCode::SourceCode):
(JSC::SourceCode::startColumn):
(JSC::makeSource):
(JSC::SourceCode::subExpression):
* parser/SourceProvider.cpp: delete old code.
* parser/SourceProvider.h: delete old code.
* parser/SourceProviderCacheItem.h:
(JSC::SourceProviderCacheItem::closeBraceToken):
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):
  - Plumbed lineStart.
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegExp):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFunctionBody):
(JSC::SyntaxChecker::createFuncDeclStatement):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::createReturnStatement):
(JSC::SyntaxChecker::createBreakStatement):
(JSC::SyntaxChecker::createContinueStatement):
(JSC::SyntaxChecker::createWithStatement):
(JSC::SyntaxChecker::createLabelStatement):
(JSC::SyntaxChecker::createThrowStatement):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
  - Made SyntaxChecker prototype changes to match ASTBuilder due to new
    args added for plumbing line, lineStart, and startColumn.
* runtime/CodeCache.cpp:
(JSC::CodeCache::generateBytecode):
(JSC::CodeCache::getCodeBlock):
  - Plumbed startColumn.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::produceCodeBlockFor):
(JSC::FunctionExecutable::fromGlobalCode):
  - Plumbed startColumn.
* runtime/Executable.h:
(JSC::ScriptExecutable::startColumn):
(JSC::ScriptExecutable::recordParse):
(JSC::FunctionExecutable::create):
  - Plumbed startColumn.

Source/WebCore:

Test: fast/js/line-column-numbers.html

Updated the bindings to use StackFrame::computeLineAndColumn(). The old
StackFrame::line() and StackFrame::column() has been removed. The new
algorithm always computes the 2 values together anyway. Hence it is more
efficient to return them as a pair instead of doing the same computation
twice for each half of the result.

* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
(WebCore::createScriptCallStackFromException):
* bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):

LayoutTests:

The fix now computes line and column numbers more accurately. As a result,
some of the test results need to be re-baselined. Among other fixes, one
major source of difference is that the old code was incorrectly computing
0-based column numbers. This has now been fixed to be 1-based.
Note: line numbers were always 1-based.

Also added a new test: fast/js/line-column-numbers.html, which tests line
and column numbers for source code in various configurations.

* editing/execCommand/outdent-blockquote-test1-expected.txt:
* editing/execCommand/outdent-blockquote-test2-expected.txt:
* editing/execCommand/outdent-blockquote-test3-expected.txt:
* editing/execCommand/outdent-blockquote-test4-expected.txt:
* editing/pasteboard/copy-paste-float-expected.txt:
* editing/pasteboard/paste-blockquote-before-blockquote-expected.txt:
* editing/pasteboard/paste-double-nested-blockquote-before-blockquote-expected.txt:
* fast/dom/Window/window-resize-contents-expected.txt:
* fast/events/remove-target-with-shadow-in-drag-expected.txt:
* fast/js/line-column-numbers-expected.txt: Added.
* fast/js/line-column-numbers.html: Added.
* fast/js/script-tests/line-column-numbers.js: Added.
(try.doThrow4b):
(doThrow5b.try.innerFunc):
(doThrow5b):
(doThrow6b.try.innerFunc):
(doThrow6b):
(catch):
(try.doThrow11b):
(try.doThrow14b):
* fast/js/stack-trace-expected.txt:
* inspector/console/console-url-line-column-expected.txt:

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

6 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Tue, 9 Jul 2013 15:58:21 +0000 (15:58 +0000)]
[Qt] Unreviewed gardening.

* platform/qt-mac/TestExpectations: Skip failing test after r151546.

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

6 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Tue, 9 Jul 2013 13:38:16 +0000 (13:38 +0000)]
[Qt] Unreviewed gardening.

* platform/qt-5.0-wk2/TestExpectations: Skip flaky svg tests.
* platform/qt-mac/TestExpectations: Skip failing CSS Shape tests.

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

6 years agoUse toSVGFontElement() instead of static_cast<SVGFontElement*>
gyuyoung.kim@samsung.com [Tue, 9 Jul 2013 11:31:14 +0000 (11:31 +0000)]
Use toSVGFontElement() instead of static_cast<SVGFontElement*>
https://bugs.webkit.org/show_bug.cgi?id=118496

Reviewed by Andreas Kling.

As a step to change static_cast with toXXX, static_cast<SVGFontElement*> can
be changed with toSVGFontElement().

Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153761

* svg/SVGFontElement.h:
(WebCore::toSVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):

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

6 years agoRemove support for [PassThisToCallback] extended attribute
ch.dumez@sisa.samsung.com [Tue, 9 Jul 2013 10:56:00 +0000 (10:56 +0000)]
Remove support for [PassThisToCallback] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=118391

Reviewed by Kentaro Hara.

The [PassThisToCallback] Webkit-specific IDL extended attribute is supported
by the JSC bindings generator but is no longer used. The attribute is not
even documented.

We can therefore drop support for this from the generator to simplify the
code.

No new tests, no behavior change.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/TestCallback.idl:

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

6 years agoUpdate Exception handling in WebAudio.
commit-queue@webkit.org [Tue, 9 Jul 2013 09:59:33 +0000 (09:59 +0000)]
Update Exception handling in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=118405.

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2013-07-09
Reviewed by Chris Rogers.

Source/WebCore:

AudioBufferSourceNode, OscillatorNode and AnalyserNode don't
propagate exception mentioned in WebAudio spec.
Code updated to throw DOM exception as expected.

Tests: webaudio/analyser-exception.html
       webaudio/audiobuffersource-exception.html

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setFftSize):
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore::AudioBufferSourceNode::noteGrainOn):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createBuffer):
(WebCore::AudioContext::createScriptProcessor):
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
(WebCore::AudioScheduledSourceNode::noteOn):
(WebCore::AudioScheduledSourceNode::noteOff):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:

LayoutTests:

New test cases to check exception handling in AnalyserNode and
AudioBufferSourceNode.

* webaudio/analyser-exception-expected.txt: Added.
* webaudio/analyser-exception.html: Added.
* webaudio/audiobuffersource-exception-expected.txt: Added.
* webaudio/audiobuffersource-exception.html: Added.

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

6 years ago[Qt] Unreviewed gardening. Rebaselining after r152479.
zarvai@inf.u-szeged.hu [Tue, 9 Jul 2013 09:41:46 +0000 (09:41 +0000)]
[Qt] Unreviewed gardening. Rebaselining after r152479.

* platform/qt-5.0-wk2/fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt:
* platform/qt-5.0-wk2/fast/css-grid-layout/grid-element-change-rows-repaint-expected.txt:

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

6 years ago[Qt] Unreviewed gardening.
kadam@inf.u-szeged.hu [Tue, 9 Jul 2013 08:32:14 +0000 (08:32 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations: Skip failing composting test after r152303.
* platform/qt/editing/deleting/delete-br-002-expected.png: Update after r152478.
* platform/qt/editing/deleting/delete-br-002-expected.txt: Update after r152478.

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

6 years agoUnreviewed. Update NEWS and Versions.m4 for 2.1.3 release.
carlosgc@webkit.org [Tue, 9 Jul 2013 08:29:10 +0000 (08:29 +0000)]
Unreviewed. Update NEWS and Versions.m4 for 2.1.3 release.

.:

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

Source/WebKit/gtk:

* NEWS: Added release notes for 2.1.3.

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

6 years agoKURL unit test fixture class should have a meaningful name
zandobersek@gmail.com [Tue, 9 Jul 2013 06:46:13 +0000 (06:46 +0000)]
KURL unit test fixture class should have a meaningful name
https://bugs.webkit.org/show_bug.cgi?id=118467

Reviewed by Sam Weinig.

* TestWebKitAPI/Tests/WebCore/KURL.cpp:
(TestWebKitAPI::TEST_F): Use 'KURLTest' as the name for the KURL unit test's fixture class
instead of the generic and inappropriate 'WebCore' name.

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

6 years ago[GTK] webkit_set_cache_model is not turning the cache off
carlosgc@webkit.org [Tue, 9 Jul 2013 05:39:16 +0000 (05:39 +0000)]
[GTK] webkit_set_cache_model is not turning the cache off
https://bugs.webkit.org/show_bug.cgi?id=118345

Reviewed by Gustavo Noronha Silva.

Our documentation says that WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER
disables the cache completely, but we are only setting the cache
capacities to 0. Cache capacities are not checked when resources
are added to the cache, but when it's pruned. To disable the cache
we need to call MemoryCache::setDisabled explicitly.

* webkit/webkitglobals.cpp:
(webkit_set_cache_model): Disable the cache when min dead, max
dead and total capacities are all set to 0.

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

6 years agoAdd WebInspectorUI to WebKit.xcworkspace
aestes@apple.com [Tue, 9 Jul 2013 05:21:51 +0000 (05:21 +0000)]
Add WebInspectorUI to WebKit.xcworkspace
https://bugs.webkit.org/show_bug.cgi?id=118491

Reviewed by Sam Weinig.

* WebKit.xcworkspace/contents.xcworkspacedata:

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

6 years ago[CSS Grid Layout] Rename grid-{rows|columns} to grid-definition-{rows|columns}
mrobinson@webkit.org [Tue, 9 Jul 2013 03:09:02 +0000 (03:09 +0000)]
[CSS Grid Layout] Rename grid-{rows|columns} to grid-definition-{rows|columns}
https://bugs.webkit.org/show_bug.cgi?id=103336

Reviewed by Tony Chang.

Source/WebCore:

Rename -webkit-grid-{rows|columns} to -webkit-grid-definition-{rows|columns}.
The latest version of the spec has renamed these properties.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle the new names.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Ditto.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Ditto.
* css/CSSPropertyNames.in: Add support for the new names.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Handle the new names.

LayoutTests:

Update tests to reflect the rename of -webkit-grid-{rows|columns} to
-webkit-grid-definition-{rows|columns}.

* fast/css-grid-layout: Mass search and replace for the new name.

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

6 years agoDeleteSelectionCommand does not handle correctly deletion with two consecutive BR...
enrica@apple.com [Tue, 9 Jul 2013 02:48:19 +0000 (02:48 +0000)]
DeleteSelectionCommand does not handle correctly deletion with two consecutive BR element.
https://bugs.webkit.org/show_bug.cgi?id=118457
<rdar://problem/14160912>

Reviewed by Simon Fraser.

Source/WebCore:

In DeleteSelectionCommand::handleSpecialCareBRDelete we did not
handle correctly the case where we had <br><br> in the markup and
nothing was being deleted. We should consider this like
the case where the <br> is on the line by itself and remove it.

Test: editing/deleting/delete-image-followed-by-two-br.html

* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):

LayoutTests:

* editing/deleting/delete-image-followed-by-two-br-expected.txt: Added.
* editing/deleting/delete-image-followed-by-two-br.html: Added.
* platform/mac/editing/deleting/delete-br-002-expected.txt: Rebased.

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

6 years ago [Mac] Multiple compositing/patterns test fail
ap@apple.com [Mon, 8 Jul 2013 23:36:43 +0000 (23:36 +0000)]
    [Mac] Multiple compositing/patterns test fail
        https://bugs.webkit.org/show_bug.cgi?id=118490

        * platform/mac/TestExpectations: The failures appear to be WK2 only in my testing,
        so moved the expectations to mac-wk2.

        * platform/mac-wk2/TestExpectations: Updated bug numbers.

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

6 years agoNamedFlowCollection getters should return undefined when there's no NamedFlow
commit-queue@webkit.org [Mon, 8 Jul 2013 21:24:33 +0000 (21:24 +0000)]
NamedFlowCollection getters should return undefined when there's no NamedFlow
https://bugs.webkit.org/show_bug.cgi?id=118463

Patch by Radu Stavila <stavila@adobe.com> on 2013-07-08
Reviewed by Christophe Dumez.

Source/WebCore:

Added new TreatReturnedNullObjectAs attribute for generated methods and set it to Undefined
for the item and namedItem methods of DOMNamedFlowCollection.

Test: fast/regions/webkit-named-flow-collection-undefined.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationFunctionCall):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::treatReturnedNullObjectAsUndefined):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_treat_returned_null_object_as_undefined):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj treatReturnedNullObjectAsUndefined]):
* bindings/scripts/test/TestObj.idl:
* dom/DOMNamedFlowCollection.idl:

LayoutTests:

Added test that validates that NamedFlowCollection getters return undefined
when no named flows exist.

* fast/regions/webkit-named-flow-collection-undefined-expected.txt: Added.
* fast/regions/webkit-named-flow-collection-undefined.html: Added.

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