Remove all subclasses of EventDispatchMediator except MouseEventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=122579

Reviewed by Antti Koivisto.

Removed UIRequestEventDispatchMediator, GestureEventDispatchMediator, KeyboardEventDispatchMediator,
and WheelEventDispatchMediator. Moved the code in the respective mediateAndDispatchEvent functions
to their respective dispatch*Event functions in Node.cpp and Element.cpp.

* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::eventInterface):
* Modules/indieui/UIRequestEvent.h:
* dom/Element.cpp:
(WebCore::deltaMode):
(WebCore::Element::dispatchWheelEvent):
(WebCore::Element::dispatchKeyEvent):
* dom/GestureEvent.cpp:
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
* dom/KeyboardEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):
(WebCore::Node::dispatchUIRequestEvent):
* dom/WheelEvent.cpp:
* dom/WheelEvent.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove MouseEventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=122580

Reviewed by Antti Koivisto.

Removed. Will remove EventDispatchMediator next.

* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchEvent):
(WebCore::Node::dispatchTouchEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move float logical location/dimension methods to RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=122282

Reviewed by David Hyatt.

I recently moved the logical location and dimension methods from
RenderBlock to FloatingObject. This made it so that the methods needed
to take in the horizontal writing mode of the FloatingObject's
container in order to do their thing. When looking into how to fix
this, I came to understand why RenderBlock has methods to determine
the logical location and dimensions of its children, when the children
themselves have those methods: the methods on RenderBlock are for
determining the logical value in the writing mode of that RenderBlock,
and the method on the child is for determining the logical value in
the writing mode of the child.

Since the floating object list has moved from RenderBlock to
RenderBlockFlow, this change moves the logical dimension methods from
FloatingObject to RenderBlockFlow.

No new tests, no new behavior.

* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
* rendering/FloatingObjects.h:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::repaintOverhangingFloats):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::hasOverhangingFloat):
(WebCore::RenderBlockFlow::addIntrudingFloats):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::logicalTopForFloat):
(WebCore::RenderBlockFlow::logicalBottomForFloat):
(WebCore::RenderBlockFlow::logicalLeftForFloat):
(WebCore::RenderBlockFlow::logicalRightForFloat):
(WebCore::RenderBlockFlow::logicalWidthForFloat):
(WebCore::RenderBlockFlow::logicalHeightForFloat):
(WebCore::RenderBlockFlow::logicalSizeForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat):
(WebCore::RenderBlockFlow::setLogicalTopForFloat):
(WebCore::RenderBlockFlow::setLogicalLeftForFloat):
(WebCore::RenderBlockFlow::setLogicalHeightForFloat):
(WebCore::RenderBlockFlow::setLogicalWidthForFloat):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::updateSegmentsForShapes):
(WebCore::LineBreaker::nextSegmentBreak):
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
* rendering/shapes/ShapeOutsideInfo.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout assertion failure in WebCore::RenderView::paint
https://bugs.webkit.org/show_bug.cgi?id=121925

Reviewed by Tim Horton.

This fixes the assertion seen when running WK2 API tests.

If RenderLayerCompositor::flushPendingLayerChanges() was called before
the root layer was attached, it would set m_shouldFlushOnReattach
to do the flush later, after attaching (bypassing the runloop observer
that updated layout if necessary).

This could cause us to get to a CA commit without having updated
layout, hence the assertion.

Fix by having attachRootLayer() schedule a layer flush, rather than doing
one right away.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachRootLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CSS Regions] Display the correct fragment boxes for content inside flow threads
https://bugs.webkit.org/show_bug.cgi?id=122291

Reviewed by Timothy Hatcher.

Source/WebCore:

Tests: inspector/elements/highlight-regions-flow-horiz-bt.html
       inspector/elements/highlight-regions-flow-transform-horiz-bt.html
       inspector/elements/highlight-regions-flow-transform-vert-lr.html
       inspector/elements/highlight-regions-flow-transform-vert-rl.html
       inspector/elements/highlight-regions-flow-transform.html
       inspector/elements/highlight-regions-flow-vert-lr.html
       inspector/elements/highlight-regions-flow-vert-rl.html
       inspector/elements/highlight-regions-flow.html

