| OLD | NEW | 
|     1 /* |     1 /* | 
|     2  * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |     2  * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 
|     3  * Copyright (C) 2008, 2009 Google, Inc. |     3  * Copyright (C) 2008, 2009 Google, Inc. | 
|     4  * |     4  * | 
|     5  * This library is free software; you can redistribute it and/or |     5  * This library is free software; you can redistribute it and/or | 
|     6  * modify it under the terms of the GNU Library General Public |     6  * modify it under the terms of the GNU Library General Public | 
|     7  * License as published by the Free Software Foundation; either |     7  * License as published by the Free Software Foundation; either | 
|     8  * version 2 of the License, or (at your option) any later version. |     8  * version 2 of the License, or (at your option) any later version. | 
|     9  * |     9  * | 
|    10  * This library is distributed in the hope that it will be useful, |    10  * This library is distributed in the hope that it will be useful, | 
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1099     CGContextRef cgContext = cgContextContainer.context(); |  1099     CGContextRef cgContext = cgContextContainer.context(); | 
|  1100     HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal); |  1100     HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal); | 
|  1101  |  1101  | 
|  1102     GraphicsContextStateSaver stateSaver(*paintInfo.context); |  1102     GraphicsContextStateSaver stateSaver(*paintInfo.context); | 
|  1103  |  1103  | 
|  1104     if (!renderProgress->style()->isLeftToRightDirection()) { |  1104     if (!renderProgress->style()->isLeftToRightDirection()) { | 
|  1105         paintInfo.context->translate(2 * inflatedRect.x() + inflatedRect.width()
      , 0); |  1105         paintInfo.context->translate(2 * inflatedRect.x() + inflatedRect.width()
      , 0); | 
|  1106         paintInfo.context->scale(FloatSize(-1, 1)); |  1106         paintInfo.context->scale(FloatSize(-1, 1)); | 
|  1107     } |  1107     } | 
|  1108  |  1108  | 
|  1109     paintInfo.context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, i
      nflatedRect.location()); |  1109     paintInfo.context->drawImageBuffer(imageBuffer.get(), inflatedRect.location(
      )); | 
|  1110     return false; |  1110     return false; | 
|  1111 } |  1111 } | 
|  1112  |  1112  | 
|  1113 const float baseFontSize = 11.0f; |  1113 const float baseFontSize = 11.0f; | 
|  1114 const float baseArrowHeight = 4.0f; |  1114 const float baseArrowHeight = 4.0f; | 
|  1115 const float baseArrowWidth = 5.0f; |  1115 const float baseArrowWidth = 5.0f; | 
|  1116 const float baseSpaceBetweenArrows = 2.0f; |  1116 const float baseSpaceBetweenArrows = 2.0f; | 
|  1117 const int arrowPaddingLeft = 6; |  1117 const int arrowPaddingLeft = 6; | 
|  1118 const int arrowPaddingRight = 6; |  1118 const int arrowPaddingRight = 6; | 
|  1119 const int paddingBeforeSeparator = 4; |  1119 const int paddingBeforeSeparator = 4; | 
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1244     float arrowHeight = baseArrowHeight * fontScale; |  1244     float arrowHeight = baseArrowHeight * fontScale; | 
|  1245     float arrowWidth = baseArrowWidth * fontScale; |  1245     float arrowWidth = baseArrowWidth * fontScale; | 
|  1246     float leftEdge = bounds.maxX() - arrowPaddingRight * o->style()->effectiveZo
      om() - arrowWidth; |  1246     float leftEdge = bounds.maxX() - arrowPaddingRight * o->style()->effectiveZo
      om() - arrowWidth; | 
|  1247     float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale; |  1247     float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale; | 
|  1248  |  1248  | 
|  1249     if (bounds.width() < arrowWidth + arrowPaddingLeft * o->style()->effectiveZo
      om()) |  1249     if (bounds.width() < arrowWidth + arrowPaddingLeft * o->style()->effectiveZo
      om()) | 
|  1250         return false; |  1250         return false; | 
|  1251  |  1251  | 
|  1252     GraphicsContextStateSaver stateSaver(*paintInfo.context); |  1252     GraphicsContextStateSaver stateSaver(*paintInfo.context); | 
|  1253  |  1253  | 
|  1254     paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropert
      yColor), o->style()->colorSpace()); |  1254     paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropert
      yColor)); | 
|  1255     paintInfo.context->setStrokeStyle(NoStroke); |  1255     paintInfo.context->setStrokeStyle(NoStroke); | 
|  1256  |  1256  | 
|  1257     FloatPoint arrow1[3]; |  1257     FloatPoint arrow1[3]; | 
|  1258     arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0f); |  1258     arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0f); | 
|  1259     arrow1[1] = FloatPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows /
       2.0f); |  1259     arrow1[1] = FloatPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows /
       2.0f); | 
|  1260     arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenA
      rrows / 2.0f - arrowHeight); |  1260     arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenA
      rrows / 2.0f - arrowHeight); | 
|  1261  |  1261  | 
|  1262     // Draw the top arrow |  1262     // Draw the top arrow | 
|  1263     paintInfo.context->drawConvexPolygon(3, arrow1, true); |  1263     paintInfo.context->drawConvexPolygon(3, arrow1, true); | 
|  1264  |  1264  | 
|  1265     FloatPoint arrow2[3]; |  1265     FloatPoint arrow2[3]; | 
|  1266     arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0f); |  1266     arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0f); | 
|  1267     arrow2[1] = FloatPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows /
       2.0f); |  1267     arrow2[1] = FloatPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows /
       2.0f); | 
|  1268     arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenA
      rrows / 2.0f + arrowHeight); |  1268     arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenA
      rrows / 2.0f + arrowHeight); | 
|  1269  |  1269  | 
|  1270     // Draw the bottom arrow |  1270     // Draw the bottom arrow | 
|  1271     paintInfo.context->drawConvexPolygon(3, arrow2, true); |  1271     paintInfo.context->drawConvexPolygon(3, arrow2, true); | 
|  1272  |  1272  | 
|  1273     Color leftSeparatorColor(0, 0, 0, 40); |  1273     Color leftSeparatorColor(0, 0, 0, 40); | 
|  1274     Color rightSeparatorColor(255, 255, 255, 40); |  1274     Color rightSeparatorColor(255, 255, 255, 40); | 
|  1275  |  1275  | 
|  1276     // FIXME: Should the separator thickness and space be scaled up by fontScale
      ? |  1276     // FIXME: Should the separator thickness and space be scaled up by fontScale
      ? | 
|  1277     int separatorSpace = 2; // Deliberately ignores zoom since it looks nicer if
       it stays thin. |  1277     int separatorSpace = 2; // Deliberately ignores zoom since it looks nicer if
       it stays thin. | 
|  1278     int leftEdgeOfSeparator = static_cast<int>(leftEdge - arrowPaddingLeft * o->
      style()->effectiveZoom()); // FIXME: Round? |  1278     int leftEdgeOfSeparator = static_cast<int>(leftEdge - arrowPaddingLeft * o->
      style()->effectiveZoom()); // FIXME: Round? | 
|  1279  |  1279  | 
|  1280     // Draw the separator to the left of the arrows |  1280     // Draw the separator to the left of the arrows | 
|  1281     paintInfo.context->setStrokeThickness(1.0f); // Deliberately ignores zoom si
      nce it looks nicer if it stays thin. |  1281     paintInfo.context->setStrokeThickness(1.0f); // Deliberately ignores zoom si
      nce it looks nicer if it stays thin. | 
|  1282     paintInfo.context->setStrokeStyle(SolidStroke); |  1282     paintInfo.context->setStrokeStyle(SolidStroke); | 
|  1283     paintInfo.context->setStrokeColor(leftSeparatorColor, ColorSpaceDeviceRGB); |  1283     paintInfo.context->setStrokeColor(leftSeparatorColor); | 
|  1284     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()), |  1284     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()), | 
|  1285                                 IntPoint(leftEdgeOfSeparator, bounds.maxY())); |  1285                                 IntPoint(leftEdgeOfSeparator, bounds.maxY())); | 
|  1286  |  1286  | 
|  1287     paintInfo.context->setStrokeColor(rightSeparatorColor, ColorSpaceDeviceRGB); |  1287     paintInfo.context->setStrokeColor(rightSeparatorColor); | 
|  1288     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, b
      ounds.y()), |  1288     paintInfo.context->drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, b
      ounds.y()), | 
|  1289                                 IntPoint(leftEdgeOfSeparator + separatorSpace, b
      ounds.maxY())); |  1289                                 IntPoint(leftEdgeOfSeparator + separatorSpace, b
      ounds.maxY())); | 
|  1290     return false; |  1290     return false; | 
|  1291 } |  1291 } | 
|  1292  |  1292  | 
|  1293 static const IntSize* menuListButtonSizes() |  1293 static const IntSize* menuListButtonSizes() | 
|  1294 { |  1294 { | 
|  1295     static const IntSize sizes[3] = { IntSize(0, 21), IntSize(0, 18), IntSize(0,
       15) }; |  1295     static const IntSize sizes[3] = { IntSize(0, 21), IntSize(0, 18), IntSize(0,
       15) }; | 
|  1296     return sizes; |  1296     return sizes; | 
|  1297 } |  1297 } | 
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1964  |  1964  | 
|  1965 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |  1965 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 
|  1966 { |  1966 { | 
|  1967     ControlPart part = style->appearance(); |  1967     ControlPart part = style->appearance(); | 
|  1968     if (part == CheckboxPart || part == RadioPart) |  1968     if (part == CheckboxPart || part == RadioPart) | 
|  1969         return style->effectiveZoom() != 1; |  1969         return style->effectiveZoom() != 1; | 
|  1970     return false; |  1970     return false; | 
|  1971 } |  1971 } | 
|  1972  |  1972  | 
|  1973 } // namespace WebCore |  1973 } // namespace WebCore | 
| OLD | NEW |