Layout Test inspector/debugger/debugger-activation-crash2.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=122509

* platform/mac/TestExpectations: Marking as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test inspector/styles/add-new-rule-with-style-after-body.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=122510

* platform/mac/TestExpectations: Marking as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Adding ImageOnlyFailure expectations to:

    - fast/regions/selection/selecting-text-ignoring-region-horiz-bt.html
    - fast/regions/selection/selecting-text-ignoring-region-vert-lr.html
    - fast/regions/selection/selecting-text-in-2-regions-horiz-bt.html
    - fast/regions/selection/selecting-text-in-2-regions-vert-lr.html

* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSManagedValue should be able to store non-object JSValues
https://bugs.webkit.org/show_bug.cgi?id=122351

Reviewed by Oliver Hunt.

We decided not to support this because we thought it didn't make sense to have a 
"weak" JSValue that wasn't an object.

Our general thought process was if you have a JSObject-ObjC object pair (i.e. an 
Obj-C object that you exported to JavaScript-land), it makes more sense to store 
a non-object JSValue on the JavaScript-land version of the object rather than as 
an ivar in the Objective-C object.

In retrospect, this may not have been a good decision at least w.r.t. consistency 
in client code. If you're storing a bag of JSValues off an Obj-C object, you'd 
like to store all of them either in ObjC-land or JavaScript-land, but doing some 
in one and some in the other doesn't sound too good. Also, what if the object you 
want to hang these values off of doesn't have a corresponding object in JavaScript-
land in which to store them?

The solution is to fix JSManagedValue to be able to reference non-object JSValues. 
Right now, all JSManagedValues contain a Weak<JSObject>. We'll change this so that
they can contain either a non-cell JSValue or a JSObject*, along with a weak 
reference to the JSGlobalObject for reconstructing a JSValue later on.

* API/JSManagedValue.mm:
(PrimitiveOrObject::PrimitiveOrObject):
(PrimitiveOrObject::~PrimitiveOrObject):
(PrimitiveOrObject::clear):
(PrimitiveOrObject::isClear):
(PrimitiveOrObject::isSet):
(PrimitiveOrObject::isPrimitive):
(PrimitiveOrObject::isObject):
(PrimitiveOrObject::setPrimitive):
(PrimitiveOrObject::setObject):
(PrimitiveOrObject::object):
(PrimitiveOrObject::primitive):
(-[JSManagedValue initWithValue:]):
(-[JSManagedValue value]):
(-[JSManagedValue disconnectValue]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Widows don't work if the first line in a region is aligned with the top of the region
https://bugs.webkit.org/show_bug.cgi?id=122450

Reviewed by David Hyatt.

Source/WebCore:

The patch adds a new function updateRegionForLine that updates the containing region for a line and the
flag used to determine if it's the first line in that region. This is necessary because the code in
adjustLinePositionForPagination is not sufficient to determine when an unforced break occurs and the line
being positioned is the first one in the fragmentation container or not.

Test: fast/regions/regions-widows-float-top-aligned.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination): Added FIXME comment.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlockFlow::updateRegionForLine): New function used to update the containing region and
the first line flag.

LayoutTests:

Simple test veryfing that widows are correctly computed when there is a float affecting the lines
and when they are vertically aligned with the regions height.

* fast/regions/regions-widows-float-top-aligned-expected.html: Added.
* fast/regions/regions-widows-float-top-aligned.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Computed z-Index should return 0 instead of auto for a region
https://bugs.webkit.org/show_bug.cgi?id=122405

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/regions/layers/region-zIndex-computedStyle.html

Adjust the z-index value for a region. Also, since a box with a z-Index
that is non-auto receives a layer, i removed the requiresLayer override
in RenderRegion and RenderMultiColumnSet.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/RenderMultiColumnSet.cpp:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
* rendering/style/RenderStyle.h:

LayoutTests:

* fast/regions/layers/region-zIndex-computedStyle-expected.txt: Added.
* fast/regions/layers/region-zIndex-computedStyle.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, add my new email to contributors.json.

Patch by Christophe Dumez <ch.dumez@sisa.samsung.com> on 2013-10-08

* Scripts/webkitpy/common/config/contributors.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use references in EventRetargeter::calculateEventPath and EventRetargeter::eventTargetRespectingTargetRules
https://bugs.webkit.org/show_bug.cgi?id=122494

