<rdar://problem/12695827> PPT: Make loading file URLs work with a sandboxed NetworkProcess

        Reviewed by Sam Weinig.

        * DerivedSources.make: Preprocess a .sb.in file to build the profile.

        * NetworkProcess/mac/NetworkProcessMac.mm:
        Don't prevent entering the sandbox. Override sandbox path, because service
        gets a differnt one by default.

        * WebKit2.xcodeproj/project.pbxproj:
        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Never store empty credentials in NetworkJob::storeCredentials
https://bugs.webkit.org/show_bug.cgi?id=108387

Patch by Joe Mason <jmason@rim.com> on 2013-01-30
Reviewed by Yong Li.

There is a code path that can cause NetworkJob::storeCredentials to be called with empty
credentials, causing the existing credentials to be overwritten even though authentication
succeeded.  PR 287791 has been filed to investigate why this happens; in the meantime, ignore empty
credentials.

Internal PR: 281172
Internally Reviewed By: Leo Yang

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::storeCredentials):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r141205.
http://trac.webkit.org/changeset/141205
https://bugs.webkit.org/show_bug.cgi?id=108353

Command for running tests on windows needs to be investigated.
(Requested by lforschler on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-30

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: IDBKeyRange::isOnlyKey() does pointer equality comparison
https://bugs.webkit.org/show_bug.cgi?id=107582

Reviewed by Tony Chang.

Per the bug title, IDBKeyRange::isOnlyKey() was testing the upper/lower pointers to
determine if this was a "trivial" range, which can be used to fast-path lookups. This
is insufficient in multi-process ports where range values may be thrown across the wire.
This is addressed by using the existing key equality tests.

In addition, the bounds type check incorrectly checked m_lowerType == LowerBoundOpen, which
meant the function could never return true (since upper == lower implies closed bounds).
Therefore, the fast-path case wasn't used even in single-process ports (e.g. DRT). The
slow-path case contructed a backing store cursor over the range, and exited early if the
cursor yielded nothing. The fast-path case doesn't need to create a cursor, so needs to
deal with lookup misses. This revealed two similar (but trivial) lurking bugs in the
fast-path.

No new behavior; covered by tests such as: storage/indexeddb/get-keyrange.html

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::getRecord): Handle backing store read miss case.
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::GetOperation::perform): Handle backing store read miss case.
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::isOnlyKey): Compare keys by value, not pointer, correct
type checks, add assertions.
* Modules/indexeddb/IDBKeyRange.h:
(IDBKeyRange): Move implementation to CPP file.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mark tests as failing after r141303.

These tests were rebaselined before the bots had correct results. This change
marks these tests as [ ImageOnlyFailure Pass ] again while the bots catch up.

Unreviewed test expectations update.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, update expectations for Win/Mac
Rebaseline one more textarea test on Linux.

* platform/chromium-linux/fast/forms/placeholder-position-expected.png:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modify runtests.py script so that --skip-failing-tests option is not added when platform is cygwin.

Rubberstamped by Timothy Horton.

* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a StringTypeAdapter for ASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=108338

Reviewed by Benjamin Poulain.

Source/WTF:

Add StringTypeAdapter for ASCIILiteral type so that concatenation of an
ASCIILiteral and a String using + operator is efficiently handled.

* wtf/text/StringConcatenate.h:
* wtf/text/StringOperators.h:
(WTF::operator+): Inline some of the operator+ functions that were not
yet.
(WTF):

Tools:

Add API tests for operator+() taking an ASCIILiteral.

