[CSS Regions]Content overflowing last region displayed wrong
https://bugs.webkit.org/show_bug.cgi?id=105893

Reviewed by David Hyatt.

Source/WebCore:

For the last region in the region chain and flipped writing modes (horizontal-bt, vertical-rl),
the clipping rect should take overflow into account in the writing mode direction, which is
different in these cases than the direction for non-flipped writing modes.

Tests: fast/regions/overflow-last-region-horiz-bt.html
       fast/regions/overflow-last-region-vert-lr.html
       fast/regions/overflow-last-region-vert-rl.html
       fast/regions/overflow-last-region.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeRegionClippingRect): Helper function used to compute region clipping rect
for paint and hitTest.
(WebCore):
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:

LayoutTests:

Add tests for all writing modes with content overflowing the last region in chain.
Hit testing for content overflowing the last region is not yet supported, therefore tests
for that will be added in the future.

* fast/regions/overflow-last-region-expected.html: Added.
* fast/regions/overflow-last-region-horiz-bt-expected.html: Added.
* fast/regions/overflow-last-region-horiz-bt.html: Added.
* fast/regions/overflow-last-region-vert-lr-expected.html: Added.
* fast/regions/overflow-last-region-vert-lr.html: Added.
* fast/regions/overflow-last-region-vert-rl-expected.html: Added.
* fast/regions/overflow-last-region-vert-rl.html: Added.
* fast/regions/overflow-last-region.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Port WebAudio backend to 1.0 APIs
https://bugs.webkit.org/show_bug.cgi?id=105293

Reviewed by Martin Robinson.

Port the AudioFileReader and AudioDestination to GStreamer 1.0
APIs. It would be preferable to rely on at least GStreamer 1.0.4
for this to work properly as that release contains two bug fixes
for the deinterleave and interleave elements.

* platform/audio/FFTFrame.cpp:
(WebCore::FFTFrame::reportMemoryUsage): Don't report GstFFTF32
structures anymore because they're opaque in GStreamer 1.0.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore):
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
The wavparse element in 1.0 has no sometimes-pads anymore.
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(AudioFileReader): The decodebin2 element has been renamed to
decodebin in GStreamer 1.0.
(WebCore::getGStreamerAudioCaps): Audio caps description changed a
lot in GStreamer 1.0, the function now handles both APIs.
(WebCore::copyGstreamerBuffersToAudioChannel): Adapted to
GstBufferList and GstBuffer API changes.
(WebCore::onAppsinkPullRequiredCallback): Pull a sample or buffer,
depending on which API we use.
(WebCore::AudioFileReader::~AudioFileReader): Protect
GstBufferListIterators in 0.10-only code path.
(WebCore):
(WebCore::AudioFileReader::handleSample): Pull an audio sample
from appsink and insert it in the appropriate buffer list.
(WebCore::AudioFileReader::handleNewDeinterleavePad): Handle
appsink API changes from GStreamer 0.10 to 1.0.
(WebCore::AudioFileReader::decodeAudioForBusCreation): Create the
correct decodebin element.
(WebCore::AudioFileReader::createBus): Protect GstBufferListIterators
in 0.10-only code path.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(_WebKitWebAudioSourcePrivate): GstTask in GStreamer 1.0 uses a
GRecMutex instead of a (deprecated) GStaticRecMutex.
(getGStreamerMonoAudioCaps): Handle caps description changes
between GStreamer 0.10 and 1.0.
(webKitWebAudioGStreamerChannelPosition): POSITION_LFE in
GStreamer 1.0 is now POSITION_LFE1. Also map ChannelCenter to its
GStreamer equivalent.
(webkit_web_audio_src_class_init): Use generic setGstElementClassMetadata.
(webkit_web_audio_src_init): Handle GRecMutex initialisation.
(webKitWebAudioSrcConstructed): Set channel position on
capsfilter. This is done for GStreamer 1.0 code path only because
in 0.10 the caps have no way to store this information.
(webKitWebAudioSrcFinalize): Clear GRecMutex.
(webKitWebAudioSrcLoop): Handle GstBuffer API changes and add an
error check if buffers can't be chained to queue's source pad.
(webKitWebAudioSrcChangeState): As advised in the GStreamer docs,
fixup the state changes for this live source element: NO_PREROLL
in READY->PAUSED and start/stop the GstTask when going/coming
to/from PLAYING.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] [WK2] platform/mac/fast/events/numpad-keycode-mapping.html fails
https://bugs.webkit.org/show_bug.cgi?id=105958