Reviewed by Antti Koivisto.

Use referenecs instead of pointers in ventRetargeter's calculateEventPath and eventTargetRespectingTargetRules.
Also replace Vector<EventTarget*, 32> targetStack by a single pointer since we only append an item to
the vector when it's empty and we always use the last item.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::EventDispatcher):
(WebCore::EventDispatcher::dispatchScopedEvent):
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* dom/EventRetargeter.cpp:
(WebCore::EventRetargeter::calculateEventPath):
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* dom/Node.cpp:
(WebCore::Node::dispatchScopedEventDispatchMediator):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Leak: GdkEvent retured by gtk_get_current_event is not freed.
https://bugs.webkit.org/show_bug.cgi?id=122506

Reviewed by Gustavo Noronha Silva.

Gdk event returned by gtk_get_current_event should be freed after using it.

No functionality changed.

* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::show):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. A couple of media-query tests rely on 3d transforms,
so skip them along with the 3d transforms tests.

* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Unskip editing/spelling/spelling-changed-text.html
https://bugs.webkit.org/show_bug.cgi?id=122502

Unreviewed gardening.


* platform/mac/TestExpectations:
spelling-changed.html is passing after r156901.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify the loop in EventRetargeter::calculateEventPath
https://bugs.webkit.org/show_bug.cgi?id=122500

Reviewed by Antti Koivisto.

Replaced the convoluted loop by two nested loops to make semantics clear.

* dom/EventRetargeter.cpp:
(WebCore::EventRetargeter::calculateEventPath):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, these tests had a couple pixels shift at some point,
needing a new baseline.

* platform/gtk/fast/hidpi/clip-text-in-hidpi-expected.txt:
* platform/gtk/fast/hidpi/image-set-background-dynamic-expected.txt:
* platform/gtk/fast/hidpi/image-set-border-image-dynamic-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Regions with overflow: hidden should paint over positioned sibling
https://bugs.webkit.org/show_bug.cgi?id=122389

Reviewed by Alexandru Chiculita.

Source/WebCore:

As a follow-up from https://bugs.webkit.org/show_bug.cgi?id=122321, a region should not
be a normal flow layer when it has overflow clip. Change existing test by adding overflow:hidden
to the region element.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):

LayoutTests:

Add overflow: hidden to the region to test that it does not move to the normal flow layers.

* fast/regions/layers/region-normalflow-stacking-context.html:


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

* platform/gtk/TestExpectations: fast/backgrounds/background-opaque-images-over-color.html
failing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix ruby LoadError when running run-javascriptcore-tests.
https://bugs.webkit.org/show_bug.cgi?id=122519.

Reviewed by Mark Hahnenberg.

The scripts needed to explicitly require 'rubygems' for older versions of ruby
(versions before 1.9).

* Scripts/jsc-stress-test-helpers/profiler-test-helper:
* Scripts/run-jsc-stress-tests:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MediaStream] Fix segfault in initializeMockSources()
https://bugs.webkit.org/show_bug.cgi?id=122517

Reviewed by Darin Adler.

Calling release() and a member function on the same RefPtr
as arguments to a function can lead to segfaults if the release
call is evaluated first.

* platform/mock/MockMediaStreamCenter.cpp:
(WebCore::initializeMockSources):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Video -> pixel buffer output should not manage color spaces
https://bugs.webkit.org/show_bug.cgi?id=122486

Reviewed by Tim Horton.

Source/WebCore:

On Mac, when we draw a video into a canvas or WebGL, the
output of the video should not be color managed. Instead, leave it
as DeviceRGB so that it matches other colors in those elements.
We'll hopefully solve this properly soon - making everything sRGB.

Test: media/video-canvas-drawing-output.html

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Pass on
a CGImageRef via CGImageCreateCopyWithColorSpace rather than the raw data.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Tell CoreImage
to allocate a pixel buffer that is unmanaged.

LayoutTests:

* media/video-canvas-drawing-output-expected.txt: Added.
* media/video-canvas-drawing-output.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip a new WebGL test along with the others.

* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MathML] Use of floating point floor/ceil on LayoutUnits seems wrong
https://bugs.webkit.org/show_bug.cgi?id=122367

Reviewed by Darin Adler.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paintCharacter): Use member methods to compute
correct floor/ceil values for LayoutUnits.


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