Commit 986f49d4 authored by Ehsan Akhgari's avatar Ehsan Akhgari
Browse files

Bug 581536 - Part 2: Reconstruct the document element frames when the dir...

Bug 581536 - Part 2: Reconstruct the document element frames when the dir attribute is set on the document; r=bzbarsky a=blocking-betaN+

--HG--
rename : layout/reftests/forms/textarea-rtl.html => layout/reftests/forms/textarea-in-dynamic-rtl-doc.html
extra : rebase_source : 444e9dfa75be1e880679c405afd90cfc4031131c
parent 2dcbc3ab
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -984,8 +984,10 @@ CaptureChange(nsStyleContext* aOldContext, nsStyleContext* aNewContext,

  NS_UpdateHint(ourChange, aChangeToAssume);
  if (NS_UpdateHint(aMinChange, ourChange)) {
    if (!(ourChange & nsChangeHint_ReconstructFrame) || aContent) {
      aChangeList->AppendChange(aFrame, aContent, ourChange);
    }
  }
  return aMinChange;
}

+5 −2
Original line number Diff line number Diff line
@@ -1462,8 +1462,11 @@ nsPresContext::SetBidi(PRUint32 aSource, PRBool aForceRestyle)
      SetVisualMode(IsVisualCharset(doc->GetDocumentCharacterSet()));
    }
  }
  if (aForceRestyle) {
    RebuildAllStyleData(NS_STYLE_HINT_REFLOW);
  if (aForceRestyle && mShell) {
    // Reconstruct the root document element's frame and its children,
    // because we need to trigger frame reconstruction for direction change.
    RebuildUserFontSet();
    mShell->ReconstructFrames();
  }
}

+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ skip-if(winWidget) == textarea-resize-background.html textarea-resize-background
!= textarea-rtl.html textarea-no-resize.html
== textarea-rtl.html textarea-rtl-dynamic-attr.html
== textarea-rtl.html textarea-rtl-dynamic-style.html
== textarea-rtl.html textarea-in-dynamic-rtl-doc.html
== textarea-setvalue-framereconstruction-1.html textarea-setvalue-framereconstruction-ref.html

== radio-label-dynamic.html radio-label-dynamic-ref.html
+18 −0
Original line number Diff line number Diff line
<!DOCTYPE HTML>
<html class="reftest-wait">
 <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title></title>
 </head>
 <body style="text-align: left">
  <textarea cols=20 rows=4></textarea>
  <script>
    onload = function() {
      setTimeout(function() {
        document.dir = "rtl";
        document.documentElement.removeAttribute("class");
      });
    };
  </script>
 </body>
</html>