* TestWebKitAPI/Tests/WTF/StringOperators.cpp:
(TestWebKitAPI::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, update expectations Linux 32 textarea tests.

* platform/chromium-linux-x86/fast/dom/HTMLTextAreaElement/reset-textarea-expected.png: Removed.
* platform/chromium-linux-x86/fast/forms/form-element-geometry-expected.png: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement KeyboardEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=108320

Reviewed by Adam Barth.

Source/WebCore:

This patch implements KeyboardEvent constructor under a DOM4_EVENTS_CONSTRUCTOR flag,
which is enabled on Chromium and Safari.

This significantly simplifies a code to construct a KeyboardEvent.

Before:
  e = document.createEvent("KeyboardEvent");
  e.initKeyboardEvent("keypress", true, true, null, false, false, false, false, 0, 0);

After:
  e = new KeyboardEvent("keypress");

Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm

- 'char' and 'code' are not yet supported due to lack of WebCore implementation.

- 'altGraphKey' is not supported because it's an extended attribute in WebKit
and is not speced.

- Renamed keyboard event constant variables to avoid style errors.

Test: fast/events/constructors/keyboard-event-constructor.html

* dom/KeyboardEvent.cpp:
(WebCore::keyLocationCode):
(WebCore::KeyboardEventInit::KeyboardEventInit):
(WebCore):
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
(WebCore):
(WebCore::KeypressCommand::KeypressCommand):
(KeypressCommand):
(KeyboardEventInit):
(KeyboardEvent):
(WebCore::KeyboardEvent::create):
(WebCore::KeyboardEvent::keyIdentifier):
(WebCore::KeyboardEvent::keyLocation):
(WebCore::KeyboardEvent::altGraphKey):
(WebCore::KeyboardEvent::keyEvent):
(WebCore::KeyboardEvent::keypressCommands):
* dom/KeyboardEvent.idl:

Source/WebKit/chromium:

Renamed keyboard event constant variables to avoid style errors.

* src/WebInputEventConversion.cpp:
(WebKit::WebKeyboardEventBuilder::WebKeyboardEventBuilder):
* tests/WebInputEventConversionTest.cpp:
* tests/WebInputEventFactoryTestGtk.cpp:

LayoutTests:

Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm

This patch implements KeyboardEvent constructor under a DOM4_EVENTS_CONSTRUCTOR flag,
which is enabled on Chromium and Safari.

* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/dom/dom-constructors-expected.txt:
* fast/dom/dom-constructors.html:
* fast/events/constructors/keyboard-event-constructor-expected.txt: Added.
* fast/events/constructors/keyboard-event-constructor.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, update expectations on Mac for textarea change.

* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/overflow/textarea-scroll-touch-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make JSEventListener more robust in the event of the compiled handler being released.
https://bugs.webkit.org/show_bug.cgi?id=108390

Reviewed by Michael Saboff.

It shouldn't be possible for a handler to be collected for any object that
might still trigger an event.  Nonetheless it does still happen, and the
only point of failure that currently exists is compiling the handler.

This patch is mostly just assertions, but also removes a bunch of field
clearing that was previously being performed.  Given we do seem to periodically
end up needing to recompile a handler this appears to be necessary.  That
said there does not appear to be a memory hit from this as the event handlers
that make us use JSLazyEventListener are not frequently compiled, and the bulk
of the functions that are compiled end up causing us to keep the strings around
anyway.

* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener):
(WebCore::JSLazyEventListener::initializeJSFunction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable tests for Windows EWS!
https://bugs.webkit.org/show_bug.cgi?id=107968.
Patch by Lucas Forschler.

Reviewed by Adam Barth.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Store both proxy and host credentials simultaneously for NetworkJob
https://bugs.webkit.org/show_bug.cgi?id=108388

Patch by Joe Mason <jmason@rim.com> on 2013-01-30
Reviewed by Yong Li.

The platform NetworkRequest interface has been updated again, to store both a proxy and host
credential for each request (to prevent an infinite loop when a request authenticates against a
proxy but fails the host authentication, and then the followup contains the host credential but not
the proxy credential so it fails proxy authentication, so the next followup contains the proxy
credential but not the host credential...)

Complying with the new interface requires the host and proxy challenge to be stored separately in
webkit so they can both be added to the same NetworkRequest.

Internal PR: 281172
Internal Reviewer: Leo Yang

* platform/network/ResourceHandleInternal.h:
(ResourceHandleInternal):
* platform/network/blackberry/AuthenticationChallenge.h:
(WebCore::AuthenticationChallenge::hasCredentials):
(AuthenticationChallenge):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore::NetworkJob::handleRedirect):
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::storeCredentials):
(WebCore):
(WebCore::NetworkJob::purgeCredentials):
(WebCore::NetworkJob::notifyChallengeResult):
(WebCore::NetworkJob::updateCurrentWebChallenge):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::setAuthCredentials):
(WebCore):
(WebCore::NetworkManager::startJob):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Remove speculative dispatchEvent crash fix now that root cause is addressed
https://bugs.webkit.org/show_bug.cgi?id=108131

Reviewed by Tony Chang.

A patch was landed in r140027 to prevent a null pointer crash in
IDBRequest::dispatchEvent and confirm the source of the crash (which
we couldn't repro locally). Following confirmation from user reports,
the root cause was tracked down to a race condition in MessageQueue,
and was fixed in r140483. This patch is no longer needed, and there's
always been an ASSERT in place to catch regressions while debugging.

No new tests - no behavior change.

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent): Remove extraneous test.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add WebFrame::visibleContentRect()
https://bugs.webkit.org/show_bug.cgi?id=108311

