REGRESSION (r167652): Broke fast/regions/cssom/region-range-for-box-crash.html in debug mode
https://bugs.webkit.org/show_bug.cgi?id=131982

Reviewed by David Hyatt.

Source/WebCore:
The problem was creating the Range from the arguments received at RenderView::setSelection(). Specifically
in this test endPos is 1 when the element has not children which creates an invalid Range.

* rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees): Pass 0 as startPos and endPos to Range::create() as we are
not interested in the positions at this point.

LayoutTests:
* TestExpectations: Unskip fast/regions/cssom/region-range-for-box-crash.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript() needs to acquire the JSLock before calling into JS.
<https://webkit.org/b/132021>

Reviewed by Mark Hahnenberg.

Covered by existing layout test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Make sure columnTranslationForOffset has the same column-span-aware
translation that fragment collection does.
https://bugs.webkit.org/show_bug.cgi?id=131738

Reviewed by Anders Carlsson.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments):
Remove a FIXME that is no longer needed, since the translation offset of the 
column set did get patched.

(WebCore::RenderMultiColumnSet::columnTranslationForOffset):
Add the exact same fix to columnTranslationForOffset that was applied to collectLayerFragments.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] widows/orphans cause assertion failures.
https://bugs.webkit.org/show_bug.cgi?id=131233

Reviewed by Dean Jackson.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::recordSpaceShortage):
Fix an obvious bug where the space shortage is recorded twice (and the
if statement that kept it from being negative is accidentally ignored).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[OS X] Glyph spacing for system fonts may be incorrect
https://bugs.webkit.org/show_bug.cgi?id=131967

Reviewed by Simon Fraser.

Source/WebCore:
Covered by existing tests.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts
(WebCore::hasCustomTracking):

LayoutTests:
Updating test to be more robust.

* fast/forms/search/intrinsic-search-width-with-decoration-border-padding-expected.txt:
* fast/forms/search/intrinsic-search-width-with-decoration-border-padding.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: JSRegress's js/slow-stress/new-spread.html fails sometimes
https://bugs.webkit.org/show_bug.cgi?id=132022
<rdar://problem/16690671>

* TestExpectations:
Mark the test as flaky pass/fail/timeout, because that's what it is.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[OS X] Glyph spacing for system fonts may be incorrect
https://bugs.webkit.org/show_bug.cgi?id=131967

Unreviewed build fix after r167679.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::hasCustomTracking):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused local variable
https://bugs.webkit.org/show_bug.cgi?id=132020

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-22
Reviewed by Alexey Proskuryakov.

* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectPopover initWithView:hasGroups:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[OS X] Glyph spacing for system fonts may be incorrect
https://bugs.webkit.org/show_bug.cgi?id=131967

Unreviewed iOS build fix after r167679.

* platform/graphics/mac/SimpleFontDataMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r151839): Subframe keeps getting mousemove events with the same coordinates after hiding a hovered element.
<https://webkit.org/b/131974>
<rdar://problem/15907469>

Source/WebCore:
When the currently hovered element disappears as a result of style recalc,
we send a fake mousemove event to the page, to see if anything newly added
should become hovered.

The faking mechanism lives in EventHandler and simply synthesizes a new
mousemove event using the last seen mouse location.

The problem here is that we were sending this fake mousemove event to the
subframe where the hovered element lived. Since subframes aren't kept up
to date on recent mouse locations, this could cause some strange behavior
where a subframe would dispatch mousemove events with stale coordinates.

The solution is to always dispatch fake mousemove events from the main
frame's event handler. This is how real event delivery happens, and hit
testing will then find the appropriate subframe, if any.

Reviewed by Benjamin Poulain.

Test: fast/events/ghostly-mousemoves-in-subframe.html

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

LayoutTests:
Add a test that triggers the weirdness where removing the renderer from
a hovered element in a subframe would leave the subframe's EventHandler
in a state where it could dispatch fake mousemove events with stale
coordinates in response to style recalc.

Note that the final 500ms delay is because fake mousemove events are
sent on 250ms delay timers so we need to give it some time to catch up.

Reviewed by Benjamin Poulain.

* fast/events/ghostly-mousemoves-in-subframe-expected.txt: Added.
* fast/events/ghostly-mousemoves-in-subframe.html: Added.
* platform/mac-wk2/fast/events/resources/ghostly-mousemoves-in-subframe-the-actual-subframe.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Support Python 2.7 in Cygwin
https://bugs.webkit.org/show_bug.cgi?id=132023

Reviewed by Michael Saboff.


Source/JavaScriptCore: 
* DerivedSources.make: Use a conditional variable to define
the path to Python/Perl.

Source/WebCore: 
* DerivedSources.make: Use proper path to Cygwin on
all platforms.

Source/WebInspectorUI: 
* WebInspectorUI.vcxproj/build-webinspectorui.sh: use
proper path to Python under Cygwin.

Source/WebKit: 
* WebKit.vcxproj/WebKit/WebKitVersion.cmd: Use correct
path to Python under Cygwin.

Source/WTF: 
* WTF.vcxproj/WTFGenerated.make: Use proper path to Python.

Tools: 
* Scripts/webkitdirs.pm:
(checkInstalledTools): Remove check for Python 2.7, since
it now works properly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r167674.
https://bugs.webkit.org/show_bug.cgi?id=132025

Going a different way with this (Requested by bradee-oh on
#webkit).

Reverted changeset:

"Change Image Controls replacement to use selection and paste"
https://bugs.webkit.org/show_bug.cgi?id=131992
http://trac.webkit.org/changeset/167674

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