Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc

Issue 2651393003: [layoutng] Propagate fixed descendants of abs. (Closed)
Patch Set: Add a testcase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698