Regression(r140262): Causes a lot of flakiness
https://bugs.webkit.org/show_bug.cgi?id=107454

Reviewed by Alexey Proskuryakov.

r140262 introduced a lot of flakiness due to fixed layout mode
not getting disabled on the view after being enabled for
specific test cases. This patch makes sure fixed layout mode
properly gets reset in WebKitTestRunner to avoid flakiness.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::updateLayoutType):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a test to ensure that content written into a seamless IFrame inherits style.
https://bugs.webkit.org/show_bug.cgi?id=99289

Reviewed by Eric Seidel.

This patch adds a single test to ensure that content written into a
seamless IFrame via 'contentDocument.write()' properly inherits style.
The root of the issue was fixed in wkbug.com/103539, so no code changes
are necesary, but that patch didn't test this particular edge case.

* fast/frames/seamless/seamless-document-write-expected.txt: Added.
* fast/frames/seamless/seamless-document-write.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap][GTK] The poster-circle doesn't appear.
https://bugs.webkit.org/show_bug.cgi?id=106672

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-01-21
Reviewed by Noam Rosenthal.

Source/WebCore:

We need to call setNeedsDisplay to redraw GraphicsLayer after we set drawsContent
a new value for the layer. Otherwise we can't get a chance for first drawing the layer.

Test: compositing/visibility/visibility-composited-animation.html

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):

LayoutTests:

A new pixel test is added. It tests if animated layer is drawn for the first scene.

* compositing/visibility/visibility-composited-animation-expected.png: Added.
* compositing/visibility/visibility-composited-animation-expected.txt: Added.
* compositing/visibility/visibility-composited-animation.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] API unit tests are running extremely slow on the bots
https://bugs.webkit.org/show_bug.cgi?id=104665

Reviewed by Gyuyoung Kim.

Clear HTTP cache files before running the unit tests, which prevents
performance degradation due to so many cache files.

* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Skip spell checking on single character strings
https://bugs.webkit.org/show_bug.cgi?id=107463

Reviewed by Yong Li.

Check for a minimum string length when firing off spellcheck since we don't
want to mark single letter words.

Internally reviewed by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
* WebKitSupport/SpellingHandler.cpp:
(BlackBerry::WebKit::SpellingHandler::createSpellCheckRequest):
(BlackBerry::WebKit::SpellingHandler::parseBlockForSpellChecking):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][AC] setOpacity doesn't work for GraphicsLayerClutter
https://bugs.webkit.org/show_bug.cgi?id=105436

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2013-01-21
Reviewed by Gustavo Noronha Silva.

Implement GraphicsLayerClutter::setOpacity based on Mac's GraphicsLayer implementation.

No new tests since this patch can be covered by already existing gtk ac tests.

* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::setOpacity):
(WebCore):
(WebCore::GraphicsLayerClutter::updateOpacityOnLayer):
(WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
* platform/graphics/clutter/GraphicsLayerClutter.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't null out the IPC connection in ChildProcess:terminate
https://bugs.webkit.org/show_bug.cgi?id=107469
<rdar://problem/13015294>

Reviewed by Dan Bernstein.

We already invalidate the connection, and Connection::sendMessage checks if a connection
is valid and bails if it isn't, so the only thing that nulling out the connection here does
is that it would force us to add random connection null checks everywhere.

* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::terminate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Proposal: Add support for even-odd fill and clip to Canvas
https://bugs.webkit.org/show_bug.cgi?id=106188

Patch by Rik Cabanier <cabanier@adobe.com> on 2013-01-21
Reviewed by Dirk Schulze.

Source/WebCore:

This patch adds support for an optional winding rule to fill, clip
and isPointInPath in canvas 2d. By default, the fill is non-zero but
you can now pass in an optional winding rule string ("nonzero" or "evenodd")
to make an explicit choice.

Tests: fast/canvas/canvas-clip-rule.html
       fast/canvas/canvas-fill-rule.html
       fast/canvas/canvas-isPointInPath-winding.html

* html/canvas/CanvasRenderingContext2D.cpp: Change implementation so it sets the windig rule in the context.
(WebCore::parseWinding):
(WebCore):
(WebCore::CanvasRenderingContext2D::fill):
(WebCore::CanvasRenderingContext2D::clip):
(WebCore::CanvasRenderingContext2D::isPointInPath):
* html/canvas/CanvasRenderingContext2D.h:
(CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.idl: Change the idl so the new API is exposed to JavaScript.
* platform/graphics/cg/GraphicsContextCG.cpp: Fixes a bug where the wrong winding rule was set for clipping in Core Graphics.
(WebCore::GraphicsContext::clip):

LayoutTests:

Add tests to verify that the winding rule work as expected with clip, fill and isPointInPath

* fast/canvas/canvas-clip-rule-expected.txt: Added.
* fast/canvas/canvas-clip-rule.html: Added.
* fast/canvas/canvas-fill-rule-expected.txt: Added.
* fast/canvas/canvas-fill-rule.html: Added.
* fast/canvas/canvas-isPointInPath-winding-expected.txt: Added.
* fast/canvas/canvas-isPointInPath-winding.html: Added.
* fast/canvas/script-tests/canvas-clip-rule.js: Added.
(pixelDataAtPoint):
(checkResult):
(prepareTestScenario):
* fast/canvas/script-tests/canvas-fill-rule.js: Added.
(pixelDataAtPoint):
(checkResult):
(prepareTestScenario):
* fast/canvas/script-tests/canvas-isPointInPath-winding.js: Added.
(prepareTestScenario):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled Chromium DEPS to r177953.  Requested by
thakis_ via sheriffbot.

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

* DEPS:

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

Rebaselining a few media tests after r140339.

* platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/gtk/fast/layers/video-layer-expected.txt:
* platform/gtk/media/media-controls-clone-expected.txt:
* platform/gtk/media/video-empty-source-expected.txt:
* platform/gtk/media/video-no-audio-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Misaligned logo on www.nzherald.co.nz possibly due to negative margin-top
https://bugs.webkit.org/show_bug.cgi?id=14664

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/block/float/clear-negative-margin-top.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseMargins): If a negative margin pulls a block up so that floats from
siblings overhang, then ensure addOverHangingFloats() uses the revised logical top position when
deciding whether a float does indeed overhang into the block after margin-collapsing.
(WebCore::RenderBlock::clearFloatsIfNeeded):

LayoutTests:

* fast/block/float/clear-negative-margin-top-expected.html: Added.
* fast/block/float/clear-negative-margin-top.html: Added.
* platform/chromium-win/fast/block/float/024-expected.txt:
* platform/chromium-win/fast/block/margin-collapse/empty-clear-blocks-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support non-WebVTT cues from in-band text tracks
https://bugs.webkit.org/show_bug.cgi?id=107046

Reviewed by Sam Weinig.

* CMakeLists.txt: Add new files.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Pass video size to getDisplayTree.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::addGenericCue): New, create a generic cue if it doesn't already exist.
(WebCore::InbandTextTrack::addWebVTTCue): Renamed from addCue.
* html/track/InbandTextTrack.h:

* html/track/TextTrack.cpp:
(WebCore::TextTrack::hasCue): Moved from InbandTextTrack.cpp, use operator == instead of inline
    comparison so derived TextTrackCues can be compared.
* html/track/TextTrack.h:

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCueBox::applyCSSProperties): Interface change.
(WebCore::TextTrackCue::TextTrackCue): Don't create the display tree in the constructor, it may
    never be needed.
(WebCore::TextTrackCue::createDisplayTree): New, create the display tree.
(WebCore::TextTrackCue::displayTreeInternal): Display tree accessor, allows it to be created lazily.
(WebCore::TextTrackCue::setAlign): Alignment -> CueAlignment.
(WebCore::TextTrackCue::setIsActive): Use displayTreeInternal().
(WebCore::TextTrackCue::getDisplayTree): Use displayTreeInternal(), pass video size to applyCSSProperties.
(WebCore::TextTrackCue::removeDisplayTree): Use displayTreeInternal().
(WebCore::TextTrackCue::operator==): New.
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::getAlignment): Alignment -> CueAlignment.
(WebCore::TextTrackCue::operator!=): New.
(WebCore::TextTrackCue::cueType): New, cue type identified needed by operator==.
(WebCore::TextTrackCue::ownerDocument): New.

