Addressing post-review comments in r177035
https://bugs.webkit.org/show_bug.cgi?id=139557

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-12-15
Reviewed by Darin Adler.

Source/WebCore:

This patch deletes the helper functions rendererBoundingBox() and rendererAnchorRect() and
migrates callers to using renderers directly.

It also improves the comment in RenderElement.h regarding RenderElement::anchorRect().

No new tests because this is simply refactoring.

* WebCore.exp.in: Delete exported symbol for rendererBoundingBox()
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect): Migrate off rendererBoundingBox()
* dom/ContainerNode.cpp:
(WebCore::rendererAnchorRect): Deleted.
* dom/ContainerNode.h:
* dom/Node.cpp:
(WebCore::rendererBoundingBox): Deleted.
* dom/Node.h:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView): Migrate off rendererBoundingBox().
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree): Ditto.
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect): Migrate off rendererAnchorRect().
(WebCore::FrameView::scrollToAnchor): Ditto.
* page/SpatialNavigation.cpp:
(WebCore::nodeRectInAbsoluteCoordinates): Migrate off rendererBoundingBox().
* rendering/RenderElement.h:

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(elementBoundingBoxInWindowCoordinatesFromNode): Migrate off rendererBoundingBox().

Source/WebKit2:

* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates): Migrate off rendererBoundingBox().
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r168217): Images are cropped out during animation at jetblue.com
https://bugs.webkit.org/show_bug.cgi?id=136410
rdar://problem/18188533

Reviewed by Dean Jackson.

During GraphicsLayer flushing, for tiled layers we can compute a visible rect using
the current state of an animation, which is obtained via the AnimationController.
If that animation was running in a subframe, AnimationController could use a stale
beginAnimationUpdateTime since no-one called its beginAnimationUpdate(). That
resulted in an incorrect computation of the visible rect, resulting in missing tiles.

There are two parts to this fix. First, add an assertion that beginAnimationUpdateTime()
is being called inside an animation update block. This required moving m_beginAnimationUpdateCount
into AnimationControllerPrivate, and changes to endAnimationUpdate().

The second is adding a AnimationUpdateBlock to getAnimatedStyleForRenderer(), which
can be called outside of style resolution. We also need some in other API functions.

Testing revealed that layout can call via layoutOverflowRectForPropagation(), suggesting
that we should have an animation batch inside FrameView::layout(). In addition, a single
resolveStyle/layout should use the same animationBeginTime, so we add a batch to
updateLayoutAndStyleIfNeededRecursive().

No test because it's timing-dependent. Existing tests exercise the new assertion.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computeRenderStyleForProperty):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/animation/AnimationController.cpp:
(WebCore::AnimationPrivateUpdateBlock::AnimationPrivateUpdateBlock):
(WebCore::AnimationPrivateUpdateBlock::~AnimationPrivateUpdateBlock):
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
(WebCore::AnimationControllerPrivate::animationTimerFired):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
(WebCore::AnimationControllerPrivate::beginAnimationUpdate):
(WebCore::AnimationControllerPrivate::endAnimationUpdate):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationController::AnimationController):
(WebCore::AnimationController::notifyAnimationStarted):
(WebCore::AnimationController::pauseAnimationAtTime):
(WebCore::AnimationController::pauseTransitionAtTime):
(WebCore::AnimationController::resumeAnimationsForDocument):
(WebCore::AnimationController::startAnimationsIfNotSuspended):
(WebCore::AnimationController::beginAnimationUpdate):
(WebCore::AnimationController::endAnimationUpdate):
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement Data Detectors immediate actions for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139617
<rdar://problem/19198539>

Reviewed by Beth Dakin.

* platform/spi/mac/DataDetectorsSPI.h:
Add some new SPI.

* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _menuItemForDataDetectedText]):
Note that this action context is only for immediate actions.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement Data Detectors immediate actions for Legacy WebKit
https://bugs.webkit.org/show_bug.cgi?id=139619
<rdar://problem/19198539>

Reviewed by Beth Dakin.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _menuItemForDataDetectedText]):
Note that this action context is only for immediate actions.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r177301

* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify tracking of process suppression disabled for PluginProcessManager
https://bugs.webkit.org/show_bug.cgi?id=139611

Unreviewed gtk/efl build fix.

* UIProcess/Plugins/PluginProcessManager.h:
    - missing #ifdef



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Floats Don't Overhang Their Block Formatting Contex
https://bugs.webkit.org/show_bug.cgi?id=139476

Reviewed by David Hyatt.

From Blink r172530 by <robhogan@gmail.com>

Source/WebCore:

Floats Don't Overhang Their Block Formatting Context Per
http://www.w3.org/TR/CSS2/visuren.html#float-position: "References
to [the elements] in the [rules that govern the behaviour of
floats] refer only to other elements in the same block formatting
context as the float."

This means we don't need to look for intruding or overhanging
floats in boxes that establish a new block formatting
context. Even that we don't have a test breaking this rule it
seems we are doing unnecessary work in
rebuildFloatsFromIntruding() so make sure we avoid adding floats
from different block formatting contexts.

Test:
fast/block/float/floats-do-not-overhang-from-block-formatting-context.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::addIntrudingFloats):

LayoutTests:

Tests to verify that float elements don't overhang blocks with a
different formatting context.

* fast/block/float/floats-do-not-overhang-from-block-formatting-context-expected.txt: Added.
* fast/block/float/floats-do-not-overhang-from-block-formatting-context.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Docked inspector repositioned incorrectly when dragging frame borders
https://bugs.webkit.org/show_bug.cgi?id=139415

Patch by Matt Baker <mattbaker@apple.com> on 2014-12-15
Reviewed by Joseph Pecoraro.

The _ignoreNextInspectedViewFrameDidChange flag wasn't set back to NO after
being tested by inspectedViewFrameDidChange.

* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Said to the committers section.

* Scripts/webkitpy/common/config/contributors.json:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix iOS build.

* WebCore.exp.in:



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