Commit 4f99ddec authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1505420 - Remove the first-letter bit from the first-line parent's first...

Bug 1505420 - Remove the first-letter bit from the first-line parent's first continuation. r=bzbarsky

Since the first-line could've been pushed to another column.

Differential Revision: https://phabricator.services.mozilla.com/D11352

--HG--
extra : moz-landing-system : lando
parent 8e407376
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
<style>
  *::first-letter {}
</style>
<li id="list">
</li>
<script>
  list.offsetTop;
  let s = document.createElement('style');
  s.textContent = `
    * {
      columns: 56;
    }
    *::first-line { }
  `;
  document.documentElement.appendChild(s);
  list.innerText = 'ó';
  list.offsetTop;
  list.textContent = '';
</script>
+1 −0
Original line number Diff line number Diff line
@@ -547,3 +547,4 @@ load 1489149.html
load 1490037.html
load 1494332.html
load 1494030.html
load 1505420.html
+2 −2
Original line number Diff line number Diff line
@@ -10543,7 +10543,7 @@ nsCSSFrameConstructor::CreateLetterFrame(nsContainerFrame* aBlockFrame,
               "Setting up a first-letter frame on a non-first block continuation?");
    auto parent = static_cast<nsContainerFrame*>(aParentFrame->FirstContinuation());
    if (MOZ_UNLIKELY(parent->IsLineFrame())) {
      parent = parent->GetParent();
      parent = static_cast<nsContainerFrame*>(parent->GetParent()->FirstContinuation());
    }
    parent->SetHasFirstLetterChild();
    aBlockFrame->SetProperty(nsContainerFrame::FirstLetterProperty(),
@@ -10664,7 +10664,7 @@ static void ClearHasFirstLetterChildFrom(nsContainerFrame* aParentFrame)
    static_cast<nsContainerFrame*>(aParentFrame->FirstContinuation());
  if (MOZ_UNLIKELY(parent->IsLineFrame())) {
    MOZ_ASSERT(!parent->HasFirstLetterChild());
    parent = parent->GetParent();
    parent = static_cast<nsContainerFrame*>(parent->GetParent()->FirstContinuation());
  }
  MOZ_ASSERT(parent->HasFirstLetterChild());
  parent->ClearHasFirstLetterChild();