6 years agoMarked a few tests that are too slow in debug builds, and frequently fail.
ap@apple.com [Mon, 16 Sep 2013 21:35:32 +0000 (21:35 +0000)]
Marked a few tests that are too slow in debug builds, and frequently fail.

* platform/mac/TestExpectations:

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

6 years ago[Windows] Rendering stops when mouse is moving for some types of animations.
bfulgham@apple.com [Mon, 16 Sep 2013 21:30:35 +0000 (21:30 +0000)]
[Windows] Rendering stops when mouse is moving for some types of animations.

Reviewed by Anders Carlsson.

* WebView.cpp:
(WebView::WebView): Add new display flag.
(WebView::repaint): Mark view as needing a display operation.
(WebView::addToDirtyRegion): Ditto
(WebView::scrollBackingStore): Ditto
(WebView::sizeChanged): Ditto
(WebView::updateBackingStore): Ditto
(WebView::performLayeredWindowUpdate): Mark the WebView as having been
moved to screen.
(WebView::paintIntoWindow): Ditto
(WebView::WebViewWndProc): If the view needs display, and it was not done during
this message loop iteration, draw the screen.
* WebView.h:
(WebView::needsDisplay): Added

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

6 years agoMessageQueue should use a Deque of OwnPtrs
andersca@apple.com [Mon, 16 Sep 2013 21:09:31 +0000 (21:09 +0000)]
MessageQueue should use a Deque of OwnPtrs

Reviewed by Andreas Kling.


* Modules/webdatabase/DatabaseThread.cpp:
* dom/default/PlatformMessagePortChannel.h:
* fileapi/FileThread.cpp:
* workers/WorkerRunLoop.cpp:


* wtf/MessageQueue.h:

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

6 years agoWTF::Deque should work with move only types
andersca@apple.com [Mon, 16 Sep 2013 20:39:19 +0000 (20:39 +0000)]
WTF::Deque should work with move only types

Reviewed by Andreas Kling.


* wtf/Deque.h:
Use std::move and std::forward where appropriate and get rid of the PassTraits include.


* TestWebKitAPI/Tests/WTF/Deque.cpp:
Add a test.

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

6 years agosvg/animations/smil-leak-*.svg tests are flaky
ap@apple.com [Mon, 16 Sep 2013 20:34:02 +0000 (20:34 +0000)]
svg/animations/smil-leak-*.svg tests are flaky

The tests are still flaky. Ran out of ideas, so marking them as such and leaving them there.

* platform/mac/TestExpectations:

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

6 years agoWeb Inspector: TypeError when updating ResourceTreeElement created in strange order
commit-queue@webkit.org [Mon, 16 Sep 2013 20:24:13 +0000 (20:24 +0000)]
Web Inspector: TypeError when updating ResourceTreeElement created in strange order

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

Patch by Brian Burg. Fix an uncaught exception that can happen on navigations.

* UserInterface/ResourceTreeElement.js:

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

6 years agoUnreviewed, fixing the GTK WK2 build after r155888.
zandobersek@gmail.com [Mon, 16 Sep 2013 20:14:04 +0000 (20:14 +0000)]
Unreviewed, fixing the GTK WK2 build after r155888.

* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:

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

6 years agoCTTE: FrameTree::top() should return a reference.
akling@apple.com [Mon, 16 Sep 2013 20:09:25 +0000 (20:09 +0000)]
CTTE: FrameTree::top() should return a reference.

Reviewed by Anders Carlsson.

There's always a top frame in the tree.

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

6 years agoUnreviewed, fixing GObject bindings tests after r155850 by adding the *.symbols files...
zandobersek@gmail.com [Mon, 16 Sep 2013 20:01:26 +0000 (20:01 +0000)]
Unreviewed, fixing GObject bindings tests after r155850 by adding the *.symbols files that are now also generated.

* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestException.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNode.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestObj.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.symbols: Added.

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

6 years agoFix the build following <http://trac.webkit.org/changeset/155591>
dbates@webkit.org [Mon, 16 Sep 2013 19:56:40 +0000 (19:56 +0000)]
Fix the build following <trac.webkit.org/changeset/155591>

Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Substitute isWidget() for isRenderWidget()
as the latter is undefined.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo): Ditto.

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

6 years agoMarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList
mhahnenberg@apple.com [Mon, 16 Sep 2013 19:48:48 +0000 (19:48 +0000)]
MarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList

Reviewed by Geoffrey Garen.

Right now, after a collection all MarkedBlocks are in the Marked block state. When lazy sweeping
happens, if a block returns an empty free list after being swept, we call didConsumeFreeList(),
which moves the block into the Allocated block state. This happens to both the block that was
just being allocated out of (i.e. m_currentBlock) as well as any blocks who are completely full.
We should distinguish between these two cases: m_currentBlock should transition to
Allocated (because we were just allocating out of it) and any subsequent block that returns an
empty free list should transition back to the Marked state. This will make the block state more
consistent with the actual state the block is in, and it will also allow us to speed up moving
all blocks the the Marked state during generational collection.

Added new RAII-style HeapIterationScope class that notifies the Heap when it is about to be
iterated and when iteration has finished. Any clients that need accurate liveness data when
iterating over the Heap now need to use a HeapIterationScope so that the state of Heap can
be properly restored after they are done iterating. No new GC-allocated objects can be created
until this object goes out of scope.

* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions): Added HeapIterationScope for the Recompiler iteration.
* heap/Heap.cpp:
(JSC::Heap::willStartIterating): Callback used by HeapIterationScope to indicate that iteration of
the Heap is about to begin. This will cause cell liveness data to be canonicalized by calling stopAllocating.
(JSC::Heap::didFinishIterating): Same, but indicates that iteration has finished.
(JSC::Heap::globalObjectCount): Used HeapIterationScope.
(JSC::Heap::objectTypeCounts): Ditto.
(JSC::Heap::markDeadObjects): Ditto.
(JSC::Heap::zombifyDeadObjects): Ditto.
* heap/Heap.h:
* heap/HeapIterationScope.h: Added. New RAII-style object for indicating to the Heap that it's about
to be iterated or that iteration has finished.
* heap/HeapStatistics.cpp:
(JSC::HeapStatistics::showObjectStatistics): Used new HeapIterationScope.
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper): We now treat the case where we have just finished
allocating out of the current block differently from the case where we sweep a block and it
returns an empty free list. This was the primary point of this patch.
(JSC::MarkedAllocator::allocateSlowCase): ASSERT that nobody is currently iterating the Heap
when allocating.
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::reset): All allocators are reset after every collection. We need to make
sure that the m_lastActiveBlock gets cleared, which it might not always because we don't call
takeCanonicalizedBlock on blocks in the large allocators.
(JSC::MarkedAllocator::stopAllocating): We shouldn't already have a last active block,
so ASSERT as much.
(JSC::MarkedAllocator::resumeAllocating): Do the opposite of what stopAllocating
does. So, if we don't have a m_lastActiveBlock then we don't have to worry about undoing anything
done by stopAllocating. If we do, then we call resumeAllocating on the block, which returns the FreeList
as it was prior to stopping allocation. We then set the current block to the last active block and
clear the last active block.
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::resumeAllocating): Any block resuming allocation should be in
the Marked state, so ASSERT as much. We always allocate a m_newlyAllocated Bitmap if we're
FreeListed, so if we didn't allocate one then we know we were Marked when allocation was stopped,
so just return early with an empty FreeList. If we do have a non-null m_newlyAllocated Bitmap
then we need to be swept in order to rebuild our FreeList.
* heap/MarkedBlock.h:
(JSC::MarkedBlock::didConsumeEmptyFreeList): This is called if we ever sweep a block and get back
an empty free list. Instead of transitioning to the Allocated state, we now go straight back to the
Marked state. This makes sense because we weren't actually allocated out of, so we shouldn't be in
the allocated state. Also added some ASSERTs to make sure that we're in the state that we expect: all of
our mark bits should be set and we should not have a m_newlyAllocated Bitmap.
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::forEachAllocator): Added a new functor-style iteration method so that we can
easily iterate over each allocator for, e.g., stopping and resuming allocators without
duplicating code.
(JSC::StopAllocatingFunctor::operator()): New functors for use with forEachAllocator.
(JSC::MarkedSpace::stopAllocating): Ditto.
(JSC::ResumeAllocatingFunctor::operator()): Ditto.
(JSC::MarkedSpace::resumeAllocating): Ditto.
(JSC::MarkedSpace::willStartIterating): Callback that notifies MarkedSpace that it is being iterated.
Does some ASSERTs, sets a flag, canonicalizes cell liveness data by calling stopAllocating.
(JSC::MarkedSpace::didFinishIterating): Ditto, but to signal that iteration has completed.
* heap/MarkedSpace.h:
(JSC::MarkedSpace::iterationInProgress): Returns true if a HeapIterationScope is currently active.
(JSC::MarkedSpace::forEachLiveCell): Accepts a HeapIterationScope to enforce the rule that you have to
create one prior to iterating over the Heap.
(JSC::MarkedSpace::forEachDeadCell): Ditto.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::haveABadTime): Changed to use new HeapIterationScope.
* runtime/VM.cpp:
(JSC::VM::releaseExecutableMemory): Ditto.

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

