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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 webKitClient()->themeEngine()->paintScrollbarTrack( | 306 webKitClient()->themeEngine()->paintScrollbarTrack( |
307 gc->platformContext()->canvas(), part, state, classicState, rect, | 307 gc->platformContext()->canvas(), part, state, classicState, rect, |
308 alignRect); | 308 alignRect); |
309 } | 309 } |
310 | 310 |
311 void ChromiumBridge::paintTextField( | 311 void ChromiumBridge::paintTextField( |
312 GraphicsContext* gc, int part, int state, int classicState, | 312 GraphicsContext* gc, int part, int state, int classicState, |
313 const IntRect& rect, const Color& color, bool fillContentArea, | 313 const IntRect& rect, const Color& color, bool fillContentArea, |
314 bool drawEdges) | 314 bool drawEdges) |
315 { | 315 { |
| 316 // Fallback to white when |color| is invalid. |
| 317 RGBA32 backgroundColor = color.isValid() ? color.rgb() : Color::white; |
| 318 |
316 webKitClient()->themeEngine()->paintTextField( | 319 webKitClient()->themeEngine()->paintTextField( |
317 gc->platformContext()->canvas(), part, state, classicState, rect, | 320 gc->platformContext()->canvas(), part, state, classicState, rect, |
318 color.rgb(), fillContentArea, drawEdges); | 321 backgroundColor, fillContentArea, drawEdges); |
319 } | 322 } |
320 | 323 |
321 void ChromiumBridge::paintTrackbar( | 324 void ChromiumBridge::paintTrackbar( |
322 GraphicsContext* gc, int part, int state, int classicState, | 325 GraphicsContext* gc, int part, int state, int classicState, |
323 const IntRect& rect) | 326 const IntRect& rect) |
324 { | 327 { |
325 webKitClient()->themeEngine()->paintTrackbar( | 328 webKitClient()->themeEngine()->paintTrackbar( |
326 gc->platformContext()->canvas(), part, state, classicState, rect); | 329 gc->platformContext()->canvas(), part, state, classicState, rect); |
327 } | 330 } |
328 | 331 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 388 |
386 return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); | 389 return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); |
387 } | 390 } |
388 | 391 |
389 bool ChromiumBridge::isLinkVisited(WebCore::LinkHash visitedLinkHash) | 392 bool ChromiumBridge::isLinkVisited(WebCore::LinkHash visitedLinkHash) |
390 { | 393 { |
391 return webKitClient()->isLinkVisited(visitedLinkHash); | 394 return webKitClient()->isLinkVisited(visitedLinkHash); |
392 } | 395 } |
393 | 396 |
394 } // namespace WebCore | 397 } // namespace WebCore |
OLD | NEW |