Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 14107015: Rename OS(DARWIN) to OS(MACOSX). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/EditorClientImpl.cpp ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // NativeTheme doesn't play well with scaling. Scaling is done browser side 325 // NativeTheme doesn't play well with scaling. Scaling is done browser side
326 // instead. Returns the scale to be applied. 326 // instead. Returns the scale to be applied.
327 // On Linux, we don't have the problem with NativeTheme, hence we let WebKit 327 // On Linux, we don't have the problem with NativeTheme, hence we let WebKit
328 // do the scaling and ignore the return value. 328 // do the scaling and ignore the return value.
329 virtual float spoolPage(GraphicsContext& context, int pageNumber) 329 virtual float spoolPage(GraphicsContext& context, int pageNumber)
330 { 330 {
331 IntRect pageRect = m_pageRects[pageNumber]; 331 IntRect pageRect = m_pageRects[pageNumber];
332 float scale = m_printedPageWidth / pageRect.width(); 332 float scale = m_printedPageWidth / pageRect.width();
333 333
334 context.save(); 334 context.save();
335 #if OS(UNIX) && !OS(DARWIN) 335 #if OS(UNIX) && !OS(MACOSX)
336 context.scale(WebCore::FloatSize(scale, scale)); 336 context.scale(WebCore::FloatSize(scale, scale));
337 #endif 337 #endif
338 context.translate(static_cast<float>(-pageRect.x()), static_cast<float>( -pageRect.y())); 338 context.translate(static_cast<float>(-pageRect.x()), static_cast<float>( -pageRect.y()));
339 context.clip(pageRect); 339 context.clip(pageRect);
340 frame()->view()->paintContents(&context, pageRect); 340 frame()->view()->paintContents(&context, pageRect);
341 if (context.supportsURLFragments()) 341 if (context.supportsURLFragments())
342 outputLinkedDestinations(context, frame()->document(), pageRect); 342 outputLinkedDestinations(context, frame()->document(), pageRect);
343 context.restore(); 343 context.restore();
344 return scale; 344 return scale;
345 } 345 }
(...skipping 25 matching lines...) Expand all
371 graphicsContext.save(); 371 graphicsContext.save();
372 graphicsContext.setStrokeColor(Color(0, 0, 255)); 372 graphicsContext.setStrokeColor(Color(0, 0, 255));
373 graphicsContext.setFillColor(Color(0, 0, 255)); 373 graphicsContext.setFillColor(Color(0, 0, 255));
374 graphicsContext.drawLine(IntPoint(0, currentHeight), IntPoint(pa geWidth, currentHeight)); 374 graphicsContext.drawLine(IntPoint(0, currentHeight), IntPoint(pa geWidth, currentHeight));
375 graphicsContext.restore(); 375 graphicsContext.restore();
376 } 376 }
377 377
378 graphicsContext.save(); 378 graphicsContext.save();
379 379
380 graphicsContext.translate(0, currentHeight); 380 graphicsContext.translate(0, currentHeight);
381 #if !OS(UNIX) || OS(DARWIN) 381 #if !OS(UNIX) || OS(MACOSX)
382 // Account for the disabling of scaling in spoolPage. In the context 382 // Account for the disabling of scaling in spoolPage. In the context
383 // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied . 383 // of spoolAllPagesWithBoundaries the scale HAS NOT been pre-applied .
384 float scale = getPageShrink(pageIndex); 384 float scale = getPageShrink(pageIndex);
385 graphicsContext.scale(WebCore::FloatSize(scale, scale)); 385 graphicsContext.scale(WebCore::FloatSize(scale, scale));
386 #endif 386 #endif
387 spoolPage(graphicsContext, pageIndex); 387 spoolPage(graphicsContext, pageIndex);
388 graphicsContext.restore(); 388 graphicsContext.restore();
389 389
390 currentHeight += pageSizeInPixels.height() + 1; 390 currentHeight += pageSizeInPixels.height() + 1;
391 } 391 }
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 2476
2477 // There is a possibility that the frame being detached was the only 2477 // There is a possibility that the frame being detached was the only
2478 // pending one. We need to make sure final replies can be sent. 2478 // pending one. We need to make sure final replies can be sent.
2479 flushCurrentScopingEffort(m_findRequestIdentifier); 2479 flushCurrentScopingEffort(m_findRequestIdentifier);
2480 2480
2481 cancelPendingScopingEffort(); 2481 cancelPendingScopingEffort();
2482 } 2482 }
2483 } 2483 }
2484 2484
2485 } // namespace WebKit 2485 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/EditorClientImpl.cpp ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698