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 TransformationMatrix accumulatedTransform; |
| 228 LayoutObject* layoutObject = documentFrameView()->layoutView(); |
| 229 for (;;) { |
| 230 LayoutObject* container = layoutObject->parent(); |
| 231 if (!container && layoutObject->frame()) |
| 232 container = layoutObject->frame()->ownerLayoutObject(); |
| 233 if (!container) |
| 234 break; |
| 235 |
| 236 LayoutSize offset = layoutObject->offsetFromContainer(container, LayoutP
oint()); |
| 237 TransformationMatrix transformFromContainer; |
| 238 layoutObject->getTransformFromContainer(container, offset, transformFrom
Container); |
| 239 accumulatedTransform *= transformFromContainer; |
| 240 layoutObject = container; |
| 241 } |
| 242 |
| 243 return TransformationMatrix::toSkMatrix44(accumulatedTransform); |
| 244 } |
| 245 |
221 LayoutBoxModelObject* AXLayoutObject::layoutBoxModelObject() const | 246 LayoutBoxModelObject* AXLayoutObject::layoutBoxModelObject() const |
222 { | 247 { |
223 if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) | 248 if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) |
224 return 0; | 249 return 0; |
225 return toLayoutBoxModelObject(m_layoutObject); | 250 return toLayoutBoxModelObject(m_layoutObject); |
226 } | 251 } |
227 | 252 |
228 bool AXLayoutObject::shouldNotifyActiveDescendant() const | 253 bool AXLayoutObject::shouldNotifyActiveDescendant() const |
229 { | 254 { |
230 // We want to notify that the combo box has changed its active descendant, | 255 // 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()) { | 2571 if (label && label->layoutObject()) { |
2547 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2572 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
2548 result.unite(labelRect); | 2573 result.unite(labelRect); |
2549 } | 2574 } |
2550 } | 2575 } |
2551 | 2576 |
2552 return result; | 2577 return result; |
2553 } | 2578 } |
2554 | 2579 |
2555 } // namespace blink | 2580 } // namespace blink |
OLD | NEW |