From 0bac13978eb07fd1e4e83ba1fd7e72d0b052cca8 Mon Sep 17 00:00:00 2001 From: "youngtaeck.song" Date: Sat, 8 Sep 2012 18:58:40 +0900 Subject: [PATCH] [Title] Fix that text input don't scroll when new character is added at end of box. [Issue#] N_SE-9473 [Problem] Fix that text input don't scroll when new character is added at end of box. [Cause] In this case, do not call text box's scroll function. [Solution] Call text box's scroll function. Change-Id: I35b9a953dcc398374cc36cb3c6748e21de9a91bd --- Source/WebCore/editing/FrameSelection.cpp | 15 ++++++++++----- Source/WebCore/editing/FrameSelection.h | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Source/WebCore/editing/FrameSelection.cpp b/Source/WebCore/editing/FrameSelection.cpp index 78d8421..b78c00a 100644 --- a/Source/WebCore/editing/FrameSelection.cpp +++ b/Source/WebCore/editing/FrameSelection.cpp @@ -1245,7 +1245,11 @@ LayoutRect FrameSelection::localCaretRect() return localCaretRectWithoutUpdate(); } +#if ENABLE(TIZEN_NOT_USE_TRANSFORM_INFO_WHEN_GETTING_CARET_RECT) +IntRect CaretBase::absoluteBoundsForLocalRect(Node* node, const LayoutRect& rect, bool useTransforms) const +#else IntRect CaretBase::absoluteBoundsForLocalRect(Node* node, const LayoutRect& rect) const +#endif { RenderObject* caretPainter = caretRenderer(node); if (!caretPainter) @@ -1256,10 +1260,11 @@ IntRect CaretBase::absoluteBoundsForLocalRect(Node* node, const LayoutRect& rect toRenderBox(caretPainter)->flipForWritingMode(localRect); #if ENABLE(TIZEN_NOT_USE_TRANSFORM_INFO_WHEN_GETTING_CARET_RECT) - return caretPainter->localToAbsoluteQuad(FloatRect(localRect), false, 0, false).enclosingBoundingBox(); -#else - return caretPainter->localToAbsoluteQuad(FloatRect(localRect)).enclosingBoundingBox(); + if (!useTransforms) + return caretPainter->localToAbsoluteQuad(FloatRect(localRect), false, 0, false).enclosingBoundingBox(); + else #endif + return caretPainter->localToAbsoluteQuad(FloatRect(localRect)).enclosingBoundingBox(); } IntRect FrameSelection::absoluteCaretBounds() @@ -1944,11 +1949,11 @@ void FrameSelection::revealSelection(const ScrollAlignment& alignment, bool reve return; case VisibleSelection::CaretSelection: #if ENABLE(TIZEN_NOT_USE_TRANSFORM_INFO_WHEN_GETTING_CARET_RECT) - return; + rect = absoluteBoundsForLocalRect(m_selection.start().deprecatedNode(), localCaretRectWithoutUpdate(), true); #else rect = absoluteCaretBounds(); - break; #endif + break; case VisibleSelection::RangeSelection: rect = revealExtent ? VisiblePosition(extent()).absoluteCaretBounds() : enclosingIntRect(bounds(false)); break; diff --git a/Source/WebCore/editing/FrameSelection.h b/Source/WebCore/editing/FrameSelection.h index 4eda23e..0d5521d 100644 --- a/Source/WebCore/editing/FrameSelection.h +++ b/Source/WebCore/editing/FrameSelection.h @@ -59,7 +59,11 @@ protected: void invalidateCaretRect(Node*, bool caretRectChanged = false); void clearCaretRect(); bool updateCaretRect(Document*, const VisiblePosition& caretPosition); +#if ENABLE(TIZEN_NOT_USE_TRANSFORM_INFO_WHEN_GETTING_CARET_RECT) + IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&, bool useTransforms = false) const; +#else IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const; +#endif IntRect caretRepaintRect(Node*) const; bool shouldRepaintCaret(const RenderView*, bool isContentEditable) const; void paintCaret(Node*, GraphicsContext*, const LayoutPoint&, const LayoutRect& clipRect) const; -- 2.7.4