<http://webkit.org/b/81380> clang warning unused variable when ENABLE(TEXT_CARET...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2012 22:26:59 +0000 (22:26 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Mar 2012 22:26:59 +0000 (22:26 +0000)
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

Source/WebCore/ChangeLog
Source/WebCore/editing/FrameSelection.cpp

index b69bb59147d6168c656a6e13856912050bfbd4b9..2dc3a01f497745af3edfeebfc82fb745616cdd8e 100644 (file)
@@ -1,3 +1,14 @@
+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.
index bf7c7fbbe69e2011735677cc6c817d6be9cce27c..17f7d8144bb2a3f605c45f703d5c8ee3ca621711 100644 (file)
@@ -1304,12 +1304,15 @@ bool FrameSelection::recomputeCaretRect()
     
     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);