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

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

Issue 2593833002: Constrain transform animation direct compositing reason to transforms. (Closed)
Patch Set: Shift tests. Created 3 years, 12 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/paint/PaintPropertyTreeBuilderTest.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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 EXPECT_NE(nullptr, frameScroll(childFrameView)); 434 EXPECT_NE(nullptr, frameScroll(childFrameView));
435 435
436 auto* iframeContainer = document().getElementById("iframeContainer"); 436 auto* iframeContainer = document().getElementById("iframeContainer");
437 iframeContainer->setAttribute(HTMLNames::styleAttr, "visibility: hidden;"); 437 iframeContainer->setAttribute(HTMLNames::styleAttr, "visibility: hidden;");
438 frameView->updateAllLifecyclePhases(); 438 frameView->updateAllLifecyclePhases();
439 439
440 EXPECT_EQ(nullptr, frameScroll(frameView)); 440 EXPECT_EQ(nullptr, frameScroll(frameView));
441 EXPECT_EQ(nullptr, frameScroll(childFrameView)); 441 EXPECT_EQ(nullptr, frameScroll(childFrameView));
442 } 442 }
443 443
444 TEST_P(PaintPropertyTreeUpdateTest,
445 TransformNodeWithAnimationLosesNodeWhenAnimationRemoved) {
446 setBodyInnerHTML(
447 "<style>"
448 "@keyframes test {"
449 " 0% { transform: translate(1em, 1em) } "
450 " 100% { transform: translate(2em, 2em) } "
451 "} "
452 ".animate { "
453 " animation-name: test; "
454 " animation-duration: 1s "
455 "}"
456 "</style>"
457 "<div id='target' class='animate'></div>");
458 Element* target = document().getElementById("target");
459 const ObjectPaintProperties* properties =
460 target->layoutObject()->paintProperties();
461 EXPECT_TRUE(properties->transform()->hasDirectCompositingReasons());
462
463 // Removing the animation should remove the transform node.
464 target->removeAttribute(HTMLNames::classAttr);
465 document().view()->updateAllLifecyclePhases();
466 EXPECT_EQ(nullptr, properties->transform());
467 }
468
444 } // namespace blink 469 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698