Patch by Joseph Pecoraro <pecoraro@apple.com> on 2012-03-16
Reviewed by Dan Bernstein.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
Put the variable inside of a guard because it is only
used inside of a guard.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111079
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-16 Joseph Pecoraro <pecoraro@apple.com>
+
+ <http://webkit.org/b/81380> clang warning unused variable when ENABLE(TEXT_CARET) is disabled
+
+ Reviewed by Dan Bernstein.
+
+ * editing/FrameSelection.cpp:
+ (WebCore::FrameSelection::recomputeCaretRect):
+ Put the variable inside of a guard because it is only
+ used inside of a guard.
+
2012-03-16 Andreas Kling <kling@webkit.org>
Shrink BorderValue.
if (oldAbsCaretBounds == m_absCaretBounds)
return false;
-
+
+#if ENABLE(TEXT_CARET)
LayoutRect oldAbsoluteCaretRepaintBounds = m_absoluteCaretRepaintBounds;
+#endif
+
// We believe that we need to inflate the local rect before transforming it to obtain the repaint bounds.
m_absoluteCaretRepaintBounds = caretRepaintRect(m_selection.start().deprecatedNode());
-#if ENABLE(TEXT_CARET)
+#if ENABLE(TEXT_CARET)
if (RenderView* view = toRenderView(m_frame->document()->renderer())) {
// FIXME: make caret repainting container-aware.
view->repaintRectangleInViewAndCompositedLayers(oldAbsoluteCaretRepaintBounds, false);