author | L. David Baron <dbaron@dbaron.org> |
Sun, 11 Jan 2015 15:43:10 -0800 | |
changeset 223172 | fbbafc2a957318cc4fa2c2dbfd774124ccf597be |
parent 223171 | 86088b6c69e8414e6a9845fc7985de6dbbf6f16e |
child 223173 | 1bbebe9fec17e88234845d8da22c8b44f394121b |
push id | 28082 |
push user | cbook@mozilla.com |
push date | Mon, 12 Jan 2015 10:44:52 +0000 |
treeherder | mozilla-central@643589c3ef94 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bzbarsky |
bugs | 1110277 |
milestone | 37.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
|
layout/base/nsLayoutUtils.cpp | file | annotate | diff | comparison | revisions | |
layout/base/nsLayoutUtils.h | file | annotate | diff | comparison | revisions |
--- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -3902,16 +3902,35 @@ nsLayoutUtils::FirstContinuationOrIBSpli break; result = f; } } return result; } +nsIFrame* +nsLayoutUtils::LastContinuationOrIBSplitSibling(nsIFrame *aFrame) +{ + nsIFrame *result = aFrame->FirstContinuation(); + if (result->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) { + while (true) { + nsIFrame *f = static_cast<nsIFrame*> + (result->Properties().Get(nsIFrame::IBSplitSibling())); + if (!f) + break; + result = f; + } + } + + result = result->LastContinuation(); + + return result; +} + bool nsLayoutUtils::IsFirstContinuationOrIBSplitSibling(nsIFrame *aFrame) { if (aFrame->GetPrevContinuation()) { return false; } if ((aFrame->GetStateBits() & NS_FRAME_PART_OF_IBSPLIT) && aFrame->Properties().Get(nsIFrame::IBSplitPrevSibling())) {
--- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -1249,16 +1249,23 @@ public: /** * Get the first frame in the continuation-plus-ib-split-sibling chain * containing aFrame. */ static nsIFrame* FirstContinuationOrIBSplitSibling(nsIFrame *aFrame); /** + * Get the last frame in the continuation-plus-ib-split-sibling chain + * containing aFrame. + */ + static nsIFrame* + LastContinuationOrIBSplitSibling(nsIFrame *aFrame); + + /** * Is FirstContinuationOrIBSplitSibling(aFrame) going to return * aFrame? */ static bool IsFirstContinuationOrIBSplitSibling(nsIFrame *aFrame); /** * Check whether aFrame is a part of the scrollbar or scrollcorner of