   # Updates the existing HTMLNode with the new decoration info. Attempts to
   # minimize changes to the DOM.
   updateDecorationHTML: (existingNode, decorationId, newDecorationInfo) ->
-    if existingNode.style.top isnt newDecorationInfo.top + 'px'
+    oldPositionState = @oldDecorationPositionState[decorationId];
+
+    if oldPositionState.top isnt newDecorationInfo.top + 'px'
       existingNode.style.top = newDecorationInfo.top + 'px'
+      oldPositionState.top = newDecorationInfo.top + 'px'
 
-    if existingNode.style.height isnt newDecorationInfo.height + 'px'
+    if oldPositionState.height isnt newDecorationInfo.height + 'px'
       existingNode.style.height = newDecorationInfo.height + 'px'
+      oldPositionState.height = newDecorationInfo.height + 'px'
 
     if newDecorationInfo.class and !existingNode.classList.contains(newDecorationInfo.class)
       existingNode.className = 'decoration'

        decorationNode.remove()
        delete @decorationNodesById[decorationId]
        delete @decorationItemsById[decorationId]

  ###
  Section: Private Methods


  # Builds and returns an HTMLElement to represent the specified decoration.
  buildDecorationHTML: (decorationId, decorationInfo) ->
    @oldDecorationPositionState[decorationId] = positionState = {};
    newNode = document.createElement('div')
    newNode.classList.add('decoration')
    newNode.style.top = decorationInfo.top + 'px'
    positionState.top = decorationInfo.top + 'px'
    newNode.style.height = decorationInfo.height + 'px'
    positionState.height = decorationInfo.height + 'px'
    newNode.style.position = 'absolute'
    if decorationInfo.class
      newNode.classList.add(decorationInfo.class)
