[EFL][WK2] Context menu spellchecking items are not available when "Check Spelling While Typing" is off
https://bugs.webkit.org/show_bug.cgi?id=117190

Reviewed by Christophe Dumez.

Context menu items (suggestions, learn and ignore word) are not available
due to missing dictionary. To get the suggestions for the misspelled word,
the dictionary has to be loaded first.

WebKit loads the default dictionary when check spelling while typing is being enabled.
However, context menu spellchecking items should be present even if this setting is off.

* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
Load the user's default dictionary to ensure context menu spellchecking items.
The dictionary is loaded asynchronously so it shouldn't delay application.

* UIProcess/API/efl/ewk_text_checker.h:
Update doc. Spelling suggestions, learn and ignore word should be available
independently of checking spelling while typing setting.

* UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
(onContextMenuShow):
(TEST_F):
Add two unit tests to check whether the default dictionary is loaded and
whether the context menu spelling items are available.

* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
Not set the default dictionary while enabling the setting, it's already loaded.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Skipping failing tests.
https://bugs.webkit.org/show_bug.cgi?id=117295
https://bugs.webkit.org/show_bug.cgi?id=117336
https://bugs.webkit.org/show_bug.cgi?id=117338

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-06-07

* platform/qt-5.0-wk1/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][GTK] TextCheckerEnchant uses deprecated enchant_dict_add_to_personal
https://bugs.webkit.org/show_bug.cgi?id=117335

Reviewed by Christophe Dumez.

enchant_dict_add_to_personal has been deprecated at r22321 in Enchant repository.

No behavior change, no new tests needed.

* platform/text/enchant/TextCheckerEnchant.cpp:
(WebCore::TextCheckerEnchant::learnWord):
Use enchant_dict_add instead of enchant_dict_add_to_personal.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: r149001 made proximity test fail.
https://bugs.webkit.org/show_bug.cgi?id=117343

Reviewed by Christophe Dumez.

Update window-property.html test cases for Device Proximity Event.
The global constructors are no longer enumerable after r149001.

* proximity/window-property-expected.txt:
* proximity/window-property.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] WTF.dll is linking with CoreFoundation.lib in VS2010.
https://bugs.webkit.org/show_bug.cgi?id=117294

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-06-07
Reviewed by Darin Adler.

WinCairo build should not use CoreFoundation.

* WTF.vcxproj/WTF.vcxproj: Exclude unneeded file from WinCairo build.
* WTF.vcxproj/WTFCommon.props: Removed CoreFoundation.lib from common props.
* WTF.vcxproj/WTFCoreFoundation.props: Added.
* WTF.vcxproj/WTFDebug.props: Inherit from WTFCoreFoundations.props.
* WTF.vcxproj/WTFRelease.props: Inherit from WTFCoreFoundations.props.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unnecessary use of Layout types in GraphicsLayer::paintGraphicsLayerContents
https://bugs.webkit.org/show_bug.cgi?id=117340

Reviewed by Darin Adler.

There is no reason to use Layout types when copying from Int types to Int types.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::paintGraphicsLayerContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused header includes in Document
https://bugs.webkit.org/show_bug.cgi?id=117339

Reviewed by Andreas Kling.

Minor code cleanup.

* dom/Document.cpp:
* dom/Document.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of outdated getter / setter raises from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117346

Reviewed by Darin Adler.

Stop using "getter / setter raises" in the IDL as this is no longer part of
the Web IDL specification. Web IDL no longer specifies exceptions for
attribute getters or setters. Instead, it is now explained in prose.

WebKit still needs to know if the getter / setter can throw an exception
(but does not need the exception name) so this patch adds 2 WebKit specific
IDL extended attributes: [GetterRaisesException] / [SetterRaisesException].
The naming is consistent with Blink.

This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.

Note that this patch does not remove "raises()" from the IDL methods yet.
This should be replaced by [RaisesException] IDL extended attribute in a
later patch.

No new tests, no behavior change.

* Modules/indexeddb/IDBRequest.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/SQLResultSet.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseAttributeRest):
(parseAttributeRestOld):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSCharsetRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/Document.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/TreeWalker.idl:
* html/HTMLElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLProgressElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackRegion.idl:
* page/DOMWindow.idl:
* storage/Storage.idl:
* svg/SVGAltGlyphElement.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimatedBoolean.idl:
* svg/SVGAnimatedEnumeration.idl:
* svg/SVGAnimatedInteger.idl:
* svg/SVGAnimatedNumber.idl:
* svg/SVGAnimatedString.idl:
* svg/SVGElement.idl:
* svg/SVGGlyphRefElement.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLength.idl:
* svg/SVGPreserveAspectRatio.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGStyleElement.idl:
* svg/SVGViewSpec.idl:
* xml/XMLHttpRequest.idl:
* xml/XPathResult.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[rendering] Use foreground color to render the overtype caret
https://bugs.webkit.org/show_bug.cgi?id=117347

Reviewed by Darin Adler.

Currently, the overtype caret is rendered using the colors of
a normal selection, which is confusing. This patch enables RenderObject
to differentiate between a normal and a overtype caret selection,
in order to use a different color for the latter.

Also, let RenderView update the selection if this is unchanged
when going from a overtype caret to one character selection and
viceversa.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor):
* rendering/RenderView.cpp:
(WebCore::RenderView::setSelection):
* rendering/RenderView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MathML line fraction needs to parse number values
https://bugs.webkit.org/show_bug.cgi?id=117305

Reviewed by Darin Adler.

Source/WebCore: 

The line fraction thickness was not handling arbitrary thickness numbers.
The accessibility code was not handling default values for line thickness, so
it made sense to have AX rely on the RenderFraction object to retrive the thickness.

