prepare-ChangeLog throws false positive warnings for modified files.
https://bugs.webkit.org/show_bug.cgi?id=130687

Reviewed by Darin Adler.

* Scripts/prepare-ChangeLog:
(originalFile): Ignore git commit paremeter.
We don't need this to get the unmodified file.
(extractLineRangeBeforeChange):
Simplify the if statement. Follow-up after r166189.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
<http://webkit.org/b/130713>
<rdar://problem/15661876>

Reviewed by Darin Adler.

Merged from Blink (patch by Ian Beer):
http://crbug.com/303657
https://src.chromium.org/viewvc/blink?view=rev&revision=158938

Source/WebCore:

Test: fast/forms/form-submission-crash-successful-submit-button.html

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submit):

LayoutTests:

* fast/forms/form-submission-crash-successful-submit-button-expected.txt: Added.
* fast/forms/form-submission-crash-successful-submit-button.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
media/W3C/audio/canPlayType/canPlayType_application_octet_stream.html frequently fails on EWS
https://bugs.webkit.org/show_bug.cgi?id=130720

* platform/mac/TestExpectations: Marked as flaky.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent 'removetrack' events from firing when all inband text tracks are removed.
https://bugs.webkit.org/show_bug.cgi?id=130704

Reviewed by Eric Carlson.

Source/WebCore: 

Test: media/track/track-remove-track.html

Based on the Blink change (patch by acolwell@chromium.org):
https://codereview.chromium.org/177243018/

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad): Reorder steps to match W3C specification.
(WebCore::HTMLMediaElement::noneSupported): Forget tracks as required by specification.
(WebCore::HTMLMediaElement::mediaLoadingFailed): Forget tracks as required by specification.
(WebCore::HTMLMediaElement::removeTextTrack): Only request the 'removetracks' event if
requested by caller.
(WebCore::HTMLMediaElement::removeAllInbandTracks): Renamed to 'forgetResourceSpecificTracks'
(WebCore::HTMLMediaElement::noneSupported): Specify that we want the 'removetracks' event
fired for this use case.
(WebCore::HTMLMediaElement::prepareForLoad): Switch to new 'forgetResourceSpecificTracks' name.
* html/HTMLMediaElement.h:
* html/track/TextTrackList.cpp:
(TextTrackList::remove): Only fire the 'removetrack' event if the caller requests it.
* html/track/TextTrackList.h: Add default argument to fire the 'removetrack' event
when removing a track.
* html/track/TrackListBase.cpp:
(TrackListBase::remove): Only fire the 'removetrack' event if the caller requests it.
* html/track/TrackListBase.h: Add default argument to fire the 'removetrack' event.

LayoutTests: 

Based on the Blink change (patch by acolwell@chromium.org):
https://codereview.chromium.org/177243018/

* media/track/track-remove-track-expected.txt: Added.
* media/track/track-remove-track.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove the autotools build
https://bugs.webkit.org/show_bug.cgi?id=130717

Reviewed by Anders Carlsson.

.:

* .gitignore: Remove references to autotools files.
* GNUmakefile.am: Removed.
* Source/autotools/CheckSystemAndBasicDependencies.m4: Removed.
* Source/autotools/CustomMacros.m4: Removed.
* Source/autotools/FindDependencies.m4: Removed.
* Source/autotools/PrintBuildConfiguration.m4: Removed.
* Source/autotools/ReadCommandLineArguments.m4: Removed.
* Source/autotools/SetupAutoconfHeader.m4: Removed.
* Source/autotools/SetupAutomake.m4: Removed.
* Source/autotools/SetupCompilerFlags.m4: Removed.
* Source/autotools/SetupLibtool.m4: Removed.
* Source/autotools/SetupWebKitFeatures.m4: Removed.
* Source/autotools/Versions.m4: Removed.
* Source/autotools/acinclude.m4: Removed.
* Source/autotools/dolt.m4: Removed.
* Source/autotools/gsettings.m4: Removed.
* Source/cmake/OptionsGTK.cmake:
* autogen.sh: Removed.
* configure.ac: Removed.

Source/JavaScriptCore:

* GNUmakefile.am: Removed.
* config.h: Remove references to the autotools configure file.

Source/Platform:

* GNUmakefile.am: Removed.

Source/ThirdParty:

* gtest/GNUmakefile.am: Removed.
* leveldb/GNUmakefile.am: Removed.

Source/ThirdParty/ANGLE:

* GNUmakefile.am: Removed.

Source/WebCore:

* GNUmakefile.am: Removed.
* bindings/gobject/GNUmakefile.am: Removed.
* config.h: Removed references to autotools configure file.

Source/WebCore/platform/gtk/po:

* GNUmakefile.am: Removed.

Source/WebInspectorUI:

* GNUmakefile.am: Removed.

Source/WebKit/gtk:

* GNUmakefile.am: Removed.