6 years agosvg/animations/smil-leak-*.svg tests are flaky
ap@apple.com [Mon, 16 Sep 2013 19:36:18 +0000 (19:36 +0000)]
svg/animations/smil-leak-*.svg tests are flaky

The tests were still flaky. Changed retry timeout from 0 to 100 ms as previously
suggested by Geoff.

* svg/animations/smil-leak-dynamically-added-element-instances.svg:
* svg/animations/smil-leak-element-instances-noBaseValRef.svg:
* svg/animations/smil-leak-element-instances.svg:
* svg/animations/smil-leak-elements.svg:

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

6 years agoInlining should work in debug mode (i.e. Executable::newCodeBlock() should call recor...
fpizlo@apple.com [Mon, 16 Sep 2013 18:58:46 +0000 (18:58 +0000)]
Inlining should work in debug mode (i.e. Executable::newCodeBlock() should call recordParse())

Reviewed by Mark Hahnenberg.

* dfg/DFGArgumentPosition.h: Fix a bug discovered by reenabling inlining. ArgumentPosition may point to the non-canonical VariableAccessData but users of someVariable() want the canonical one.
* runtime/Executable.cpp: Call recordParse() so that the Executable knows things about itself (like if it has captured variables). Otherwise those fields are uninitialized.

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

6 years agoRemove some uses of PassOwnPtr in WebKit2
andersca@apple.com [Mon, 16 Sep 2013 18:57:52 +0000 (18:57 +0000)]
Remove some uses of PassOwnPtr in WebKit2

Reviewed by Andreas Kling.

* Scripts/webkit2/messages.py:
* Scripts/webkit2/messages_unittest.py:
* UIProcess/API/mac/FindIndicatorWindow.h:
* UIProcess/API/mac/FindIndicatorWindow.mm:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
* UIProcess/API/mac/WKView.mm:
(-[WKView WebKit::]):
(-[WKView _setFindIndicator:fadeOut:animate:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/PageClient.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/Plugins/PluginView.cpp:
* WebProcess/Plugins/PluginView.h:

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

6 years agoBuild fix following <https://trac.webkit.org/r154358>
dbates@webkit.org [Mon, 16 Sep 2013 18:26:48 +0000 (18:26 +0000)]
Build fix following <https://trac.webkit.org/r154358>

Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded): Substitute "style" for "context".

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

6 years agoMake InspectorTypeBuilder generate better enums in C++.
timothy@apple.com [Mon, 16 Sep 2013 18:21:05 +0000 (18:21 +0000)]
Make InspectorTypeBuilder generate better enums in C++.


Reviewed by Joseph Pecoraro.


* inspector/CodeGeneratorInspector.py:
(fix_camel_case): Add more abbrivations.
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): Use fix_camel_case
* inspector/ConsoleMessage.cpp:
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorRuntimeAgent.cpp:
* inspector/InspectorStyleSheet.cpp:
* inspector/InspectorStyleSheet.h:


* UserInterface/InspectorBackendCommands.js: Updated to make Css be CSS.

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

6 years agoFlaky Test: svg/batik/filters/feTile.svg
ap@apple.com [Mon, 16 Sep 2013 18:09:49 +0000 (18:09 +0000)]
Flaky Test: svg/batik/filters/feTile.svg

* platform/mac/TestExpectations: Marking as flaky. We already have a lot of these
batik tests marked as flaky, with similar symptoms.

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

6 years agoAligned argument signatures of setupArgumentsWithExecState are missing on MIPS.
commit-queue@webkit.org [Mon, 16 Sep 2013 17:56:17 +0000 (17:56 +0000)]
Aligned argument signatures of setupArgumentsWithExecState are missing on MIPS.

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-09-16
Reviewed by Geoffrey Garen.

Missing implementations of setupArgumentsWithExecState added.

* dfg/DFGCCallHelpers.h:

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

6 years agoChange a couple of COMPILE_ASSERTs to static_assert
andersca@apple.com [Mon, 16 Sep 2013 17:50:20 +0000 (17:50 +0000)]
Change a couple of COMPILE_ASSERTs to static_assert

Reviewed by Andreas Kling.

* wtf/BloomFilter.h:
* wtf/PackedIntVector.h:
* wtf/StdLibExtras.h:
* wtf/StringHasher.h:
* wtf/Vector.h:
* wtf/text/AtomicString.cpp:
* wtf/unicode/Unicode.h:

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

6 years agosvg/animations/smil-leak-*.svg tests are flaky
ap@apple.com [Mon, 16 Sep 2013 17:40:07 +0000 (17:40 +0000)]
svg/animations/smil-leak-*.svg tests are flaky

Reviewed by Geoffrey Garen.

Try garbage collection multiple times, who knows which queues the deleted nodes
could still be in. Also, removed last week's experimental change to make 10x more
nodes to see how that affects the number of leaks (it didn't).

* svg/animations/smil-leak-dynamically-added-element-instances.svg:
* svg/animations/smil-leak-element-instances-noBaseValRef.svg:
* svg/animations/smil-leak-element-instances.svg:
* svg/animations/smil-leak-elements.svg:

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

6 years agoMediaStream API: Storing the constraints in MediaStreamSource
commit-queue@webkit.org [Mon, 16 Sep 2013 17:21:31 +0000 (17:21 +0000)]
MediaStream API: Storing the constraints in MediaStreamSource

based on: https://chromium.googlesource.com/chromium/blink/+/04ac7655b54ae98f55774afde3f8e92b6c6302e6

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

No new tests needed.

* Modules/mediastream/UserMediaRequest.cpp:
* platform/mediastream/MediaStreamSource.h:

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

6 years agohttp/tests/misc/submit-post-keygen.html is extremely slow on bots, often timing out
ap@apple.com [Mon, 16 Sep 2013 17:16:34 +0000 (17:16 +0000)]
http/tests/misc/submit-post-keygen.html is extremely slow on bots, often timing out

Marking as possibly failing too, because when DRT detects a timeout, run-webkit-tests
thinks that it's a failure.

* platform/mac/TestExpectations:

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

6 years ago[sh4] Fix typo in subp implementation in LLINT.
commit-queue@webkit.org [Mon, 16 Sep 2013 17:13:55 +0000 (17:13 +0000)]
[sh4] Fix typo in subp implementation in LLINT.

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-09-16
Reviewed by Andreas Kling.

* offlineasm/sh4.rb:

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

6 years agoRebaseline bindings tests after Sam's Document& changes.
akling@apple.com [Mon, 16 Sep 2013 17:12:57 +0000 (17:12 +0000)]
Rebaseline bindings tests after Sam's Document& changes.

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

6 years agoDestroying a Document's render tree shouldn't make it impossible to recreate.
akling@apple.com [Mon, 16 Sep 2013 17:07:22 +0000 (17:07 +0000)]
Destroying a Document's render tree shouldn't make it impossible to recreate.

Reviewed by Antti Koivisto.

Rename Document::detach() to destroyRenderTree() and stop automatically
disconnecting Document from its Frame after the deforestation.

Added Document::disconnectFromFrame() and do that after every call to
destroyRenderTree() that we currently have.

This change doesn't alter any behavior on its own, but is a step towards
being able to destroy and rebuild the render tree.

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

6 years agoUnreviewed warning correction. Avoid uninitialized renderer.
bfulgham@apple.com [Mon, 16 Sep 2013 16:29:31 +0000 (16:29 +0000)]
Unreviewed warning correction. Avoid uninitialized renderer.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Renderer can be uninitialized.

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

6 years agoUnreviewed warning correction.
bfulgham@apple.com [Mon, 16 Sep 2013 16:24:22 +0000 (16:24 +0000)]
Unreviewed warning correction.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFilter): Don't use 'value' as the input argument
to the method, and the internal loop variable for the parser.

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

6 years agoUpdated spanish Translation
berto@igalia.com [Mon, 16 Sep 2013 16:21:03 +0000 (16:21 +0000)]
Updated spanish Translation

Patch by Daniel Mustieles <daniel.mustieles@gmail.com> on 2013-09-16
Reviewed by Gustavo Noronha Silva.

* es.po: updated.

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

6 years ago[Win] Compile errors in WebCore derived sources.
bfulgham@apple.com [Mon, 16 Sep 2013 16:19:01 +0000 (16:19 +0000)]
[Win] Compile errors in WebCore derived sources.

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

* dom/make_names.pl:
(printNamesCppFile): Added const modifier.
(printDefinitions): Use C style cast.

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

6 years agoAdd new Galician translations
berto@igalia.com [Mon, 16 Sep 2013 16:18:53 +0000 (16:18 +0000)]
Add new Galician translations

Patch by Fran Dieguez <frandieguez@gnome.org> on 2013-09-16
Reviewed by Gustavo Noronha Silva.

* gl.po: updated

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

6 years agoL10n - en_GB PO file for WebKitGTK+
berto@igalia.com [Mon, 16 Sep 2013 16:16:55 +0000 (16:16 +0000)]
L10n - en_GB PO file for WebKitGTK+

Patch by Chris Leonard <cjlhomeaddress@gmail.com> on 2013-09-16
Reviewed by Gustavo Noronha Silva.

* en_GB.po: updated.

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

6 years ago[CSS Shapes] Winding rule polygon issues
hmuller@adobe.com [Mon, 16 Sep 2013 16:16:04 +0000 (16:16 +0000)]
[CSS Shapes] Winding rule polygon issues

Reviewed by Dirk Schulze.


This patch corrects some of the problems with shape-inside and
self-intersecting polygons and eliminates the layout flashing behavior
that prompted the original bug report. The FloatPolygon::contains()
method now respoects the polygon's fillRule and the PolygonShape code
used to find shape-inside intervals for the top and bottom of a line
now also handles fillRule correctly.

Tests: fast/shapes/shape-inside/shape-inside-complex-polygon-001.html

* platform/graphics/FloatPolygon.cpp:
* platform/graphics/FloatPolygon.h:
* rendering/shapes/PolygonShape.cpp:


Verify that self-intersecting rectilinear shape-inside polygons work
correctly for the evenodd and nonzero fill rules.

The shape for tests 001 and 002 contains a loop (the vertices are
numbered in the figure):

|    |    |    |
|    3----2    |

When the fillRule is nonzero the entire rectangle is filled because
edges 7-0 and 3-4 wind in same direction. When fillRule is evenodd the
1-2-3-4 rectangle is not filled, leaving a U shape.

The shape for tests 003 and 004 is similar, but the adjacent vertical edges
wind in opposite directions. As a result both nonzero and evenodd fills
produce the same U shaped result.

|    |    |    |
|    3----4    |

* fast/shapes/shape-inside/shape-inside-complex-polygon-001-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-001.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-002-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-002.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-003-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-003.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-004-expected.html: Added.
* fast/shapes/shape-inside/shape-inside-complex-polygon-004.html: Added.

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

6 years agoWeb Inspector: Do not try to parse incomplete HTTP requests
commit-queue@webkit.org [Mon, 16 Sep 2013 15:49:55 +0000 (15:49 +0000)]
Web Inspector: Do not try to parse incomplete HTTP requests

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-16
Reviewed by Carlos Garcia Campos.

Update to incorporate additional review suggestions.

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
Fix memory leaks, change test timeout from 2 seconds to 1 second,
use "0" instead of "NULL" and use g_assert_no_error when checking
for GError.

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

6 years agoAXObjectCache::m_document should be a reference.
akling@apple.com [Mon, 16 Sep 2013 15:17:24 +0000 (15:17 +0000)]
AXObjectCache::m_document should be a reference.

Reviewed by Antti Koivisto.

AXObjectCache is always owned by a Document so remove the uncertainty
by turning its m_document into a Document&.

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

6 years ago[l10n] [pt_BR] Updated Brazilian Portuguese translation of WebKitGTK+ - 12/09/2013
kov@webkit.org [Mon, 16 Sep 2013 15:03:53 +0000 (15:03 +0000)]
[l10n] [pt_BR] Updated Brazilian Portuguese translation of WebKitGTK+ - 12/09/2013

Patch by Enrico Nicoletto <liverig@gmail.com> on 2013-09-16
Reviewed by Gustavo Noronha.

* pt_BR.po: updated.

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

6 years agoUnreviewed, rolling out r155851.
commit-queue@webkit.org [Mon, 16 Sep 2013 14:00:35 +0000 (14:00 +0000)]
Unreviewed, rolling out r155851.

checkbox states should be exposed through AtkState, not
AtkValue (Requested by msanchez on #webkit).


* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:


* platform/mac/accessibility/mixed-checkbox-expected.txt: Renamed from LayoutTests/accessibility/mixed-checkbox-expected.txt.
* platform/mac/accessibility/mixed-checkbox.html: Renamed from LayoutTests/accessibility/mixed-checkbox.html.
* platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt: Renamed from LayoutTests/accessibility/native-vs-nonnative-checkboxes-expected.txt.
* platform/mac/accessibility/native-vs-nonnative-checkboxes.html: Renamed from LayoutTests/accessibility/native-vs-nonnative-checkboxes.html.

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

6 years ago[Qt] Unreviewed gardening. Skipping and rebase failing tests on Qt bots.
kadam@inf.u-szeged.hu [Mon, 16 Sep 2013 13:54:19 +0000 (13:54 +0000)]
[Qt] Unreviewed gardening. Skipping and rebase failing tests on Qt bots.

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

* platform/qt-wk1/TestExpectations:
* platform/qt-wk1/fast/events/before-unload-returnValue-expected.txt: Added r155367.
* platform/qt-wk1/inspector/console/command-line-api-expected.txt:
* platform/qt/TestExpectations:
* platform/qt/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: Added r155607.
* platform/qt/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: Added r155607.

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

6 years ago[EFL][WK2] Implement pan and flick gesture.
commit-queue@webkit.org [Mon, 16 Sep 2013 12:51:40 +0000 (12:51 +0000)]
[EFL][WK2] Implement pan and flick gesture.

Patch by Eunmi Lee <eunmi15.lee@samsung.com> on 2013-09-16
Reviewed by Gyuyoung Kim.

Implement pan gesture to scroll page by movement of point and stop
scrolling smoothly using ease-in-out-quad algorithm after touched
point is removed from the screen.

Use Ecore_Animator in order to process movement once per each framing
time slot instead of processing all movement.

* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/GestureRecognizer.cpp:
* UIProcess/efl/EasingCurves.cpp: Added.
* UIProcess/efl/EasingCurves.h: Added.

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

6 years ago[ATK] Extends atk value interface to return proper checkbox states
commit-queue@webkit.org [Mon, 16 Sep 2013 12:38:50 +0000 (12:38 +0000)]
[ATK] Extends atk value interface to return proper checkbox states

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


Tests: accessibility/mixed-checkbox.html

* accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:


Sharing mac tests with other ports (GTK/EFL).

* accessibility/mixed-checkbox-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/mixed-checkbox-expected.txt.
* accessibility/mixed-checkbox.html: Renamed from LayoutTests/platform/mac/accessibility/mixed-checkbox.html.
* accessibility/native-vs-nonnative-checkboxes-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes-expected.txt.
* accessibility/native-vs-nonnative-checkboxes.html: Renamed from LayoutTests/platform/mac/accessibility/native-vs-nonnative-checkboxes.html.

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

6 years ago[GTK] Check DOM bindings API compatibility while building
carlosgc@webkit.org [Mon, 16 Sep 2013 12:28:59 +0000 (12:28 +0000)]
[GTK] Check DOM bindings API compatibility while building

Reviewed by Gustavo Noronha Silva.

A .symbols file is now generated for every DOM binding public API
object. It contains the signature of all public methods. We keep a
single file with the signature of all public methods in the source
tree. When DOM bindings are generated, a new symbols file is
created concatenating all .symbols files generated and it's
compared with the symbols file in the source tree using a script
that checks if the changes are API compatible or not. In case of
API break the build finishes showing the differences found in the
symbol files. If API compatible changes are found, the diff is
shown in stdout, suggesting to run the gobject-run-api-break-test
with the --reset-results option to update the symbols file, and
the build continues. If there aren't API changes the build
continues silently.

* GNUmakefile.am:
* bindings/gobject/GNUmakefile.am:
* bindings/gobject/WebKitDOMCustom.symbols: Added.
* bindings/gobject/WebKitDOMEventTarget.symbols: Added.
* bindings/gobject/WebKitDOMObject.symbols: Added.
* bindings/gobject/webkitdom.symbols: Added.
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/gobject-run-api-break-test: Added.

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

6 years agoDevirtualize Document::detach().
akling@apple.com [Mon, 16 Sep 2013 11:44:52 +0000 (11:44 +0000)]
Devirtualize Document::detach().

Reviewed by Antti Koivisto.

The only override was in PluginDocument which needs to decouple itself
from the plugin element at the start of detach.

Added PluginDocument::detachFromPluginElement() and call it from detach().

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

6 years agoUnreviewed gardening. Removed fail expectations for test in
mario@webkit.org [Mon, 16 Sep 2013 10:49:37 +0000 (10:49 +0000)]
Unreviewed gardening. Removed fail expectations for test in
the GTK & EFL ports, consistently passing after r155374.

* platform/efl/TestExpectations: Removed test.
* platform/gtk/TestExpectations: Ditto.

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

6 years agoSource/WebKit2: [WKTR] WebKitTestRunner's eventSender.contextClick() returns objects...
commit-queue@webkit.org [Mon, 16 Sep 2013 09:27:16 +0000 (09:27 +0000)]
Source/WebKit2: [WKTR] WebKitTestRunner's eventSender.contextClick() returns objects without implemented click() method.

Patch by Wojciech Bielawski <w.bielawski@samsung.com> on 2013-09-16
Reviewed by Darin Adler.

Add API required to implement click() method for context menu entry, used by WebkitTestRunner::EventSender.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools: [WKTR] WebKitTestRunner's eventSender.contextClick() returns objects without implemented click() method.

Patch by Wojciech Bielawski <w.bielawski@samsung.com> on 2013-09-16
Reviewed by Darin Adler.

Add implementation of click() method of objects returned by eventSender.contextClick().

* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

LayoutTests: [WKTR] Add implementation of click() method of objects returned by eventSender.contextClick().

Patch by Wojciech Bielawski <w.bielawski@samsung.com> on 2013-09-16
Reviewed by Darin Adler.

Unskipping tests related with click() method.

* platform/efl-wk2/TestExpectations: Corrected bug number for tests:
* platform/gtk-wk2/TestExpectations:

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

6 years ago[sh4] Handle subp opcode with 3 operands and bpbeq opcode in LLINT.
commit-queue@webkit.org [Mon, 16 Sep 2013 09:05:38 +0000 (09:05 +0000)]
[sh4] Handle subp opcode with 3 operands and bpbeq opcode in LLINT.

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-09-16
Reviewed by Andreas Kling.

* offlineasm/sh4.rb:

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

6 years agoCTTE: RenderCombineText always has a Text node.
akling@apple.com [Mon, 16 Sep 2013 08:42:31 +0000 (08:42 +0000)]
CTTE: RenderCombineText always has a Text node.

Reviewed by Antti Koivisto.

This renderer is never anonymous and always has a corresponding Text node.
Replaced node() with a textNode() reference getter.

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

6 years agoCTTE: RenderSVGInlineText always has a Text node.
akling@apple.com [Mon, 16 Sep 2013 06:59:26 +0000 (06:59 +0000)]
CTTE: RenderSVGInlineText always has a Text node.

Reviewed by Antti Koivisto.

This renderer is never anonymous and always has a corresponding Text node.
Replaced node() with a textNode() reference getter.

Only one null check was harmed in the making of this patch.

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

6 years ago Try to fix the Windows build.
darin@apple.com [Mon, 16 Sep 2013 05:53:04 +0000 (05:53 +0000)]
    Try to fix the Windows build.

        * dom/make_names.pl: The static_cast here was running into const-correctness
        issues, so for now change it back to a C-style cast.

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

6 years agoAdding "explicit" keyword in rendering related constructors
commit-queue@webkit.org [Mon, 16 Sep 2013 05:40:09 +0000 (05:40 +0000)]
Adding "explicit" keyword in rendering related constructors

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-09-15
Reviewed by Andreas Kling.

Adding explicit in below constructor.
All files belong to Source/WebCore/rendering/ path.

* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
* rendering/FixedTableLayout.h:
* rendering/FloatingObjects.h:
* rendering/FlowThreadController.h:
* rendering/HitTestResult.h:
* rendering/ImageQualityController.h:
* rendering/InlineBox.h:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
* rendering/LayoutState.h:
* rendering/LogicalSelectionOffsetCaches.h:
* rendering/RenderBoxModelObject.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFrameSet.h:
* rendering/RenderGeometryMap.h:
* rendering/RenderImage.h:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderReplaced.h:
* rendering/RenderSearchField.h:
* rendering/RenderSelectionInfo.h:
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/TrailingFloatsRootInlineBox.h:

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

6 years agoUnreviewed make distcheck fix.
kov@webkit.org [Mon, 16 Sep 2013 01:29:43 +0000 (01:29 +0000)]
Unreviewed make distcheck fix.


* GNUmakefile.list.am:


* GNUmakefile.am:
* GNUmakefile.list.am:


* GNUmakefile.list.am:


* GNUmakefile.list.am:

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

6 years ago[l10n] Updated Polish translation of WebKitGTK+
commit-queue@webkit.org [Mon, 16 Sep 2013 01:19:35 +0000 (01:19 +0000)]
[l10n] Updated Polish translation of WebKitGTK+

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2013-09-15
Reviewed by Gustavo Noronha Silva.

* pl.po: updated.

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

6 years agoRemove dependency on CoreFoundation from WebIconDatabase
paroga@webkit.org [Mon, 16 Sep 2013 01:01:11 +0000 (01:01 +0000)]
Remove dependency on CoreFoundation from WebIconDatabase

Reviewed by Brent Fulgham.

* COMVariantSetter.h:
* WebIconDatabase.cpp:
* WebIconDatabase.h:
* WebView.cpp:

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

6 years agoFix build with Visual Studio 2012 after r153764.
paroga@webkit.org [Mon, 16 Sep 2013 00:45:50 +0000 (00:45 +0000)]
Fix build with Visual Studio 2012 after r153764.

Reviewed by Brent Fulgham.

* wtf/MathExtras.h:

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

6 years ago[WIN] Fix build without precompiled header after r154146.
paroga@webkit.org [Mon, 16 Sep 2013 00:02:38 +0000 (00:02 +0000)]
[WIN] Fix build without precompiled header after r154146.

* platform/win/WebCoreBundleWin.h:

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

6 years agoCTTE: EllipsisBox owner renderer is always a RenderBlock.
akling@apple.com [Sun, 15 Sep 2013 21:07:34 +0000 (21:07 +0000)]
CTTE: EllipsisBox owner renderer is always a RenderBlock.

Reviewed by Antti Koivisto.

Let the constructor reflect this. Also out-of-line it because reasons.

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

6 years agoUnreviewed GTK gardening.
berto@igalia.com [Sun, 15 Sep 2013 20:51:43 +0000 (20:51 +0000)]
Unreviewed GTK gardening.

* GNUmakefile.list.am: remove FastAllocBase.h, this file disappeared
in r155251.

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

6 years agoCTTE: RenderObject's createAnonymous() and setDocumentForAnonymous() should take...
weinig@apple.com [Sun, 15 Sep 2013 19:56:13 +0000 (19:56 +0000)]
CTTE: RenderObject's createAnonymous() and setDocumentForAnonymous() should take Document references

Reviewed by Andreas Kling.

The Document used for anonymous renderers is never null.

* dom/Document.cpp:
* page/FrameView.cpp:
* rendering/FlowThreadController.cpp:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderMultiColumnBlock.cpp:
* rendering/RenderMultiColumnFlowThread.cpp:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.cpp:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderObject.h:
* rendering/RenderReplica.cpp:
* rendering/RenderReplica.h:
* rendering/RenderRuby.cpp:
* rendering/RenderRubyBase.cpp:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
* rendering/RenderScrollbar.cpp:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderScrollbarPart.h:
* rendering/RenderTable.cpp:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.cpp:
* rendering/RenderText.cpp:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/mathml/RenderMathMLBlock.cpp:
* rendering/mathml/RenderMathMLRow.cpp:
* rendering/mathml/RenderMathMLScripts.cpp:

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

6 years agoMake the GDB webkit.py script compatible with Python v3
zandobersek@gmail.com [Sun, 15 Sep 2013 19:48:43 +0000 (19:48 +0000)]
Make the GDB webkit.py script compatible with Python v3

Reviewed by Ryosuke Niwa.

GDB fails to load the printing helpers from the webkit.py script if Python v3 is used. To avoid that,
uses of xrange() in the script are replaced with range(), and the print statements are changed into
the print() function invocations.

* gdb/webkit.py:

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

6 years agoCTTE: ContentData::createRenderer() should take references
weinig@apple.com [Sun, 15 Sep 2013 19:19:32 +0000 (19:19 +0000)]
CTTE: ContentData::createRenderer() should take references

Reviewed by Andreas Kling.

- Convert createRenderer(Document*, RenderStyle*) to createRenderer(Document&, RenderStyle&)
- Do a drive by final-ing of ContentData derived classes.

* dom/PseudoElement.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderImage.h:
* rendering/style/ContentData.cpp:
* rendering/style/ContentData.h:

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

6 years agoAttempt to fix a local flakiness on Lion.
zalan@apple.com [Sun, 15 Sep 2013 19:10:19 +0000 (19:10 +0000)]
Attempt to fix a local flakiness on Lion.

Rubber stamped by Andreas Kling.

* fast/history/history-back-while-pdf-in-pagecache.html:

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

6 years agoCTTE: RenderFrameSet is never anonymous.
akling@apple.com [Sun, 15 Sep 2013 19:00:57 +0000 (19:00 +0000)]
CTTE: RenderFrameSet is never anonymous.

Reviewed by Antti Koivisto.

This renderer is never anonymous, and always has a corresponding HTMLFrameSetElement.
Replaced element() with a frameSetElement().

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

6 years agoDeoptimize deoptimization: make DFGOSRExitCompiler64.cpp more hackable
fpizlo@apple.com [Sun, 15 Sep 2013 18:53:23 +0000 (18:53 +0000)]
Deoptimize deoptimization: make DFGOSRExitCompiler64.cpp more hackable

Reviewed by Geoffrey Garen.

This reduces the size of DFGOSRExitCompiler64.cpp by almost 50%, and makes it
super easy to add new recovery kinds. For recoveries that involve reboxing, it
allows you to keep most of the code common between the on-stack and in-reg
cases: they all get funneled through the "load from scratch buffer, convert,
and then store to stack" logic.

This opens up a bunch of possibilities. It'll make adding Int48 much easier,
and it probably will come in handy as we do various DFG stack layout changes in
support of the FTL.

* bytecode/ValueRecovery.h:
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGOSRExitCompiler64.cpp:

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

6 years agoCTTE: Node subclasses should take a Document by reference in their constructor (Part 10)
weinig@apple.com [Sun, 15 Sep 2013 18:47:05 +0000 (18:47 +0000)]
CTTE: Node subclasses should take a Document by reference in their constructor (Part 10)

Reviewed by Andreas Kling.

Convert the bindings code to pass a Document reference for named constructors.

* bindings/js/JSImageConstructor.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
* html/HTMLAudioElement.cpp:
* html/HTMLAudioElement.h:
* html/HTMLImageElement.cpp:
* html/HTMLImageElement.h:
* html/HTMLOptionElement.cpp:
* html/HTMLOptionElement.h:

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

6 years agoCTTE: Node subclasses should take a Document by reference in their constructor (Part 9)
weinig@apple.com [Sun, 15 Sep 2013 18:25:10 +0000 (18:25 +0000)]
CTTE: Node subclasses should take a Document by reference in their constructor (Part 9)

Reviewed by Andreas Kling.

Remove the 'constructorTakesDocumentReference' property. It is the default now.

* dom/make_names.pl:
Always use a Document reference.

* html/HTMLTagNames.in:
* mathml/mathtags.in:
* svg/svgtags.in:
Remove the 'constructorTakesDocumentReference' property.

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

6 years agoRenderWidget doesn't need to cache a FrameView pointer.
akling@apple.com [Sun, 15 Sep 2013 18:12:52 +0000 (18:12 +0000)]
RenderWidget doesn't need to cache a FrameView pointer.

Reviewed by Antti Koivisto.

The FrameView can be found through RenderObject::view().frameView().
This way also gets you a reference, so no need for null-checking.

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

6 years agoCTTE: Node subclasses should take a Document by reference in their constructor (Part 8)
weinig@apple.com [Sun, 15 Sep 2013 18:06:06 +0000 (18:06 +0000)]
CTTE: Node subclasses should take a Document by reference in their constructor (Part 8)

Reviewed by Andreas Kling.

Converts the following to take a Document reference:
    - All of SVG

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

6 years ago[GTK] The web inspector is not rendered when docked in WebKit2 when AC is used
carlosgc@webkit.org [Sun, 15 Sep 2013 17:41:47 +0000 (17:41 +0000)]
[GTK] The web inspector is not rendered when docked in WebKit2 when AC is used

Reviewed by Martin Robinson.

When accelerated compositing results are rendered we return early
from webkitWebViewBaseDraw and other WebView children are not
drawn. We need to chain up the draw signal handler, so that the
GtkContainer propagates the draw to all its children.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:

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

6 years ago[CTTE] Node subclasses should take a Document by reference in their constructor ...
weinig@apple.com [Sun, 15 Sep 2013 17:10:27 +0000 (17:10 +0000)]
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 7)

Reviewed by Andreas Kling.

Converts the following to take a Document reference:
    - Element
    - MathMLElement
    - MathMLInlineContainerElement
    - MathMLMathElement
    - MathMLTextElement

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

6 years ago[WIN] Fix build without precompiled header after r155454.
paroga@webkit.org [Sun, 15 Sep 2013 14:58:35 +0000 (14:58 +0000)]
[WIN] Fix build without precompiled header after r155454.

* wtf/win/GDIObject.h: Added missing windows.h include.

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

6 years agoCTTE: RenderMedia and RenderVideo are never anonymous.
akling@apple.com [Sun, 15 Sep 2013 14:13:55 +0000 (14:13 +0000)]
CTTE: RenderMedia and RenderVideo are never anonymous.

Reviewed by Sam Weinig.

Codify the following:

- RenderMedia always has an HTMLMediaElement.
- RenderVideo always has an HTMLVideoElement.

None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.

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

6 years agoUnreviewed, rolling out r155809.
akling@apple.com [Sun, 15 Sep 2013 14:12:11 +0000 (14:12 +0000)]
Unreviewed, rolling out r155809.

Accidentally removed files, let's redo this.

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

6 years agoCTTE: RenderMedia and RenderVideo are never anonymous.
akling@apple.com [Sun, 15 Sep 2013 14:06:54 +0000 (14:06 +0000)]
CTTE: RenderMedia and RenderVideo are never anonymous.

Reviewed by Sam Weinig.

Codify the following:

- RenderMedia always has an HTMLMediaElement.
- RenderVideo always has an HTMLVideoElement.

None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.

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

6 years ago[CTTE] Node subclasses should take a Document by reference in their constructor ...
weinig@apple.com [Sun, 15 Sep 2013 13:31:54 +0000 (13:31 +0000)]
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 6)

