Crash in ScrollingStateStickyNode::updateConstraints
https://bugs.webkit.org/show_bug.cgi?id=119638

Reviewed by Simon Fraser.

Ensure when a scrolling state node is removed from the state tree,
we remove both the current node and all its children from the
associated m_stateNodeMap lookup table.

Source/WebCore:

Test: fast/css/sticky/multiple-layers-sticky-crash.html

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::removeChild):
(WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
* page/scrolling/ScrollingStateNode.h:

LayoutTests:

* fast/css/sticky/multiple-layers-sticky-crash-expected.txt: Added.
* fast/css/sticky/multiple-layers-sticky-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XMLSerializer.serializeToString() should throw exception for invalid node value.
https://bugs.webkit.org/show_bug.cgi?id=121209

Reviewed by Darin Adler.

Source/WebCore:

FF and Opera 12 (pre blink/webkit) throw exception in case the node value is invalid.
Blink sends an empty string as the result of serializeToString operation with invalid node.
We should match with other browsers for throwing it as an exception.

Blink review URL: https://chromiumcodereview.appspot.com/23532055/

Test: fast/dom/xmlserializer-serialize-to-string-exception.html

* xml/XMLSerializer.cpp:
(WebCore::XMLSerializer::serializeToString):

LayoutTests:

* fast/dom/xmlserializer-serialize-to-string-exception-expected.txt: Added.
* fast/dom/xmlserializer-serialize-to-string-exception.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add jhbuild-wayland.modules
https://bugs.webkit.org/show_bug.cgi?id=120455

Reviewed by Gustavo Noronha Silva.

Current versions of gtk+, gdk-pixbuf and glib don't fit the requirement for wayland support.
With this patch, you can build extra gtk+, gdk-pixbuf and glib through jhbuild with exporting
WEBKIT_EXTRA_MODULESETS.

* gtk/jhbuild-wayland.modules: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Rebase after r155253.

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

* platform/qt-wk2/editing/style/style-boundary-005-expected.png: Added.
* platform/qt/editing/pasteboard/4989774-expected.png:
* platform/qt/editing/pasteboard/4989774-expected.txt:
* platform/qt/editing/pasteboard/paste-match-style-001-expected.png:
* platform/qt/editing/pasteboard/paste-match-style-001-expected.txt:
* platform/qt/editing/selection/caret-ltr-2-expected.png:
* platform/qt/editing/selection/caret-ltr-2-expected.txt:
* platform/qt/editing/selection/caret-ltr-2-left-expected.png:
* platform/qt/editing/selection/caret-ltr-2-left-expected.txt:
* platform/qt/editing/selection/caret-ltr-expected.png:
* platform/qt/editing/selection/caret-ltr-expected.txt:
* platform/qt/editing/selection/caret-ltr-right-expected.png:
* platform/qt/editing/selection/caret-ltr-right-expected.txt:
* platform/qt/editing/selection/caret-rtl-2-expected.png:
* platform/qt/editing/selection/caret-rtl-2-expected.txt:
* platform/qt/editing/selection/caret-rtl-2-left-expected.png:
* platform/qt/editing/selection/caret-rtl-2-left-expected.txt:
* platform/qt/editing/selection/caret-rtl-expected.png:
* platform/qt/editing/selection/caret-rtl-expected.txt:
* platform/qt/editing/selection/caret-rtl-right-expected.png:
* platform/qt/editing/selection/caret-rtl-right-expected.txt:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.png:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.txt:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.png:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.txt:
* platform/qt/editing/style/style-boundary-005-expected.png:
* platform/qt/editing/style/style-boundary-005-expected.txt:
* platform/qt/fast/forms/formmove3-expected.txt:
* platform/qt/fast/forms/input-align-image-expected.png:
* platform/qt/fast/forms/input-align-image-expected.txt:
* platform/qt/fast/forms/preserveFormDuringResidualStyle-expected.png:
* platform/qt/fast/forms/preserveFormDuringResidualStyle-expected.txt:
* platform/qt/fast/invalid/003-expected.png:
* platform/qt/fast/invalid/003-expected.txt:
* platform/qt/tables/mozilla/bugs/bug647-expected.png:
* platform/qt/tables/mozilla/bugs/bug647-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Moving myself to the commiters list.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add back c++11 features removed by buildfixes after all ports did the switch
https://bugs.webkit.org/show_bug.cgi?id=119266

Reviewed by Anders Carlsson.

* bytecode/GetByIdStatus.h:
(JSC::GetByIdStatus::GetByIdStatus):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::~Worklist):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::codeType):
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::print):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Auto GDB backtrace generation for EFL/GTK/Qt bots.
https://bugs.webkit.org/show_bug.cgi?id=119338

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-09-12
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/port/efl.py:
(EflPort.check_sys_deps):
(EflPort):
(EflPort._get_crash_log):
* Scripts/webkitpy/port/efl_unittest.py:
(EflPortTest.test_show_results_html_file):
(EflPortTest):
(EflPortTest.test_get_crash_log):
* Scripts/webkitpy/port/gtk.py:
(GtkPort._get_crash_log):
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_get_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log.py: Added.
(GDBCrashLogGenerator):
(GDBCrashLogGenerator.__init__):
(GDBCrashLogGenerator._get_gdb_output):
(GDBCrashLogGenerator.generate_crash_log):
(GDBCrashLogGenerator.generate_crash_log.match_filename):
* Scripts/webkitpy/port/linux_get_crash_log_unittest.py: Added.
(GDBCrashLogGeneratorTest):
(GDBCrashLogGeneratorTest.test_generate_crash_log):
(_mock_gdb_output):
* Scripts/webkitpy/port/qt.py:
(QtPort.default_child_processes):
(QtPort):
(QtPort._get_crash_log):
* Scripts/webkitpy/port/qt_unittest.py:
(QtPortTest.test_check_sys_deps):
(QtPortTest):
(QtPortTest.test_get_crash_log):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Inline PDF that are cached fail to appear in iframe.
https://bugs.webkit.org/show_bug.cgi?id=75449

