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

Unified Diff: Source/bindings/scripts/v8_attributes.py

Issue 378343004: Use Reflect on attributes in xml namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_attributes.py
diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py
index a707289c392cd31562abd2e4b823c715aaba83f9..b097c27cf368e51371861dd35bd9fc58f050da41 100644
--- a/Source/bindings/scripts/v8_attributes.py
+++ b/Source/bindings/scripts/v8_attributes.py
@@ -410,7 +410,16 @@ def setter_base_name(interface, attribute, arguments):
def scoped_content_attribute_name(interface, attribute):
content_attribute_name = attribute.extended_attributes['Reflect'] or attribute.name.lower()
- namespace = 'SVGNames' if interface.name.startswith('SVG') else 'HTMLNames'
+ if interface.name.startswith('SVG'):
+ # SVG's xmlbase/xmlspace/xmllang need special behavior, i.e.
+ # it is in XMLNames namespace and the generated attribute has no xml prefix.
+ if attribute.name.startswith('xml'):
+ namespace = 'XMLNames'
+ content_attribute_name = content_attribute_name[3:]
+ else:
+ namespace = 'SVGNames'
+ else:
+ namespace = 'HTMLNames'
includes.add('core/%s.h' % namespace)
return '%s::%sAttr' % (namespace, content_attribute_name)
« no previous file with comments | « no previous file | Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698