Reviewed by Andreas Kling.

Converts the following to take a Document reference:
    - Attr
    - CDATASection
    - CharacterData
    - Comment
    - DOMImplementation
    - DocumentFragment
    - DocumentType
    - EntityReference
    - Notation
    - ProcessingInstruction
    - ShadowRoot
    - TemplateContentDocumentFragment
    - Text

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

6 years agoRemove RenderObject::clearNode().
akling@apple.com [Sun, 15 Sep 2013 12:59:04 +0000 (12:59 +0000)]
Remove RenderObject::clearNode().

Reviewed by Anders Carlsson.

This was used by ref-counted RenderWidgets after getting removed from their
parent renderer but kept alive by an external ref. We have no need for this
awkward state anymore, so remove clearNode().

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

6 years agoCTTE: RenderWidgets are never anonymous.
akling@apple.com [Sun, 15 Sep 2013 12:52:58 +0000 (12:52 +0000)]
CTTE: RenderWidgets are never anonymous.

Reviewed by Anders Carlsson.

Codify the following:

- RenderWidget always has an HTMLFrameOwnerElement.
- RenderEmbeddedObject always has an HTMLFrameOwnerElement.
- RenderSnapshottedPlugIn always has an HTMLPlugInImageElement.
- RenderFrame always has an HTMLFrameElement.
- RenderIFrame always has an HTMLIFrameElement.

