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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 832343003: Delay string conversion of attribute names until needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/inspector/InspectorDOMAgent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2934 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this, name, oldValue)); 2934 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this, name, oldValue));
2935 2935
2936 attributeWillChange(name, oldValue, newValue); 2936 attributeWillChange(name, oldValue, newValue);
2937 2937
2938 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); 2938 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue);
2939 } 2939 }
2940 2940
2941 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& val ue) 2941 void Element::didAddAttribute(const QualifiedName& name, const AtomicString& val ue)
2942 { 2942 {
2943 attributeChanged(name, value); 2943 attributeChanged(name, value);
2944 InspectorInstrumentation::didModifyDOMAttr(this, name.toString(), value); 2944 InspectorInstrumentation::didModifyDOMAttr(this, name, value);
2945 dispatchSubtreeModifiedEvent(); 2945 dispatchSubtreeModifiedEvent();
2946 } 2946 }
2947 2947
2948 void Element::didModifyAttribute(const QualifiedName& name, const AtomicString& value) 2948 void Element::didModifyAttribute(const QualifiedName& name, const AtomicString& value)
2949 { 2949 {
2950 attributeChanged(name, value); 2950 attributeChanged(name, value);
2951 InspectorInstrumentation::didModifyDOMAttr(this, name.toString(), value); 2951 InspectorInstrumentation::didModifyDOMAttr(this, name, value);
2952 // Do not dispatch a DOMSubtreeModified event here; see bug 81141. 2952 // Do not dispatch a DOMSubtreeModified event here; see bug 81141.
2953 } 2953 }
2954 2954
2955 void Element::didRemoveAttribute(const QualifiedName& name) 2955 void Element::didRemoveAttribute(const QualifiedName& name)
2956 { 2956 {
2957 attributeChanged(name, nullAtom); 2957 attributeChanged(name, nullAtom);
2958 InspectorInstrumentation::didRemoveDOMAttr(this, name.toString()); 2958 InspectorInstrumentation::didRemoveDOMAttr(this, name);
2959 dispatchSubtreeModifiedEvent(); 2959 dispatchSubtreeModifiedEvent();
2960 } 2960 }
2961 2961
2962 static bool needsURLResolutionForInlineStyle(const Element& element, const Docum ent& oldDocument, const Document& newDocument) 2962 static bool needsURLResolutionForInlineStyle(const Element& element, const Docum ent& oldDocument, const Document& newDocument)
2963 { 2963 {
2964 if (oldDocument == newDocument) 2964 if (oldDocument == newDocument)
2965 return false; 2965 return false;
2966 if (oldDocument.baseURL() == newDocument.baseURL()) 2966 if (oldDocument.baseURL() == newDocument.baseURL())
2967 return false; 2967 return false;
2968 const StylePropertySet* style = element.inlineStyle(); 2968 const StylePropertySet* style = element.inlineStyle();
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
3421 return wrapper; 3421 return wrapper;
3422 3422
3423 CustomElementBinding* binding = perContextData->customElementBinding(customE lementDefinition()); 3423 CustomElementBinding* binding = perContextData->customElementBinding(customE lementDefinition());
3424 3424
3425 wrapper->SetPrototype(binding->prototype()); 3425 wrapper->SetPrototype(binding->prototype());
3426 3426
3427 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType, wrapper); 3427 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType, wrapper);
3428 } 3428 }
3429 3429
3430 } // namespace blink 3430 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorDOMAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698