author | L. David Baron <dbaron@dbaron.org> |
Sun, 11 Jan 2015 15:43:10 -0800 | |
changeset 223171 | 86088b6c69e8414e6a9845fc7985de6dbbf6f16e |
parent 223170 | ca02a661d6dc7a4a844488e30961da354ae7227c |
child 223172 | fbbafc2a957318cc4fa2c2dbfd774124ccf597be |
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, 1115691 |
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/RestyleManager.cpp | file | annotate | diff | comparison | revisions | |
layout/base/tests/test_frame_reconstruction_for_pseudo_elements.html | file | annotate | diff | comparison | revisions |
--- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -3671,18 +3671,19 @@ ElementRestyler::MaybeReframeForBeforePs // can't have generated content. nsContainerFrame* cif; if (!aStyleContext->GetPseudo() && ((aGenConParentFrame->GetStateBits() & NS_FRAME_MAY_HAVE_GENERATED_CONTENT) || // Our content insertion frame might have gotten flagged. ((cif = aGenConParentFrame->GetContentInsertionFrame()) && (cif->GetStateBits() & NS_FRAME_MAY_HAVE_GENERATED_CONTENT)))) { // Check for a ::before pseudo style and the absence of a ::before content, - // but only if aFrame is null or is the first continuation. - if (!aFrame || !aFrame->GetPrevContinuation()) { + // but only if aFrame is null or is the first continuation/ib-split. + if (!aFrame || + nsLayoutUtils::IsFirstContinuationOrIBSplitSibling(aFrame)) { // Checking for a ::before frame is cheaper than getting the // ::before style context. if (!nsLayoutUtils::GetBeforeFrameForContent(aGenConParentFrame, aContent) && nsLayoutUtils::HasPseudoStyle(aContent, aStyleContext, nsCSSPseudoElements::ePseudo_before, mPresContext)) { // Have to create the new ::before frame. LOG_RESTYLE("MaybeReframeForBeforePseudo, appending " @@ -3717,18 +3718,19 @@ ElementRestyler::MaybeReframeForAfterPse // can't have generated content. nsContainerFrame* cif; if (!aStyleContext->GetPseudo() && ((aGenConParentFrame->GetStateBits() & NS_FRAME_MAY_HAVE_GENERATED_CONTENT) || // Our content insertion frame might have gotten flagged. ((cif = aGenConParentFrame->GetContentInsertionFrame()) && (cif->GetStateBits() & NS_FRAME_MAY_HAVE_GENERATED_CONTENT)))) { // Check for an ::after pseudo style and the absence of an ::after content, - // but only if aFrame is null or is the last continuation. - if (!aFrame || !aFrame->GetNextContinuation()) { + // but only if aFrame is null or is the last continuation/ib-split. + if (!aFrame || + !nsLayoutUtils::GetNextContinuationOrIBSplitSibling(aFrame)) { // Checking for an ::after frame is cheaper than getting the // ::after style context. if (!nsLayoutUtils::GetAfterFrameForContent(aGenConParentFrame, aContent) && nsLayoutUtils::HasPseudoStyle(aContent, aStyleContext, nsCSSPseudoElements::ePseudo_after, mPresContext)) { // Have to create the new ::after frame. LOG_RESTYLE("MaybeReframeForAfterPseudo, appending "
--- a/layout/base/tests/test_frame_reconstruction_for_pseudo_elements.html +++ b/layout/base/tests/test_frame_reconstruction_for_pseudo_elements.html @@ -30,17 +30,17 @@ https://bugzilla.mozilla.org/show_bug.cg </style> <script type="application/javascript"> /** Test for Bug 1110277 **/ SimpleTest.waitForExplicitFinish(); function run() { - runtest("first line test", "#firstlinetest > .testspan", { todo: true }); + runtest("first line test", "#firstlinetest > .testspan", {}); runtest("after test", "#aftertest > .testspan", { todo: true }); SimpleTest.finish(); } function runtest(description, selector, flags) { var utils = SpecialPowers.getDOMWindowUtils(window); var span = document.querySelector(selector); var cs = getComputedStyle(span, "");