Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 // check for one-dimensional image 728 // check for one-dimensional image
729 LayoutImage* image = toLayoutImage(m_layoutObject); 729 LayoutImage* image = toLayoutImage(m_layoutObject);
730 if (image->size().height() <= 1 || image->size().width() <= 1) { 730 if (image->size().height() <= 1 || image->size().width() <= 1) {
731 if (ignoredReasons) 731 if (ignoredReasons)
732 ignoredReasons->append(IgnoredReason(AXProbablyPresentationa l)); 732 ignoredReasons->append(IgnoredReason(AXProbablyPresentationa l));
733 return true; 733 return true;
734 } 734 }
735 735
736 // check whether laid out image was stretched from one-dimensional f ile image 736 // check whether laid out image was stretched from one-dimensional f ile image
737 if (image->cachedImage()) { 737 if (image->cachedImage()) {
738 LayoutSize imageSize = image->cachedImage()->imageSize(LayoutObj ect::shouldRespectImageOrientation(m_layoutObject), image->view()->zoomFactor()) ; 738 LayoutSize imageSize = image->cachedImage()->defaultConcreteObje ctSize(LayoutObject::shouldRespectImageOrientation(m_layoutObject), image->view( )->zoomFactor());
739 if (imageSize.height() <= 1 || imageSize.width() <= 1) { 739 if (imageSize.height() <= 1 || imageSize.width() <= 1) {
740 if (ignoredReasons) 740 if (ignoredReasons)
741 ignoredReasons->append(IgnoredReason(AXProbablyPresentat ional)); 741 ignoredReasons->append(IgnoredReason(AXProbablyPresentat ional));
742 return true; 742 return true;
743 } 743 }
744 return false; 744 return false;
745 } 745 }
746 } 746 }
747 return false; 747 return false;
748 } 748 }
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 if (label && label->layoutObject()) { 2546 if (label && label->layoutObject()) {
2547 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2547 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2548 result.unite(labelRect); 2548 result.unite(labelRect);
2549 } 2549 }
2550 } 2550 }
2551 2551
2552 return result; 2552 return result;
2553 } 2553 }
2554 2554
2555 } // namespace blink 2555 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698