Crash at -[WebFrame(WebInternal) _setTypingStyle:withUndoAction:]
https://bugs.webkit.org/show_bug.cgi?id=79937
<rdar://problem/10942936>

Reviewed by Dan Bernstein.

* WebView/WebFrame.mm:
(-[WebFrame _setTypingStyle:withUndoAction:]): Adding a null check.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make use of CG rounded-rect primitives
https://bugs.webkit.org/show_bug.cgi?id=79932
<rdar://problem/9274953>

Reviewed by Simon Fraser.

Dispatch to potentially platform-specific rounded rectangle path
construction from addPathForRoundedRect. Make use of this to call
wkCGPathAddRoundedRect on Lion and above, as long as the rounded
corners are all equivalent.

No new tests, as this is covered by many that use rounded corners,
and is only a performance improvement.

* WebCore.exp.in:
* platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):
(WebCore):
(WebCore::Path::addPathForRoundedRect):
* platform/graphics/Path.h:
(Path):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::addPathForRoundedRect):
(WebCore):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Add wkCGPathAddRoundedRect.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceSnowLeopard.a:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Upstream the BlackBerry change to platform/graphics/FloatRect.h
https://bugs.webkit.org/show_bug.cgi?id=79891

Reviewed by Antonio Gomes.

Add conversion convenience between WebCore::FloatRect and BlackBerry::Platform::FloatRect.

The porting can't be built yet, no new tests.

* platform/graphics/FloatRect.h:
(Platform):
(FloatRect):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, remove a bunch of expectations for now-passing tests.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, add myself as a reviewer

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Upstream the BlackBerry change to platform/graphics/FloatSize.h
https://bugs.webkit.org/show_bug.cgi?id=79893

Reviewed by Antonio Gomes.

Add conversion convenience between WebCore::FloatSize and BlackBerry::Platform::FloatSize.

The porting can't be built yet, no new tests.

* platform/graphics/FloatSize.h:
(Platform):
(FloatSize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, mark a few more tests as passing.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: MediaStreamTrackList out-of-bounds access fix
https://bugs.webkit.org/show_bug.cgi?id=79889

Reviewed by Adam Barth.

Out-of-bounds access to MediaStreamTrackList ASSERTS instead of returning 0,
this is not according to ecmascript standard. Also fixed a similar issue in MediaStreamList.

Source/WebCore:

Test: fast/mediastream/peerconnection-mediastreamlist.html

* Modules/mediastream/MediaStreamList.cpp:
(WebCore::MediaStreamList::item):
* Modules/mediastream/MediaStreamTrackList.cpp:
(WebCore::MediaStreamTrackList::item):

LayoutTests:

* fast/mediastream/peerconnection-mediastreamlist-expected.txt: Added.
* fast/mediastream/peerconnection-mediastreamlist.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, remove some more stale expectations (mostly mac repaint tests).

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Don't let invalidation for next frame prevent tile upload
https://bugs.webkit.org/show_bug.cgi?id=79841

Patch by Dana Jansens <danakj@chromium.org> on 2012-02-29
Reviewed by James Robinson.

Source/WebCore:

We currently don't push dirty tiles to the impl thread so there are no
tiles with garbage data on the impl thread. However, this judgement is
overzealous and blocks tiles that get invalidated by WebKit for the
next frame during the paint of the current frame.

Instead, check if a tile is dirty and was not painted for the current
frame when deciding to push the tile to the impl thread. This requires
that we know if a tile was painted during the current frame, which we
can do if we always reset m_updateRect to be empty each frame.

New unit tests: TiledLayerChromiumTest.pushTilesMarkedDirtyDuringPaint
                TiledLayerChromiumTest.pushTilesLayerMarkedDirtyDuringPaintOnNextLayer
                TiledLayerChromiumTest.pushTilesLayerMarkedDirtyDuringPaintOnPreviousLayer

* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::isDirtyForCurrentFrame):
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
(WebCore::TiledLayerChromium::resetUpdateState):
(WebCore):
(WebCore::TiledLayerChromium::prepareToUpdate):
* platform/graphics/chromium/TiledLayerChromium.h:
(TiledLayerChromium):

Source/WebKit/chromium:

* tests/TiledLayerChromiumTest.cpp:
(WTF::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: support more than two drivers in DriverProxy
https://bugs.webkit.org/show_bug.cgi?id=79736

Reviewed by Adam Barth.

Now that we can support per-test command lines for
Drivers, modify DriverProxy to keep a map of running
drivers for each needed command-line; this will allow
us to transparently maintain a pool of appropriately
configured DRTs without having to constantly start and stop
them.

Note that this potentially raises a garbage collection
problem - the number of running DRTs will grow with the
number of different sets of command line args. For now
this is no worse than the current code - if you're running
with pixel tests, you will only need one DRT per worker,
and if you aren't, you'll need two (one for text-only tests,
and one for reftests).

An alternative would be to only ever have one running driver,
and restart the driver as the command line changes, but this
might (?) slow down execution in the text-only case - we
should benchmark this because it would be simpler and possibly
allow us to eliminate DriverProxy altogether.

* Scripts/webkitpy/layout_tests/port/driver.py:
(DriverProxy.__init__):
(DriverProxy):
(DriverProxy._make_driver):
(DriverProxy.run_test):
(DriverProxy.has_crashed):
(DriverProxy.stop):
(DriverProxy.cmd_line):
(DriverProxy._cmd_line_as_key):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Some Layout Tests in platform/chromium/rubberbanding and platform/chromium/compositing/rubberbanding are failing
https://bugs.webkit.org/show_bug.cgi?id=79878

Reviewed by James Robinson.

Make sure that ScrollableArea::setScrollOffsetFromAnimation doesn't end up
setting the ScrollAnimator's current scroll position by making a new function, scrollPositionChanged,
that both notifyScrollPositionChanged and setScrollOffsetFromAnimation call and move the call to update
the position to notifyScrollPositionChanged.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::notifyScrollPositionChanged):
(WebCore):
(WebCore::ScrollableArea::scrollPositionChanged):
(WebCore::ScrollableArea::setScrollOffsetFromAnimation):
* platform/ScrollableArea.h:
(ScrollableArea):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: implement simple 'virtual test suite' support
https://bugs.webkit.org/show_bug.cgi?id=79737

Reviewed by Adam Barth.

Add very basic support for 'virtual test suites' to NRWT:
a virtual suite is a directory that may contain new baselines,
contains a pointer to a "base" directory of tests, and an
optional list of command line arguments to pass to DRT;
it gives us a way to run all of the tests in a given directory
multiple times with multiple (potentially differing) sets of
results and baselines.

This patch implements the support needed for this feature, and
some basic tests, but no actual port will use the feature yet.

This is probably the simplest implementation possible - the
list of virtual suites will be hard-coded into the port's
implementation. One can imagine a more data-driven approach
where the suite instructions are stored in a manifest file
either in LayoutTests (all suites in one file), or per-port,
or per-directory. If this feature ends up being useful we
should probably add something like that so people don't have
to hunt around in the code to add suites.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):
(Port.expected_filename):
(Port.tests):
(Port):
(Port._real_tests):
(Port._driver_class):
(Port.virtual_test_suites):
(Port.virtual_suite):
(Port.virtual_suite.VirtualTestSuite):
(Port.virtual_suite.VirtualTestSuite.__init__):
(Port.virtual_suite.VirtualTestSuite.__repr__):
(Port.populated_virtual_test_suites):
(Port._virtual_tests):
(Port.lookup_virtual_test_base):
(Port.lookup_virtual_test_args):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_find_with_skipped_directories):
* Scripts/webkitpy/layout_tests/port/driver.py:
(DriverInput.__init__):
(DriverProxy.run_test):
* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort.virtual_test_suites):
(TestDriver.run_test):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.test_all):
(MainTest.test_virtual):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=79940
<rdar://problem/10080189>
        
Add support in WebKit for an intra-line character grid for Japanese text layout.
        
Patch logicalLeftOffsetForLine and logicalRightOffsetForLine in order to get the
basic edge snapping grid functionality up and running. See all the FIXMEs in the function for
some of the issues that still have to be dealt with for it to really work well.

Reviewed by Dan Bernstein.

Added new tests in fast/line-grid.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):

LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=79940
<rdar://problem/10080189>
        
Add support in WebKit for an intra-line character grid for Japanese text layout.
        
New tests for basic left and right alignment of lines in the presence of
floating and positioned objects as well as objects with margins and borders.

Reviewed by Dan Bernstein.

* fast/line-grid/line-align-left-edges.html: Added.
* fast/line-grid/line-align-right-edges.html: Added.
* platform/mac/fast/line-grid/line-align-left-edges-expected.png: Added.
* platform/mac/fast/line-grid/line-align-left-edges-expected.txt: Added.
* platform/mac/fast/line-grid/line-align-right-edges-expected.png: Added.
* platform/mac/fast/line-grid/line-align-right-edges-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RefCounted::deprecatedTurnOffVerifier() should not be deprecated
https://bugs.webkit.org/show_bug.cgi?id=79864

Reviewed by Oliver Hunt.
        
Removed the word "deprecated" from the name of this method, since this method
should not be deprecated. It works just fine as it is, and there is simply no
alternative to calling this method for many interesting JSC classes.