None of these renderers are ever anonymous, so delete element() and provide
strongly typed reference getters instead.

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

6 years agoRemove Ref(const T&) constructor.
akling@apple.com [Sun, 15 Sep 2013 12:51:26 +0000 (12:51 +0000)]
Remove Ref(const T&) constructor.

Reviewed by Anders Carlsson.

This constructor was added as a stopgap measure until we got better support
for move semantics in Vector.

* wtf/Ref.h:

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

6 years agoUnreviewed, fix ridiculous bug in WeakPtr.
akling@apple.com [Sun, 15 Sep 2013 10:35:56 +0000 (10:35 +0000)]
Unreviewed, fix ridiculous bug in WeakPtr.

I made operator!() null check the pointer to the WeakReference. :|

Caught by plugins/destroy-on-setwindow.html on bots.

* wtf/WeakPtr.h:

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

6 years ago[webkitpy] perf profiler attaches to WKTR after the WebProcess was launched
zandobersek@gmail.com [Sun, 15 Sep 2013 09:29:56 +0000 (09:29 +0000)]
[webkitpy] perf profiler attaches to WKTR after the WebProcess was launched

Reviewed by Ryosuke Niwa.

The perf profiler is attached to the test runner after the test runner has been launched,
but in the case of WebKitTestRunner, this is done after the WebProcess was spawned by the
UIProcess, meaning that WebProcess operations will not be profiled.

