Index: Source/core/paint/PaintPhase.h |
diff --git a/Source/core/paint/PaintPhase.h b/Source/core/paint/PaintPhase.h |
index e66db71fc4fa9b8a0be2f42c9bc3b1688272485c..1574a1d02fe1cbec76f34ee5cf50ee5d055f72a9 100644 |
--- a/Source/core/paint/PaintPhase.h |
+++ b/Source/core/paint/PaintPhase.h |
@@ -57,8 +57,9 @@ enum PaintPhase { |
enum PaintBehaviorFlags { |
PaintBehaviorNormal = 0, |
- // TODO(jchaffraix): Remove those 2 once we have migrated to GlobalPaintFlags. |
+ // TODO(jchaffraix): Remove those 3 once we have migrated to GlobalPaintFlags. |
PaintBehaviorSelectionOnly = 1 << 0, |
+ PaintBehaviorPrintAdaption = 1 << 1, |
PaintBehaviorFlattenCompositingLayers = 1 << 2, |
PaintBehaviorRenderingClipPathAsMask = 1 << 3, |
PaintBehaviorSkipRootBackground = 1 << 4, |
@@ -80,7 +81,11 @@ enum GlobalPaintFlag { |
// Used when painting a drag-image or printing in order to |
// ignore the hardware layers and paint the whole tree |
// into the topmost layer. |
- GlobalPaintFlattenCompositingLayers = 1 << 1 |
+ GlobalPaintFlattenCompositingLayers = 1 << 1, |
+ // Used when printing in order to adapt the output to the medium, for |
+ // instance by not painting shadows and selections on text, and add |
+ // annotations for links. |
Julien - ping for review
2015/07/15 17:14:25
Not sure what 'annotation for links' represents.
fs
2015/07/15 18:25:58
When I wrote this I was thinking about:
https://c
|
+ GlobalPaintPrintAdaption = 1 << 2 |
Julien - ping for review
2015/07/15 17:14:25
Not a huge fan of "print adaption" (first TIL that
fs
2015/07/15 18:25:58
"Adaption" (or adaptation for the longer word) see
|
}; |
typedef unsigned GlobalPaintFlags; |
@@ -94,6 +99,8 @@ inline PaintBehavior toPaintBehavior(GlobalPaintFlags flags) |
behavior |= PaintBehaviorSelectionOnly; |
if (flags & GlobalPaintFlattenCompositingLayers) |
behavior |= PaintBehaviorFlattenCompositingLayers; |
+ if (flags & GlobalPaintPrintAdaption) |
+ behavior |= PaintBehaviorPrintAdaption; |
return behavior; |
} |
inline GlobalPaintFlags toGlobalPaintFlags(PaintBehavior behavior) |
@@ -103,6 +110,8 @@ inline GlobalPaintFlags toGlobalPaintFlags(PaintBehavior behavior) |
flags |= GlobalPaintSelectionOnly; |
if (behavior & PaintBehaviorFlattenCompositingLayers) |
flags |= GlobalPaintFlattenCompositingLayers; |
+ if (behavior & PaintBehaviorPrintAdaption) |
+ flags |= GlobalPaintPrintAdaption; |
return flags; |
} |