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