# HG changeset patch # User Aryeh Gregor # Date 1328806181 18000 # Node ID b1f97a1eb5d5f800ab6ba8b52960d61aaf1369df # Parent 8c44b6619508c790517a921933a31592fe830092 Bug 722777 - Tables with 'transform' property set don't act as abs-pos/fixed-pos containers diff --git a/layout/reftests/transform/abspos-1a.html b/layout/reftests/transform/abspos-1f.html copy from layout/reftests/transform/abspos-1a.html copy to layout/reftests/transform/abspos-1f.html --- a/layout/reftests/transform/abspos-1a.html +++ b/layout/reftests/transform/abspos-1f.html @@ -1,12 +1,12 @@ -
+
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
diff --git a/layout/reftests/transform/abspos-1b.html b/layout/reftests/transform/abspos-1g.html copy from layout/reftests/transform/abspos-1b.html copy to layout/reftests/transform/abspos-1g.html --- a/layout/reftests/transform/abspos-1b.html +++ b/layout/reftests/transform/abspos-1g.html @@ -1,12 +1,12 @@ -
+
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9
diff --git a/layout/reftests/transform/reftest.list b/layout/reftests/transform/reftest.list --- a/layout/reftests/transform/reftest.list +++ b/layout/reftests/transform/reftest.list @@ -61,16 +61,18 @@ random == rotate-1f.html rotate-1-ref.ht == percent-1f.html percent-1-ref.html == percent-1g.html percent-1-ref.html # Transformed elements are abs-pos and fixed-pos containing blocks. == abspos-1a.html abspos-1-ref.html == abspos-1b.html abspos-1-ref.html == abspos-1c.html abspos-1-ref.html == abspos-1d.html abspos-1-ref.html != abspos-1e.html abspos-1-ref.html +== abspos-1f.html abspos-1-ref.html +== abspos-1g.html abspos-1-ref.html # Origin can use "top" "right" etc. == origin-name-1a.html origin-name-1-ref.html == origin-name-1b.html origin-name-1-ref.html == origin-name-2a.html origin-name-2-ref.html == origin-name-2b.html origin-name-2-ref.html == origin-name-2c.html origin-name-2-ref.html == origin-name-3a.html origin-name-3-ref.html == origin-name-3b.html origin-name-3-ref.html @@ -105,8 +107,14 @@ fails-if(Android) == stresstest-1.html s # Some simple checks that it obeys selector operations == descendant-1.html descendant-1-ref.html == propagate-inherit-boolean.html propagate-inherit-boolean-ref.html # Ensure you can't move outside an iframe == iframe-1.html iframe-1-ref.html # Bugs == 601894-1.html 601894-ref.html == 601894-2.html 601894-ref.html +# Bug 722777 +== table-1a.html table-1-ref.html +== table-1b.html table-1-ref.html +== table-1c.html table-1-ref.html +== table-2a.html table-2-ref.html +== table-2b.html table-2-ref.html diff --git a/layout/reftests/transform/table-1-ref.html b/layout/reftests/transform/table-1-ref.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-1-ref.html @@ -0,0 +1,7 @@ + +
+ + +
Hello
there! +
+
diff --git a/layout/reftests/transform/table-1a.html b/layout/reftests/transform/table-1a.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-1a.html @@ -0,0 +1,5 @@ + + + +
Hello
there! +
diff --git a/layout/reftests/transform/table-1b.html b/layout/reftests/transform/table-1b.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-1b.html @@ -0,0 +1,5 @@ + + + +
Hello
there! +
diff --git a/layout/reftests/transform/table-1c.html b/layout/reftests/transform/table-1c.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-1c.html @@ -0,0 +1,7 @@ + +
+ + +
Hello
there! +
+
diff --git a/layout/reftests/transform/table-2-ref.html b/layout/reftests/transform/table-2-ref.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-2-ref.html @@ -0,0 +1,6 @@ + +
+ + +
there!
Hello +
diff --git a/layout/reftests/transform/table-2a.html b/layout/reftests/transform/table-2a.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-2a.html @@ -0,0 +1,5 @@ + + + +
there!
Hello +
diff --git a/layout/reftests/transform/table-2b.html b/layout/reftests/transform/table-2b.html new file mode 100644 --- /dev/null +++ b/layout/reftests/transform/table-2b.html @@ -0,0 +1,5 @@ + + + +
there!
Hello +
diff --git a/layout/style/ua.css b/layout/style/ua.css --- a/layout/style/ua.css +++ b/layout/style/ua.css @@ -69,16 +69,19 @@ right: inherit; bottom: inherit; left: inherit; z-index: inherit; page-break-before: inherit; page-break-after: inherit; vertical-align: inherit; /* needed for inline-table */ line-height: inherit; /* needed for vertical-align on inline-table */ + /* Bug 722777 */ + -moz-transform: inherit; + -moz-transform-origin: inherit; } *|*::-moz-table-row { display: table-row !important; } /* The ::-moz-table-column pseudo-element is for extra columns at the end of a table. */ diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -208,16 +208,20 @@ nsTableFrame::Init(nsIContent* aCon // Let the base class do its processing nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow); // see if border collapse is on, if so set it const nsStyleTableBorder* tableStyle = GetStyleTableBorder(); bool borderCollapse = (NS_STYLE_BORDER_COLLAPSE == tableStyle->mBorderCollapse); SetBorderCollapse(borderCollapse); + + // Transforms need to affect the outer frame, not the inner frame (bug 722777) + mState &= ~NS_FRAME_MAY_BE_TRANSFORMED; + // Create the cell map if this frame is the first-in-flow. if (!aPrevInFlow) { mCellMap = new nsTableCellMap(*this, borderCollapse); if (!mCellMap) return NS_ERROR_OUT_OF_MEMORY; } if (aPrevInFlow) {