[iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
https://bugs.webkit.org/show_bug.cgi?id=135629
<rdar://problem/17802174>

Reviewed by Tim Horton.

Source/WebCore:

In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
which holds raw pointers to them.

However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
sometimes non-empty at this point. When that happened, we would destroy nodes which
were still referenced by m_stateNodeMap, with the result that a later query for the
same nodeID would hand back a pointer to a deleted object.

Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
before clearing it, which removes them and all their descendants from the state node map.

Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html

* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::commit):

LayoutTests:

Testcase with nesting of frames inside fixed inside frames, where a subframe disconnects
part of the scrolling tree.

* platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/leaf-frame.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/subframe-inside-fixed.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix resource leak of unclosed file descriptor.
https://bugs.webkit.org/show_bug.cgi?id=135417

Patch by Przemyslaw Kuczynski <p.kuczynski@samsung.com> on 2014-08-05
Reviewed by Darin Adler.

When open returns zero, fd handle leaks. Checking (fd > 0) needs to be replaced
with (fd != -1).

* assembler/MacroAssemblerARM.cpp:
(JSC::isVFPPresent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172113 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Build attempts to use ANGLE when not building WebGL.
https://bugs.webkit.org/show_bug.cgi?id=135630
<rdar://problem/135630>

Unreviewed build fix.

* platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
inside USE(3D_GRAPHICS) guard.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] simctl can hang if run quickly after shutting down CoreSimulator services
https://bugs.webkit.org/show_bug.cgi?id=135626

Reviewed by Dan Bernstein.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_test_run):
Remove call to simctl shutdown <device> - telling the simulator app to quit
will shut down all booted devices.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [CSS Shapes] Layout test fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html fails
https://bugs.webkit.org/show_bug.cgi?id=135585

Reviewed by Zoltan Horvath.

The positioning was dependent on the font metrics of the <p> tag,
which differs between platforms. This fixes that, which should make
the test pass on all platforms.

* fast/shapes/shape-outside-floats/shape-outside-image-shape-margin-expected.html:
* fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html:
* platform/gtk/TestExpectations:


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