Bug 1433669: Remove dead function. r?masayuki
MozReview-Commit-ID: ETgeBXd5nya
--- a/dom/events/ContentEventHandler.cpp
+++ b/dom/events/ContentEventHandler.cpp
@@ -3072,37 +3072,16 @@ ContentEventHandler::AdjustCollapsedRang
aRawRange.CollapseTo(RawRangeBoundary(childNode, offsetInChildNode));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
return NS_OK;
}
nsresult
-ContentEventHandler::GetStartFrameAndOffset(const RawRange& aRawRange,
- nsIFrame*& aFrame,
- int32_t& aOffsetInFrame)
-{
- aFrame = nullptr;
- aOffsetInFrame = -1;
-
- nsINode* node = aRawRange.GetStartContainer();
- if (NS_WARN_IF(!node) || NS_WARN_IF(!node->IsContent())) {
- return NS_ERROR_FAILURE;
- }
- RefPtr<nsFrameSelection> fs = mPresShell->FrameSelection();
- aFrame = fs->GetFrameForNodeOffset(node->AsContent(), aRawRange.StartOffset(),
- fs->GetHint(), &aOffsetInFrame);
- if (NS_WARN_IF(!aFrame)) {
- return NS_ERROR_FAILURE;
- }
- return NS_OK;
-}
-
-nsresult
ContentEventHandler::ConvertToRootRelativeOffset(nsIFrame* aFrame,
nsRect& aRect)
{
NS_ASSERTION(aFrame, "aFrame must not be null");
nsPresContext* thisPC = aFrame->PresContext();
nsPresContext* rootPC = thisPC->GetRootPresContext();
if (NS_WARN_IF(!rootPC)) {
--- a/dom/events/ContentEventHandler.h
+++ b/dom/events/ContentEventHandler.h
@@ -332,20 +332,16 @@ protected:
uint32_t aLength,
LineBreakType aLineBreakType,
bool aExpandToClusterBoundaries,
uint32_t* aNewOffset = nullptr,
nsIContent** aLastTextNode = nullptr);
// If the aCollapsedRawRange isn't in text node but next to a text node,
// this method modifies it in the text node. Otherwise, not modified.
nsresult AdjustCollapsedRangeMaybeIntoTextNode(RawRange& aCollapsedRawRange);
- // Find the first frame for the range and get the start offset in it.
- nsresult GetStartFrameAndOffset(const RawRange& aRawRange,
- nsIFrame*& aFrame,
- int32_t& aOffsetInFrame);
// Convert the frame relative offset to be relative to the root frame of the
// root presContext (but still measured in appUnits of aFrame's presContext).
nsresult ConvertToRootRelativeOffset(nsIFrame* aFrame,
nsRect& aRect);
// Expand aXPOffset to the nearest offset in cluster boundary. aForward is
// true, it is expanded to forward.
nsresult ExpandToClusterBoundary(nsIContent* aContent, bool aForward,
uint32_t* aXPOffset);