| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 result.setWidth(forwardRect.maxX() - backRect.x()); | 106 result.setWidth(forwardRect.maxX() - backRect.x()); |
| 107 } else { | 107 } else { |
| 108 result.setY(backRect.y()); | 108 result.setY(backRect.y()); |
| 109 result.setHeight(forwardRect.maxY() - backRect.y()); | 109 result.setHeight(forwardRect.maxY() - backRect.y()); |
| 110 } | 110 } |
| 111 return result; | 111 return result; |
| 112 } | 112 } |
| 113 | 113 |
| 114 void LayoutScrollbarTheme::paintScrollCorner(GraphicsContext* context, const Dis
playItemClientWrapper& displayItemClient, const IntRect& cornerRect) | 114 void LayoutScrollbarTheme::paintScrollCorner(GraphicsContext* context, const Dis
playItemClientWrapper& displayItemClient, const IntRect& cornerRect) |
| 115 { | 115 { |
| 116 if (DrawingRecorder::useCachedDrawingIfPossible(*context, displayItemClient,
DisplayItem::ScrollbarCorner)) |
| 117 return; |
| 118 |
| 116 DrawingRecorder recorder(*context, displayItemClient, DisplayItem::Scrollbar
Corner, cornerRect); | 119 DrawingRecorder recorder(*context, displayItemClient, DisplayItem::Scrollbar
Corner, cornerRect); |
| 117 // FIXME: Implement. | 120 // FIXME: Implement. |
| 118 if (!recorder.canUseCachedDrawing()) | 121 context->fillRect(cornerRect, Color::white); |
| 119 context->fillRect(cornerRect, Color::white); | |
| 120 } | 122 } |
| 121 | 123 |
| 122 void LayoutScrollbarTheme::paintScrollbarBackground(GraphicsContext* context, Sc
rollbarThemeClient* scrollbar) | 124 void LayoutScrollbarTheme::paintScrollbarBackground(GraphicsContext* context, Sc
rollbarThemeClient* scrollbar) |
| 123 { | 125 { |
| 124 ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, Scrollbar
BGPart, scrollbar->frameRect()); | 126 ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, Scrollbar
BGPart, scrollbar->frameRect()); |
| 125 } | 127 } |
| 126 | 128 |
| 127 void LayoutScrollbarTheme::paintTrackBackground(GraphicsContext* context, Scroll
barThemeClient* scrollbar, const IntRect& rect) | 129 void LayoutScrollbarTheme::paintTrackBackground(GraphicsContext* context, Scroll
barThemeClient* scrollbar, const IntRect& rect) |
| 128 { | 130 { |
| 129 ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, TrackBGPa
rt, rect); | 131 ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, TrackBGPa
rt, rect); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 143 { | 145 { |
| 144 ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, ThumbPart
, rect); | 146 ScrollbarPainter(*toLayoutScrollbar(scrollbar)).paintPart(context, ThumbPart
, rect); |
| 145 } | 147 } |
| 146 | 148 |
| 147 void LayoutScrollbarTheme::paintTickmarks(GraphicsContext* context, ScrollbarThe
meClient* scrollbar, const IntRect& rect) | 149 void LayoutScrollbarTheme::paintTickmarks(GraphicsContext* context, ScrollbarThe
meClient* scrollbar, const IntRect& rect) |
| 148 { | 150 { |
| 149 ScrollbarTheme::theme()->paintTickmarks(context, scrollbar, rect); | 151 ScrollbarTheme::theme()->paintTickmarks(context, scrollbar, rect); |
| 150 } | 152 } |
| 151 | 153 |
| 152 } | 154 } |
| OLD | NEW |