Bug 1623858: part 4) Document PresShell::mSelectionFlags. r=smaug

Depends on D67601

Differential Revision: https://phabricator.services.mozilla.com/D67602

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mirko Brodesser 2020-03-20 13:24:48 +00:00
parent 312bf3de69
commit 66f056b308
2 changed files with 12 additions and 9 deletions

View File

@ -2188,14 +2188,17 @@ NS_IMETHODIMP PresShell::GetCaretVisible(bool* aOutIsVisible) {
return NS_OK;
}
NS_IMETHODIMP PresShell::SetSelectionFlags(int16_t aInEnable) {
mSelectionFlags = aInEnable;
NS_IMETHODIMP PresShell::SetSelectionFlags(int16_t aFlags) {
mSelectionFlags = aFlags;
return NS_OK;
}
NS_IMETHODIMP PresShell::GetSelectionFlags(int16_t* aOutEnable) {
if (!aOutEnable) return NS_ERROR_INVALID_ARG;
*aOutEnable = mSelectionFlags;
NS_IMETHODIMP PresShell::GetSelectionFlags(int16_t* aFlags) {
if (!aFlags) {
return NS_ERROR_INVALID_ARG;
}
*aFlags = mSelectionFlags;
return NS_OK;
}

View File

@ -1330,11 +1330,10 @@ class PresShell final : public nsStubDocumentObserver,
* by the frames. Visual effects may not effect layout, only display.
* Takes effect on next repaint, does not force a repaint itself.
*
* @param aInEnable if true, visual selection effects are enabled
* if false visual selection effects are disabled
* @param aFlags may be multiple of nsISelectionDisplay::DISPLAY_*.
*/
NS_IMETHOD SetSelectionFlags(int16_t aInEnable) override;
NS_IMETHOD GetSelectionFlags(int16_t* aOutEnable) override;
NS_IMETHOD SetSelectionFlags(int16_t aFlags) override;
NS_IMETHOD GetSelectionFlags(int16_t* aFlags) override;
/**
* Gets the current state of non text selection effects
@ -3021,6 +3020,7 @@ class PresShell final : public nsStubDocumentObserver,
uint32_t mFontSizeInflationMinTwips;
uint32_t mFontSizeInflationLineThreshold;
// Can be multiple of nsISelectionDisplay::DISPLAY_*.
int16_t mSelectionFlags;
// This is used to protect ourselves from triggering reflow while in the