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

Side by Side Diff: Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 1298493003: Currently we only composite fixed position elements if we are on High DPI devices. This fix allows … Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove similarity check Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 { 588 {
589 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false); 589 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false);
590 registerMockedHttpURLLoad("fixed-position-losing-backing.html"); 590 registerMockedHttpURLLoad("fixed-position-losing-backing.html");
591 navigateTo(m_baseURL + "fixed-position-losing-backing.html"); 591 navigateTo(m_baseURL + "fixed-position-losing-backing.html");
592 forceFullCompositingUpdate(); 592 forceFullCompositingUpdate();
593 593
594 WebLayer* scrollLayer = frame()->page()->deprecatedLocalMainFrame()->view()- >layerForScrolling()->platformLayer(); 594 WebLayer* scrollLayer = frame()->page()->deprecatedLocalMainFrame()->view()- >layerForScrolling()->platformLayer();
595 Document* document = frame()->document(); 595 Document* document = frame()->document();
596 Element* fixedPos = document->getElementById("fixed"); 596 Element* fixedPos = document->getElementById("fixed");
597 597
598 EXPECT_TRUE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->la yer()->hasCompositedDeprecatedPaintLayerMapping()); 598 ASSERT_EQ(PaintsIntoOwnBacking, static_cast<LayoutBoxModelObject*>(fixedPos- >layoutObject())->layer()->compositingState());
599 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread()); 599 EXPECT_FALSE(scrollLayer->shouldScrollOnMainThread());
600 600
601 fixedPos->setInlineStyleProperty(CSSPropertyTransform, CSSValueNone); 601 fixedPos->setInlineStyleProperty(CSSPropertyBackground, "rgba(255, 255, 0, 0 .99)");
602 forceFullCompositingUpdate(); 602 forceFullCompositingUpdate();
603 603
604 EXPECT_FALSE(static_cast<LayoutBoxModelObject*>(fixedPos->layoutObject())->l ayer()->hasCompositedDeprecatedPaintLayerMapping()); 604 ASSERT_EQ(NotComposited, static_cast<LayoutBoxModelObject*>(fixedPos->layout Object())->layer()->compositingState());
605 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread()); 605 EXPECT_TRUE(scrollLayer->shouldScrollOnMainThread());
606 } 606 }
607 607
608 } // namespace blink 608 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698