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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp

Issue 2749403004: Update subtree paint properties when preserve-3d changes (Closed)
Patch Set: Created 3 years, 9 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/LayoutObject.cpp ('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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLIFrameElement.h" 5 #include "core/html/HTMLIFrameElement.h"
6 #include "core/paint/PaintPropertyTreeBuilderTest.h" 6 #include "core/paint/PaintPropertyTreeBuilderTest.h"
7 #include "core/paint/PaintPropertyTreePrinter.h" 7 #include "core/paint/PaintPropertyTreePrinter.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 715
716 auto* newStyle = document().createElement("style"); 716 auto* newStyle = document().createElement("style");
717 newStyle->setTextContent("::-webkit-scrollbar {width: 40px; height: 40px}"); 717 newStyle->setTextContent("::-webkit-scrollbar {width: 40px; height: 40px}");
718 document().body()->appendChild(newStyle); 718 document().body()->appendChild(newStyle);
719 719
720 document().view()->updateAllLifecyclePhases(); 720 document().view()->updateAllLifecyclePhases();
721 EXPECT_EQ(overflowClip, container->paintProperties()->overflowClip()); 721 EXPECT_EQ(overflowClip, container->paintProperties()->overflowClip());
722 EXPECT_EQ(FloatSize(60, 60), overflowClip->clipRect().rect().size()); 722 EXPECT_EQ(FloatSize(60, 60), overflowClip->clipRect().rect().size());
723 } 723 }
724 724
725 TEST_P(PaintPropertyTreeUpdateTest, Preserve3DChange) {
726 setBodyInnerHTML(
727 "<div id='parent'>"
728 " <div id='child' style='transform: translate3D(1px, 2px, 3px)'></div>"
729 "</div>");
730
731 auto* child = getLayoutObjectByElementId("child");
732 auto* transform = child->paintProperties()->transform();
733 EXPECT_TRUE(transform->flattensInheritedTransform());
734
735 document().getElementById("parent")->setAttribute(
736 HTMLNames::styleAttr, "transform-style: preserve-3d");
737 document().view()->updateAllLifecyclePhases();
738 EXPECT_EQ(transform, child->paintProperties()->transform());
739 EXPECT_FALSE(transform->flattensInheritedTransform());
740 }
741
725 } // namespace blink 742 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698