| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 Path quadPath = quadToPath(quad); | 72 Path quadPath = quadToPath(quad); |
| 73 | 73 |
| 74 // Clip out the quad, then draw with a 2px stroke to get a pixel | 74 // Clip out the quad, then draw with a 2px stroke to get a pixel |
| 75 // of outline (because inflating a quad is hard) | 75 // of outline (because inflating a quad is hard) |
| 76 { | 76 { |
| 77 context->save(); | 77 context->save(); |
| 78 context->clipOut(quadPath); | 78 context->clipOut(quadPath); |
| 79 | 79 |
| 80 context->setStrokeThickness(outlineThickness); | 80 context->setStrokeThickness(outlineThickness); |
| 81 context->setStrokeColor(outlineColor, ColorSpaceDeviceRGB); | 81 context->setStrokeColor(outlineColor); |
| 82 context->strokePath(quadPath); | 82 context->strokePath(quadPath); |
| 83 | 83 |
| 84 context->restore(); | 84 context->restore(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 // Now do the fill | 87 // Now do the fill |
| 88 context->setFillColor(fillColor, ColorSpaceDeviceRGB); | 88 context->setFillColor(fillColor); |
| 89 context->fillPath(quadPath); | 89 context->fillPath(quadPath); |
| 90 } | 90 } |
| 91 | 91 |
| 92 static void contentsQuadToPage(const FrameView* mainView, const FrameView* view,
FloatQuad& quad) | 92 static void contentsQuadToPage(const FrameView* mainView, const FrameView* view,
FloatQuad& quad) |
| 93 { | 93 { |
| 94 quad.setP1(view->contentsToRootView(roundedIntPoint(quad.p1()))); | 94 quad.setP1(view->contentsToRootView(roundedIntPoint(quad.p1()))); |
| 95 quad.setP2(view->contentsToRootView(roundedIntPoint(quad.p2()))); | 95 quad.setP2(view->contentsToRootView(roundedIntPoint(quad.p2()))); |
| 96 quad.setP3(view->contentsToRootView(roundedIntPoint(quad.p3()))); | 96 quad.setP3(view->contentsToRootView(roundedIntPoint(quad.p3()))); |
| 97 quad.setP4(view->contentsToRootView(roundedIntPoint(quad.p4()))); | 97 quad.setP4(view->contentsToRootView(roundedIntPoint(quad.p4()))); |
| 98 quad += mainView->scrollOffset(); | 98 quad += mainView->scrollOffset(); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 } | 540 } |
| 541 | 541 |
| 542 void InspectorOverlay::freePage() | 542 void InspectorOverlay::freePage() |
| 543 { | 543 { |
| 544 m_overlayPage.clear(); | 544 m_overlayPage.clear(); |
| 545 m_timer.stop(); | 545 m_timer.stop(); |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace WebCore | 548 } // namespace WebCore |
| 549 | 549 |
| OLD | NEW |