Skip to content
This repository was archived by the owner on Feb 23, 2022. It is now read-only.

Commit 2682982

Browse files
committed
Give credit where credit is due.
1 parent d31b2eb commit 2682982

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+69
-30
lines changed

Diff for: src/com/google/common/css/compiler/ast/CreateComponentNodes.java

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/**
2020
* Shim class for the class moved to the passes package.
2121
*
22+
* @author fbenz@google.com (Florian Benz)
2223
*/
2324
public class CreateComponentNodes extends
2425
com.google.common.css.compiler.passes.CreateComponentNodes {

Diff for: src/com/google/common/css/compiler/ast/CreateConditionalNodes.java

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/**
2020
* Shim class for the class moved to the passes package.
2121
*
22+
* @author fbenz@google.com (Florian Benz)
2223
*/
2324
public class CreateConditionalNodes extends
2425
com.google.common.css.compiler.passes.CreateConditionalNodes {

Diff for: src/com/google/common/css/compiler/ast/CreateConstantReferences.java

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/**
2020
* Shim class for the class moved to the passes package.
2121
*
22+
* @author fbenz@google.com (Florian Benz)
2223
*/
2324
public class CreateConstantReferences extends
2425
com.google.common.css.compiler.passes.CreateConstantReferences {

Diff for: src/com/google/common/css/compiler/ast/CreateDefinitionNodes.java

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/**
2020
* Shim class for the class moved to the passes package.
2121
*
22+
* @author fbenz@google.com (Florian Benz)
2223
*/
2324
public class CreateDefinitionNodes extends
2425
com.google.common.css.compiler.passes.CreateDefinitionNodes {

Diff for: src/com/google/common/css/compiler/ast/CssAbstractBlockNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* because all instances of the provided classes are accepted as valid.
3333
* If invalid children are added, an {@link IllegalStateException} is thrown.
3434
*
35+
* @author fbenz@google.com (Florian Benz)
3536
*/
3637
public abstract class CssAbstractBlockNode
3738
extends CssNodesListNode<CssNode> {

Diff for: src/com/google/common/css/compiler/ast/CssAttributeSelectorNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* A {@link CssRefinerNode} implementation that represents an attribute
2424
* selector. For example: {@code [hreflang|="en"]}
2525
*
26+
* @author fbenz@google.com (Florian Benz)
2627
*/
2728
public class CssAttributeSelectorNode extends CssRefinerNode {
2829
/** Indicates which kind of attribute selector is used. */

Diff for: src/com/google/common/css/compiler/ast/CssClassSelectorNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* A {@link CssRefinerNode} implementation that represents a selector for a
2424
* class. For example: {@code .classy}
2525
*
26+
* @author fbenz@google.com (Florian Benz)
2627
*/
2728
public class CssClassSelectorNode extends CssRefinerNode {
2829
public CssClassSelectorNode(String refinerName,

Diff for: src/com/google/common/css/compiler/ast/CssIdSelectorNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* A {@link CssRefinerNode} implementation that represents a selector for an id.
2424
* For example: {@code #id}
2525
*
26+
* @author fbenz@google.com (Florian Benz)
2627
*/
2728
public class CssIdSelectorNode extends CssRefinerNode {
2829
public CssIdSelectorNode(String refinerName,

Diff for: src/com/google/common/css/compiler/ast/CssKeyListNode.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* animation.
2323
* For example: <code>0%, 33.3%</code>
2424
*
25+
* @author fbenz@google.com (Florian Benz)
2526
*/
2627
public class CssKeyListNode extends CssNodesListNode<CssKeyNode> {
2728

@@ -32,7 +33,7 @@ public CssKeyListNode() {
3233
public CssKeyListNode(CssKeyListNode node) {
3334
super(node);
3435
}
35-
36+
3637
@Override
3738
public CssKeyListNode deepCopy() {
3839
return new CssKeyListNode(this);

Diff for: src/com/google/common/css/compiler/ast/CssKeyNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* <code>to</code> (= 100%).
2828
* For example: <code>0%, 33.3% { ... }</code>
2929
*
30+
* @author fbenz@google.com (Florian Benz)
3031
*/
3132
public class CssKeyNode extends CssNode implements ChunkAware {
3233
/** Value of the key held by this node. */

Diff for: src/com/google/common/css/compiler/ast/CssKeyframeRulesetNode.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424

2525
/**
2626
* A node representing a keyframe style rule.
27-
* This is used inside a Webkit keyframes rule to represent the style of
27+
* This is used inside a Webkit keyframes rule to represent the style of
2828
* one or more points (specified by the keys) in the animation.
2929
*
30+
* @author fbenz@google.com (Florian Benz)
3031
*/
3132
public class CssKeyframeRulesetNode extends CssNode {
3233
/** List of keys. */
@@ -77,20 +78,20 @@ public CssKeyframeRulesetNode(List<CssCommentNode> comments) {
7778

7879
/**
7980
* Copy constructor.
80-
*
81+
*
8182
* @param node
8283
*/
8384
public CssKeyframeRulesetNode(CssKeyframeRulesetNode node) {
8485
this(node.getDeclarations().deepCopy());
8586
this.setComments(node.getComments());
8687
this.keys = node.getKeys().deepCopy();
8788
}
88-
89+
8990
@Override
9091
public CssKeyframeRulesetNode deepCopy() {
9192
return new CssKeyframeRulesetNode(this);
9293
}
93-
94+
9495
public CssKeyListNode getKeys() {
9596
return keys;
9697
}
@@ -109,11 +110,11 @@ public CssDeclarationBlockNode getDeclarations() {
109110
public void addDeclaration(CssDeclarationNode declaration) {
110111
declarations.addChildToBack(declaration);
111112
}
112-
113+
113114
public void addKey(CssKeyNode key) {
114115
keys.addChildToBack(key);
115116
}
116-
117+
117118
/**
118119
* For debugging only.
119120
*/

Diff for: src/com/google/common/css/compiler/ast/CssMixinDefinitionNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* }
3232
* </pre>
3333
*
34+
* @author fbenz@google.com (Florian Benz)
3435
*/
3536
public class CssMixinDefinitionNode extends CssAtRuleNode {
3637
private final String name;

Diff for: src/com/google/common/css/compiler/ast/CssMixinNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* replaced by the corresponding mixin definition.
2626
* For example: {@code @mixin gradient(top, 0%, 80%, 70%, #BADA55)}
2727
*
28+
* @author fbenz@google.com (Florian Benz)
2829
*/
2930
public class CssMixinNode extends CssAtRuleNode {
3031
private final String definitionName;

Diff for: src/com/google/common/css/compiler/ast/CssPageRuleNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/**
2222
* A node representing an @page rule.
2323
*
24+
* @author fbenz@google.com (Florian Benz)
2425
*/
2526
public class CssPageRuleNode extends CssAtRuleNode {
2627

Diff for: src/com/google/common/css/compiler/ast/CssPageSelectorNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*
2525
* <p>For example: {@code @bottom-left-corner { ... } }
2626
*
27+
* @author fbenz@google.com (Florian Benz)
2728
*/
2829
public class CssPageSelectorNode extends CssAtRuleNode {
2930

Diff for: src/com/google/common/css/compiler/ast/CssPseudoClassNode.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* A {@link CssRefinerNode} implementation that represents a pseudo-class.
2626
* For example: {@code :visited}, {@code :nth-child(2n)}
2727
*
28+
* @author fbenz@google.com (Florian Benz)
2829
*/
2930
public class CssPseudoClassNode extends CssRefinerNode {
3031
private static final ImmutableSet<String> COMPATIBILITY_PSEUDO_ELEMENTS =
@@ -43,7 +44,7 @@ public class CssPseudoClassNode extends CssRefinerNode {
4344
public enum FunctionType {
4445
NONE,
4546
LANG,
46-
// TODO(user): make the arguments for nth-functions real nodes
47+
// TODO(fbenz): make the arguments for nth-functions real nodes
4748
NTH,
4849
NOT;
4950
// No support for 'any' at the moment because it is relatively new and
@@ -154,7 +155,7 @@ public Specificity getSpecificity() {
154155

155156
@Override
156157
public String toString() {
157-
// TODO(user): toString should not be used to print a node. However,
158+
// TODO(fbenz): toString should not be used to print a node. However,
158159
// some tests rely on it. This should be fixed.
159160
StringBuilder sb = new StringBuilder();
160161
sb.append(refinerType.getPrefix());

Diff for: src/com/google/common/css/compiler/ast/CssPseudoElementNode.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* A {@link CssRefinerNode} implementation that represents a pseudo-element.
2424
* For example: {@code ::after}
2525
*
26+
* @author fbenz@google.com (Florian Benz)
2627
*/
2728
public class CssPseudoElementNode extends CssRefinerNode {
2829
public CssPseudoElementNode(String refinerName,

Diff for: src/com/google/common/css/compiler/ast/CssRefinerNode.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public abstract class CssRefinerNode extends CssNode {
3636
/**
3737
* Contains the list of all possible CSS refiners.
3838
*/
39-
// TODO(user): The handling of the pre- and suffixes should be moved to
39+
// TODO(fbenz): The handling of the pre- and suffixes should be moved to
4040
// the corresponding classes.
4141
protected enum Refiner {
4242
CLASS(".", ""),

Diff for: src/com/google/common/css/compiler/ast/CssWebkitKeyframesNode.java

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/**
2020
* A node representing an @-webkit-keyframes rule.
2121
*
22+
* @author fbenz@google.com (Florian Benz)
2223
*/
2324
public class CssWebkitKeyframesNode extends CssAtRuleNode {
2425

@@ -63,3 +64,4 @@ public CssBlockNode getBlock() {
6364
return (CssBlockNode) super.getBlock();
6465
}
6566
}
67+

Diff for: src/com/google/common/css/compiler/ast/DefaultVisitController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ class VisitRefinerNodeState extends BaseVisitState<CssNode> {
998998

999999
@Override
10001000
public void doVisit() {
1001-
// TODO(user): Actually each of these nodes should have its own state
1001+
// TODO(fbenz): Actually each of these nodes should have its own state
10021002
// here but this adds a bunch of similar code that is not really
10031003
// necessary. The problem is the design of the visit controller. I'm
10041004
// going to refactor it so that it doesn't make sense to add all the

Diff for: src/com/google/common/css/compiler/ast/GssParserCC.jj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ CssAtRuleNode at_rule() :
15341534
// ]
15351535
// [ [ '{' S* style_declaration '} ] | ';' ] S*
15361536
// ;
1537-
// TODO(user): Try to reuse selctor parsing instead of [ IDENT? ':' IDENT S* ].
1537+
// TODO(fbenz): Try to reuse selctor parsing instead of [ IDENT? ':' IDENT S* ].
15381538
// The problem is that @-rules take a list of value nodes and selectors are not
15391539
// value nodes.
15401540
CssAtRuleNode atRuleWithDeclBlock() :

Diff for: src/com/google/common/css/compiler/passes/CollectMixinDefinitions.java

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
*
4343
* <p>{@link CreateConstantReferences} has to run before.
4444
*
45+
* @author fbenz@google.com (Florian Benz)
4546
*/
4647
public class CollectMixinDefinitions extends DefaultTreeVisitor
4748
implements CssCompilerPass {

Diff for: src/com/google/common/css/compiler/passes/CompactPrinter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public boolean enterMediaRule(CssMediaRuleNode node) {
124124
* For example: {@code @media all and (color)}
125125
*/
126126
private void appendMediaParameterWithParentheses(CssValueNode node) {
127-
// TODO(user): Try to avoid the special handling of this case.
127+
// TODO(fbenz): Try to avoid the special handling of this case.
128128
sb.append("(");
129129
sb.append(node.getValue());
130130
sb.append(")");
@@ -139,7 +139,7 @@ public void leaveMediaRule(CssMediaRuleNode node) {
139139
public boolean enterPageRule(CssPageRuleNode node) {
140140
sb.append(node.getType().toString());
141141
sb.append(' ');
142-
// TODO(user): There are only two parameters possible ('bla:left') that
142+
// TODO(fbenz): There are only two parameters possible ('bla:left') that
143143
// come with no whitespace in between. So it would be better to have a
144144
// single node (maybe a selector).
145145
for (CssValueNode param : node.getParameters()) {

Diff for: src/com/google/common/css/compiler/passes/CreateMixins.java

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* A compiler pass that transforms matching {@link CssUnknownAtRuleNode}s
4040
* into mixins or mixin definitions.
4141
*
42+
* @author fbenz@google.com (Florian Benz)
4243
*/
4344
public class CreateMixins extends DefaultTreeVisitor
4445
implements CssCompilerPass {

Diff for: src/com/google/common/css/compiler/passes/CreateStandardAtRuleNodes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private void createMediaRule(CssUnknownAtRuleNode node) {
200200
return;
201201
}
202202

203-
// TODO(user): Perform this check depending on the CSS version set in the
203+
// TODO(fbenz): Perform this check depending on the CSS version set in the
204204
// options
205205
if (!checkMediaParameter(params)) {
206206
reportError(INVALID_PARAMETERS_ERROR_MESSAGE, node);

Diff for: src/com/google/common/css/compiler/passes/PassUtil.java

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
/**
3434
* Utility methods that can be useful for compiler passes.
3535
*
36+
* @author fbenz@google.com (Florian Benz)
3637
*/
3738
public class PassUtil {
3839

Diff for: src/com/google/common/css/compiler/passes/PrettyPrinter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public boolean enterMediaRule(CssMediaRuleNode node) {
119119
* For example: {@code @media all and (color)}
120120
*/
121121
private void appendMediaParamterWithParentheses(CssValueNode node) {
122-
// TODO(user): Try to avoid the special handling of this case.
122+
// TODO(fbenz): Try to avoid the special handling of this case.
123123
sb.append("(");
124124
sb.append(node.getValue());
125125
sb.append(")");
@@ -242,7 +242,7 @@ public boolean enterValueNode(CssValueNode node) {
242242
sb.append(v);
243243
}
244244

245-
// NOTE(user): When visiting function arguments, we don't want to add extra
245+
// NOTE(flan): When visiting function arguments, we don't want to add extra
246246
// spaces because they are already in the arguments list if they are
247247
// required. Yes, this sucks.
248248
if (!(node.getParent() instanceof CssFunctionArgumentsNode)) {

Diff for: src/com/google/common/css/compiler/passes/ProcessRefiners.java

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* a correct nth-format and can make it compact. In addition, the pass checks
3636
* the constraints for the :not pseudo-class.
3737
*
38+
* @author fbenz@google.com (Florian Benz)
3839
*/
3940
public class ProcessRefiners extends DefaultTreeVisitor
4041
implements CssCompilerPass {

Diff for: src/com/google/common/css/compiler/passes/ProcessWebkitKeyframes.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@
2828
/**
2929
* Compiler pass which ensures that @-webkit-keframes rules are only allowed if
3030
* they are enabled. In addition this pass checks if the keys are between
31-
* 0% and 100%. If CSS simplification is enabled, "from" is replaced by "0%"
31+
* 0% and 100%. If CSS simplification is enabled, "from" is replaced by "0%"
3232
* and "100%" is replaced by "to".
33-
*
33+
*
34+
* @author fbenz@google.com (Florian Benz)
3435
*/
3536
public class ProcessWebkitKeyframes extends DefaultTreeVisitor
3637
implements CssCompilerPass {
3738
@VisibleForTesting
38-
static final String KEYFRAMES_NOT_ALLOWED_ERROR_MESSAGE =
39+
static final String KEYFRAMES_NOT_ALLOWED_ERROR_MESSAGE =
3940
"a @-webkit-keyframes rule occured but the option for it is disabled";
4041
@VisibleForTesting
41-
static final String WRONG_KEY_VALUE_ERROR_MESSAGE =
42+
static final String WRONG_KEY_VALUE_ERROR_MESSAGE =
4243
"the value of the key is not between 0% and 100%";
43-
static final String INVALID_NUMBER_ERROR_MESSAGE =
44+
static final String INVALID_NUMBER_ERROR_MESSAGE =
4445
"the value of the key is invalid (not 'from', 'to', or 'XXX.XXX%')";
4546

4647
private final MutatingVisitController visitController;
@@ -102,7 +103,7 @@ public boolean enterKey(CssKeyNode node) {
102103

103104
/**
104105
* Checks if the percentage is between 0% and 100% inclusive.
105-
*
106+
*
106107
* @param node The {@link CssKeyNode} to get the location in case of an error
107108
* @param percentage The value represented as a float
108109
* @return Returns true if there is no error
@@ -119,7 +120,7 @@ private boolean checkRangeOfPercentage(CssKeyNode node, float percentage) {
119120

120121
/**
121122
* Shortens the representation of the key.
122-
*
123+
*
123124
* @param node The {@link CssKeyNode} where the percentage belongs to.
124125
* @param percentage The value represented as a float
125126
*/

Diff for: src/com/google/common/css/compiler/passes/ReplaceMixins.java

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
* <p>{@link CollectMixinDefinitions} has to run before.
5353
* {@link ReplaceConstantReferences} has to run afterwards.
5454
*
55+
* @author fbenz@google.com (Florian Benz)
5556
*/
5657
public class ReplaceMixins extends DefaultTreeVisitor
5758
implements CssCompilerPass {

Diff for: src/com/google/common/css/compiler/passes/StrictCss2.java

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* This compiler pass enforces that only correct CSS 2.1 is used.
3737
* See {@link "http://www.w3.org/TR/CSS21/"} for the specification.
3838
*
39+
* @author fbenz@google.com (Florian Benz)
3940
*/
4041
public class StrictCss2 extends StrictCssBase {
4142
private static final ImmutableSet<String> PSEUDO_CLASSES_OR_ELEMENT =

Diff for: src/com/google/common/css/compiler/passes/StrictCss3.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
* <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(Cascading_Style_Sheets)#Selectors">
4242
* Comparison of layout engines (Cascading Style Sheets)</a>
4343
*
44-
* <p>TODO(user): The ProcessRefiners and ProcessWebkitKeyframes passes should
44+
* <p>TODO(fbenz): The ProcessRefiners and ProcessWebkitKeyframes passes should
4545
* run before.
4646
*
47+
* @author fbenz@google.com (Florian Benz)
4748
*
4849
*/
4950
public class StrictCss3 extends StrictCssBase {

0 commit comments

Comments
 (0)