Unreviewed gardening. Added new baselines for GTK after revision r151841 and r151868.

* accessibility/listitem-title-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/listitem-title-expected.txt.
* platform/gtk/accessibility/aria-tab-role-on-buttons-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix WebKitTestRunner crashes.
https://bugs.webkit.org/show_bug.cgi?id=117630

Reviewed by Darin Adler.

Create static function to dump for WebProcess unresponsiveness status,
and use it before calling TestController::runTest().

Accessing TestController::m_currentInvocation before calling
TestController::runTest() can make crash because the invocation
instance will be assigned at the function.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::run):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpWebProcessUnresponsiveness):
* WebKitTestRunner/TestInvocation.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Added new common expectations for test after r151665.

* accessibility/box-styled-lists-expected.txt: Added shared expectation.
* platform/efl/TestExpectations: Removed failure expectation.
* platform/gtk/TestExpectations: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Crash after download.
https://bugs.webkit.org/show_bug.cgi?id=118303

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-07-02
Reviewed by Brent Fulgham.

We need to make sure that the Curl easy handle is removed from the Curl multi handle before it's freed.

* platform/network/curl/CurlDownload.cpp:
(CurlDownloadManager::updateHandleList): Use addToCurl() and removeFromCurl() methods.
(CurlDownloadManager::addToCurl): Add method to add easy handle to multi handle.
(CurlDownloadManager::removeFromCurl): Add method to remove easy handle from multi handle, and then delete the handle.
(CurlDownloadManager::downloadThread): Use removeFromCurl() method.
(CurlDownload::~CurlDownload):
* platform/network/curl/CurlDownload.h: Avoid deleting Curl easy handle in destructor.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Leak: leaks in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118297

Fixed memory leak.

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-02
Reviewed by Christophe Dumez.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::stringValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove SVGStyledLocatableElement class
https://bugs.webkit.org/show_bug.cgi?id=118283

Reviewed by Dirk Schulze.

Remove SVGStyledLocatableElement class and have SVGGraphicsElement
inherit SVGStyledElement directly instead. SVGStyledLocatableElement
is no longer needed and according to the specification, SVGGraphicsElement
should inherit SVGStyledElement (actually SVGElement once we merge
SVGStyledElement into SVGElement).

No new tests, no behavior change.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* svg/SVGAllInOne.cpp:
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
* svg/SVGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGGraphicsElement.h:
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):
* svg/SVGStyledLocatableElement.cpp: Removed.
* svg/SVGStyledLocatableElement.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction for 'DebugSuffix' target.

* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Must pass the
DEBUGSUFFIX definition to the nmake instance to be available during script processing.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
constrainScrollPositionForOverhang needs to handle scrollOrigin correctly
https://bugs.webkit.org/show_bug.cgi?id=118176
<rdar://problem/14301271>

Reviewed by Anders Carlsson.

Test: compositing/geometry/fixed-position-flipped-writing-mode.html

WebCore makes use of constrainScrollPositionForOverhang not only for
constraining fixed- and sticky-positioned elements to the viewport, but
also for clamping the tile cache's visible rect.

Therefore, constrainScrollPositionForOverhang needs to correctly take
the scrollOrigin into account. The easiest way I saw to do this was to
reimplement the function in terms of a pair of rect intersections
between a virtual scrollable "viewport" and the document (with a bit
of complication from headers and footers).

The first intersection is performed, then if the viewport doesn't fit,
it is pushed down and to the right, from the origin. Next, we intersect
again, this time pushing the rect up by the amount it overflowed the document
rect from the bottom right. This performs effectively the same constraint
as previously, but handles the scrollOrigin correctly and is also somewhat
easier to read and understand (with pictures).

* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
Subtract the scrollOrigin out of the offset passed to scrollOffsetForFixedPosition,
it's expecting an offset without the origin included.

* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::constrainScrollPositionForOverhang):
Reimplement the function as described above.

Add a test that ensures that fixed position works with a scrollable document
and direction: rtl, which is one case where scrollOrigin is set.

Disable the test on Mac WebKit1 because of https://bugs.webkit.org/show_bug.cgi?id=118269.

* compositing/geometry/fixed-position-flipped-writing-mode-expected.txt: Added.
* compositing/geometry/fixed-position-flipped-writing-mode.html: Added.
* platform/mac/compositing/geometry/fixed-position-flipped-writing-mode-expected.png: Added.
* platform/mac/TestExpectations:
* platform/mac-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
plainText() is O(N^2)
https://bugs.webkit.org/show_bug.cgi?id=118282
<rdar://problem/14284360>

Reviewed by Alexey Proskuryakov.

Source/WebCore: 

* editing/TextIterator.cpp:
(WebCore::plainText): Linear growth for a vector data type is O(N^2).
Don't do that. Luckily, StringBuilder does the right thing automatically,
so we can just delete code.

Source/WTF: 

* wtf/text/StringBuilder.cpp:
(WTF::expandCapacity): Factored out this helper function to simplify
some code that was duplicated in four places.

(WTF::StringBuilder::appendUninitializedSlow):
(WTF::StringBuilder::append): Use expandCapacity(). One of the cases
was not doing anything special, and so was O(N^2).

Also, always call expandCapacity() it in a standard way, calling
capacity() first, so it's easy to tell at a glance that you got it right.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement CoordinatedSurface for Threaded Coordinated Graphics
https://bugs.webkit.org/show_bug.cgi?id=109661

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-07-02
Reviewed by Noam Rosenthal.

