Add a couple people to the MathML watchlist
https://bugs.webkit.org/show_bug.cgi?id=118909

Reviewed by Andreas Kling.

Add a couple people to the MathML watchlist and add Kalyan's other
email address to fix style checker warnings about the watchlist
contents.

* Scripts/webkitpy/common/config/contributors.json: Add Frédéric to the
list of contributors and add Kalyan's second email address.
* Scripts/webkitpy/common/config/watchlist: Add myself and Frédéric to the MathML
watchlist.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes][CSS Regions] Modify existing tests to test overflow also when padding is applied on the container
https://bugs.webkit.org/show_bug.cgi?id=117881

Reviewed by David Hyatt.

Currently, we don't have tests which test the overflow behavior when there is padding applied on the container.
I modified the existing tests to cover these cases as well and increase our test coverage.

* fast/shapes/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html:
* fast/shapes/shape-inside/shape-inside-overflow-fixed-dimensions.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TrailingObjects shouldn't shrink vector capacity in a loop
https://bugs.webkit.org/show_bug.cgi?id=118322

Reviewed by Darin Adler.

This seems to take about 3% off the profile of loading a large text file.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::TrailingObjects::clear): clear() has the built-in side effect
of throwing away existing capacity. Use shrink(0) to indicate that we
want to keep our existing capacity.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Clear overflowing line's segments in pushShapeContentOverflowBelowTheContentBox
https://bugs.webkit.org/show_bug.cgi?id=118002

Reviewed by David Hyatt.

When the last line in the shape overlaps with the shape bottom boundaries we need to clear the computed segments. (We need to compute
the segments anyway, since shape-outside's code uses the same code path to determine its segments and the line containing is not a
requirement in that case.) Rather then doing the job in RenderBlock::LineBreaker::nextLineBreak I moved the functionality to its correct
place to pushShapeContentOverflowBelowTheContentBox. Now all the overflow related functionality is located in one function. I fixed the
corresponding layout test.

Source/WebCore:

Tests: I modified shape-inside-overflow.html.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox): Remove segments if line overlaps with the shape's boundaries.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Move segments clear logic to pushShapeContentOverflowBelowContentBox.

LayoutTests:

* fast/shapes/shape-inside/shape-inside-overflow-expected.html:
* fast/shapes/shape-inside/shape-inside-overflow.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hover doesn't work for block elements inside a href element
https://bugs.webkit.org/show_bug.cgi?id=118907

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

Source/WebCore:

Added test for hovering block elements inside a href element.

Test: fast/css/hover-display-block.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::hoverAncestor):

LayoutTests:

Don't skip all anonymous objects when searching for the hover ancestor, only the ones
directly flowed into a region.

* fast/css/hover-display-block-expected.txt: Added.
* fast/css/hover-display-block.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Http response code 401 (Authentication required) is not handled.
https://bugs.webkit.org/show_bug.cgi?id=118849

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

The current Curl implementation does not handle a 401 response.
When receiving http code 401, we need to give a notification that authorization is required, by calling the appropriate notification method.
This gives a WebKit client the possibility to present a password dialog to the user.
In response to this, we should provide Curl with the given username and password, so another request can be sent with the given credentials.

Source/WebCore:

* platform/network/ResourceHandle.h:
    Added method to check if credential storage should be used.
* platform/network/ResourceHandleInternal.h:
    Added member to keep track of number of authentication failures.
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::shouldUseCredentialStorage):
    Added method to check if credential storage should be used.
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
    Implement method; notify client when authentication is required.
(WebCore::ResourceHandle::receivedCredential):
    Implement method; provide Curl with password and username when available.
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
    Implement method; reset Curl username and password.
(WebCore::ResourceHandle::receivedCancellation):
    Implement method; notify client that authorization has been cancelled.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpAuthentication):
    Added function to check if http code is an 'Authorization required' code.
(WebCore::getProtectionSpace):
    Added function to initialize a protection space object from a Curl handle and a response object.
(WebCore::headerCallback):
    Notify client when authorization is required.
(WebCore::ResourceHandleManager::applyAuthenticationToRequest):
    Added method to set Curl username and password.
(WebCore::ResourceHandleManager::initializeHandle):
    Use method to set Curl username and password.
* platform/network/curl/ResourceHandleManager.h:
    Added method to set Curl username and password.

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
    Implement empty method; use the same implementation as the CFNetwork version does,
    notify delegate when authorization is required.
* WebURLAuthenticationChallengeSenderCurl.cpp:
(WebURLAuthenticationChallengeSender::cancelAuthenticationChallenge):
    Implement empty method; use the same implementation as the CFNetwork version does.
(WebURLAuthenticationChallengeSender::continueWithoutCredentialForAuthenticationChallenge):
    Implement empty method; use the same implementation as the CFNetwork version does.
(WebURLAuthenticationChallengeSender::useCredential):
    Implement empty method; use the same implementation as the CFNetwork version does.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
OSX: ePub: Unable to select text in vertical Japanese book
https://bugs.webkit.org/show_bug.cgi?id=118864
<rdar://problem/14109351>

Reviewed by Dan Bernstein and Sam Weinig.

Source/WebCore: 

