summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Frame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/Frame.cpp')
-rw-r--r--WebCore/page/Frame.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 17652d9..c23368a 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -241,9 +241,11 @@ void Frame::setView(PassRefPtr<FrameView> view)
if (!view && m_doc && m_doc->attached() && !m_doc->inPageCache()) {
// FIXME: We don't call willRemove here. Why is that OK?
m_doc->detach();
- if (m_view)
- m_view->unscheduleRelayout();
}
+
+ if (m_view)
+ m_view->unscheduleRelayout();
+
eventHandler()->clear();
m_view = view;
@@ -1086,8 +1088,10 @@ void Frame::revealSelection(const ScrollAlignment& alignment, bool revealExtent)
// FIXME: This code only handles scrolling the startContainer's layer, but
// the selection rect could intersect more than just that.
// See <rdar://problem/4799899>.
- if (RenderLayer* layer = start.node()->renderer()->enclosingLayer())
+ if (RenderLayer* layer = start.node()->renderer()->enclosingLayer()) {
layer->scrollRectToVisible(rect, false, alignment, alignment);
+ selection()->updateAppearance();
+ }
}
}
@@ -1281,7 +1285,7 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig
// Only treat the result as a match if it is visible
if (editor()->insideVisibleArea(resultRange.get())) {
++matchCount;
- document()->addMarker(resultRange.get(), DocumentMarker::TextMatch);
+ document()->markers()->addMarker(resultRange.get(), DocumentMarker::TextMatch);
}
// Stop looking if we hit the specified limit. A limit of 0 means no limit.
@@ -1321,7 +1325,7 @@ void Frame::setMarkedTextMatchesAreHighlighted(bool flag)
return;
m_highlightTextMatches = flag;
- document()->repaintMarkers(DocumentMarker::TextMatch);
+ document()->markers()->repaintMarkers(DocumentMarker::TextMatch);
}
void Frame::setDOMWindow(DOMWindow* domWindow)
@@ -1467,16 +1471,16 @@ void Frame::respondToChangedSelection(const VisibleSelection& oldSelection, bool
// This only erases markers that are in the first unit (word or sentence) of the selection.
// Perhaps peculiar, but it matches AppKit.
if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange())
- document()->removeMarkers(wordRange.get(), DocumentMarker::Spelling);
+ document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::Spelling);
if (RefPtr<Range> sentenceRange = newSelectedSentence.toNormalizedRange())
- document()->removeMarkers(sentenceRange.get(), DocumentMarker::Grammar);
+ document()->markers()->removeMarkers(sentenceRange.get(), DocumentMarker::Grammar);
}
// When continuous spell checking is off, existing markers disappear after the selection changes.
if (!isContinuousSpellCheckingEnabled)
- document()->removeMarkers(DocumentMarker::Spelling);
+ document()->markers()->removeMarkers(DocumentMarker::Spelling);
if (!isContinuousGrammarCheckingEnabled)
- document()->removeMarkers(DocumentMarker::Grammar);
+ document()->markers()->removeMarkers(DocumentMarker::Grammar);
editor()->respondToChangedSelection(oldSelection);
}
@@ -1612,7 +1616,11 @@ String Frame::layerTreeAsText() const
if (!contentRenderer())
return String();
- GraphicsLayer* rootLayer = contentRenderer()->compositor()->rootPlatformLayer();
+ RenderLayerCompositor* compositor = contentRenderer()->compositor();
+ if (compositor->compositingLayerUpdatePending())
+ compositor->updateCompositingLayers();
+
+ GraphicsLayer* rootLayer = compositor->rootPlatformLayer();
if (!rootLayer)
return String();