| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 runPendingTasks(); | 727 runPendingTasks(); |
| 728 | 728 |
| 729 WebPluginContainerImpl* container = static_cast<WebPluginContainerImpl*>( | 729 WebPluginContainerImpl* container = static_cast<WebPluginContainerImpl*>( |
| 730 getWebPluginContainer(webView, WebString::fromUTF8("plugin"))); | 730 getWebPluginContainer(webView, WebString::fromUTF8("plugin"))); |
| 731 ASSERT_TRUE(container); | 731 ASSERT_TRUE(container); |
| 732 Element* element = static_cast<Element*>(container->element()); | 732 Element* element = static_cast<Element*>(container->element()); |
| 733 const auto* plugin = | 733 const auto* plugin = |
| 734 static_cast<const CompositedPlugin*>(container->plugin()); | 734 static_cast<const CompositedPlugin*>(container->plugin()); |
| 735 | 735 |
| 736 std::unique_ptr<PaintController> paintController = PaintController::create(); | 736 std::unique_ptr<PaintController> paintController = PaintController::create(); |
| 737 PaintChunkProperties properties; | 737 PropertyTreeState propertyTreeState( |
| 738 properties.transform = TransformPaintPropertyNode::root(); | 738 TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), |
| 739 properties.clip = ClipPaintPropertyNode::root(); | 739 EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root()); |
| 740 properties.effect = EffectPaintPropertyNode::root(); | 740 PaintChunkProperties properties(propertyTreeState); |
| 741 properties.scroll = ScrollPaintPropertyNode::root(); | 741 |
| 742 paintController->updateCurrentPaintChunkProperties(nullptr, properties); | 742 paintController->updateCurrentPaintChunkProperties(nullptr, properties); |
| 743 GraphicsContext graphicsContext(*paintController); | 743 GraphicsContext graphicsContext(*paintController); |
| 744 container->paint(graphicsContext, CullRect(IntRect(10, 10, 400, 300))); | 744 container->paint(graphicsContext, CullRect(IntRect(10, 10, 400, 300))); |
| 745 paintController->commitNewDisplayItems(); | 745 paintController->commitNewDisplayItems(); |
| 746 | 746 |
| 747 const auto& displayItems = | 747 const auto& displayItems = |
| 748 paintController->paintArtifact().getDisplayItemList(); | 748 paintController->paintArtifact().getDisplayItemList(); |
| 749 ASSERT_EQ(1u, displayItems.size()); | 749 ASSERT_EQ(1u, displayItems.size()); |
| 750 EXPECT_EQ(element->layoutObject(), &displayItems[0].client()); | 750 EXPECT_EQ(element->layoutObject(), &displayItems[0].client()); |
| 751 ASSERT_EQ(DisplayItem::kForeignLayerPlugin, displayItems[0].getType()); | 751 ASSERT_EQ(DisplayItem::kForeignLayerPlugin, displayItems[0].getType()); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 773 WebString::fromUTF8("translated-plugin")); | 773 WebString::fromUTF8("translated-plugin")); |
| 774 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); | 774 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); |
| 775 | 775 |
| 776 runPendingTasks(); | 776 runPendingTasks(); |
| 777 EXPECT_TRUE( | 777 EXPECT_TRUE( |
| 778 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( | 778 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( |
| 779 EventHandlerRegistry::WheelEventBlocking)); | 779 EventHandlerRegistry::WheelEventBlocking)); |
| 780 } | 780 } |
| 781 | 781 |
| 782 } // namespace blink | 782 } // namespace blink |
| OLD | NEW |