To avoid that, the perf profiler is changed to provide a wrapper command for the test runner.
This is done in the scope of already present support for wrapper scripts (such as valgrind)
that are settable through the --wrapper option. This causes the perf profiler to correctly
continue profiling the WebProcess after it was spawned.

When the profiler is launched, a wait process is launched with the profiler's pid as the
argument. This ensures we can check that the profiler exited normally. If it did not, its
output can be corrupted and can cause problems when that output is examined. The after-exit
report is avoided in that case.

* Scripts/webkitpy/common/system/profiler.py:
(Profiler.wrapper_arguments): The method returns an empty list by default.
(Perf.__init__): Remove unnecessary member variables.
(Perf.attach_to_pid): Launch the wait process with the profiler's pid as the argument.
(Perf.wrapper_arguments): Used instead of attaching the profiler to the profiled process' pid,
the method returns a list of arguments that should be used as a wrapper for the test runner.
The arguments specify the 'perf record' command, with the output file and the instruction to
construct the call graph given as well.
(Perf._first_ten_lines_of_profile): Prettify the output by avoiding the unnecessary trailing
whitespace in the profile lines.
(Perf.profile_after_exit): Kill the profiler process through its pid if the wait process is still
running. If it is running even after that, or if the profiler process produced a non-zero exit
code, the method reports the profiling failure and returns. Otherwise it continues on reporting
the top 10 lines of the profile and how to examine the profile further.
* Scripts/webkitpy/port/driver.py:
(Driver._command_wrapper): The method is now a member of the Driver class, returning the wrapper
as specified by the --wrapper option if given, or the profiler wrapper if the profiler is present,
or an empty list otherwise.
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.make_port): Adjusted so mock host or options objects can be specified
for the testing-specific Port object.
(DriverTest._assert_wrapper): Pass a MockOptions object with the wrapper value to the make_port method,
as the Driver._command_wrapper now operates on the option's value directly rather than accepting it through
a parameter.
(DriverTest.test_profiler_as_wrapper): Provide a test case to check the correct profiler wrapper is used
when profiling on the Linux platform with the perf profiler.

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

