| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // would. | 468 // would. |
| 469 FrameView* view = m_webViewHelper.webView()->mainFrameImpl()->frameView(); | 469 FrameView* view = m_webViewHelper.webView()->mainFrameImpl()->frameView(); |
| 470 PaintLayer* rootLayer = view->layoutViewItem().layer(); | 470 PaintLayer* rootLayer = view->layoutViewItem().layer(); |
| 471 LayoutRect paintRect(0, 0, kWidth, kHeight); | 471 LayoutRect paintRect(0, 0, kWidth, kHeight); |
| 472 PaintLayerPaintingInfo paintingInfo(rootLayer, paintRect, | 472 PaintLayerPaintingInfo paintingInfo(rootLayer, paintRect, |
| 473 GlobalPaintNormalPhase, LayoutSize()); | 473 GlobalPaintNormalPhase, LayoutSize()); |
| 474 PaintLayerPainter(*rootLayer) | 474 PaintLayerPainter(*rootLayer) |
| 475 .paintLayerContents(pictureBuilder.context(), paintingInfo, | 475 .paintLayerContents(pictureBuilder.context(), paintingInfo, |
| 476 PaintLayerPaintingCompositingAllPhases); | 476 PaintLayerPaintingCompositingAllPhases); |
| 477 | 477 |
| 478 pictureBuilder.endRecording()->playback(&canvas); | 478 pictureBuilder.endRecording()->playback(CdlCanvas::Make(&canvas).get()); |
| 479 | 479 |
| 480 // The result should be a blend of red and green. | 480 // The result should be a blend of red and green. |
| 481 SkColor color = bitmap.getColor(kWidth / 2, kHeight / 2); | 481 SkColor color = bitmap.getColor(kWidth / 2, kHeight / 2); |
| 482 EXPECT_TRUE(redChannel(color)); | 482 EXPECT_TRUE(redChannel(color)); |
| 483 EXPECT_TRUE(greenChannel(color)); | 483 EXPECT_TRUE(greenChannel(color)); |
| 484 } | 484 } |
| 485 | 485 |
| 486 TEST_P(WebViewTest, FocusIsInactive) { | 486 TEST_P(WebViewTest, FocusIsInactive) { |
| 487 URLTestHelpers::registerMockedURLFromBaseURL( | 487 URLTestHelpers::registerMockedURLFromBaseURL( |
| 488 WebString::fromUTF8(m_baseURL.c_str()), "visible_iframe.html"); | 488 WebString::fromUTF8(m_baseURL.c_str()), "visible_iframe.html"); |
| (...skipping 3871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4360 .translate(50, 55) | 4360 .translate(50, 55) |
| 4361 .scale(1. / 2.f); | 4361 .scale(1. / 2.f); |
| 4362 EXPECT_EQ(expectedMatrix, | 4362 EXPECT_EQ(expectedMatrix, |
| 4363 webViewImpl->getDeviceEmulationTransformForTesting()); | 4363 webViewImpl->getDeviceEmulationTransformForTesting()); |
| 4364 // visibleContentRect doesn't change. | 4364 // visibleContentRect doesn't change. |
| 4365 EXPECT_EQ(IntRect(50, 55, 50, 75), | 4365 EXPECT_EQ(IntRect(50, 55, 50, 75), |
| 4366 *devToolsEmulator->visibleContentRectForPainting()); | 4366 *devToolsEmulator->visibleContentRectForPainting()); |
| 4367 } | 4367 } |
| 4368 | 4368 |
| 4369 } // namespace blink | 4369 } // namespace blink |
| OLD | NEW |