* html/track/TextTrackCueGeneric.cpp: Added.
(WebCore::TextTrackCueGenericBox::create):
(WebCore::TextTrackCueGenericBox::TextTrackCueGenericBox):
(WebCore::TextTrackCueGenericBox::applyCSSProperties):
(WebCore:::TextTrackCue):
(WebCore::TextTrackCueGeneric::createDisplayTree):
(WebCore::TextTrackCueGeneric::operator==):
* html/track/TextTrackCueGeneric.h: Added.
(WebCore::TextTrackCueGeneric::create):
(WebCore::TextTrackCueGeneric::~TextTrackCueGeneric):
(WebCore::TextTrackCueGeneric::baseFontSizeRelativeToVideoHeight):
(WebCore::TextTrackCueGeneric::setBaseFontSizeRelativeToVideoHeight):
(WebCore::TextTrackCueGeneric::fontSizeMultiplier):
(WebCore::TextTrackCueGeneric::setFontSizeMultiplier):
(WebCore::TextTrackCueGeneric::fontName):
(WebCore::TextTrackCueGeneric::setFontName):
(WebCore::TextTrackCueGeneric::operator!=):
(WebCore::TextTrackCueGeneric::cueType):

* platform/graphics/InbandTextTrackPrivateClient.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Copy cue attributes into GenericCueData
    struct instead of trying to convert to WebVTT settings string. Process font size,font base
    size, font name, and vertical layout attributes,
(WebCore::InbandTextTrackPrivateAVF::processCue): Create separate cues for each attributed
    string in the array because each one can be at a different screen location.
(WebCore::InbandTextTrackPrivateAVF::resetCueValues):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
(InbandTextTrackPrivateAVF):

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Reset any partially accumulated cues
    delivered since the seek was started.
(WebCore::MediaPlayerPrivateAVFoundation::addGenericCue): Renamed from flushCurrentCue.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Whitespace cleanup.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Tell legible output to deliver cues
    without any additional styling needed by the internal renderer.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Do nothing if asked to change
    to the track that is already current.
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
    Check to make sure that the client callback isn't NULL.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make ninja the default build system for build-webkit --chromium on mac
https://bugs.webkit.org/show_bug.cgi?id=106737

Reviewed by Eric Seidel.

* Scripts/update-webkit-chromium:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac DumpRenderTree's installSignalHandlers() is unreachable code
https://bugs.webkit.org/show_bug.cgi?id=107383

Reviewed by Sam Weinig.

The CrashHandler of DumpRenderTree were originally used for restoring
the color profile of the main display even if DRT crashes.

That feature was later limited to pixel tests only in r29999.

In r104351, the DRT was changed to use device color space. Making the crash
handlers useless, but they were left in the code since the error reporting
code was still reachable.

Later, r124581 refactored the code and dumpPixelsForCurrentTest
is being used before being assigned its value.
This did cause any regression because the code had become useless with the previous change.

* DumpRenderTree/mac/DumpRenderTree.mm:
Remove crashHandler() and installSignalHandlers() as they have become useless and
have been unreachable code for 6 months.
(dumpRenderTree):
Remove the code that was unreachable due to dumpPixelsForCurrentTest being always false
at those points.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, suppress tests requiring rebaseline after r140358
* platform/qt/TestExpectations:

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

Rebaseline fast/block/margin-collapse/empty-clear-blocks.html
and fast/block/float/024.html after r140358.

* platform/mac/fast/block/float/024-expected.txt:
* platform/mac/fast/block/margin-collapse/empty-clear-blocks-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, suppress tests requiring rebaseline after r140358
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] shape-outside on floats for rectangle shapes positioning
https://bugs.webkit.org/show_bug.cgi?id=100399

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-01-21
Reviewed by David Hyatt.

Source/WebCore:

When a float has a shape-outside with non-zero x or y, the float's
exclusion behavior can happen at a completely different location than
where the float's content is painted. This patch brings initial
support for this behavior.

Test: fast/exclusions/shape-outside-floats/shape-outside-floats-positioning.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::flipFloatForWritingModeForChild): If called
    during painting, make sure to pass that state down to the float
    positioning so that it can use the proper position.
(WebCore::RenderBlock::paintFloats): Since this is concerned with
    painting, use the position of the float, not the shape.
(WebCore::RenderBlock::positionNewFloats): Set the correct location
    for the float, relative to the location of the shape.
(WebCore::RenderBlock::addOverhangingFloats): Add FIXME.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::xPositionForFloatIncludingMargin):
(WebCore::RenderBlock::yPositionForFloatIncludingMargin): Since the
    position of the shape (FloatingObject) can be different from the
    position of the float's box (RenderBox), the position needs to be
    computed differently for painting than for determining layout.
(WebCore::RenderBlock::flipFloatForWritingModeForChild): Change
    signature to take painting flag.

LayoutTests:

* fast/exclusions/shape-outside-floats/shape-outside-floats-positioning-expected.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-positioning.html: Added.
* fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html:
    This test had incorrect coordinates for some of the shapes, causing them to break now that x and y are supported for the shapes.

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