6 years agoUse FINAL instead of virtualChildren trick in render tree classes
darin@apple.com [Sun, 15 Sep 2013 08:51:44 +0000 (08:51 +0000)]
Use FINAL instead of virtualChildren trick in render tree classes

Reviewed by Andreas Kling.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle): Use children instead of
* rendering/RenderBox.cpp:
(WebCore::RenderBox::splitAnonymousBoxesAroundChild): Ditto.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildTo): Ditto.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild): Ditto.
(WebCore::RenderObject::removeChild): Ditto.
(WebCore::RenderObject::handleDynamicFloatPositionChange): Ditto.
(WebCore::RenderObject::willBeDestroyed): Ditto.
(WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Ditto.

* rendering/RenderBlock.h: Changed firstChild and lastChild to use
m_children directly instead of a function. Made the children function
a final virtual override. Deleted the virtualChildren override. Added
override keywords to other virtual functions.
* rendering/RenderEmbeddedObject.h: Ditto.
* rendering/RenderFrameSet.h: Ditto.
* rendering/RenderInline.h: Ditto.
* rendering/RenderMedia.h: Ditto.
* rendering/RenderTableCol.h: Ditto.
* rendering/RenderTableRow.h: Ditto.
* rendering/RenderTableSection.h: Ditto.
* rendering/svg/RenderSVGContainer.h: Ditto.
* rendering/svg/RenderSVGRoot.h: Ditto.

* rendering/RenderObject.h:
(WebCore::RenderObject::firstChild): Use children instead of virtualChildren.
(WebCore::RenderObject::lastChild): Ditto.
(WebCore::RenderObject::children): Renamed from virtualChildren.
(WebCore::RenderObject::canHaveChildren): Use children instead of virtualChildren.

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

6 years agoShrink factory functions
darin@apple.com [Sun, 15 Sep 2013 08:50:06 +0000 (08:50 +0000)]
Shrink factory functions

Reviewed by Andreas Kling.

This makes the functions that builds four different types of per-element tables
all have smaller code size.

* DerivedSources.make: Tweaked how HTML and SVG wrapper factories are made a bit.
It was OK, but a little sloppy.

* dom/Document.cpp:
(WebCore::Document::createElement): Changed to call the createElement functions
in the factories. Also did some style improvement.

* dom/make_names.pl:
(printConstructorSignature): Make constructors take a Document& instead of
a Document*.
(printConstructorInterior): Updated for Document& instead of Document*.
(printFunctionTable): Renamed from printFunctionInits, because this now
creates table entries. The actual code to add each function is now done
in a loop instead.
(printNamesHeaderFile): Made the table const.
(printNamesCppFile): Made the table const.
(printDefinitions): Generate a table, table entries, and a loop that calls
createQualifiedName, rather than an "unrolled loop".
(printFactoryCppFile): Tweaked indentation. Updated to take Document& instead
of Document*. Generate a table, table entries, and a loop that builds a map,
rather than an "unrolled" loop.
(printFactoryHeaderFile): Eliminated the unused createElement member function
that was part of a dream of factory objects in a namespace registry, giving
the name createElement to the static member function so it would be less
redundant. Also made the function takes a Document& instead of Document*.
Also made the default "not created by parser", since the parser is the simpler
use case, outnumbered by the non-parser uses, at least at the moment. Also,
use nullptr instead of 0.
(printWrapperFactoryCppFile): Generate a table, table entries, and a loop
that builds a map rather than an "unrolled" loop.

* editing/htmlediting.cpp:
(WebCore::createHTMLElement): Put the null check here that used to be in
HTMLElementFactory::createElement, and call with a reference instead of a
pointer. Also don't need to pass "0, false" since "not created by the parser"
is now the default.
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::createElement): Ditto.

* html/HTMLElement.cpp:
(WebCore::populateEventNameForAttributeLocalNameMap): Changed to use an
AtomicStringImpl* as the key instead of AtomicString, since all the strings
come from the local names of tags, and so don't need to be ref'd. This saves
a bit of reference count churn when building the map and is the same pattern
used in some maps in the make_names.pl script above.
(WebCore::HTMLElement::parseAttribute): Updated for change above.

* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName): More const.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElement): Changed to call the
HTMLElementFactory::createElement function under its new name with a reference
rather than a pointer.

* html/parser/HTMLIdentifier.cpp:
(WebCore::nameForIndex): More const.
(WebCore::HTMLIdentifier::addNames): More const.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::mapLoweredLocalNameToName): More const.
(WebCore::adjustSVGTagNameCase): Eliminated local variable so we would not have
to utter type with more const.
(WebCore::adjustAttributes): Ditto.
(WebCore::addNamesWithPrefix): More const. Also tweaked to use a bit more reference,
and a bit less pointer. Also used array instead of pointer for argument since they
are synonyms and this use is more array-like and const array is slightly easier to
understand than the double const pointer.
(WebCore::adjustForeignAttributes): Eliminated local variable so we would not have
to utter type with more const.

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): Pass a reference to

* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::WebVTTElement): Take a reference instead of a pointer.
(WebCore::WebVTTElement::create): Ditto.
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren): Pass a
reference instead of a pointer to create.
(WebCore::WebVTTElement::createEquivalentHTMLElement): Take a reference instead
of a pointer, and update uses of HTMLElementFactory::createElement. Also made
this return null when a bad node type is passed in, which should never happen.

* html/track/WebVTTElement.h: Use Document& instead of Document*. Removed unused
and undefined create/constructor overloads.

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): Pass document reference rather than
pointer to WebVTTElement::create.

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

6 years agoGet rid of ref-counting on RenderArena.
akling@apple.com [Sun, 15 Sep 2013 08:21:18 +0000 (08:21 +0000)]
Get rid of ref-counting on RenderArena.

Reviewed by Darin Adler.

This was used to guard the arena during ref-counted RenderWidget teardown.

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

6 years ago Fix Qt build.
darin@apple.com [Sun, 15 Sep 2013 08:18:12 +0000 (08:18 +0000)]
    Fix Qt build.

        * css/CSSSelector.cpp:
        (WebCore::populatePseudoTypeByNameMap): Removed stray line that was breaking
        the build for any platform with !ENABLE(VIDEO_TRACK).

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

6 years agoRestore two-pass mechanism for FrameView::updateEmbeddedObjects().
akling@apple.com [Sun, 15 Sep 2013 08:15:17 +0000 (08:15 +0000)]
Restore two-pass mechanism for FrameView::updateEmbeddedObjects().

Reviewed by Darin Adler.

Restore the code to make a second pass over the embedded objects needing
an update in case more objects were added to the set during the first pass.

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

6 years agoImplement the mmultiscripts tag
commit-queue@webkit.org [Sun, 15 Sep 2013 08:08:08 +0000 (08:08 +0000)]
Implement the mmultiscripts tag

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-09-15
Reviewed by Chris Fleizach.


Tests: mathml/invalid-scripts-crash.html

