@@ -189,7 +189,7 @@ public function expandBorderShorthand() {
189
189
$ sNewRuleName = $ sBorderRule . "-style " ;
190
190
}
191
191
}
192
- $ oNewRule = new Rule ($ sNewRuleName , $ this -> iLineNo );
192
+ $ oNewRule = new Rule ($ sNewRuleName , $ oRule -> getLineNo (), $ oRule -> getColNo () );
193
193
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
194
194
$ oNewRule ->addValue (array ($ mNewValue ));
195
195
$ this ->addRule ($ oNewRule );
@@ -245,7 +245,7 @@ public function expandDimensionsShorthand() {
245
245
break ;
246
246
}
247
247
foreach (array ('top ' , 'right ' , 'bottom ' , 'left ' ) as $ sPosition ) {
248
- $ oNewRule = new Rule (sprintf ($ sExpanded , $ sPosition ), $ this -> iLineNo );
248
+ $ oNewRule = new Rule (sprintf ($ sExpanded , $ sPosition ), $ oRule -> getLineNo (), $ oRule -> getColNo () );
249
249
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
250
250
$ oNewRule ->addValue ($ {$ sPosition });
251
251
$ this ->addRule ($ oNewRule );
@@ -310,7 +310,7 @@ public function expandFontShorthand() {
310
310
}
311
311
}
312
312
foreach ($ aFontProperties as $ sProperty => $ mValue ) {
313
- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
313
+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
314
314
$ oNewRule ->addValue ($ mValue );
315
315
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
316
316
$ this ->addRule ($ oNewRule );
@@ -344,7 +344,7 @@ public function expandBackgroundShorthand() {
344
344
}
345
345
if (count ($ aValues ) == 1 && $ aValues [0 ] == 'inherit ' ) {
346
346
foreach ($ aBgProperties as $ sProperty => $ mValue ) {
347
- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
347
+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
348
348
$ oNewRule ->addValue ('inherit ' );
349
349
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
350
350
$ this ->addRule ($ oNewRule );
@@ -378,7 +378,7 @@ public function expandBackgroundShorthand() {
378
378
}
379
379
}
380
380
foreach ($ aBgProperties as $ sProperty => $ mValue ) {
381
- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
381
+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
382
382
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
383
383
$ oNewRule ->addValue ($ mValue );
384
384
$ this ->addRule ($ oNewRule );
@@ -414,7 +414,7 @@ public function expandListStyleShorthand() {
414
414
}
415
415
if (count ($ aValues ) == 1 && $ aValues [0 ] == 'inherit ' ) {
416
416
foreach ($ aListProperties as $ sProperty => $ mValue ) {
417
- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
417
+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
418
418
$ oNewRule ->addValue ('inherit ' );
419
419
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
420
420
$ this ->addRule ($ oNewRule );
@@ -435,7 +435,7 @@ public function expandListStyleShorthand() {
435
435
}
436
436
}
437
437
foreach ($ aListProperties as $ sProperty => $ mValue ) {
438
- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
438
+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
439
439
$ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
440
440
$ oNewRule ->addValue ($ mValue );
441
441
$ this ->addRule ($ oNewRule );
@@ -465,7 +465,7 @@ public function createShorthandProperties(array $aProperties, $sShorthand) {
465
465
}
466
466
}
467
467
if (count ($ aNewValues )) {
468
- $ oNewRule = new Rule ($ sShorthand , $ this -> iLineNo );
468
+ $ oNewRule = new Rule ($ sShorthand , $ oRule -> getLineNo (), $ oRule -> getColNo () );
469
469
foreach ($ aNewValues as $ mValue ) {
470
470
$ oNewRule ->addValue ($ mValue );
471
471
}
@@ -538,7 +538,7 @@ public function createDimensionsShorthand() {
538
538
}
539
539
$ aValues [$ sPosition ] = $ aRuleValues ;
540
540
}
541
- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
541
+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
542
542
if ((string ) $ aValues ['left ' ][0 ] == (string ) $ aValues ['right ' ][0 ]) {
543
543
if ((string ) $ aValues ['top ' ][0 ] == (string ) $ aValues ['bottom ' ][0 ]) {
544
544
if ((string ) $ aValues ['top ' ][0 ] == (string ) $ aValues ['left ' ][0 ]) {
@@ -583,7 +583,9 @@ public function createFontShorthand() {
583
583
if (!isset ($ aRules ['font-size ' ]) || !isset ($ aRules ['font-family ' ])) {
584
584
return ;
585
585
}
586
- $ oNewRule = new Rule ('font ' , $ this ->iLineNo );
586
+ $ oOldRule = isset ($ aRules ['font-size ' ]) ? $ aRules ['font-size ' ] : $ aRules ['font-family ' ];
587
+ $ oNewRule = new Rule ('font ' , $ oOldRule ->getLineNo (), $ oOldRule ->getColNo ());
588
+ unset($ oOldRule );
587
589
foreach (array ('font-style ' , 'font-variant ' , 'font-weight ' ) as $ sProperty ) {
588
590
if (isset ($ aRules [$ sProperty ])) {
589
591
$ oRule = $ aRules [$ sProperty ];
0 commit comments