| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 frame()->document()->updateLayout(); | 379 frame()->document()->updateLayout(); |
| 380 | 380 |
| 381 float pageHeight; | 381 float pageHeight; |
| 382 computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1,
pageHeight); | 382 computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1,
pageHeight); |
| 383 | 383 |
| 384 const float pageWidth = pageSizeInPixels.width(); | 384 const float pageWidth = pageSizeInPixels.width(); |
| 385 size_t numPages = pageRects().size(); | 385 size_t numPages = pageRects().size(); |
| 386 int totalHeight = numPages * (pageSizeInPixels.height() + 1) - 1; | 386 int totalHeight = numPages * (pageSizeInPixels.height() + 1) - 1; |
| 387 | 387 |
| 388 // Fill the whole background by white. | 388 // Fill the whole background by white. |
| 389 graphicsContext.setFillColor(Color(255, 255, 255), ColorSpaceDeviceRGB); | 389 graphicsContext.setFillColor(Color::white); |
| 390 graphicsContext.fillRect(FloatRect(0, 0, pageWidth, totalHeight)); | 390 graphicsContext.fillRect(FloatRect(0, 0, pageWidth, totalHeight)); |
| 391 | 391 |
| 392 graphicsContext.save(); | 392 graphicsContext.save(); |
| 393 | 393 |
| 394 int currentHeight = 0; | 394 int currentHeight = 0; |
| 395 for (size_t pageIndex = 0; pageIndex < numPages; pageIndex++) { | 395 for (size_t pageIndex = 0; pageIndex < numPages; pageIndex++) { |
| 396 // Draw a line for a page boundary if this isn't the first page. | 396 // Draw a line for a page boundary if this isn't the first page. |
| 397 if (pageIndex > 0) { | 397 if (pageIndex > 0) { |
| 398 graphicsContext.save(); | 398 graphicsContext.save(); |
| 399 graphicsContext.setStrokeColor(Color(0, 0, 255), ColorSpaceDevic
eRGB); | 399 graphicsContext.setStrokeColor(Color(0, 0, 255)); |
| 400 graphicsContext.setFillColor(Color(0, 0, 255), ColorSpaceDeviceR
GB); | 400 graphicsContext.setFillColor(Color(0, 0, 255)); |
| 401 graphicsContext.drawLine(IntPoint(0, currentHeight), IntPoint(pa
geWidth, currentHeight)); | 401 graphicsContext.drawLine(IntPoint(0, currentHeight), IntPoint(pa
geWidth, currentHeight)); |
| 402 graphicsContext.restore(); | 402 graphicsContext.restore(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 graphicsContext.save(); | 405 graphicsContext.save(); |
| 406 | 406 |
| 407 graphicsContext.translate(0, currentHeight); | 407 graphicsContext.translate(0, currentHeight); |
| 408 #if !OS(UNIX) || OS(DARWIN) | 408 #if !OS(UNIX) || OS(DARWIN) |
| 409 // Account for the disabling of scaling in spoolPage. In the context | 409 // Account for the disabling of scaling in spoolPage. In the context |
| 410 // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied
. | 410 // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied
. |
| (...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2521 | 2521 |
| 2522 // There is a possibility that the frame being detached was the only | 2522 // There is a possibility that the frame being detached was the only |
| 2523 // pending one. We need to make sure final replies can be sent. | 2523 // pending one. We need to make sure final replies can be sent. |
| 2524 flushCurrentScopingEffort(m_findRequestIdentifier); | 2524 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2525 | 2525 |
| 2526 cancelPendingScopingEffort(); | 2526 cancelPendingScopingEffort(); |
| 2527 } | 2527 } |
| 2528 } | 2528 } |
| 2529 | 2529 |
| 2530 } // namespace WebKit | 2530 } // namespace WebKit |
| OLD | NEW |