-
- Downloads
Bug 1797148: Simplify checkVisibility API (on nsISelectionController and...
Bug 1797148: Simplify checkVisibility API (on nsISelectionController and nsIFrame) into a single nsTextFrame::HasVisibleText method. r=masayuki Before this patch, we had two `checkVisibilty` methods on the nsISelectionController interface, backed by several layers of implementation, ultimately backed by a single function on nsTextFrame (which didn't actually do anything meaningful with any of the parameters). As it turns out, this API only had one caller, in HTMLEditUtils.cpp. This patch converts that caller to directly query nsTextFrame (if the given node's primary frame is indeed a nsTextFrame). The direct function-call is renamed to HasVisibleText(), to be a bit clearer about it being text-specific and also to avoid confusion with the (unrelated) recently-specified HTML checkVisibility() API. With these changes, we can remove the API from the nsISelectionController interface and its implementations. This patch also updates the HTMLEditUtils::IsInVisibleTextFrames documentation (with s/all/any/) to reflect the reality of what the nsTextFrame impl actually does. Differential Revision: https://phabricator.services.mozilla.com/D160563
Showing
- dom/base/nsISelectionController.idl 0 additions, 10 deletionsdom/base/nsISelectionController.idl
- dom/html/TextControlState.cpp 0 additions, 37 deletionsdom/html/TextControlState.cpp
- editor/libeditor/HTMLEditUtils.cpp 10 additions, 25 deletionseditor/libeditor/HTMLEditUtils.cpp
- editor/libeditor/HTMLEditUtils.h 1 addition, 1 deletioneditor/libeditor/HTMLEditUtils.h
- layout/base/PresShell.cpp 0 additions, 44 deletionslayout/base/PresShell.cpp
- layout/base/PresShell.h 0 additions, 4 deletionslayout/base/PresShell.h
- layout/generic/nsIFrame.cpp 0 additions, 5 deletionslayout/generic/nsIFrame.cpp
- layout/generic/nsIFrame.h 0 additions, 22 deletionslayout/generic/nsIFrame.h
- layout/generic/nsTextFrame.cpp 3 additions, 13 deletionslayout/generic/nsTextFrame.cpp
- layout/generic/nsTextFrame.h 2 additions, 3 deletionslayout/generic/nsTextFrame.h
Loading
Please register or sign in to comment