This patch fixes all of the various writing-mode and pagination combinations
so that the columns are painted in the correct location. The code that sets up
the initial painting translation offset in the block direction and that advances
that offset has been pulled into two helper functions, initialBlockOffsetForPainting
and blockDeltaForPaintingNextColumn, and that code is now shared by the four call
sites that need it (painting and hit testing in RenderBlock and painting and hit testing
in RenderLayer).
        
This patch also backs out the maximumScrollPosition change, since it only occurred because
of incorrect sizing of the RenderView, and this sizing issue has now been corrected by
ensuring that computeLogicalHeight() always makes sure you are the size of the viewport
and does not shrink you to the column height.
        
There was also a race condition that caused pagination to be incorrect if layout occurred
before the html/body renderer that set the writing-mode were available. When this happened,
the writing mode got propagated up to the view, but the column styles didn't get
adjusted to compensate for the writing mode change.

Added tests for every pagination and writing-mode combination in fast/multicol/pagination.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForDocument):
(WebCore::StyleResolver::adjustRenderStyle):
Move setStylesForPaginationMode into RenderStyle and make it a member function. This is
necessary so that the style can be adjusted dynamically to fix the race condition mentioned
above.

* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
Back out this change since the symptom it was fixing only occurred because the logical
height of the view was being set incorrectly.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
Patch the column code that sets up the initial page height to use the pagination API's
page height rather than the viewport logical height. This allows the view to still match
the viewport in dimensions rather than being incorrectly sized to the column height.
        
(WebCore::RenderBlock::initialBlockOffsetForPainting):
(WebCore::RenderBlock::blockDeltaForPaintingNextColumn):
Two new helper functions used to set up the block direction paint/hit testing translation.
The major bug fix that occurred in this code is that the old block axis code didn't handle
reversal correctly and it also used physical coordinates to try to determine the translation
offset, when you really need to use logical coordinates in the original writing mode coordinate
system to determine the offset.

(WebCore::RenderBlock::paintColumnContents):
Patched to call the new helper functions.

(WebCore::ColumnRectIterator::ColumnRectIterator):
(WebCore::ColumnRectIterator::adjust):
(WebCore::ColumnRectIterator::update):
Patched to call the new helper functions.

* rendering/RenderBlock.h:
Add the two new helper functions to the RenderBlock header.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
If the writing mode of the html/body propagates to the viewport and changes its writing mode,
also change our column styles to match if we're in paginated mode.

(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
Call the new pageOrViewLogicalHeight function on RenderView instead of
RenderBox::viewLogicalHeightForPercentages (which is now removed).

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::hitTestChildLayerColumns):
Patched to use the two new helper functions for block direction paint offset setup and
advancement.

* rendering/RenderView.cpp:
(WebCore::RenderView::pageOrViewLogicalHeight):
New helper function that does what viewLogicalHeightForPercentages used to do but also
handles returning the page length for block axis column progression. Again, this is to
allow the view to retain its correct size (matching the viewport).

(WebCore::RenderView::viewLogicalHeight):
Back out the code that made the view grow or shrink to the size of the Pagination API page
length when the progression was block axis. This was the source of most of the scroll origin
and scrolling issues.

* rendering/RenderView.h:
Add the new pageOrViewLogicalHeight() function.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setColumnStylesFromPaginationMode):
This is the old StyleResolver function for setting up the column styles. It's in RenderStyle
now so that it can be called at any time to change a style rather than only at style resolution
time.

* rendering/style/RenderStyle.h:
Declaration of the setColumnStylesFromPaginationMode function.

LayoutTests: 

* fast/multicol/pagination: Added.
* fast/multicol/pagination/BottomToTop-bt.html: Added.
* fast/multicol/pagination/BottomToTop-lr.html: Added.
* fast/multicol/pagination/BottomToTop-rl.html: Added.
* fast/multicol/pagination/BottomToTop-tb.html: Added.
* fast/multicol/pagination/LeftToRight-bt.html: Added.
* fast/multicol/pagination/LeftToRight-lr.html: Added.
* fast/multicol/pagination/LeftToRight-rl.html: Added.
* fast/multicol/pagination/LeftToRight-tb.html: Added.
* fast/multicol/pagination/RightToLeft-bt.html: Added.
* fast/multicol/pagination/RightToLeft-lr.html: Added.
* fast/multicol/pagination/RightToLeft-rl.html: Added.
* fast/multicol/pagination/RightToLeft-tb.html: Added.
* fast/multicol/pagination/TopToBottom-bt.html: Added.
* fast/multicol/pagination/TopToBottom-lr.html: Added.
* fast/multicol/pagination/TopToBottom-rl.html: Added.
* fast/multicol/pagination/TopToBottom-tb.html: Added.
* platform/mac/fast/multicol/pagination: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.png: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.txt: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.png: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.txt: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.png: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.txt: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.png: Added.
* platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.txt: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.png: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.txt: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.png: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.txt: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.png: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.txt: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.png: Added.
* platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.txt: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.png: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.txt: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.png: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.txt: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.png: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.txt: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.png: Added.
* platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.txt: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.png: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.txt: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.png: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.txt: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.png: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.txt: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.png: Added.
* platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.txt: Added.
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png:
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt:



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