[Gtk] Move feature defines processing into a GNUmakefile that's simple to autogenerate
https://bugs.webkit.org/show_bug.cgi?id=87127

Reviewed by Martin Robinson.

.: 

Add 'feature_defines_defaults' and 'feature_defines_overrides' variables
and define them, along with 'feature_defines' (changed from the all-caps version),
before webcore_cppflags.

* GNUmakefile.am:

Source/WebCore: 

List all the feature defines with their default value in
GNUmakefile.features.am and append them to the 'feature_defines_defaults'.
variable.

In GNUmakefile.am, include the GNUmakefile.features.am. When checking the
AM conditionals for feature-enabling, append the appropriate define to
'feature_defines_overrides'.

After all such overrides are performed, append the proper define (of which
value was possibly overridden) for each feature to the 'feature_defines'
variable. Finally, append all these defines to webcore_cppflags in the form
of macros for preprocessing.

No new tests - no new functionality.

* GNUmakefile.am:
* GNUmakefile.features.am: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: three layout tests crashing with assertion failure
https://bugs.webkit.org/show_bug.cgi?id=94829

Unreviewed Chromium gardening. Suppressed failing tests.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove redundant check for negative values when using WebCore::Color::alpha()
https://bugs.webkit.org/show_bug.cgi?id=94811

Patch by Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> on 2012-08-23
Reviewed by Eric Seidel.

Though alpha() returns a signed value (int), its value is stored on an unsigned
typedef (RGBA32) and is safeguarded by alphaChannel() that its value never goes
beyond 255, so no integer overflow, thus we can safely remove redundant check
for negative values while using it.

This change does not affect behavior, so no new tests needed.

* platform/graphics/Image.cpp:
(WebCore::Image::fillWithSolidColor):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground): Using hasAlpha() for readibility.
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
* rendering/style/RenderStyle.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Use WTF_USE_SOUP instead BUILDING_SOUP__
https://bugs.webkit.org/show_bug.cgi?id=94744

Reviewed by Gustavo Noronha Silva.

.:

There is no need to define BUILDING_SOUP__ if only WTF_USE_SOUP
is used.

* GNUmakefile.am:
* Source/cmake/OptionsEfl.cmake:

Source/WebKit2:

Use #if defined(WTF_USE_SOUP) instead of #if defined(BUILDING_SOUP__)
since the former is used everywhere.

* Shared/API/c/WKBase.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wx] Unreviewed build fix. Don't rely on implicit casts, explicitly use the
Cursor constructor that takes a platform cursor for creating native cursors.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert ScrollableArea ASSERT_NOT_REACHED virtuals into pure virtuals
https://bugs.webkit.org/show_bug.cgi?id=93306

Unreviewed build fix.

* src/ScrollbarGroup.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wx] Unreviewed build fix. Add wx to the list of platforms that use CoreText
APIs on Mac.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wx] Unreviewed build fix. Disable compilation of WebDOM file for now,
add the opentype directory, and remove old ATSUI files no longer in the tree.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add test for decodeAudioData
https://bugs.webkit.org/show_bug.cgi?id=92620

Patch by Li Yin <li.yin@intel.com> on 2012-08-23
Reviewed by Chris Rogers.

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
This test checks if successCallback or errorCallback can be invoked correctly when
there is a correct or error decoding.

* webaudio/decode-audio-data-basic-expected.txt: Added.
* webaudio/decode-audio-data-basic.html: Added.
* webaudio/resources/media/invalid-audio-file.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions]Crash when moving anonymous block children inside a named flow
https://bugs.webkit.org/show_bug.cgi?id=90865

Patch by Andrei Onea <onea@adobe.com> on 2012-08-23
Reviewed by Abhishek Arya.

Source/WebCore:

When an anonymous block's children are detached in RenderBlock::collapseAnonymousBoxChild, the reference
to their enclosingRenderFlowThread is lost and causes a crash in RenderObject::willBeRemovedFromTree.
Because of this, we now maintain the enclosingRenderFlowThread during the whole lifetime of the
RenderBlock::collapseAnonymousBoxChild function, using a CurrentRenderFlowThreadMaintainer local.

