Chromium Code Reviews| 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 // check for one-dimensional image | 756 // check for one-dimensional image |
| 757 LayoutImage* image = toLayoutImage(m_layoutObject); | 757 LayoutImage* image = toLayoutImage(m_layoutObject); |
| 758 if (image->size().height() <= 1 || image->size().width() <= 1) { | 758 if (image->size().height() <= 1 || image->size().width() <= 1) { |
| 759 if (ignoredReasons) | 759 if (ignoredReasons) |
| 760 ignoredReasons->append(IgnoredReason(AXProbablyPresentationa l)); | 760 ignoredReasons->append(IgnoredReason(AXProbablyPresentationa l)); |
| 761 return true; | 761 return true; |
| 762 } | 762 } |
| 763 | 763 |
| 764 // check whether laid out image was stretched from one-dimensional f ile image | 764 // check whether laid out image was stretched from one-dimensional f ile image |
| 765 if (image->cachedImage()) { | 765 if (image->cachedImage()) { |
| 766 LayoutSize imageSize = image->cachedImage()->imageSizeForLayoutO bject(m_layoutObject, image->view()->zoomFactor()); | 766 RespectImageOrientationEnum shouldRespectImageOrientation = |
| 767 m_layoutObject ? m_layoutObject->shouldRespectImageOrientati on() : DoNotRespectImageOrientation; | |
| 768 LayoutSize imageSize = image->cachedImage()->imageSize(shouldRes pectImageOrientation, image->view()->zoomFactor()); | |
|
Yoav Weiss
2015/11/24 10:29:07
ditto
davve
2015/11/24 12:49:13
If I had such a function, yes. (again)
| |
| 767 if (imageSize.height() <= 1 || imageSize.width() <= 1) { | 769 if (imageSize.height() <= 1 || imageSize.width() <= 1) { |
| 768 if (ignoredReasons) | 770 if (ignoredReasons) |
| 769 ignoredReasons->append(IgnoredReason(AXProbablyPresentat ional)); | 771 ignoredReasons->append(IgnoredReason(AXProbablyPresentat ional)); |
| 770 return true; | 772 return true; |
| 771 } | 773 } |
| 772 return false; | 774 return false; |
| 773 } | 775 } |
| 774 } | 776 } |
| 775 return false; | 777 return false; |
| 776 } | 778 } |
| (...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2558 if (label && label->layoutObject()) { | 2560 if (label && label->layoutObject()) { |
| 2559 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); | 2561 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); |
| 2560 result.unite(labelRect); | 2562 result.unite(labelRect); |
| 2561 } | 2563 } |
| 2562 } | 2564 } |
| 2563 | 2565 |
| 2564 return result; | 2566 return result; |
| 2565 } | 2567 } |
| 2566 | 2568 |
| 2567 } // namespace blink | 2569 } // namespace blink |
| OLD | NEW |