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

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

Issue 268803005: Replace SVGDocument by XMLDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add rootElement() variant Created 6 years, 7 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
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "core/rendering/RenderHTMLCanvas.h" 58 #include "core/rendering/RenderHTMLCanvas.h"
59 #include "core/rendering/RenderImage.h" 59 #include "core/rendering/RenderImage.h"
60 #include "core/rendering/RenderInline.h" 60 #include "core/rendering/RenderInline.h"
61 #include "core/rendering/RenderLayer.h" 61 #include "core/rendering/RenderLayer.h"
62 #include "core/rendering/RenderListMarker.h" 62 #include "core/rendering/RenderListMarker.h"
63 #include "core/rendering/RenderMenuList.h" 63 #include "core/rendering/RenderMenuList.h"
64 #include "core/rendering/RenderTextControlSingleLine.h" 64 #include "core/rendering/RenderTextControlSingleLine.h"
65 #include "core/rendering/RenderTextFragment.h" 65 #include "core/rendering/RenderTextFragment.h"
66 #include "core/rendering/RenderView.h" 66 #include "core/rendering/RenderView.h"
67 #include "core/rendering/RenderWidget.h" 67 #include "core/rendering/RenderWidget.h"
68 #include "core/svg/SVGDocument.h" 68 #include "core/svg/SVGDocumentExtensions.h"
69 #include "core/svg/SVGSVGElement.h" 69 #include "core/svg/SVGSVGElement.h"
70 #include "core/svg/graphics/SVGImage.h" 70 #include "core/svg/graphics/SVGImage.h"
71 #include "platform/text/PlatformLocale.h" 71 #include "platform/text/PlatformLocale.h"
72 #include "wtf/StdLibExtras.h" 72 #include "wtf/StdLibExtras.h"
73 73
74 using blink::WebLocalizedString; 74 using blink::WebLocalizedString;
75 75
76 namespace WebCore { 76 namespace WebCore {
77 77
78 using namespace HTMLNames; 78 using namespace HTMLNames;
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 if (!image || !image->isSVGImage()) 2017 if (!image || !image->isSVGImage())
2018 return 0; 2018 return 0;
2019 2019
2020 FrameView* frameView = toSVGImage(image)->frameView(); 2020 FrameView* frameView = toSVGImage(image)->frameView();
2021 if (!frameView) 2021 if (!frameView)
2022 return 0; 2022 return 0;
2023 Document* doc = frameView->frame().document(); 2023 Document* doc = frameView->frame().document();
2024 if (!doc || !doc->isSVGDocument()) 2024 if (!doc || !doc->isSVGDocument())
2025 return 0; 2025 return 0;
2026 2026
2027 SVGSVGElement* rootElement = toSVGDocument(doc)->rootElement(); 2027 SVGSVGElement* rootElement = doc->accessSVGExtensions().rootElement();
2028 if (!rootElement) 2028 if (!rootElement)
2029 return 0; 2029 return 0;
2030 RenderObject* rendererRoot = rootElement->renderer(); 2030 RenderObject* rendererRoot = rootElement->renderer();
2031 if (!rendererRoot) 2031 if (!rendererRoot)
2032 return 0; 2032 return 0;
2033 2033
2034 AXObject* rootSVGObject = doc->axObjectCache()->getOrCreate(rendererRoot); 2034 AXObject* rootSVGObject = doc->axObjectCache()->getOrCreate(rendererRoot);
2035 2035
2036 // In order to connect the AX hierarchy from the SVG root element from the l oaded resource 2036 // In order to connect the AX hierarchy from the SVG root element from the l oaded resource
2037 // the parent must be set, because there's no other way to get back to who c reated the image. 2037 // the parent must be set, because there's no other way to get back to who c reated the image.
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 if (label && label->renderer()) { 2307 if (label && label->renderer()) {
2308 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2308 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2309 result.unite(labelRect); 2309 result.unite(labelRect);
2310 } 2310 }
2311 } 2311 }
2312 2312
2313 return result; 2313 return result;
2314 } 2314 }
2315 2315
2316 } // namespace WebCore 2316 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698