Test: fast/regions/move-anonymous-block-inside-named-flow-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseAnonymousBoxChild):
* rendering/RenderFlowThread.cpp:
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
(WebCore):
(WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer):
Moved CurrentRenderFlowThreadMaintaner declaration from .cpp to .h, so that we can access it from
RenderBlock::collapseAnonymousBoxChild.
* rendering/RenderFlowThread.h:
(CurrentRenderFlowThreadMaintainer):
(WebCore):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeRemovedFromTree):

LayoutTests:

Added test for crash which happens when the children of an anonymous block
inside a flow thread are moved.

* fast/regions/move-anonymous-block-inside-named-flow-crash-expected.txt:
* fast/regions/move-anonymous-block-inside-named-flow-crash.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: three layout tests crashing with assertion failure
https://bugs.webkit.org/show_bug.cgi?id=94829

Unreviewed. Expanded suppressions.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Move onSuccess(IDBDatabaseBackendInterface) to IDBOpenDBRequest
https://bugs.webkit.org/show_bug.cgi?id=94757

Reviewed by Tony Chang.

Source/WebCore:

Move the implementation of IDBCallbacks::onSuccess(IDBDatabaseBackendInterface)
from IDBRequest to the new IDBOpenDBRequest, which is the only request type that
should be receiving that callback.

No new tests - no functional changes.

* Modules/indexeddb/IDBCallbacks.h:
(IDBCallbacks):
(WebCore::IDBCallbacks::onSuccess):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
(WebCore::IDBOpenDBRequest::onSuccess):
(WebCore):
* Modules/indexeddb/IDBOpenDBRequest.h:
(IDBOpenDBRequest):
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:

Source/WebKit/chromium:

Drop onSuccess(IDBDatabaseBackendImpl) overload from test, as it is no longer
implemented by IDBRequest.

* tests/IDBRequestTest.cpp:
(WebCore::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
create different WebKit::WebMediaPlayer based on URL
https://bugs.webkit.org/show_bug.cgi?id=91301

Patch by Wei Jia <wjia@chromium.org> on 2012-08-23
Reviewed by Adam Barth.

Source/WebKit/chromium:

Pass URL to WebFrameClient::createMediaPlayer(). This allows creation
of different WebMediaPlayer implementations based on the URL.

* public/WebFrameClient.h:
(WebKit::WebFrameClient::createMediaPlayer): add URL as additional argument.
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::createWebMediaPlayer): add URL as additional argument.
(WebKit::WebMediaPlayerClientImpl::loadInternal):

Tools:

Pass URL to createMediaPlayer. This corresponds to change in base
class WebKit::WebFrameClient.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::createMediaPlayer): add URL as additional argument.
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Serialization of JavaScript values does not appear to respect new HTML5 Structured Clone semantics
https://bugs.webkit.org/show_bug.cgi?id=65292

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-08-23
Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Add function to construct a StringObject from a JSValue.
Similar functions already exist for NumberObject and
BooleanObject for example.

Export several symbols so address linking errors in
WebCore.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/BooleanObject.h:
(BooleanObject):
* runtime/NumberObject.h:
(NumberObject):
(JSC):
* runtime/StringObject.cpp:
(JSC::constructString):
(JSC):
* runtime/StringObject.h:
(JSC):

Source/WebCore:

JSC now correctly serialize Boolean, Number and String objects as per
the structured clone algorithm specification. This patch reduces the
delta with the V8 implementation of SerializedScriptValue.

No new tests, already tested by fast/dom/Window/window-postmessage-clone.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore):
(WebCore::CloneSerializer::dumpStringObject):
(CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

Update expected results for fast/dom/Window/window-postmessage-clone.html
now that String, Boolean and Number object are correctly serialized with
JSC.

* fast/dom/Window/window-postmessage-clone-expected.txt:
* platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] V8ScriptInstance is much more complicated than necessary
https://bugs.webkit.org/show_bug.cgi?id=94785

Reviewed by Kentaro Hara.

V8ScriptInstance just needs to be a one-line wrapper around OwnHandle.

* bindings/v8/OwnHandle.h:
(WebCore::OwnHandle::get):
* bindings/v8/ScriptInstance.cpp:
(WebCore::V8ScriptInstance::V8ScriptInstance):
(WebCore::V8ScriptInstance::~V8ScriptInstance):
(WebCore::V8ScriptInstance::instance):
* bindings/v8/ScriptInstance.h:
(WebCore::V8ScriptInstance::create):
(V8ScriptInstance):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Update pixel test expectations for layout test fast/forms/
https://bugs.webkit.org/show_bug.cgi?id=94687

