author | Brad Werth <bwerth@mozilla.com> |
Tue, 14 Mar 2017 14:27:30 -0700 | |
changeset 347626 | 9bf81510d7bcc8b94ab40e90421b6abc56375b5a |
parent 347625 | da8e1454252907cbc7b000f880eff1f2baec8ca0 |
child 347627 | 31129448027bdc3e5a874c8f10d6d6e6dab9813e |
push id | 38876 |
push user | bwerth@mozilla.com |
push date | Wed, 15 Mar 2017 00:46:52 +0000 |
treeherder | autoland@31129448027b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mats |
bugs | 1343695 |
milestone | 55.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -9833,17 +9833,23 @@ LineEndsInHardLineBreak(nsTextFrame* aFr } nsIFrame::RenderedText nsTextFrame::GetRenderedText(uint32_t aStartOffset, uint32_t aEndOffset, TextOffsetType aOffsetType, TrailingWhitespace aTrimTrailingWhitespace) { - NS_ASSERTION(!GetPrevContinuation(), "Must be called on first-in-flow"); + MOZ_ASSERT(aStartOffset <= aEndOffset, "bogus offsets"); + MOZ_ASSERT(!GetPrevContinuation() || + (aOffsetType == TextOffsetType::OFFSETS_IN_CONTENT_TEXT && + aStartOffset >= (uint32_t)GetContentOffset() && + aEndOffset <= (uint32_t)GetContentEnd()), + "Must be called on first-in-flow, or content offsets must be " + "given and be within this frame."); // The handling of offsets could be more efficient... RenderedText result; nsBlockFrame* lineContainer = nullptr; nsTextFrame* textFrame; const nsTextFragment* textFrag = mContent->GetText(); uint32_t offsetInRenderedString = 0; bool haveOffsets = false;