[Chromium] IndexedDB: Memory leak in IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabaseBackendInterface>)
https://bugs.webkit.org/show_bug.cgi?id=104615

Reviewed by Tony Chang.

Ensure passed pointer is treated with ownership semantics.

* src/WebIDBCallbacksImpl.cpp:
(WebKit::WebIDBCallbacksImpl::onSuccess):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r121789): Text not wrapping in presence of floating objects
https://bugs.webkit.org/show_bug.cgi?id=101803

Reviewed by David Hyatt.

Source/WebCore:

When determining if a line needs to offset to avoid any floats use RenderBlock::lineHeight()
to estimate the height of the line. If the container has floats stacked up with different widths
that straddle the line, using a height of zero will make the first line think it has
more width available than it actually does and it will end up extruding from its container.

The logic for finding the offset of inline blocks and images needs to use a similar heuristic.
So nextLineBreak() now updates the available width if it encounters a replaced element (e.g. inline block,
image) at the start of a line, using the height of the element to decide which floats to avoid.
RenderBlock::computeInlineDirectionPositionsForLine() does the same thing when laying out the line.

Tests: fast/block/float/floats-offset-image-quirk-lineheight.html
       fast/block/float/floats-offset-image-quirk.html
       fast/block/float/floats-offset-image-strict-lineheight.html
       fast/block/float/floats-offset-image-strict.html
       fast/block/float/floats-offset-inline-block-quirk-lineheight.html
       fast/block/float/floats-offset-inline-block-strict-lineheight.html
       fast/block/float/floats-offset-linebox-contain-block.html
       fast/block/float/floats-offset-linebox-contain-inline.html
       fast/block/float/floats-wrap-inside-inline-006.html
       fast/block/float/floats-wrap-inside-inline-007.html

* rendering/RenderBlockLineLayout.cpp:
(LineWidth):
(WebCore::logicalHeightForLine):
    This method needs to cope with the quirk where an image alone on a line will get its descent stripped away so
    ignore the height of the line and use the height of the image in that case.
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::updateLogicalInlinePositions):
(WebCore):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/block/float/floats-offset-image-quirk-expected.html: Added.
* fast/block/float/floats-offset-image-quirk-lineheight-expected.html: Added.
* fast/block/float/floats-offset-image-quirk-lineheight.html: Added.
* fast/block/float/floats-offset-image-quirk.html: Added.
* fast/block/float/floats-offset-image-strict-expected.html: Added.
* fast/block/float/floats-offset-image-strict-lineheight-expected.html: Added.
* fast/block/float/floats-offset-image-strict-lineheight.html: Added.
* fast/block/float/floats-offset-image-strict.html: Added.
* fast/block/float/floats-offset-inline-block-quirk-lineheight-expected.html: Added.
* fast/block/float/floats-offset-inline-block-quirk-lineheight.html: Added.
* fast/block/float/floats-offset-inline-block-strict-lineheight-expected.html: Added.
* fast/block/float/floats-offset-inline-block-strict-lineheight.html: Added.
* fast/block/float/floats-offset-linebox-contain-block-expected.html: Added.
* fast/block/float/floats-offset-linebox-contain-block.html: Added.
* fast/block/float/floats-offset-linebox-contain-inline-expected.html: Added.
* fast/block/float/floats-offset-linebox-contain-inline.html: Added.
* fast/block/float/floats-wrap-inside-inline-006-expected.html: Added.
* fast/block/float/floats-wrap-inside-inline-006.html: Added.
* fast/block/float/floats-wrap-inside-inline-007-expected.html: Added.
* fast/block/float/floats-wrap-inside-inline-007.html: Added.


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