| 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 sk_sp<SkImage> image = bitmapImage->imageForCurrentFrame(); | 903 sk_sp<SkImage> image = bitmapImage->imageForCurrentFrame(); |
| 904 if (!image || image->width() <= 0 || image->height() <= 0) | 904 if (!image || image->width() <= 0 || image->height() <= 0) |
| 905 return String(); | 905 return String(); |
| 906 | 906 |
| 907 // Determine the width and height of the output image, using a proportional | 907 // Determine the width and height of the output image, using a proportional |
| 908 // scale factor such that it's no larger than |maxSize|, if |maxSize| is not | 908 // scale factor such that it's no larger than |maxSize|, if |maxSize| is not |
| 909 // empty. It only resizes the image to be smaller (if necessary), not | 909 // empty. It only resizes the image to be smaller (if necessary), not |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2491 | 2491 |
| 2492 bool AXLayoutObject::elementAttributeValue( | 2492 bool AXLayoutObject::elementAttributeValue( |
| 2493 const QualifiedName& attributeName) const { | 2493 const QualifiedName& attributeName) const { |
| 2494 if (!m_layoutObject) | 2494 if (!m_layoutObject) |
| 2495 return false; | 2495 return false; |
| 2496 | 2496 |
| 2497 return equalIgnoringCase(getAttribute(attributeName), "true"); | 2497 return equalIgnoringCase(getAttribute(attributeName), "true"); |
| 2498 } | 2498 } |
| 2499 | 2499 |
| 2500 } // namespace blink | 2500 } // namespace blink |
| OLD | NEW |