This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
* css/mathml.css:
(mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
(mover > :last-child, munderover > :last-child):
(msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
(merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):
* mathml/MathMLInlineContainerElement.cpp:
* mathml/mathtags.in:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLScripts.cpp: Added.
* rendering/mathml/RenderMathMLScripts.h: Added.
* rendering/mathml/RenderMathMLSubSup.cpp: Removed.
* rendering/mathml/RenderMathMLSubSup.h: Removed.


Add many tests for script msub/msup/msubsup/mmultiscripts:
- invalid markup
- equivalence between mmultiscripts without scripts and mrow
- equivalence between mmultiscripts and msub/msup/msubsup
- position of scripts in mmultiscripts
- baseline alignment of msub/msup/msubsup elements
- horizontal/vertical alignment of scripts
- adding/removing children with the DOM

* TestExpectations: Some remaining MathML pixel tests are broken by this patch.
* mathml/invalid-scripts-crash-expected.txt: Added.
* mathml/invalid-scripts-crash.html: Added.
* mathml/presentation/multiscripts-equivalence-expected.html: Added.
* mathml/presentation/multiscripts-equivalence.html: Added.
* mathml/presentation/multiscripts-noscripts-expected.html: Added.
* mathml/presentation/multiscripts-noscripts.html: Added.
* mathml/presentation/multiscripts-positions-expected.html: Added.
* mathml/presentation/multiscripts-positions.html: Added.
* mathml/presentation/scripts-base-alignment-expected.html: Added.
* mathml/presentation/scripts-base-alignment.html: Added.
* mathml/presentation/scripts-horizontal-alignment-expected.html: Added.
* mathml/presentation/scripts-horizontal-alignment.html: Added.
* mathml/presentation/scripts-vertical-alignment-expected.html: Added.
* mathml/presentation/scripts-vertical-alignment.html: Added.
* mathml/scripts-addChild-expected.html: Added.
* mathml/scripts-addChild.html: Added.
* mathml/scripts-removeChild-expected.html: Added.
* mathml/scripts-removeChild.html: Added.
* platform/mac/accessibility/mathml-multiscript-expected.txt: Reference updated.

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

6 years agoGet rid of ref-counting on RenderWidget.
akling@apple.com [Sun, 15 Sep 2013 07:27:52 +0000 (07:27 +0000)]
Get rid of ref-counting on RenderWidget.

Reviewed by Darin Adler.


Instead of RenderView tracking RenderWidgets, have FrameView track Widgets
that are currently in the render tree.

To protect ourselves during NPAPI tomfoolery, we now let RenderWidget hand
out weak pointers through a createWeakPtr() method so call sites can monitor
the renderer for deletion without having to take shared ownership.

This works out quite nicely since instead of keeping a limping object alive
for a little longer just so we can call methods on it (to accomplish nothing),
we're forced to check right away if it's gone, and take immediate action.

De-virtualized RenderObject::destroy() since it's no longer needed for
RenderWidget to defer destruction.

* page/FrameView.cpp:

    Call updateWidgetPositions() on FrameView instead of RenderView.


    Turn null checking of embedded object's element backpointer into an
    assertion. This will eventually go away completely once that renderer
    can return a HTMLFrameOwnerElement&.

    Use WeakPtr to check for renderer destruction following the call out
    to updateWidget().


    Slap a WidgetHierarchyUpdatesSuspensionScope guard on this function
    to defer Widget updates until all the updateEmbeddedObject calls are
    done. This avoids RenderWidget::setWidget() having to handle 'this'
    disappearing from underneath.

    Also use a ListHashSet with a null sentinel to avoid looping forever.


    Only call updateEmbeddedObjects() once since that function no longer
    operates in chunks.


    Call notifyWidgets() on FrameView instead of RenderView.


    Added. These are called by RenderWidget when a Widget is being
    added or removed from a RenderWidget.


    Helper to collect raw Widget pointers into a Vector and ref them.


    Moved here from RenderView. This function holds a ref on all the
    attached Widgets and calls RenderWidget::updateWidgetPosition() on
    their corresponding renderers.


    Moved here from RenderView. Holds a ref on all the widgets while
    calling Widget::notifyWidget() on each one.

* rendering/RenderLayer.cpp:

    Call updateWidgetPositions() on FrameView instead of RenderView.

* rendering/RenderObject.h:

    De-virtualized destroy().

* rendering/RenderView.cpp:
* rendering/RenderView.h:

    Moved a bunch of things to FrameView. Made protected section private
    since nothing inherits from RenderView.

* rendering/RenderWidget.h:

    Added a WeakPtr factory for clients that want to monitor this object
    for destruction.

* rendering/RenderWidget.cpp:

    Removed ref counting.
    Removed registration with RenderView in ctor/willBeDestroyed.


    Monitor the RenderWidget itself through a WeakPtr and check on it
    after each step that we're still alive. In that case just bail out.


    Register the incoming/outgoing Widget with the FrameView.
    Use a WeakPtr to check on 'this' after updateWidgetGeometry().


    Use a WeakPtr to check on 'this' after updateWidgetGeometry().

* GNUmakefile.list.am:
* rendering/RenderWidgetProtector.h:



* wtf/WeakPtr.h:

    Add operator! to WeakPtr.

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

6 years ago[CTTE] Node subclasses should take a Document by reference in their constructor ...
weinig@apple.com [Sun, 15 Sep 2013 05:23:01 +0000 (05:23 +0000)]
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 5)

Reviewed by Andreas Kling.

* dom/make_names.pl:
Add support for a top level 'constructorTakesDocumentReference' property to
force using a Document reference for the whole factory.

* html/HTMLTagNames.in:
Replace per-tag 'constructorTakesDocumentReference' with a top level declaration
now that all of the HTML tag names are supported.

Converts the following to take a Document reference:
    - HTMLContentElement
    - HTMLElement
    - HTMLFrameElementBase
    - HTMLFrameOwnerElement
    - HTMLPlugInElement
    - HTMLPlugInImageElement
    - HTMLUnknownElement
    - InsertionPoint
    - StyledElement
    - TextTrackCueBox
    - TextTrackCueGenericBoxElement

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

6 years agoMediaStream API: Update RTCDataChannel
eric.carlson@apple.com [Sun, 15 Sep 2013 02:25:14 +0000 (02:25 +0000)]
MediaStream API: Update RTCDataChannel

Reviewed by Sam Weinig.


Based on https://chromium.googlesource.com/chromium/blink/+/c6975c41956acded7cf0363012d7d6b69d0c6d96,
and https://chromium.googlesource.com/chromium/blink/+/214dab0bd6385f573c918ba5ce58a5aa206ce186.

No new tests, existing tests updated.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create): Take an options Dictionary.
(WebCore::RTCDataChannel::didChangeReadyState): String -> AtomicString. Early return if the
    state hasn't changed.
(WebCore::RTCDataChannel::binaryType): String -> AtomicString.
(WebCore::RTCDataChannel::setBinaryType): String -> AtomicString.
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createDataChannel): Take an options struct.
* platform/mediastream/RTCDataChannelHandler.h:

* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore::RTCDataChannelInit::RTCDataChannelInit): Take an options struct.


* fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
* fast/mediastream/RTCPeerConnection-datachannel.html:

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

6 years agoIt should be easy to add new nodes that do OSR forward rewiring in both DFG and FTL
fpizlo@apple.com [Sun, 15 Sep 2013 00:57:42 +0000 (00:57 +0000)]
It should be easy to add new nodes that do OSR forward rewiring in both DFG and FTL

Reviewed by Sam Weinig.

Forward rewiring is a tricky part of OSR that handles the following:

    a: Something(...)
       SetLocal(@a, locX)
    b: Int32ToDouble(@a)
    c: SomethingThatExits(@b)
       <no further uses of @a or @b>

Note that at @c, OSR will think that locX->@a, but @a will be dead. So it must be
smart enough to find @b, which contains an equivalent value. It must do this for
any identity functions we support. Currently we support four such functions.

Currently the code for doing this is basically duplicated between the DFG and the
FTL. Also both versions of the code have some really weirdly written logic for
picking the "best" identity function to use.

We should fix this by simply having a way to ask "is this node an identity
function, and if so, then how good is it?"  Then both the DFG and FTL could use
this and have no hard-wired knowledge of those identity functions.

While we're at it, this also changes some terminology because I found the use of
the word "needs" confusing. Note that this retains the somewhat confusing behavior
that we don't search all possible forward/backward uses. We only search one step
in each direction. This is because we only need to handle cases that FixupPhase
and the parser insert. All other code that tries to insert intermediate conversion
nodes should ensure to Phantom the original node. For example, the following
transformation is illegal:

    x: SomethingThatExits(@a)

    w: Conversion(@a)
    x: SomethingThatExits(@w)

The correct form of that transformation is one of these:

Correct #1:

    v: DoAllChecks(@a) // exit here
    w: Conversion(@a)
    x: Something(@w) // no exit

Correct #2:

    w: Conversion(@a)
    x: SomethingThatExits(@w)
    y: Phantom(@a)

Correct #3:

    w: Conversion(@a)
    x: SomethingThatExits(@w, @a)

Note that we use #3 for some heap accesses, but of course it requires that the
node you're using has an extra slot for a "dummy" use child.

Broadly speaking though, such transformations should be relegated to something
below DFG IR, like LLVM IR.

* dfg/DFGNodeType.h:
* dfg/DFGVariableEventStream.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:

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

6 years agoMediaStream API: Update RTCDataChannel to match the specification
eric.carlson@apple.com [Sun, 15 Sep 2013 00:50:17 +0000 (00:50 +0000)]
MediaStream API: Update RTCDataChannel to match the specification

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

Merged from https://chromium.googlesource.com/chromium/blink/+/c3862b0a83e20fc8b1f770c7e4a886a7cceb80d2
by Tommy Widenflycht.

According to WebRTC specification, RTCDataChannel must have the following new attributes:
boolean ordered
unsigned short maxRetransmitTime
unsigned short maxRetransmits
DOMString protocol
boolean negotiated
unsigned short id

and the following one was deprecated:
boolean reliable

Test updates will be landed with https://webkit.org/b/121102.

* Modules/mediastream/RTCDataChannel.cpp:
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* platform/mediastream/RTCDataChannelHandler.h:

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

