| 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::transformFromLocalParentFrame() const |
| 223 { |
| 224 if (!m_layoutObject) |
| 225 return SkMatrix44(); |
| 226 LayoutView* layoutView = documentFrameView()->layoutView(); |
| 227 |
| 228 FrameView* parentFrameView = documentFrameView()->parentFrameView(); |
| 229 if (!parentFrameView) |
| 230 return SkMatrix44(); |
| 231 LayoutView* parentLayoutView = parentFrameView->layoutView(); |
| 232 |
| 233 TransformationMatrix accumulatedTransform = layoutView->localToAncestorTrans
form(parentLayoutView, TraverseDocumentBoundaries); |
| 234 IntPoint scrollPosition = documentFrameView()->scrollPosition(); |
| 235 accumulatedTransform.translate(scrollPosition.x(), scrollPosition.y()); |
| 236 return TransformationMatrix::toSkMatrix44(accumulatedTransform); |
| 237 } |
| 238 |
| 221 LayoutBoxModelObject* AXLayoutObject::getLayoutBoxModelObject() const | 239 LayoutBoxModelObject* AXLayoutObject::getLayoutBoxModelObject() const |
| 222 { | 240 { |
| 223 if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) | 241 if (!m_layoutObject || !m_layoutObject->isBoxModelObject()) |
| 224 return 0; | 242 return 0; |
| 225 return toLayoutBoxModelObject(m_layoutObject); | 243 return toLayoutBoxModelObject(m_layoutObject); |
| 226 } | 244 } |
| 227 | 245 |
| 228 bool AXLayoutObject::shouldNotifyActiveDescendant() const | 246 bool AXLayoutObject::shouldNotifyActiveDescendant() const |
| 229 { | 247 { |
| 230 // We want to notify that the combo box has changed its active descendant, | 248 // We want to notify that the combo box has changed its active descendant, |
| (...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2508 if (label && label->layoutObject()) { | 2526 if (label && label->layoutObject()) { |
| 2509 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2527 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2510 result.unite(labelRect); | 2528 result.unite(labelRect); |
| 2511 } | 2529 } |
| 2512 } | 2530 } |
| 2513 | 2531 |
| 2514 return result; | 2532 return result; |
| 2515 } | 2533 } |
| 2516 | 2534 |
| 2517 } // namespace blink | 2535 } // namespace blink |
| OLD | NEW |