This is a preparation patch for Threaded Coordianted Graphics.

This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a
backend. Also, this patch moves common implementation to CoordinatedSurface to
prevent duplication of code.

Source/WebCore:

* platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:
(WebCore::CoordinatedSurface::CoordinatedSurface):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
(WebCore::CoordinatedSurface::size):
(WebCore::CoordinatedSurface::flags):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Added.
(WebCore::ThreadSafeCoordinatedSurface::create):
(WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
(WebCore::ThreadSafeCoordinatedSurface::~ThreadSafeCoordinatedSurface):
(WebCore::ThreadSafeCoordinatedSurface::paintToSurface):
(WebCore::ThreadSafeCoordinatedSurface::copyToTexture):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Added.

Source/WebKit2:

* Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
(WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
* Shared/CoordinatedGraphics/WebCoordinatedSurface.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
empty inlines should not affect line-wrapping
https://bugs.webkit.org/show_bug.cgi?id=25638

Reviewed by David Hyatt.

Source/WebCore:

Don't break on empty inlines if we're in the middle of a word. I took this opportunity to
refactor the series of checks we perform to establish if we can break at the current position.

Test: fast/text/whitespace/inline-whitespace-wrapping-11.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::textBeginsWithBreakablePosition):
(WebCore::canBreakAtThisPosition):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/text/whitespace/inline-whitespace-wrapping-11-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-11.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace RELEASE_ASSERT with ASSERT in CodeBlock:: bytecodeOffsetForCallAtIndex
https://bugs.webkit.org/show_bug.cgi?id=118316

Reviewed by Geoffrey Garen.

This is causing some crashiness in release builds. We should replace it with an ASSERT 
until we track down all the places that need fixing in bug 118315.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffsetForCallAtIndex):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Always flip the coordinate system before drawing NSViews from Widget::paint
https://bugs.webkit.org/show_bug.cgi?id=118318
<rdar://problem/13895483>

Reviewed by Beth Dakin.

Undo the change that would not flip on 10.9; turns out the bug was in AppKit. Also remove the
_hasCanDrawSubviewsIntoLayerOrAncestor workaround since drawing works correctly now.

Also, pass flipped:NO when creating the NSGraphicsContext to indicate that the graphics context
is unflipped as far as AppKit knows (since we flipped it earlier).

* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage().
https://bugs.webkit.org/show_bug.cgi?id=118268

Reviewed by Beth Dakin.

* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage()
can be null if this method is called after the web page is closed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        security/block-test.html fails when NetworkProcess is enabled
        https://bugs.webkit.org/show_bug.cgi?id=118320
        <rdar://problem/14309423>

        Reviewed by Geoff Garen.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::wasBlocked):
        (WebKit::NetworkResourceLoader::cannotShowURL):
        Implemented missing ResourceHandleClient functions.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
https://bugs.webkit.org/show_bug.cgi?id=118319

Reviewed by Darin Adler.

Source/WebCore: 

Test: media/track/track-legacyapi-with-automatic-mode.html

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
    logic when captions were enabled with .webkitClosedCaptionsVisible.

LayoutTests: 

* media/track/track-legacyapi-with-automatic-mode-expected.txt: Added.
* media/track/track-legacyapi-with-automatic-mode.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip cache partitioning tests on Lion.

Rubber stamped by Jeffrey Pfau.

* platform/mac-lion/TestExpectations:
http/tests/cache/partitioned-cache.html
http/tests/cache/partitioned-cache-iframe.html

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Improve implementation of elements in region being flowed to another flow thread
https://bugs.webkit.org/show_bug.cgi?id=118300

Patch by Radu Stavila <stavila@adobe.com> on 2013-07-02
Reviewed by David Hyatt.

Source/WebCore:

Methods that must be const have been turned back into const. Code has been better organized.
Performance is better. Tests have been added to.

* dom/Element.cpp:
(WebCore::Element::detach):
(WebCore::Element::setIsInsideRegion):
(WebCore::Element::isInsideRegion):
(WebCore::Element::shouldMoveToFlowThread):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::isInsideRegion):
(WebCore::ElementRareData::setIsInsideRegion):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
(WebCore::Node::isRegisteredWithNamedFlow):
* dom/Node.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::parentRenderer):
(WebCore::NodeRenderingContext::shouldCreateRenderer):
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/NodeRenderingContext.h:
* dom/PseudoElement.h:
* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):
* dom/Text.h:
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::unregisterNamedFlowContentNode):
(WebCore::FlowThreadController::isContentNodeRegisteredWithAnyNamedFlow):
* rendering/FlowThreadController.h:
* rendering/RenderObject.h:
* rendering/RenderRegion.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::shouldMoveToFlowThread):
* svg/SVGElement.h:

LayoutTests:

* fast/regions/flow-body-in-html.html:
* fast/regions/region-content-flown-into-region-expected.html:
* fast/regions/region-content-flown-into-region.html:
* fast/regions/universal-selector-children-to-the-same-region.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed rebaseline of Mac Lion fast/js/global-constructors-attributes after r151914.

* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
WaveTable -> PeriodicWave

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed rebaseline of media/video-controls-captions-trackmenu-localized after r151697.

* platform/mac-lion/media/video-controls-captions-trackmenu-localized-expected.txt: Removed.
"Unknown SDH" -> "Unknown".

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