* parser/SourceProvider.h:
(JSC::SourceProvider::SourceProvider):
* runtime/SymbolTable.h:
(JSC::SharedSymbolTable::SharedSymbolTable):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocatorHandle::MetaAllocatorHandle):
(WTF::MetaAllocator::allocate):
* wtf/RefCounted.h:
(RefCountedBase):
(WTF::RefCountedBase::turnOffVerifier):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, add MAC GPU expectations for 2d.transformation.*
(removed due to MAC CPU config passing in r109257).

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening.  Remove suppressions for rubberbanding tests.

These tests were broken by r109183 and should be fixed by r109265.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Resource leak with IDBObjectStore.openCursor
https://bugs.webkit.org/show_bug.cgi?id=79835

Source/WebCore:

IDBCursor object that were never continue()'d to the end would leak due to a
reference cycle with IDBRequest. In addition, the IDBRequest would never be
marked "finished" which would prevent GC from reclaiming it. IDBTransactions
now track and notify IDBCursors to break these references when the transaction
can no longer not process requests.

Reviewed by Tony Chang.

Tests: storage/indexeddb/cursor-continue.html

* storage/IDBCursor.cpp:
(WebCore::IDBCursor::IDBCursor): Register with IDBTransaction bookkeeping.
(WebCore::IDBCursor::continueFunction): Early error if transaction has finished.
(WebCore::IDBCursor::close): Break the reference cycle with IDBRequest, and notify it
that the cursor is finished.
(WebCore):
* storage/IDBCursor.h:
(WebCore):
(IDBCursor):
* storage/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::finishCursor): If there is no request in flight, mark itself as
finished to allow GC.
(WebCore):
(WebCore::IDBRequest::dispatchEvent): Once an in-flight request has been processed,
mark the request as finished if the cursor is finished, to allow GC.
* storage/IDBRequest.h:
(IDBRequest):
* storage/IDBTransaction.cpp: Track open cursors, close them when finished.
(WebCore::IDBTransaction::OpenCursorNotifier::OpenCursorNotifier):
(WebCore):
(WebCore::IDBTransaction::OpenCursorNotifier::~OpenCursorNotifier):
(WebCore::IDBTransaction::registerOpenCursor):
(WebCore::IDBTransaction::unregisterOpenCursor):
(WebCore::IDBTransaction::closeOpenCursors):
(WebCore::IDBTransaction::onAbort):
(WebCore::IDBTransaction::onComplete):
* storage/IDBTransaction.h:
(WebCore):
(OpenCursorNotifier):
(IDBTransaction):

LayoutTests:

Ensure that IDBCursor.continue() throws the right exception when transaction is finished.

Reviewed by Tony Chang.

* storage/indexeddb/cursor-continue-expected.txt:
* storage/indexeddb/cursor-continue.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=79705
didNewFirstVisuallyNonEmptyLayout should be enhanced to look at size instead 
of a raw tally
-and corresponding-
<rdar://problem/10821314>

Reviewed by Dave Hyatt.

Instead of firing didNewFirstVisuallyNonEmptyLayout() when a raw tally of 
relevant painted objects has reached a port-defined threshold, this patch 
looks at the size of those objects with respect to the view area. The patch 
also looks at relevant objects that cannot yet be fully painted, such as 
incrementally loading images. 

We no longer need a HashSet for the relevant painted objects since Region can 
do all of the heavy lifting. We now have a Region for the painted and 
unpainted regions. We do need a HashSet for the unpainted objects though, 
because we need to know if a painted object needs to be subtracted from the 
unpainted region before being added to the painted region.
* page/Page.cpp:
(WebCore):
(WebCore::Page::isCountingRelevantRepaintedObjects):
(WebCore::Page::startCountingRelevantRepaintedObjects):
(WebCore::Page::resetRelevantPaintedObjectCounter):
(WebCore::Page::addRelevantRepaintedObject):
(WebCore::Page::addRelevantUnpaintedObject):
* page/Page.h:
(Page):

New function on Region iterates through the rects and calculates the total 
area.
* platform/graphics/Region.cpp:
(WebCore::Region::totalArea):
(WebCore):
* platform/graphics/Region.h:
(Region):

Remove code from these classes since they are not actually relevant objects.
* rendering/InlineBox.cpp:
(WebCore::InlineBox::paint):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::paintReplaced):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):

All of these other callers send a rect that actually represents their size 
(usually the visualOverflowRect) instead of the paintInfo's paintRect, and 
they call addRelevantUnpaintedObject when appropriate.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::paintReplaced):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::paintReplaced):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):



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

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-29

* DEPS:

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