Bug 847850. Redirect all display item lists to the content list inside of text control frames so no content can escape out to mingle with the rest of the page content. r=roc
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 06 Mar 2013 23:13:13 -0600
changeset 124030 eaf89494961129ebdfdc7adc95622b7f9f4670ec
parent 124029 2d360141450d264eb05f5ce232c04e330536030e
child 124031 a67ca797279e741803c6ba8a0a2d64758f4d851c
push id24205
push usertnikkel@gmail.com
push dateThu, 07 Mar 2013 05:13:47 +0000
treeherdermozilla-inbound@c2e60fc5e817 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs847850
milestone22.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
Bug 847850. Redirect all display item lists to the content list inside of text control frames so no content can escape out to mingle with the rest of the page content. r=roc
layout/forms/nsTextControlFrame.cpp
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -1465,17 +1465,21 @@ nsTextControlFrame::BuildDisplayList(nsD
   DO_GLOBAL_REFLOW_COUNT_DSP("nsTextControlFrame");
 
   nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(GetContent());
   NS_ASSERTION(txtCtrl, "Content not a text control element!");
 
   DisplayBorderBackgroundOutline(aBuilder, aLists);
 
   nsIFrame* kid = mFrames.FirstChild();
-  nsDisplayListSet set(aLists, aLists.Content());
+  // Redirect all lists to the Content list so that nothing can escape, ie
+  // opacity creating stacking contexts that then get sorted with stacking
+  // contexts external to us.
+  nsDisplayList* content = aLists.Content();
+  nsDisplayListSet set(content, content, content, content, content, content);
 
   while (kid) {
     // If the frame is the placeholder frame, we should only show it if the
     // placeholder has to be visible.
     if (kid->GetContent() != txtCtrl->GetPlaceholderNode() ||
         txtCtrl->GetPlaceholderVisibility()) {
       BuildDisplayListForChild(aBuilder, kid, aDirtyRect, set, 0);
     }