@@ -189,7 +189,7 @@ public function expandBorderShorthand() {
189189 $ sNewRuleName = $ sBorderRule . "-style " ;
190190 }
191191 }
192- $ oNewRule = new Rule ($ sNewRuleName , $ this -> iLineNo );
192+ $ oNewRule = new Rule ($ sNewRuleName , $ oRule -> getLineNo (), $ oRule -> getColNo () );
193193 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
194194 $ oNewRule ->addValue (array ($ mNewValue ));
195195 $ this ->addRule ($ oNewRule );
@@ -245,7 +245,7 @@ public function expandDimensionsShorthand() {
245245 break ;
246246 }
247247 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 () );
249249 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
250250 $ oNewRule ->addValue ($ {$ sPosition });
251251 $ this ->addRule ($ oNewRule );
@@ -310,7 +310,7 @@ public function expandFontShorthand() {
310310 }
311311 }
312312 foreach ($ aFontProperties as $ sProperty => $ mValue ) {
313- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
313+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
314314 $ oNewRule ->addValue ($ mValue );
315315 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
316316 $ this ->addRule ($ oNewRule );
@@ -344,7 +344,7 @@ public function expandBackgroundShorthand() {
344344 }
345345 if (count ($ aValues ) == 1 && $ aValues [0 ] == 'inherit ' ) {
346346 foreach ($ aBgProperties as $ sProperty => $ mValue ) {
347- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
347+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
348348 $ oNewRule ->addValue ('inherit ' );
349349 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
350350 $ this ->addRule ($ oNewRule );
@@ -378,7 +378,7 @@ public function expandBackgroundShorthand() {
378378 }
379379 }
380380 foreach ($ aBgProperties as $ sProperty => $ mValue ) {
381- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
381+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
382382 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
383383 $ oNewRule ->addValue ($ mValue );
384384 $ this ->addRule ($ oNewRule );
@@ -414,7 +414,7 @@ public function expandListStyleShorthand() {
414414 }
415415 if (count ($ aValues ) == 1 && $ aValues [0 ] == 'inherit ' ) {
416416 foreach ($ aListProperties as $ sProperty => $ mValue ) {
417- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
417+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
418418 $ oNewRule ->addValue ('inherit ' );
419419 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
420420 $ this ->addRule ($ oNewRule );
@@ -435,7 +435,7 @@ public function expandListStyleShorthand() {
435435 }
436436 }
437437 foreach ($ aListProperties as $ sProperty => $ mValue ) {
438- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
438+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
439439 $ oNewRule ->setIsImportant ($ oRule ->getIsImportant ());
440440 $ oNewRule ->addValue ($ mValue );
441441 $ this ->addRule ($ oNewRule );
@@ -465,7 +465,7 @@ public function createShorthandProperties(array $aProperties, $sShorthand) {
465465 }
466466 }
467467 if (count ($ aNewValues )) {
468- $ oNewRule = new Rule ($ sShorthand , $ this -> iLineNo );
468+ $ oNewRule = new Rule ($ sShorthand , $ oRule -> getLineNo (), $ oRule -> getColNo () );
469469 foreach ($ aNewValues as $ mValue ) {
470470 $ oNewRule ->addValue ($ mValue );
471471 }
@@ -538,7 +538,7 @@ public function createDimensionsShorthand() {
538538 }
539539 $ aValues [$ sPosition ] = $ aRuleValues ;
540540 }
541- $ oNewRule = new Rule ($ sProperty , $ this -> iLineNo );
541+ $ oNewRule = new Rule ($ sProperty , $ oRule -> getLineNo (), $ oRule -> getColNo () );
542542 if ((string ) $ aValues ['left ' ][0 ] == (string ) $ aValues ['right ' ][0 ]) {
543543 if ((string ) $ aValues ['top ' ][0 ] == (string ) $ aValues ['bottom ' ][0 ]) {
544544 if ((string ) $ aValues ['top ' ][0 ] == (string ) $ aValues ['left ' ][0 ]) {
@@ -583,7 +583,9 @@ public function createFontShorthand() {
583583 if (!isset ($ aRules ['font-size ' ]) || !isset ($ aRules ['font-family ' ])) {
584584 return ;
585585 }
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 );
587589 foreach (array ('font-style ' , 'font-variant ' , 'font-weight ' ) as $ sProperty ) {
588590 if (isset ($ aRules [$ sProperty ])) {
589591 $ oRule = $ aRules [$ sProperty ];
0 commit comments