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

Side by Side Diff: Source/modules/accessibility/AXRenderObject.cpp

Issue 931003002: Move and rename RenderPart to LayoutPart. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/html/HTMLImageElement.h" 44 #include "core/html/HTMLImageElement.h"
45 #include "core/html/HTMLLabelElement.h" 45 #include "core/html/HTMLLabelElement.h"
46 #include "core/html/HTMLOptionElement.h" 46 #include "core/html/HTMLOptionElement.h"
47 #include "core/html/HTMLSelectElement.h" 47 #include "core/html/HTMLSelectElement.h"
48 #include "core/html/HTMLTextAreaElement.h" 48 #include "core/html/HTMLTextAreaElement.h"
49 #include "core/html/shadow/ShadowElementNames.h" 49 #include "core/html/shadow/ShadowElementNames.h"
50 #include "core/layout/HitTestResult.h" 50 #include "core/layout/HitTestResult.h"
51 #include "core/layout/Layer.h" 51 #include "core/layout/Layer.h"
52 #include "core/layout/LayoutHTMLCanvas.h" 52 #include "core/layout/LayoutHTMLCanvas.h"
53 #include "core/layout/LayoutImage.h" 53 #include "core/layout/LayoutImage.h"
54 #include "core/layout/LayoutPart.h"
54 #include "core/layout/LayoutTextControlSingleLine.h" 55 #include "core/layout/LayoutTextControlSingleLine.h"
55 #include "core/loader/ProgressTracker.h" 56 #include "core/loader/ProgressTracker.h"
56 #include "core/page/Page.h" 57 #include "core/page/Page.h"
57 #include "core/rendering/RenderFieldset.h" 58 #include "core/rendering/RenderFieldset.h"
58 #include "core/rendering/RenderFileUploadControl.h" 59 #include "core/rendering/RenderFileUploadControl.h"
59 #include "core/rendering/RenderInline.h" 60 #include "core/rendering/RenderInline.h"
60 #include "core/rendering/RenderListMarker.h" 61 #include "core/rendering/RenderListMarker.h"
61 #include "core/rendering/RenderMenuList.h" 62 #include "core/rendering/RenderMenuList.h"
62 #include "core/rendering/RenderPart.h"
63 #include "core/rendering/RenderTextFragment.h" 63 #include "core/rendering/RenderTextFragment.h"
64 #include "core/rendering/RenderView.h" 64 #include "core/rendering/RenderView.h"
65 #include "core/svg/SVGDocumentExtensions.h" 65 #include "core/svg/SVGDocumentExtensions.h"
66 #include "core/svg/SVGSVGElement.h" 66 #include "core/svg/SVGSVGElement.h"
67 #include "core/svg/graphics/SVGImage.h" 67 #include "core/svg/graphics/SVGImage.h"
68 #include "modules/accessibility/AXImageMapLink.h" 68 #include "modules/accessibility/AXImageMapLink.h"
69 #include "modules/accessibility/AXInlineTextBox.h" 69 #include "modules/accessibility/AXInlineTextBox.h"
70 #include "modules/accessibility/AXObjectCacheImpl.h" 70 #include "modules/accessibility/AXObjectCacheImpl.h"
71 #include "modules/accessibility/AXSVGRoot.h" 71 #include "modules/accessibility/AXSVGRoot.h"
72 #include "modules/accessibility/AXSpinButton.h" 72 #include "modules/accessibility/AXSpinButton.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // 406 //
407 // Check object role or purpose. 407 // Check object role or purpose.
408 // 408 //
409 409
410 bool AXRenderObject::isAttachment() const 410 bool AXRenderObject::isAttachment() const
411 { 411 {
412 RenderBoxModelObject* renderer = renderBoxModelObject(); 412 RenderBoxModelObject* renderer = renderBoxModelObject();
413 if (!renderer) 413 if (!renderer)
414 return false; 414 return false;
415 // Widgets are the replaced elements that we represent to AX as attachments 415 // Widgets are the replaced elements that we represent to AX as attachments
416 bool isRenderPart = renderer->isRenderPart(); 416 bool isLayoutPart = renderer->isLayoutPart();
417 ASSERT(!isRenderPart || (renderer->isReplaced() && !isImage())); 417 ASSERT(!isLayoutPart || (renderer->isReplaced() && !isImage()));
418 return isRenderPart; 418 return isLayoutPart;
419 } 419 }
420 420
421 static bool isLinkable(const AXObject& object) 421 static bool isLinkable(const AXObject& object)
422 { 422 {
423 if (!object.renderer()) 423 if (!object.renderer())
424 return false; 424 return false;
425 425
426 // See https://wiki.mozilla.org/Accessibility/AT-Windows-API for the element s 426 // See https://wiki.mozilla.org/Accessibility/AT-Windows-API for the element s
427 // Mozilla considers linkable. 427 // Mozilla considers linkable.
428 return object.isLink() || object.isImage() || object.renderer()->isText(); 428 return object.isLink() || object.isImage() || object.renderer()->isText();
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 return toElement(node); 1641 return toElement(node);
1642 } 1642 }
1643 1643
1644 return 0; 1644 return 0;
1645 } 1645 }
1646 1646
1647 Widget* AXRenderObject::widgetForAttachmentView() const 1647 Widget* AXRenderObject::widgetForAttachmentView() const
1648 { 1648 {
1649 if (!isAttachment()) 1649 if (!isAttachment())
1650 return 0; 1650 return 0;
1651 return toRenderPart(m_renderer)->widget(); 1651 return toLayoutPart(m_renderer)->widget();
1652 } 1652 }
1653 1653
1654 // 1654 //
1655 // Selected text. 1655 // Selected text.
1656 // 1656 //
1657 1657
1658 AXObject::PlainTextRange AXRenderObject::selectedTextRange() const 1658 AXObject::PlainTextRange AXRenderObject::selectedTextRange() const
1659 { 1659 {
1660 if (!isTextControl()) 1660 if (!isTextControl())
1661 return PlainTextRange(); 1661 return PlainTextRange();
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 if (label && label->renderer()) { 2411 if (label && label->renderer()) {
2412 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2412 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2413 result.unite(labelRect); 2413 result.unite(labelRect);
2414 } 2414 }
2415 } 2415 }
2416 2416
2417 return result; 2417 return result;
2418 } 2418 }
2419 2419
2420 } // namespace blink 2420 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.cpp ('k') | Source/platform/graphics/CompositingReasons.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698