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

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

Issue 1468023002: Rename imageSizeForLayoutObject() to imageSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make LayoutObject::shouldRespectImageOrientation class static and make use of it Created 5 years 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 LayoutSize imageSize = image->cachedImage()->imageSize(LayoutObj ect::shouldRespectImageOrientation(m_layoutObject), image->view()->zoomFactor()) ;
767 if (imageSize.height() <= 1 || imageSize.width() <= 1) { 767 if (imageSize.height() <= 1 || imageSize.width() <= 1) {
768 if (ignoredReasons) 768 if (ignoredReasons)
769 ignoredReasons->append(IgnoredReason(AXProbablyPresentat ional)); 769 ignoredReasons->append(IgnoredReason(AXProbablyPresentat ional));
770 return true; 770 return true;
771 } 771 }
772 return false; 772 return false;
773 } 773 }
774 } 774 }
775 return false; 775 return false;
776 } 776 }
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
2558 if (label && label->layoutObject()) { 2558 if (label && label->layoutObject()) {
2559 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2559 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2560 result.unite(labelRect); 2560 result.unite(labelRect);
2561 } 2561 }
2562 } 2562 }
2563 2563
2564 return result; 2564 return result;
2565 } 2565 }
2566 2566
2567 } // namespace blink 2567 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698