6 years ago[CTTE] Node subclasses should take a Document by reference in their constructor ...
weinig@apple.com [Sun, 15 Sep 2013 00:39:29 +0000 (00:39 +0000)]
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 4)

Reviewed by Eric Carlson.

Converts the following to take a Document reference:
    - HTMLFormControlElement
    - HTMLFormControlElementWithState
    - HTMLMapElement
    - HTMLMarqueeElement
    - HTMLMediaElement
    - HTMLMenuElement
    - HTMLMetaElement
    - HTMLMeterElement
    - HTMLOListElement
    - HTMLObjectElement
    - HTMLOptGroupElement
    - HTMLOptionElement
    - HTMLOutputElement
    - HTMLParagraphElement
    - HTMLParamElement
    - HTMLProgressElement
    - HTMLScriptElement
    - HTMLSelectElement
    - HTMLSourceElement
    - HTMLSpanElement
    - HTMLStyleElement
    - HTMLSummaryElement
    - HTMLTableCellElement
    - HTMLTableElement
    - HTMLTableRowElement
    - HTMLTableSectionElement
    - HTMLTemplateElement
    - HTMLTextAreaElement
    - HTMLTextFormControlElement
    - HTMLTitleElement
    - HTMLTrackElement
    - HTMLUListElement
    - InlineStyleSheetOwner
    - LabelableElement
    - All the MediaControl elements

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

6 years agoXMLViewer_js and XMLViewer_css should be minified
joepeck@webkit.org [Sun, 15 Sep 2013 00:27:43 +0000 (00:27 +0000)]
XMLViewer_js and XMLViewer_css should be minified

Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* xml/XMLViewer.css:
* xml/XMLViewer.js:

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

6 years ago[MediaStream] remove MediaStream.label
eric.carlson@apple.com [Sun, 15 Sep 2013 00:16:35 +0000 (00:16 +0000)]
[MediaStream] remove MediaStream.label

Reviewed by Sam Weinig.

No new tests or modified tests, this attribute was apparently never tested.

* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:

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

6 years ago[mac] Check For Framework Include Consistency build phase checks the wrong framework
mitz@apple.com [Sat, 14 Sep 2013 21:35:47 +0000 (21:35 +0000)]
[mac] Check For Framework Include Consistency build phase checks the wrong framework

Reviewed by Mark Rowe.

* Scripts/check-for-webkit-framework-include-consistency: Replaced hard-coded paths to
WebKit.framework’s Headers and PrivateHeaders directories with the current target’s
public and private headers folder paths. Also tweaked the error messages’ format to make
Xcode recognize them as errors.

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

6 years agoRemove non-Apple cruft from the installed WKBase.h
mitz@apple.com [Sat, 14 Sep 2013 21:33:53 +0000 (21:33 +0000)]
Remove non-Apple cruft from the installed WKBase.h

Reviewed by Darin Adler.

* Configurations/WebKit2.xcconfig: Set INSTALLHDRS_SCRIPT_PHASE to YES.
* WebKit2.xcodeproj/project.pbxproj: Added a script build phase that runs unifdef on
the installed WKBase.h with __APPLE__ defined and various BUILDING_* and WTF_USE_* symbols

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

6 years ago[CTTE] Node subclasses should take a Document by reference in their constructor ...
weinig@apple.com [Sat, 14 Sep 2013 21:33:13 +0000 (21:33 +0000)]
[CTTE] Node subclasses should take a Document by reference in their constructor (Part 3)

Reviewed by Darin Adler.

Converts the following to take a Document reference:
    - DeleteButton
    - DetailsContentElement
    - DetailsMarkerControl
    - DetailsSummaryElement
    - HTMLBDIElement
    - HTMLBRElement
    - HTMLBaseElement
    - HTMLBaseFontElement
    - HTMLButtonElement
    - HTMLCanvasElement
    - HTMLDListElement
    - HTMLDataListElement
    - HTMLDetailsElement
    - HTMLDirectoryElement
    - HTMLDivElement
    - HTMLEmbedElement
    - HTMLFieldSetElement
    - HTMLFontElement
    - HTMLFormElement
    - HTMLFrameElement
    - HTMLFrameSetElement
    - HTMLHRElement
    - HTMLHeadElement
    - HTMLHeadingElement
    - HTMLHtmlElement
    - HTMLIFrameElement
    - HTMLImageElement
    - HTMLInputElement
    - HTMLKeygenElement
    - HTMLLIElement
    - HTMLLabelElement
    - HTMLLegendElement
    - HTMLLinkElement
    - HTMLModElement
    - HTMLPreElement
    - HTMLQuoteElement
    - HTMLTableCaptionElement
    - HTMLTableColElement
    - ImageDocumentElement
    - KeygenSelectElement
    - SummaryContentElement
    - UploadButtonElement

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

6 years agoREGRESSION(r155228): Call to DragData::asFragment() nullifies PassRefPtr<Range> in...
zandobersek@gmail.com [Sat, 14 Sep 2013 21:11:48 +0000 (21:11 +0000)]
REGRESSION(r155228): Call to DragData::asFragment() nullifies PassRefPtr<Range> in documentFragmentFromDragData

Reviewed by Darin Adler.

* page/DragController.cpp:
(WebCore::documentFragmentFromDragData): Pass the naked pointer as the PassRefPtr<Range> argument to the DragData::asFragment()
call. The naked pointer will get wrapped and protected by a new PassRefPtr. Passing the original PassRefPtr will also create
a new PassRefPtr, but will leak the reference of the original one, leaving its pointer nullified.

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

6 years agoUnreviewed GTK build fix after r155774.
zandobersek@gmail.com [Sat, 14 Sep 2013 20:59:01 +0000 (20:59 +0000)]
Unreviewed GTK build fix after r155774.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Temporarily skip generation of bindings for the Console::profile() and Console::profileEnd() methods
as they're not correctly generated for the moment.

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

6 years agoRename IntegerBranch/IntegerCompare to Int32Branch/Int32Compare.
fpizlo@apple.com [Sat, 14 Sep 2013 20:21:18 +0000 (20:21 +0000)]
Rename IntegerBranch/IntegerCompare to Int32Branch/Int32Compare.

Rubber stamped by Mark Hahnenberg.

* dfg/DFGSpeculativeJIT.cpp:
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:

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

6 years agoShrink the nameToPseudoTypeMap function
darin@apple.com [Sat, 14 Sep 2013 20:15:46 +0000 (20:15 +0000)]
Shrink the nameToPseudoTypeMap function

Reviewed by Andreas Kling.

* css/CSSSelector.cpp:
(WebCore::populatePseudoTypeByNameMap): Replaces the old nameToPseudoTypeMap
function. Use a table instead of lots of globals and unrolled code to set up
the map.
(WebCore::CSSSelector::parsePseudoType): Updated to use the code above, and
also use a different style that's tighter.

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

6 years agoShrink the listMarkerText function
darin@apple.com [Sat, 14 Sep 2013 20:11:05 +0000 (20:11 +0000)]
Shrink the listMarkerText function

Reviewed by Andreas Kling.

Changed code to use StringBuilder, which is a better fit for what we are
doing here. But mainly, inlining was out of hand, so hit that with the
NEVER_INLINE stick. Might be worth revisiting this to optimize further for
speed by making StringBuilder better at this.

* rendering/RenderListMarker.cpp:
(WebCore::toRoman): NEVER_INLINE and use StringBuilder.
(WebCore::toAlphabeticOrNumeric): Use StringBuilder.
(WebCore::toSymbolic): NEVER_INLINE and use StringBuilder.
(WebCore::toAlphabetic): Ditto.
(WebCore::toNumeric): Ditto.
(WebCore::toHebrewUnder1000): NEVER_INLINE.
(WebCore::toHebrew): NEVER_INLINE and use StringBuilder.
(WebCore::toArmenianUnder10000): NEVER_INLINE.
(WebCore::toArmenian): NEVER_INLINE and use StringBuilder.
(WebCore::toGeorgian): NEVER_INLINE and use StringBuilder.
(WebCore::toCJKIdeographic): NEVER_INLINE and use StringBuilder.
(WebCore::listMarkerText): Use StringBuilder.

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

6 years ago[CTTE] Node subclasses should take a Document by reference in their
weinig@apple.com [Sat, 14 Sep 2013 19:51:53 +0000 (19:51 +0000)]
[CTTE] Node subclasses should take a Document by reference in their
constructor (HTMLAnchorElement, HTMLAppletElement, HTMLAreaElement, HTMLAudioElement)

Reviewed by Andreas Kling.

* editing/CreateLinkCommand.cpp:
* editing/UnlinkCommand.cpp:
* html/HTMLAnchorElement.cpp:
* html/HTMLAnchorElement.h:
* html/HTMLAppletElement.cpp:
* html/HTMLAppletElement.h:
* html/HTMLAreaElement.cpp:
* html/HTMLAreaElement.h:
* html/HTMLAudioElement.cpp:
* html/HTMLAudioElement.h:
* html/HTMLTagNames.in:
* html/HTMLViewSourceDocument.cpp:
* page/DragController.cpp:

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