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

Issue 119533003: Clear mutable inline style when it is empty. (Closed)

Created:
7 years ago by chrishtr
Modified:
7 years ago
Reviewers:
esprehn, eseidel
CC:
blink-reviews, sof, eae+blinkwatch, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Clear mutable inline style when it is empty. As part of this, add a new InlineVariablesIterator class. This implements a CSSVariablesIterator interface, but in a way that is compatible with how inline styles as represented in a MutableStylePropertySet are accessed through ElementRareData rather than a ref pointer. This allows us to decouple the lifetimes of a CSSVariablesIterator and the MutableStylePropertySet that it is a helper/iterator for. BUG=326664 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164307

Patch Set 1 #

Patch Set 2 : Update to latest. #

Patch Set 3 : Fix conversion to spans. #

Patch Set 4 : Factored inline version into its own file #

Patch Set 5 : Removed errant spaces #

Patch Set 6 : Added missing files. #

Patch Set 7 : Fixed typo. #

Total comments: 17

Patch Set 8 : Resolved reviewer comments. #

Total comments: 4

Patch Set 9 : Fixed lint. #

Patch Set 10 : Fixed typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -54 lines) Patch
M Source/core/core.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
A + Source/core/css/InlineVariablesIterator.h View 1 2 3 4 5 6 7 8 2 chunks +13 lines, -14 lines 0 comments Download
A + Source/core/css/InlineVariablesIterator.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +23 lines, -24 lines 0 comments Download
M Source/core/css/PropertySetCSSStyleDeclaration.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -1 line 0 comments Download
M Source/core/css/PropertySetCSSStyleDeclaration.cpp View 1 2 3 8 3 chunks +8 lines, -0 lines 0 comments Download
M Source/core/css/VariablesIterator.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -2 lines 0 comments Download
M Source/core/css/VariablesIterator.cpp View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -6 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 3 chunks +11 lines, -3 lines 0 comments Download
M Source/core/editing/ApplyStyleCommand.cpp View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/editing/RemoveCSSPropertyCommand.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
chrishtr
@Eric: this is a new version of the CL I sent to you last week. ...
7 years ago (2013-12-23 20:34:11 UTC) #1
eseidel
Made one pass. Need to make another to understand what I'm reading. :) https://codereview.chromium.org/119533003/diff/180001/Source/core/css/InlineVariablesIterator.cpp File ...
7 years ago (2013-12-23 21:22:43 UTC) #2
eseidel
I think I just need a bit more context/comments. Happy to do another round or ...
7 years ago (2013-12-23 21:30:22 UTC) #3
chrishtr
Going to ping you on IM for any further questions, and address the comments. https://codereview.chromium.org/119533003/diff/180001/Source/core/css/InlineVariablesIterator.cpp ...
7 years ago (2013-12-23 22:06:46 UTC) #4
chrishtr
Changed to constructor instead of create() pattern. Everything looks like it works fine. The only ...
7 years ago (2013-12-23 22:34:20 UTC) #5
eseidel
I think this looks right. Except for the removal of ::create(). Remind me why you ...
7 years ago (2013-12-23 23:26:28 UTC) #6
eseidel
On 2013/12/23 22:34:20, Chris Harrelson wrote: > Changed to constructor instead of create() pattern. Everything ...
7 years ago (2013-12-23 23:29:38 UTC) #7
chrishtr
https://codereview.chromium.org/119533003/diff/280001/Source/core/css/InlineVariablesIterator.h File Source/core/css/InlineVariablesIterator.h (right): https://codereview.chromium.org/119533003/diff/280001/Source/core/css/InlineVariablesIterator.h#newcode29 Source/core/css/InlineVariablesIterator.h:29: // A CSSVariablesIterator implementation for the inline style of ...
7 years ago (2013-12-23 23:54:50 UTC) #8
eseidel
lgtm I still don't quite understand the addition of the iterator. Please explain that in ...
7 years ago (2013-12-24 00:04:51 UTC) #9
chrishtr
I updated the description. It's a subtle issue regarding object lifetimes.
7 years ago (2013-12-24 00:14:12 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/119533003/360001
7 years ago (2013-12-24 00:14:38 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/119533003/300002
7 years ago (2013-12-24 00:45:51 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/119533003/300002
7 years ago (2013-12-24 01:39:01 UTC) #13
commit-bot: I haz the power
7 years ago (2013-12-24 02:29:04 UTC) #14
Message was sent while issue was closed.
Change committed as 164307

Powered by Google App Engine
This is Rietveld 408576698