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

Issue 354023008: Move attributes-related methods from ElementData to AttributeCollection (Closed)

Created:
6 years, 5 months ago by Inactive
Modified:
6 years, 5 months ago
Reviewers:
esprehn, adamk
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Project:
blink
Visibility:
Public.

Description

Move attributes-related methods from ElementData to AttributeCollection Move attributes-related methods from ElementData to AttributeCollection. Now that we have a dedicated class for Element attributes, it seems odd for the attributes-related API to be in Element / ElementData. This CL does not change the Element API for attributes so that the patch stays small. However, the idea would be to later move callers away from the attributes API on Element and instead call Element::attributes() and then interact directly with the returned AttributeCollection object. Using AttributeCollection directly has the benefit of avoiding redundant calls to ElementData::isUnique() and the caller can store AttributeCollection object in a variable and then any later interaction with this object won't require checking if ElementData is unique or not. R=esprehn@chromium.org, adamk@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177041

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 3

Patch Set 3 : Take feedback into consideration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -208 lines) Patch
M Source/core/core.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/dom/AttributeCollection.h View 1 2 1 chunk +131 lines, -0 lines 0 comments Download
A + Source/core/dom/AttributeCollection.cpp View 1 2 2 chunks +37 lines, -28 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 14 chunks +27 lines, -19 lines 0 comments Download
M Source/core/dom/ElementData.h View 1 2 7 chunks +12 lines, -111 lines 0 comments Download
M Source/core/dom/ElementData.cpp View 1 2 4 chunks +7 lines, -43 lines 0 comments Download
M Source/core/dom/ElementDataCache.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Inactive
6 years, 5 months ago (2014-06-26 21:56:07 UTC) #1
esprehn
AttributeCollection should be in it's own file. https://codereview.chromium.org/354023008/diff/20001/Source/core/dom/ElementData.h File Source/core/dom/ElementData.h (right): https://codereview.chromium.org/354023008/diff/20001/Source/core/dom/ElementData.h#newcode67 Source/core/dom/ElementData.h:67: size_t find(Attr*) ...
6 years, 5 months ago (2014-06-26 22:03:58 UTC) #2
Inactive
https://codereview.chromium.org/354023008/diff/20001/Source/core/dom/ElementData.h File Source/core/dom/ElementData.h (right): https://codereview.chromium.org/354023008/diff/20001/Source/core/dom/ElementData.h#newcode47 Source/core/dom/ElementData.h:47: class AttributeCollection { Ok, I'll move this to a ...
6 years, 5 months ago (2014-06-26 22:16:40 UTC) #3
Inactive
On 2014/06/26 22:03:58, esprehn wrote: > AttributeCollection should be in it's own file. > > ...
6 years, 5 months ago (2014-06-27 00:22:30 UTC) #4
esprehn
lgtm
6 years, 5 months ago (2014-06-27 00:37:05 UTC) #5
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 5 months ago (2014-06-27 00:39:25 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/354023008/40001
6 years, 5 months ago (2014-06-27 00:40:35 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_gn_rel on tryserver.blink ...
6 years, 5 months ago (2014-06-27 01:41:52 UTC) #8
commit-bot: I haz the power
6 years, 5 months ago (2014-06-27 01:54:59 UTC) #9
Message was sent while issue was closed.
Change committed as 177041

Powered by Google App Engine
This is Rietveld 408576698