From 79ea19ffc7f3588c0594cfdca7c30960ed2768d4 Mon Sep 17 00:00:00 2001 From: Ojan Vafai Date: Mon, 3 Nov 2014 21:30:40 -0800 Subject: [PATCH] Remove margin collapsing. Margin collapsing is a document-oriented feature. For applications it just causes confusion and slowness. margins.sky has failure output because offsetTop is returning the wrong values. That's not new with this patch though. When I look at it visually in skydb, everything seems to be in the right place. R=esprehn@chromium.org Review URL: https://codereview.chromium.org/700743002 --- .../layout/margins-absolute-expected.txt | 1 + .../flutter/tests/layout/margins-absolute.sky | 21 +++++++++++++++++++ .../flutter/tests/layout/margins-expected.txt | 8 +++---- engine/src/flutter/tests/layout/margins.sky | 12 ++++++++--- 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 engine/src/flutter/tests/layout/margins-absolute-expected.txt create mode 100644 engine/src/flutter/tests/layout/margins-absolute.sky diff --git a/engine/src/flutter/tests/layout/margins-absolute-expected.txt b/engine/src/flutter/tests/layout/margins-absolute-expected.txt new file mode 100644 index 0000000000..7ef22e9a43 --- /dev/null +++ b/engine/src/flutter/tests/layout/margins-absolute-expected.txt @@ -0,0 +1 @@ +PASS diff --git a/engine/src/flutter/tests/layout/margins-absolute.sky b/engine/src/flutter/tests/layout/margins-absolute.sky new file mode 100644 index 0000000000..02d6a76b58 --- /dev/null +++ b/engine/src/flutter/tests/layout/margins-absolute.sky @@ -0,0 +1,21 @@ + + + +
+
+
+ + +
+ diff --git a/engine/src/flutter/tests/layout/margins-expected.txt b/engine/src/flutter/tests/layout/margins-expected.txt index 26a08bedaf..63bf405cfb 100644 --- a/engine/src/flutter/tests/layout/margins-expected.txt +++ b/engine/src/flutter/tests/layout/margins-expected.txt @@ -1,5 +1,5 @@ FAIL: -
-Expected 10 for clientTop+offsetTop, but got 0, clientTop: 0, + offsetTop: 0. -
-Expected 50 for clientTop+offsetTop, but got 40, clientTop: 0, + offsetTop: 40. +
+Expected 15 for clientTop+offsetTop, but got 10, clientTop: 0, + offsetTop: 10. +
+Expected 65 for clientTop+offsetTop, but got 60, clientTop: 0, + offsetTop: 60. diff --git a/engine/src/flutter/tests/layout/margins.sky b/engine/src/flutter/tests/layout/margins.sky index 7ff9236947..f720072e73 100644 --- a/engine/src/flutter/tests/layout/margins.sky +++ b/engine/src/flutter/tests/layout/margins.sky @@ -1,17 +1,23 @@ -
-
-
+
+ +
+
+