Unreviewed, rebaseline.

Some tests have wrong pixel test expectations. They should be replaced.

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2012-08-23

* platform/efl/fast/forms/003-expected.png:
* platform/efl/fast/forms/006-expected.png:
* platform/efl/fast/forms/007-expected.png:
* platform/efl/fast/forms/HTMLOptionElement_label01-expected.png:
* platform/efl/fast/forms/HTMLOptionElement_label02-expected.png:
* platform/efl/fast/forms/HTMLOptionElement_label03-expected.png:
* platform/efl/fast/forms/HTMLOptionElement_label04-expected.png:
* platform/efl/fast/forms/HTMLOptionElement_label05-expected.png:
* platform/efl/fast/forms/basic-buttons-expected.png:
* platform/efl/fast/forms/basic-inputs-expected.png:
* platform/efl/fast/forms/button-align-expected.png:
* platform/efl/fast/forms/button-cannot-be-nested-expected.png:
* platform/efl/fast/forms/button-default-title-expected.png:
* platform/efl/fast/forms/button-generated-content-expected.png:
* platform/efl/fast/forms/button-inner-block-reuse-expected.png:
* platform/efl/fast/forms/button-sizes-expected.png:
* platform/efl/fast/forms/button-style-color-expected.png:
* platform/efl/fast/forms/button-table-styles-expected.png:
* platform/efl/fast/forms/button-text-transform-expected.png:
* platform/efl/fast/forms/button-white-space-expected.png:
* platform/efl/fast/forms/control-clip-expected.png:
* platform/efl/fast/forms/control-clip-overflow-expected.png:
* platform/efl/fast/forms/control-restrict-line-height-expected.png:
* platform/efl/fast/forms/disabled-select-change-index-expected.png:
* platform/efl/fast/forms/encoding-test-expected.png:
* platform/efl/fast/forms/fieldset-align-expected.png:
* platform/efl/fast/forms/file/file-input-direction-expected.png:
* platform/efl/fast/forms/file/file-input-disabled-expected.png:
* platform/efl/fast/forms/floating-textfield-relayout-expected.png:
* platform/efl/fast/forms/form-hides-table-expected.png:
* platform/efl/fast/forms/image-border-expected.png:
* platform/efl/fast/forms/input-appearance-bkcolor-expected.png:
* platform/efl/fast/forms/input-appearance-default-bkcolor-expected.png:
* platform/efl/fast/forms/input-appearance-focus-expected.png:
* platform/efl/fast/forms/input-appearance-preventDefault-expected.png:
* platform/efl/fast/forms/input-appearance-selection-expected.png:
* platform/efl/fast/forms/input-appearance-visibility-expected.png:
* platform/efl/fast/forms/input-appearance-width-expected.png:
* platform/efl/fast/forms/input-button-sizes-expected.png:
* platform/efl/fast/forms/input-disabled-color-expected.png:
* platform/efl/fast/forms/input-double-click-selection-gap-bug-expected.png:
* platform/efl/fast/forms/input-field-text-truncated-expected.png:
* platform/efl/fast/forms/input-readonly-dimmed-expected.png:
* platform/efl/fast/forms/input-readonly-empty-expected.png:
* platform/efl/fast/forms/input-spaces-expected.png:
* platform/efl/fast/forms/input-table-expected.png:
* platform/efl/fast/forms/input-text-click-inside-expected.png:
* platform/efl/fast/forms/input-text-option-delete-expected.png:
* platform/efl/fast/forms/input-text-self-emptying-click-expected.png:
* platform/efl/fast/forms/input-text-word-wrap-expected.png:
* platform/efl/fast/forms/input-type-text-min-width-expected.png:
* platform/efl/fast/forms/input-value-expected.png:
* platform/efl/fast/forms/input-width-expected.png:
* platform/efl/fast/forms/listbox-bidi-align-expected.png:
* platform/efl/fast/forms/listbox-scrollbar-incremental-load-expected.png:
* platform/efl/fast/forms/listbox-width-change-expected.png:
* platform/efl/fast/forms/menulist-clip-expected.png:
* platform/efl/fast/forms/menulist-option-wrap-expected.png:
* platform/efl/fast/forms/menulist-width-change-expected.png:
* platform/efl/fast/forms/minWidthPercent-expected.png:
* platform/efl/fast/forms/negativeLineHeight-expected.png:
* platform/efl/fast/forms/option-index-expected.png:
* platform/efl/fast/forms/option-script-expected.png:
* platform/efl/fast/forms/option-strip-whitespace-expected.png:
* platform/efl/fast/forms/option-text-clip-expected.png:
* platform/efl/fast/forms/search-display-none-cancel-button-expected.png:
* platform/efl/fast/forms/search-vertical-alignment-expected.png:
* platform/efl/fast/forms/searchfield-heights-expected.png:
* platform/efl/fast/forms/select-align-expected.png:
* platform/efl/fast/forms/select-block-background-expected.png:
* platform/efl/fast/forms/select-change-listbox-size-expected.png:
* platform/efl/fast/forms/select-change-listbox-to-popup-expected.png:
* platform/efl/fast/forms/select-change-popup-to-listbox-expected.png:
* platform/efl/fast/forms/select-dirty-parent-pref-widths-expected.png:
* platform/efl/fast/forms/select-display-none-style-resolve-expected.png:
* platform/efl/fast/forms/select-initial-position-expected.png:
* platform/efl/fast/forms/select-item-background-clip-expected.png:
* platform/efl/fast/forms/select-list-box-with-height-expected.png:
* platform/efl/fast/forms/select-size-expected.png:
* platform/efl/fast/forms/select-visual-hebrew-expected.png:
* platform/efl/fast/forms/select/optgroup-rendering-expected.png:
* platform/efl/fast/forms/tabbing-input-iframe-expected.png:
* platform/efl/fast/forms/targeted-frame-submission-expected.png:
* platform/efl/fast/forms/text-style-color-expected.png:
* platform/efl/fast/forms/textAreaLineHeight-expected.png:
* platform/efl/fast/forms/textarea-align-expected.png:
* platform/efl/fast/forms/textarea-width-expected.png:
* platform/efl/fast/forms/textfield-focus-ring-expected.png:
* platform/efl/fast/forms/textfield-outline-expected.png:
* platform/efl/fast/forms/visual-hebrew-text-field-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flexbox doesn't need to compute logical height for stretched items in row flow
https://bugs.webkit.org/show_bug.cgi?id=94807

