Changeset 135069 in webkit
- Timestamp:
- Nov 18, 2012, 8:55:06 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 229 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r135068 r135069 1 2012-11-18 Andreas Kling <akling@apple.com> 2 3 Element::parseAttribute() should take name & value as separate arguments. 4 <http://webkit.org/b/102608> 5 6 Reviewed by Antti Koivisto. 7 8 Update the signature of parseAttribute() to take a QualifiedName/AtomicString combo instead 9 of an Attribute. This lets us pass avoid refcount churn in Element::attributeChanged() since 10 creating a temporary Attribute is no longer necessary. 11 12 This was surprisingly hot (~1%) on the DOM/CreateNodes performance test. 13 14 * bindings/js/ScriptEventListener.cpp: 15 (WebCore::createAttributeEventListener): 16 * bindings/js/ScriptEventListener.h: 17 (WebCore): 18 * bindings/v8/ScriptEventListener.cpp: 19 (WebCore::createAttributeEventListener): 20 * bindings/v8/ScriptEventListener.h: 21 (WebCore): 22 * dom/Element.cpp: 23 (WebCore::Element::attributeChanged): 24 (WebCore::Element::parseAttribute): 25 * dom/Element.h: 26 (Element): 27 * dom/StyledElement.cpp: 28 (WebCore::StyledElement::parseAttribute): 29 * dom/StyledElement.h: 30 (StyledElement): 31 * html/HTMLAnchorElement.cpp: 32 (WebCore::HTMLAnchorElement::parseAttribute): 33 * html/HTMLAnchorElement.h: 34 (HTMLAnchorElement): 35 * html/HTMLAppletElement.cpp: 36 (WebCore::HTMLAppletElement::parseAttribute): 37 * html/HTMLAppletElement.h: 38 (HTMLAppletElement): 39 * html/HTMLAreaElement.cpp: 40 (WebCore::HTMLAreaElement::parseAttribute): 41 * html/HTMLAreaElement.h: 42 (HTMLAreaElement): 43 * html/HTMLBaseElement.cpp: 44 (WebCore::HTMLBaseElement::parseAttribute): 45 * html/HTMLBaseElement.h: 46 (HTMLBaseElement): 47 * html/HTMLBodyElement.cpp: 48 (WebCore::HTMLBodyElement::parseAttribute): 49 * html/HTMLBodyElement.h: 50 (HTMLBodyElement): 51 * html/HTMLButtonElement.cpp: 52 (WebCore::HTMLButtonElement::parseAttribute): 53 * html/HTMLButtonElement.h: 54 * html/HTMLCanvasElement.cpp: 55 (WebCore::HTMLCanvasElement::parseAttribute): 56 * html/HTMLCanvasElement.h: 57 (HTMLCanvasElement): 58 * html/HTMLDetailsElement.cpp: 59 (WebCore::HTMLDetailsElement::parseAttribute): 60 * html/HTMLDetailsElement.h: 61 (HTMLDetailsElement): 62 * html/HTMLElement.cpp: 63 (WebCore::HTMLElement::parseAttribute): 64 (WebCore::HTMLElement::dirAttributeChanged): 65 * html/HTMLElement.h: 66 (HTMLElement): 67 * html/HTMLEmbedElement.cpp: 68 (WebCore::HTMLEmbedElement::parseAttribute): 69 * html/HTMLEmbedElement.h: 70 (HTMLEmbedElement): 71 * html/HTMLFormControlElement.cpp: 72 (WebCore::HTMLFormControlElement::parseAttribute): 73 * html/HTMLFormControlElement.h: 74 (HTMLFormControlElement): 75 * html/HTMLFormElement.cpp: 76 (WebCore::HTMLFormElement::parseAttribute): 77 * html/HTMLFormElement.h: 78 (HTMLFormElement): 79 * html/HTMLFrameElement.cpp: 80 (WebCore::HTMLFrameElement::parseAttribute): 81 * html/HTMLFrameElement.h: 82 (HTMLFrameElement): 83 * html/HTMLFrameElementBase.cpp: 84 (WebCore::HTMLFrameElementBase::parseAttribute): 85 * html/HTMLFrameElementBase.h: 86 (HTMLFrameElementBase): 87 * html/HTMLFrameSetElement.cpp: 88 (WebCore::HTMLFrameSetElement::parseAttribute): 89 * html/HTMLFrameSetElement.h: 90 (HTMLFrameSetElement): 91 * html/HTMLIFrameElement.cpp: 92 (WebCore::HTMLIFrameElement::parseAttribute): 93 * html/HTMLIFrameElement.h: 94 (HTMLIFrameElement): 95 * html/HTMLImageElement.cpp: 96 (WebCore::HTMLImageElement::parseAttribute): 97 * html/HTMLImageElement.h: 98 (HTMLImageElement): 99 * html/HTMLInputElement.cpp: 100 (WebCore::HTMLInputElement::parseAttribute): 101 (WebCore::HTMLInputElement::parseMaxLengthAttribute): 102 * html/HTMLInputElement.h: 103 (HTMLInputElement): 104 * html/HTMLKeygenElement.cpp: 105 (WebCore::HTMLKeygenElement::parseAttribute): 106 * html/HTMLKeygenElement.h: 107 (HTMLKeygenElement): 108 * html/HTMLLIElement.cpp: 109 (WebCore::HTMLLIElement::parseAttribute): 110 * html/HTMLLIElement.h: 111 (HTMLLIElement): 112 * html/HTMLLinkElement.cpp: 113 (WebCore::HTMLLinkElement::parseAttribute): 114 * html/HTMLLinkElement.h: 115 (HTMLLinkElement): 116 * html/HTMLMapElement.cpp: 117 (WebCore::HTMLMapElement::parseAttribute): 118 * html/HTMLMapElement.h: 119 (HTMLMapElement): 120 * html/HTMLMediaElement.cpp: 121 (WebCore::HTMLMediaElement::parseAttribute): 122 * html/HTMLMediaElement.h: 123 * html/HTMLMetaElement.cpp: 124 (WebCore::HTMLMetaElement::parseAttribute): 125 * html/HTMLMetaElement.h: 126 (HTMLMetaElement): 127 * html/HTMLMeterElement.cpp: 128 (WebCore::HTMLMeterElement::parseAttribute): 129 * html/HTMLMeterElement.h: 130 (HTMLMeterElement): 131 * html/HTMLOListElement.cpp: 132 (WebCore::HTMLOListElement::parseAttribute): 133 * html/HTMLOListElement.h: 134 (HTMLOListElement): 135 * html/HTMLObjectElement.cpp: 136 (WebCore::HTMLObjectElement::parseAttribute): 137 * html/HTMLObjectElement.h: 138 (HTMLObjectElement): 139 * html/HTMLOptGroupElement.cpp: 140 (WebCore::HTMLOptGroupElement::parseAttribute): 141 * html/HTMLOptGroupElement.h: 142 * html/HTMLOptionElement.cpp: 143 (WebCore::HTMLOptionElement::parseAttribute): 144 * html/HTMLOptionElement.h: 145 (HTMLOptionElement): 146 * html/HTMLOutputElement.cpp: 147 (WebCore::HTMLOutputElement::parseAttribute): 148 * html/HTMLOutputElement.h: 149 (HTMLOutputElement): 150 * html/HTMLProgressElement.cpp: 151 (WebCore::HTMLProgressElement::parseAttribute): 152 * html/HTMLProgressElement.h: 153 * html/HTMLScriptElement.cpp: 154 (WebCore::HTMLScriptElement::parseAttribute): 155 * html/HTMLScriptElement.h: 156 (HTMLScriptElement): 157 * html/HTMLSelectElement.cpp: 158 (WebCore::HTMLSelectElement::parseAttribute): 159 (WebCore::HTMLSelectElement::parseMultipleAttribute): 160 * html/HTMLSelectElement.h: 161 * html/HTMLStyleElement.cpp: 162 (WebCore::HTMLStyleElement::parseAttribute): 163 * html/HTMLStyleElement.h: 164 (HTMLStyleElement): 165 * html/HTMLTableCellElement.cpp: 166 (WebCore::HTMLTableCellElement::parseAttribute): 167 * html/HTMLTableCellElement.h: 168 (HTMLTableCellElement): 169 * html/HTMLTableColElement.cpp: 170 (WebCore::HTMLTableColElement::parseAttribute): 171 * html/HTMLTableColElement.h: 172 (HTMLTableColElement): 173 * html/HTMLTableElement.cpp: 174 (WebCore::HTMLTableElement::parseAttribute): 175 * html/HTMLTableElement.h: 176 (HTMLTableElement): 177 * html/HTMLTextAreaElement.cpp: 178 (WebCore::HTMLTextAreaElement::parseAttribute): 179 * html/HTMLTextAreaElement.h: 180 (HTMLTextAreaElement): 181 * html/HTMLTextFormControlElement.cpp: 182 (WebCore::HTMLTextFormControlElement::parseAttribute): 183 * html/HTMLTextFormControlElement.h: 184 (HTMLTextFormControlElement): 185 * html/HTMLTrackElement.cpp: 186 (WebCore::HTMLTrackElement::parseAttribute): 187 * html/HTMLTrackElement.h: 188 (HTMLTrackElement): 189 * html/HTMLVideoElement.cpp: 190 (WebCore::HTMLVideoElement::parseAttribute): 191 * html/HTMLVideoElement.h: 192 (HTMLVideoElement): 193 * html/shadow/HTMLContentElement.cpp: 194 (WebCore::HTMLContentElement::parseAttribute): 195 * html/shadow/HTMLContentElement.h: 196 (HTMLContentElement): 197 * mathml/MathMLElement.cpp: 198 (WebCore::MathMLElement::parseAttribute): 199 * mathml/MathMLElement.h: 200 (MathMLElement): 201 * svg/SVGAElement.cpp: 202 (WebCore::SVGAElement::parseAttribute): 203 * svg/SVGAElement.h: 204 (SVGAElement): 205 * svg/SVGAnimateMotionElement.cpp: 206 (WebCore::SVGAnimateMotionElement::parseAttribute): 207 * svg/SVGAnimateMotionElement.h: 208 (SVGAnimateMotionElement): 209 * svg/SVGAnimateTransformElement.cpp: 210 (WebCore::SVGAnimateTransformElement::parseAttribute): 211 * svg/SVGAnimateTransformElement.h: 212 (SVGAnimateTransformElement): 213 * svg/SVGAnimationElement.cpp: 214 (WebCore::SVGAnimationElement::parseAttribute): 215 * svg/SVGAnimationElement.h: 216 (SVGAnimationElement): 217 * svg/SVGCircleElement.cpp: 218 (WebCore::SVGCircleElement::parseAttribute): 219 * svg/SVGCircleElement.h: 220 (SVGCircleElement): 221 * svg/SVGClipPathElement.cpp: 222 (WebCore::SVGClipPathElement::parseAttribute): 223 * svg/SVGClipPathElement.h: 224 (SVGClipPathElement): 225 * svg/SVGComponentTransferFunctionElement.cpp: 226 (WebCore::SVGComponentTransferFunctionElement::parseAttribute): 227 * svg/SVGComponentTransferFunctionElement.h: 228 (SVGComponentTransferFunctionElement): 229 * svg/SVGCursorElement.cpp: 230 (WebCore::SVGCursorElement::parseAttribute): 231 * svg/SVGCursorElement.h: 232 (SVGCursorElement): 233 * svg/SVGElement.cpp: 234 (WebCore::SVGElement::reportAttributeParsingError): 235 (WebCore::SVGElement::parseAttribute): 236 * svg/SVGElement.h: 237 (SVGElement): 238 * svg/SVGEllipseElement.cpp: 239 (WebCore::SVGEllipseElement::parseAttribute): 240 * svg/SVGEllipseElement.h: 241 (SVGEllipseElement): 242 * svg/SVGExternalResourcesRequired.cpp: 243 (WebCore::SVGExternalResourcesRequired::parseAttribute): 244 * svg/SVGExternalResourcesRequired.h: 245 (SVGExternalResourcesRequired): 246 * svg/SVGFEBlendElement.cpp: 247 (WebCore::SVGFEBlendElement::parseAttribute): 248 * svg/SVGFEBlendElement.h: 249 (SVGFEBlendElement): 250 * svg/SVGFEColorMatrixElement.cpp: 251 (WebCore::SVGFEColorMatrixElement::parseAttribute): 252 * svg/SVGFEColorMatrixElement.h: 253 (SVGFEColorMatrixElement): 254 * svg/SVGFEComponentTransferElement.cpp: 255 (WebCore::SVGFEComponentTransferElement::parseAttribute): 256 * svg/SVGFEComponentTransferElement.h: 257 (SVGFEComponentTransferElement): 258 * svg/SVGFECompositeElement.cpp: 259 (WebCore::SVGFECompositeElement::parseAttribute): 260 * svg/SVGFECompositeElement.h: 261 (SVGFECompositeElement): 262 * svg/SVGFEConvolveMatrixElement.cpp: 263 (WebCore::SVGFEConvolveMatrixElement::parseAttribute): 264 * svg/SVGFEConvolveMatrixElement.h: 265 (SVGFEConvolveMatrixElement): 266 * svg/SVGFEDiffuseLightingElement.cpp: 267 (WebCore::SVGFEDiffuseLightingElement::parseAttribute): 268 * svg/SVGFEDiffuseLightingElement.h: 269 (SVGFEDiffuseLightingElement): 270 * svg/SVGFEDisplacementMapElement.cpp: 271 (WebCore::SVGFEDisplacementMapElement::parseAttribute): 272 * svg/SVGFEDisplacementMapElement.h: 273 (SVGFEDisplacementMapElement): 274 * svg/SVGFEDropShadowElement.cpp: 275 (WebCore::SVGFEDropShadowElement::parseAttribute): 276 * svg/SVGFEDropShadowElement.h: 277 (SVGFEDropShadowElement): 278 * svg/SVGFEGaussianBlurElement.cpp: 279 (WebCore::SVGFEGaussianBlurElement::parseAttribute): 280 * svg/SVGFEGaussianBlurElement.h: 281 (SVGFEGaussianBlurElement): 282 * svg/SVGFEImageElement.cpp: 283 (WebCore::SVGFEImageElement::parseAttribute): 284 * svg/SVGFEImageElement.h: 285 (SVGFEImageElement): 286 * svg/SVGFELightElement.cpp: 287 (WebCore::SVGFELightElement::parseAttribute): 288 * svg/SVGFELightElement.h: 289 (SVGFELightElement): 290 * svg/SVGFEMergeNodeElement.cpp: 291 (WebCore::SVGFEMergeNodeElement::parseAttribute): 292 * svg/SVGFEMergeNodeElement.h: 293 (SVGFEMergeNodeElement): 294 * svg/SVGFEMorphologyElement.cpp: 295 (WebCore::SVGFEMorphologyElement::parseAttribute): 296 * svg/SVGFEMorphologyElement.h: 297 (SVGFEMorphologyElement): 298 * svg/SVGFEOffsetElement.cpp: 299 (WebCore::SVGFEOffsetElement::parseAttribute): 300 * svg/SVGFEOffsetElement.h: 301 (SVGFEOffsetElement): 302 * svg/SVGFESpecularLightingElement.cpp: 303 (WebCore::SVGFESpecularLightingElement::parseAttribute): 304 * svg/SVGFESpecularLightingElement.h: 305 (SVGFESpecularLightingElement): 306 * svg/SVGFETileElement.cpp: 307 (WebCore::SVGFETileElement::parseAttribute): 308 * svg/SVGFETileElement.h: 309 (SVGFETileElement): 310 * svg/SVGFETurbulenceElement.cpp: 311 (WebCore::SVGFETurbulenceElement::parseAttribute): 312 * svg/SVGFETurbulenceElement.h: 313 (SVGFETurbulenceElement): 314 * svg/SVGFilterElement.cpp: 315 (WebCore::SVGFilterElement::parseAttribute): 316 * svg/SVGFilterElement.h: 317 (SVGFilterElement): 318 * svg/SVGFilterPrimitiveStandardAttributes.cpp: 319 (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): 320 * svg/SVGFilterPrimitiveStandardAttributes.h: 321 (SVGFilterPrimitiveStandardAttributes): 322 * svg/SVGFitToViewBox.h: 323 (WebCore::SVGFitToViewBox::parseAttribute): 324 * svg/SVGFontFaceElement.cpp: 325 (WebCore::SVGFontFaceElement::parseAttribute): 326 * svg/SVGFontFaceElement.h: 327 (SVGFontFaceElement): 328 * svg/SVGFontFaceUriElement.cpp: 329 (WebCore::SVGFontFaceUriElement::parseAttribute): 330 * svg/SVGFontFaceUriElement.h: 331 (SVGFontFaceUriElement): 332 * svg/SVGForeignObjectElement.cpp: 333 (WebCore::SVGForeignObjectElement::parseAttribute): 334 * svg/SVGForeignObjectElement.h: 335 (SVGForeignObjectElement): 336 * svg/SVGGElement.cpp: 337 (WebCore::SVGGElement::parseAttribute): 338 * svg/SVGGElement.h: 339 (SVGGElement): 340 * svg/SVGGlyphElement.cpp: 341 (WebCore::SVGGlyphElement::parseAttribute): 342 * svg/SVGGlyphElement.h: 343 (SVGGlyphElement): 344 * svg/SVGGlyphRefElement.cpp: 345 (WebCore::SVGGlyphRefElement::parseAttribute): 346 * svg/SVGGlyphRefElement.h: 347 * svg/SVGGradientElement.cpp: 348 (WebCore::SVGGradientElement::parseAttribute): 349 * svg/SVGGradientElement.h: 350 * svg/SVGImageElement.cpp: 351 (WebCore::SVGImageElement::parseAttribute): 352 * svg/SVGImageElement.h: 353 (SVGImageElement): 354 * svg/SVGLangSpace.cpp: 355 (WebCore::SVGLangSpace::parseAttribute): 356 * svg/SVGLangSpace.h: 357 (SVGLangSpace): 358 * svg/SVGLineElement.cpp: 359 (WebCore::SVGLineElement::parseAttribute): 360 * svg/SVGLineElement.h: 361 (SVGLineElement): 362 * svg/SVGLinearGradientElement.cpp: 363 (WebCore::SVGLinearGradientElement::parseAttribute): 364 * svg/SVGLinearGradientElement.h: 365 (SVGLinearGradientElement): 366 * svg/SVGMPathElement.cpp: 367 (WebCore::SVGMPathElement::parseAttribute): 368 * svg/SVGMPathElement.h: 369 (SVGMPathElement): 370 * svg/SVGMarkerElement.cpp: 371 (WebCore::SVGMarkerElement::parseAttribute): 372 * svg/SVGMarkerElement.h: 373 (SVGMarkerElement): 374 * svg/SVGMaskElement.cpp: 375 (WebCore::SVGMaskElement::parseAttribute): 376 * svg/SVGMaskElement.h: 377 (SVGMaskElement): 378 * svg/SVGPathElement.cpp: 379 (WebCore::SVGPathElement::parseAttribute): 380 * svg/SVGPathElement.h: 381 (SVGPathElement): 382 * svg/SVGPatternElement.cpp: 383 (WebCore::SVGPatternElement::parseAttribute): 384 * svg/SVGPatternElement.h: 385 (SVGPatternElement): 386 * svg/SVGPolyElement.cpp: 387 (WebCore::SVGPolyElement::parseAttribute): 388 * svg/SVGPolyElement.h: 389 (SVGPolyElement): 390 * svg/SVGRadialGradientElement.cpp: 391 (WebCore::SVGRadialGradientElement::parseAttribute): 392 * svg/SVGRadialGradientElement.h: 393 (SVGRadialGradientElement): 394 * svg/SVGRectElement.cpp: 395 (WebCore::SVGRectElement::parseAttribute): 396 * svg/SVGRectElement.h: 397 (SVGRectElement): 398 * svg/SVGSVGElement.cpp: 399 (WebCore::SVGSVGElement::parseAttribute): 400 * svg/SVGSVGElement.h: 401 (SVGSVGElement): 402 * svg/SVGScriptElement.cpp: 403 (WebCore::SVGScriptElement::parseAttribute): 404 * svg/SVGScriptElement.h: 405 (SVGScriptElement): 406 * svg/SVGStopElement.cpp: 407 (WebCore::SVGStopElement::parseAttribute): 408 * svg/SVGStopElement.h: 409 (SVGStopElement): 410 * svg/SVGStyleElement.cpp: 411 (WebCore::SVGStyleElement::parseAttribute): 412 * svg/SVGStyleElement.h: 413 (SVGStyleElement): 414 * svg/SVGStyledElement.cpp: 415 (WebCore::SVGStyledElement::parseAttribute): 416 * svg/SVGStyledElement.h: 417 (SVGStyledElement): 418 * svg/SVGStyledTransformableElement.cpp: 419 (WebCore::SVGStyledTransformableElement::parseAttribute): 420 * svg/SVGStyledTransformableElement.h: 421 (SVGStyledTransformableElement): 422 * svg/SVGSymbolElement.cpp: 423 (WebCore::SVGSymbolElement::parseAttribute): 424 * svg/SVGSymbolElement.h: 425 (SVGSymbolElement): 426 * svg/SVGTRefElement.cpp: 427 (WebCore::SVGTRefElement::parseAttribute): 428 * svg/SVGTRefElement.h: 429 (SVGTRefElement): 430 * svg/SVGTests.cpp: 431 (WebCore::SVGTests::parseAttribute): 432 * svg/SVGTests.h: 433 (SVGTests): 434 * svg/SVGTextContentElement.cpp: 435 (WebCore::SVGTextContentElement::parseAttribute): 436 * svg/SVGTextContentElement.h: 437 (SVGTextContentElement): 438 * svg/SVGTextElement.cpp: 439 (WebCore::SVGTextElement::parseAttribute): 440 * svg/SVGTextElement.h: 441 (SVGTextElement): 442 * svg/SVGTextPathElement.cpp: 443 (WebCore::SVGTextPathElement::parseAttribute): 444 * svg/SVGTextPathElement.h: 445 * svg/SVGTextPositioningElement.cpp: 446 (WebCore::SVGTextPositioningElement::parseAttribute): 447 * svg/SVGTextPositioningElement.h: 448 (SVGTextPositioningElement): 449 * svg/SVGURIReference.cpp: 450 (WebCore::SVGURIReference::parseAttribute): 451 * svg/SVGURIReference.h: 452 (SVGURIReference): 453 * svg/SVGUseElement.cpp: 454 (WebCore::SVGUseElement::parseAttribute): 455 * svg/SVGUseElement.h: 456 (SVGUseElement): 457 * svg/SVGViewElement.cpp: 458 (WebCore::SVGViewElement::parseAttribute): 459 * svg/SVGViewElement.h: 460 (SVGViewElement): 461 * svg/SVGZoomAndPan.h: 462 (WebCore::SVGZoomAndPan::parseAttribute): 463 * svg/animation/SVGSMILElement.cpp: 464 (WebCore::SVGSMILElement::parseAttribute): 465 * svg/animation/SVGSMILElement.h: 466 (SVGSMILElement): 467 1 468 2012-11-18 Andreas Kling <akling@apple.com> 2 469 -
trunk/Source/WebCore/bindings/js/ScriptEventListener.cpp
r129105 r135069 53 53 } 54 54 55 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node* node, const Attribute& attribute)55 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node* node, const QualifiedName& name, const AtomicString& value) 56 56 { 57 57 ASSERT(node); 58 if ( attribute.isNull())58 if (value.isNull()) 59 59 return 0; 60 60 … … 72 72 } 73 73 74 return JSLazyEventListener::create( attribute.localName().string(), eventParameterName(node->isSVGElement()), attribute.value(), node, sourceURL, position, 0, mainThreadNormalWorld());74 return JSLazyEventListener::create(name.localName().string(), eventParameterName(node->isSVGElement()), value, node, sourceURL, position, 0, mainThreadNormalWorld()); 75 75 } 76 76 77 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Frame* frame, const Attribute& attribute)77 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Frame* frame, const QualifiedName& name, const AtomicString& value) 78 78 { 79 79 if (!frame) 80 80 return 0; 81 81 82 if ( attribute.isNull())82 if (value.isNull()) 83 83 return 0; 84 84 … … 90 90 String sourceURL = frame->document()->url().string(); 91 91 JSObject* wrapper = toJSDOMWindow(frame, mainThreadNormalWorld()); 92 return JSLazyEventListener::create( attribute.localName().string(), eventParameterName(frame->document()->isSVGDocument()), attribute.value(), 0, sourceURL, position, wrapper, mainThreadNormalWorld());92 return JSLazyEventListener::create(name.localName().string(), eventParameterName(frame->document()->isSVGDocument()), value, 0, sourceURL, position, wrapper, mainThreadNormalWorld()); 93 93 } 94 94 -
trunk/Source/WebCore/bindings/js/ScriptEventListener.h
r129105 r135069 44 44 class Node; 45 45 46 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node*, const Attribute&);47 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Frame*, const Attribute&);46 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Node*, const QualifiedName&, const AtomicString& value); 47 PassRefPtr<JSLazyEventListener> createAttributeEventListener(Frame*, const QualifiedName&, const AtomicString& value); 48 48 String eventListenerHandlerBody(Document*, EventListener*); 49 49 bool eventListenerHandlerLocation(Document*, EventListener*, String& sourceName, String& scriptId, int& lineNumber); -
trunk/Source/WebCore/bindings/v8/ScriptEventListener.cpp
r129105 r135069 32 32 #include "ScriptEventListener.h" 33 33 34 #include "Attribute.h"35 34 #include "Document.h" 36 35 #include "EventListener.h" … … 50 49 } 51 50 52 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Node* node, const Attribute& attribute)51 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Node* node, const QualifiedName& name, const AtomicString& value) 53 52 { 54 53 ASSERT(node); 55 if ( attribute.isNull())54 if (value.isNull()) 56 55 return 0; 57 56 … … 68 67 } 69 68 70 return V8LazyEventListener::create( attribute.localName().string(), eventParameterName(node->isSVGElement()), attribute.value(), sourceURL, position, node, WorldContextHandle(UseMainWorld));69 return V8LazyEventListener::create(name.localName().string(), eventParameterName(node->isSVGElement()), value, sourceURL, position, node, WorldContextHandle(UseMainWorld)); 71 70 } 72 71 73 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame* frame, const Attribute& attribute)72 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame* frame, const QualifiedName& name, const AtomicString& value) 74 73 { 75 74 if (!frame) 76 75 return 0; 77 76 78 if ( attribute.isNull())77 if (value.isNull()) 79 78 return 0; 80 79 … … 86 85 String sourceURL = frame->document()->url().string(); 87 86 88 return V8LazyEventListener::create( attribute.localName().string(), eventParameterName(frame->document()->isSVGDocument()), attribute.value(), sourceURL, position, 0, WorldContextHandle(UseMainWorld));87 return V8LazyEventListener::create(name.localName().string(), eventParameterName(frame->document()->isSVGDocument()), value, sourceURL, position, 0, WorldContextHandle(UseMainWorld)); 89 88 } 90 89 -
trunk/Source/WebCore/bindings/v8/ScriptEventListener.h
r129105 r135069 38 38 namespace WebCore { 39 39 40 class Attribute;41 40 class Document; 42 41 class EventListener; 43 42 class Frame; 44 43 class Node; 44 class QualifiedName; 45 45 46 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Node*, const Attribute&);47 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame*, const Attribute&);46 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Node*, const QualifiedName&, const AtomicString& value); 47 PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame*, const QualifiedName&, const AtomicString& value); 48 48 String eventListenerHandlerBody(Document*, EventListener*); 49 49 bool eventListenerHandlerLocation(Document*, EventListener*, String& sourceName, String& scriptId, int& lineNumber); -
trunk/Source/WebCore/dom/Element.cpp
r135021 r135069 759 759 void Element::attributeChanged(const QualifiedName& name, const AtomicString& newValue) 760 760 { 761 parseAttribute( Attribute(name, newValue));761 parseAttribute(name, newValue); 762 762 763 763 document()->incDOMTreeVersion(); … … 790 790 } 791 791 792 void Element::parseAttribute(const Attribute& attribute)793 { 794 if ( attribute.name()== classAttr)795 classAttributeChanged( attribute.value());792 void Element::parseAttribute(const QualifiedName& name, const AtomicString& value) 793 { 794 if (name == classAttr) 795 classAttributeChanged(value); 796 796 } 797 797 -
trunk/Source/WebCore/dom/Element.h
r135021 r135069 247 247 // This method is called whenever an attribute is added, changed or removed. 248 248 virtual void attributeChanged(const QualifiedName&, const AtomicString&); 249 virtual void parseAttribute(const Attribute&);249 virtual void parseAttribute(const QualifiedName&, const AtomicString&); 250 250 251 251 // Only called by the parser immediately after element construction. -
trunk/Source/WebCore/dom/StyledElement.cpp
r135051 r135069 221 221 } 222 222 223 void StyledElement::parseAttribute(const Attribute& attribute)224 { 225 if ( attribute.name()== styleAttr)226 styleAttributeChanged( attribute.value());223 void StyledElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 224 { 225 if (name == styleAttr) 226 styleAttributeChanged(value); 227 227 else 228 Element::parseAttribute( attribute);228 Element::parseAttribute(name, value); 229 229 } 230 230 -
trunk/Source/WebCore/dom/StyledElement.h
r135021 r135069 61 61 62 62 virtual void attributeChanged(const QualifiedName&, const AtomicString&) OVERRIDE; 63 virtual void parseAttribute(const Attribute&) OVERRIDE;63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 64 64 65 65 virtual bool isPresentationAttribute(const QualifiedName&) const { return false; } -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r134883 r135069 215 215 } 216 216 217 void HTMLAnchorElement::parseAttribute(const Attribute& attribute)218 { 219 if ( attribute.name()== hrefAttr) {217 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 218 { 219 if (name == hrefAttr) { 220 220 bool wasLink = isLink(); 221 setIsLink(! attribute.isNull());221 setIsLink(!value.isNull()); 222 222 if (wasLink != isLink()) { 223 223 setNeedsStyleRecalc(); … … 225 225 } 226 226 if (isLink()) { 227 String parsedURL = stripLeadingAndTrailingHTMLSpaces( attribute.value());227 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value); 228 228 if (document()->isDNSPrefetchEnabled()) { 229 229 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "https") || parsedURL.startsWith("//")) … … 232 232 } 233 233 invalidateCachedVisitedLinkHash(); 234 } else if ( attribute.name() == nameAttr || attribute.name()== titleAttr) {234 } else if (name == nameAttr || name == titleAttr) { 235 235 // Do nothing. 236 } else if ( attribute.name()== relAttr)237 setRel( attribute.value());236 } else if (name == relAttr) 237 setRel(value); 238 238 else 239 HTMLElement::parseAttribute( attribute);239 HTMLElement::parseAttribute(name, value); 240 240 } 241 241 -
trunk/Source/WebCore/html/HTMLAnchorElement.h
r124538 r135069 106 106 HTMLAnchorElement(const QualifiedName&, Document*); 107 107 108 virtual void parseAttribute(const Attribute&) OVERRIDE;108 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 109 109 110 110 private: -
trunk/Source/WebCore/html/HTMLAppletElement.cpp
r124954 r135069 52 52 } 53 53 54 void HTMLAppletElement::parseAttribute(const Attribute& attribute)54 void HTMLAppletElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 55 55 { 56 if ( attribute.name()== altAttr57 || attribute.name()== archiveAttr58 || attribute.name()== codeAttr59 || attribute.name()== codebaseAttr60 || attribute.name()== mayscriptAttr61 || attribute.name()== objectAttr) {56 if (name == altAttr 57 || name == archiveAttr 58 || name == codeAttr 59 || name == codebaseAttr 60 || name == mayscriptAttr 61 || name == objectAttr) { 62 62 // Do nothing. 63 63 return; 64 64 } 65 65 66 HTMLPlugInImageElement::parseAttribute( attribute);66 HTMLPlugInImageElement::parseAttribute(name, value); 67 67 } 68 68 -
trunk/Source/WebCore/html/HTMLAppletElement.h
r124954 r135069 35 35 HTMLAppletElement(const QualifiedName&, Document*, bool createdByParser); 36 36 37 virtual void parseAttribute(const Attribute&) OVERRIDE;37 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 38 38 39 39 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; -
trunk/Source/WebCore/html/HTMLAreaElement.cpp
r117195 r135069 54 54 } 55 55 56 void HTMLAreaElement::parseAttribute(const Attribute& attribute)57 { 58 if ( attribute.name()== shapeAttr) {59 if (equalIgnoringCase( attribute.value(), "default"))56 void HTMLAreaElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 57 { 58 if (name == shapeAttr) { 59 if (equalIgnoringCase(value, "default")) 60 60 m_shape = Default; 61 else if (equalIgnoringCase( attribute.value(), "circle"))61 else if (equalIgnoringCase(value, "circle")) 62 62 m_shape = Circle; 63 else if (equalIgnoringCase( attribute.value(), "poly"))63 else if (equalIgnoringCase(value, "poly")) 64 64 m_shape = Poly; 65 else if (equalIgnoringCase( attribute.value(), "rect"))65 else if (equalIgnoringCase(value, "rect")) 66 66 m_shape = Rect; 67 67 invalidateCachedRegion(); 68 } else if ( attribute.name()== coordsAttr) {69 m_coords = newCoordsArray( attribute.value().string(), m_coordsLen);68 } else if (name == coordsAttr) { 69 m_coords = newCoordsArray(value.string(), m_coordsLen); 70 70 invalidateCachedRegion(); 71 } else if ( attribute.name() == altAttr || attribute.name()== accesskeyAttr) {71 } else if (name == altAttr || name == accesskeyAttr) { 72 72 // Do nothing. 73 73 } else 74 HTMLAnchorElement::parseAttribute( attribute);74 HTMLAnchorElement::parseAttribute(name, value); 75 75 } 76 76 -
trunk/Source/WebCore/html/HTMLAreaElement.h
r133779 r135069 51 51 HTMLAreaElement(const QualifiedName&, Document*); 52 52 53 virtual void parseAttribute(const Attribute&) OVERRIDE;53 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 54 54 virtual bool supportsFocus() const; 55 55 virtual String target() const; -
trunk/Source/WebCore/html/HTMLBaseElement.cpp
r132071 r135069 45 45 } 46 46 47 void HTMLBaseElement::parseAttribute(const Attribute& attribute)47 void HTMLBaseElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 48 48 { 49 if ( attribute.name() == hrefAttr || attribute.name()== targetAttr)49 if (name == hrefAttr || name == targetAttr) 50 50 document()->processBaseElement(); 51 51 else 52 HTMLElement::parseAttribute( attribute);52 HTMLElement::parseAttribute(name, value); 53 53 } 54 54 -
trunk/Source/WebCore/html/HTMLBaseElement.h
r132071 r135069 40 40 virtual String target() const; 41 41 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; 42 virtual void parseAttribute(const Attribute&) OVERRIDE;42 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 43 43 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 44 44 virtual void removedFrom(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLBodyElement.cpp
r134322 r135069 92 92 } 93 93 94 void HTMLBodyElement::parseAttribute(const Attribute& attribute)95 { 96 if ( attribute.name() == vlinkAttr || attribute.name() == alinkAttr || attribute.name()== linkAttr) {97 if ( attribute.isNull()) {98 if ( attribute.name()== linkAttr)94 void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 95 { 96 if (name == vlinkAttr || name == alinkAttr || name == linkAttr) { 97 if (value.isNull()) { 98 if (name == linkAttr) 99 99 document()->resetLinkColor(); 100 else if ( attribute.name()== vlinkAttr)100 else if (name == vlinkAttr) 101 101 document()->resetVisitedLinkColor(); 102 102 else … … 104 104 } else { 105 105 RGBA32 color; 106 if (CSSParser::parseColor(color, attribute.value(), !document()->inQuirksMode())) {107 if ( attribute.name()== linkAttr)106 if (CSSParser::parseColor(color, value, !document()->inQuirksMode())) { 107 if (name == linkAttr) 108 108 document()->setLinkColor(color); 109 else if ( attribute.name()== vlinkAttr)109 else if (name == vlinkAttr) 110 110 document()->setVisitedLinkColor(color); 111 111 else … … 115 115 116 116 setNeedsStyleRecalc(); 117 } else if ( attribute.name()== onloadAttr)118 document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), attribute));119 else if ( attribute.name()== onbeforeunloadAttr)120 document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), attribute));121 else if ( attribute.name()== onunloadAttr)122 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attribute));123 else if ( attribute.name()== onpagehideAttr)124 document()->setWindowAttributeEventListener(eventNames().pagehideEvent, createAttributeEventListener(document()->frame(), attribute));125 else if ( attribute.name()== onpageshowAttr)126 document()->setWindowAttributeEventListener(eventNames().pageshowEvent, createAttributeEventListener(document()->frame(), attribute));127 else if ( attribute.name()== onpopstateAttr)128 document()->setWindowAttributeEventListener(eventNames().popstateEvent, createAttributeEventListener(document()->frame(), attribute));129 else if ( attribute.name()== onblurAttr)130 document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), attribute));131 else if ( attribute.name()== onfocusAttr)132 document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), attribute));117 } else if (name == onloadAttr) 118 document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), name, value)); 119 else if (name == onbeforeunloadAttr) 120 document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), name, value)); 121 else if (name == onunloadAttr) 122 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), name, value)); 123 else if (name == onpagehideAttr) 124 document()->setWindowAttributeEventListener(eventNames().pagehideEvent, createAttributeEventListener(document()->frame(), name, value)); 125 else if (name == onpageshowAttr) 126 document()->setWindowAttributeEventListener(eventNames().pageshowEvent, createAttributeEventListener(document()->frame(), name, value)); 127 else if (name == onpopstateAttr) 128 document()->setWindowAttributeEventListener(eventNames().popstateEvent, createAttributeEventListener(document()->frame(), name, value)); 129 else if (name == onblurAttr) 130 document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), name, value)); 131 else if (name == onfocusAttr) 132 document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), name, value)); 133 133 #if ENABLE(ORIENTATION_EVENTS) 134 else if ( attribute.name()== onorientationchangeAttr)135 document()->setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()->frame(), attribute));134 else if (name == onorientationchangeAttr) 135 document()->setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()->frame(), name, value)); 136 136 #endif 137 else if ( attribute.name()== onhashchangeAttr)138 document()->setWindowAttributeEventListener(eventNames().hashchangeEvent, createAttributeEventListener(document()->frame(), attribute));139 else if ( attribute.name()== onresizeAttr)140 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attribute));141 else if ( attribute.name()== onscrollAttr)142 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attribute));143 else if ( attribute.name()== onselectionchangeAttr)144 document()->setAttributeEventListener(eventNames().selectionchangeEvent, createAttributeEventListener(document()->frame(), attribute));145 else if ( attribute.name()== onstorageAttr)146 document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), attribute));147 else if ( attribute.name()== ononlineAttr)148 document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), attribute));149 else if ( attribute.name()== onofflineAttr)150 document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), attribute));137 else if (name == onhashchangeAttr) 138 document()->setWindowAttributeEventListener(eventNames().hashchangeEvent, createAttributeEventListener(document()->frame(), name, value)); 139 else if (name == onresizeAttr) 140 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), name, value)); 141 else if (name == onscrollAttr) 142 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), name, value)); 143 else if (name == onselectionchangeAttr) 144 document()->setAttributeEventListener(eventNames().selectionchangeEvent, createAttributeEventListener(document()->frame(), name, value)); 145 else if (name == onstorageAttr) 146 document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), name, value)); 147 else if (name == ononlineAttr) 148 document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), name, value)); 149 else if (name == onofflineAttr) 150 document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), name, value)); 151 151 else 152 HTMLElement::parseAttribute( attribute);152 HTMLElement::parseAttribute(name, value); 153 153 } 154 154 -
trunk/Source/WebCore/html/HTMLBodyElement.h
r134322 r135069 71 71 HTMLBodyElement(const QualifiedName&, Document*); 72 72 73 virtual void parseAttribute(const Attribute&) OVERRIDE;73 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 74 74 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 75 75 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLButtonElement.cpp
r133976 r135069 100 100 } 101 101 102 void HTMLButtonElement::parseAttribute(const Attribute& attribute)103 { 104 if ( attribute.name()== typeAttr) {105 if (equalIgnoringCase( attribute.value(), "reset"))102 void HTMLButtonElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 103 { 104 if (name == typeAttr) { 105 if (equalIgnoringCase(value, "reset")) 106 106 m_type = RESET; 107 else if (equalIgnoringCase( attribute.value(), "button"))107 else if (equalIgnoringCase(value, "button")) 108 108 m_type = BUTTON; 109 109 else … … 111 111 setNeedsWillValidateCheck(); 112 112 } else 113 HTMLFormControlElement::parseAttribute( attribute);113 HTMLFormControlElement::parseAttribute(name, value); 114 114 } 115 115 -
trunk/Source/WebCore/html/HTMLButtonElement.h
r126248 r135069 50 50 virtual void willAddAuthorShadowRoot() OVERRIDE; 51 51 52 virtual void parseAttribute(const Attribute&) OVERRIDE;52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 53 53 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 54 54 virtual void defaultEventHandler(Event*); -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r134100 r135069 112 112 } 113 113 114 void HTMLCanvasElement::parseAttribute(const Attribute& attribute)115 { 116 if ( attribute.name() == widthAttr || attribute.name()== heightAttr)114 void HTMLCanvasElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 115 { 116 if (name == widthAttr || name == heightAttr) 117 117 reset(); 118 HTMLElement::parseAttribute( attribute);118 HTMLElement::parseAttribute(name, value); 119 119 } 120 120 -
trunk/Source/WebCore/html/HTMLCanvasElement.h
r134099 r135069 144 144 HTMLCanvasElement(const QualifiedName&, Document*); 145 145 146 virtual void parseAttribute(const Attribute&) OVERRIDE;146 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 147 147 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 148 148 virtual void attach(); -
trunk/Source/WebCore/html/HTMLDetailsElement.cpp
r133976 r135069 127 127 } 128 128 129 void HTMLDetailsElement::parseAttribute(const Attribute& attribute)129 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 130 130 { 131 if ( attribute.name()== openAttr) {131 if (name == openAttr) { 132 132 bool oldValue = m_isOpen; 133 m_isOpen = !attribute.isNull();133 m_isOpen = !value.isNull(); 134 134 if (oldValue != m_isOpen) 135 135 reattachIfAttached(); 136 136 } else 137 HTMLElement::parseAttribute( attribute);137 HTMLElement::parseAttribute(name, value); 138 138 } 139 139 -
trunk/Source/WebCore/html/HTMLDetailsElement.h
r117195 r135069 38 38 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 39 39 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE; 40 virtual void parseAttribute(const Attribute&) OVERRIDE;40 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 41 41 42 42 void createShadowSubtree(); -
trunk/Source/WebCore/html/HTMLElement.cpp
r134440 r135069 212 212 } 213 213 214 void HTMLElement::parseAttribute(const Attribute& attribute)215 { 216 if (isIdAttributeName( attribute.name()) || attribute.name() == classAttr || attribute.name()== styleAttr)217 return StyledElement::parseAttribute( attribute);218 219 if ( attribute.name()== dirAttr)220 dirAttributeChanged( attribute);221 else if ( attribute.name()== tabindexAttr) {214 void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 215 { 216 if (isIdAttributeName(name) || name == classAttr || name == styleAttr) 217 return StyledElement::parseAttribute(name, value); 218 219 if (name == dirAttr) 220 dirAttributeChanged(value); 221 else if (name == tabindexAttr) { 222 222 int tabindex = 0; 223 if ( attribute.isEmpty())223 if (value.isEmpty()) 224 224 clearTabIndexExplicitly(); 225 else if (parseHTMLInteger( attribute.value(), tabindex)) {225 else if (parseHTMLInteger(value, tabindex)) { 226 226 // Clamp tabindex to the range of 'short' to match Firefox's behavior. 227 227 setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short>::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max())))); 228 228 } 229 229 #if ENABLE(MICRODATA) 230 } else if ( attribute.name()== itempropAttr) {231 setItemProp( attribute.value());232 } else if ( attribute.name()== itemrefAttr) {233 setItemRef( attribute.value());234 } else if ( attribute.name()== itemtypeAttr) {235 setItemType( attribute.value());230 } else if (name == itempropAttr) { 231 setItemProp(value); 232 } else if (name == itemrefAttr) { 233 setItemRef(value); 234 } else if (name == itemtypeAttr) { 235 setItemType(value); 236 236 #endif 237 237 } 238 238 // standard events 239 else if ( attribute.name()== onclickAttr) {240 setAttributeEventListener(eventNames().clickEvent, createAttributeEventListener(this, attribute));241 } else if ( attribute.name()== oncontextmenuAttr) {242 setAttributeEventListener(eventNames().contextmenuEvent, createAttributeEventListener(this, attribute));243 } else if ( attribute.name()== ondblclickAttr) {244 setAttributeEventListener(eventNames().dblclickEvent, createAttributeEventListener(this, attribute));245 } else if ( attribute.name()== onmousedownAttr) {246 setAttributeEventListener(eventNames().mousedownEvent, createAttributeEventListener(this, attribute));247 } else if ( attribute.name()== onmousemoveAttr) {248 setAttributeEventListener(eventNames().mousemoveEvent, createAttributeEventListener(this, attribute));249 } else if ( attribute.name()== onmouseoutAttr) {250 setAttributeEventListener(eventNames().mouseoutEvent, createAttributeEventListener(this, attribute));251 } else if ( attribute.name()== onmouseoverAttr) {252 setAttributeEventListener(eventNames().mouseoverEvent, createAttributeEventListener(this, attribute));253 } else if ( attribute.name()== onmouseupAttr) {254 setAttributeEventListener(eventNames().mouseupEvent, createAttributeEventListener(this, attribute));255 } else if ( attribute.name()== onmousewheelAttr) {256 setAttributeEventListener(eventNames().mousewheelEvent, createAttributeEventListener(this, attribute));257 } else if ( attribute.name()== onfocusAttr) {258 setAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(this, attribute));259 } else if ( attribute.name()== onfocusinAttr) {260 setAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(this, attribute));261 } else if ( attribute.name()== onfocusoutAttr) {262 setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, attribute));263 } else if ( attribute.name()== onblurAttr) {264 setAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(this, attribute));265 } else if ( attribute.name()== onkeydownAttr) {266 setAttributeEventListener(eventNames().keydownEvent, createAttributeEventListener(this, attribute));267 } else if ( attribute.name()== onkeypressAttr) {268 setAttributeEventListener(eventNames().keypressEvent, createAttributeEventListener(this, attribute));269 } else if ( attribute.name()== onkeyupAttr) {270 setAttributeEventListener(eventNames().keyupEvent, createAttributeEventListener(this, attribute));271 } else if ( attribute.name()== onscrollAttr) {272 setAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(this, attribute));273 } else if ( attribute.name()== onbeforecutAttr) {274 setAttributeEventListener(eventNames().beforecutEvent, createAttributeEventListener(this, attribute));275 } else if ( attribute.name()== oncutAttr) {276 setAttributeEventListener(eventNames().cutEvent, createAttributeEventListener(this, attribute));277 } else if ( attribute.name()== onbeforecopyAttr) {278 setAttributeEventListener(eventNames().beforecopyEvent, createAttributeEventListener(this, attribute));279 } else if ( attribute.name()== oncopyAttr) {280 setAttributeEventListener(eventNames().copyEvent, createAttributeEventListener(this, attribute));281 } else if ( attribute.name()== onbeforepasteAttr) {282 setAttributeEventListener(eventNames().beforepasteEvent, createAttributeEventListener(this, attribute));283 } else if ( attribute.name()== onpasteAttr) {284 setAttributeEventListener(eventNames().pasteEvent, createAttributeEventListener(this, attribute));285 } else if ( attribute.name()== ondragenterAttr) {286 setAttributeEventListener(eventNames().dragenterEvent, createAttributeEventListener(this, attribute));287 } else if ( attribute.name()== ondragoverAttr) {288 setAttributeEventListener(eventNames().dragoverEvent, createAttributeEventListener(this, attribute));289 } else if ( attribute.name()== ondragleaveAttr) {290 setAttributeEventListener(eventNames().dragleaveEvent, createAttributeEventListener(this, attribute));291 } else if ( attribute.name()== ondropAttr) {292 setAttributeEventListener(eventNames().dropEvent, createAttributeEventListener(this, attribute));293 } else if ( attribute.name()== ondragstartAttr) {294 setAttributeEventListener(eventNames().dragstartEvent, createAttributeEventListener(this, attribute));295 } else if ( attribute.name()== ondragAttr) {296 setAttributeEventListener(eventNames().dragEvent, createAttributeEventListener(this, attribute));297 } else if ( attribute.name()== ondragendAttr) {298 setAttributeEventListener(eventNames().dragendEvent, createAttributeEventListener(this, attribute));299 } else if ( attribute.name()== onselectstartAttr) {300 setAttributeEventListener(eventNames().selectstartEvent, createAttributeEventListener(this, attribute));301 } else if ( attribute.name()== onsubmitAttr) {302 setAttributeEventListener(eventNames().submitEvent, createAttributeEventListener(this, attribute));303 } else if ( attribute.name()== onerrorAttr) {304 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attribute));305 } else if ( attribute.name()== onwebkitanimationstartAttr) {306 setAttributeEventListener(eventNames().webkitAnimationStartEvent, createAttributeEventListener(this, attribute));307 } else if ( attribute.name()== onwebkitanimationiterationAttr) {308 setAttributeEventListener(eventNames().webkitAnimationIterationEvent, createAttributeEventListener(this, attribute));309 } else if ( attribute.name()== onwebkitanimationendAttr) {310 setAttributeEventListener(eventNames().webkitAnimationEndEvent, createAttributeEventListener(this, attribute));311 } else if ( attribute.name()== onwebkittransitionendAttr) {312 setAttributeEventListener(eventNames().webkitTransitionEndEvent, createAttributeEventListener(this, attribute));313 } else if ( attribute.name()== oninputAttr) {314 setAttributeEventListener(eventNames().inputEvent, createAttributeEventListener(this, attribute));315 } else if ( attribute.name()== oninvalidAttr) {316 setAttributeEventListener(eventNames().invalidEvent, createAttributeEventListener(this, attribute));317 } else if ( attribute.name()== ontouchstartAttr) {318 setAttributeEventListener(eventNames().touchstartEvent, createAttributeEventListener(this, attribute));319 } else if ( attribute.name()== ontouchmoveAttr) {320 setAttributeEventListener(eventNames().touchmoveEvent, createAttributeEventListener(this, attribute));321 } else if ( attribute.name()== ontouchendAttr) {322 setAttributeEventListener(eventNames().touchendEvent, createAttributeEventListener(this, attribute));323 } else if ( attribute.name()== ontouchcancelAttr) {324 setAttributeEventListener(eventNames().touchcancelEvent, createAttributeEventListener(this, attribute));239 else if (name == onclickAttr) { 240 setAttributeEventListener(eventNames().clickEvent, createAttributeEventListener(this, name, value)); 241 } else if (name == oncontextmenuAttr) { 242 setAttributeEventListener(eventNames().contextmenuEvent, createAttributeEventListener(this, name, value)); 243 } else if (name == ondblclickAttr) { 244 setAttributeEventListener(eventNames().dblclickEvent, createAttributeEventListener(this, name, value)); 245 } else if (name == onmousedownAttr) { 246 setAttributeEventListener(eventNames().mousedownEvent, createAttributeEventListener(this, name, value)); 247 } else if (name == onmousemoveAttr) { 248 setAttributeEventListener(eventNames().mousemoveEvent, createAttributeEventListener(this, name, value)); 249 } else if (name == onmouseoutAttr) { 250 setAttributeEventListener(eventNames().mouseoutEvent, createAttributeEventListener(this, name, value)); 251 } else if (name == onmouseoverAttr) { 252 setAttributeEventListener(eventNames().mouseoverEvent, createAttributeEventListener(this, name, value)); 253 } else if (name == onmouseupAttr) { 254 setAttributeEventListener(eventNames().mouseupEvent, createAttributeEventListener(this, name, value)); 255 } else if (name == onmousewheelAttr) { 256 setAttributeEventListener(eventNames().mousewheelEvent, createAttributeEventListener(this, name, value)); 257 } else if (name == onfocusAttr) { 258 setAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(this, name, value)); 259 } else if (name == onfocusinAttr) { 260 setAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(this, name, value)); 261 } else if (name == onfocusoutAttr) { 262 setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, name, value)); 263 } else if (name == onblurAttr) { 264 setAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(this, name, value)); 265 } else if (name == onkeydownAttr) { 266 setAttributeEventListener(eventNames().keydownEvent, createAttributeEventListener(this, name, value)); 267 } else if (name == onkeypressAttr) { 268 setAttributeEventListener(eventNames().keypressEvent, createAttributeEventListener(this, name, value)); 269 } else if (name == onkeyupAttr) { 270 setAttributeEventListener(eventNames().keyupEvent, createAttributeEventListener(this, name, value)); 271 } else if (name == onscrollAttr) { 272 setAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(this, name, value)); 273 } else if (name == onbeforecutAttr) { 274 setAttributeEventListener(eventNames().beforecutEvent, createAttributeEventListener(this, name, value)); 275 } else if (name == oncutAttr) { 276 setAttributeEventListener(eventNames().cutEvent, createAttributeEventListener(this, name, value)); 277 } else if (name == onbeforecopyAttr) { 278 setAttributeEventListener(eventNames().beforecopyEvent, createAttributeEventListener(this, name, value)); 279 } else if (name == oncopyAttr) { 280 setAttributeEventListener(eventNames().copyEvent, createAttributeEventListener(this, name, value)); 281 } else if (name == onbeforepasteAttr) { 282 setAttributeEventListener(eventNames().beforepasteEvent, createAttributeEventListener(this, name, value)); 283 } else if (name == onpasteAttr) { 284 setAttributeEventListener(eventNames().pasteEvent, createAttributeEventListener(this, name, value)); 285 } else if (name == ondragenterAttr) { 286 setAttributeEventListener(eventNames().dragenterEvent, createAttributeEventListener(this, name, value)); 287 } else if (name == ondragoverAttr) { 288 setAttributeEventListener(eventNames().dragoverEvent, createAttributeEventListener(this, name, value)); 289 } else if (name == ondragleaveAttr) { 290 setAttributeEventListener(eventNames().dragleaveEvent, createAttributeEventListener(this, name, value)); 291 } else if (name == ondropAttr) { 292 setAttributeEventListener(eventNames().dropEvent, createAttributeEventListener(this, name, value)); 293 } else if (name == ondragstartAttr) { 294 setAttributeEventListener(eventNames().dragstartEvent, createAttributeEventListener(this, name, value)); 295 } else if (name == ondragAttr) { 296 setAttributeEventListener(eventNames().dragEvent, createAttributeEventListener(this, name, value)); 297 } else if (name == ondragendAttr) { 298 setAttributeEventListener(eventNames().dragendEvent, createAttributeEventListener(this, name, value)); 299 } else if (name == onselectstartAttr) { 300 setAttributeEventListener(eventNames().selectstartEvent, createAttributeEventListener(this, name, value)); 301 } else if (name == onsubmitAttr) { 302 setAttributeEventListener(eventNames().submitEvent, createAttributeEventListener(this, name, value)); 303 } else if (name == onerrorAttr) { 304 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, name, value)); 305 } else if (name == onwebkitanimationstartAttr) { 306 setAttributeEventListener(eventNames().webkitAnimationStartEvent, createAttributeEventListener(this, name, value)); 307 } else if (name == onwebkitanimationiterationAttr) { 308 setAttributeEventListener(eventNames().webkitAnimationIterationEvent, createAttributeEventListener(this, name, value)); 309 } else if (name == onwebkitanimationendAttr) { 310 setAttributeEventListener(eventNames().webkitAnimationEndEvent, createAttributeEventListener(this, name, value)); 311 } else if (name == onwebkittransitionendAttr) { 312 setAttributeEventListener(eventNames().webkitTransitionEndEvent, createAttributeEventListener(this, name, value)); 313 } else if (name == oninputAttr) { 314 setAttributeEventListener(eventNames().inputEvent, createAttributeEventListener(this, name, value)); 315 } else if (name == oninvalidAttr) { 316 setAttributeEventListener(eventNames().invalidEvent, createAttributeEventListener(this, name, value)); 317 } else if (name == ontouchstartAttr) { 318 setAttributeEventListener(eventNames().touchstartEvent, createAttributeEventListener(this, name, value)); 319 } else if (name == ontouchmoveAttr) { 320 setAttributeEventListener(eventNames().touchmoveEvent, createAttributeEventListener(this, name, value)); 321 } else if (name == ontouchendAttr) { 322 setAttributeEventListener(eventNames().touchendEvent, createAttributeEventListener(this, name, value)); 323 } else if (name == ontouchcancelAttr) { 324 setAttributeEventListener(eventNames().touchcancelEvent, createAttributeEventListener(this, name, value)); 325 325 #if ENABLE(FULLSCREEN_API) 326 } else if ( attribute.name()== onwebkitfullscreenchangeAttr) {327 setAttributeEventListener(eventNames().webkitfullscreenchangeEvent, createAttributeEventListener(this, attribute));328 } else if ( attribute.name()== onwebkitfullscreenerrorAttr) {329 setAttributeEventListener(eventNames().webkitfullscreenerrorEvent, createAttributeEventListener(this, attribute));326 } else if (name == onwebkitfullscreenchangeAttr) { 327 setAttributeEventListener(eventNames().webkitfullscreenchangeEvent, createAttributeEventListener(this, name, value)); 328 } else if (name == onwebkitfullscreenerrorAttr) { 329 setAttributeEventListener(eventNames().webkitfullscreenerrorEvent, createAttributeEventListener(this, name, value)); 330 330 #endif 331 331 } … … 887 887 } 888 888 889 void HTMLElement::dirAttributeChanged(const At tribute& attribute)889 void HTMLElement::dirAttributeChanged(const AtomicString& value) 890 890 { 891 891 Element* parent = parentElement(); … … 894 894 toHTMLElement(parent)->adjustDirectionalityIfNeededAfterChildAttributeChanged(this); 895 895 896 if (equalIgnoringCase( attribute.value(), "auto"))896 if (equalIgnoringCase(value, "auto")) 897 897 calculateAndAdjustDirectionality(); 898 898 } -
trunk/Source/WebCore/html/HTMLElement.h
r134322 r135069 119 119 void applyBorderAttributeToStyle(const Attribute&, StylePropertySet*); 120 120 121 virtual void parseAttribute(const Attribute&) OVERRIDE;121 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 122 122 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 123 123 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; … … 138 138 PassRefPtr<DocumentFragment> textToFragment(const String&, ExceptionCode&); 139 139 140 void dirAttributeChanged(const At tribute&);140 void dirAttributeChanged(const AtomicString&); 141 141 void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child); 142 142 void adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, int childCountDelta); -
trunk/Source/WebCore/html/HTMLEmbedElement.cpp
r134322 r135069 93 93 } 94 94 95 void HTMLEmbedElement::parseAttribute(const Attribute& attribute)96 { 97 if ( attribute.name()== typeAttr) {98 m_serviceType = attribute.value().string().lower();95 void HTMLEmbedElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 96 { 97 if (name == typeAttr) { 98 m_serviceType = value.string().lower(); 99 99 size_t pos = m_serviceType.find(";"); 100 100 if (pos != notFound) 101 101 m_serviceType = m_serviceType.left(pos); 102 } else if ( attribute.name()== codeAttr)103 m_url = stripLeadingAndTrailingHTMLSpaces( attribute.value());104 else if ( attribute.name()== srcAttr) {105 m_url = stripLeadingAndTrailingHTMLSpaces( attribute.value());102 } else if (name == codeAttr) 103 m_url = stripLeadingAndTrailingHTMLSpaces(value); 104 else if (name == srcAttr) { 105 m_url = stripLeadingAndTrailingHTMLSpaces(value); 106 106 if (renderer() && isImageType()) { 107 107 if (!m_imageLoader) … … 110 110 } 111 111 } else 112 HTMLPlugInImageElement::parseAttribute( attribute);112 HTMLPlugInImageElement::parseAttribute(name, value); 113 113 } 114 114 -
trunk/Source/WebCore/html/HTMLEmbedElement.h
r134322 r135069 35 35 HTMLEmbedElement(const QualifiedName&, Document*, bool createdByParser); 36 36 37 virtual void parseAttribute(const Attribute&) OVERRIDE;37 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 38 38 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 39 39 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLFormControlElement.cpp
r134883 r135069 121 121 } 122 122 123 void HTMLFormControlElement::parseAttribute(const Attribute& attribute)124 { 125 if ( attribute.name()== formAttr)123 void HTMLFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 124 { 125 if (name == formAttr) 126 126 formAttributeChanged(); 127 else if ( attribute.name()== disabledAttr) {127 else if (name == disabledAttr) { 128 128 bool oldDisabled = m_disabled; 129 m_disabled = ! attribute.isNull();129 m_disabled = !value.isNull(); 130 130 if (oldDisabled != m_disabled) 131 131 disabledAttributeChanged(); 132 } else if ( attribute.name()== readonlyAttr) {132 } else if (name == readonlyAttr) { 133 133 bool oldReadOnly = m_readOnly; 134 m_readOnly = ! attribute.isNull();134 m_readOnly = !value.isNull(); 135 135 if (oldReadOnly != m_readOnly) { 136 136 setNeedsWillValidateCheck(); … … 139 139 renderer()->theme()->stateChanged(renderer(), ReadOnlyState); 140 140 } 141 } else if ( attribute.name()== requiredAttr) {141 } else if (name == requiredAttr) { 142 142 bool oldRequired = m_required; 143 m_required = ! attribute.isNull();143 m_required = !value.isNull(); 144 144 if (oldRequired != m_required) 145 145 requiredAttributeChanged(); 146 146 } else 147 HTMLElement::parseAttribute( attribute);147 HTMLElement::parseAttribute(name, value); 148 148 } 149 149 -
trunk/Source/WebCore/html/HTMLFormControlElement.h
r133275 r135069 118 118 HTMLFormControlElement(const QualifiedName& tagName, Document*, HTMLFormElement*); 119 119 120 virtual void parseAttribute(const Attribute&) OVERRIDE;120 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 121 121 virtual void requiredAttributeChanged(); 122 122 virtual void disabledAttributeChanged(); -
trunk/Source/WebCore/html/HTMLFormElement.cpp
r133396 r135069 429 429 #endif 430 430 431 void HTMLFormElement::parseAttribute(const Attribute& attribute)432 { 433 if ( attribute.name()== actionAttr)434 m_attributes.parseAction( attribute.value());435 else if ( attribute.name()== targetAttr)436 m_attributes.setTarget( attribute.value());437 else if ( attribute.name()== methodAttr)438 m_attributes.updateMethodType( attribute.value());439 else if ( attribute.name()== enctypeAttr)440 m_attributes.updateEncodingType( attribute.value());441 else if ( attribute.name()== accept_charsetAttr)442 m_attributes.setAcceptCharset( attribute.value());443 else if ( attribute.name()== autocompleteAttr) {431 void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 432 { 433 if (name == actionAttr) 434 m_attributes.parseAction(value); 435 else if (name == targetAttr) 436 m_attributes.setTarget(value); 437 else if (name == methodAttr) 438 m_attributes.updateMethodType(value); 439 else if (name == enctypeAttr) 440 m_attributes.updateEncodingType(value); 441 else if (name == accept_charsetAttr) 442 m_attributes.setAcceptCharset(value); 443 else if (name == autocompleteAttr) { 444 444 if (!shouldAutocomplete()) 445 445 document()->registerForPageCacheSuspensionCallbacks(this); 446 446 else 447 447 document()->unregisterForPageCacheSuspensionCallbacks(this); 448 } else if ( attribute.name()== onsubmitAttr)449 setAttributeEventListener(eventNames().submitEvent, createAttributeEventListener(this, attribute));450 else if ( attribute.name()== onresetAttr)451 setAttributeEventListener(eventNames().resetEvent, createAttributeEventListener(this, attribute));448 } else if (name == onsubmitAttr) 449 setAttributeEventListener(eventNames().submitEvent, createAttributeEventListener(this, name, value)); 450 else if (name == onresetAttr) 451 setAttributeEventListener(eventNames().resetEvent, createAttributeEventListener(this, name, value)); 452 452 #if ENABLE(REQUEST_AUTOCOMPLETE) 453 else if ( attribute.name()== onautocompleteAttr)454 setAttributeEventListener(eventNames().autocompleteEvent, createAttributeEventListener(this, attribute));455 else if ( attribute.name()== onautocompleteerrorAttr)456 setAttributeEventListener(eventNames().autocompleteerrorEvent, createAttributeEventListener(this, attribute));453 else if (name == onautocompleteAttr) 454 setAttributeEventListener(eventNames().autocompleteEvent, createAttributeEventListener(this, name, value)); 455 else if (name == onautocompleteerrorAttr) 456 setAttributeEventListener(eventNames().autocompleteerrorEvent, createAttributeEventListener(this, name, value)); 457 457 #endif 458 458 else 459 HTMLElement::parseAttribute( attribute);459 HTMLElement::parseAttribute(name, value); 460 460 } 461 461 -
trunk/Source/WebCore/html/HTMLFormElement.h
r133396 r135069 130 130 virtual void handleLocalEvents(Event*); 131 131 132 virtual void parseAttribute(const Attribute&) OVERRIDE;132 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 133 133 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; 134 134 -
trunk/Source/WebCore/html/HTMLFrameElement.cpp
r117195 r135069 83 83 } 84 84 85 void HTMLFrameElement::parseAttribute(const Attribute& attribute)85 void HTMLFrameElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 86 86 { 87 if ( attribute.name()== frameborderAttr) {88 m_frameBorder = attribute.value().toInt();89 m_frameBorderSet = ! attribute.isNull();87 if (name == frameborderAttr) { 88 m_frameBorder = value.toInt(); 89 m_frameBorderSet = !value.isNull(); 90 90 // FIXME: If we are already attached, this has no effect. 91 } else if ( attribute.name()== noresizeAttr) {91 } else if (name == noresizeAttr) { 92 92 if (renderer()) 93 93 renderer()->updateFromElement(); 94 94 } else 95 HTMLFrameElementBase::parseAttribute( attribute);95 HTMLFrameElementBase::parseAttribute(name, value); 96 96 } 97 97 -
trunk/Source/WebCore/html/HTMLFrameElement.h
r117195 r135069 45 45 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 46 46 47 virtual void parseAttribute(const Attribute&) OVERRIDE;47 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 48 48 49 49 #if ENABLE(FULLSCREEN_API) -
trunk/Source/WebCore/html/HTMLFrameElementBase.cpp
r134528 r135069 103 103 } 104 104 105 void HTMLFrameElementBase::parseAttribute(const Attribute& attribute)106 { 107 if ( attribute.name()== srcdocAttr)105 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const AtomicString& value) 106 { 107 if (name == srcdocAttr) 108 108 setLocation("about:srcdoc"); 109 else if ( attribute.name()== srcAttr && !fastHasAttribute(srcdocAttr))110 setLocation(stripLeadingAndTrailingHTMLSpaces( attribute.value()));111 else if (isIdAttributeName( attribute.name())) {109 else if (name == srcAttr && !fastHasAttribute(srcdocAttr)) 110 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); 111 else if (isIdAttributeName(name)) { 112 112 // Important to call through to base for the id attribute so the hasID bit gets set. 113 HTMLFrameOwnerElement::parseAttribute( attribute);114 m_frameName = attribute.value();115 } else if ( attribute.name()== nameAttr) {116 m_frameName = attribute.value();113 HTMLFrameOwnerElement::parseAttribute(name, value); 114 m_frameName = value; 115 } else if (name == nameAttr) { 116 m_frameName = value; 117 117 // FIXME: If we are already attached, this doesn't actually change the frame's name. 118 118 // FIXME: If we are already attached, this doesn't check for frame name 119 119 // conflicts and generate a unique frame name. 120 } else if ( attribute.name()== marginwidthAttr) {121 m_marginWidth = attribute.value().toInt();120 } else if (name == marginwidthAttr) { 121 m_marginWidth = value.toInt(); 122 122 // FIXME: If we are already attached, this has no effect. 123 } else if ( attribute.name()== marginheightAttr) {124 m_marginHeight = attribute.value().toInt();123 } else if (name == marginheightAttr) { 124 m_marginHeight = value.toInt(); 125 125 // FIXME: If we are already attached, this has no effect. 126 } else if ( attribute.name()== scrollingAttr) {126 } else if (name == scrollingAttr) { 127 127 // Auto and yes both simply mean "allow scrolling." No means "don't allow scrolling." 128 if (equalIgnoringCase( attribute.value(), "auto") || equalIgnoringCase(attribute.value(), "yes"))128 if (equalIgnoringCase(value, "auto") || equalIgnoringCase(value, "yes")) 129 129 m_scrolling = document()->frameElementsShouldIgnoreScrolling() ? ScrollbarAlwaysOff : ScrollbarAuto; 130 else if (equalIgnoringCase( attribute.value(), "no"))130 else if (equalIgnoringCase(value, "no")) 131 131 m_scrolling = ScrollbarAlwaysOff; 132 132 // FIXME: If we are already attached, this has no effect. 133 } else if ( attribute.name()== viewsourceAttr) {134 m_viewSource = ! attribute.isNull();133 } else if (name == viewsourceAttr) { 134 m_viewSource = !value.isNull(); 135 135 if (contentFrame()) 136 136 contentFrame()->setInViewSourceMode(viewSourceMode()); 137 } else if ( attribute.name()== onloadAttr)138 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));139 else if ( attribute.name()== onbeforeloadAttr)140 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute));141 else if ( attribute.name()== onbeforeunloadAttr) {137 } else if (name == onloadAttr) 138 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 139 else if (name == onbeforeloadAttr) 140 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); 141 else if (name == onbeforeunloadAttr) { 142 142 // FIXME: should <frame> elements have beforeunload handlers? 143 setAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(this, attribute));143 setAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(this, name, value)); 144 144 } else 145 HTMLFrameOwnerElement::parseAttribute( attribute);145 HTMLFrameOwnerElement::parseAttribute(name, value); 146 146 } 147 147 -
trunk/Source/WebCore/html/HTMLFrameElementBase.h
r128323 r135069 50 50 bool isURLAllowed() const; 51 51 52 virtual void parseAttribute(const Attribute&) OVERRIDE;52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 53 53 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 54 54 virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r134322 r135069 80 80 } 81 81 82 void HTMLFrameSetElement::parseAttribute(const Attribute& attribute)83 { 84 if ( attribute.name()== rowsAttr) {85 if (! attribute.isNull()) {86 m_rowLengths = newLengthArray( attribute.value().string(), m_totalRows);82 void HTMLFrameSetElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 83 { 84 if (name == rowsAttr) { 85 if (!value.isNull()) { 86 m_rowLengths = newLengthArray(value.string(), m_totalRows); 87 87 setNeedsStyleRecalc(); 88 88 } 89 } else if ( attribute.name()== colsAttr) {90 if (! attribute.isNull()) {91 m_colLengths = newLengthArray( attribute.value().string(), m_totalCols);89 } else if (name == colsAttr) { 90 if (!value.isNull()) { 91 m_colLengths = newLengthArray(value.string(), m_totalCols); 92 92 setNeedsStyleRecalc(); 93 93 } 94 } else if (attribute.name() == frameborderAttr) { 95 if (!attribute.isNull()) { 96 const AtomicString& value = attribute.value(); 94 } else if (name == frameborderAttr) { 95 if (!value.isNull()) { 97 96 if (equalIgnoringCase(value, "no") || equalIgnoringCase(value, "0")) { 98 97 m_frameborder = false; … … 105 104 m_frameborderSet = false; 106 105 } 107 } else if ( attribute.name()== noresizeAttr) {106 } else if (name == noresizeAttr) { 108 107 m_noresize = true; 109 } else if ( attribute.name()== borderAttr) {110 if (! attribute.isNull()) {111 m_border = attribute.value().toInt();108 } else if (name == borderAttr) { 109 if (!value.isNull()) { 110 m_border = value.toInt(); 112 111 m_borderSet = true; 113 112 } else 114 113 m_borderSet = false; 115 } else if ( attribute.name()== bordercolorAttr)116 m_borderColorSet = ! attribute.isEmpty();117 else if ( attribute.name()== onloadAttr)118 document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), attribute));119 else if ( attribute.name()== onbeforeunloadAttr)120 document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), attribute));121 else if ( attribute.name()== onunloadAttr)122 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attribute));123 else if ( attribute.name()== onblurAttr)124 document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), attribute));125 else if ( attribute.name()== onfocusAttr)126 document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), attribute));127 else if ( attribute.name()== onfocusinAttr)128 document()->setWindowAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(document()->frame(), attribute));129 else if ( attribute.name()== onfocusoutAttr)130 document()->setWindowAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(document()->frame(), attribute));114 } else if (name == bordercolorAttr) 115 m_borderColorSet = !value.isEmpty(); 116 else if (name == onloadAttr) 117 document()->setWindowAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(document()->frame(), name, value)); 118 else if (name == onbeforeunloadAttr) 119 document()->setWindowAttributeEventListener(eventNames().beforeunloadEvent, createAttributeEventListener(document()->frame(), name, value)); 120 else if (name == onunloadAttr) 121 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), name, value)); 122 else if (name == onblurAttr) 123 document()->setWindowAttributeEventListener(eventNames().blurEvent, createAttributeEventListener(document()->frame(), name, value)); 124 else if (name == onfocusAttr) 125 document()->setWindowAttributeEventListener(eventNames().focusEvent, createAttributeEventListener(document()->frame(), name, value)); 126 else if (name == onfocusinAttr) 127 document()->setWindowAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(document()->frame(), name, value)); 128 else if (name == onfocusoutAttr) 129 document()->setWindowAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(document()->frame(), name, value)); 131 130 #if ENABLE(ORIENTATION_EVENTS) 132 else if ( attribute.name()== onorientationchangeAttr)133 document()->setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()->frame(), attribute));131 else if (name == onorientationchangeAttr) 132 document()->setWindowAttributeEventListener(eventNames().orientationchangeEvent, createAttributeEventListener(document()->frame(), name, value)); 134 133 #endif 135 else if ( attribute.name()== onhashchangeAttr)136 document()->setWindowAttributeEventListener(eventNames().hashchangeEvent, createAttributeEventListener(document()->frame(), attribute));137 else if ( attribute.name()== onresizeAttr)138 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attribute));139 else if ( attribute.name()== onscrollAttr)140 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attribute));141 else if ( attribute.name()== onstorageAttr)142 document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), attribute));143 else if ( attribute.name()== ononlineAttr)144 document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), attribute));145 else if ( attribute.name()== onofflineAttr)146 document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), attribute));147 else if ( attribute.name()== onpopstateAttr)148 document()->setWindowAttributeEventListener(eventNames().popstateEvent, createAttributeEventListener(document()->frame(), attribute));134 else if (name == onhashchangeAttr) 135 document()->setWindowAttributeEventListener(eventNames().hashchangeEvent, createAttributeEventListener(document()->frame(), name, value)); 136 else if (name == onresizeAttr) 137 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), name, value)); 138 else if (name == onscrollAttr) 139 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), name, value)); 140 else if (name == onstorageAttr) 141 document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), name, value)); 142 else if (name == ononlineAttr) 143 document()->setWindowAttributeEventListener(eventNames().onlineEvent, createAttributeEventListener(document()->frame(), name, value)); 144 else if (name == onofflineAttr) 145 document()->setWindowAttributeEventListener(eventNames().offlineEvent, createAttributeEventListener(document()->frame(), name, value)); 146 else if (name == onpopstateAttr) 147 document()->setWindowAttributeEventListener(eventNames().popstateEvent, createAttributeEventListener(document()->frame(), name, value)); 149 148 else 150 HTMLElement::parseAttribute( attribute);149 HTMLElement::parseAttribute(name, value); 151 150 } 152 151 -
trunk/Source/WebCore/html/HTMLFrameSetElement.h
r134322 r135069 68 68 HTMLFrameSetElement(const QualifiedName&, Document*); 69 69 70 virtual void parseAttribute(const Attribute&) OVERRIDE;70 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 71 71 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 72 72 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLIFrameElement.cpp
r134766 r135069 78 78 } 79 79 80 void HTMLIFrameElement::parseAttribute(const Attribute& attribute)80 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 81 81 { 82 if (attribute.name() == nameAttr) { 83 const AtomicString& newName = attribute.value(); 82 if (name == nameAttr) { 84 83 if (inDocument() && document()->isHTMLDocument()) { 85 84 HTMLDocument* document = static_cast<HTMLDocument*>(this->document()); 86 85 document->removeExtraNamedItem(m_name); 87 document->addExtraNamedItem( newName);86 document->addExtraNamedItem(value); 88 87 } 89 m_name = newName;90 } else if ( attribute.name()== sandboxAttr) {88 m_name = value; 89 } else if (name == sandboxAttr) { 91 90 String invalidTokens; 92 setSandboxFlags( attribute.isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(attribute.value(), invalidTokens));91 setSandboxFlags(value.isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(value, invalidTokens)); 93 92 if (!invalidTokens.isNull()) { 94 93 int line = document()->scriptableDocumentParser() ? document()->scriptableDocumentParser()->lineNumber().oneBasedInt() : 0; 95 94 document()->addConsoleMessage(HTMLMessageSource, LogMessageType, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidTokens, document()->url().string(), line); 96 95 } 97 } else if ( attribute.name()== seamlessAttr) {96 } else if (name == seamlessAttr) { 98 97 // If we're adding or removing the seamless attribute, we need to force the content document to recalculate its StyleResolver. 99 98 if (contentDocument()) 100 99 contentDocument()->styleResolverChanged(DeferRecalcStyle); 101 100 } else 102 HTMLFrameElementBase::parseAttribute( attribute);101 HTMLFrameElementBase::parseAttribute(name, value); 103 102 } 104 103 -
trunk/Source/WebCore/html/HTMLIFrameElement.h
r134322 r135069 38 38 HTMLIFrameElement(const QualifiedName&, Document*); 39 39 40 virtual void parseAttribute(const Attribute&) OVERRIDE;40 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 41 41 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 42 42 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r134322 r135069 160 160 } 161 161 162 void HTMLImageElement::parseAttribute(const Attribute& attribute)163 { 164 if ( attribute.name()== altAttr) {162 void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 163 { 164 if (name == altAttr) { 165 165 RenderObject* renderObject = shadow() ? innerElement()->renderer() : renderer(); 166 166 if (renderObject && renderObject->isImage()) 167 167 toRenderImage(renderObject)->updateAltText(); 168 } else if ( attribute.name()== srcAttr) {168 } else if (name == srcAttr) { 169 169 m_imageLoader.updateFromElementIgnoringPreviousError(); 170 170 if (ElementShadow* elementShadow = shadow()) 171 171 elementShadow->invalidateDistribution(); 172 } else if ( attribute.name()== usemapAttr)173 setIsLink(! attribute.isNull());174 else if ( attribute.name()== onloadAttr)175 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));176 else if ( attribute.name()== onbeforeloadAttr)177 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute));178 else if ( attribute.name()== compositeAttr) {179 if (!parseCompositeOperator( attribute.value(), m_compositeOperator))172 } else if (name == usemapAttr) 173 setIsLink(!value.isNull()); 174 else if (name == onloadAttr) 175 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 176 else if (name == onbeforeloadAttr) 177 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); 178 else if (name == compositeAttr) { 179 if (!parseCompositeOperator(value, m_compositeOperator)) 180 180 m_compositeOperator = CompositeSourceOver; 181 181 } else 182 HTMLElement::parseAttribute( attribute);182 HTMLElement::parseAttribute(name, value); 183 183 } 184 184 -
trunk/Source/WebCore/html/HTMLImageElement.h
r134322 r135069 106 106 void derefSourceElement() { deref(); } 107 107 108 virtual void parseAttribute(const Attribute&) OVERRIDE;108 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 109 109 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 110 110 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r134938 r135069 649 649 } 650 650 651 void HTMLInputElement::parseAttribute(const Attribute& attribute)652 { 653 if ( attribute.name()== nameAttr) {651 void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 652 { 653 if (name == nameAttr) { 654 654 removeFromRadioButtonGroup(); 655 m_name = attribute.value();655 m_name = value; 656 656 addToRadioButtonGroup(); 657 HTMLTextFormControlElement::parseAttribute( attribute);658 } else if ( attribute.name()== autocompleteAttr) {659 if (equalIgnoringCase( attribute.value(), "off")) {657 HTMLTextFormControlElement::parseAttribute(name, value); 658 } else if (name == autocompleteAttr) { 659 if (equalIgnoringCase(value, "off")) { 660 660 m_autocomplete = Off; 661 661 registerForSuspensionCallbackIfNeeded(); … … 663 663 bool needsToUnregister = m_autocomplete == Off; 664 664 665 if ( attribute.isEmpty())665 if (value.isEmpty()) 666 666 m_autocomplete = Uninitialized; 667 667 else … … 671 671 unregisterForSuspensionCallbackIfNeeded(); 672 672 } 673 } else if ( attribute.name() == typeAttr) {673 } else if (name == typeAttr) 674 674 updateType(); 675 } else if (attribute.name()== valueAttr) {675 else if (name == valueAttr) { 676 676 // Changes to the value attribute may change whether or not this element has a default value. 677 677 // If this field is autocomplete=off that might affect the return value of needsSuspensionCallback. … … 688 688 setNeedsValidityCheck(); 689 689 m_valueAttributeWasUpdatedAfterParsing = !m_parsingInProgress; 690 } else if ( attribute.name()== checkedAttr) {690 } else if (name == checkedAttr) { 691 691 // Another radio button in the same group might be checked by state 692 692 // restore. We shouldn't call setChecked() even if this has the checked … … 694 694 // finishParsingChildren() is called if parsing is in progress. 695 695 if (!m_parsingInProgress && m_reflectsCheckedAttribute) { 696 setChecked(! attribute.isNull());696 setChecked(!value.isNull()); 697 697 m_reflectsCheckedAttribute = true; 698 698 } 699 } else if ( attribute.name()== maxlengthAttr)700 parseMaxLengthAttribute( attribute);701 else if ( attribute.name()== sizeAttr) {699 } else if (name == maxlengthAttr) 700 parseMaxLengthAttribute(value); 701 else if (name == sizeAttr) { 702 702 int oldSize = m_size; 703 int value = attribute.value().toInt();704 m_size = value > 0 ? value: defaultSize;703 int valueAsInteger = value.toInt(); 704 m_size = valueAsInteger > 0 ? valueAsInteger : defaultSize; 705 705 if (m_size != oldSize && renderer()) 706 706 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 707 } else if ( attribute.name()== altAttr)707 } else if (name == altAttr) 708 708 m_inputType->altAttributeChanged(); 709 else if ( attribute.name()== srcAttr)709 else if (name == srcAttr) 710 710 m_inputType->srcAttributeChanged(); 711 else if ( attribute.name() == usemapAttr || attribute.name()== accesskeyAttr) {711 else if (name == usemapAttr || name == accesskeyAttr) { 712 712 // FIXME: ignore for the moment 713 } else if ( attribute.name()== onsearchAttr) {713 } else if (name == onsearchAttr) { 714 714 // Search field and slider attributes all just cause updateFromElement to be called through style recalcing. 715 setAttributeEventListener(eventNames().searchEvent, createAttributeEventListener(this, attribute));716 } else if ( attribute.name()== resultsAttr) {715 setAttributeEventListener(eventNames().searchEvent, createAttributeEventListener(this, name, value)); 716 } else if (name == resultsAttr) { 717 717 int oldResults = m_maxResults; 718 m_maxResults = ! attribute.isNull() ? std::min(attribute.value().toInt(), maxSavedResults) : -1;718 m_maxResults = !value.isNull() ? std::min(value.toInt(), maxSavedResults) : -1; 719 719 // FIXME: Detaching just for maxResults change is not ideal. We should figure out the right 720 720 // time to relayout for this change. … … 722 722 reattachIfAttached(); 723 723 setNeedsStyleRecalc(); 724 } else if ( attribute.name() == autosaveAttr || attribute.name()== incrementalAttr)724 } else if (name == autosaveAttr || name == incrementalAttr) 725 725 setNeedsStyleRecalc(); 726 else if ( attribute.name() == minAttr || attribute.name()== maxAttr) {726 else if (name == minAttr || name == maxAttr) { 727 727 m_inputType->minOrMaxAttributeChanged(); 728 728 setNeedsValidityCheck(); 729 } else if ( attribute.name()== multipleAttr) {729 } else if (name == multipleAttr) { 730 730 m_inputType->multipleAttributeChanged(); 731 731 setNeedsValidityCheck(); 732 } else if ( attribute.name()== stepAttr) {732 } else if (name == stepAttr) { 733 733 m_inputType->stepAttributeChanged(); 734 734 setNeedsValidityCheck(); 735 } else if ( attribute.name() == patternAttr || attribute.name()== precisionAttr)735 } else if (name == patternAttr || name == precisionAttr) 736 736 setNeedsValidityCheck(); 737 else if ( attribute.name()== disabledAttr) {738 HTMLTextFormControlElement::parseAttribute( attribute);737 else if (name == disabledAttr) { 738 HTMLTextFormControlElement::parseAttribute(name, value); 739 739 m_inputType->disabledAttributeChanged(); 740 } else if ( attribute.name()== readonlyAttr) {741 HTMLTextFormControlElement::parseAttribute( attribute);740 } else if (name == readonlyAttr) { 741 HTMLTextFormControlElement::parseAttribute(name, value); 742 742 m_inputType->readonlyAttributeChanged(); 743 743 } 744 744 #if ENABLE(DATALIST_ELEMENT) 745 else if ( attribute.name()== listAttr) {746 m_hasNonEmptyList = ! attribute.isEmpty();745 else if (name == listAttr) { 746 m_hasNonEmptyList = !value.isEmpty(); 747 747 if (m_hasNonEmptyList) { 748 748 resetListAttributeTargetObserver(); … … 752 752 #endif 753 753 #if ENABLE(INPUT_SPEECH) 754 else if ( attribute.name()== webkitspeechAttr) {754 else if (name == webkitspeechAttr) { 755 755 if (renderer()) { 756 756 // This renderer and its children have quite different layouts and styles depending on … … 767 767 setFormControlValueMatchesRenderer(false); 768 768 setNeedsStyleRecalc(); 769 } else if ( attribute.name()== onwebkitspeechchangeAttr)770 setAttributeEventListener(eventNames().webkitspeechchangeEvent, createAttributeEventListener(this, attribute));769 } else if (name == onwebkitspeechchangeAttr) 770 setAttributeEventListener(eventNames().webkitspeechchangeEvent, createAttributeEventListener(this, name, value)); 771 771 #endif 772 772 else 773 HTMLTextFormControlElement::parseAttribute( attribute);773 HTMLTextFormControlElement::parseAttribute(name, value); 774 774 m_inputType->updateInnerTextValue(); 775 775 } … … 1759 1759 } 1760 1760 1761 void HTMLInputElement::parseMaxLengthAttribute(const At tribute& attribute)1761 void HTMLInputElement::parseMaxLengthAttribute(const AtomicString& value) 1762 1762 { 1763 1763 int maxLength; 1764 if (!parseHTMLInteger( attribute.value(), maxLength))1764 if (!parseHTMLInteger(value, maxLength)) 1765 1765 maxLength = maximumLength; 1766 1766 if (maxLength < 0 || maxLength > maximumLength) -
trunk/Source/WebCore/html/HTMLInputElement.h
r134806 r135069 339 339 virtual void accessKeyAction(bool sendMouseEvents); 340 340 341 virtual void parseAttribute(const Attribute&) OVERRIDE;341 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 342 342 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 343 343 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; … … 395 395 void resetListAttributeTargetObserver(); 396 396 #endif 397 void parseMaxLengthAttribute(const At tribute&);397 void parseMaxLengthAttribute(const AtomicString&); 398 398 void updateValueIfNeeded(); 399 399 -
trunk/Source/WebCore/html/HTMLKeygenElement.cpp
r134189 r135069 93 93 } 94 94 95 void HTMLKeygenElement::parseAttribute(const Attribute& attribute)95 void HTMLKeygenElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 96 96 { 97 97 // Reflect disabled attribute on the shadow select element 98 if ( attribute.name()== disabledAttr)99 shadowSelect()->setAttribute( attribute.name(), attribute.value());98 if (name == disabledAttr) 99 shadowSelect()->setAttribute(name, value); 100 100 101 HTMLFormControlElement::parseAttribute( attribute);101 HTMLFormControlElement::parseAttribute(name, value); 102 102 } 103 103 -
trunk/Source/WebCore/html/HTMLKeygenElement.h
r128856 r135069 44 44 virtual bool canStartSelection() const { return false; } 45 45 46 virtual void parseAttribute(const Attribute&) OVERRIDE;46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 47 47 48 48 virtual bool appendFormData(FormDataList&, bool); -
trunk/Source/WebCore/html/HTMLLIElement.cpp
r134322 r135069 77 77 } 78 78 79 void HTMLLIElement::parseAttribute(const Attribute& attribute)79 void HTMLLIElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 80 80 { 81 if ( attribute.name()== valueAttr) {81 if (name == valueAttr) { 82 82 if (renderer() && renderer()->isListItem()) 83 parseValue( attribute.value());83 parseValue(value); 84 84 } else 85 HTMLElement::parseAttribute( attribute);85 HTMLElement::parseAttribute(name, value); 86 86 } 87 87 -
trunk/Source/WebCore/html/HTMLLIElement.h
r134322 r135069 36 36 HTMLLIElement(const QualifiedName&, Document*); 37 37 38 virtual void parseAttribute(const Attribute&) OVERRIDE;38 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 39 39 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 40 40 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r134930 r135069 131 131 } 132 132 133 void HTMLLinkElement::parseAttribute(const Attribute& attribute)134 { 135 if ( attribute.name()== relAttr) {136 m_relAttribute = LinkRelAttribute( attribute.value());133 void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 134 { 135 if (name == relAttr) { 136 m_relAttribute = LinkRelAttribute(value); 137 137 process(); 138 } else if ( attribute.name()== hrefAttr) {139 String url = stripLeadingAndTrailingHTMLSpaces( attribute.value());138 } else if (name == hrefAttr) { 139 String url = stripLeadingAndTrailingHTMLSpaces(value); 140 140 m_url = url.isEmpty() ? KURL() : document()->completeURL(url); 141 141 process(); 142 } else if ( attribute.name()== typeAttr) {143 m_type = attribute.value();142 } else if (name == typeAttr) { 143 m_type = value; 144 144 process(); 145 } else if ( attribute.name()== sizesAttr) {146 setSizes( attribute.value());145 } else if (name == sizesAttr) { 146 setSizes(value); 147 147 process(); 148 } else if ( attribute.name()== mediaAttr) {149 m_media = attribute.value().string().lower();148 } else if (name == mediaAttr) { 149 m_media = value.string().lower(); 150 150 process(); 151 } else if ( attribute.name()== disabledAttr)152 setDisabledState(! attribute.isNull());153 else if ( attribute.name()== onbeforeloadAttr)154 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute));155 else if ( attribute.name()== onloadAttr)156 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));157 else if ( attribute.name()== onerrorAttr)158 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attribute));151 } else if (name == disabledAttr) 152 setDisabledState(!value.isNull()); 153 else if (name == onbeforeloadAttr) 154 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); 155 else if (name == onloadAttr) 156 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 157 else if (name == onerrorAttr) 158 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, name, value)); 159 159 else { 160 if ( attribute.name()== titleAttr && m_sheet)161 m_sheet->setTitle( attribute.value());162 HTMLElement::parseAttribute( attribute);160 if (name == titleAttr && m_sheet) 161 m_sheet->setTitle(value); 162 HTMLElement::parseAttribute(name, value); 163 163 } 164 164 } -
trunk/Source/WebCore/html/HTMLLinkElement.h
r125988 r135069 74 74 75 75 private: 76 virtual void parseAttribute(const Attribute&) OVERRIDE;76 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 77 77 78 78 virtual bool shouldLoadLink(); -
trunk/Source/WebCore/html/HTMLMapElement.cpp
r122115 r135069 99 99 } 100 100 101 void HTMLMapElement::parseAttribute(const Attribute& attribute)101 void HTMLMapElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 102 102 { 103 103 // FIXME: This logic seems wrong for XML documents. 104 104 // Either the id or name will be used depending on the order the attributes are parsed. 105 105 106 if (isIdAttributeName( attribute.name()) || attribute.name()== nameAttr) {107 if (isIdAttributeName( attribute.name())) {106 if (isIdAttributeName(name) || name == nameAttr) { 107 if (isIdAttributeName(name)) { 108 108 // Call base class so that hasID bit gets set. 109 HTMLElement::parseAttribute( attribute);109 HTMLElement::parseAttribute(name, value); 110 110 if (document()->isHTMLDocument()) 111 111 return; … … 113 113 if (inDocument()) 114 114 treeScope()->removeImageMap(this); 115 String mapName = attribute.value();115 String mapName = value; 116 116 if (mapName[0] == '#') 117 117 mapName = mapName.substring(1); … … 123 123 } 124 124 125 HTMLElement::parseAttribute( attribute);125 HTMLElement::parseAttribute(name, value); 126 126 } 127 127 -
trunk/Source/WebCore/html/HTMLMapElement.h
r122115 r135069 47 47 HTMLMapElement(const QualifiedName&, Document*); 48 48 49 virtual void parseAttribute(const Attribute&) OVERRIDE;49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 50 50 51 51 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r134802 r135069 360 360 } 361 361 362 void HTMLMediaElement::parseAttribute(const Attribute& attribute)363 { 364 if ( attribute.name()== srcAttr) {362 void HTMLMediaElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 363 { 364 if (name == srcAttr) { 365 365 // Trigger a reload, as long as the 'src' attribute is present. 366 366 if (fastHasAttribute(srcAttr)) { … … 368 368 scheduleLoad(MediaResource); 369 369 } 370 } else if ( attribute.name()== controlsAttr)370 } else if (name == controlsAttr) 371 371 configureMediaControls(); 372 372 #if PLATFORM(MAC) 373 else if ( attribute.name()== loopAttr)373 else if (name == loopAttr) 374 374 updateDisableSleep(); 375 375 #endif 376 else if ( attribute.name()== preloadAttr) {377 if (equalIgnoringCase( attribute.value(), "none"))376 else if (name == preloadAttr) { 377 if (equalIgnoringCase(value, "none")) 378 378 m_preload = MediaPlayer::None; 379 else if (equalIgnoringCase( attribute.value(), "metadata"))379 else if (equalIgnoringCase(value, "metadata")) 380 380 m_preload = MediaPlayer::MetaData; 381 381 else { … … 389 389 m_player->setPreload(m_preload); 390 390 391 } else if ( attribute.name()== mediagroupAttr)392 setMediaGroup( attribute.value());393 else if ( attribute.name()== onabortAttr)394 setAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(this, attribute));395 else if ( attribute.name()== onbeforeloadAttr)396 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute));397 else if ( attribute.name()== oncanplayAttr)398 setAttributeEventListener(eventNames().canplayEvent, createAttributeEventListener(this, attribute));399 else if ( attribute.name()== oncanplaythroughAttr)400 setAttributeEventListener(eventNames().canplaythroughEvent, createAttributeEventListener(this, attribute));401 else if ( attribute.name()== ondurationchangeAttr)402 setAttributeEventListener(eventNames().durationchangeEvent, createAttributeEventListener(this, attribute));403 else if ( attribute.name()== onemptiedAttr)404 setAttributeEventListener(eventNames().emptiedEvent, createAttributeEventListener(this, attribute));405 else if ( attribute.name()== onendedAttr)406 setAttributeEventListener(eventNames().endedEvent, createAttributeEventListener(this, attribute));407 else if ( attribute.name()== onerrorAttr)408 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attribute));409 else if ( attribute.name()== onloadeddataAttr)410 setAttributeEventListener(eventNames().loadeddataEvent, createAttributeEventListener(this, attribute));411 else if ( attribute.name()== onloadedmetadataAttr)412 setAttributeEventListener(eventNames().loadedmetadataEvent, createAttributeEventListener(this, attribute));413 else if ( attribute.name()== onloadstartAttr)414 setAttributeEventListener(eventNames().loadstartEvent, createAttributeEventListener(this, attribute));415 else if ( attribute.name()== onpauseAttr)416 setAttributeEventListener(eventNames().pauseEvent, createAttributeEventListener(this, attribute));417 else if ( attribute.name()== onplayAttr)418 setAttributeEventListener(eventNames().playEvent, createAttributeEventListener(this, attribute));419 else if ( attribute.name()== onplayingAttr)420 setAttributeEventListener(eventNames().playingEvent, createAttributeEventListener(this, attribute));421 else if ( attribute.name()== onprogressAttr)422 setAttributeEventListener(eventNames().progressEvent, createAttributeEventListener(this, attribute));423 else if ( attribute.name()== onratechangeAttr)424 setAttributeEventListener(eventNames().ratechangeEvent, createAttributeEventListener(this, attribute));425 else if ( attribute.name()== onseekedAttr)426 setAttributeEventListener(eventNames().seekedEvent, createAttributeEventListener(this, attribute));427 else if ( attribute.name()== onseekingAttr)428 setAttributeEventListener(eventNames().seekingEvent, createAttributeEventListener(this, attribute));429 else if ( attribute.name()== onstalledAttr)430 setAttributeEventListener(eventNames().stalledEvent, createAttributeEventListener(this, attribute));431 else if ( attribute.name()== onsuspendAttr)432 setAttributeEventListener(eventNames().suspendEvent, createAttributeEventListener(this, attribute));433 else if ( attribute.name()== ontimeupdateAttr)434 setAttributeEventListener(eventNames().timeupdateEvent, createAttributeEventListener(this, attribute));435 else if ( attribute.name()== onvolumechangeAttr)436 setAttributeEventListener(eventNames().volumechangeEvent, createAttributeEventListener(this, attribute));437 else if ( attribute.name()== onwaitingAttr)438 setAttributeEventListener(eventNames().waitingEvent, createAttributeEventListener(this, attribute));439 else if ( attribute.name()== onwebkitbeginfullscreenAttr)440 setAttributeEventListener(eventNames().webkitbeginfullscreenEvent, createAttributeEventListener(this, attribute));441 else if ( attribute.name()== onwebkitendfullscreenAttr)442 setAttributeEventListener(eventNames().webkitendfullscreenEvent, createAttributeEventListener(this, attribute));391 } else if (name == mediagroupAttr) 392 setMediaGroup(value); 393 else if (name == onabortAttr) 394 setAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(this, name, value)); 395 else if (name == onbeforeloadAttr) 396 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); 397 else if (name == oncanplayAttr) 398 setAttributeEventListener(eventNames().canplayEvent, createAttributeEventListener(this, name, value)); 399 else if (name == oncanplaythroughAttr) 400 setAttributeEventListener(eventNames().canplaythroughEvent, createAttributeEventListener(this, name, value)); 401 else if (name == ondurationchangeAttr) 402 setAttributeEventListener(eventNames().durationchangeEvent, createAttributeEventListener(this, name, value)); 403 else if (name == onemptiedAttr) 404 setAttributeEventListener(eventNames().emptiedEvent, createAttributeEventListener(this, name, value)); 405 else if (name == onendedAttr) 406 setAttributeEventListener(eventNames().endedEvent, createAttributeEventListener(this, name, value)); 407 else if (name == onerrorAttr) 408 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, name, value)); 409 else if (name == onloadeddataAttr) 410 setAttributeEventListener(eventNames().loadeddataEvent, createAttributeEventListener(this, name, value)); 411 else if (name == onloadedmetadataAttr) 412 setAttributeEventListener(eventNames().loadedmetadataEvent, createAttributeEventListener(this, name, value)); 413 else if (name == onloadstartAttr) 414 setAttributeEventListener(eventNames().loadstartEvent, createAttributeEventListener(this, name, value)); 415 else if (name == onpauseAttr) 416 setAttributeEventListener(eventNames().pauseEvent, createAttributeEventListener(this, name, value)); 417 else if (name == onplayAttr) 418 setAttributeEventListener(eventNames().playEvent, createAttributeEventListener(this, name, value)); 419 else if (name == onplayingAttr) 420 setAttributeEventListener(eventNames().playingEvent, createAttributeEventListener(this, name, value)); 421 else if (name == onprogressAttr) 422 setAttributeEventListener(eventNames().progressEvent, createAttributeEventListener(this, name, value)); 423 else if (name == onratechangeAttr) 424 setAttributeEventListener(eventNames().ratechangeEvent, createAttributeEventListener(this, name, value)); 425 else if (name == onseekedAttr) 426 setAttributeEventListener(eventNames().seekedEvent, createAttributeEventListener(this, name, value)); 427 else if (name == onseekingAttr) 428 setAttributeEventListener(eventNames().seekingEvent, createAttributeEventListener(this, name, value)); 429 else if (name == onstalledAttr) 430 setAttributeEventListener(eventNames().stalledEvent, createAttributeEventListener(this, name, value)); 431 else if (name == onsuspendAttr) 432 setAttributeEventListener(eventNames().suspendEvent, createAttributeEventListener(this, name, value)); 433 else if (name == ontimeupdateAttr) 434 setAttributeEventListener(eventNames().timeupdateEvent, createAttributeEventListener(this, name, value)); 435 else if (name == onvolumechangeAttr) 436 setAttributeEventListener(eventNames().volumechangeEvent, createAttributeEventListener(this, name, value)); 437 else if (name == onwaitingAttr) 438 setAttributeEventListener(eventNames().waitingEvent, createAttributeEventListener(this, name, value)); 439 else if (name == onwebkitbeginfullscreenAttr) 440 setAttributeEventListener(eventNames().webkitbeginfullscreenEvent, createAttributeEventListener(this, name, value)); 441 else if (name == onwebkitendfullscreenAttr) 442 setAttributeEventListener(eventNames().webkitendfullscreenEvent, createAttributeEventListener(this, name, value)); 443 443 else 444 HTMLElement::parseAttribute( attribute);444 HTMLElement::parseAttribute(name, value); 445 445 } 446 446 -
trunk/Source/WebCore/html/HTMLMediaElement.h
r134802 r135069 325 325 virtual ~HTMLMediaElement(); 326 326 327 virtual void parseAttribute(const Attribute&) OVERRIDE;327 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 328 328 virtual void finishParsingChildren(); 329 329 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; -
trunk/Source/WebCore/html/HTMLMetaElement.cpp
r119452 r135069 43 43 } 44 44 45 void HTMLMetaElement::parseAttribute(const Attribute& attribute)45 void HTMLMetaElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 46 46 { 47 if ( attribute.name()== http_equivAttr)47 if (name == http_equivAttr) 48 48 process(); 49 else if ( attribute.name()== contentAttr)49 else if (name == contentAttr) 50 50 process(); 51 else if ( attribute.name()== nameAttr) {51 else if (name == nameAttr) { 52 52 // Do nothing 53 53 } else 54 HTMLElement::parseAttribute( attribute);54 HTMLElement::parseAttribute(name, value); 55 55 } 56 56 -
trunk/Source/WebCore/html/HTMLMetaElement.h
r118192 r135069 39 39 HTMLMetaElement(const QualifiedName&, Document*); 40 40 41 virtual void parseAttribute(const Attribute&) OVERRIDE;41 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 42 42 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 43 43 -
trunk/Source/WebCore/html/HTMLMeterElement.cpp
r134420 r135069 78 78 } 79 79 80 void HTMLMeterElement::parseAttribute(const Attribute& attribute)81 { 82 if ( attribute.name() == valueAttr || attribute.name() == minAttr || attribute.name() == maxAttr || attribute.name() == lowAttr || attribute.name() == highAttr || attribute.name()== optimumAttr)80 void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 81 { 82 if (name == valueAttr || name == minAttr || name == maxAttr || name == lowAttr || name == highAttr || name == optimumAttr) 83 83 didElementStateChange(); 84 84 else 85 LabelableElement::parseAttribute( attribute);85 LabelableElement::parseAttribute(name, value); 86 86 } 87 87 -
trunk/Source/WebCore/html/HTMLMeterElement.h
r134196 r135069 80 80 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); 81 81 virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE; 82 virtual void parseAttribute(const Attribute&) OVERRIDE;82 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 83 83 84 84 void didElementStateChange(); -
trunk/Source/WebCore/html/HTMLOListElement.cpp
r134322 r135069 79 79 } 80 80 81 void HTMLOListElement::parseAttribute(const Attribute& attribute)81 void HTMLOListElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 82 82 { 83 if ( attribute.name()== startAttr) {83 if (name == startAttr) { 84 84 int oldStart = start(); 85 85 bool canParse; 86 int parsedStart = attribute.value().toInt(&canParse);86 int parsedStart = value.toInt(&canParse); 87 87 m_hasExplicitStart = canParse; 88 88 m_start = canParse ? parsedStart : 0xBADBEEF; … … 90 90 return; 91 91 updateItemValues(); 92 } else if ( attribute.name()== reversedAttr) {93 bool reversed = ! attribute.isNull();92 } else if (name == reversedAttr) { 93 bool reversed = !value.isNull(); 94 94 if (reversed == m_isReversed) 95 95 return; … … 97 97 updateItemValues(); 98 98 } else 99 HTMLElement::parseAttribute( attribute);99 HTMLElement::parseAttribute(name, value); 100 100 } 101 101 -
trunk/Source/WebCore/html/HTMLOListElement.h
r134322 r135069 54 54 void recalculateItemCount(); 55 55 56 virtual void parseAttribute(const Attribute&) OVERRIDE;56 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 57 57 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 58 58 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLObjectElement.cpp
r134528 r135069 95 95 } 96 96 97 void HTMLObjectElement::parseAttribute(const Attribute& attribute)98 { 99 if ( attribute.name()== formAttr)97 void HTMLObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 98 { 99 if (name == formAttr) 100 100 formAttributeChanged(); 101 else if ( attribute.name()== typeAttr) {102 m_serviceType = attribute.value().lower();101 else if (name == typeAttr) { 102 m_serviceType = value.lower(); 103 103 size_t pos = m_serviceType.find(";"); 104 104 if (pos != notFound) … … 106 106 if (renderer()) 107 107 setNeedsWidgetUpdate(true); 108 } else if ( attribute.name()== dataAttr) {109 m_url = stripLeadingAndTrailingHTMLSpaces( attribute.value());108 } else if (name == dataAttr) { 109 m_url = stripLeadingAndTrailingHTMLSpaces(value); 110 110 if (renderer()) { 111 111 setNeedsWidgetUpdate(true); … … 116 116 } 117 117 } 118 } else if ( attribute.name()== classidAttr) {119 m_classId = attribute.value();118 } else if (name == classidAttr) { 119 m_classId = value; 120 120 if (renderer()) 121 121 setNeedsWidgetUpdate(true); 122 } else if ( attribute.name()== onloadAttr)123 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));124 else if ( attribute.name()== onbeforeloadAttr)125 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute));122 } else if (name == onloadAttr) 123 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 124 else if (name == onbeforeloadAttr) 125 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); 126 126 else 127 HTMLPlugInImageElement::parseAttribute( attribute);127 HTMLPlugInImageElement::parseAttribute(name, value); 128 128 } 129 129 -
trunk/Source/WebCore/html/HTMLObjectElement.h
r134322 r135069 68 68 HTMLObjectElement(const QualifiedName&, Document*, HTMLFormElement*, bool createdByParser); 69 69 70 virtual void parseAttribute(const Attribute&) OVERRIDE;70 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 71 71 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 72 72 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLOptGroupElement.cpp
r134883 r135069 79 79 } 80 80 81 void HTMLOptGroupElement::parseAttribute(const Attribute& attribute)81 void HTMLOptGroupElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 82 82 { 83 HTMLElement::parseAttribute( attribute);83 HTMLElement::parseAttribute(name, value); 84 84 recalcSelectOptions(); 85 85 86 if ( attribute.name()== disabledAttr)86 if (name == disabledAttr) 87 87 invalidateParentDistributionIfNecessary(this, SelectRuleFeatureSet::RuleFeatureDisabled | SelectRuleFeatureSet::RuleFeatureEnabled); 88 88 } -
trunk/Source/WebCore/html/HTMLOptGroupElement.h
r132684 r135069 47 47 virtual bool isFocusable() const; 48 48 virtual bool isEnabledFormControl() const OVERRIDE { return !disabled(); } 49 virtual void parseAttribute(const Attribute&) OVERRIDE;49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 50 50 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; } 51 51 virtual void attach(); -
trunk/Source/WebCore/html/HTMLOptionElement.cpp
r134883 r135069 191 191 } 192 192 193 void HTMLOptionElement::parseAttribute(const Attribute& attribute)193 void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 194 194 { 195 195 #if ENABLE(DATALIST_ELEMENT) 196 if ( attribute.name()== valueAttr) {196 if (name == valueAttr) { 197 197 if (HTMLDataListElement* dataList = ownerDataListElement()) 198 198 dataList->optionElementChildrenChanged(); 199 199 } else 200 200 #endif 201 if ( attribute.name()== disabledAttr) {201 if (name == disabledAttr) { 202 202 bool oldDisabled = m_disabled; 203 m_disabled = ! attribute.isNull();203 m_disabled = !value.isNull(); 204 204 if (oldDisabled != m_disabled) { 205 205 setNeedsStyleRecalc(); … … 208 208 renderer()->theme()->stateChanged(renderer(), EnabledState); 209 209 } 210 } else if ( attribute.name()== selectedAttr) {210 } else if (name == selectedAttr) { 211 211 // FIXME: This doesn't match what the HTML specification says. 212 212 // The specification implies that removing the selected attribute or … … 215 215 // that we need to do more than just set m_isSelected to select in that 216 216 // case; we'd need to do the other work from the setSelected function. 217 m_isSelected = ! attribute.isNull();217 m_isSelected = !value.isNull(); 218 218 } else 219 HTMLElement::parseAttribute( attribute);219 HTMLElement::parseAttribute(name, value); 220 220 } 221 221 -
trunk/Source/WebCore/html/HTMLOptionElement.h
r132684 r135069 77 77 virtual void detach(); 78 78 79 virtual void parseAttribute(const Attribute&) OVERRIDE;79 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 80 80 81 81 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLOutputElement.cpp
r133976 r135069 62 62 } 63 63 64 void HTMLOutputElement::parseAttribute(const Attribute& attribute)64 void HTMLOutputElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 65 65 { 66 if ( attribute.name()== HTMLNames::forAttr)67 setFor( attribute.value());66 if (name == HTMLNames::forAttr) 67 setFor(value); 68 68 else 69 HTMLFormControlElement::parseAttribute( attribute);69 HTMLFormControlElement::parseAttribute(name, value); 70 70 } 71 71 -
trunk/Source/WebCore/html/HTMLOutputElement.h
r117195 r135069 56 56 HTMLOutputElement(const QualifiedName&, Document*, HTMLFormElement*); 57 57 58 virtual void parseAttribute(const Attribute&) OVERRIDE;58 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 59 59 virtual const AtomicString& formControlType() const; 60 60 virtual bool isEnumeratable() const { return true; } -
trunk/Source/WebCore/html/HTMLProgressElement.cpp
r134938 r135069 95 95 } 96 96 97 void HTMLProgressElement::parseAttribute(const Attribute& attribute)97 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 98 98 { 99 if ( attribute.name()== valueAttr)99 if (name == valueAttr) 100 100 didElementStateChange(); 101 else if ( attribute.name()== maxAttr)101 else if (name == maxAttr) 102 102 didElementStateChange(); 103 103 else 104 LabelableElement::parseAttribute( attribute);104 LabelableElement::parseAttribute(name, value); 105 105 } 106 106 -
trunk/Source/WebCore/html/HTMLProgressElement.h
r128856 r135069 66 66 RenderProgress* renderProgress() const; 67 67 68 virtual void parseAttribute(const Attribute&) OVERRIDE;68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 69 69 70 70 virtual void attach(); -
trunk/Source/WebCore/html/HTMLScriptElement.cpp
r118963 r135069 59 59 } 60 60 61 void HTMLScriptElement::parseAttribute(const Attribute& attribute)61 void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 62 62 { 63 if ( attribute.name()== srcAttr)64 handleSourceAttribute( attribute.value());65 else if ( attribute.name()== asyncAttr)63 if (name == srcAttr) 64 handleSourceAttribute(value); 65 else if (name == asyncAttr) 66 66 handleAsyncAttribute(); 67 else if ( attribute.name()== onloadAttr)68 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));69 else if ( attribute.name()== onbeforeloadAttr)70 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, attribute));67 else if (name == onloadAttr) 68 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 69 else if (name == onbeforeloadAttr) 70 setAttributeEventListener(eventNames().beforeloadEvent, createAttributeEventListener(this, name, value)); 71 71 else 72 HTMLElement::parseAttribute( attribute);72 HTMLElement::parseAttribute(name, value); 73 73 } 74 74 -
trunk/Source/WebCore/html/HTMLScriptElement.h
r118963 r135069 45 45 HTMLScriptElement(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted); 46 46 47 virtual void parseAttribute(const Attribute&) OVERRIDE;47 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 48 48 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 49 49 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r133976 r135069 285 285 } 286 286 287 void HTMLSelectElement::parseAttribute(const Attribute& attribute)288 { 289 if ( attribute.name()== sizeAttr) {287 void HTMLSelectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 288 { 289 if (name == sizeAttr) { 290 290 int oldSize = m_size; 291 291 // Set the attribute value to a number. 292 292 // This is important since the style rules for this attribute can determine the appearance property. 293 int size = attribute.value().toInt();293 int size = value.toInt(); 294 294 String attrSize = String::number(size); 295 if (attrSize != attribute.value()) {295 if (attrSize != value) { 296 296 // FIXME: This is horribly factored. 297 297 if (Attribute* sizeAttribute = getAttributeItem(sizeAttr)) … … 310 310 setRecalcListItems(); 311 311 } 312 } else if ( attribute.name()== multipleAttr)313 parseMultipleAttribute( attribute);314 else if ( attribute.name()== accesskeyAttr) {312 } else if (name == multipleAttr) 313 parseMultipleAttribute(value); 314 else if (name == accesskeyAttr) { 315 315 // FIXME: ignore for the moment. 316 } else if ( attribute.name()== onchangeAttr)317 setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, attribute));316 } else if (name == onchangeAttr) 317 setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, name, value)); 318 318 else 319 HTMLFormControlElementWithState::parseAttribute( attribute);319 HTMLFormControlElementWithState::parseAttribute(name, value); 320 320 } 321 321 … … 1001 1001 } 1002 1002 1003 void HTMLSelectElement::parseMultipleAttribute(const At tribute& attribute)1003 void HTMLSelectElement::parseMultipleAttribute(const AtomicString& value) 1004 1004 { 1005 1005 bool oldUsesMenuList = usesMenuList(); 1006 m_multiple = ! attribute.isNull();1006 m_multiple = !value.isNull(); 1007 1007 setNeedsValidityCheck(); 1008 1008 if (oldUsesMenuList != usesMenuList()) -
trunk/Source/WebCore/html/HTMLSelectElement.h
r128323 r135069 125 125 virtual void restoreFormControlState(const FormControlState&) OVERRIDE; 126 126 127 virtual void parseAttribute(const Attribute&) OVERRIDE;127 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 128 128 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 129 129 … … 159 159 void selectOption(int optionIndex, SelectOptionFlags = 0); 160 160 void deselectItemsWithoutValidation(HTMLElement* elementToExclude = 0); 161 void parseMultipleAttribute(const At tribute&);161 void parseMultipleAttribute(const AtomicString&); 162 162 int lastSelectedListIndex() const; 163 163 void updateSelectedState(int listIndex, bool multi, bool shift); -
trunk/Source/WebCore/html/HTMLStyleElement.cpp
r132621 r135069 71 71 } 72 72 73 void HTMLStyleElement::parseAttribute(const Attribute& attribute)74 { 75 if ( attribute.name()== titleAttr && m_sheet)76 m_sheet->setTitle( attribute.value());77 else if ( attribute.name()== onloadAttr)78 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));79 else if ( attribute.name()== onerrorAttr)80 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attribute));81 else if ( attribute.name()== scopedAttr && ContextFeatures::styleScopedEnabled(document()))82 scopedAttributeChanged(! attribute.isNull());83 else if ( attribute.name()== mediaAttr && inDocument() && document()->renderer() && m_sheet) {84 m_sheet->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax( attribute.value()));73 void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 74 { 75 if (name == titleAttr && m_sheet) 76 m_sheet->setTitle(value); 77 else if (name == onloadAttr) 78 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 79 else if (name == onerrorAttr) 80 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, name, value)); 81 else if (name == scopedAttr && ContextFeatures::styleScopedEnabled(document())) 82 scopedAttributeChanged(!value.isNull()); 83 else if (name == mediaAttr && inDocument() && document()->renderer() && m_sheet) { 84 m_sheet->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(value)); 85 85 document()->styleResolverChanged(RecalcStyleImmediately); 86 86 } else 87 HTMLElement::parseAttribute( attribute);87 HTMLElement::parseAttribute(name, value); 88 88 } 89 89 -
trunk/Source/WebCore/html/HTMLStyleElement.h
r132621 r135069 66 66 67 67 // overload from HTMLElement 68 virtual void parseAttribute(const Attribute&) OVERRIDE;68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 69 69 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 70 70 virtual void removedFrom(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLTableCellElement.cpp
r134322 r135069 106 106 } 107 107 108 void HTMLTableCellElement::parseAttribute(const Attribute& attribute)109 { 110 if ( attribute.name()== rowspanAttr) {108 void HTMLTableCellElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 109 { 110 if (name == rowspanAttr) { 111 111 if (renderer() && renderer()->isTableCell()) 112 112 toRenderTableCell(renderer())->colSpanOrRowSpanChanged(); 113 } else if ( attribute.name()== colspanAttr) {113 } else if (name == colspanAttr) { 114 114 if (renderer() && renderer()->isTableCell()) 115 115 toRenderTableCell(renderer())->colSpanOrRowSpanChanged(); 116 116 } else 117 HTMLTablePartElement::parseAttribute( attribute);117 HTMLTablePartElement::parseAttribute(name, value); 118 118 } 119 119 -
trunk/Source/WebCore/html/HTMLTableCellElement.h
r134322 r135069 54 54 HTMLTableCellElement(const QualifiedName&, Document*); 55 55 56 virtual void parseAttribute(const Attribute&) OVERRIDE;56 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 57 57 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 58 58 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLTableColElement.cpp
r134322 r135069 63 63 } 64 64 65 void HTMLTableColElement::parseAttribute(const Attribute& attribute)65 void HTMLTableColElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 66 66 { 67 if ( attribute.name()== spanAttr) {68 m_span = ! attribute.isNull() ? attribute.value().toInt() : 1;67 if (name == spanAttr) { 68 m_span = !value.isNull() ? value.toInt() : 1; 69 69 if (renderer() && renderer()->isRenderTableCol()) 70 70 renderer()->updateFromElement(); 71 } else if ( attribute.name()== widthAttr) {72 if (! attribute.isEmpty()) {71 } else if (name == widthAttr) { 72 if (!value.isEmpty()) { 73 73 if (renderer() && renderer()->isRenderTableCol()) { 74 74 RenderTableCol* col = toRenderTableCol(renderer()); … … 79 79 } 80 80 } else 81 HTMLTablePartElement::parseAttribute( attribute);81 HTMLTablePartElement::parseAttribute(name, value); 82 82 } 83 83 -
trunk/Source/WebCore/html/HTMLTableColElement.h
r134322 r135069 43 43 HTMLTableColElement(const QualifiedName& tagName, Document*); 44 44 45 virtual void parseAttribute(const Attribute&) OVERRIDE;45 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 46 46 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 47 47 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLTableElement.cpp
r134322 r135069 370 370 } 371 371 372 void HTMLTableElement::parseAttribute(const Attribute& attribute)372 void HTMLTableElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 373 373 { 374 374 CellBorders bordersBefore = cellBorders(); 375 375 unsigned short oldPadding = m_padding; 376 376 377 if ( attribute.name()== borderAttr) {377 if (name == borderAttr) { 378 378 // FIXME: This attribute is a mess. 379 379 m_borderAttr = true; 380 if (! attribute.isNull()) {381 int border = attribute.isEmpty() ? 1 : attribute.value().toInt();380 if (!value.isNull()) { 381 int border = value.isEmpty() ? 1 : value.toInt(); 382 382 m_borderAttr = border; 383 383 } 384 } else if ( attribute.name()== bordercolorAttr) {385 m_borderColorAttr = ! attribute.isEmpty();386 } else if ( attribute.name()== frameAttr) {384 } else if (name == bordercolorAttr) { 385 m_borderColorAttr = !value.isEmpty(); 386 } else if (name == frameAttr) { 387 387 // FIXME: This attribute is a mess. 388 388 bool borderTop; … … 390 390 bool borderBottom; 391 391 bool borderLeft; 392 m_frameAttr = getBordersFromFrameAttributeValue( attribute.value(), borderTop, borderRight, borderBottom, borderLeft);393 } else if ( attribute.name()== rulesAttr) {392 m_frameAttr = getBordersFromFrameAttributeValue(value, borderTop, borderRight, borderBottom, borderLeft); 393 } else if (name == rulesAttr) { 394 394 m_rulesAttr = UnsetRules; 395 if (equalIgnoringCase( attribute.value(), "none"))395 if (equalIgnoringCase(value, "none")) 396 396 m_rulesAttr = NoneRules; 397 else if (equalIgnoringCase( attribute.value(), "groups"))397 else if (equalIgnoringCase(value, "groups")) 398 398 m_rulesAttr = GroupsRules; 399 else if (equalIgnoringCase( attribute.value(), "rows"))399 else if (equalIgnoringCase(value, "rows")) 400 400 m_rulesAttr = RowsRules; 401 if (equalIgnoringCase(attribute.value(), "cols"))401 else if (equalIgnoringCase(value, "cols")) 402 402 m_rulesAttr = ColsRules; 403 if (equalIgnoringCase(attribute.value(), "all"))403 else if (equalIgnoringCase(value, "all")) 404 404 m_rulesAttr = AllRules; 405 } else if ( attribute.name()== cellpaddingAttr) {406 if (! attribute.value().isEmpty())407 m_padding = max(0, attribute.value().toInt());405 } else if (name == cellpaddingAttr) { 406 if (!value.isEmpty()) 407 m_padding = max(0, value.toInt()); 408 408 else 409 409 m_padding = 1; 410 } else if ( attribute.name()== colsAttr) {410 } else if (name == colsAttr) { 411 411 // ### 412 412 } else 413 HTMLElement::parseAttribute( attribute);413 HTMLElement::parseAttribute(name, value); 414 414 415 415 if (bordersBefore != cellBorders() || oldPadding != m_padding) { -
trunk/Source/WebCore/html/HTMLTableElement.h
r134322 r135069 72 72 HTMLTableElement(const QualifiedName&, Document*); 73 73 74 virtual void parseAttribute(const Attribute&) OVERRIDE;74 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 75 75 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 76 76 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
r134322 r135069 163 163 } 164 164 165 void HTMLTextAreaElement::parseAttribute(const Attribute& attribute)166 { 167 if ( attribute.name()== rowsAttr) {168 int rows = attribute.value().toInt();165 void HTMLTextAreaElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 166 { 167 if (name == rowsAttr) { 168 int rows = value.toInt(); 169 169 if (rows <= 0) 170 170 rows = defaultRows; … … 174 174 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 175 175 } 176 } else if ( attribute.name()== colsAttr) {177 int cols = attribute.value().toInt();176 } else if (name == colsAttr) { 177 int cols = value.toInt(); 178 178 if (cols <= 0) 179 179 cols = defaultCols; … … 183 183 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 184 184 } 185 } else if ( attribute.name()== wrapAttr) {185 } else if (name == wrapAttr) { 186 186 // The virtual/physical values were a Netscape extension of HTML 3.0, now deprecated. 187 187 // The soft/hard /off values are a recommendation for HTML 4 extension by IE and NS 4. 188 188 WrapMethod wrap; 189 if (equalIgnoringCase( attribute.value(), "physical") || equalIgnoringCase(attribute.value(), "hard") || equalIgnoringCase(attribute.value(), "on"))189 if (equalIgnoringCase(value, "physical") || equalIgnoringCase(value, "hard") || equalIgnoringCase(value, "on")) 190 190 wrap = HardWrap; 191 else if (equalIgnoringCase( attribute.value(), "off"))191 else if (equalIgnoringCase(value, "off")) 192 192 wrap = NoWrap; 193 193 else … … 198 198 renderer()->setNeedsLayoutAndPrefWidthsRecalc(); 199 199 } 200 } else if ( attribute.name()== accesskeyAttr) {200 } else if (name == accesskeyAttr) { 201 201 // ignore for the moment 202 } else if ( attribute.name()== maxlengthAttr)202 } else if (name == maxlengthAttr) 203 203 setNeedsValidityCheck(); 204 204 else 205 HTMLTextFormControlElement::parseAttribute( attribute);205 HTMLTextFormControlElement::parseAttribute(name, value); 206 206 } 207 207 -
trunk/Source/WebCore/html/HTMLTextAreaElement.h
r134322 r135069 98 98 99 99 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 100 virtual void parseAttribute(const Attribute&) OVERRIDE;100 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 101 101 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 102 102 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp
r133976 r135069 504 504 } 505 505 506 void HTMLTextFormControlElement::parseAttribute(const Attribute& attribute)507 { 508 if ( attribute.name()== placeholderAttr)506 void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 507 { 508 if (name == placeholderAttr) 509 509 updatePlaceholderVisibility(true); 510 else if ( attribute.name()== onselectAttr)511 setAttributeEventListener(eventNames().selectEvent, createAttributeEventListener(this, attribute));512 else if ( attribute.name()== onchangeAttr)513 setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, attribute));510 else if (name == onselectAttr) 511 setAttributeEventListener(eventNames().selectEvent, createAttributeEventListener(this, name, value)); 512 else if (name == onchangeAttr) 513 setAttributeEventListener(eventNames().changeEvent, createAttributeEventListener(this, name, value)); 514 514 else 515 HTMLFormControlElementWithState::parseAttribute( attribute);515 HTMLFormControlElementWithState::parseAttribute(name, value); 516 516 } 517 517 -
trunk/Source/WebCore/html/HTMLTextFormControlElement.h
r133275 r135069 95 95 virtual void updatePlaceholderText() = 0; 96 96 97 virtual void parseAttribute(const Attribute&) OVERRIDE;97 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 98 98 99 99 void cacheSelection(int start, int end, TextFieldSelectionDirection direction) -
trunk/Source/WebCore/html/HTMLTrackElement.cpp
r126968 r135069 96 96 } 97 97 98 void HTMLTrackElement::parseAttribute(const Attribute& attribute)98 void HTMLTrackElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 99 99 { 100 100 if (RuntimeEnabledFeatures::webkitVideoTrackEnabled()) { 101 if ( attribute.name()== srcAttr) {102 if (! attribute.isEmpty() && mediaElement())101 if (name == srcAttr) { 102 if (!value.isEmpty() && mediaElement()) 103 103 scheduleLoad(); 104 104 // 4.8.10.12.3 Sourcing out-of-band text tracks 105 105 // As the kind, label, and srclang attributes are set, changed, or removed, the text track must update accordingly... 106 } else if ( attribute.name()== kindAttr)107 track()->setKind( attribute.value());108 else if ( attribute.name()== labelAttr)109 track()->setLabel( attribute.value());110 else if ( attribute.name()== srclangAttr)111 track()->setLanguage( attribute.value());112 } 113 114 if ( attribute.name()== onloadAttr)115 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));116 else if ( attribute.name()== onerrorAttr)117 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attribute));106 } else if (name == kindAttr) 107 track()->setKind(value); 108 else if (name == labelAttr) 109 track()->setLabel(value); 110 else if (name == srclangAttr) 111 track()->setLanguage(value); 112 } 113 114 if (name == onloadAttr) 115 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 116 else if (name == onerrorAttr) 117 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, name, value)); 118 118 else 119 HTMLElement::parseAttribute( attribute);119 HTMLElement::parseAttribute(name, value); 120 120 } 121 121 -
trunk/Source/WebCore/html/HTMLTrackElement.h
r118192 r135069 76 76 virtual ~HTMLTrackElement(); 77 77 78 virtual void parseAttribute(const Attribute&) OVERRIDE;78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 79 79 80 80 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r134322 r135069 105 105 } 106 106 107 void HTMLVideoElement::parseAttribute(const Attribute& attribute)108 { 109 if ( attribute.name()== posterAttr) {107 void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 108 { 109 if (name == posterAttr) { 110 110 // Force a poster recalc by setting m_displayMode to Unknown directly before calling updateDisplayState. 111 111 HTMLMediaElement::setDisplayMode(Unknown); … … 122 122 #endif 123 123 } else 124 HTMLMediaElement::parseAttribute( attribute);124 HTMLMediaElement::parseAttribute(name, value); 125 125 } 126 126 -
trunk/Source/WebCore/html/HTMLVideoElement.h
r134322 r135069 76 76 #endif 77 77 virtual void attach(); 78 virtual void parseAttribute(const Attribute&) OVERRIDE;78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 79 79 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 80 80 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp
r134184 r135069 99 99 } 100 100 101 void HTMLContentElement::parseAttribute(const Attribute& attribute)102 { 103 if ( attribute.name()== selectAttr) {101 void HTMLContentElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 102 { 103 if (name == selectAttr) { 104 104 if (ShadowRoot* root = shadowRoot()) { 105 105 root->owner()->setShouldCollectSelectFeatureSet(); … … 108 108 m_shouldParseSelectorList = true; 109 109 } else 110 InsertionPoint::parseAttribute( attribute);110 InsertionPoint::parseAttribute(name, value); 111 111 } 112 112 -
trunk/Source/WebCore/html/shadow/HTMLContentElement.h
r134184 r135069 58 58 59 59 private: 60 virtual void parseAttribute(const Attribute&) OVERRIDE;60 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 61 61 void ensureSelectParsed(); 62 62 bool validateSelect() const; -
trunk/Source/WebCore/mathml/MathMLElement.cpp
r134322 r135069 66 66 } 67 67 68 void MathMLElement::parseAttribute(const Attribute& attribute)68 void MathMLElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 69 69 { 70 if ( attribute.name()== rowspanAttr) {70 if (name == rowspanAttr) { 71 71 if (renderer() && renderer()->isTableCell() && hasTagName(mtdTag)) 72 72 toRenderTableCell(renderer())->colSpanOrRowSpanChanged(); 73 } else if ( attribute.name()== columnspanAttr) {73 } else if (name == columnspanAttr) { 74 74 if (renderer() && renderer()->isTableCell() && hasTagName(mtdTag)) 75 75 toRenderTableCell(renderer())->colSpanOrRowSpanChanged(); 76 76 } else 77 StyledElement::parseAttribute( attribute);77 StyledElement::parseAttribute(name, value); 78 78 } 79 79 -
trunk/Source/WebCore/mathml/MathMLElement.h
r134322 r135069 44 44 MathMLElement(const QualifiedName& tagName, Document*); 45 45 46 virtual void parseAttribute(const Attribute&) OVERRIDE;46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 47 47 48 48 private: -
trunk/Source/WebCore/svg/SVGAElement.cpp
r124538 r135069 100 100 } 101 101 102 void SVGAElement::parseAttribute(const Attribute& attribute)103 { 104 if (!isSupportedAttribute( attribute.name())) {105 SVGStyledTransformableElement::parseAttribute( attribute);106 return; 107 } 108 109 if ( attribute.name()== SVGNames::targetAttr) {110 setSVGTargetBaseValue( attribute.value());111 return; 112 } 113 114 if (SVGURIReference::parseAttribute( attribute))115 return; 116 if (SVGTests::parseAttribute( attribute))117 return; 118 if (SVGLangSpace::parseAttribute( attribute))119 return; 120 if (SVGExternalResourcesRequired::parseAttribute( attribute))102 void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 103 { 104 if (!isSupportedAttribute(name)) { 105 SVGStyledTransformableElement::parseAttribute(name, value); 106 return; 107 } 108 109 if (name == SVGNames::targetAttr) { 110 setSVGTargetBaseValue(value); 111 return; 112 } 113 114 if (SVGURIReference::parseAttribute(name, value)) 115 return; 116 if (SVGTests::parseAttribute(name, value)) 117 return; 118 if (SVGLangSpace::parseAttribute(name, value)) 119 return; 120 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 121 121 return; 122 122 -
trunk/Source/WebCore/svg/SVGAElement.h
r117225 r135069 50 50 51 51 bool isSupportedAttribute(const QualifiedName&); 52 virtual void parseAttribute(const Attribute&) OVERRIDE;52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 53 53 virtual void svgAttributeChanged(const QualifiedName&); 54 54 -
trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp
r133976 r135069 103 103 } 104 104 105 void SVGAnimateMotionElement::parseAttribute(const Attribute& attribute)106 { 107 if (!isSupportedAttribute( attribute.name())) {108 SVGAnimationElement::parseAttribute( attribute);109 return; 110 } 111 112 if ( attribute.name()== SVGNames::pathAttr) {105 void SVGAnimateMotionElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 106 { 107 if (!isSupportedAttribute(name)) { 108 SVGAnimationElement::parseAttribute(name, value); 109 return; 110 } 111 112 if (name == SVGNames::pathAttr) { 113 113 m_path = Path(); 114 buildPathFromString( attribute.value(), m_path);114 buildPathFromString(value, m_path); 115 115 updateAnimationPath(); 116 116 return; -
trunk/Source/WebCore/svg/SVGAnimateMotionElement.h
r133074 r135069 40 40 41 41 bool isSupportedAttribute(const QualifiedName&); 42 virtual void parseAttribute(const Attribute&) OVERRIDE;42 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 43 43 44 44 virtual void resetAnimatedType(); -
trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp
r118379 r135069 61 61 } 62 62 63 void SVGAnimateTransformElement::parseAttribute(const Attribute& attribute)63 void SVGAnimateTransformElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 64 64 { 65 if (!isSupportedAttribute( attribute.name())) {66 SVGAnimateElement::parseAttribute( attribute);65 if (!isSupportedAttribute(name)) { 66 SVGAnimateElement::parseAttribute(name, value); 67 67 return; 68 68 } 69 69 70 if ( attribute.name()== SVGNames::typeAttr) {71 m_type = SVGTransformable::parseTransformType( attribute.value());70 if (name == SVGNames::typeAttr) { 71 m_type = SVGTransformable::parseTransformType(value); 72 72 if (m_type == SVGTransform::SVG_TRANSFORM_MATRIX) 73 73 m_type = SVGTransform::SVG_TRANSFORM_UNKNOWN; -
trunk/Source/WebCore/svg/SVGAnimateTransformElement.h
r117195 r135069 44 44 45 45 bool isSupportedAttribute(const QualifiedName&); 46 virtual void parseAttribute(const Attribute&) OVERRIDE;46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 47 47 48 48 SVGTransform::SVGTransformType m_type; -
trunk/Source/WebCore/svg/SVGAnimationElement.cpp
r133976 r135069 160 160 } 161 161 162 void SVGAnimationElement::parseAttribute(const Attribute& attribute)163 { 164 if (!isSupportedAttribute( attribute.name())) {165 SVGSMILElement::parseAttribute( attribute);166 return; 167 } 168 169 if ( attribute.name()== SVGNames::valuesAttr) {162 void SVGAnimationElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 163 { 164 if (!isSupportedAttribute(name)) { 165 SVGSMILElement::parseAttribute(name, value); 166 return; 167 } 168 169 if (name == SVGNames::valuesAttr) { 170 170 // Per the SMIL specification, leading and trailing white space, 171 171 // and white space before and after semicolon separators, is allowed and will be ignored. 172 172 // http://www.w3.org/TR/SVG11/animate.html#ValuesAttribute 173 attribute.value().string().split(';', m_values);173 value.string().split(';', m_values); 174 174 for (unsigned i = 0; i < m_values.size(); ++i) 175 175 m_values[i] = m_values[i].stripWhiteSpace(); … … 179 179 } 180 180 181 if ( attribute.name()== SVGNames::keyTimesAttr) {182 parseKeyTimes( attribute.value(), m_keyTimes, true);183 return; 184 } 185 186 if ( attribute.name()== SVGNames::keyPointsAttr) {181 if (name == SVGNames::keyTimesAttr) { 182 parseKeyTimes(value, m_keyTimes, true); 183 return; 184 } 185 186 if (name == SVGNames::keyPointsAttr) { 187 187 if (hasTagName(SVGNames::animateMotionTag)) { 188 188 // This is specified to be an animateMotion attribute only but it is simpler to put it here 189 189 // where the other timing calculatations are. 190 parseKeyTimes( attribute.value(), m_keyPoints, false);190 parseKeyTimes(value, m_keyPoints, false); 191 191 } 192 192 return; 193 193 } 194 194 195 if ( attribute.name()== SVGNames::keySplinesAttr) {196 parseKeySplines( attribute.value(), m_keySplines);197 return; 198 } 199 200 if ( attribute.name()== SVGNames::attributeTypeAttr) {201 setAttributeType( attribute.value());202 return; 203 } 204 205 if ( attribute.name()== SVGNames::calcModeAttr) {206 setCalcMode( attribute.value());207 return; 208 } 209 210 if ( attribute.name() == SVGNames::fromAttr || attribute.name() == SVGNames::toAttr || attribute.name()== SVGNames::byAttr) {195 if (name == SVGNames::keySplinesAttr) { 196 parseKeySplines(value, m_keySplines); 197 return; 198 } 199 200 if (name == SVGNames::attributeTypeAttr) { 201 setAttributeType(value); 202 return; 203 } 204 205 if (name == SVGNames::calcModeAttr) { 206 setCalcMode(value); 207 return; 208 } 209 210 if (name == SVGNames::fromAttr || name == SVGNames::toAttr || name == SVGNames::byAttr) { 211 211 updateAnimationMode(); 212 212 return; 213 213 } 214 214 215 if (SVGTests::parseAttribute( attribute))216 return; 217 if (SVGExternalResourcesRequired::parseAttribute( attribute))215 if (SVGTests::parseAttribute(name, value)) 216 return; 217 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 218 218 return; 219 219 -
trunk/Source/WebCore/svg/SVGAnimationElement.h
r133074 r135069 175 175 176 176 bool isSupportedAttribute(const QualifiedName&); 177 virtual void parseAttribute(const Attribute&) OVERRIDE;177 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 178 178 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 179 179 -
trunk/Source/WebCore/svg/SVGCircleElement.cpp
r117195 r135069 81 81 } 82 82 83 void SVGCircleElement::parseAttribute(const Attribute& attribute)83 void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 84 84 { 85 85 SVGParsingError parseError = NoError; 86 86 87 if (!isSupportedAttribute( attribute.name()))88 SVGStyledTransformableElement::parseAttribute( attribute);89 else if ( attribute.name()== SVGNames::cxAttr)90 setCxBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));91 else if ( attribute.name()== SVGNames::cyAttr)92 setCyBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));93 else if ( attribute.name()== SVGNames::rAttr)94 setRBaseValue(SVGLength::construct(LengthModeOther, attribute.value(), parseError, ForbidNegativeLengths));95 else if (SVGTests::parseAttribute( attribute)96 || SVGLangSpace::parseAttribute( attribute)97 || SVGExternalResourcesRequired::parseAttribute( attribute)) {87 if (!isSupportedAttribute(name)) 88 SVGStyledTransformableElement::parseAttribute(name, value); 89 else if (name == SVGNames::cxAttr) 90 setCxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 91 else if (name == SVGNames::cyAttr) 92 setCyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 93 else if (name == SVGNames::rAttr) 94 setRBaseValue(SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths)); 95 else if (SVGTests::parseAttribute(name, value) 96 || SVGLangSpace::parseAttribute(name, value) 97 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 98 98 } else 99 99 ASSERT_NOT_REACHED(); 100 100 101 reportAttributeParsingError(parseError, attribute);101 reportAttributeParsingError(parseError, name, value); 102 102 } 103 103 -
trunk/Source/WebCore/svg/SVGCircleElement.h
r117195 r135069 46 46 47 47 bool isSupportedAttribute(const QualifiedName&); 48 virtual void parseAttribute(const Attribute&) OVERRIDE;48 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 49 49 virtual void svgAttributeChanged(const QualifiedName&); 50 50 -
trunk/Source/WebCore/svg/SVGClipPathElement.cpp
r117195 r135069 71 71 } 72 72 73 void SVGClipPathElement::parseAttribute(const Attribute& attribute)73 void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 74 74 { 75 if (!isSupportedAttribute( attribute.name())) {76 SVGStyledTransformableElement::parseAttribute( attribute);75 if (!isSupportedAttribute(name)) { 76 SVGStyledTransformableElement::parseAttribute(name, value); 77 77 return; 78 78 } 79 79 80 if ( attribute.name()== SVGNames::clipPathUnitsAttr) {81 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString( attribute.value());80 if (name == SVGNames::clipPathUnitsAttr) { 81 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 82 82 if (propertyValue > 0) 83 83 setClipPathUnitsBaseValue(propertyValue); … … 85 85 } 86 86 87 if (SVGTests::parseAttribute( attribute))87 if (SVGTests::parseAttribute(name, value)) 88 88 return; 89 if (SVGLangSpace::parseAttribute( attribute))89 if (SVGLangSpace::parseAttribute(name, value)) 90 90 return; 91 if (SVGExternalResourcesRequired::parseAttribute( attribute))91 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 92 92 return; 93 93 -
trunk/Source/WebCore/svg/SVGClipPathElement.h
r117195 r135069 49 49 50 50 bool isSupportedAttribute(const QualifiedName&); 51 virtual void parseAttribute(const Attribute&) OVERRIDE;51 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 52 52 virtual void svgAttributeChanged(const QualifiedName&); 53 53 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp
r117195 r135069 76 76 } 77 77 78 void SVGComponentTransferFunctionElement::parseAttribute(const Attribute& attribute)78 void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 79 79 { 80 if (!isSupportedAttribute( attribute.name())) {81 SVGElement::parseAttribute( attribute);80 if (!isSupportedAttribute(name)) { 81 SVGElement::parseAttribute(name, value); 82 82 return; 83 83 } 84 84 85 const AtomicString& value = attribute.value(); 86 if (attribute.name() == SVGNames::typeAttr) { 85 if (name == SVGNames::typeAttr) { 87 86 ComponentTransferType propertyValue = SVGPropertyTraits<ComponentTransferType>::fromString(value); 88 87 if (propertyValue > 0) … … 91 90 } 92 91 93 if ( attribute.name()== SVGNames::tableValuesAttr) {92 if (name == SVGNames::tableValuesAttr) { 94 93 SVGNumberList newList; 95 94 newList.parse(value); … … 99 98 } 100 99 101 if ( attribute.name()== SVGNames::slopeAttr) {100 if (name == SVGNames::slopeAttr) { 102 101 setSlopeBaseValue(value.toFloat()); 103 102 return; 104 103 } 105 104 106 if ( attribute.name()== SVGNames::interceptAttr) {105 if (name == SVGNames::interceptAttr) { 107 106 setInterceptBaseValue(value.toFloat()); 108 107 return; 109 108 } 110 109 111 if ( attribute.name()== SVGNames::amplitudeAttr) {110 if (name == SVGNames::amplitudeAttr) { 112 111 setAmplitudeBaseValue(value.toFloat()); 113 112 return; 114 113 } 115 114 116 if ( attribute.name()== SVGNames::exponentAttr) {115 if (name == SVGNames::exponentAttr) { 117 116 setExponentBaseValue(value.toFloat()); 118 117 return; 119 118 } 120 119 121 if ( attribute.name()== SVGNames::offsetAttr) {120 if (name == SVGNames::offsetAttr) { 122 121 setOffsetBaseValue(value.toFloat()); 123 122 return; -
trunk/Source/WebCore/svg/SVGComponentTransferFunctionElement.h
r117195 r135069 79 79 80 80 bool isSupportedAttribute(const QualifiedName&); 81 virtual void parseAttribute(const Attribute&) OVERRIDE;81 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 82 82 virtual void svgAttributeChanged(const QualifiedName&); 83 83 -
trunk/Source/WebCore/svg/SVGCursorElement.cpp
r118963 r135069 79 79 } 80 80 81 void SVGCursorElement::parseAttribute(const Attribute& attribute)81 void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 82 82 { 83 83 SVGParsingError parseError = NoError; 84 84 85 if (!isSupportedAttribute( attribute.name()))86 SVGElement::parseAttribute( attribute);87 else if ( attribute.name()== SVGNames::xAttr)88 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));89 else if ( attribute.name()== SVGNames::yAttr)90 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));91 else if (SVGTests::parseAttribute( attribute)92 || SVGExternalResourcesRequired::parseAttribute( attribute)93 || SVGURIReference::parseAttribute( attribute)) {85 if (!isSupportedAttribute(name)) 86 SVGElement::parseAttribute(name, value); 87 else if (name == SVGNames::xAttr) 88 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 89 else if (name == SVGNames::yAttr) 90 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 91 else if (SVGTests::parseAttribute(name, value) 92 || SVGExternalResourcesRequired::parseAttribute(name, value) 93 || SVGURIReference::parseAttribute(name, value)) { 94 94 } else 95 95 ASSERT_NOT_REACHED(); 96 96 97 reportAttributeParsingError(parseError, attribute);97 reportAttributeParsingError(parseError, name, value); 98 98 } 99 99 -
trunk/Source/WebCore/svg/SVGCursorElement.h
r118963 r135069 52 52 53 53 bool isSupportedAttribute(const QualifiedName&); 54 virtual void parseAttribute(const Attribute&) OVERRIDE;54 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 55 55 virtual void svgAttributeChanged(const QualifiedName&); 56 56 -
trunk/Source/WebCore/svg/SVGElement.cpp
r132847 r135069 140 140 } 141 141 142 void SVGElement::reportAttributeParsingError(SVGParsingError error, const Attribute& attribute)142 void SVGElement::reportAttributeParsingError(SVGParsingError error, const QualifiedName& name, const AtomicString& value) 143 143 { 144 144 if (error == NoError) 145 145 return; 146 146 147 String errorString = "<" + tagName() + "> attribute " + attribute.name().toString() + "=\"" + attribute.value()+ "\"";147 String errorString = "<" + tagName() + "> attribute " + name.toString() + "=\"" + value + "\""; 148 148 SVGDocumentExtensions* extensions = document()->accessSVGExtensions(); 149 149 … … 313 313 } 314 314 315 void SVGElement::parseAttribute(const Attribute& attribute)315 void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 316 316 { 317 317 // standard events 318 if ( attribute.name()== onloadAttr)319 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attribute));320 else if ( attribute.name()== onclickAttr)321 setAttributeEventListener(eventNames().clickEvent, createAttributeEventListener(this, attribute));322 else if ( attribute.name()== onmousedownAttr)323 setAttributeEventListener(eventNames().mousedownEvent, createAttributeEventListener(this, attribute));324 else if ( attribute.name()== onmousemoveAttr)325 setAttributeEventListener(eventNames().mousemoveEvent, createAttributeEventListener(this, attribute));326 else if ( attribute.name()== onmouseoutAttr)327 setAttributeEventListener(eventNames().mouseoutEvent, createAttributeEventListener(this, attribute));328 else if ( attribute.name()== onmouseoverAttr)329 setAttributeEventListener(eventNames().mouseoverEvent, createAttributeEventListener(this, attribute));330 else if ( attribute.name()== onmouseupAttr)331 setAttributeEventListener(eventNames().mouseupEvent, createAttributeEventListener(this, attribute));332 else if ( attribute.name()== SVGNames::onfocusinAttr)333 setAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(this, attribute));334 else if ( attribute.name()== SVGNames::onfocusoutAttr)335 setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, attribute));336 else if ( attribute.name()== SVGNames::onactivateAttr)337 setAttributeEventListener(eventNames().DOMActivateEvent, createAttributeEventListener(this, attribute));318 if (name == onloadAttr) 319 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, name, value)); 320 else if (name == onclickAttr) 321 setAttributeEventListener(eventNames().clickEvent, createAttributeEventListener(this, name, value)); 322 else if (name == onmousedownAttr) 323 setAttributeEventListener(eventNames().mousedownEvent, createAttributeEventListener(this, name, value)); 324 else if (name == onmousemoveAttr) 325 setAttributeEventListener(eventNames().mousemoveEvent, createAttributeEventListener(this, name, value)); 326 else if (name == onmouseoutAttr) 327 setAttributeEventListener(eventNames().mouseoutEvent, createAttributeEventListener(this, name, value)); 328 else if (name == onmouseoverAttr) 329 setAttributeEventListener(eventNames().mouseoverEvent, createAttributeEventListener(this, name, value)); 330 else if (name == onmouseupAttr) 331 setAttributeEventListener(eventNames().mouseupEvent, createAttributeEventListener(this, name, value)); 332 else if (name == SVGNames::onfocusinAttr) 333 setAttributeEventListener(eventNames().focusinEvent, createAttributeEventListener(this, name, value)); 334 else if (name == SVGNames::onfocusoutAttr) 335 setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, name, value)); 336 else if (name == SVGNames::onactivateAttr) 337 setAttributeEventListener(eventNames().DOMActivateEvent, createAttributeEventListener(this, name, value)); 338 338 else 339 StyledElement::parseAttribute( attribute);339 StyledElement::parseAttribute(name, value); 340 340 } 341 341 -
trunk/Source/WebCore/svg/SVGElement.h
r132847 r135069 129 129 SVGElement(const QualifiedName&, Document*, ConstructionType = CreateSVGElement); 130 130 131 virtual void parseAttribute(const Attribute&) OVERRIDE;131 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 132 132 133 133 virtual void finishParsingChildren(); … … 140 140 SVGElementRareData* ensureSVGRareData(); 141 141 142 void reportAttributeParsingError(SVGParsingError, const Attribute&);142 void reportAttributeParsingError(SVGParsingError, const QualifiedName&, const AtomicString&); 143 143 144 144 // FIXME: Author shadows should be allowed -
trunk/Source/WebCore/svg/SVGEllipseElement.cpp
r117195 r135069 83 83 } 84 84 85 void SVGEllipseElement::parseAttribute(const Attribute& attribute)85 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 86 86 { 87 87 SVGParsingError parseError = NoError; 88 88 89 if (!isSupportedAttribute( attribute.name()))90 SVGStyledTransformableElement::parseAttribute( attribute);91 else if ( attribute.name()== SVGNames::cxAttr)92 setCxBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));93 else if ( attribute.name()== SVGNames::cyAttr)94 setCyBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));95 else if ( attribute.name()== SVGNames::rxAttr)96 setRxBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));97 else if ( attribute.name()== SVGNames::ryAttr)98 setRyBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));99 else if (SVGTests::parseAttribute( attribute)100 || SVGLangSpace::parseAttribute( attribute)101 || SVGExternalResourcesRequired::parseAttribute( attribute)) {89 if (!isSupportedAttribute(name)) 90 SVGStyledTransformableElement::parseAttribute(name, value); 91 else if (name == SVGNames::cxAttr) 92 setCxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 93 else if (name == SVGNames::cyAttr) 94 setCyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 95 else if (name == SVGNames::rxAttr) 96 setRxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 97 else if (name == SVGNames::ryAttr) 98 setRyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 99 else if (SVGTests::parseAttribute(name, value) 100 || SVGLangSpace::parseAttribute(name, value) 101 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 102 102 } else 103 103 ASSERT_NOT_REACHED(); 104 104 105 reportAttributeParsingError(parseError, attribute);105 reportAttributeParsingError(parseError, name, value); 106 106 } 107 107 -
trunk/Source/WebCore/svg/SVGEllipseElement.h
r117195 r135069 46 46 47 47 bool isSupportedAttribute(const QualifiedName&); 48 virtual void parseAttribute(const Attribute&) OVERRIDE;48 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 49 49 virtual void svgAttributeChanged(const QualifiedName&); 50 50 -
trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp
r127752 r135069 30 30 namespace WebCore { 31 31 32 bool SVGExternalResourcesRequired::parseAttribute(const Attribute& attribute)32 bool SVGExternalResourcesRequired::parseAttribute(const QualifiedName& name, const AtomicString& value) 33 33 { 34 if ( attribute.name()== SVGNames::externalResourcesRequiredAttr) {35 setExternalResourcesRequiredBaseValue( attribute.value()== "true");34 if (name == SVGNames::externalResourcesRequiredAttr) { 35 setExternalResourcesRequiredBaseValue(value == "true"); 36 36 return true; 37 37 } -
trunk/Source/WebCore/svg/SVGExternalResourcesRequired.h
r127752 r135069 40 40 virtual ~SVGExternalResourcesRequired() { } 41 41 42 bool parseAttribute(const Attribute&);42 bool parseAttribute(const QualifiedName&, const AtomicString&); 43 43 bool isKnownAttribute(const QualifiedName&); 44 44 void addSupportedAttributes(HashSet<QualifiedName>&); -
trunk/Source/WebCore/svg/SVGFEBlendElement.cpp
r117195 r135069 68 68 } 69 69 70 void SVGFEBlendElement::parseAttribute(const Attribute& attribute)70 void SVGFEBlendElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 71 71 { 72 if (!isSupportedAttribute( attribute.name())) {73 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);72 if (!isSupportedAttribute(name)) { 73 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 74 74 return; 75 75 } 76 76 77 const AtomicString& value = attribute.value(); 78 if (attribute.name() == SVGNames::modeAttr) { 77 if (name == SVGNames::modeAttr) { 79 78 BlendModeType propertyValue = SVGPropertyTraits<BlendModeType>::fromString(value); 80 79 if (propertyValue > 0) … … 83 82 } 84 83 85 if ( attribute.name()== SVGNames::inAttr) {84 if (name == SVGNames::inAttr) { 86 85 setIn1BaseValue(value); 87 86 return; 88 87 } 89 88 90 if ( attribute.name()== SVGNames::in2Attr) {89 if (name == SVGNames::in2Attr) { 91 90 setIn2BaseValue(value); 92 91 return; -
trunk/Source/WebCore/svg/SVGFEBlendElement.h
r117195 r135069 78 78 79 79 bool isSupportedAttribute(const QualifiedName&); 80 virtual void parseAttribute(const Attribute&) OVERRIDE;80 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 81 81 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName); 82 82 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp
r117195 r135069 68 68 } 69 69 70 void SVGFEColorMatrixElement::parseAttribute(const Attribute& attribute)70 void SVGFEColorMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 71 71 { 72 if (!isSupportedAttribute( attribute.name())) {73 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);72 if (!isSupportedAttribute(name)) { 73 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 74 74 return; 75 75 } 76 76 77 const AtomicString& value = attribute.value(); 78 if (attribute.name() == SVGNames::typeAttr) { 79 ColorMatrixType propertyValue = SVGPropertyTraits<ColorMatrixType>::fromString(attribute.value()); 77 if (name == SVGNames::typeAttr) { 78 ColorMatrixType propertyValue = SVGPropertyTraits<ColorMatrixType>::fromString(value); 80 79 if (propertyValue > 0) 81 80 setTypeBaseValue(propertyValue); … … 83 82 } 84 83 85 if ( attribute.name()== SVGNames::inAttr) {84 if (name == SVGNames::inAttr) { 86 85 setIn1BaseValue(value); 87 86 return; 88 87 } 89 88 90 if ( attribute.name()== SVGNames::valuesAttr) {89 if (name == SVGNames::valuesAttr) { 91 90 SVGNumberList newList; 92 91 newList.parse(value); -
trunk/Source/WebCore/svg/SVGFEColorMatrixElement.h
r117195 r135069 75 75 76 76 bool isSupportedAttribute(const QualifiedName&); 77 virtual void parseAttribute(const Attribute&) OVERRIDE;77 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 78 78 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 79 79 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp
r117195 r135069 63 63 } 64 64 65 void SVGFEComponentTransferElement::parseAttribute(const Attribute& attribute)65 void SVGFEComponentTransferElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 66 66 { 67 if (!isSupportedAttribute( attribute.name())) {68 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);67 if (!isSupportedAttribute(name)) { 68 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 69 69 return; 70 70 } 71 71 72 const AtomicString& value = attribute.value(); 73 if (attribute.name() == SVGNames::inAttr) { 72 if (name == SVGNames::inAttr) { 74 73 setIn1BaseValue(value); 75 74 return; -
trunk/Source/WebCore/svg/SVGFEComponentTransferElement.h
r117195 r135069 37 37 // FIXME: svgAttributeChanged missing. 38 38 bool isSupportedAttribute(const QualifiedName&); 39 virtual void parseAttribute(const Attribute&) OVERRIDE;39 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 40 40 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*); 41 41 -
trunk/Source/WebCore/svg/SVGFECompositeElement.cpp
r117195 r135069 80 80 } 81 81 82 void SVGFECompositeElement::parseAttribute(const Attribute& attribute)82 void SVGFECompositeElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 83 83 { 84 if (!isSupportedAttribute( attribute.name())) {85 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);84 if (!isSupportedAttribute(name)) { 85 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 86 86 return; 87 87 } 88 88 89 const AtomicString& value = attribute.value(); 90 if (attribute.name() == SVGNames::operatorAttr) { 89 if (name == SVGNames::operatorAttr) { 91 90 CompositeOperationType propertyValue = SVGPropertyTraits<CompositeOperationType>::fromString(value); 92 91 if (propertyValue > 0) … … 95 94 } 96 95 97 if ( attribute.name()== SVGNames::inAttr) {96 if (name == SVGNames::inAttr) { 98 97 setIn1BaseValue(value); 99 98 return; 100 99 } 101 100 102 if ( attribute.name()== SVGNames::in2Attr) {101 if (name == SVGNames::in2Attr) { 103 102 setIn2BaseValue(value); 104 103 return; 105 104 } 106 105 107 if ( attribute.name()== SVGNames::k1Attr) {106 if (name == SVGNames::k1Attr) { 108 107 setK1BaseValue(value.toFloat()); 109 108 return; 110 109 } 111 110 112 if ( attribute.name()== SVGNames::k2Attr) {111 if (name == SVGNames::k2Attr) { 113 112 setK2BaseValue(value.toFloat()); 114 113 return; 115 114 } 116 115 117 if ( attribute.name()== SVGNames::k3Attr) {116 if (name == SVGNames::k3Attr) { 118 117 setK3BaseValue(value.toFloat()); 119 118 return; 120 119 } 121 120 122 if ( attribute.name()== SVGNames::k4Attr) {121 if (name == SVGNames::k4Attr) { 123 122 setK4BaseValue(value.toFloat()); 124 123 return; -
trunk/Source/WebCore/svg/SVGFECompositeElement.h
r117195 r135069 83 83 84 84 bool isSupportedAttribute(const QualifiedName&); 85 virtual void parseAttribute(const Attribute&) OVERRIDE;85 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 86 86 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 87 87 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
r133976 r135069 120 120 } 121 121 122 void SVGFEConvolveMatrixElement::parseAttribute(const Attribute& attribute) 123 { 124 if (!isSupportedAttribute(attribute.name())) { 125 SVGFilterPrimitiveStandardAttributes::parseAttribute(attribute); 126 return; 127 } 128 129 const AtomicString& value = attribute.value(); 130 if (attribute.name() == SVGNames::inAttr) { 122 void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 123 { 124 if (!isSupportedAttribute(name)) { 125 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 126 return; 127 } 128 129 if (name == SVGNames::inAttr) { 131 130 setIn1BaseValue(value); 132 131 return; 133 132 } 134 133 135 if ( attribute.name()== SVGNames::orderAttr) {134 if (name == SVGNames::orderAttr) { 136 135 float x, y; 137 136 if (parseNumberOptionalNumber(value, x, y) && x >= 1 && y >= 1) { … … 145 144 } 146 145 147 if ( attribute.name()== SVGNames::edgeModeAttr) {146 if (name == SVGNames::edgeModeAttr) { 148 147 EdgeModeType propertyValue = SVGPropertyTraits<EdgeModeType>::fromString(value); 149 148 if (propertyValue > 0) … … 156 155 } 157 156 158 if ( attribute.name()== SVGNames::kernelMatrixAttr) {157 if (name == SVGNames::kernelMatrixAttr) { 159 158 SVGNumberList newList; 160 159 newList.parse(value); … … 164 163 } 165 164 166 if ( attribute.name()== SVGNames::divisorAttr) {165 if (name == SVGNames::divisorAttr) { 167 166 float divisor = value.toFloat(); 168 167 if (divisor) … … 175 174 } 176 175 177 if ( attribute.name()== SVGNames::biasAttr) {176 if (name == SVGNames::biasAttr) { 178 177 setBiasBaseValue(value.toFloat()); 179 178 return; 180 179 } 181 180 182 if ( attribute.name()== SVGNames::targetXAttr) {181 if (name == SVGNames::targetXAttr) { 183 182 setTargetXBaseValue(value.string().toUIntStrict()); 184 183 return; 185 184 } 186 185 187 if ( attribute.name()== SVGNames::targetYAttr) {186 if (name == SVGNames::targetYAttr) { 188 187 setTargetYBaseValue(value.string().toUIntStrict()); 189 188 return; 190 189 } 191 190 192 if ( attribute.name()== SVGNames::kernelUnitLengthAttr) {191 if (name == SVGNames::kernelUnitLengthAttr) { 193 192 float x, y; 194 193 if (parseNumberOptionalNumber(value, x, y) && x > 0 && y > 0) { … … 202 201 } 203 202 204 if ( attribute.name()== SVGNames::preserveAlphaAttr) {203 if (name == SVGNames::preserveAlphaAttr) { 205 204 if (value == "true") 206 205 setPreserveAlphaBaseValue(true); -
trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h
r117195 r135069 76 76 77 77 bool isSupportedAttribute(const QualifiedName&); 78 virtual void parseAttribute(const Attribute&) OVERRIDE;78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 79 79 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 80 80 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp
r133976 r135069 91 91 } 92 92 93 void SVGFEDiffuseLightingElement::parseAttribute(const Attribute& attribute) 94 { 95 if (!isSupportedAttribute(attribute.name()) || attribute.name() == SVGNames::lighting_colorAttr) { 96 SVGFilterPrimitiveStandardAttributes::parseAttribute(attribute); 97 return; 98 } 99 100 const AtomicString& value = attribute.value(); 101 if (attribute.name() == SVGNames::inAttr) { 93 void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 94 { 95 if (!isSupportedAttribute(name) || name == SVGNames::lighting_colorAttr) { 96 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 97 return; 98 } 99 100 if (name == SVGNames::inAttr) { 102 101 setIn1BaseValue(value); 103 102 return; 104 103 } 105 104 106 if ( attribute.name()== SVGNames::surfaceScaleAttr) {105 if (name == SVGNames::surfaceScaleAttr) { 107 106 setSurfaceScaleBaseValue(value.toFloat()); 108 107 return; 109 108 } 110 109 111 if ( attribute.name()== SVGNames::diffuseConstantAttr) {110 if (name == SVGNames::diffuseConstantAttr) { 112 111 setDiffuseConstantBaseValue(value.toFloat()); 113 112 return; 114 113 } 115 114 116 if ( attribute.name()== SVGNames::kernelUnitLengthAttr) {115 if (name == SVGNames::kernelUnitLengthAttr) { 117 116 float x, y; 118 117 if (parseNumberOptionalNumber(value, x, y)) { -
trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.h
r117195 r135069 41 41 42 42 bool isSupportedAttribute(const QualifiedName&); 43 virtual void parseAttribute(const Attribute&) OVERRIDE;43 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 44 44 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 45 45 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp
r117195 r135069 74 74 } 75 75 76 void SVGFEDisplacementMapElement::parseAttribute(const Attribute& attribute)76 void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 77 77 { 78 if (!isSupportedAttribute( attribute.name())) {79 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);78 if (!isSupportedAttribute(name)) { 79 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 80 80 return; 81 81 } 82 82 83 const AtomicString& value = attribute.value(); 84 if (attribute.name() == SVGNames::xChannelSelectorAttr) { 83 if (name == SVGNames::xChannelSelectorAttr) { 85 84 ChannelSelectorType propertyValue = SVGPropertyTraits<ChannelSelectorType>::fromString(value); 86 85 if (propertyValue > 0) … … 89 88 } 90 89 91 if ( attribute.name()== SVGNames::yChannelSelectorAttr) {90 if (name == SVGNames::yChannelSelectorAttr) { 92 91 ChannelSelectorType propertyValue = SVGPropertyTraits<ChannelSelectorType>::fromString(value); 93 92 if (propertyValue > 0) … … 96 95 } 97 96 98 if ( attribute.name()== SVGNames::inAttr) {97 if (name == SVGNames::inAttr) { 99 98 setIn1BaseValue(value); 100 99 return; 101 100 } 102 101 103 if ( attribute.name()== SVGNames::in2Attr) {102 if (name == SVGNames::in2Attr) { 104 103 setIn2BaseValue(value); 105 104 return; 106 105 } 107 106 108 if ( attribute.name()== SVGNames::scaleAttr) {107 if (name == SVGNames::scaleAttr) { 109 108 setScaleBaseValue(value.toFloat()); 110 109 return; -
trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.h
r117195 r135069 76 76 77 77 bool isSupportedAttribute(const QualifiedName&); 78 virtual void parseAttribute(const Attribute&) OVERRIDE;78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 79 79 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName); 80 80 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp
r133976 r135069 96 96 } 97 97 98 void SVGFEDropShadowElement::parseAttribute(const Attribute& attribute)98 void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 99 99 { 100 if (!isSupportedAttribute( attribute.name())) {101 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);100 if (!isSupportedAttribute(name)) { 101 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 102 102 return; 103 103 } 104 104 105 const AtomicString& value = attribute.value(); 106 if (attribute.name() == SVGNames::stdDeviationAttr) { 105 if (name == SVGNames::stdDeviationAttr) { 107 106 float x, y; 108 107 if (parseNumberOptionalNumber(value, x, y)) { … … 113 112 } 114 113 115 if ( attribute.name()== SVGNames::inAttr) {114 if (name == SVGNames::inAttr) { 116 115 setIn1BaseValue(value); 117 116 return; 118 117 } 119 118 120 if ( attribute.name()== SVGNames::dxAttr) {121 setDxBaseValue( attribute.value().toFloat());119 if (name == SVGNames::dxAttr) { 120 setDxBaseValue(value.toFloat()); 122 121 return; 123 122 } 124 123 125 if ( attribute.name()== SVGNames::dyAttr) {126 setDyBaseValue( attribute.value().toFloat());124 if (name == SVGNames::dyAttr) { 125 setDyBaseValue(value.toFloat()); 127 126 return; 128 127 } -
trunk/Source/WebCore/svg/SVGFEDropShadowElement.h
r117195 r135069 38 38 39 39 bool isSupportedAttribute(const QualifiedName&); 40 virtual void parseAttribute(const Attribute&) OVERRIDE;40 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 41 41 virtual void svgAttributeChanged(const QualifiedName&); 42 42 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*); -
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
r133976 r135069 86 86 } 87 87 88 void SVGFEGaussianBlurElement::parseAttribute(const Attribute& attribute)88 void SVGFEGaussianBlurElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 89 89 { 90 if (!isSupportedAttribute( attribute.name())) {91 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);90 if (!isSupportedAttribute(name)) { 91 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 92 92 return; 93 93 } 94 94 95 const AtomicString& value = attribute.value(); 96 if (attribute.name() == SVGNames::stdDeviationAttr) { 95 if (name == SVGNames::stdDeviationAttr) { 97 96 float x, y; 98 97 if (parseNumberOptionalNumber(value, x, y)) { … … 103 102 } 104 103 105 if ( attribute.name()== SVGNames::inAttr) {104 if (name == SVGNames::inAttr) { 106 105 setIn1BaseValue(value); 107 106 return; -
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.h
r117195 r135069 39 39 40 40 bool isSupportedAttribute(const QualifiedName&); 41 virtual void parseAttribute(const Attribute&) OVERRIDE;41 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 42 42 virtual void svgAttributeChanged(const QualifiedName&); 43 43 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*); -
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
r134930 r135069 126 126 } 127 127 128 void SVGFEImageElement::parseAttribute(const Attribute& attribute)129 { 130 if (!isSupportedAttribute( attribute.name())) {131 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);132 return; 133 } 134 135 if ( attribute.name()== SVGNames::preserveAspectRatioAttr) {128 void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 129 { 130 if (!isSupportedAttribute(name)) { 131 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 132 return; 133 } 134 135 if (name == SVGNames::preserveAspectRatioAttr) { 136 136 SVGPreserveAspectRatio preserveAspectRatio; 137 preserveAspectRatio.parse( attribute.value());137 preserveAspectRatio.parse(value); 138 138 setPreserveAspectRatioBaseValue(preserveAspectRatio); 139 139 return; 140 140 } 141 141 142 if (SVGURIReference::parseAttribute( attribute))143 return; 144 if (SVGLangSpace::parseAttribute( attribute))145 return; 146 if (SVGExternalResourcesRequired::parseAttribute( attribute))142 if (SVGURIReference::parseAttribute(name, value)) 143 return; 144 if (SVGLangSpace::parseAttribute(name, value)) 145 return; 146 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 147 147 return; 148 148 -
trunk/Source/WebCore/svg/SVGFEImageElement.h
r118963 r135069 50 50 51 51 bool isSupportedAttribute(const QualifiedName&); 52 virtual void parseAttribute(const Attribute&) OVERRIDE;52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 53 53 virtual void svgAttributeChanged(const QualifiedName&); 54 54 virtual void notifyFinished(CachedResource*); -
trunk/Source/WebCore/svg/SVGFELightElement.cpp
r117195 r135069 107 107 } 108 108 109 void SVGFELightElement::parseAttribute(const Attribute& attribute) 110 { 111 if (!isSupportedAttribute(attribute.name())) { 112 SVGElement::parseAttribute(attribute); 113 return; 114 } 115 116 const AtomicString& value = attribute.value(); 117 if (attribute.name() == SVGNames::azimuthAttr) { 109 void SVGFELightElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 110 { 111 if (!isSupportedAttribute(name)) { 112 SVGElement::parseAttribute(name, value); 113 return; 114 } 115 116 if (name == SVGNames::azimuthAttr) { 118 117 setAzimuthBaseValue(value.toFloat()); 119 118 return; 120 119 } 121 120 122 if ( attribute.name()== SVGNames::elevationAttr) {121 if (name == SVGNames::elevationAttr) { 123 122 setElevationBaseValue(value.toFloat()); 124 123 return; 125 124 } 126 125 127 if ( attribute.name()== SVGNames::xAttr) {126 if (name == SVGNames::xAttr) { 128 127 setXBaseValue(value.toFloat()); 129 128 return; 130 129 } 131 130 132 if ( attribute.name()== SVGNames::yAttr) {131 if (name == SVGNames::yAttr) { 133 132 setYBaseValue(value.toFloat()); 134 133 return; 135 134 } 136 135 137 if ( attribute.name()== SVGNames::zAttr) {136 if (name == SVGNames::zAttr) { 138 137 setZBaseValue(value.toFloat()); 139 138 return; 140 139 } 141 140 142 if ( attribute.name()== SVGNames::pointsAtXAttr) {141 if (name == SVGNames::pointsAtXAttr) { 143 142 setPointsAtXBaseValue(value.toFloat()); 144 143 return; 145 144 } 146 145 147 if ( attribute.name()== SVGNames::pointsAtYAttr) {146 if (name == SVGNames::pointsAtYAttr) { 148 147 setPointsAtYBaseValue(value.toFloat()); 149 148 return; 150 149 } 151 150 152 if ( attribute.name()== SVGNames::pointsAtZAttr) {151 if (name == SVGNames::pointsAtZAttr) { 153 152 setPointsAtZBaseValue(value.toFloat()); 154 153 return; 155 154 } 156 155 157 if ( attribute.name()== SVGNames::specularExponentAttr) {156 if (name == SVGNames::specularExponentAttr) { 158 157 setSpecularExponentBaseValue(value.toFloat()); 159 158 return; 160 159 } 161 160 162 if ( attribute.name()== SVGNames::limitingConeAngleAttr) {161 if (name == SVGNames::limitingConeAngleAttr) { 163 162 setLimitingConeAngleBaseValue(value.toFloat()); 164 163 return; -
trunk/Source/WebCore/svg/SVGFELightElement.h
r117195 r135069 41 41 private: 42 42 bool isSupportedAttribute(const QualifiedName&); 43 virtual void parseAttribute(const Attribute&) OVERRIDE;43 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 44 44 virtual void svgAttributeChanged(const QualifiedName&); 45 45 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGFEMergeNodeElement.cpp
r117195 r135069 61 61 } 62 62 63 void SVGFEMergeNodeElement::parseAttribute(const Attribute& attribute)63 void SVGFEMergeNodeElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 64 64 { 65 if (!isSupportedAttribute( attribute.name())) {66 SVGElement::parseAttribute( attribute);65 if (!isSupportedAttribute(name)) { 66 SVGElement::parseAttribute(name, value); 67 67 return; 68 68 } 69 69 70 if ( attribute.name()== SVGNames::inAttr) {71 setIn1BaseValue( attribute.value());70 if (name == SVGNames::inAttr) { 71 setIn1BaseValue(value); 72 72 return; 73 73 } -
trunk/Source/WebCore/svg/SVGFEMergeNodeElement.h
r117195 r135069 36 36 37 37 bool isSupportedAttribute(const QualifiedName&); 38 virtual void parseAttribute(const Attribute&) OVERRIDE;38 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 39 39 virtual void svgAttributeChanged(const QualifiedName&); 40 40 -
trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp
r133976 r135069 89 89 } 90 90 91 void SVGFEMorphologyElement::parseAttribute(const Attribute& attribute)91 void SVGFEMorphologyElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 92 92 { 93 if (!isSupportedAttribute( attribute.name())) {94 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);93 if (!isSupportedAttribute(name)) { 94 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 95 95 return; 96 96 } 97 97 98 const AtomicString& value = attribute.value(); 99 if (attribute.name() == SVGNames::operatorAttr) { 98 if (name == SVGNames::operatorAttr) { 100 99 MorphologyOperatorType propertyValue = SVGPropertyTraits<MorphologyOperatorType>::fromString(value); 101 100 if (propertyValue > 0) … … 104 103 } 105 104 106 if ( attribute.name()== SVGNames::inAttr) {105 if (name == SVGNames::inAttr) { 107 106 setIn1BaseValue(value); 108 107 return; 109 108 } 110 109 111 if ( attribute.name()== SVGNames::radiusAttr) {110 if (name == SVGNames::radiusAttr) { 112 111 float x, y; 113 112 if (parseNumberOptionalNumber(value, x, y)) { -
trunk/Source/WebCore/svg/SVGFEMorphologyElement.h
r117195 r135069 68 68 69 69 bool isSupportedAttribute(const QualifiedName&); 70 virtual void parseAttribute(const Attribute&) OVERRIDE;70 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 71 71 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 72 72 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp
r117195 r135069 67 67 } 68 68 69 void SVGFEOffsetElement::parseAttribute(const Attribute& attribute)69 void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 70 70 { 71 if (!isSupportedAttribute( attribute.name())) {72 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);71 if (!isSupportedAttribute(name)) { 72 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 73 73 return; 74 74 } 75 75 76 const AtomicString& value = attribute.value(); 77 if (attribute.name() == SVGNames::dxAttr) { 76 if (name == SVGNames::dxAttr) { 78 77 setDxBaseValue(value.toFloat()); 79 78 return; 80 79 } 81 80 82 if ( attribute.name()== SVGNames::dyAttr) {81 if (name == SVGNames::dyAttr) { 83 82 setDyBaseValue(value.toFloat()); 84 83 return; 85 84 } 86 85 87 if ( attribute.name()== SVGNames::inAttr) {86 if (name == SVGNames::inAttr) { 88 87 setIn1BaseValue(value); 89 88 return; -
trunk/Source/WebCore/svg/SVGFEOffsetElement.h
r117195 r135069 37 37 38 38 bool isSupportedAttribute(const QualifiedName&); 39 virtual void parseAttribute(const Attribute&) OVERRIDE;39 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 40 40 virtual void svgAttributeChanged(const QualifiedName&); 41 41 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*); -
trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp
r133976 r135069 95 95 } 96 96 97 void SVGFESpecularLightingElement::parseAttribute(const Attribute& attribute) 98 { 99 if (!isSupportedAttribute(attribute.name())) { 100 SVGFilterPrimitiveStandardAttributes::parseAttribute(attribute); 101 return; 102 } 103 104 const AtomicString& value = attribute.value(); 105 if (attribute.name() == SVGNames::inAttr) { 97 void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 98 { 99 if (!isSupportedAttribute(name)) { 100 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 101 return; 102 } 103 104 if (name == SVGNames::inAttr) { 106 105 setIn1BaseValue(value); 107 106 return; 108 107 } 109 108 110 if ( attribute.name()== SVGNames::surfaceScaleAttr) {109 if (name == SVGNames::surfaceScaleAttr) { 111 110 setSurfaceScaleBaseValue(value.toFloat()); 112 111 return; 113 112 } 114 113 115 if ( attribute.name()== SVGNames::specularConstantAttr) {114 if (name == SVGNames::specularConstantAttr) { 116 115 setSpecularConstantBaseValue(value.toFloat()); 117 116 return; 118 117 } 119 118 120 if ( attribute.name()== SVGNames::specularExponentAttr) {119 if (name == SVGNames::specularExponentAttr) { 121 120 setSpecularExponentBaseValue(value.toFloat()); 122 121 return; 123 122 } 124 123 125 if ( attribute.name()== SVGNames::kernelUnitLengthAttr) {124 if (name == SVGNames::kernelUnitLengthAttr) { 126 125 float x, y; 127 126 if (parseNumberOptionalNumber(value, x, y)) { -
trunk/Source/WebCore/svg/SVGFESpecularLightingElement.h
r117195 r135069 40 40 41 41 bool isSupportedAttribute(const QualifiedName&); 42 virtual void parseAttribute(const Attribute&) OVERRIDE;42 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 43 43 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&); 44 44 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFETileElement.cpp
r117195 r135069 61 61 } 62 62 63 void SVGFETileElement::parseAttribute(const Attribute& attribute)63 void SVGFETileElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 64 64 { 65 if (!isSupportedAttribute( attribute.name())) {66 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);65 if (!isSupportedAttribute(name)) { 66 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 67 67 return; 68 68 } 69 69 70 if ( attribute.name()== SVGNames::inAttr) {71 setIn1BaseValue( attribute.value());70 if (name == SVGNames::inAttr) { 71 setIn1BaseValue(value); 72 72 return; 73 73 } -
trunk/Source/WebCore/svg/SVGFETileElement.h
r117195 r135069 36 36 37 37 bool isSupportedAttribute(const QualifiedName&); 38 virtual void parseAttribute(const Attribute&) OVERRIDE;38 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 39 39 virtual void svgAttributeChanged(const QualifiedName&); 40 40 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*); -
trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp
r133976 r135069 89 89 } 90 90 91 void SVGFETurbulenceElement::parseAttribute(const Attribute& attribute)91 void SVGFETurbulenceElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 92 92 { 93 if (!isSupportedAttribute( attribute.name())) {94 SVGFilterPrimitiveStandardAttributes::parseAttribute( attribute);93 if (!isSupportedAttribute(name)) { 94 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); 95 95 return; 96 96 } 97 97 98 const AtomicString& value = attribute.value(); 99 if (attribute.name() == SVGNames::typeAttr) { 98 if (name == SVGNames::typeAttr) { 100 99 TurbulenceType propertyValue = SVGPropertyTraits<TurbulenceType>::fromString(value); 101 100 if (propertyValue > 0) … … 104 103 } 105 104 106 if ( attribute.name()== SVGNames::stitchTilesAttr) {105 if (name == SVGNames::stitchTilesAttr) { 107 106 SVGStitchOptions propertyValue = SVGPropertyTraits<SVGStitchOptions>::fromString(value); 108 107 if (propertyValue > 0) … … 111 110 } 112 111 113 if ( attribute.name()== SVGNames::baseFrequencyAttr) {112 if (name == SVGNames::baseFrequencyAttr) { 114 113 float x, y; 115 114 if (parseNumberOptionalNumber(value, x, y)) { … … 120 119 } 121 120 122 if ( attribute.name()== SVGNames::seedAttr) {121 if (name == SVGNames::seedAttr) { 123 122 setSeedBaseValue(value.toFloat()); 124 123 return; 125 124 } 126 125 127 if ( attribute.name()== SVGNames::numOctavesAttr) {126 if (name == SVGNames::numOctavesAttr) { 128 127 setNumOctavesBaseValue(value.string().toUIntStrict()); 129 128 return; -
trunk/Source/WebCore/svg/SVGFETurbulenceElement.h
r117195 r135069 103 103 104 104 bool isSupportedAttribute(const QualifiedName&); 105 virtual void parseAttribute(const Attribute&) OVERRIDE;105 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 106 106 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName); 107 107 virtual void svgAttributeChanged(const QualifiedName&); -
trunk/Source/WebCore/svg/SVGFilterElement.cpp
r133976 r135069 122 122 } 123 123 124 void SVGFilterElement::parseAttribute(const Attribute& attribute)124 void SVGFilterElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 125 125 { 126 126 SVGParsingError parseError = NoError; 127 const AtomicString& value = attribute.value(); 128 129 if (!isSupportedAttribute(attribute.name())) 130 SVGStyledElement::parseAttribute(attribute); 131 else if (attribute.name() == SVGNames::filterUnitsAttr) { 127 128 if (!isSupportedAttribute(name)) 129 SVGStyledElement::parseAttribute(name, value); 130 else if (name == SVGNames::filterUnitsAttr) { 132 131 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 133 132 if (propertyValue > 0) 134 133 setFilterUnitsBaseValue(propertyValue); 135 } else if ( attribute.name()== SVGNames::primitiveUnitsAttr) {134 } else if (name == SVGNames::primitiveUnitsAttr) { 136 135 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 137 136 if (propertyValue > 0) 138 137 setPrimitiveUnitsBaseValue(propertyValue); 139 } else if ( attribute.name()== SVGNames::xAttr)138 } else if (name == SVGNames::xAttr) 140 139 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 141 else if ( attribute.name()== SVGNames::yAttr)140 else if (name == SVGNames::yAttr) 142 141 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 143 else if ( attribute.name()== SVGNames::widthAttr)142 else if (name == SVGNames::widthAttr) 144 143 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 145 else if ( attribute.name()== SVGNames::heightAttr)144 else if (name == SVGNames::heightAttr) 146 145 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 147 else if ( attribute.name()== SVGNames::filterResAttr) {146 else if (name == SVGNames::filterResAttr) { 148 147 float x, y; 149 148 if (parseNumberOptionalNumber(value, x, y)) { … … 151 150 setFilterResYBaseValue(y); 152 151 } 153 } else if (SVGURIReference::parseAttribute( attribute)154 || SVGLangSpace::parseAttribute( attribute)155 || SVGExternalResourcesRequired::parseAttribute( attribute)) {152 } else if (SVGURIReference::parseAttribute(name, value) 153 || SVGLangSpace::parseAttribute(name, value) 154 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 156 155 } else 157 156 ASSERT_NOT_REACHED(); 158 157 159 reportAttributeParsingError(parseError, attribute);158 reportAttributeParsingError(parseError, name, value); 160 159 } 161 160 -
trunk/Source/WebCore/svg/SVGFilterElement.h
r117195 r135069 52 52 53 53 bool isSupportedAttribute(const QualifiedName&); 54 virtual void parseAttribute(const Attribute&) OVERRIDE;54 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 55 55 virtual void svgAttributeChanged(const QualifiedName&); 56 56 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
r117195 r135069 78 78 } 79 79 80 void SVGFilterPrimitiveStandardAttributes::parseAttribute(const Attribute& attribute)80 void SVGFilterPrimitiveStandardAttributes::parseAttribute(const QualifiedName& name, const AtomicString& value) 81 81 { 82 82 SVGParsingError parseError = NoError; 83 const AtomicString& value = attribute.value();84 83 85 if (!isSupportedAttribute( attribute.name()))86 SVGStyledElement::parseAttribute( attribute);87 else if ( attribute.name()== SVGNames::xAttr)84 if (!isSupportedAttribute(name)) 85 SVGStyledElement::parseAttribute(name, value); 86 else if (name == SVGNames::xAttr) 88 87 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 89 else if ( attribute.name()== SVGNames::yAttr)88 else if (name == SVGNames::yAttr) 90 89 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 91 else if ( attribute.name()== SVGNames::widthAttr)90 else if (name == SVGNames::widthAttr) 92 91 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 93 else if ( attribute.name()== SVGNames::heightAttr)92 else if (name == SVGNames::heightAttr) 94 93 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 95 else if ( attribute.name()== SVGNames::resultAttr)94 else if (name == SVGNames::resultAttr) 96 95 setResultBaseValue(value); 97 96 else 98 97 ASSERT_NOT_REACHED(); 99 98 100 reportAttributeParsingError(parseError, attribute);99 reportAttributeParsingError(parseError, name, value); 101 100 } 102 101 -
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
r117195 r135069 50 50 51 51 bool isSupportedAttribute(const QualifiedName&); 52 virtual void parseAttribute(const Attribute&) OVERRIDE;52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 53 53 virtual void svgAttributeChanged(const QualifiedName&); 54 54 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGFitToViewBox.h
r118735 r135069 43 43 44 44 template<class SVGElementTarget> 45 static bool parseAttribute(SVGElementTarget* target, const Attribute& attribute)45 static bool parseAttribute(SVGElementTarget* target, const QualifiedName& name, const AtomicString& value) 46 46 { 47 47 ASSERT(target); 48 48 ASSERT(target->document()); 49 if ( attribute.name()== SVGNames::viewBoxAttr) {49 if (name == SVGNames::viewBoxAttr) { 50 50 FloatRect viewBox; 51 if (! attribute.isNull())52 parseViewBox(target->document(), attribute.value(), viewBox);51 if (!value.isNull()) 52 parseViewBox(target->document(), value, viewBox); 53 53 target->setViewBoxBaseValue(viewBox); 54 54 return true; 55 55 } 56 56 57 if ( attribute.name()== SVGNames::preserveAspectRatioAttr) {57 if (name == SVGNames::preserveAspectRatioAttr) { 58 58 SVGPreserveAspectRatio preserveAspectRatio; 59 preserveAspectRatio.parse( attribute.value());59 preserveAspectRatio.parse(value); 60 60 target->setPreserveAspectRatioBaseValue(preserveAspectRatio); 61 61 return true; -
trunk/Source/WebCore/svg/SVGFontFaceElement.cpp
r132786 r135069 109 109 } 110 110 111 void SVGFontFaceElement::parseAttribute(const Attribute& attribute)111 void SVGFontFaceElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 112 112 { 113 CSSPropertyID propId = cssPropertyIdForSVGAttributeName( attribute.name());113 CSSPropertyID propId = cssPropertyIdForSVGAttributeName(name); 114 114 if (propId > 0) { 115 m_fontFaceRule->mutableProperties()->setProperty(propId, attribute.value(), false);115 m_fontFaceRule->mutableProperties()->setProperty(propId, value, false); 116 116 rebuildFontFace(); 117 117 return; 118 118 } 119 119 120 SVGElement::parseAttribute( attribute);120 SVGElement::parseAttribute(name, value); 121 121 } 122 122 -
trunk/Source/WebCore/svg/SVGFontFaceElement.h
r118192 r135069 55 55 SVGFontFaceElement(const QualifiedName&, Document*); 56 56 57 virtual void parseAttribute(const Attribute&) OVERRIDE;57 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 58 58 59 59 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp
r134930 r135069 63 63 } 64 64 65 void SVGFontFaceUriElement::parseAttribute(const Attribute& attribute)65 void SVGFontFaceUriElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 66 66 { 67 const QualifiedName& attrName = attribute.name(); 68 if (attrName == XLinkNames::hrefAttr) 67 if (name == XLinkNames::hrefAttr) 69 68 loadFont(); 70 69 else 71 SVGElement::parseAttribute( attribute);70 SVGElement::parseAttribute(name, value); 72 71 } 73 72 -
trunk/Source/WebCore/svg/SVGFontFaceUriElement.h
r118192 r135069 41 41 SVGFontFaceUriElement(const QualifiedName&, Document*); 42 42 43 virtual void parseAttribute(const Attribute&) OVERRIDE;43 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 44 44 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 45 45 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGForeignObjectElement.cpp
r133521 r135069 86 86 } 87 87 88 void SVGForeignObjectElement::parseAttribute(const Attribute& attribute)88 void SVGForeignObjectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 89 89 { 90 90 SVGParsingError parseError = NoError; 91 const AtomicString& value = attribute.value();92 91 93 if (!isSupportedAttribute( attribute.name()))94 SVGStyledTransformableElement::parseAttribute( attribute);95 else if ( attribute.name()== SVGNames::xAttr)92 if (!isSupportedAttribute(name)) 93 SVGStyledTransformableElement::parseAttribute(name, value); 94 else if (name == SVGNames::xAttr) 96 95 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 97 else if ( attribute.name()== SVGNames::yAttr)96 else if (name == SVGNames::yAttr) 98 97 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 99 else if ( attribute.name()== SVGNames::widthAttr)98 else if (name == SVGNames::widthAttr) 100 99 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 101 else if ( attribute.name()== SVGNames::heightAttr)100 else if (name == SVGNames::heightAttr) 102 101 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 103 else if (SVGTests::parseAttribute( attribute)104 || SVGLangSpace::parseAttribute( attribute)105 || SVGExternalResourcesRequired::parseAttribute( attribute)) {102 else if (SVGTests::parseAttribute(name, value) 103 || SVGLangSpace::parseAttribute(name, value) 104 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 106 105 } else 107 106 ASSERT_NOT_REACHED(); 108 107 109 reportAttributeParsingError(parseError, attribute);108 reportAttributeParsingError(parseError, name, value); 110 109 } 111 110 -
trunk/Source/WebCore/svg/SVGForeignObjectElement.h
r133521 r135069 44 44 virtual bool isValid() const { return SVGTests::isValid(); } 45 45 bool isSupportedAttribute(const QualifiedName&); 46 virtual void parseAttribute(const Attribute&) OVERRIDE;46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 47 47 virtual void svgAttributeChanged(const QualifiedName&); 48 48 -
trunk/Source/WebCore/svg/SVGGElement.cpp
r117195 r135069 64 64 } 65 65 66 void SVGGElement::parseAttribute(const Attribute& attribute)66 void SVGGElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 67 67 { 68 if (!isSupportedAttribute( attribute.name())) {69 SVGStyledTransformableElement::parseAttribute( attribute);68 if (!isSupportedAttribute(name)) { 69 SVGStyledTransformableElement::parseAttribute(name, value); 70 70 return; 71 71 } 72 72 73 if (SVGTests::parseAttribute( attribute))73 if (SVGTests::parseAttribute(name, value)) 74 74 return; 75 if (SVGLangSpace::parseAttribute( attribute))75 if (SVGLangSpace::parseAttribute(name, value)) 76 76 return; 77 if (SVGExternalResourcesRequired::parseAttribute( attribute))77 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 78 78 return; 79 79 -
trunk/Source/WebCore/svg/SVGGElement.h
r117195 r135069 48 48 49 49 bool isSupportedAttribute(const QualifiedName&); 50 virtual void parseAttribute(const Attribute&) OVERRIDE;50 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 51 51 virtual void svgAttributeChanged(const QualifiedName&); 52 52 -
trunk/Source/WebCore/svg/SVGGlyphElement.cpp
r118192 r135069 54 54 } 55 55 56 void SVGGlyphElement::parseAttribute(const Attribute& attribute)56 void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 57 57 { 58 if ( attribute.name()== SVGNames::dAttr)58 if (name == SVGNames::dAttr) 59 59 invalidateGlyphCache(); 60 60 else 61 SVGStyledElement::parseAttribute( attribute);61 SVGStyledElement::parseAttribute(name, value); 62 62 } 63 63 -
trunk/Source/WebCore/svg/SVGGlyphElement.h
r118192 r135069 48 48 49 49 // FIXME: svgAttributeChanged missing. 50 virtual void parseAttribute(const Attribute&) OVERRIDE;50 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 51 51 52 52 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGGlyphRefElement.cpp
r117195 r135069 65 65 } 66 66 67 void SVGGlyphRefElement::parseAttribute(const Attribute& attribute)67 void SVGGlyphRefElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 68 68 { 69 const UChar* startPtr = attribute.value().characters();70 const UChar* endPtr = startPtr + attribute.value().length();69 const UChar* startPtr = value.characters(); 70 const UChar* endPtr = startPtr + value.length(); 71 71 72 72 // FIXME: We need some error handling here. 73 if ( attribute.name()== SVGNames::xAttr)73 if (name == SVGNames::xAttr) 74 74 parseNumber(startPtr, endPtr, m_x); 75 else if ( attribute.name()== SVGNames::yAttr)75 else if (name == SVGNames::yAttr) 76 76 parseNumber(startPtr, endPtr, m_y); 77 else if ( attribute.name()== SVGNames::dxAttr)77 else if (name == SVGNames::dxAttr) 78 78 parseNumber(startPtr, endPtr, m_dx); 79 else if ( attribute.name()== SVGNames::dyAttr)79 else if (name == SVGNames::dyAttr) 80 80 parseNumber(startPtr, endPtr, m_dy); 81 81 else { 82 if (SVGURIReference::parseAttribute( attribute))82 if (SVGURIReference::parseAttribute(name, value)) 83 83 return; 84 SVGStyledElement::parseAttribute( attribute);84 SVGStyledElement::parseAttribute(name, value); 85 85 } 86 86 } -
trunk/Source/WebCore/svg/SVGGlyphRefElement.h
r117195 r135069 33 33 34 34 bool hasValidGlyphElement(String& glyphName) const; 35 virtual void parseAttribute(const Attribute&) OVERRIDE;35 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 36 36 37 37 // DOM interface -
trunk/Source/WebCore/svg/SVGGradientElement.cpp
r117195 r135069 76 76 } 77 77 78 void SVGGradientElement::parseAttribute(const Attribute& attribute)78 void SVGGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 79 79 { 80 if (!isSupportedAttribute( attribute.name())) {81 SVGStyledElement::parseAttribute( attribute);80 if (!isSupportedAttribute(name)) { 81 SVGStyledElement::parseAttribute(name, value); 82 82 return; 83 83 } 84 84 85 if ( attribute.name()== SVGNames::gradientUnitsAttr) {86 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString( attribute.value());85 if (name == SVGNames::gradientUnitsAttr) { 86 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 87 87 if (propertyValue > 0) 88 88 setGradientUnitsBaseValue(propertyValue); … … 90 90 } 91 91 92 if ( attribute.name()== SVGNames::gradientTransformAttr) {92 if (name == SVGNames::gradientTransformAttr) { 93 93 SVGTransformList newList; 94 newList.parse( attribute.value());94 newList.parse(value); 95 95 detachAnimatedGradientTransformListWrappers(newList.size()); 96 96 setGradientTransformBaseValue(newList); … … 98 98 } 99 99 100 if ( attribute.name()== SVGNames::spreadMethodAttr) {101 SVGSpreadMethodType propertyValue = SVGPropertyTraits<SVGSpreadMethodType>::fromString( attribute.value());100 if (name == SVGNames::spreadMethodAttr) { 101 SVGSpreadMethodType propertyValue = SVGPropertyTraits<SVGSpreadMethodType>::fromString(value); 102 102 if (propertyValue > 0) 103 103 setSpreadMethodBaseValue(propertyValue); … … 105 105 } 106 106 107 if (SVGURIReference::parseAttribute( attribute))107 if (SVGURIReference::parseAttribute(name, value)) 108 108 return; 109 if (SVGExternalResourcesRequired::parseAttribute( attribute))109 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 110 110 return; 111 111 -
trunk/Source/WebCore/svg/SVGGradientElement.h
r117195 r135069 91 91 92 92 bool isSupportedAttribute(const QualifiedName&); 93 virtual void parseAttribute(const Attribute&) OVERRIDE;93 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 94 94 virtual void svgAttributeChanged(const QualifiedName&); 95 95 -
trunk/Source/WebCore/svg/SVGImageElement.cpp
r134322 r135069 109 109 } 110 110 111 void SVGImageElement::parseAttribute(const Attribute& attribute)111 void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 112 112 { 113 113 SVGParsingError parseError = NoError; 114 114 115 if (!isSupportedAttribute( attribute.name()))116 SVGStyledTransformableElement::parseAttribute( attribute);117 else if ( attribute.name()== SVGNames::xAttr)118 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));119 else if ( attribute.name()== SVGNames::yAttr)120 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));121 else if ( attribute.name()== SVGNames::preserveAspectRatioAttr) {115 if (!isSupportedAttribute(name)) 116 SVGStyledTransformableElement::parseAttribute(name, value); 117 else if (name == SVGNames::xAttr) 118 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 119 else if (name == SVGNames::yAttr) 120 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 121 else if (name == SVGNames::preserveAspectRatioAttr) { 122 122 SVGPreserveAspectRatio preserveAspectRatio; 123 preserveAspectRatio.parse( attribute.value());123 preserveAspectRatio.parse(value); 124 124 setPreserveAspectRatioBaseValue(preserveAspectRatio); 125 } else if ( attribute.name()== SVGNames::widthAttr)126 setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));127 else if ( attribute.name()== SVGNames::heightAttr)128 setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));129 else if (SVGTests::parseAttribute( attribute)130 || SVGLangSpace::parseAttribute( attribute)131 || SVGExternalResourcesRequired::parseAttribute( attribute)132 || SVGURIReference::parseAttribute( attribute)) {125 } else if (name == SVGNames::widthAttr) 126 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 127 else if (name == SVGNames::heightAttr) 128 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 129 else if (SVGTests::parseAttribute(name, value) 130 || SVGLangSpace::parseAttribute(name, value) 131 || SVGExternalResourcesRequired::parseAttribute(name, value) 132 || SVGURIReference::parseAttribute(name, value)) { 133 133 } else 134 134 ASSERT_NOT_REACHED(); 135 135 136 reportAttributeParsingError(parseError, attribute);136 reportAttributeParsingError(parseError, name, value); 137 137 } 138 138 -
trunk/Source/WebCore/svg/SVGImageElement.h
r134322 r135069 52 52 53 53 bool isSupportedAttribute(const QualifiedName&); 54 virtual void parseAttribute(const Attribute&) OVERRIDE;54 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 55 55 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 56 56 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGLangSpace.cpp
r133976 r135069 51 51 } 52 52 53 bool SVGLangSpace::parseAttribute(const Attribute& attribute)53 bool SVGLangSpace::parseAttribute(const QualifiedName& name, const AtomicString& value) 54 54 { 55 if ( attribute.name().matches(XMLNames::langAttr)) {56 setXmllang( attribute.value());55 if (name.matches(XMLNames::langAttr)) { 56 setXmllang(value); 57 57 return true; 58 58 } 59 if ( attribute.name().matches(XMLNames::spaceAttr)) {60 setXmlspace( attribute.value());59 if (name.matches(XMLNames::spaceAttr)) { 60 setXmlspace(value); 61 61 return true; 62 62 } -
trunk/Source/WebCore/svg/SVGLangSpace.h
r117195 r135069 38 38 void setXmlspace(const AtomicString& xmlSpace); 39 39 40 bool parseAttribute(const Attribute&);40 bool parseAttribute(const QualifiedName&, const AtomicString&); 41 41 bool isKnownAttribute(const QualifiedName&); 42 42 void addSupportedAttributes(HashSet<QualifiedName>&); -
trunk/Source/WebCore/svg/SVGLineElement.cpp
r117195 r135069 82 82 } 83 83 84 void SVGLineElement::parseAttribute(const Attribute& attribute)84 void SVGLineElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 85 85 { 86 86 SVGParsingError parseError = NoError; 87 87 88 if (!isSupportedAttribute( attribute.name()))89 SVGStyledTransformableElement::parseAttribute( attribute);90 else if ( attribute.name()== SVGNames::x1Attr)91 setX1BaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));92 else if ( attribute.name()== SVGNames::y1Attr)93 setY1BaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));94 else if ( attribute.name()== SVGNames::x2Attr)95 setX2BaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));96 else if ( attribute.name()== SVGNames::y2Attr)97 setY2BaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));98 else if (SVGTests::parseAttribute( attribute)99 || SVGLangSpace::parseAttribute( attribute)100 || SVGExternalResourcesRequired::parseAttribute( attribute)) {88 if (!isSupportedAttribute(name)) 89 SVGStyledTransformableElement::parseAttribute(name, value); 90 else if (name == SVGNames::x1Attr) 91 setX1BaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 92 else if (name == SVGNames::y1Attr) 93 setY1BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 94 else if (name == SVGNames::x2Attr) 95 setX2BaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 96 else if (name == SVGNames::y2Attr) 97 setY2BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 98 else if (SVGTests::parseAttribute(name, value) 99 || SVGLangSpace::parseAttribute(name, value) 100 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 101 101 } else 102 102 ASSERT_NOT_REACHED(); 103 103 104 reportAttributeParsingError(parseError, attribute);104 reportAttributeParsingError(parseError, name, value); 105 105 } 106 106 -
trunk/Source/WebCore/svg/SVGLineElement.h
r117195 r135069 46 46 47 47 bool isSupportedAttribute(const QualifiedName&); 48 virtual void parseAttribute(const Attribute&) OVERRIDE;48 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 49 49 virtual void svgAttributeChanged(const QualifiedName&); 50 50 -
trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp
r117195 r135069 84 84 } 85 85 86 void SVGLinearGradientElement::parseAttribute(const Attribute& attribute)86 void SVGLinearGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 87 87 { 88 88 SVGParsingError parseError = NoError; 89 89 90 if (!isSupportedAttribute( attribute.name()))91 SVGGradientElement::parseAttribute( attribute);92 else if ( attribute.name()== SVGNames::x1Attr)93 setX1BaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));94 else if ( attribute.name()== SVGNames::y1Attr)95 setY1BaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));96 else if ( attribute.name()== SVGNames::x2Attr)97 setX2BaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));98 else if ( attribute.name()== SVGNames::y2Attr)99 setY2BaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));90 if (!isSupportedAttribute(name)) 91 SVGGradientElement::parseAttribute(name, value); 92 else if (name == SVGNames::x1Attr) 93 setX1BaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 94 else if (name == SVGNames::y1Attr) 95 setY1BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 96 else if (name == SVGNames::x2Attr) 97 setX2BaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 98 else if (name == SVGNames::y2Attr) 99 setY2BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 100 100 else 101 101 ASSERT_NOT_REACHED(); 102 102 103 reportAttributeParsingError(parseError, attribute);103 reportAttributeParsingError(parseError, name, value); 104 104 } 105 105 -
trunk/Source/WebCore/svg/SVGLinearGradientElement.h
r117195 r135069 40 40 41 41 bool isSupportedAttribute(const QualifiedName&); 42 virtual void parseAttribute(const Attribute&) OVERRIDE;42 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 43 43 virtual void svgAttributeChanged(const QualifiedName&); 44 44 -
trunk/Source/WebCore/svg/SVGMPathElement.cpp
r134851 r135069 113 113 } 114 114 115 void SVGMPathElement::parseAttribute(const Attribute& attribute)115 void SVGMPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 116 116 { 117 if (!isSupportedAttribute( attribute.name())) {118 SVGElement::parseAttribute( attribute);117 if (!isSupportedAttribute(name)) { 118 SVGElement::parseAttribute(name, value); 119 119 return; 120 120 } 121 121 122 if (SVGURIReference::parseAttribute( attribute))122 if (SVGURIReference::parseAttribute(name, value)) 123 123 return; 124 if (SVGExternalResourcesRequired::parseAttribute( attribute))124 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 125 125 return; 126 126 -
trunk/Source/WebCore/svg/SVGMPathElement.h
r134851 r135069 53 53 54 54 bool isSupportedAttribute(const QualifiedName&); 55 virtual void parseAttribute(const Attribute&) OVERRIDE;55 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 56 56 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 57 57 -
trunk/Source/WebCore/svg/SVGMarkerElement.cpp
r133976 r135069 127 127 } 128 128 129 void SVGMarkerElement::parseAttribute(const Attribute& attribute)129 void SVGMarkerElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 130 130 { 131 131 SVGParsingError parseError = NoError; 132 const AtomicString& value = attribute.value(); 133 134 if (!isSupportedAttribute(attribute.name())) 135 SVGStyledElement::parseAttribute(attribute); 136 else if (attribute.name() == SVGNames::markerUnitsAttr) { 132 133 if (!isSupportedAttribute(name)) 134 SVGStyledElement::parseAttribute(name, value); 135 else if (name == SVGNames::markerUnitsAttr) { 137 136 SVGMarkerUnitsType propertyValue = SVGPropertyTraits<SVGMarkerUnitsType>::fromString(value); 138 137 if (propertyValue > 0) 139 138 setMarkerUnitsBaseValue(propertyValue); 140 } else if ( attribute.name()== SVGNames::refXAttr)139 } else if (name == SVGNames::refXAttr) 141 140 setRefXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 142 else if ( attribute.name()== SVGNames::refYAttr)141 else if (name == SVGNames::refYAttr) 143 142 setRefYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 144 else if ( attribute.name()== SVGNames::markerWidthAttr)143 else if (name == SVGNames::markerWidthAttr) 145 144 setMarkerWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 146 else if ( attribute.name()== SVGNames::markerHeightAttr)145 else if (name == SVGNames::markerHeightAttr) 147 146 setMarkerHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 148 else if ( attribute.name()== SVGNames::orientAttr) {147 else if (name == SVGNames::orientAttr) { 149 148 SVGAngle angle; 150 149 SVGMarkerOrientType orientType = SVGPropertyTraits<SVGMarkerOrientType>::fromString(value, angle); … … 153 152 if (orientType == SVGMarkerOrientAngle) 154 153 setOrientAngleBaseValue(angle); 155 } else if (SVGLangSpace::parseAttribute( attribute)156 || SVGExternalResourcesRequired::parseAttribute( attribute)157 || SVGFitToViewBox::parseAttribute(this, attribute)) {154 } else if (SVGLangSpace::parseAttribute(name, value) 155 || SVGExternalResourcesRequired::parseAttribute(name, value) 156 || SVGFitToViewBox::parseAttribute(this, name, value)) { 158 157 } else 159 158 ASSERT_NOT_REACHED(); 160 159 161 reportAttributeParsingError(parseError, attribute);160 reportAttributeParsingError(parseError, name, value); 162 161 } 163 162 -
trunk/Source/WebCore/svg/SVGMarkerElement.h
r117195 r135069 129 129 130 130 bool isSupportedAttribute(const QualifiedName&); 131 virtual void parseAttribute(const Attribute&) OVERRIDE;131 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 132 132 virtual void svgAttributeChanged(const QualifiedName&); 133 133 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGMaskElement.cpp
r125971 r135069 95 95 } 96 96 97 void SVGMaskElement::parseAttribute(const Attribute& attribute)97 void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 98 98 { 99 99 SVGParsingError parseError = NoError; 100 100 101 if (!isSupportedAttribute( attribute.name()))102 SVGStyledElement::parseAttribute( attribute);103 else if ( attribute.name()== SVGNames::maskUnitsAttr) {104 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString( attribute.value());101 if (!isSupportedAttribute(name)) 102 SVGStyledElement::parseAttribute(name, value); 103 else if (name == SVGNames::maskUnitsAttr) { 104 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 105 105 if (propertyValue > 0) 106 106 setMaskUnitsBaseValue(propertyValue); 107 107 return; 108 } else if ( attribute.name()== SVGNames::maskContentUnitsAttr) {109 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString( attribute.value());108 } else if (name == SVGNames::maskContentUnitsAttr) { 109 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 110 110 if (propertyValue > 0) 111 111 setMaskContentUnitsBaseValue(propertyValue); 112 112 return; 113 } else if ( attribute.name()== SVGNames::xAttr)114 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));115 else if ( attribute.name()== SVGNames::yAttr)116 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));117 else if ( attribute.name()== SVGNames::widthAttr)118 setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));119 else if ( attribute.name()== SVGNames::heightAttr)120 setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));121 else if (SVGTests::parseAttribute( attribute)122 || SVGLangSpace::parseAttribute( attribute)123 || SVGExternalResourcesRequired::parseAttribute( attribute)) {113 } else if (name == SVGNames::xAttr) 114 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 115 else if (name == SVGNames::yAttr) 116 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 117 else if (name == SVGNames::widthAttr) 118 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 119 else if (name == SVGNames::heightAttr) 120 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 121 else if (SVGTests::parseAttribute(name, value) 122 || SVGLangSpace::parseAttribute(name, value) 123 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 124 124 } else 125 125 ASSERT_NOT_REACHED(); 126 126 127 reportAttributeParsingError(parseError, attribute);127 reportAttributeParsingError(parseError, name, value); 128 128 } 129 129 -
trunk/Source/WebCore/svg/SVGMaskElement.h
r125971 r135069 47 47 48 48 bool isSupportedAttribute(const QualifiedName&); 49 virtual void parseAttribute(const Attribute&) OVERRIDE;49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 50 50 virtual void svgAttributeChanged(const QualifiedName&); 51 51 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGPathElement.cpp
r133074 r135069 219 219 } 220 220 221 void SVGPathElement::parseAttribute(const Attribute& attribute)222 { 223 if (!isSupportedAttribute( attribute.name())) {224 SVGStyledTransformableElement::parseAttribute( attribute);225 return; 226 } 227 228 if ( attribute.name()== SVGNames::dAttr) {229 if (!buildSVGPathByteStreamFromString( attribute.value(), m_pathByteStream.get(), UnalteredParsing))230 document()->accessSVGExtensions()->reportError("Problem parsing d=\"" + attribute.value()+ "\"");231 return; 232 } 233 234 if ( attribute.name()== SVGNames::pathLengthAttr) {235 setPathLengthBaseValue( attribute.value().toFloat());221 void SVGPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 222 { 223 if (!isSupportedAttribute(name)) { 224 SVGStyledTransformableElement::parseAttribute(name, value); 225 return; 226 } 227 228 if (name == SVGNames::dAttr) { 229 if (!buildSVGPathByteStreamFromString(value, m_pathByteStream.get(), UnalteredParsing)) 230 document()->accessSVGExtensions()->reportError("Problem parsing d=\"" + value + "\""); 231 return; 232 } 233 234 if (name == SVGNames::pathLengthAttr) { 235 setPathLengthBaseValue(value.toFloat()); 236 236 if (pathLengthBaseValue() < 0) 237 237 document()->accessSVGExtensions()->reportError("A negative value for path attribute <pathLength> is not allowed"); … … 239 239 } 240 240 241 if (SVGTests::parseAttribute( attribute))242 return; 243 if (SVGLangSpace::parseAttribute( attribute))244 return; 245 if (SVGExternalResourcesRequired::parseAttribute( attribute))241 if (SVGTests::parseAttribute(name, value)) 242 return; 243 if (SVGLangSpace::parseAttribute(name, value)) 244 return; 245 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 246 246 return; 247 247 -
trunk/Source/WebCore/svg/SVGPathElement.h
r133074 r135069 109 109 110 110 bool isSupportedAttribute(const QualifiedName&); 111 virtual void parseAttribute(const Attribute&) OVERRIDE;111 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 112 112 virtual void svgAttributeChanged(const QualifiedName&); 113 113 virtual bool supportsMarkers() const { return true; } -
trunk/Source/WebCore/svg/SVGPatternElement.cpp
r119391 r135069 111 111 } 112 112 113 void SVGPatternElement::parseAttribute(const Attribute& attribute)113 void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 114 114 { 115 115 SVGParsingError parseError = NoError; 116 116 117 if (!isSupportedAttribute( attribute.name()))118 SVGStyledElement::parseAttribute( attribute);119 else if ( attribute.name()== SVGNames::patternUnitsAttr) {120 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString( attribute.value());117 if (!isSupportedAttribute(name)) 118 SVGStyledElement::parseAttribute(name, value); 119 else if (name == SVGNames::patternUnitsAttr) { 120 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 121 121 if (propertyValue > 0) 122 122 setPatternUnitsBaseValue(propertyValue); 123 123 return; 124 } else if ( attribute.name()== SVGNames::patternContentUnitsAttr) {125 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString( attribute.value());124 } else if (name == SVGNames::patternContentUnitsAttr) { 125 SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value); 126 126 if (propertyValue > 0) 127 127 setPatternContentUnitsBaseValue(propertyValue); 128 128 return; 129 } else if ( attribute.name()== SVGNames::patternTransformAttr) {129 } else if (name == SVGNames::patternTransformAttr) { 130 130 SVGTransformList newList; 131 newList.parse( attribute.value());131 newList.parse(value); 132 132 detachAnimatedPatternTransformListWrappers(newList.size()); 133 133 setPatternTransformBaseValue(newList); 134 134 return; 135 } else if ( attribute.name()== SVGNames::xAttr)136 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));137 else if ( attribute.name()== SVGNames::yAttr)138 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));139 else if ( attribute.name()== SVGNames::widthAttr)140 setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));141 else if ( attribute.name()== SVGNames::heightAttr)142 setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));143 else if (SVGURIReference::parseAttribute( attribute)144 || SVGTests::parseAttribute( attribute)145 || SVGLangSpace::parseAttribute( attribute)146 || SVGExternalResourcesRequired::parseAttribute( attribute)147 || SVGFitToViewBox::parseAttribute(this, attribute)) {135 } else if (name == SVGNames::xAttr) 136 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 137 else if (name == SVGNames::yAttr) 138 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 139 else if (name == SVGNames::widthAttr) 140 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 141 else if (name == SVGNames::heightAttr) 142 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 143 else if (SVGURIReference::parseAttribute(name, value) 144 || SVGTests::parseAttribute(name, value) 145 || SVGLangSpace::parseAttribute(name, value) 146 || SVGExternalResourcesRequired::parseAttribute(name, value) 147 || SVGFitToViewBox::parseAttribute(this, name, value)) { 148 148 } else 149 149 ASSERT_NOT_REACHED(); 150 150 151 reportAttributeParsingError(parseError, attribute);151 reportAttributeParsingError(parseError, name, value); 152 152 } 153 153 -
trunk/Source/WebCore/svg/SVGPatternElement.h
r119391 r135069 61 61 62 62 bool isSupportedAttribute(const QualifiedName&); 63 virtual void parseAttribute(const Attribute&) OVERRIDE;63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 64 64 virtual void svgAttributeChanged(const QualifiedName&); 65 65 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGPolyElement.cpp
r118735 r135069 79 79 } 80 80 81 void SVGPolyElement::parseAttribute(const Attribute& attribute)81 void SVGPolyElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 82 82 { 83 if (!isSupportedAttribute( attribute.name())) {84 SVGStyledTransformableElement::parseAttribute( attribute);83 if (!isSupportedAttribute(name)) { 84 SVGStyledTransformableElement::parseAttribute(name, value); 85 85 return; 86 86 } 87 87 88 const AtomicString& value = attribute.value(); 89 if (attribute.name() == SVGNames::pointsAttr) { 88 if (name == SVGNames::pointsAttr) { 90 89 SVGPointList newList; 91 90 if (!pointsListFromSVGData(newList, value)) … … 99 98 } 100 99 101 if (SVGTests::parseAttribute( attribute))100 if (SVGTests::parseAttribute(name, value)) 102 101 return; 103 if (SVGLangSpace::parseAttribute( attribute))102 if (SVGLangSpace::parseAttribute(name, value)) 104 103 return; 105 if (SVGExternalResourcesRequired::parseAttribute( attribute))104 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 106 105 return; 107 106 -
trunk/Source/WebCore/svg/SVGPolyElement.h
r117195 r135069 52 52 53 53 bool isSupportedAttribute(const QualifiedName&); 54 virtual void parseAttribute(const Attribute&) OVERRIDE;54 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 55 55 virtual void svgAttributeChanged(const QualifiedName&); 56 56 -
trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp
r130599 r135069 92 92 } 93 93 94 void SVGRadialGradientElement::parseAttribute(const Attribute& attribute)94 void SVGRadialGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 95 95 { 96 96 SVGParsingError parseError = NoError; 97 97 98 if (!isSupportedAttribute( attribute.name()))99 SVGGradientElement::parseAttribute( attribute);100 else if ( attribute.name()== SVGNames::cxAttr)101 setCxBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));102 else if ( attribute.name()== SVGNames::cyAttr)103 setCyBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));104 else if ( attribute.name()== SVGNames::rAttr)105 setRBaseValue(SVGLength::construct(LengthModeOther, attribute.value(), parseError, ForbidNegativeLengths));106 else if ( attribute.name()== SVGNames::fxAttr)107 setFxBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));108 else if ( attribute.name()== SVGNames::fyAttr)109 setFyBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));110 else if ( attribute.name()== SVGNames::frAttr)111 setFrBaseValue(SVGLength::construct(LengthModeOther, attribute.value(), parseError, ForbidNegativeLengths));98 if (!isSupportedAttribute(name)) 99 SVGGradientElement::parseAttribute(name, value); 100 else if (name == SVGNames::cxAttr) 101 setCxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 102 else if (name == SVGNames::cyAttr) 103 setCyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 104 else if (name == SVGNames::rAttr) 105 setRBaseValue(SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths)); 106 else if (name == SVGNames::fxAttr) 107 setFxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 108 else if (name == SVGNames::fyAttr) 109 setFyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 110 else if (name == SVGNames::frAttr) 111 setFrBaseValue(SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths)); 112 112 else 113 113 ASSERT_NOT_REACHED(); 114 114 115 reportAttributeParsingError(parseError, attribute);115 reportAttributeParsingError(parseError, name, value); 116 116 } 117 117 -
trunk/Source/WebCore/svg/SVGRadialGradientElement.h
r130599 r135069 40 40 41 41 bool isSupportedAttribute(const QualifiedName&); 42 virtual void parseAttribute(const Attribute&) OVERRIDE;42 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 43 43 virtual void svgAttributeChanged(const QualifiedName&); 44 44 -
trunk/Source/WebCore/svg/SVGRectElement.cpp
r117195 r135069 92 92 } 93 93 94 void SVGRectElement::parseAttribute(const Attribute& attribute)94 void SVGRectElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 95 95 { 96 96 SVGParsingError parseError = NoError; 97 97 98 if (!isSupportedAttribute( attribute.name()))99 SVGStyledTransformableElement::parseAttribute( attribute);100 else if ( attribute.name()== SVGNames::xAttr)101 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));102 else if ( attribute.name()== SVGNames::yAttr)103 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));104 else if ( attribute.name()== SVGNames::rxAttr)105 setRxBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));106 else if ( attribute.name()== SVGNames::ryAttr)107 setRyBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));108 else if ( attribute.name()== SVGNames::widthAttr)109 setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));110 else if ( attribute.name()== SVGNames::heightAttr)111 setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));112 else if (SVGTests::parseAttribute( attribute)113 || SVGLangSpace::parseAttribute( attribute)114 || SVGExternalResourcesRequired::parseAttribute( attribute)) {98 if (!isSupportedAttribute(name)) 99 SVGStyledTransformableElement::parseAttribute(name, value); 100 else if (name == SVGNames::xAttr) 101 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 102 else if (name == SVGNames::yAttr) 103 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 104 else if (name == SVGNames::rxAttr) 105 setRxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 106 else if (name == SVGNames::ryAttr) 107 setRyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 108 else if (name == SVGNames::widthAttr) 109 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 110 else if (name == SVGNames::heightAttr) 111 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 112 else if (SVGTests::parseAttribute(name, value) 113 || SVGLangSpace::parseAttribute(name, value) 114 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 115 115 } else 116 116 ASSERT_NOT_REACHED(); 117 117 118 reportAttributeParsingError(parseError, attribute);118 reportAttributeParsingError(parseError, name, value); 119 119 } 120 120 -
trunk/Source/WebCore/svg/SVGRectElement.h
r117195 r135069 46 46 47 47 bool isSupportedAttribute(const QualifiedName&); 48 virtual void parseAttribute(const Attribute&) OVERRIDE;48 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 49 49 virtual void svgAttributeChanged(const QualifiedName&); 50 50 -
trunk/Source/WebCore/svg/SVGSVGElement.cpp
r133976 r135069 234 234 } 235 235 236 void SVGSVGElement::parseAttribute(const Attribute& attribute)236 void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 237 237 { 238 238 SVGParsingError parseError = NoError; … … 242 242 243 243 // Only handle events if we're the outermost <svg> element 244 if ( attribute.name()== HTMLNames::onunloadAttr)245 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attribute));246 else if ( attribute.name()== HTMLNames::onresizeAttr)247 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attribute));248 else if ( attribute.name()== HTMLNames::onscrollAttr)249 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attribute));250 else if ( attribute.name()== SVGNames::onzoomAttr)251 document()->setWindowAttributeEventListener(eventNames().zoomEvent, createAttributeEventListener(document()->frame(), attribute));244 if (name == HTMLNames::onunloadAttr) 245 document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), name, value)); 246 else if (name == HTMLNames::onresizeAttr) 247 document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), name, value)); 248 else if (name == HTMLNames::onscrollAttr) 249 document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), name, value)); 250 else if (name == SVGNames::onzoomAttr) 251 document()->setWindowAttributeEventListener(eventNames().zoomEvent, createAttributeEventListener(document()->frame(), name, value)); 252 252 else 253 253 setListener = false; … … 257 257 } 258 258 259 if ( attribute.name()== HTMLNames::onabortAttr)260 document()->setWindowAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(document()->frame(), attribute));261 else if ( attribute.name()== HTMLNames::onerrorAttr)262 document()->setWindowAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(document()->frame(), attribute));263 else if ( attribute.name()== SVGNames::xAttr)264 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));265 else if ( attribute.name()== SVGNames::yAttr)266 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));267 else if ( attribute.name()== SVGNames::widthAttr)268 setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));269 else if ( attribute.name()== SVGNames::heightAttr)270 setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));271 else if (SVGTests::parseAttribute( attribute)272 || SVGLangSpace::parseAttribute( attribute)273 || SVGExternalResourcesRequired::parseAttribute( attribute)274 || SVGFitToViewBox::parseAttribute(this, attribute)275 || SVGZoomAndPan::parseAttribute(this, attribute)) {259 if (name == HTMLNames::onabortAttr) 260 document()->setWindowAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(document()->frame(), name, value)); 261 else if (name == HTMLNames::onerrorAttr) 262 document()->setWindowAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(document()->frame(), name, value)); 263 else if (name == SVGNames::xAttr) 264 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 265 else if (name == SVGNames::yAttr) 266 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 267 else if (name == SVGNames::widthAttr) 268 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 269 else if (name == SVGNames::heightAttr) 270 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 271 else if (SVGTests::parseAttribute(name, value) 272 || SVGLangSpace::parseAttribute(name, value) 273 || SVGExternalResourcesRequired::parseAttribute(name, value) 274 || SVGFitToViewBox::parseAttribute(this, name, value) 275 || SVGZoomAndPan::parseAttribute(this, name, value)) { 276 276 } else 277 SVGStyledLocatableElement::parseAttribute( attribute);278 279 reportAttributeParsingError(parseError, attribute);277 SVGStyledLocatableElement::parseAttribute(name, value); 278 279 reportAttributeParsingError(parseError, name, value); 280 280 } 281 281 -
trunk/Source/WebCore/svg/SVGSVGElement.h
r118735 r135069 145 145 virtual bool isSVG() const { return true; } 146 146 147 virtual void parseAttribute(const Attribute&) OVERRIDE;147 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 148 148 149 149 virtual bool rendererIsNeeded(const NodeRenderingContext& context) { return StyledElement::rendererIsNeeded(context); } -
trunk/Source/WebCore/svg/SVGScriptElement.cpp
r125147 r135069 71 71 } 72 72 73 void SVGScriptElement::parseAttribute(const Attribute& attribute)74 { 75 if (!isSupportedAttribute( attribute.name())) {76 SVGElement::parseAttribute( attribute);77 return; 78 } 79 80 if ( attribute.name()== SVGNames::typeAttr) {81 setType( attribute.value());82 return; 83 } 84 85 if ( attribute.name()== HTMLNames::onerrorAttr) {86 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attribute));87 return; 88 } 89 90 if (SVGURIReference::parseAttribute( attribute))91 return; 92 if (SVGExternalResourcesRequired::parseAttribute( attribute))73 void SVGScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 74 { 75 if (!isSupportedAttribute(name)) { 76 SVGElement::parseAttribute(name, value); 77 return; 78 } 79 80 if (name == SVGNames::typeAttr) { 81 setType(value); 82 return; 83 } 84 85 if (name == HTMLNames::onerrorAttr) { 86 setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, name, value)); 87 return; 88 } 89 90 if (SVGURIReference::parseAttribute(name, value)) 91 return; 92 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 93 93 return; 94 94 -
trunk/Source/WebCore/svg/SVGScriptElement.h
r125147 r135069 46 46 47 47 bool isSupportedAttribute(const QualifiedName&); 48 virtual void parseAttribute(const Attribute&) OVERRIDE;48 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 49 49 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 50 50 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); -
trunk/Source/WebCore/svg/SVGStopElement.cpp
r122867 r135069 63 63 } 64 64 65 void SVGStopElement::parseAttribute(const Attribute& attribute)65 void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 66 66 { 67 if (!isSupportedAttribute( attribute.name())) {68 SVGStyledElement::parseAttribute( attribute);67 if (!isSupportedAttribute(name)) { 68 SVGStyledElement::parseAttribute(name, value); 69 69 return; 70 70 } 71 71 72 if (attribute.name() == SVGNames::offsetAttr) { 73 const String& value = attribute.value(); 72 if (name == SVGNames::offsetAttr) { 74 73 if (value.endsWith('%')) 75 setOffsetBaseValue(value. left(value.length() - 1).toFloat() / 100.0f);74 setOffsetBaseValue(value.string().left(value.length() - 1).toFloat() / 100.0f); 76 75 else 77 76 setOffsetBaseValue(value.toFloat()); -
trunk/Source/WebCore/svg/SVGStopElement.h
r117365 r135069 38 38 39 39 bool isSupportedAttribute(const QualifiedName&); 40 virtual void parseAttribute(const Attribute&) OVERRIDE;40 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 41 41 virtual void svgAttributeChanged(const QualifiedName&); 42 42 -
trunk/Source/WebCore/svg/SVGStyleElement.cpp
r133976 r135069 111 111 } 112 112 113 void SVGStyleElement::parseAttribute(const Attribute& attribute)113 void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 114 114 { 115 if (!isSupportedAttribute( attribute.name())) {116 SVGElement::parseAttribute( attribute);115 if (!isSupportedAttribute(name)) { 116 SVGElement::parseAttribute(name, value); 117 117 return; 118 118 } 119 119 120 if ( attribute.name()== SVGNames::titleAttr) {120 if (name == SVGNames::titleAttr) { 121 121 if (m_sheet) 122 m_sheet->setTitle( attribute.value());122 m_sheet->setTitle(value); 123 123 return; 124 124 } 125 125 126 if (SVGLangSpace::parseAttribute( attribute))126 if (SVGLangSpace::parseAttribute(name, value)) 127 127 return; 128 128 -
trunk/Source/WebCore/svg/SVGStyleElement.h
r125147 r135069 54 54 55 55 bool isSupportedAttribute(const QualifiedName&); 56 virtual void parseAttribute(const Attribute&) OVERRIDE;56 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 57 57 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 58 58 virtual void removedFrom(ContainerNode*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGStyledElement.cpp
r134322 r135069 299 299 } 300 300 301 void SVGStyledElement::parseAttribute(const Attribute& attribute)301 void SVGStyledElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 302 302 { 303 303 // SVG animation has currently requires special storage of values so we set … … 305 305 // style updates (instead of StyledElement::parseAttribute). We don't 306 306 // tell StyledElement about the change to avoid parsing the class list twice 307 if ( attribute.name()== HTMLNames::classAttr) {308 setClassNameBaseValue( attribute.value());307 if (name == HTMLNames::classAttr) { 308 setClassNameBaseValue(value); 309 309 return; 310 310 } 311 311 312 312 // id is handled by StyledElement which SVGElement inherits from 313 SVGElement::parseAttribute( attribute);313 SVGElement::parseAttribute(name, value); 314 314 } 315 315 -
trunk/Source/WebCore/svg/SVGStyledElement.h
r134322 r135069 61 61 virtual bool rendererIsNeeded(const NodeRenderingContext&); 62 62 63 virtual void parseAttribute(const Attribute&) OVERRIDE;63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 64 64 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 65 65 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGStyledTransformableElement.cpp
r117195 r135069 99 99 } 100 100 101 void SVGStyledTransformableElement::parseAttribute(const Attribute& attribute)101 void SVGStyledTransformableElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 102 102 { 103 if (!isSupportedAttribute( attribute.name())) {104 SVGStyledLocatableElement::parseAttribute( attribute);103 if (!isSupportedAttribute(name)) { 104 SVGStyledLocatableElement::parseAttribute(name, value); 105 105 return; 106 106 } 107 107 108 if ( attribute.name()== SVGNames::transformAttr) {108 if (name == SVGNames::transformAttr) { 109 109 SVGTransformList newList; 110 newList.parse( attribute.value());110 newList.parse(value); 111 111 detachAnimatedTransformListWrappers(newList.size()); 112 112 setTransformBaseValue(newList); -
trunk/Source/WebCore/svg/SVGStyledTransformableElement.h
r117195 r135069 56 56 57 57 bool isSupportedAttribute(const QualifiedName&); 58 virtual void parseAttribute(const Attribute&) OVERRIDE;58 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 59 59 virtual void svgAttributeChanged(const QualifiedName&); 60 60 -
trunk/Source/WebCore/svg/SVGSymbolElement.cpp
r118735 r135069 66 66 } 67 67 68 void SVGSymbolElement::parseAttribute(const Attribute& attribute)68 void SVGSymbolElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 69 69 { 70 if (!isSupportedAttribute( attribute.name())) {71 SVGStyledElement::parseAttribute( attribute);70 if (!isSupportedAttribute(name)) { 71 SVGStyledElement::parseAttribute(name, value); 72 72 return; 73 73 } 74 74 75 if (SVGLangSpace::parseAttribute( attribute))75 if (SVGLangSpace::parseAttribute(name, value)) 76 76 return; 77 if (SVGExternalResourcesRequired::parseAttribute( attribute))77 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 78 78 return; 79 if (SVGFitToViewBox::parseAttribute(this, attribute))79 if (SVGFitToViewBox::parseAttribute(this, name, value)) 80 80 return; 81 81 -
trunk/Source/WebCore/svg/SVGSymbolElement.h
r117195 r135069 46 46 47 47 bool isSupportedAttribute(const QualifiedName&); 48 virtual void parseAttribute(const Attribute&) OVERRIDE;48 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 49 49 virtual void svgAttributeChanged(const QualifiedName&); 50 50 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); -
trunk/Source/WebCore/svg/SVGTRefElement.cpp
r126359 r135069 223 223 } 224 224 225 void SVGTRefElement::parseAttribute(const Attribute& attribute) 226 { 227 if (!isSupportedAttribute(attribute.name())) { 228 SVGTextPositioningElement::parseAttribute(attribute); 229 return; 230 } 231 232 if (SVGURIReference::parseAttribute(attribute)) { 233 return; 234 } 225 void SVGTRefElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 226 { 227 if (!isSupportedAttribute(name)) { 228 SVGTextPositioningElement::parseAttribute(name, value); 229 return; 230 } 231 232 if (SVGURIReference::parseAttribute(name, value)) 233 return; 235 234 236 235 ASSERT_NOT_REACHED(); -
trunk/Source/WebCore/svg/SVGTRefElement.h
r126205 r135069 44 44 45 45 bool isSupportedAttribute(const QualifiedName&); 46 virtual void parseAttribute(const Attribute&) OVERRIDE;46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 47 47 virtual void svgAttributeChanged(const QualifiedName&); 48 48 -
trunk/Source/WebCore/svg/SVGTests.cpp
r126657 r135069 124 124 } 125 125 126 bool SVGTests::parseAttribute(const Attribute& attribute)127 { 128 if ( attribute.name()== SVGNames::requiredFeaturesAttr) {129 m_requiredFeatures.value.reset( attribute.value());130 return true; 131 } 132 if ( attribute.name()== SVGNames::requiredExtensionsAttr) {133 m_requiredExtensions.value.reset( attribute.value());134 return true; 135 } 136 if ( attribute.name()== SVGNames::systemLanguageAttr) {137 m_systemLanguage.value.reset( attribute.value());126 bool SVGTests::parseAttribute(const QualifiedName& name, const AtomicString& value) 127 { 128 if (name == SVGNames::requiredFeaturesAttr) { 129 m_requiredFeatures.value.reset(value); 130 return true; 131 } 132 if (name == SVGNames::requiredExtensionsAttr) { 133 m_requiredExtensions.value.reset(value); 134 return true; 135 } 136 if (name == SVGNames::systemLanguageAttr) { 137 m_systemLanguage.value.reset(value); 138 138 return true; 139 139 } -
trunk/Source/WebCore/svg/SVGTests.h
r117195 r135069 42 42 bool isValid() const; 43 43 44 bool parseAttribute(const Attribute&);44 bool parseAttribute(const QualifiedName&, const AtomicString&); 45 45 bool isKnownAttribute(const QualifiedName&); 46 46 -
trunk/Source/WebCore/svg/SVGTextContentElement.cpp
r134322 r135069 251 251 } 252 252 253 void SVGTextContentElement::parseAttribute(const Attribute& attribute)253 void SVGTextContentElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 254 254 { 255 255 SVGParsingError parseError = NoError; 256 256 257 if (!isSupportedAttribute( attribute.name()))258 SVGStyledElement::parseAttribute( attribute);259 else if ( attribute.name()== SVGNames::lengthAdjustAttr) {260 SVGLengthAdjustType propertyValue = SVGPropertyTraits<SVGLengthAdjustType>::fromString( attribute.value());257 if (!isSupportedAttribute(name)) 258 SVGStyledElement::parseAttribute(name, value); 259 else if (name == SVGNames::lengthAdjustAttr) { 260 SVGLengthAdjustType propertyValue = SVGPropertyTraits<SVGLengthAdjustType>::fromString(value); 261 261 if (propertyValue > 0) 262 262 setLengthAdjustBaseValue(propertyValue); 263 } else if ( attribute.name()== SVGNames::textLengthAttr) {264 m_textLength.value = SVGLength::construct(LengthModeOther, attribute.value(), parseError, ForbidNegativeLengths);265 } else if (SVGTests::parseAttribute( attribute)266 || SVGExternalResourcesRequired::parseAttribute( attribute)) {267 } else if (SVGLangSpace::parseAttribute( attribute)) {263 } else if (name == SVGNames::textLengthAttr) { 264 m_textLength.value = SVGLength::construct(LengthModeOther, value, parseError, ForbidNegativeLengths); 265 } else if (SVGTests::parseAttribute(name, value) 266 || SVGExternalResourcesRequired::parseAttribute(name, value)) { 267 } else if (SVGLangSpace::parseAttribute(name, value)) { 268 268 } else 269 269 ASSERT_NOT_REACHED(); 270 270 271 reportAttributeParsingError(parseError, attribute);271 reportAttributeParsingError(parseError, name, value); 272 272 } 273 273 -
trunk/Source/WebCore/svg/SVGTextContentElement.h
r134322 r135069 104 104 105 105 bool isSupportedAttribute(const QualifiedName&); 106 virtual void parseAttribute(const Attribute&) OVERRIDE;106 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 107 107 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 108 108 virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE; -
trunk/Source/WebCore/svg/SVGTextElement.cpp
r117195 r135069 65 65 } 66 66 67 void SVGTextElement::parseAttribute(const Attribute& attribute)67 void SVGTextElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 68 68 { 69 if (!isSupportedAttribute( attribute.name())) {70 SVGTextPositioningElement::parseAttribute( attribute);69 if (!isSupportedAttribute(name)) { 70 SVGTextPositioningElement::parseAttribute(name, value); 71 71 return; 72 72 } 73 73 74 if ( attribute.name()== SVGNames::transformAttr) {74 if (name == SVGNames::transformAttr) { 75 75 SVGTransformList newList; 76 newList.parse( attribute.value());76 newList.parse(value); 77 77 detachAnimatedTransformListWrappers(newList.size()); 78 78 setTransformBaseValue(newList); -
trunk/Source/WebCore/svg/SVGTextElement.h
r117195 r135069 48 48 49 49 bool isSupportedAttribute(const QualifiedName&); 50 virtual void parseAttribute(const Attribute&) OVERRIDE;50 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 51 51 52 52 virtual AffineTransform* supplementalTransform(); -
trunk/Source/WebCore/svg/SVGTextPathElement.cpp
r118609 r135069 85 85 } 86 86 87 void SVGTextPathElement::parseAttribute(const Attribute& attribute)87 void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 88 88 { 89 89 SVGParsingError parseError = NoError; 90 const AtomicString& value = attribute.value(); 91 92 if (!isSupportedAttribute(attribute.name())) 93 SVGTextContentElement::parseAttribute(attribute); 94 else if (attribute.name() == SVGNames::startOffsetAttr) 90 91 if (!isSupportedAttribute(name)) 92 SVGTextContentElement::parseAttribute(name, value); 93 else if (name == SVGNames::startOffsetAttr) 95 94 setStartOffsetBaseValue(SVGLength::construct(LengthModeOther, value, parseError)); 96 else if ( attribute.name()== SVGNames::methodAttr) {95 else if (name == SVGNames::methodAttr) { 97 96 SVGTextPathMethodType propertyValue = SVGPropertyTraits<SVGTextPathMethodType>::fromString(value); 98 97 if (propertyValue > 0) 99 98 setMethodBaseValue(propertyValue); 100 } else if ( attribute.name()== SVGNames::spacingAttr) {99 } else if (name == SVGNames::spacingAttr) { 101 100 SVGTextPathSpacingType propertyValue = SVGPropertyTraits<SVGTextPathSpacingType>::fromString(value); 102 101 if (propertyValue > 0) 103 102 setSpacingBaseValue(propertyValue); 104 } else if (SVGURIReference::parseAttribute( attribute)) {103 } else if (SVGURIReference::parseAttribute(name, value)) { 105 104 } else 106 105 ASSERT_NOT_REACHED(); 107 106 108 reportAttributeParsingError(parseError, attribute);107 reportAttributeParsingError(parseError, name, value); 109 108 } 110 109 -
trunk/Source/WebCore/svg/SVGTextPathElement.h
r118609 r135069 125 125 126 126 bool isSupportedAttribute(const QualifiedName&); 127 virtual void parseAttribute(const Attribute&) OVERRIDE;127 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 128 128 virtual void svgAttributeChanged(const QualifiedName&); 129 129 -
trunk/Source/WebCore/svg/SVGTextPositioningElement.cpp
r117195 r135069 69 69 } 70 70 71 void SVGTextPositioningElement::parseAttribute(const Attribute& attribute)71 void SVGTextPositioningElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 72 72 { 73 if (!isSupportedAttribute( attribute.name())) {74 SVGTextContentElement::parseAttribute( attribute);73 if (!isSupportedAttribute(name)) { 74 SVGTextContentElement::parseAttribute(name, value); 75 75 return; 76 76 } 77 77 78 if ( attribute.name()== SVGNames::xAttr) {78 if (name == SVGNames::xAttr) { 79 79 SVGLengthList newList; 80 newList.parse( attribute.value(), LengthModeWidth);80 newList.parse(value, LengthModeWidth); 81 81 detachAnimatedXListWrappers(newList.size()); 82 82 setXBaseValue(newList); … … 84 84 } 85 85 86 if ( attribute.name()== SVGNames::yAttr) {86 if (name == SVGNames::yAttr) { 87 87 SVGLengthList newList; 88 newList.parse( attribute.value(), LengthModeHeight);88 newList.parse(value, LengthModeHeight); 89 89 detachAnimatedYListWrappers(newList.size()); 90 90 setYBaseValue(newList); … … 92 92 } 93 93 94 if ( attribute.name()== SVGNames::dxAttr) {94 if (name == SVGNames::dxAttr) { 95 95 SVGLengthList newList; 96 newList.parse( attribute.value(), LengthModeWidth);96 newList.parse(value, LengthModeWidth); 97 97 detachAnimatedDxListWrappers(newList.size()); 98 98 setDxBaseValue(newList); … … 100 100 } 101 101 102 if ( attribute.name()== SVGNames::dyAttr) {102 if (name == SVGNames::dyAttr) { 103 103 SVGLengthList newList; 104 newList.parse( attribute.value(), LengthModeHeight);104 newList.parse(value, LengthModeHeight); 105 105 detachAnimatedDyListWrappers(newList.size()); 106 106 setDyBaseValue(newList); … … 108 108 } 109 109 110 if ( attribute.name()== SVGNames::rotateAttr) {110 if (name == SVGNames::rotateAttr) { 111 111 SVGNumberList newList; 112 newList.parse( attribute.value());112 newList.parse(value); 113 113 detachAnimatedRotateListWrappers(newList.size()); 114 114 setRotateBaseValue(newList); -
trunk/Source/WebCore/svg/SVGTextPositioningElement.h
r117195 r135069 37 37 38 38 bool isSupportedAttribute(const QualifiedName&); 39 virtual void parseAttribute(const Attribute&) OVERRIDE;39 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 40 40 virtual void svgAttributeChanged(const QualifiedName&); 41 41 -
trunk/Source/WebCore/svg/SVGURIReference.cpp
r131826 r135069 31 31 namespace WebCore { 32 32 33 bool SVGURIReference::parseAttribute(const Attribute& attribute)33 bool SVGURIReference::parseAttribute(const QualifiedName& name, const AtomicString& value) 34 34 { 35 if ( attribute.name().matches(XLinkNames::hrefAttr)) {36 setHrefBaseValue( attribute.value());35 if (name.matches(XLinkNames::hrefAttr)) { 36 setHrefBaseValue(value); 37 37 return true; 38 38 } -
trunk/Source/WebCore/svg/SVGURIReference.h
r131826 r135069 35 35 virtual ~SVGURIReference() { } 36 36 37 bool parseAttribute(const Attribute&);37 bool parseAttribute(const QualifiedName&, const AtomicString&); 38 38 bool isKnownAttribute(const QualifiedName&); 39 39 void addSupportedAttributes(HashSet<QualifiedName>&); -
trunk/Source/WebCore/svg/SVGUseElement.cpp
r134930 r135069 154 154 } 155 155 156 void SVGUseElement::parseAttribute(const Attribute& attribute)156 void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 157 157 { 158 158 SVGParsingError parseError = NoError; 159 159 160 if (!isSupportedAttribute( attribute.name()))161 SVGStyledTransformableElement::parseAttribute( attribute);162 else if ( attribute.name()== SVGNames::xAttr)163 setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));164 else if ( attribute.name()== SVGNames::yAttr)165 setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));166 else if ( attribute.name()== SVGNames::widthAttr)167 setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));168 else if ( attribute.name()== SVGNames::heightAttr)169 setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));170 else if (SVGTests::parseAttribute( attribute)171 || SVGLangSpace::parseAttribute( attribute)172 || SVGExternalResourcesRequired::parseAttribute( attribute)173 || SVGURIReference::parseAttribute( attribute)) {160 if (!isSupportedAttribute(name)) 161 SVGStyledTransformableElement::parseAttribute(name, value); 162 else if (name == SVGNames::xAttr) 163 setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); 164 else if (name == SVGNames::yAttr) 165 setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); 166 else if (name == SVGNames::widthAttr) 167 setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths)); 168 else if (name == SVGNames::heightAttr) 169 setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths)); 170 else if (SVGTests::parseAttribute(name, value) 171 || SVGLangSpace::parseAttribute(name, value) 172 || SVGExternalResourcesRequired::parseAttribute(name, value) 173 || SVGURIReference::parseAttribute(name, value)) { 174 174 } else 175 175 ASSERT_NOT_REACHED(); 176 176 177 reportAttributeParsingError(parseError, attribute);177 reportAttributeParsingError(parseError, name, value); 178 178 } 179 179 -
trunk/Source/WebCore/svg/SVGUseElement.h
r131826 r135069 67 67 68 68 bool isSupportedAttribute(const QualifiedName&); 69 virtual void parseAttribute(const Attribute&) OVERRIDE;69 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 70 70 virtual void svgAttributeChanged(const QualifiedName&); 71 71 -
trunk/Source/WebCore/svg/SVGViewElement.cpp
r118735 r135069 70 70 } 71 71 72 void SVGViewElement::parseAttribute(const Attribute& attribute)72 void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 73 73 { 74 if (!isSupportedAttribute( attribute.name())) {75 SVGStyledElement::parseAttribute( attribute);74 if (!isSupportedAttribute(name)) { 75 SVGStyledElement::parseAttribute(name, value); 76 76 return; 77 77 } 78 78 79 if ( attribute.name()== SVGNames::viewTargetAttr) {80 viewTarget().reset( attribute.value());79 if (name == SVGNames::viewTargetAttr) { 80 viewTarget().reset(value); 81 81 return; 82 82 } 83 83 84 if (SVGExternalResourcesRequired::parseAttribute( attribute))84 if (SVGExternalResourcesRequired::parseAttribute(name, value)) 85 85 return; 86 if (SVGFitToViewBox::parseAttribute(this, attribute))86 if (SVGFitToViewBox::parseAttribute(this, name, value)) 87 87 return; 88 if (SVGZoomAndPan::parseAttribute(this, attribute))88 if (SVGZoomAndPan::parseAttribute(this, name, value)) 89 89 return; 90 90 -
trunk/Source/WebCore/svg/SVGViewElement.h
r118735 r135069 53 53 // FIXME: svgAttributeChanged missing. 54 54 bool isSupportedAttribute(const QualifiedName&); 55 virtual void parseAttribute(const Attribute&) OVERRIDE;55 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 56 56 57 57 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; } -
trunk/Source/WebCore/svg/SVGZoomAndPan.h
r118353 r135069 60 60 61 61 template<class SVGElementTarget> 62 static bool parseAttribute(SVGElementTarget* target, const Attribute& attribute)62 static bool parseAttribute(SVGElementTarget* target, const QualifiedName& name, const AtomicString& value) 63 63 { 64 64 ASSERT(target); 65 65 ASSERT(target->document()); 66 if ( attribute.name()== SVGNames::zoomAndPanAttr) {67 const UChar* start = attribute.value().characters();68 const UChar* end = start + attribute.value().length();66 if (name == SVGNames::zoomAndPanAttr) { 67 const UChar* start = value.characters(); 68 const UChar* end = start + value.length(); 69 69 SVGZoomAndPanType zoomAndPan = SVGZoomAndPanUnknown; 70 70 parseZoomAndPan(start, end, zoomAndPan); -
trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp
r133976 r135069 427 427 } 428 428 429 void SVGSMILElement::parseAttribute(const Attribute& attribute)430 { 431 if ( attribute.name()== SVGNames::beginAttr) {429 void SVGSMILElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 430 { 431 if (name == SVGNames::beginAttr) { 432 432 if (!m_conditions.isEmpty()) { 433 433 disconnectConditions(); … … 435 435 parseBeginOrEnd(fastGetAttribute(SVGNames::endAttr), End); 436 436 } 437 parseBeginOrEnd( attribute.value().string(), Begin);437 parseBeginOrEnd(value.string(), Begin); 438 438 if (inDocument()) 439 439 connectConditions(); 440 } else if ( attribute.name()== SVGNames::endAttr) {440 } else if (name == SVGNames::endAttr) { 441 441 if (!m_conditions.isEmpty()) { 442 442 disconnectConditions(); … … 444 444 parseBeginOrEnd(fastGetAttribute(SVGNames::beginAttr), Begin); 445 445 } 446 parseBeginOrEnd( attribute.value().string(), End);446 parseBeginOrEnd(value.string(), End); 447 447 if (inDocument()) 448 448 connectConditions(); 449 449 } else 450 SVGElement::parseAttribute( attribute);450 SVGElement::parseAttribute(name, value); 451 451 } 452 452 -
trunk/Source/WebCore/svg/animation/SVGSMILElement.h
r130777 r135069 48 48 49 49 bool isSupportedAttribute(const QualifiedName&); 50 virtual void parseAttribute(const Attribute&) OVERRIDE;50 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; 51 51 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 52 52 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
Note:
See TracChangeset
for help on using the changeset viewer.