[EFL] Implement colorpicker for HTML5 input type color on Minibrowser
https://bugs.webkit.org/show_bug.cgi?id=115890

Patch by Jungsik Tae <davidtlay88@gmail.com> on 2013-06-07
Reviewed by Christophe Dumez.

When user clicks HTML5 input type color,
color selector window is created on browser object by using elm_colorchooser_add().
It can listen a signal dismissing colorpicker by calling the ewk_color_picker_color_set().
The evas_object_color_set() sets a color value returning to browser.

* MiniBrowser/efl/main.c:
(window_free): When we delete parent window, deleting the colorpicker object.
(on_color_changed): Change color of rectangle to show color selected by user.
(on_color_item_selected): Change color of rectangle when clicked color palettes offered by elm_color_chooser().
(on_color_picker_ok_clicked): Call on_colorpicker_dismiss() and set the color.
(on_color_picker_cancel_clicked): Get a preexisting color and call ewk_color_picker_color_set().
(on_color_picker_dismiss): Delete colorpicker object.
(on_color_picker_request): Create colorpicker window object.
(window_create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] getBoundingClientRect wrong for inline content nodes
https://bugs.webkit.org/show_bug.cgi?id=117290

Reviewed by Alexandru Chiculita.

Source/WebCore:

getBoundingClientRect returned incorrect values for inline content that
was directly flowed inside regions because its mapLocalToContainer was not
properly patched as its RenderBox counterpart. This patch adds mapLocalToContainer
method in RenderFlowThread so that is properly called for all the elements inside the
flow thread.

Also, modified offsetFromContainer so that if the container is the flow thread,
offsetDependsOnPoint is set to true which further sets RenderGeometryMapStep::m_isNonUniform
to true for each step added in pushMappingToContainer methods.

Test: fast/regions/flowed-inline-content-bounding-client-rect.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::pushMappingToContainer):
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::mapLocalToContainer):
* rendering/RenderFlowThread.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetFromContainer):

LayoutTests:

Add test for inline content nodes flowed in regions and in regions with transform.

* fast/regions/flowed-inline-content-bounding-client-rect-expected.txt: Added.
* fast/regions/flowed-inline-content-bounding-client-rect.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make CachedResource virtual methods overridden in derived classes private
https://bugs.webkit.org/show_bug.cgi?id=117289

Reviewed by Darin Adler.

And mark them as OVERRIDE too. Also mark all CachedResource
derived classes as FINAL.

* inspector/InspectorPageAgent.cpp:
(WebCore::cachedResourcesForFrame):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.h:
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] The presence of a flow-from declaration in a CSS rule using :hover effectively disables the rule
https://bugs.webkit.org/show_bug.cgi?id=111585

Created tests for changing flow-into and flow-from inside the :hover pseudo-class.
The actual problem was fixed along with https://bugs.webkit.org/show_bug.cgi?id=7555

Patch by Radu Stavila <stavila@adobe.com> on 2013-06-07
Reviewed by Antti Koivisto.

* fast/regions/hover-single-flow-from-none-expected.html: Added.
* fast/regions/hover-single-flow-from-none.html: Added.
* fast/regions/hover-single-flow-from-other-expected.html: Added.
* fast/regions/hover-single-flow-from-other.html: Added.
* fast/regions/hover-single-flow-into-none-expected.html: Added.
* fast/regions/hover-single-flow-into-none.html: Added.
* fast/regions/hover-single-flow-into-other-expected.html: Added.
* fast/regions/hover-single-flow-into-other.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Frame flattening: crash when child iframe is removed during beforeload.
https://bugs.webkit.org/show_bug.cgi?id=116220

Patch by Zalan Bujtas <zalan@apple.com> on 2013-06-07
Reviewed by Antti Koivisto.

FrameView can get destroyed in updateWidget(). Normally, it is protected by layout()
but with frame flattening on, it can also be called asynchronously through the
post layout timer.

Source/WebCore:

Test: fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):

LayoutTests:

* fast/frames/flattening/crash-remove-iframe-during-object-beforeload-expected.txt: Added.
* fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Implement customContextMenuItemSelected
https://bugs.webkit.org/show_bug.cgi?id=117298

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2013-06-07
Reviewed by Christophe Dumez.

When custom context menu item is selected using ewk API, the feedback is not
sent back to application, as customContextMenuItemSelected was unimplemented in
contextMenuClientEfl.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::customContextMenuItemSelected):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_view.h: added custom_item_selected callback.
* UIProcess/efl/ContextMenuClientEfl.cpp:
(customContextMenuItemSelected):
(ContextMenuClientEfl::ContextMenuClientEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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