Patch by Sailesh Agrawal <sail@chromium.org> on 2013-01-04
Reviewed by Alexey Proskuryakov.

Tools:

Ported code from DumpRenderTree to WebKitTestRunner to map all numpad keys.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(KeyMappingEntry):
(WTR):
(WTR::EventSenderProxy::keyDown): Added all numpad keys.

LayoutTests:

Fixed numpad-keycode-mapping.html failure in WebKitTestRunner.

* platform/mac-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Rebaseline 2 media/track test cases after r138784.

* platform/efl/media/track/track-cue-rendering-horizontal-expected.png:
* platform/efl/media/track/track-cue-rendering-horizontal-expected.txt:
* platform/efl/media/track/track-cue-rendering-vertical-expected.png:
* platform/efl/media/track/track-cue-rendering-vertical-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Mark test webaudio/codec-tests/mp3/128kbps-44khz.html as Missing.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r138728): Causes crashes on the build bots
https://bugs.webkit.org/show_bug.cgi?id=106083

Reviewed by Simon Hausmann.

Update encodeTimingFunction() to encode the x/y members only
if the bezierPreset is set to custom. This is needed because
decodeTimingFunction() only decodes x/y members if the
bezierPreset is set to custom.

This fixes assertion hits on the debug build bots.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::encodeTimingFunction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][Qt] Make compositing messages async again
https://bugs.webkit.org/show_bug.cgi?id=106082

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-01-04
Reviewed by Simon Hausmann.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::confirmComposition):
(WebKit::WebPageProxy::cancelComposition):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::cancelComposition):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Rebaseline editing/deleting/delete-to-select-table.html.

* platform/efl/editing/deleting/delete-to-select-table-expected.png:
* platform/efl/editing/deleting/delete-to-select-table-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GObject bindings] Wrap event target interface code in feature define guards if necessary
https://bugs.webkit.org/show_bug.cgi?id=105743

Reviewed by Xan Lopez.

Wrap the event target interface implementation code in feature define guards if the interface
is guarded by a conditional. A warning is reported if these methods get called with the specific
feature being disabled.

This was spotted when building with the video track feature disabled was causing build failures.

No new tests - no new functionality. The bindings tests don't test event targets under conditionals.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateEventTargetIface):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening.

Skip new failing tests introduced in r138632 and r138756.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r138184): transitions/transitions-parsing.html is failing on GTK
https://bugs.webkit.org/show_bug.cgi?id=105522

Reviewed by Xan Lopez.

.: 

Remove the configuration flag covering unprefixed CSS transition property names.
It does not introduce any dependency. The unprefixed property names should be
available by default.

* configure.ac:

Source/WebCore: 

Remove the feature define overriding for the unprefixed CSS transition property names
define as it is not required.

No new tests - no new functionality.

* GNUmakefile.am:

LayoutTests: 

Remove a failure expectation for a test that's now passing.

* platform/gtk/TestExpectations:


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

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Rebaselining an editing test after r138654.

Adding failure expectations for two tests added in r138632.
Add a temporary failure expectation for transitions/transitions-parsing.html,
the test is fixed but just requires a clean build. It shouldn't paint the bots
red until then.

* platform/gtk/TestExpectations:
* platform/gtk/editing/deleting/delete-to-select-table-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Update some #includes to use headers in the new Platform directory
https://bugs.webkit.org/show_bug.cgi?id=106092

Reviewed by Kentaro Hara.

Working towards getting rid of legacy header files in
WebKit/chromium/public/ and WebKit/chromium/public/platform/

