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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #include "core/svg/SVGDocumentExtensions.h" | 73 #include "core/svg/SVGDocumentExtensions.h" |
74 #include "core/svg/SVGSVGElement.h" | 74 #include "core/svg/SVGSVGElement.h" |
75 #include "core/svg/graphics/SVGImage.h" | 75 #include "core/svg/graphics/SVGImage.h" |
76 #include "modules/accessibility/AXImageMapLink.h" | 76 #include "modules/accessibility/AXImageMapLink.h" |
77 #include "modules/accessibility/AXInlineTextBox.h" | 77 #include "modules/accessibility/AXInlineTextBox.h" |
78 #include "modules/accessibility/AXObjectCacheImpl.h" | 78 #include "modules/accessibility/AXObjectCacheImpl.h" |
79 #include "modules/accessibility/AXSVGRoot.h" | 79 #include "modules/accessibility/AXSVGRoot.h" |
80 #include "modules/accessibility/AXSpinButton.h" | 80 #include "modules/accessibility/AXSpinButton.h" |
81 #include "modules/accessibility/AXTable.h" | 81 #include "modules/accessibility/AXTable.h" |
82 #include "platform/fonts/FontTraits.h" | 82 #include "platform/fonts/FontTraits.h" |
| 83 #include "platform/geometry/TransformState.h" |
83 #include "platform/text/PlatformLocale.h" | 84 #include "platform/text/PlatformLocale.h" |
84 #include "platform/text/TextDirection.h" | 85 #include "platform/text/TextDirection.h" |
85 #include "wtf/StdLibExtras.h" | 86 #include "wtf/StdLibExtras.h" |
86 | 87 |
87 using blink::WebLocalizedString; | 88 using blink::WebLocalizedString; |
88 | 89 |
89 namespace blink { | 90 namespace blink { |
90 | 91 |
91 using namespace HTMLNames; | 92 using namespace HTMLNames; |
92 | 93 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 toAXLayoutObject(obj)->checkCachedElementRect(); | 212 toAXLayoutObject(obj)->checkCachedElementRect(); |
212 } | 213 } |
213 for (const AXObject* obj = this; obj; obj = obj->parentObject()) { | 214 for (const AXObject* obj = this; obj; obj = obj->parentObject()) { |
214 if (obj->isAXLayoutObject()) | 215 if (obj->isAXLayoutObject()) |
215 toAXLayoutObject(obj)->updateCachedElementRect(); | 216 toAXLayoutObject(obj)->updateCachedElementRect(); |
216 } | 217 } |
217 | 218 |
218 return m_cachedElementRect; | 219 return m_cachedElementRect; |
219 } | 220 } |
220 | 221 |
| 222 SkMatrix44 AXLayoutObject::localFrameRootTransform() const |
| 223 { |
| 224 if (!m_layoutObject || !documentFrameView() || !documentFrameView()->layoutV
iew()) |
| 225 return SkMatrix44(); |
| 226 |
| 227 LayoutView* layoutView = documentFrameView()->layoutView(); |
| 228 TransformationMatrix accumulatedTransform = layoutView->localToAbsoluteTrans
form(TraverseDocumentBoundaries); |
| 229 IntPoint scrollPosition = documentFrameView()->scrollPosition(); |
| 230 accumulatedTransform.translate(scrollPosition.x(), scrollPosition.y()); |
| 231 return TransformationMatrix::toSkMatrix44(accumulatedTransform); |
| 232 } |
| 233 |
221 LayoutBoxModelObject* AXLayoutObject::layoutBoxModelObject() const | 234 LayoutBoxModelObject* AXLayoutObject::layoutBoxModelObject() const |
222 { | 235 { |
223 if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) | 236 if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) |
224 return 0; | 237 return 0; |
225 return toLayoutBoxModelObject(m_layoutObject); | 238 return toLayoutBoxModelObject(m_layoutObject); |
226 } | 239 } |
227 | 240 |
228 bool AXLayoutObject::shouldNotifyActiveDescendant() const | 241 bool AXLayoutObject::shouldNotifyActiveDescendant() const |
229 { | 242 { |
230 // We want to notify that the combo box has changed its active descendant, | 243 // We want to notify that the combo box has changed its active descendant, |
(...skipping 2315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2546 if (label && label->layoutObject()) { | 2559 if (label && label->layoutObject()) { |
2547 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2560 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
2548 result.unite(labelRect); | 2561 result.unite(labelRect); |
2549 } | 2562 } |
2550 } | 2563 } |
2551 | 2564 |
2552 return result; | 2565 return result; |
2553 } | 2566 } |
2554 | 2567 |
2555 } // namespace blink | 2568 } // namespace blink |
OLD | NEW |