[webkit-dev] specifics about what do-webcore-rename will do

Darin Adler darin at apple.com
Fri Mar 17 17:37:35 PST 2006

Eric mentioned the do-webcore-rename script, but Maciej pointed out  
that I could be even more specific about what it does.

The script renames both files and identifiers. It renames all files  
and identifiers that end in "Impl" to remove "Impl", which is  
something we want to do to make DOM classes all have shorter and more  
pleasant names. The concept here is that if there are C++ bindings,  
they will be classes with the same name but in a different namespace.  
Before, C++ bindings were in the same namespace, so we needed the  
"Impl" suffix. The exceptions to this rule are these class names:


and these other identifiers:


In addition, we're doing some other renames at the same time.

     uint => unsigned
     MacFrame => FrameMac
     createAttrImplIfNeeded => createAttrIfNeeded

Avoid name conflicts for classes that would conflict otherwise.

     MouseEvent => PlatformMouseEvent
     WheelEvent => PlatformWheelEvent

Enumeration constants that would conflict otherwise:

     Document => Document_
     Event => Event_

Change JavaScript wrappers to have a "JS" prefix (but only ones we  
can do with a global replace; some are harder):

     HTMLCollection => JSHTMLCollection
     HTMLSelectCollection => JSHTMLSelectCollection
     HTMLSelectElement => JSHTMLSelectElement
     HTMLElement => JSHTMLElement
     HTMLDocument => JSHTMLDocument
     DOMParser => JSDOMParser
     XSLTProcessor => JSXSLTProcessor

File renames for files that already contain only a single class or  
single non-class purpose:

     dom2_rangeimpl => Range
     dom2_viewsimpl => AbstractView
     dom_position => Position
     html_canvasimpl => HTMLCanvasElement
     html_documentimpl => HTMLDocument
     jsediting => JSEditor
     render_arena => RenderArena
     render_box => RenderBox
     render_br => RenderBR
     render_canvas => RenderCanvas
     render_canvasimage => RenderCanvasImage
     render_flexbox => RenderFlexibleBox
     render_flow => RenderFlow
     render_image => RenderImage
     render_inline => RenderInline
     render_layer => RenderLayer
     render_object => RenderObject
     render_theme => RenderTheme
     render_theme_mac => RenderThemeMac
     visible_text => TextIterator
     xmlserializer => JSXMLSerializer
     xslt_processorimpl => XSLTProcessorImpl
     kentities => HTMLEntityNames
     khtmlentities => HTMLEntityNames
     xsl_stylesheetimpl => XSLStyleSheet
     doctypes => DocTypeStrings
     text_affinity => TextAffinity
     edit_actions => EditAction
     html_interchange => HTMLInterchange
     text_granularity => TextGranularity
     domparser => JSDOMParser
     htmlfactory => HTMLElementFactory
     css_grammar => CSSGrammar
     css_computedstyle => CSSComputedStyleDeclaration
     cssproperties => CSSPropertyNames
     cssvalues => CSSValueStrings

De-KWQ and De-Q-ification of platform classes that aren't really the  
same as the corresponding Qt or KDE classes or that have nothing to  
do with KWQ:

     KWQReportBlockedException => ReportBlockedObjCException
     KWQExceptions => BlockExceptions
     KWQAccObject => WebCoreAXObject
     KWQAccObjectID => WebCoreAXID
     KWQAccObjectCache => AccessibilityObjectCache
     KWQValueList => DeprecatedValueList
     QValueList => DeprecatedValueList
     QString => DeprecatedString
     QCString => DeprecatedCString
     Array => DeprecatedArray
     ByteArray => DeprecatedByteArray
     KURL => DeprecatedURL
     QStringList => DeprecatedStringList
     KWQPtrList => DeprecatedPtrList
     QPtrList => DeprecatedPtrList
     KWQListImpl => DeprecatedPtrListImpl
     KWQValueListImpl => DeprecatedValueListImpl
     QPtrQueue => DeprecatedPtrQueue
     KWQValueListNodeImpl => DeprecatedValueListImplNode
     KWQValueListIteratorImpl => DeprecatedValueListImplIterator
     KWQListIteratorImpl => DeprecatedPtrListImplIterator
     QPtrListIterator => DeprecatedPtrListIterator
     QValueListConstIterator => DeprecatedValueListConstIterator
     QValueListIterator => DeprecatedValueListIterator
     QValueListNode => DeprecatedValueListNode
     KWQClipboard => ClipboardMac
     KWQTextField => WebCoreTextField
     KWQTextArea => WebCoreTextArea
     KWQTextAreaTextView => WebCoreTextView
     KWQRenderTreeDebug => RenderTreeAsText
     QRegExp => RegularExpression
     KWQRegExp => RegularExpression
     KJavaAppletWidget => JavaAppletWidget
     KWQKJavaAppletWidget => JavaAppletWidget
     KSVGCSSParser => SVGCSSParser

Use standard "AX" terminology instead of "Acc" terminology:

     accObjectID => axObjectID
     setAccObjectID => setAXObjectID
     removeAccObjectID => removeAXObjectID

Match our newer naming scheme for an enumeration:

     ETextGranularity => TextGranularity
     LINE_BOUNDARY => LineBoundary
     PARAGRAPH_BOUNDARY => ParagraphBoundary
     DOCUMENT_BOUNDARY => DocumentBoundary

Please let me know if you have specific objections to any of these  
specific changes or other ideas for changes to do.

Even though Eric announced we'd do the change tonight, I'm waiting  
for some mail from Maciej before I do this; we may change our plans  
or postpone to next week.

     -- Darin

More information about the webkit-dev mailing list