Manage EllipsisBox objects with unique_ptr.
<https://webkit.org/b/123554>

Use smart pointers to store ellipsis boxes instead of new/delete.

Reviewed by Anders Carlsson.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gtk] Build is failing after r158317
https://bugs.webkit.org/show_bug.cgi?id=123544

Patch by Brendan Long <b.long@cablelabs.com> on 2013-10-30
Reviewed by Alexey Proskuryakov.

No new tests since this just fixes the build.

* GNUmakefile.list.am: Add JSCryptoKey.cpp and JSCryptoKey.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB Database versions are uint64_t, not int64_t
https://bugs.webkit.org/show_bug.cgi?id=123556

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* Modules/indexeddb/IDBBackingStoreInterface.h:

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::openConnection):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:

* Modules/indexeddb/IDBFactoryBackendInterface.h:

* Modules/indexeddb/IDBPendingOpenCall.h:
(WebCore::IDBPendingOpenCall::create):
(WebCore::IDBPendingOpenCall::version):
(WebCore::IDBPendingOpenCall::IDBPendingOpenCall):

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):

* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:

* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::open):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::open):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
(WebKit::WebProcessIDBDatabaseBackend::openConnection):
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r158299.
http://trac.webkit.org/changeset/158299
https://bugs.webkit.org/show_bug.cgi?id=123558

caused assertion failures in fast/canvas/canvas-color-
serialization.html and fast/forms/input-text-paste-
maxlength.html (Requested by rniwa on #webkit).

* wtf/text/StringStatics.cpp:
(WTF::StringImpl::empty):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[webcore/editing] remove extra header includes from cpp files.
https://bugs.webkit.org/show_bug.cgi?id=123524

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-30
Reviewed by Ryosuke Niwa.

Removing redundant header files.

* editing/AlternativeTextController.cpp:
* editing/ApplyBlockElementCommand.cpp:
* editing/ApplyStyleCommand.cpp:
* editing/BreakBlockquoteCommand.cpp:
* editing/DeleteButton.cpp:
* editing/DeleteButtonController.cpp:
* editing/DeleteSelectionCommand.cpp:
* editing/DictationCommand.cpp:
* editing/EditCommand.cpp:
* editing/EditingStyle.cpp:
* editing/EditorCommand.cpp:
* editing/FrameSelection.cpp:
* editing/IndentOutdentCommand.cpp:
* editing/InsertLineBreakCommand.cpp:
* editing/InsertParagraphSeparatorCommand.cpp:
* editing/MarkupAccumulator.h:
* editing/RemoveFormatCommand.cpp:
* editing/RenderedPosition.cpp:
* editing/ReplaceSelectionCommand.cpp:
* editing/SpellChecker.cpp:
* editing/SpellingCorrectionCommand.cpp:
* editing/SurroundingText.cpp:
* editing/TextCheckingHelper.cpp:
* editing/TextIterator.cpp:
* editing/TypingCommand.cpp:
* editing/VisibleSelection.cpp:
* editing/VisibleUnits.cpp:
* editing/WrapContentsInDummySpanCommand.cpp:
* editing/htmlediting.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: [EFL][GLES] OpenGL should be an optional
https://bugs.webkit.org/show_bug.cgi?id=123399

Reviewed by Noam Rosenthal.

* Source/cmake/OptionsEfl.cmake:
Refactor the check routine of GL dependencies to use OpenGL as optional.

Source/WebCore: [EFL][GLES] OpenGL should be optional
https://bugs.webkit.org/show_bug.cgi?id=123399

Reviewed by Noam Rosenthal.

* CMakeLists.txt: Make OpenGL dependencies as optional.
* PlatformEfl.cmake:
Move OpenGL macro to OptionsEfl.cmake and make Xcomposite and XRender as optional.
* platform/graphics/OpenGLESShims.h:
Removed GL_COLOR_ATTACHMENT0_EXT because it was added to gl2ext.h since r153064
* platform/graphics/surfaces/GraphicsSurfaceToken.h:
Removed wrong GLX guard.
(WebCore::GraphicsSurfaceToken::GraphicsSurfaceToken):
(WebCore::GraphicsSurfaceToken::operator!=):
(WebCore::GraphicsSurfaceToken::isValid):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
Removed unnecessary OpenGLShims.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] accessibility/textbox-role-reports-selection.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112017

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-31
Reviewed by Mario Sanchez Prada.