* src/AsyncFileSystemChromium.cpp:
* src/StorageAreaProxy.cpp:
* src/StorageNamespaceProxy.cpp:
* src/WebFileSystemCallbacksImpl.cpp:
* src/WebGraphicsContext3D.cpp:
* src/WebIDBCursorImpl.h:
* src/WebIDBDatabaseCallbacksImpl.cpp:
* src/WebIDBDatabaseCallbacksImpl.h:
* src/WebIDBDatabaseError.cpp:
* src/WebIDBDatabaseImpl.h:
* src/WebIDBIndexImpl.h:
* src/WebIDBKeyPath.cpp:
* src/WebIDBMetadata.cpp:
* src/WebIDBObjectStoreImpl.h:
* src/WebWorkerClientImpl.cpp:
* src/WebWorkerRunLoop.cpp:
* src/WorkerFileSystemCallbacksBridge.cpp:
* tests/AssociatedURLLoaderTest.cpp:
* tests/FrameTestHelpers.cpp:
* tests/PopupMenuTest.cpp:
* tests/URLTestHelpers.cpp:
* tests/WebFrameTest.cpp:
* tests/WebPageNewSerializerTest.cpp:
* tests/WebPageSerializerTest.cpp:
* tests/WebURLRequestTest.cpp:
* tests/WebURLResponseTest.cpp:
* tests/WebUnitTests.h:
* tests/WebViewTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. New image baselines for test
fast/regions/full-screen-video-from-region.html

* platform/chromium-mac-snowleopard/fast/regions/full-screen-video-from-region-expected.png: Added.
* platform/chromium-mac/fast/regions/full-screen-video-from-region-expected.png:
* platform/chromium-win-xp/fast/regions/full-screen-video-from-region-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add 'float FloatPoint::slopeAngleRadians()'
https://bugs.webkit.org/show_bug.cgi?id=105997

Patch by Steve Block <steveblock@chromium.org> on 2013-01-04
Reviewed by Stephen White.

Refactoring only, no functional change.

* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::slopeAngleRadians):
(WebCore):
* platform/graphics/FloatPoint.h:
Add 'float FloatPoint::slopeAngleRadians() const'
* platform/graphics/PathTraversalState.cpp:
(WebCore::PathTraversalState::processSegment):
* rendering/svg/SVGMarkerData.h:
(WebCore::SVGMarkerData::currentAngle):
* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::decomposeArcToCubic):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip a new failing test.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] The ExclusionPolygon classes should allow more than one type of "Edge" class
https://bugs.webkit.org/show_bug.cgi?id=106026

Patch by Hans Muller <hmuller@adobe.com> on 2013-01-04
Reviewed by Dirk Schulze.

Refactored the ExclusionPolygonEdge class to pave the way for a similar
OffsetEdge class. The new VertexPair abstract base class provides the common
state and operations. ExclusionPolygonEdge now extends VertexPair and defines
ExclusionPolygon as a friend, since the ExclusionPolygon constructor initializes
its private state.

* rendering/ExclusionPolygon.cpp:
(WebCore::ExclusionPolygon::ExclusionPolygon): Use ExclusionPolygonEdge accessors instead of direct field access.
(WebCore::getVertexIntersectionVertices): Ditto.
* rendering/ExclusionPolygon.h:
(VertexPair): New abstract base class.
(WebCore::VertexPair::~VertexPair):
(WebCore::VertexPair::minX): This method was defined in ExclusionPolygonEdge.
(WebCore::VertexPair::minY): Ditto.
(WebCore::VertexPair::maxX): Ditto.
(WebCore::VertexPair::maxY): Ditto.
(ExclusionPolygonEdge): Now extends VertexPair.
(WebCore::ExclusionPolygonEdge::previousEdge): Refer to m_ private class fields, instead of public struct fields.
(WebCore::ExclusionPolygonEdge::nextEdge): Ditto.
(WebCore::ExclusionPolygonEdge::polygon): Ditto.
(WebCore::ExclusionPolygonEdge::vertexIndex1): Ditto.
(WebCore::ExclusionPolygonEdge::vertexIndex2): Ditto.
(WebCore::ExclusionPolygonEdge::edgeIndex): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] [Gtk] crash when web inspector is attached, and window height is reduced.
https://bugs.webkit.org/show_bug.cgi?id=106052

Reviewed by Martin Robinson.

Do not allocate more size for the inspector view than its parent
size. Also make sure that the view size is always at least 1.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(resizeWebKitWebViewBaseFromAllocation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Blackberry] Static code analysis warning fixes
https://bugs.webkit.org/show_bug.cgi?id=105679

Patch by Anthony Scian <ascian@rim.com> on 2013-01-04
Reviewed by Rob Buis.

Source/WebCore:

klocwork 1855: fixed by caching page, check against NULL and use cached value

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::determineFullScreenMultiplier):

Source/WebKit/blackberry:

Klocwork issue 959: check layer against NULL since it is used in both cases
of the subsequent if-stmt

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):

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