| 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; |
| 738 properties.transform = TransformPaintPropertyNode::root(); |
| 739 properties.clip = ClipPaintPropertyNode::root(); |
| 740 properties.effect = EffectPaintPropertyNode::root(); |
| 741 properties.scroll = ScrollPaintPropertyNode::root(); |
| 742 paintController->updateCurrentPaintChunkProperties(nullptr, properties); |
| 737 GraphicsContext graphicsContext(*paintController); | 743 GraphicsContext graphicsContext(*paintController); |
| 738 container->paint(graphicsContext, CullRect(IntRect(10, 10, 400, 300))); | 744 container->paint(graphicsContext, CullRect(IntRect(10, 10, 400, 300))); |
| 739 paintController->commitNewDisplayItems(); | 745 paintController->commitNewDisplayItems(); |
| 740 | 746 |
| 741 const auto& displayItems = | 747 const auto& displayItems = |
| 742 paintController->paintArtifact().getDisplayItemList(); | 748 paintController->paintArtifact().getDisplayItemList(); |
| 743 ASSERT_EQ(1u, displayItems.size()); | 749 ASSERT_EQ(1u, displayItems.size()); |
| 744 EXPECT_EQ(element->layoutObject(), &displayItems[0].client()); | 750 EXPECT_EQ(element->layoutObject(), &displayItems[0].client()); |
| 745 ASSERT_EQ(DisplayItem::kForeignLayerPlugin, displayItems[0].getType()); | 751 ASSERT_EQ(DisplayItem::kForeignLayerPlugin, displayItems[0].getType()); |
| 746 const auto& foreignLayerDisplayItem = | 752 const auto& foreignLayerDisplayItem = |
| (...skipping 20 matching lines...) Expand all Loading... |
| 767 WebString::fromUTF8("translated-plugin")); | 773 WebString::fromUTF8("translated-plugin")); |
| 768 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); | 774 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); |
| 769 | 775 |
| 770 runPendingTasks(); | 776 runPendingTasks(); |
| 771 EXPECT_TRUE( | 777 EXPECT_TRUE( |
| 772 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( | 778 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( |
| 773 EventHandlerRegistry::WheelEventBlocking)); | 779 EventHandlerRegistry::WheelEventBlocking)); |
| 774 } | 780 } |
| 775 | 781 |
| 776 } // namespace blink | 782 } // namespace blink |
| OLD | NEW |