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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 } else if (isHTMLCanvasElement(node)) { | 893 } else if (isHTMLCanvasElement(node)) { |
894 imageBitmap = ImageBitmap::create(toHTMLCanvasElement(node), | 894 imageBitmap = ImageBitmap::create(toHTMLCanvasElement(node), |
895 Optional<IntRect>(), options); | 895 Optional<IntRect>(), options); |
896 } else if (isHTMLVideoElement(node)) { | 896 } else if (isHTMLVideoElement(node)) { |
897 imageBitmap = ImageBitmap::create(toHTMLVideoElement(node), | 897 imageBitmap = ImageBitmap::create(toHTMLVideoElement(node), |
898 Optional<IntRect>(), document, options); | 898 Optional<IntRect>(), document, options); |
899 } | 899 } |
900 if (!imageBitmap) | 900 if (!imageBitmap) |
901 return String(); | 901 return String(); |
902 | 902 |
903 StaticBitmapImage* bitmapImage = imageBitmap->bitmapImage(); | 903 RefPtr<StaticBitmapImage> bitmapImage = imageBitmap->bitmapImage(); |
904 if (!bitmapImage) | 904 if (!bitmapImage) |
905 return String(); | 905 return String(); |
906 | 906 |
907 sk_sp<SkImage> image = bitmapImage->imageForCurrentFrame(); | 907 sk_sp<SkImage> image = bitmapImage->imageForCurrentFrame(); |
908 if (!image || image->width() <= 0 || image->height() <= 0) | 908 if (!image || image->width() <= 0 || image->height() <= 0) |
909 return String(); | 909 return String(); |
910 | 910 |
911 // Determine the width and height of the output image, using a proportional | 911 // Determine the width and height of the output image, using a proportional |
912 // scale factor such that it's no larger than |maxSize|, if |maxSize| is not | 912 // scale factor such that it's no larger than |maxSize|, if |maxSize| is not |
913 // empty. It only resizes the image to be smaller (if necessary), not | 913 // empty. It only resizes the image to be smaller (if necessary), not |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 | 2504 |
2505 bool AXLayoutObject::elementAttributeValue( | 2505 bool AXLayoutObject::elementAttributeValue( |
2506 const QualifiedName& attributeName) const { | 2506 const QualifiedName& attributeName) const { |
2507 if (!m_layoutObject) | 2507 if (!m_layoutObject) |
2508 return false; | 2508 return false; |
2509 | 2509 |
2510 return equalIgnoringASCIICase(getAttribute(attributeName), "true"); | 2510 return equalIgnoringASCIICase(getAttribute(attributeName), "true"); |
2511 } | 2511 } |
2512 | 2512 |
2513 } // namespace blink | 2513 } // namespace blink |
OLD | NEW |