OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 double deltaTimeInSeconds, | 576 double deltaTimeInSeconds, |
577 ExceptionState& exceptionState) { | 577 ExceptionState& exceptionState) { |
578 ASSERT(image); | 578 ASSERT(image); |
579 if (deltaTimeInSeconds < 0) { | 579 if (deltaTimeInSeconds < 0) { |
580 exceptionState.throwDOMException( | 580 exceptionState.throwDOMException( |
581 InvalidAccessError, ExceptionMessages::indexExceedsMinimumBound( | 581 InvalidAccessError, ExceptionMessages::indexExceedsMinimumBound( |
582 "deltaTimeInSeconds", deltaTimeInSeconds, 0.0)); | 582 "deltaTimeInSeconds", deltaTimeInSeconds, 0.0)); |
583 return; | 583 return; |
584 } | 584 } |
585 | 585 |
586 ImageResource* resource = nullptr; | 586 ImageResourceContent* resource = nullptr; |
587 if (isHTMLImageElement(*image)) { | 587 if (isHTMLImageElement(*image)) { |
588 resource = toHTMLImageElement(*image).cachedImage(); | 588 resource = toHTMLImageElement(*image).cachedImage(); |
589 } else if (isSVGImageElement(*image)) { | 589 } else if (isSVGImageElement(*image)) { |
590 resource = toSVGImageElement(*image).cachedImage(); | 590 resource = toSVGImageElement(*image).cachedImage(); |
591 } else { | 591 } else { |
592 exceptionState.throwDOMException( | 592 exceptionState.throwDOMException( |
593 InvalidAccessError, "The element provided is not a image element."); | 593 InvalidAccessError, "The element provided is not a image element."); |
594 return; | 594 return; |
595 } | 595 } |
596 | 596 |
(...skipping 10 matching lines...) Expand all Loading... |
607 return; | 607 return; |
608 } | 608 } |
609 | 609 |
610 imageData->advanceTime(deltaTimeInSeconds); | 610 imageData->advanceTime(deltaTimeInSeconds); |
611 } | 611 } |
612 | 612 |
613 void Internals::advanceImageAnimation(Element* image, | 613 void Internals::advanceImageAnimation(Element* image, |
614 ExceptionState& exceptionState) { | 614 ExceptionState& exceptionState) { |
615 ASSERT(image); | 615 ASSERT(image); |
616 | 616 |
617 ImageResource* resource = nullptr; | 617 ImageResourceContent* resource = nullptr; |
618 if (isHTMLImageElement(*image)) { | 618 if (isHTMLImageElement(*image)) { |
619 resource = toHTMLImageElement(*image).cachedImage(); | 619 resource = toHTMLImageElement(*image).cachedImage(); |
620 } else if (isSVGImageElement(*image)) { | 620 } else if (isSVGImageElement(*image)) { |
621 resource = toSVGImageElement(*image).cachedImage(); | 621 resource = toSVGImageElement(*image).cachedImage(); |
622 } else { | 622 } else { |
623 exceptionState.throwDOMException( | 623 exceptionState.throwDOMException( |
624 InvalidAccessError, "The element provided is not a image element."); | 624 InvalidAccessError, "The element provided is not a image element."); |
625 return; | 625 return; |
626 } | 626 } |
627 | 627 |
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3059 | 3059 |
3060 void Internals::crash() { | 3060 void Internals::crash() { |
3061 CHECK(false) << "Intentional crash"; | 3061 CHECK(false) << "Intentional crash"; |
3062 } | 3062 } |
3063 | 3063 |
3064 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3064 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
3065 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3065 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
3066 } | 3066 } |
3067 | 3067 |
3068 } // namespace blink | 3068 } // namespace blink |
OLD | NEW |