Nodes inside a RenderFlowThread can be split across multiple regions. This patch adds the required
code to compute "fragments" for each region. Each fragment will display its own label.

There are a couple of changes:
1. The node highlight object now has a "scroll" property to hold the main view's scroll offset.
2. There's a "fragment" array to get a list of quads for each renderer fragment. Renderers outside
RenderFlowThreads will just have one fragment.
3. ElementInfo now has two more properties: "regionFlowInfo" (renamed from former flowInfo) and "contentFlowInfo".
If the renderer is a RenderRegion it will have a regionFlowInfo. If the renderer is inside a RenderFlowThread
then it will have a "contentFlowInfo".

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::getHighlight): It should now take a "region" parameter to customize the output for a specific
containing region.
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForCSSRegionContentClip): We need to know how to clip the fragments inside regions.
(WebCore::buildObjectForRendererFragments): Extracted code from buildObjectForHighlight and added
the new regions lookup code.
(WebCore::buildObjectForElementInfo): Extracted from buildObjectForHighlight.
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawQuadHighlight):
* inspector/InspectorOverlayPage.css: There can be multiple labels on screen at once, so I've
created the #element-title-template element that we clone for each label. .element-title-container is now
holding all the .element-title elements, so that we can remove them all at once.
(.element-title-container):
(.element-title):
(#element-title-template):
(.tag-name):
(.node-id):
(.class-name):
* inspector/InspectorOverlayPage.html:
* inspector/InspectorOverlayPage.js:
(reset):
(_toggleOptionalValue):
(_createElementTitle): Creates an element populated with data read from elementInfo.
(_drawElementTitle): Added code to create more labels for multiple fragments.
(_drawRegionsHighlight):
(_drawFragmentHighlight):
(drawNodeHighlight): Consolidated the scroll property into a canvas.transform.

LayoutTests:

Added tests to check the result of the InspectorOverlay when it inspects nodes inside RenderFlowThreads.

* http/tests/inspector/elements-test.js:
* inspector/elements/highlight-regions-flow-expected.txt: Added.
* inspector/elements/highlight-regions-flow-horiz-bt-expected.txt: Added.
* inspector/elements/highlight-regions-flow-horiz-bt.html: Added.
* inspector/elements/highlight-regions-flow-transform-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-horiz-bt-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-horiz-bt.html: Added.
* inspector/elements/highlight-regions-flow-transform-vert-lr-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-vert-lr.html: Added.
* inspector/elements/highlight-regions-flow-transform-vert-rl-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-vert-rl.html: Added.
* inspector/elements/highlight-regions-flow-transform.html: Added.
* inspector/elements/highlight-regions-flow-vert-lr-expected.txt: Added.
* inspector/elements/highlight-regions-flow-vert-lr.html: Added.
* inspector/elements/highlight-regions-flow-vert-rl-expected.txt: Added.
* inspector/elements/highlight-regions-flow-vert-rl.html: Added.
* inspector/elements/highlight-regions-flow.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix some bad paths in the Xcode project
https://bugs.webkit.org/show_bug.cgi?id=122583

Reviewed by Mark Rowe.

Fix paths for some storage quota-related files, and remove
reference to mediaControlsQuickTime.css which was removed in r156546.

* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkit-patch failure-reason fails with UnicodeDecodeError when name has non-ascii characters
https://bugs.webkit.org/show_bug.cgi?id=122552

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-10-09
Reviewed by Darin Adler.

* Scripts/webkitpy/common/checkout/commitinfo.py:
(CommitInfo.blame_string): ensure objects are made into unicode strings, not regular ones that
will cause UnicodeDecodeError for non-ascii characters.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Kill some RenderObject::firstChildSlow/lastChildSlow usage.
<https://webkit.org/b/122582>

Reviewed by Antti Koivisto.

Use tighter typing in some random places to flush out unnecessary use
of virtual first/last child getters on RenderObject.

There are more of these opportunities, but I left them untouched to
avoid snowballing this patch.


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