Reviewed by Darin Adler.

Make sure 'frame is from page cache' flag is set for subframes too.

WebFrameLoaderClient::m_frameCameFromPageCache == true forces plugins
to be loaded manually. It ensures that the plugin raw data is fetched again
while the containing frame is being restored from the page cache.
(Plugins get destroyed when the frame goes to page cache.)

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
This gets called only on the frame where the actual history navigation happens.
(WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
This gets called for all the restored frames.

LayoutTests:

* fast/history/history-back-while-pdf-in-pagecache-expected.html: Added.
* fast/history/history-back-while-pdf-in-pagecache.html: Added.
* fast/history/resources/history-back-for-pfd-test.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Compile errors, missing include.
https://bugs.webkit.org/show_bug.cgi?id=121222

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

* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Include required header.
* platform/win/DragImageCairoWin.cpp: Include required header.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] TestWebKitAPI fails to link.
https://bugs.webkit.org/show_bug.cgi?id=121223

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

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add required symbol.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Changed expected results after turning on WTF_USE_TILED_BACKING_STORE (r133898)
https://bugs.webkit.org/show_bug.cgi?id=121227

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-09-12

* platform/efl/TestExpectations:
* platform/efl/editing/selection/caret-ltr-2-expected.png:
* platform/efl/editing/selection/caret-ltr-2-expected.txt:
* platform/efl/editing/selection/caret-ltr-2-left-expected.png:
* platform/efl/editing/selection/caret-ltr-2-left-expected.txt:
* platform/efl/editing/selection/caret-ltr-expected.png:
* platform/efl/editing/selection/caret-ltr-expected.txt:
* platform/efl/editing/selection/caret-rtl-2-expected.png:
* platform/efl/editing/selection/caret-rtl-2-expected.txt:
* platform/efl/editing/selection/caret-rtl-expected.png:
* platform/efl/editing/selection/caret-rtl-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK1] Block accelerated compositing under non-X11 displays
https://bugs.webkit.org/show_bug.cgi?id=121165

Reviewed by Martin Robinson.

This is analogous to the changes in r154728 and r154729 that enforce disabling accelerated compositing
under Wayland displays and made the RedirectedXCompositeWindow use in WebKit2 limited only to the X11 displays.

* WebCoreSupport/AcceleratedCompositingContextGL.cpp: Remove two unnecessary header includes that also
introduce symbols that conflict with the symbols defined in the X headers. Include the <gdk/gdkx.h> header
if the GTK+ dependency can provide it.
(WebKit::AcceleratedCompositingContext::initialize): Only set up the RedirectedXCompositeWindow instance
if running under an X11 display.
(WebKit::AcceleratedCompositingContext::renderLayersToWindow): The removal of the unnecessary header
inclusions also removed the std::max() injection into the global scope. Using std::max directly instead.
(WebKit::AcceleratedCompositingContext::scheduleLayerFlush): Ditto.
* webkit/webkitwebview.cpp:
(updateAcceleratedCompositingSetting): A helper function that ensures the accelerated compositing feature
stays disabled under Wayland displays. It also prints out a warning message the first time the user tries
to enable accelerated compositing under Wayland displays, telling that the feature is not supported and
will remain disabled.
(webkit_web_view_update_settings): Call updateAcceleratedCompositingSetting() to enable the feature if possible.
(webkit_web_view_settings_notify): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add rudimentary support for move-only types as values in HashMap
https://bugs.webkit.org/show_bug.cgi?id=121226

Reviewed by Andreas Kling.

Source/WTF:

* wtf/HashMap.h:
Change a bunch of functions to so they can take both rvalue and lvalue references and use std::forward.

* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
Change constructors to accept both lvalues and rvalues.

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
Add a HashMap<unsigned, MoveOnly> test.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121214.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceId):
(JSC::DebuggerCallFrame::clear):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::DebuggerCallFrame):
(JSC::DebuggerCallFrame::line):
(JSC::DebuggerCallFrame::column):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
(JSC::Interpreter::unwind):
(JSC::Interpreter::debug):

Source/WebCore: 

No new tests.

Also changed the Inspector's JavaScriptCallFrame to get the sourceID and
position info from its DebuggerCallFrame instead of caching those values.

* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::invalidate):
(WebCore::JavaScriptCallFrame::sourceID):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::update):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::createCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::atStatement):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::exception):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
(WebCore::ScriptDebugServer::didReachBreakpoint):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):
* bindings/js/WorkerScriptDebugServer.h:

Source/WebKit/mac: 

* webview/WebScriptDebugger.h:
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::WebScriptDebugger):
(WebScriptDebugger::callEvent):
(WebScriptDebugger::atStatement):
(WebScriptDebugger::returnEvent):
(WebScriptDebugger::exception):
(WebScriptDebugger::willExecuteProgram):
(WebScriptDebugger::didExecuteProgram):
(WebScriptDebugger::didReachBreakpoint):



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