AX: Chromium doesn't pass accessibility text range and line number tests
https://bugs.webkit.org/show_bug.cgi?id=97246

Reviewed by Chris Fleizach.

Source/WebCore:

Adds a method to get all line breaks at once, so retrieving all
line breaks isn't an O(n^2) operation for Chromium.

Enables four existing tests to pass on Chromium:
Tests: accessibility/textarea-insertion-point-line-number.html
       accessibility/textarea-line-for-index.html
       accessibility/textarea-selected-text-range.html
       accessibility/textbox-role-reports-selection.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::lineBreaks):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::lineBreaks):
(WebCore):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):

Source/WebKit/chromium:

Use improved implementation of AccessibilityRenderObject::lineBreaks
and implement methods to get the line number of the selection and
to set the text range.

Enables four existing tests to pass on Chromium:
Tests: accessibility/textarea-insertion-point-line-number.html
       accessibility/textarea-line-for-index.html
       accessibility/textarea-selected-text-range.html
       accessibility/textbox-role-reports-selection.html

* public/WebAccessibilityObject.h:
(WebAccessibilityObject):
* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::selectionEndLineNumber):
(WebKit):
(WebKit::WebAccessibilityObject::selectionStartLineNumber):
(WebKit::WebAccessibilityObject::setSelectedTextRange):
(WebKit::WebAccessibilityObject::lineBreaks):

Tools:

Provide a chromium implementation of some AccessibilityUIElement
methods needed by accessibility tests.

Enables four existing tests to pass on Chromium:
Tests: accessibility/textarea-insertion-point-line-number.html
       accessibility/textarea-line-for-index.html
       accessibility/textarea-selected-text-range.html
       accessibility/textbox-role-reports-selection.html

* DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
(AccessibilityUIElement::insertionPointLineNumberGetterCallback):
(AccessibilityUIElement::selectedTextRangeGetterCallback):
(AccessibilityUIElement::lineForIndexCallback):
(AccessibilityUIElement::setSelectedTextRangeCallback):

LayoutTests:

Enables four tests on chromium:
Tests: accessibility/textarea-insertion-point-line-number.html
       accessibility/textarea-line-for-index.html
       accessibility/textarea-selected-text-range.html
       accessibility/textbox-role-reports-selection.html

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Handling required for multiple consecutive whitespace
https://bugs.webkit.org/show_bug.cgi?id=97575

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-09-25
Reviewed by Rob Buis.

PR211670
Need specific handling in the case where we have multiple
consecutive whitespaces which exceeds our character limit. This
breaks some of the functionality employed with the visible_units
methods used here to tranverse the text.

Internally reviewed by Mike Fenton.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::trimWhitespaceFromRange):
(DOMSupport):
(BlackBerry::WebKit::DOMSupport::isEmptyRangeOrAllSpaces):
* WebKitSupport/DOMSupport.h:
(WebCore):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::spellCheckBlock):
(BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] REGRESSION: Incorrect preferred width calculation for table cells
https://bugs.webkit.org/show_bug.cgi?id=97497

Reviewed by Levi Weintraub.

Source/WebCore: 

In fixing bug 93911 r125694 caused a problem with the preferred
width calculations for table cells with a fractional padding
where the logic to ensure that the cell is wide enough for the
content returns different results for cells with a fixed width
and cells with an automatic width.

Test: fast/sub-pixel/table-cells-have-stable-width.html

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths):
Move the logic that ensures that a cell is wide enough from AutoTableLayout::recalcColumn to RenderBlock::computePreferredLogicalWidths to. This way it also applies to FixedTableLayout which had the same problem.

LayoutTests: 

Added test for cell width calculation and reverted three svg tests to the results prior to r125694.

* fast/sub-pixel/table-cells-have-stable-width-expected.txt: Added.
* fast/sub-pixel/table-cells-have-stable-width.html: Added.
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Enable css exclusions for multiple blocks per element
https://bugs.webkit.org/show_bug.cgi?id=89993

Patch by Bear Travis <betravis@adobe.com> on 2012-09-25
Reviewed by Julien Chaffraix.

Source/WebCore:

Similar to multi-column layout, a parent RenderBlock's WrapShapeInfo may affect
the inline content of its children. This patch follows the example of ColumnInfo
and adds WrapShapeInfo to LayoutState, which tracks the current shape-inside that
inline content should respect.

Tests: fast/exclusions/shape-inside/shape-inside-multiple-blocks.html
       fast/exclusions/shape-inside/shape-inside-multiple-blocks-vertical.html

* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState): Initialize m_wrapShapeInfo.
* rendering/LayoutState.h:
(WebCore):
(WebCore::LayoutState::LayoutState): Initialize m_wrapShapeInfo.
(LayoutState):
(WebCore::LayoutState::wrapShapeInfo): Getter for m_wrapShapeInfo.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::LineWidth): Use LayoutState to lookup WrapShapeInfo.
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState): Push LayoutState if a WrapShapeInfo
is present.

LayoutTests:

Adding tests to cover the case where a shape-inside affects block children's
inline content.

* fast/exclusions/shape-inside/shape-inside-multiple-blocks-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-multiple-blocks-vertical-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-multiple-blocks-vertical.html: Added.
* fast/exclusions/shape-inside/shape-inside-multiple-blocks.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix, GeolocationClientMock should not be included by WebProcess InjectedBundle

Unreviewed.

The patch r129252 removes the dependencies on GeolocationClientMock, r129444 removes
GeolocationClientMock from the Mac port. The #include breaks new Mac build.

* WebProcess/InjectedBundle/InjectedBundle.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r129517.
http://trac.webkit.org/changeset/129517
https://bugs.webkit.org/show_bug.cgi?id=97582

Link errors in chromium (Requested by alecf on #webkit).

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

Source/Platform:

* chromium/public/WebMediaConstraints.h:
(WebMediaConstraints):

Source/WebCore:

* Modules/mediastream/MediaConstraintsImpl.cpp:
* Modules/mediastream/MediaConstraintsImpl.h:
* Modules/mediastream/NavigatorMediaStream.cpp:
(WebCore::NavigatorMediaStream::webkitGetUserMedia):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create):
(WebCore::UserMediaRequest::UserMediaRequest):
* Modules/mediastream/UserMediaRequest.h:
(WebCore):
(UserMediaRequest):
(WebCore::UserMediaRequest::audio):
(WebCore::UserMediaRequest::video):
* platform/chromium/support/WebMediaConstraints.cpp:

Source/WebKit/chromium:

* public/WebUserMediaRequest.h:
(WebUserMediaRequest):
* src/WebUserMediaRequest.cpp:

Tools:

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/MockConstraints.cpp: Removed.
* DumpRenderTree/chromium/MockConstraints.h: Removed.
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(RTCSessionDescriptionRequestSuccededTask::RTCSessionDescriptionRequestSuccededTask):
(RTCSessionDescriptionRequestFailedTask::RTCSessionDescriptionRequestFailedTask):
(RTCVoidRequestTask::RTCVoidRequestTask):
(isSupportedConstraint):
(isValidConstraint):
(MockWebRTCPeerConnectionHandler::initialize):
* DumpRenderTree/chromium/WebUserMediaClientMock.cpp:
(WebKit::WebUserMediaClientMock::requestUserMedia):
* DumpRenderTree/chromium/WebUserMediaClientMock.h:
(WebKit):
(WebUserMediaClientMock):
* DumpRenderTree/chromium/WebViewHost.h:
(WebKit):
(WebViewHost):

LayoutTests:

* fast/mediastream/getusermedia-expected.txt:
* fast/mediastream/getusermedia.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Don't kill automatically the web process when the ui process finishes
https://bugs.webkit.org/show_bug.cgi?id=97580

Reviewed by Martin Robinson.

We use prctl(PR_SET_PDEATHSIG, SIGKILL); in linux to make sure the
web process is killed when the UI process finishes. This is not
needed any more since now the web process stops the main loop when
the connection with the UI process is closed in
WebProcess::didClose(). This approach is better because it works
for any platform and makes the web process finish normally from
main().

* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::childSetupFunction): Don't call prctl(PR_SET_PDEATHSIG,
SIGKILL) in the child process.

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