| 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 } else if (isHTMLCanvasElement(node)) { | 889 } else if (isHTMLCanvasElement(node)) { |
| 890 imageBitmap = ImageBitmap::create(toHTMLCanvasElement(node), | 890 imageBitmap = ImageBitmap::create(toHTMLCanvasElement(node), |
| 891 Optional<IntRect>(), options); | 891 Optional<IntRect>(), options); |
| 892 } else if (isHTMLVideoElement(node)) { | 892 } else if (isHTMLVideoElement(node)) { |
| 893 imageBitmap = ImageBitmap::create(toHTMLVideoElement(node), | 893 imageBitmap = ImageBitmap::create(toHTMLVideoElement(node), |
| 894 Optional<IntRect>(), document, options); | 894 Optional<IntRect>(), document, options); |
| 895 } | 895 } |
| 896 if (!imageBitmap) | 896 if (!imageBitmap) |
| 897 return String(); | 897 return String(); |
| 898 | 898 |
| 899 StaticBitmapImage* bitmapImage = imageBitmap->bitmapImage(); | 899 RefPtr<StaticBitmapImage> bitmapImage = imageBitmap->bitmapImage(); |
| 900 if (!bitmapImage) | 900 if (!bitmapImage) |
| 901 return String(); | 901 return String(); |
| 902 | 902 |
| 903 // TODO(ccameron): AXLayoutObject::imageDataUrl should create sRGB images. | 903 // TODO(ccameron): AXLayoutObject::imageDataUrl should create sRGB images. |
| 904 sk_sp<SkImage> image = bitmapImage->imageForCurrentFrame( | 904 sk_sp<SkImage> image = bitmapImage->imageForCurrentFrame( |
| 905 ColorBehavior::transformToGlobalTarget()); | 905 ColorBehavior::transformToGlobalTarget()); |
| 906 if (!image || image->width() <= 0 || image->height() <= 0) | 906 if (!image || image->width() <= 0 || image->height() <= 0) |
| 907 return String(); | 907 return String(); |
| 908 | 908 |
| 909 // Determine the width and height of the output image, using a proportional | 909 // Determine the width and height of the output image, using a proportional |
| (...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 | 2493 |
| 2494 bool AXLayoutObject::elementAttributeValue( | 2494 bool AXLayoutObject::elementAttributeValue( |
| 2495 const QualifiedName& attributeName) const { | 2495 const QualifiedName& attributeName) const { |
| 2496 if (!m_layoutObject) | 2496 if (!m_layoutObject) |
| 2497 return false; | 2497 return false; |
| 2498 | 2498 |
| 2499 return equalIgnoringCase(getAttribute(attributeName), "true"); | 2499 return equalIgnoringCase(getAttribute(attributeName), "true"); |
| 2500 } | 2500 } |
| 2501 | 2501 |
| 2502 } // namespace blink | 2502 } // namespace blink |
| OLD | NEW |