|
Make Element::attributes() less error-prone and simplify call sites
Make Element::attributes() less error-prone by:
- Having it return an empty AttributeCollection if ElementData() is null
so that the callers no longer have to call hasAttributes() to know if
they can call Element::attributes().
- Call synchronizeAllAttributes() in attributes() as callers no longer
have to call hasAttributes() before calling attributes().
This CL also adds an Element::attributesWithoutUpdate() getter for call
sites where we do not want to synchronize all attributes (e.g. no attribute
synchronization or single attribute synchronization).
This CL also drops the Element::hasAttributesWithoutUpdate() as there are no
remaining callers.
This simplifies the call sites and makes Element::attributes() less error
prone.
R=esprehn@chromium.org, adamk@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179526
Total comments: 18
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+149 lines, -195 lines) |
Patch |
|
M |
Source/core/css/SelectorChecker.h
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/css/SelectorChecker.cpp
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/AttributeCollection.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/DatasetDOMStringMap.cpp
|
View
|
|
3 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Element.h
|
View
|
1
2
3
|
4 chunks |
+21 lines, -11 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Element.cpp
|
View
|
1
2
3
|
5 chunks |
+8 lines, -16 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/NamedNodeMap.cpp
|
View
|
|
4 chunks |
+2 lines, -6 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/Node.cpp
|
View
|
1
2
3
|
3 chunks |
+18 lines, -22 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/PresentationAttributeStyle.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/editing/ApplyStyleCommand.cpp
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/editing/EditingStyle.cpp
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/editing/MarkupAccumulator.cpp
|
View
|
1
2
3
|
1 chunk |
+4 lines, -6 lines |
0 comments
|
Download
|
|
M |
Source/core/editing/markup.cpp
|
View
|
1
2
3
|
2 chunks |
+7 lines, -11 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLEmbedElement.cpp
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLInputElement.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLObjectElement.cpp
|
View
|
|
1 chunk |
+7 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/core/html/parser/HTMLConstructionSite.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/inspector/DOMPatchSupport.cpp
|
View
|
|
2 chunks |
+11 lines, -15 lines |
0 comments
|
Download
|
|
M |
Source/core/inspector/InspectorDOMAgent.cpp
|
View
|
|
3 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/page/PageSerializer.cpp
|
View
|
1
2
3
|
1 chunk |
+5 lines, -7 lines |
0 comments
|
Download
|
|
M |
Source/core/xml/XPathFunctions.cpp
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/xml/XPathNodeSet.cpp
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/xml/XPathStep.cpp
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/xml/parser/XMLDocumentParser.cpp
|
View
|
|
1 chunk |
+7 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/web/WebPageSerializerImpl.cpp
|
View
|
|
1 chunk |
+38 lines, -39 lines |
0 comments
|
Download
|
Total messages: 27 (0 generated)
|