OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
ikilpatrick
2017/01/31 01:12:15
2017
atotic
2017/01/31 01:15:41
done
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "core/layout/ng/ng_out_of_flow_layout_part.h" | |
6 | |
7 #include "core/layout/LayoutTestHelper.h" | |
8 #include "core/dom/Element.h" | |
9 | |
10 namespace blink { | |
11 namespace { | |
12 | |
13 class NGOutOfFlowLayoutPartTest : public RenderingTest { | |
14 public: | |
15 NGOutOfFlowLayoutPartTest(){}; | |
ikilpatrick
2017/01/31 01:12:15
you'll need to flip on the experimental flag to hi
atotic
2017/01/31 01:15:41
huh? Please clarify.
Gleb Lanbin
2017/01/31 19:19:35
you need something like
NGOutOfFlowLayoutPartTest(
atotic
2017/02/01 01:37:19
done
| |
16 }; | |
17 | |
18 TEST_F(NGOutOfFlowLayoutPartTest, FixedInsideAbs) { | |
Gleb Lanbin
2017/01/31 19:19:35
please add a short comment that describes what use
atotic
2017/02/01 01:37:19
done.
| |
19 setBodyInnerHTML( | |
20 "<style>body{padding:0px;margin:0px}</style>" | |
21 "<div id='rel' style='position:relative;'>" | |
22 "<div style='position:absolute;top:49px;left:0px;'>" | |
23 "<div style='width:100px;height:50px;background-color:yellow;'></div>" | |
24 "<div " | |
25 "id='fixed1'" | |
Gleb Lanbin
2017/01/31 19:19:35
you can fit this at the previous line and below (f
atotic
2017/02/01 01:37:19
done
| |
26 "style='position:fixed;background-color:gray;width:50px'>" | |
27 "<p>fixed static</p>" | |
28 "</div>" | |
29 "<div " | |
30 "id='fixed2'" | |
31 "style='position:fixed;background-color:gray;top:9px;left:7px;'>" | |
32 "<p>fixed plain</p>" | |
33 "</div>" | |
34 "</div>" | |
35 "</div>"); | |
36 Element* fixed1 = document().getElementById("fixed1"); | |
37 Element* fixed2 = document().getElementById("fixed2"); | |
ikilpatrick
2017/01/31 01:14:12
also might be good just to check there are N fragm
atotic
2017/01/31 01:22:34
There are no APIs to get fragment tree from Elemen
Gleb Lanbin
2017/01/31 19:19:35
per discussion with Emil/Christian a Rendering tes
atotic
2017/02/01 01:37:19
Fixed elements are currently directly positioned b
| |
38 EXPECT_EQ(fixed1->offsetTop(), LayoutUnit(99)); | |
Gleb Lanbin
2017/01/31 19:19:35
please add a short comment that describes how we e
atotic
2017/02/01 01:37:19
done
| |
39 EXPECT_EQ(fixed2->offsetTop(), LayoutUnit(9)); | |
40 }; | |
41 } | |
Gleb Lanbin
2017/01/31 19:19:35
} // namespace
} // namespace blink
| |
42 } | |
OLD | NEW |