OLD | NEW |
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 Loading... |
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 |
OLD | NEW |