Source/WebKit2:

* GNUmakefile.am: Removed.
* WebKit2Prefix.h: Removed references to the autotools configure file.
* config.h: Ditto.

Source/WTF:

* GNUmakefile.am: Removed.
* config.h: Removed references to the autotools configure file.

Tools:

* DumpRenderTree/config.h: Remove references to the autotools configure file.
* GNUmakefile.am: Removed.
* GtkLauncher/GNUmakefile.am: Removed.
* GtkLauncher/main.c: Remove references to the autotools configure file.
* MiniBrowser/gtk/BrowserDownloadsBar.c: Ditto.
* MiniBrowser/gtk/BrowserSearchBar.c: Ditto.
* MiniBrowser/gtk/BrowserWindow.c: Ditto.
* MiniBrowser/gtk/GNUmakefile.am: Removed.
* MiniBrowser/gtk/main.c: Remove references to the autotools configure file.
* Scripts/build-webkit: No longer handle autotools.
* Scripts/run-gtk-tests: Ditto.
(TestRunner._setup_testing_environment):
* Scripts/run-launcher: Ditto.
* Scripts/webkitdirs.pm: Ditto.
* Scripts/webkitpy/common/config/contributionareas.py: Remove autotools as a contribution area.
* Scripts/webkitpy/common/config/contributors.json: Ditto.
* Scripts/webkitpy/port/gtk.py: No longer handle autotools.
* Scripts/webkitpy/style/checker.py:
* TestWebKitAPI/GNUmakefile.am: Removed.
* TestWebKitAPI/config.h: Remove references to the autotools configure file.
* WebKitTestRunner/GNUmakefile.am: Removed.
* WebKitTestRunner/WebKitTestRunnerPrefix.h: Ditto.
* gtk/GNUmakefile.am: Removed.
* gtk/common.py: Remove checks for the autotools build.
* gtk/symbols.filter: Renamed from Source/autotools/symbols.filter.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED in Parser: dst != localReg
https://bugs.webkit.org/show_bug.cgi?id=130710

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Just make sure we don't try to write to a captured constant,
following the change to track captured variables separately.

* bytecompiler/NodesCodegen.cpp:
(JSC::PostfixNode::emitResolve):
(JSC::PrefixNode::emitResolve):

LayoutTests:

New testcases.

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130732

Reviewed by Tim Horton.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView goBack:]):
(-[WKWebView goForward:]):
(-[WKWebView stopLoading:]):

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController validateUserInterfaceItem:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add some debug logging to an API test that's failing on Mountain Lion.

* TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
(-[DownloadDelegate _download:didReceiveResponse:]):
(-[DownloadDelegate _downloadDidFinish:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AST incorrectly conflates readable and writable locations
https://bugs.webkit.org/show_bug.cgi?id=130734

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We need to distinguish between "locations" that are valid for reading
and writing, vs those that may only be written.

* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
* parser/Nodes.h:
(JSC::ExpressionNode::isAssignmentLocation):

LayoutTests:

More tests

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Begin stubbing out a WKWindowFeatures class
https://bugs.webkit.org/show_bug.cgi?id=130733

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
* UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
(-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
(-[WKWindowFeatures x]):
(-[WKWindowFeatures y]):
(-[WKWindowFeatures width]):
(-[WKWindowFeatures height]):
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
InlineIterator position (unsigned int) variable can wrap around
https://bugs.webkit.org/show_bug.cgi?id=130540

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-03-25
Reviewed by Simon Fraser.

Source/WebCore:

We trigger an ASSERT that occurs when we are ignoring spaces (to collapse them
into a single whitespace mark) but then encounter a line break. Because we don't ignore
the first space (but do ignore subsequent spaces), when we hit a newline in an RTL context
we want to ignore that first space as well (so as not to push the text away from the right
edge). We do this by decrementing the InlineIterator pointing to this first space, so all
the spaces get ignored. However, if that space is the first character in a Text node, the
decrement will try to go past the beginning of the node, and trigger an ASSERT.

This design is not great. At some point we should rework it to more elegantly handle
collapsing whitespace in both RTL and LTR writing modes.

This patch adds an ASSERT earlier in this codepath to catch potential problems earlier.
It also pulls our sentinel value out into a separate boolean to make it more clear what is
going on.

Test: fast/text/whitespace-only-text-in-rtl.html

* rendering/InlineIterator.h:
(WebCore::InlineIterator::moveTo): Use the set***() calls
(WebCore::InlineIterator::setOffset): ASSERT early that our math hasn't wrapped
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::appendRunsForObject): Use new boolean value
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText): Guard against wraps
(WebCore::checkMidpoints): Use new boolean value
* rendering/line/TrailingObjects.cpp:
(WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Use new boolean value

LayoutTests:

This test triggers an ASSERT that occurs when we are ignoring spaces (to collapse them
into a single whitespace mark) but then encounter a line break. Because we don't ignore
the first space (but do ignore subsequent spaces), when we hit a newline in an RTL context
we want to ignore that first space as well (so as not to push the text away from the right
edge). We do this by decrementing the InlineIterator pointing to this first space, so all
the spaces get ignored. However, if that space is the first character in a Text node, the
decrement will try to go past the beginning of the node, and trigger an ASSERT.

This design is not great. At some point we should rework it to more elegantly handle
collapsing whitespace in both RTL and LTR writing modes.

* fast/text/whitespace-only-text-in-rtl-expected.txt: Added.
* fast/text/whitespace-only-text-in-rtl.html: Added.

Conflicts:
	LayoutTests/ChangeLog
	Source/WebCore/ChangeLog

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement ImageData constructors and WebWorkers exposure
https://bugs.webkit.org/show_bug.cgi?id=130668

Reviewed by Dean Jackson.

Source/WebCore:

Add new constructors for ImageData.

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation

Test: fast/canvas/canvas-imageData.html

* html/ImageData.cpp:
(WebCore::ImageData::create):
* html/ImageData.h:
* html/ImageData.idl:

LayoutTests:

Tests for ImageData constructors. Remove a false tests for constructors
from Philip's test suite.

* fast/canvas/canvas-imageData-expected.txt: Added.
* fast/canvas/canvas-imageData.html: Added.
* fast/canvas/script-tests/canvas-imageData.js: Added.
(testTransparentBlack):
* LayoutTests/canvas/philip/tests/2d.imageData.object.ctor.html: Removed.
* LayoutTests/canvas/philip/tests/2d.imageData.object.ctor-expected.txt: Removed.
* LayoutTests/js/dom/global-constructors-attributes-dedicated-worker-expected.txt
* LayoutTests/js/dom/global-constructors-attributes-shared-worker-expected.txt


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Playing video does not disable display sleep.
https://bugs.webkit.org/show_bug.cgi?id=130729

Reviewed by Eric Carlson.

DisplaySleepDisabler was broken by r161589, which replaced the iOS implementation with
an empty one. Make a platform independent version with a Cocoa-platform subclass. Update
the APIs to non-deprecated ones.

* platform/DisplaySleepDisabler.cpp: Added.
(WebCore::DisplaySleepDisabler::create):
* platform/DisplaySleepDisabler.h: Added.
(WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
* platform/cocoa/DisplaySleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.cpp.
(WebCore::DisplaySleepDisabler::create):
(WebCore::DisplaySleepDisablerCocoa::DisplaySleepDisablerCocoa):
(WebCore::DisplaySleepDisablerCocoa::~DisplaySleepDisablerCocoa):
* platform/cocoa/DisplaySleepDisablerCocoa.h: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.h.

Update m_sleepDisabler to be a std::unique_ptr, and unprotect the definition of methods which use it.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateSleepDisabling):
(WebCore::HTMLMediaElement::shouldDisableSleep):
* html/HTMLMediaElement.h:

Add the new and renamed files to the project:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r166126.

Rollout r166126 in prepartion to roll out prerequisite r166070

Reverted changeset:

"toThis() on a JSWorkerGlobalScope should return a JSProxy and
not undefined"
https://bugs.webkit.org/show_bug.cgi?id=130554
http://trac.webkit.org/changeset/166126


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r166070.

Rollout r166070 due to 2% performance loss in page load times

Reverted changeset:

"Change CodeGeneratorJS.pm special cases for "DOMWindow" to be
general purpose"
https://bugs.webkit.org/show_bug.cgi?id=130553
http://trac.webkit.org/changeset/166070


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Pass additional options to AVFoundation during playback.
https://bugs.webkit.org/show_bug.cgi?id=130624

Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::doesHaveAttribute): Return attribute value if the user
passes a pointer to fill in.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::doesHaveAttribute):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::doesHaveAttribute):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Pass additional
option if supplied by user.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix iOS build.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
Make WKIBActions OS X only for now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r166247. Un-platform-protect the declaration of HTMLMediaElement::shouldDisableSleep()
and make WebVideoFullscreenController's _displaySleepDisabler a std::unique_ptr.

* html/HTMLMediaElement.h:
* platform/mac/WebVideoFullscreenController.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add more properties to WKWindowFeatures
https://bugs.webkit.org/show_bug.cgi?id=130738

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
(-[WKWindowFeatures menuBarVisibility]):
(-[WKWindowFeatures statusBarVisibility]):
(-[WKWindowFeatures toolbarsVisibility]):
(-[WKWindowFeatures allowsResizing]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Further unreviewed build fix after r166247. Add DisplaySleepDisabler to the windows project file and
move the definition of DisplaySleepDisabler's constructor and destructor into the cpp file.

* WebCore.vcxproj/WebCore.vcxproj:
* platform/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
(WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
* platform/DisplaySleepDisabler.h:

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