Source/WebCore:

getSelectionOffsetsForObject() now returns proper start/end offsets for
selections "touching" the object's front border.

No new tests, covered by existing ones.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getSelectionOffsetsForObject):

LayoutTests:

Removed failure expectations.

* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening. Add 5 printing tests to EFL TestExpectations.
EFL port doesn't fully support printing functionality yet.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add baselines for spelling tests added in r157900.

Unreviewed gardening.

* platform/efl/editing/spelling/centering-misspelling-dots-expected.png: Added.
* platform/efl/editing/spelling/centering-misspelling-dots-expected.txt: Added.
* platform/efl/editing/spelling/misspelling-dots-dont-extend-beyond-words-expected.png: Added.
* platform/efl/editing/spelling/misspelling-dots-dont-extend-beyond-words-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Undefined references to RenderObject::style() when disabling video support
https://bugs.webkit.org/show_bug.cgi?id=123492

Reviewed by Carlos Garcia Campos.

* platform/gtk/RenderThemeGtk2.cpp: Disabling video support removes indirect inclusion of the RenderElement.h
header, causing undefined references to RenderObject::style(). The RenderElement.h header should be included
instead of RenderObject.h as the former defines the RenderObject::style() inline and also includes the latter.
* platform/gtk/RenderThemeGtk3.cpp: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove stale optional native memory instrumentation protocol params
https://bugs.webkit.org/show_bug.cgi?id=123552

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-10-31
Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/Inspector.json:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
* inspector/InspectorTimelineAgent.h:

Source/WebInspectorUI:

* UserInterface/InspectorBackendCommands.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removing m_maxDeadCapacity condition in fast path in MemoryCache::prune().
https://bugs.webkit.org/show_bug.cgi?id=115631

Patch by Marcin Bychawski <m.bychawski@samsung.com> on 2013-10-31
Reviewed by Brent Fulgham.

If the m_maxDeadSize and m_deadSize are both 0, the method unnecessairly tries to prune resources.

No new tests, covered by existing ones.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::prune):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Rebaselining after r158186
https://bugs.webkit.org/show_bug.cgi?id=123571

Unreviewed gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-10-31

* platform/efl/editing/deleting/smart-delete-003-expected.txt: Rebaselining after r158186.
* platform/efl/editing/deleting/smart-delete-004-expected.txt: Rebaselining after r158186.
* platform/efl/editing/selection/after-line-wrap-expected.txt: Rebaselining after r157851.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Manage SVGPathByteStream through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=123467

Reviewed by Anders Carlsson.

Manage SVGPathByteStream objects through std::unique_ptr. Constructors for the class are made public
so std::make_unique can be used with the class.

* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::constructFromString):
(WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::createPath):
* svg/SVGAnimatedType.h:
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::SVGPathByteStream): Takes a const Data object that's then copied.
(WebCore::SVGPathByteStream::copy): Made const.
* svg/SVGPathByteStreamBuilder.cpp: Remove an unnecessary include.
* svg/SVGPathByteStreamBuilder.h: Ditto.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
* svg/SVGPathElement.h:
* svg/SVGPathUtilities.cpp:
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
(WebCore::addToSVGPathByteStream):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][GTK] enable-media-stream Setting
https://bugs.webkit.org/show_bug.cgi?id=123145

Reviewed by Anders Carlsson.

Source/WebCore:

* page/Settings.in: new mediaStreamEnabled setting.

Source/WebKit2:

* Shared/WebPreferencesStore.h: New MediaStreamEnabled boolean preference.
* UIProcess/API/C/WKPreferences.cpp: MediaStreamEnabled getter and
setter functions.
(WKPreferencesSetMediaStreamEnabled):
(WKPreferencesGetMediaStreamEnabled):
* UIProcess/API/C/WKPreferences.h:
* UIProcess/API/gtk/WebKitSettings.cpp: Add a enable-media-stream
property to the GTK WebKitSettings class. It will act as a facade
to the MediaStreamEnabled preference.
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_media_stream):
(webkit_settings_set_enable_media_stream):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings): Test enable-media-stream websetting.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
Allow WKTR to override the MediaStreamEnabled preference.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update MediaStreamEnabled
along with the other settings.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CryptoAlgorithmDescriptionBuilder should support producing nested algorithms
https://bugs.webkit.org/show_bug.cgi?id=123461

Reviewed by Darin Adler.

To add a nested algorithm, clone a builder with createEmptyClone(), fill it,
and add it using add().

* bindings/js/JSCryptoAlgorithmBuilder.h:
* crypto/CryptoAlgorithmDescriptionBuilder.h:
* bindings/js/JSCryptoAlgorithmBuilder.cpp:
(WebCore::JSCryptoAlgorithmBuilder::createEmptyClone):
(WebCore::JSCryptoAlgorithmBuilder::add): Keep VM in a local variable for marginally
better performance.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequest-overridemimetype-content-type-header.html are failing
https://bugs.webkit.org/show_bug.cgi?id=123548

Reviewed by Brady Eidson.

Source/WebCore:

We had code that made sure that cached 200 responses weren't used for conditional
requests. But it didn't work the other way - cached 304 responses got reused for
subsequent unconditional requests!

Adding the test uncovered this bug.

* loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse):
Should never ignore conditional headers. Code in determineRevalidationPolicy
was already undoing this for conditional requests, but we also shouldn't use
WebCore cache if it holds a 304 response to conditional request.

* loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy):
Even though the changed code is only for raw resources, I think that we can never
get a conditional request here any more.

LayoutTests:

* TestExpectations: Unskip tests that used to be affected by response-empty-arraybuffer.html

* http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt:
* http/tests/xmlhttprequest/response-empty-arraybuffer.html:
Fix a stupid typo. This test actually fully passes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a crypto algorithm abstraction
https://bugs.webkit.org/show_bug.cgi?id=123474

Reviewed by Sam Weinig.

This works slightly differently than WebCrypto implies. We have separate classes
for algorithm and its parameters, while WebCrypto puts them in the same dictionary.

* WebCore.xcodeproj/project.pbxproj: Added new files.

* crypto/CryptoAlgorithm.cpp: Added. As most algorithms don't implement most
operations, default implementations just raise an exception.
* crypto/CryptoAlgorithm.h: Added.

* crypto/CryptoAlgorithmParameters.h: Added. Base class for numerous future parameter
dictionaries, such as HmacParams or HmacKeyParams.

* crypto/CryptoAlgorithmRegistry.cpp: Added.
* crypto/CryptoAlgorithmRegistry.h: Added.
The registry decouples universal bindings code from algorithms that may or may not
be implemented on each platform.

* crypto/mac: Added.
* crypto/mac/CryptoAlgorithmRegistryMac.cpp: Added.
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Algorithms implemented
on Mac will be registered by this function.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Paint the input tag of range type on WinCE port.
https://bugs.webkit.org/show_bug.cgi?id=123199

Patch by Zhuang Zhigang <zhuangzg@cn.fujitsu.com> on 2013-10-31
Reviewed by Brent Fulgham.

* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintSliderTrack):
(WebCore::RenderThemeWinCE::paintSliderThumb):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass ScriptExecutionContext by reference to from the bindings constructors
https://bugs.webkit.org/show_bug.cgi?id=123575

Reviewed by Andreas Kling.

Since we null check the ScriptExecutionContext before creating the c++ class,
we should be passing by reference.


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