Build fixes.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel layout: Remove explicit static_cast<LayoutUnit> conversions.
https://bugs.webkit.org/show_bug.cgi?id=129359

Reviewed by Simon Fraser.

No testable change in behavior.

* css/LengthFunctions.cpp:
(WebCore::minimumValueForLength):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintFillLayer):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::logicalLeftVisualOverflow):
(WebCore::InlineFlowBox::logicalRightVisualOverflow):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeColumnCountAndWidth):
(WebCore::getBPMWidth):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForBorderFit):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderTable.h:
(WebCore::RenderTable::borderSpacingInRowDirection):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::resolveLengthAttributeForSVG):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering: Ensure consistent border painting width.
https://bugs.webkit.org/show_bug.cgi?id=129259

Reviewed by Simon Fraser.

Border edges are painted as (semi)independent rectangles. When snapping an edge rectangle
to device pixels, its painted dimensions depend on its size and its fractional position.
Specific combination of position and border width can result in painting edges sized differently.
Using device snapped border width to calculate inner/outer rectangles helps to maintain
uniform border width.

Currently not testable.

* rendering/RenderBoxModelObject.cpp:
(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::shouldRender):
(WebCore::BorderEdge::presentButInvisible):
(WebCore::BorderEdge::widthForPainting):
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::calculateSideRect):
(WebCore::RenderBoxModelObject::paintBorderSides):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::calculateSideRectIncludingInner):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Small clean-up of flow threads accelerated compositing code
https://bugs.webkit.org/show_bug.cgi?id=129312

Reviewed by Andrei Bucur.

Some clean-up for the code used for regions in accelerated compositing functionality:
1. Rename updateRenderFlowThreadLayersIfNeeded -> updateFlowThreadsLayerToRegionMappingsIfNeeded
as the function updates the mapping between the flow threads layers and their corresponding regions
2. Remove RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded and move the code in place
at call site since the function body does not require a dedicated function.

No new functionality, no new tests.

* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
Now that the regions are always layers, we do not need to iterate backwards.
* rendering/FlowThreadController.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderLayerCompositor.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for minsize/maxsize attributes.
https://bugs.webkit.org/show_bug.cgi?id=122567

Reviewed by Chris Fleizach.

Source/WebCore:

This change implements the minsize/maxsize attributes of the mo element.
We also switch stretch sizes from int to LayoutUnit to improve accuracy.

Tests: mathml/presentation/stretchy-minsize-maxsize-dynamic.html
       mathml/presentation/stretchy-minsize-maxsize.html

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::SetOperatorProperties):
(WebCore::RenderMathMLOperator::stretchTo):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::layout):

LayoutTests:

Add some reftests for the minsize/maxsize attributes of the mo element.

* platform/mac/mathml/presentation/mo-stretch-expected.txt:
* mathml/presentation/stretchy-minsize-maxsize-dynamic-expected.html: Added.
* mathml/presentation/stretchy-minsize-maxsize-dynamic.html: Added.
* mathml/presentation/stretchy-minsize-maxsize-expected.html: Added.
* mathml/presentation/stretchy-minsize-maxsize.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Add myself as a committer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] Split the rects/scale updates in 3 internally consistent groups
https://bugs.webkit.org/show_bug.cgi?id=129354

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-25
Reviewed by Sam Weinig.

During scaling, the scale and rect of UIScrollView, WebPageProxy, DrawingAreaProxy,
DrawingArea and WebPage were in completely inconsistent states.

Some of those disconnect were temporary (like when setting the rect and scale in two different
messages), some were lasting the time of a tile update (like the UIProcess view of the scale).
This was causing various visual glitches.

To fix this, all the updates from the UIProcess are funneled through a single path and the values
are split into 3 different groups/types.
When updating the scale/rects, the UIProcess sends the new information to the WebProcess on a queue
through ViewUpdateDispatcher. There, the updates are accumulated until the MainThread is available.
Once the main thread is "unblocked" from the previous frame, all the data are updated at once from
the last known state in ViewUpdateDispatcher. The new tiles are created for the new converage information
and they are sent to the UIProcess.

At any point, there are 3 types of scale and rects used for different purpose:
-In the UIProcess, there is the UIScrollView scale and rects which represent the "true" state or what
 is currently on screen.
 That information is mirrored into WebPageProxy for the other classes needing it like DrawingAreaProxy.
-In the WebProcess, there is the last known state. That state is always lagging a little behind the "true"
 state.
-Back in the UIProcess, we have the tile states that is attached to RemoteLayerTreeTransaction. It is used
 to setup the rendering.

With this change, there are two paths for updating the page scale factor:
-The UI drives the change, the updates goes WKWebView->WKContentView->WebPageProxy->ViewUpdateDispatcher
 ->WebPage->RemoteLayerTreeDrawingArea->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
-If changes in the content force scaling parameters, the updates goes: WebPage->RemoteLayerTreeDrawingArea
 ->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
The two kind of updates frequently conflicts during loading. We differentiate those through the flag
scaleWasSetByUIProcess passed with the updates. In cases of conflicts, the user always wins.

* DerivedSources.make:
* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/VisibleContentRectUpdateInfo.cpp: Added.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h: Added.
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::exposedRect):
(WebKit::VisibleContentRectUpdateInfo::unobscuredRect):
(WebKit::VisibleContentRectUpdateInfo::scale):
(WebKit::operator==):
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scaleWasSetByUIProcess):
(WebKit::RemoteLayerTreeTransaction::setScaleWasSetByUIProcess):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView contentView:didCommitLayerTree:WebKit::]):
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRectsWithStableState:]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _endInteractiveObscuredInsetsChange]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _updateVisibleContentRects]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::updateDebugIndicator):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::displayedContentScale):
(WebKit::WebPageProxy::exposedContentRect):
(WebKit::WebPageProxy::unobscuredContentRect):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
(-[WKContentView didFinishScrolling]):
(-[WKContentView didZoomToScale:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/ViewUpdateDispatcher.cpp: Added.
(WebKit::ViewUpdateDispatcher::create):
(WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
(WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):
(WebKit::ViewUpdateDispatcher::initializeConnection):
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
* WebProcess/WebPage/ViewUpdateDispatcher.h: Added.
* WebProcess/WebPage/ViewUpdateDispatcher.messages.in: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scalePage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::scaleWasSetByUIProcess):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::tapHighlightAtPosition):
(WebKit::WebPage::updateVisibleContentRects):
(WebKit::WebPage::willStartUserTriggeredZooming):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:


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