mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 22:35:43 +00:00
Bug 1016184 part 3a - Fix typos and minor style changes. r=ehsan
Also group the private section together, and remove the protect section since TouchCaret is a MOZ_FINAL class.
This commit is contained in:
parent
6645b03a5b
commit
c882c29267
@ -125,7 +125,7 @@ TouchCaret::SetVisibility(bool aVisible)
|
|||||||
// Set touch caret expiration time.
|
// Set touch caret expiration time.
|
||||||
mVisible ? LaunchExpirationTimer() : CancelExpirationTimer();
|
mVisible ? LaunchExpirationTimer() : CancelExpirationTimer();
|
||||||
|
|
||||||
// We must call SetHasTouchCaret() in order to get APZC to wait until the
|
// We must call SetMayHaveTouchCaret() in order to get APZC to wait until the
|
||||||
// event has been round-tripped and check whether it has been handled,
|
// event has been round-tripped and check whether it has been handled,
|
||||||
// otherwise B2G will end up panning the document when the user tries to drag
|
// otherwise B2G will end up panning the document when the user tries to drag
|
||||||
// touch caret.
|
// touch caret.
|
||||||
@ -329,7 +329,7 @@ TouchCaret::IsOnTouchCaret(const nsPoint& aPoint)
|
|||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
TouchCaret::NotifySelectionChanged(nsIDOMDocument* aDoc, nsISelection* aSel,
|
TouchCaret::NotifySelectionChanged(nsIDOMDocument* aDoc, nsISelection* aSel,
|
||||||
int16_t aReason)
|
int16_t aReason)
|
||||||
{
|
{
|
||||||
// Hide touch caret while no caret exists.
|
// Hide touch caret while no caret exists.
|
||||||
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);
|
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);
|
||||||
|
@ -19,16 +19,13 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The TouchCaret places a touch caret according to caret postion when the
|
* The TouchCaret places a touch caret according to caret position when the
|
||||||
* caret is shown.
|
* caret is shown.
|
||||||
* TouchCaret is also responsible for touch caret visibility. Touch caret
|
* TouchCaret is also responsible for touch caret visibility. Touch caret
|
||||||
* won't be shown when timer expires or while key event causes selection change.
|
* won't be shown when timer expires or while key event causes selection change.
|
||||||
*/
|
*/
|
||||||
class TouchCaret MOZ_FINAL : public nsISelectionListener
|
class TouchCaret MOZ_FINAL : public nsISelectionListener
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
~TouchCaret();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TouchCaret(nsIPresShell* aPresShell);
|
explicit TouchCaret(nsIPresShell* aPresShell);
|
||||||
|
|
||||||
@ -73,6 +70,8 @@ private:
|
|||||||
// Hide default constructor.
|
// Hide default constructor.
|
||||||
TouchCaret() MOZ_DELETE;
|
TouchCaret() MOZ_DELETE;
|
||||||
|
|
||||||
|
~TouchCaret();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the nsCanvasFrame which holds the touch caret.
|
* Find the nsCanvasFrame which holds the touch caret.
|
||||||
*/
|
*/
|
||||||
@ -226,7 +225,6 @@ private:
|
|||||||
return sTouchCaretExpirationTime;
|
return sTouchCaretExpirationTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
nsWeakPtr mPresShell;
|
nsWeakPtr mPresShell;
|
||||||
|
|
||||||
// Touch caret visibility
|
// Touch caret visibility
|
||||||
|
Loading…
Reference in New Issue
Block a user