Modified existing tests to cover new behavior.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathLineThickness):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLFraction.h:
(WebCore::RenderMathMLFraction::lineThickness):
(WebCore::toRenderMathMLFraction):

LayoutTests: 

Math fractions test now encodes for an arbitrary thickness number.
Accessibility test handles the default line thickness.

* mathml/presentation/fractions.xhtml:
* platform/mac/accessibility/mathml-line-fraction-expected.txt:
* platform/mac/accessibility/mathml-line-fraction.html:
* platform/mac/mathml/presentation/fractions-expected.png:
* platform/mac/mathml/presentation/fractions-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Weird behaviour and no clues to the user when the shared memory file can't be opened
https://bugs.webkit.org/show_bug.cgi?id=117063

Patch by Enrique Ocana Gonzalez <eocanha@igalia.com> on 2013-06-07
Reviewed by Anders Carlsson.

Log error message when the shared memory file can't be opened in
Unix platform using a release build

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[regression] build failure WebKitFontFamilyNames.h missing
https://bugs.webkit.org/show_bug.cgi?id=117178

Reviewed by Sam Weinig.

.: 

* GNUmakefile.am: List platform_sources under the BUILT_SOURCES list.

Source/WebCore: 

* GNUmakefile.am: Make libPlatform and other sources depend on the generated platform sources. This should prevent
build failures in source code that's depending on the generated platform sources.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Lines jump up and down while typing Chinese or Japanese
https://bugs.webkit.org/show_bug.cgi?id=115931

Reviewed by Darin Adler.

The bug was caused by Font::width caching the width of text even when the font fallbacks existed when fallbackFonts
argument was null; because of this, a later call to Font::width was returning the width without filling up
fallbackFonts even if it was not null this time.

Fixed the bug by adding a local fallback fonts hash set, and checking the emptiness of this variable in Font::width.
Also added pass fallbackFonts around in various places to make use of the cached font fallbacks.

No new tests. Unfortunately I haven't been able to make a reliable reduction for this bug.

* platform/graphics/Font.cpp:
(WebCore::Font::width):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::measureHyphenWidth):
(WebCore::setLogicalWidthForTextRun):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r151318.
http://trac.webkit.org/changeset/151318
https://bugs.webkit.org/show_bug.cgi?id=117356

Broke Windows Release Build (Requested by bfulgham on
#webkit).

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* WTF.vcxproj/WTFCoreFoundation.props: Removed.
* WTF.vcxproj/WTFDebug.props:
* WTF.vcxproj/WTFRelease.props:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Makefile fix. Copy WTF.dll over as well.

* WTF.vcxproj/WTF.make:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove Qt bits from Scripts/webkitperl/FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=117315

Reviewed by Benjamin Poulain.

Qt doesn't use the default values specified on FeatureList since r44681,
this patch just remove a bit of noise.

* Scripts/webkitperl/FeatureList.pm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reproducible crash with triple-finger-tap "define word" gesture on a Netflix video
https://bugs.webkit.org/show_bug.cgi?id=117020

Patch by Thomas Deniau <deniau@apple.com> on 2013-06-07
Reviewed by Ryosuke Niwa.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
Don't invoke the Dictionary lookup when we failed to extract the range of the token
surrounding the tapped position.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compile WebCoreTestShimLibrary.cpp on iOS, but exclude the Carbon bits
https://bugs.webkit.org/show_bug.cgi?id=117360

Reviewed by Mark Rowe.

In r150114 we tried to make the WebCoreTestShim target build on iOS by
excluding its only source file from the build. While this allowed the
target to build, it prevented the target's product (WebCoreTestShim.dylib)
from being created. This causes xcodebuild to fail if you ask it to
install the target.

Fix this by building the target's product on iOS. Just use the
preprocessor to exclude the bits that won't build on iOS.

* Configurations/WebCoreTestShim.xcconfig:
* testing/WebCoreTestShimLibrary.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r151088): Crash navigating away from non-loaded main resources with non-loaded scripts.
<rdar://problem/14052886> and https://bugs.webkit.org/show_bug.cgi?id=117278

Reviewed by Anders Carlsson.

Source/WebCore:

Test: http/tests/navigation/slow-loading-page-with-slow-script.php

* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::isPendingScriptReady): The script runner might be told about a script
  after it has already been detached (the main resource load has finished/failed/cancelled).
  Don't dereference a null document in that case.

LayoutTests:

* http/tests/navigation/slow-loading-page-with-slow-script-expected.txt: Added.
* http/tests/navigation/slow-loading-page-with-slow-script.php: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of outdated raises() from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117350

Reviewed by Darin Adler.

Source/WebCore:

Stop using "raises()" in the IDL as this is no longer part of the Web IDL
specification. Web IDL no longer specifies exceptions for operations. Instead
it is now explained in prose.

WebKit still needs to know if the method can throw an exception (but does not
need the exception name) so this patch adds a WebKit specific IDL extended
attribute: [RaisesException]. The naming is consistent with Blink.

This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.

No new tests, no behavior change.

* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReaderSync.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/FileEntrySync.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOperationRest):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSupplemental.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/DOMImplementation.idl:
* dom/DataTransferItemList.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/EventTarget.idl:
* dom/MessagePort.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeIterator.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/WebKitNamedFlow.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMTokenList.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDialogElement.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Crypto.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Performance.idl:
* storage/Storage.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGDocument.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLocatable.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPointList.idl:
* svg/SVGStringList.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransformList.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathResult.idl:

Source/WebKit/win:

Replace raises() by [RaisesException].

* Interfaces/DOMEvents.idl:


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