Patch by Tien-Ren Chen <trchen@chromium.org> on 2013-01-30
Reviewed by James Robinson.

* public/WebFrame.h:
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::visibleContentRect):
(WebKit):
* src/WebFrameImpl.h:
(WebFrameImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable process suppression of DumpRenderTree on Mac
https://bugs.webkit.org/show_bug.cgi?id=108400

Patch by Kiran Muppala <cmuppala@apple.com> on 2013-01-30
Reviewed by Jessie Berlin.

* DumpRenderTree/mac/DumpRenderTree.mm:
(prepareConsistentTestingEnvironment): Take assertion to prevent
process suppression.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tests for spellcheck behavior
https://bugs.webkit.org/show_bug.cgi?id=108405

Patch by Rouslan Solomakhin <rouslan@chromium.org> on 2013-01-30
Reviewed by Tony Chang.

* editing/spelling/resources/util.js: Added. Boilerplate for spellcheck tests.
* editing/spelling/spelling-double-clicked-word.html: Added. Spelling should work for double-clicked misspellings.
* editing/spelling/spelling-double-clicked-word-with-underscores.html: Added. Underscores should be treated as whitespace: spelling should ignore them.
* editing/spelling/spelling-exactly-selected-multiple-words.html: Added. Spelling should work when the user selects a multi-word misspelling exactly.
* editing/spelling/spelling-exactly-selected-word.html: Added. Spelling should work when the user selects the misspelled word exactly.
* editing/spelling/spelling-multiword-selection.html: Added. Spelling should be disabled when user selects multiple words that are not a single misspelling.
* editing/spelling/spelling-should-select-multiple-words.html: Added. Spellcheck should select multi-word misspellings on context click.
* editing/spelling/spelling-should-select-single-word.html: Added. Spellcheck should select the misspelled word on context click.
* editing/spelling/spelling-subword-selection.html: Added. Spelling should be disabled when user selects a part of misspelling.
* editing/spelling/spelling-with-punctuation-selection.html: Added. Punctuation marks should be treated as whitespace: spelling should ignore them.
* editing/spelling/spelling-with-underscore-selection.html: Added. Underscores should be treated as whitespace: spelling should ignore them.
* editing/spelling/spelling-with-whitespace-selection.html: Added. Spelling should ignore whitespace.
* editing/spelling/spelling-double-clicked-word-expected.txt: Added.
* editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt: Added.
* editing/spelling/spelling-exactly-selected-multiple-words-expected.txt: Added.
* editing/spelling/spelling-exactly-selected-word-expected.txt: Added.
* editing/spelling/spelling-multiword-selection-expected.txt: Added.
* editing/spelling/spelling-should-select-multiple-words-expected.txt: Added.
* editing/spelling/spelling-should-select-single-word-expected.txt: Added.
* editing/spelling/spelling-subword-selection-expected.txt: Added.
* editing/spelling/spelling-with-punctuation-selection-expected.txt: Added.
* editing/spelling/spelling-with-underscore-selection-expected.txt: Added.
* editing/spelling/spelling-with-whitespace-selection-expected.txt: Added.
* platform/chromium/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/efl/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/gtk/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/mac/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/qt/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/wincairo/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/win/TestExpectations: Skip the tests until the platform implements the behavior.
* platform/wk2/TestExpectations: Skip the tests until the platform implements the behavior.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a concept of dashboard parameters that invalidate others
https://bugs.webkit.org/show_bug.cgi?id=108362

Reviewed by Dirk Pranke.

There are certain parameters to the dashboards, that when selected,
invalidate others, such as selecting the test type invalidates the
builder group. Add this concept to dashboard_base and allow specifc
dashboard to add their own invalidating parameters.

The result is that when the user takes a specific action, like changing
the test type, the builder would get reset to the default for the new
test type, rather than erroring or not matching the query param, as is
the current behavior.

Also deletes some unused code (selectBuilder).

* TestResultServer/static-dashboards/dashboard_base.js:
(invalidateQueryParameters):
(setQueryParameter):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
* TestResultServer/static-dashboards/timeline_explorer.html:
* TestResultServer/static-dashboards/treemap.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Start sending scrollType as NonBubblingGesture for flings
https://bugs.webkit.org/show_bug.cgi?id=108372

Patch by Yusuf Ozuysal <yusufo@google.com> on 2013-01-30
Reviewed by James Robinson.

Source/Platform:

Using the newly defined scrollType layerTreeHostImpl will stop bubbling flings to
parent layers. It will only bubble if the child layer is at the end of its scroll
range

* chromium/public/WebInputHandlerClient.h:

Source/WebKit/chromium:

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleGestureFling):

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