Patch by Shezan Baig <shezbaig.wk@gmail.com> on 2012-08-23
Reviewed by Tony Chang.

Change logicalHeightConstrainedByMinMax to
constrainLogicalHeightByMinMax. The new method doesn't compute the
MainOrPreferred logical height (that computation has been moved back to
computeLogicalHeight). RenderFlexibleBox now just constrains the
stretchedLogicalHeight by min/max.

No new tests. This is a cleanup of bug 94237.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax): Instead of
computing the MainOrPreferred logical height, just constrain the given
logical height by MinSize and MaxSize.
(WebCore::RenderBox::computeLogicalHeight): Compute the MainOrPreferred
logical height before constraining by min/max.
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Use
constrainLogicalHeightByMinMax to constrain the stretchedLogicalHeight.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Web pages are zoomed out to much on initial load
https://bugs.webkit.org/show_bug.cgi?id=94830

Reviewed by Adam Treat.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 193943
Browser continuously adds paddings to the left and right sides of the
main contents which makes the main contents even smaller.
The issue can be reproduced on the desktop websites such as
huffingtonpost.ca, bloomberg.com, online.wsj.com, nytimes.com,
yahoo.com, thestar.com, sina.com.cn, sohu.com and so on.
The root cause is that we layout those contents at the width of 1280
although the fixed width of the main contents of those websites is
less than 1000, which results in adding the paddings.
To fix this, we need to get back to the default max layout size
1024 * 768, which will make the main contents of those popular websites
take full advantage of the screen real estate and look much better.

Internally reviewed by Adam Treat.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebKitSupport/RenderQueue.cpp:
(BlackBerry::WebKit::RenderQueue::splittingFactor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Removing media/track/track-mode.html - resolved.
[Chromium] Removing media/track/track-cues-cuechange.html - appears to be no longer failing.

Unreviewed gardening.

* platform/chromium/TestExpectations:

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