REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements.
<http://webkit.org/b/119520>
<rdar://problem/14658929>

Reviewed by Simon Fraser.

Source/WebCore:

When computing a new caret rect, don't forget to repaint the old rect if the caret jumped
from one node to another.
We were being a little too clever, assuming that oldRect==newRect meant that no repaint was
necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret
in the old node.

Test: fast/repaint/caret-jump-between-nodes.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):

    Fall through all the way down to caret repaints if the selection's new anchor node is not
    the same as m_previousCaretNode.

LayoutTests:

* fast/repaint/caret-jump-between-nodes-expected.txt: Added.
* fast/repaint/caret-jump-between-nodes.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move more style recalc code to StyleResolveTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=119553

Reviewed by Andreas Kling.

* css/StyleResolver.cpp:
* css/StyleResolver.h:
        
    Remove now unused StyleResolver::styleForText.

* dom/ElementShadow.cpp:
* dom/ElementShadow.h:
        
    Remove ElementShadow::recalcStyle.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
        
    Use Style::resolveTree instead of ElementShadow::recalcStyle.

* dom/ShadowRoot.h:
        
    Remove ShadowRoot::recalcStyle.

* dom/Text.cpp:
* dom/Text.h:
        
    Remove Text::recalcTextStyle.

* style/StyleResolveTree.cpp:
(WebCore::Style::updateTextStyle):
        
    Moved from Text::recalcTextStyle. Speed up by just setting the parent style on common case.

(WebCore::Style::resolveShadowTree):
        
    Moved from ShadowRoot::recalcStyle. 
    Simplified to cover only cases that can occur with the current shadow DOM support.

(WebCore::Style::resolveTree):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Use granular DOMStorage modification events to avoid complete DataGrid update.
https://bugs.webkit.org/show_bug.cgi?id=119541

Reviewed by Joseph Pecoraro.

InspectorDOMStorageAgent sends more granular events about the storage modifications.
Using these would avoid the complete rebuilding of the DataGrid.

* UserInterface/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView.prototype.itemsCleared):
(WebInspector.DOMStorageContentView.prototype.itemRemoved):
(WebInspector.DOMStorageContentView.prototype.itemAdded):
(WebInspector.DOMStorageContentView.prototype.itemUpdated):
* UserInterface/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.domStorageItemsCleared):
(WebInspector.DOMStorageObserver.prototype.domStorageItemRemoved):
(WebInspector.DOMStorageObserver.prototype.domStorageItemAdded):
(WebInspector.DOMStorageObserver.prototype.domStorageItemUpdated):
* UserInterface/StorageManager.js:
(WebInspector.StorageManager.prototype.domStorageItemsCleared):
(WebInspector.StorageManager.prototype.domStorageItemRemoved):
(WebInspector.StorageManager.prototype.domStorageItemAdded):
(WebInspector.StorageManager.prototype.domStorageItemUpdated):


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