Changeset 112177 in webkit
- Timestamp:
- Mar 26, 2012 4:59:27 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r112169 r112177 1 2012-03-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 cssText should use shorthand notations 4 https://bugs.webkit.org/show_bug.cgi?id=81737 5 6 Reviewed by Enrica Casucci. 7 8 Rebaseline existing tests and add a regression test for unprefixed CSS properties with 9 the exception of -webkit-border-horizontal/vertical-spacing (the shorthand version of 10 these properties (border-spacing) is unprefixed. 11 12 * editing/pasteboard/paste-and-sanitize-expected.txt: Uses border instead of longhand 13 properties as desired. 14 * editing/pasteboard/paste-and-sanitize.html: 15 * editing/style/non-inheritable-styles-expected.txt: Ditto. 16 * fast/css/background-position-serialize-expected.txt: No longer emits "background-*: 17 initial" as desired. 18 * fast/css/cssText-shorthand-expected.txt: Added. 19 * fast/css/cssText-shorthand.html: Added. 20 * fast/css/remove-shorthand-expected.txt: 21 * fast/css/remove-shorthand.html: Modified to do elaborative comparison of the lists of 22 properties before and after removing a shorthand since now removing a shorthand property 23 may end up adding new longhand property. 24 * fast/css/uri-token-parsing-expected.txt: 25 * fast/css/uri-token-parsing.html: Uses shorthand properties instead of longhand equivalents. 26 * inspector/styles/styles-update-from-js-expected.txt: Ditto. 27 * printing/page-rule-css-text-expected.txt: Ditto. 28 1 29 2012-03-26 Emil A Eklund <eae@chromium.org> 2 30 -
trunk/LayoutTests/editing/pasteboard/paste-and-sanitize-expected.txt
r102846 r112177 9 9 PASS confirmedMarkup is '<div><b><i>hello</i></b></div><div><b><i>world</i></b></div>' 10 10 PASS confirmedMarkup is '<b><i><span style="font-weight: normal; "><b><i>hello1</i></b><b><i> hello2</i></b></span></i></b>' 11 PASS confirmedMarkup is '<i style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; "><b><i style="margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; ">hello</i></b></i>' 11 FAIL confirmedMarkup should be <i style="margin: 10px; ">hello</i></b></i>. Was <i style="margin: 10px; "><b><i style="margin: 10px; ">hello</i></b></i>. 12 12 PASS confirmedMarkup is '<b><i>Hello world</i></b>' 13 13 PASS confirmedMarkup is '<b><i><span style="font-weight: normal; ">plain text<b><i>bold italic text</i></b></span></i></b>' -
trunk/LayoutTests/editing/pasteboard/paste-and-sanitize.html
r102846 r112177 45 45 testPaste("div", "<div><b><i><span style=\"font-weight: normal; \"><b><i>hello1</i></b><b><i> hello2</i></b></span></i></b></div>", "<b><i><span style=\"font-weight: normal; \"><b><i>hello1</i></b><b><i> hello2</i></b></span></i></b>"); 46 46 testPaste("div", "<i style=\"margin: 10px;\"><b><i style=\"margin: 10px;\">hello</i></b></i>", 47 "<i style=\"margin -top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; \"><b><i style=\"margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; \">hello</i></b></i>");47 "<i style=\"margin: 10px; \">hello</i></b></i>"); 48 48 testPaste("div", "<div><b><i><span style=\"font-weight: normal\"><b><i>Hello <!-- comment -->world</i></b></span></i></b></div>", "<b><i>Hello world</i></b>"); 49 49 testPaste("div", "<div><b><i><span style=\"font-weight: normal\">plain text<b><i>bold italic text</i></b></span></i></b></div>", "<b><i><span style=\"font-weight: normal; \">plain text<b><i>bold italic text</i></b></span></i></b>"); -
trunk/LayoutTests/editing/style/non-inheritable-styles-expected.txt
r95279 r112177 4 4 | class="class" 5 5 | id="id" 6 | style="border -top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: blue; border-right-color: blue; border-bottom-color: blue; border-left-color: blue; border-image: initial; "6 | style="border: 1px solid blue; " 7 7 | "This should have blue border when its pasted." 8 8 | "This shouldn't have a border.<#selection-caret>" -
trunk/LayoutTests/fast/css/background-position-serialize-expected.txt
r47906 r112177 60 60 t.style.backgroundPositionY = '50px' 61 61 style.cssText = 62 background-image: url(about:blank); background- attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; background-position: 80% 50px; background-repeat: initial initial;62 background-image: url(about:blank); background-position: 80% 50px; background-repeat: initial initial; -
trunk/LayoutTests/fast/css/remove-shorthand-expected.txt
r68561 r112177 3 3 Starting with a declaration containing all properties that are constituents of shortcuts, see what is removed when a shortcut property is removed. The shortcut’s constituents and only them should be removed. 4 4 5 Removing background removes background-image, background-attachment, background-origin, background-clip, background-color, background-position, background-repeat. 6 Removing background-position removes background-position. 7 Removing border removes border-top-width, border-right-width, border-bottom-width, border-left-width, border-top-style, border-right-style, border-bottom-style, border-left-style, border-top-color, border-right-color, border-bottom-color, border-left-color. 8 Removing border-top removes border-top-width, border-top-style, border-top-color. 9 Removing border-right removes border-right-width, border-right-style, border-right-color. 10 Removing border-bottom removes border-bottom-width, border-bottom-style, border-bottom-color. 11 Removing border-left removes border-left-width, border-left-style, border-left-color. 12 Removing border-color removes border-top-color, border-right-color, border-bottom-color, border-left-color. 13 Removing border-style removes border-top-style, border-right-style, border-bottom-style, border-left-style. 14 Removing border-width removes border-top-width, border-right-width, border-bottom-width, border-left-width. 15 Removing border-radius removes border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius. 16 Removing -webkit-border-radius removes border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius. 17 Removing border-spacing removes -webkit-border-horizontal-spacing, -webkit-border-vertical-spacing. 18 Removing -webkit-columns removes -webkit-column-width, -webkit-column-count. 19 Removing -webkit-column-rule removes -webkit-column-rule-width, -webkit-column-rule-style, -webkit-column-rule-color. 20 Removing list-style removes list-style-type, list-style-position, list-style-image. 21 Removing margin removes margin-top, margin-right, margin-bottom, margin-left. 22 Removing -webkit-margin-collapse removes -webkit-margin-before-collapse, -webkit-margin-after-collapse. 23 Removing -webkit-marquee removes -webkit-marquee-direction, -webkit-marquee-increment, -webkit-marquee-repetition, -webkit-marquee-style, -webkit-marquee-speed. 24 Removing -webkit-mask removes -webkit-mask-image, -webkit-mask-repeat-x, -webkit-mask-repeat-y, -webkit-mask-attachment, -webkit-mask-position-x, -webkit-mask-position-y, -webkit-mask-origin, -webkit-mask-clip. 25 Removing -webkit-mask-position removes -webkit-mask-position-x, -webkit-mask-position-y. 26 Removing overflow removes overflow-x, overflow-y. 27 Removing padding removes padding-top, padding-right, padding-bottom, padding-left. 28 Removing -webkit-text-stroke removes -webkit-text-stroke-color, -webkit-text-stroke-width. 5 Removing background 6 removes "background-image, background-attachment, background-color, background-position, background-repeat" 7 and adds "". 8 Removing background-position 9 removes "background-position" 10 and adds "". 11 Removing border 12 removes "border" 13 and adds "". 14 Removing border-top 15 removes "border" 16 and adds "border-right-width, border-bottom-width, border-left-width, border-right-style, border-bottom-style, border-left-style, border-right-color, border-bottom-color, border-left-color". 17 Removing border-right 18 removes "border" 19 and adds "border-top-width, border-bottom-width, border-left-width, border-top-style, border-bottom-style, border-left-style, border-top-color, border-bottom-color, border-left-color". 20 Removing border-bottom 21 removes "border" 22 and adds "border-top-width, border-right-width, border-left-width, border-top-style, border-right-style, border-left-style, border-top-color, border-right-color, border-left-color". 23 Removing border-left 24 removes "border" 25 and adds "border-top-width, border-right-width, border-bottom-width, border-top-style, border-right-style, border-bottom-style, border-top-color, border-right-color, border-bottom-color". 26 Removing border-color 27 removes "border" 28 and adds "border". 29 Removing border-style 30 removes "border" 31 and adds "border". 32 Removing border-width 33 removes "border" 34 and adds "border". 35 Removing border-radius 36 removes "border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius" 37 and adds "". 38 Removing -webkit-border-radius 39 removes "border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius" 40 and adds "". 41 Removing border-spacing 42 removes "border-spacing" 43 and adds "". 44 Removing -webkit-columns 45 removes "-webkit-column-width, -webkit-column-count" 46 and adds "". 47 Removing -webkit-column-rule 48 removes "-webkit-column-rule-width, -webkit-column-rule-style, -webkit-column-rule-color" 49 and adds "". 50 Removing list-style 51 removes "list-style-type, list-style-position, list-style-image" 52 and adds "". 53 Removing margin 54 removes "margin" 55 and adds "". 56 Removing -webkit-margin-collapse 57 removes "-webkit-margin-before-collapse, -webkit-margin-after-collapse" 58 and adds "". 59 Removing -webkit-marquee 60 removes "-webkit-marquee-direction, -webkit-marquee-increment, -webkit-marquee-repetition, -webkit-marquee-style, -webkit-marquee-speed" 61 and adds "". 62 Removing -webkit-mask 63 removes "-webkit-mask" 64 and adds "". 65 Removing -webkit-mask-position 66 removes "-webkit-mask" 67 and adds "-webkit-mask". 68 Removing overflow 69 removes "overflow" 70 and adds "". 71 Removing padding 72 removes "padding" 73 and adds "". 74 Removing -webkit-text-stroke 75 removes "-webkit-text-stroke-color, -webkit-text-stroke-width" 76 and adds "". -
trunk/LayoutTests/fast/css/remove-shorthand.html
r46508 r112177 31 31 var remainingProperties = element.style.cssText.split("; "); 32 32 var removedProperties = []; 33 var p; 34 while (p = allProperties.shift()) { 35 if (remainingProperties[0] == p) 36 remainingProperties.shift(); 37 else 38 removedProperties.push("<tt>" + p.replace(/\:.*/,"") + "</tt>"); 33 var addedProperties = []; 34 35 for (var i = 0; i < allProperties.length; i++) { 36 if (remainingProperties.indexOf(allProperties[i]) < 0) 37 removedProperties.push("<tt>" + allProperties[i].replace(/\:.*/,"") + "</tt>"); 39 38 } 40 log("Removing <tt>" + shorthand + "</tt> removes " + removedProperties.join(", ") +"."); 39 for (var i = 0; i < remainingProperties.length; i++) { 40 if (allProperties.indexOf(remainingProperties[i]) < 0) 41 addedProperties.push("<tt>" + remainingProperties[i].replace(/\:.*/,"") + "</tt>"); 42 } 43 44 log("Removing <tt>" + shorthand + '</tt><br>removes "' + removedProperties.join(", ") 45 + '"<br>and adds "' + addedProperties.join(", ") + '".'); 41 46 } 42 47 -
trunk/LayoutTests/fast/css/uri-token-parsing-expected.txt
r98366 r112177 20 20 #p { content: url('url(g)'); } 21 21 #q { cursor: url('url(q)'); } 22 #r { list-style -image: url('url(r)'); }22 #r { list-style: url('url(r)'); } 23 23 #s { background-image: url('url(s)'); } 24 #t { -webkit-mask -image: url('url(t)'); }24 #t { -webkit-mask: url('url(t)'); } 25 25 #u { -webkit-border-image: url('url(u)') 1 2 3 4 fill stretch round; } 26 26 #v { -webkit-mask-box-image: url('url(v)') 1 2 3 4 fill stretch round; } … … 45 45 #p { content: url('url(g)'); } 46 46 #q { cursor: url('url(q)'); } 47 #r { list-style -image: url('url(r)'); }47 #r { list-style: url('url(r)'); } 48 48 #s { background-image: url('url(s)'); } 49 #t { -webkit-mask -image: url('url(t)'); }49 #t { -webkit-mask: url('url(t)'); } 50 50 #u { -webkit-border-image: url('url(u)') 1 2 3 4 fill stretch round; } 51 51 #v { -webkit-mask-box-image: url('url(v)') 1 2 3 4 fill stretch round; } -
trunk/LayoutTests/fast/css/uri-token-parsing.html
r98366 r112177 94 94 #p { content: url('url(g)'); } 95 95 #q { cursor: url('url(q)'); } 96 #r { list-style -image: url('url(r)'); }96 #r { list-style: url('url(r)'); } 97 97 #s { background-image: url('url(s)'); } 98 #t { -webkit-mask -image: url('url(t)'); }98 #t { -webkit-mask: url('url(t)'); } 99 99 #u { -webkit-border-image: url('url(u)') 1 2 3 4 fill stretch round; } 100 100 #v { -webkit-mask-box-image: url('url(v)') 1 2 3 4 fill stretch round; } -
trunk/LayoutTests/inspector/styles/styles-update-from-js-expected.txt
r99713 r112177 34 34 35 35 Running: testSetViaParsedAttributes 36 <div id="container" style="color: rgb(192, 255, 238); border -top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: green; border-right-color: green; border-bottom-color: green; border-left-color: green; border-image: initial; border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; "></div>36 <div id="container" style="color: rgb(192, 255, 238); border: 3px dashed green; "></div> 37 37 [expanded] 38 38 element.style { () … … 47 47 border-bottom-color: green; 48 48 border-left-color: green; 49 border-image: initial;50 49 border-width: 3px; 51 50 border-top-width: 3px; -
trunk/LayoutTests/printing/page-rule-css-text-expected.txt
r59751 r112177 2 2 @page :left { margin-right: 3cm; } 3 3 @page :right { margin-left: 3cm; } 4 @page :first { border -top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; }4 @page :first { border: 1px; } 5 5 @page hello { color: green; } 6 6 @page world:right { background-color: green; } 7 @media print { @page somepage:first { margin -top: 3cm; margin-right: 3cm; margin-bottom: 3cm; margin-left: 3cm; } }7 @media print { @page somepage:first { margin: 3cm; } } 8 8 @page auto_page { size: auto; } 9 9 @page square_page { size: 4in; } -
trunk/Source/JavaScriptCore/ChangeLog
r112164 r112177 1 2012-03-26 Ryosuke Niwa <rniwa@webkit.org> 2 3 cssText should use shorthand notations 4 https://bugs.webkit.org/show_bug.cgi?id=81737 5 6 Reviewed by Enrica Casucci. 7 8 Export symbols of BitVector on Windows. 9 10 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 11 1 12 2012-03-26 Filip Pizlo <fpizlo@apple.com> 2 13 -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r111197 r112177 158 158 ?destroy@JSCell@JSC@@KAXPAV12@@Z 159 159 ?destroy@JSGlobalObject@JSC@@SAXPAVJSCell@2@@Z 160 ?destroy@OutOfLineBits@BitVector@WTF@@SAXPAV123@@Z 160 161 ?detach@Debugger@JSC@@UAEXPAVJSGlobalObject@2@@Z 161 162 ?detachThread@WTF@@YAXI@Z … … 296 297 ?resetDateCache@JSGlobalData@JSC@@QAEXXZ 297 298 ?resize@StringBuilder@WTF@@QAEXI@Z 299 ?resizeOutOfLine@BitVector@WTF@@AAEXI@Z 298 300 ?resolveRope@JSString@JSC@@ABEXPAVExecState@2@@Z 299 301 ?restoreAll@Profile@JSC@@QAEXXZ -
trunk/Source/WTF/ChangeLog
r112082 r112177 1 2012-03-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 cssText should use shorthand notations 4 https://bugs.webkit.org/show_bug.cgi?id=81737 5 6 Reviewed by Enrica Casucci. 7 8 * wtf/BitVector.h: 9 (BitVector): 10 (WTF::BitVector::ensureSizeAndSet): Added. 11 1 12 2012-03-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 13 -
trunk/Source/WTF/wtf/BitVector.h
r111834 r112177 147 147 quickSet(bit); 148 148 } 149 149 150 void ensureSizeAndSet(size_t bit, size_t size) 151 { 152 ensureSize(size); 153 quickSet(bit); 154 } 155 150 156 void clear(size_t bit) 151 157 { -
trunk/Source/WebCore/ChangeLog
r112174 r112177 1 2012-03-23 Ryosuke Niwa <rniwa@webkit.org> 2 3 cssText should use shorthand notations 4 https://bugs.webkit.org/show_bug.cgi?id=81737 5 6 Reviewed by Enrica Casucci. 7 8 Use shorthand properties to serialize style properties for cssText. 9 10 The overall algorithm is to look for any property that has a shorthand, and then check if 11 the shorthand value could be obtained (the condition is quite complicated for border properties). 12 If it could, then append that value to the string builder, and set the corresponding entries in 13 shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in 14 shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties 15 that use the same shorthand property when we cannot use the shorthand. 16 17 Test: fast/css/cssText-shorthand.html 18 19 * css/StylePropertySet.cpp: 20 (WebCore::StylePropertySet::asText): 21 1 22 2012-03-26 Bolin Hsu <bhsu@google.com> 2 23 -
trunk/Source/WebCore/css/StylePropertySet.cpp
r112078 r112177 31 31 #include "Document.h" 32 32 #include "PropertySetCSSStyleDeclaration.h" 33 #include <wtf/BitVector.h> 33 34 #include <wtf/text/StringBuilder.h> 34 35 … … 566 567 const CSSProperty* repeatYProp = 0; 567 568 569 // FIXME: Stack-allocate the buffer for these BitVectors. 570 BitVector shorthandPropertyUsed; 571 BitVector shorthandPropertyAppeared; 572 568 573 unsigned size = m_properties.size(); 569 574 for (unsigned n = 0; n < size; ++n) { 570 575 const CSSProperty& prop = m_properties[n]; 571 switch (prop.id()) { 576 int propertyID = prop.id(); 577 int shorthandPropertyID = 0; 578 579 switch (propertyID) { 572 580 case CSSPropertyBackgroundPositionX: 573 581 positionXProp = ∝ 574 break;582 continue; 575 583 case CSSPropertyBackgroundPositionY: 576 584 positionYProp = ∝ 577 break;585 continue; 578 586 case CSSPropertyBackgroundRepeatX: 579 587 repeatXProp = ∝ 580 break;588 continue; 581 589 case CSSPropertyBackgroundRepeatY: 582 590 repeatYProp = ∝ 583 break; 584 default: 585 result.append(prop.cssText()); 586 } 591 continue; 592 case CSSPropertyBorderWidth: 593 case CSSPropertyBorderTopWidth: 594 case CSSPropertyBorderRightWidth: 595 case CSSPropertyBorderBottomWidth: 596 case CSSPropertyBorderLeftWidth: 597 case CSSPropertyBorderStyle: 598 case CSSPropertyBorderTopStyle: 599 case CSSPropertyBorderRightStyle: 600 case CSSPropertyBorderBottomStyle: 601 case CSSPropertyBorderLeftStyle: 602 case CSSPropertyBorderColor: 603 case CSSPropertyBorderTopColor: 604 case CSSPropertyBorderRightColor: 605 case CSSPropertyBorderBottomColor: 606 case CSSPropertyBorderLeftColor: 607 // FIXME: Deal with cases where only some of border-(top|right|bottom|left) are specified. 608 shorthandPropertyID = CSSPropertyBorder; 609 if (shorthandPropertyAppeared.get(CSSPropertyBorder - firstCSSProperty)) 610 break; 611 for (unsigned i = 0; i < borderAbridgedLonghand().length() && shorthandPropertyID; i++) { 612 const CSSPropertyLonghand& longhand = *(borderAbridgedLonghand().longhandsForInitialization()[i]); 613 String commonValue; 614 bool commonImportance = false; 615 for (size_t j = 0; j < longhand.length(); ++j) { 616 int id = longhand.properties()[j]; 617 RefPtr<CSSValue> value = getPropertyCSSValue(id); 618 String currentValue = value ? value->cssText() : String(); 619 bool isImportant = propertyIsImportant(id); 620 if (j && (currentValue != commonValue || commonImportance != isImportant)) { 621 shorthandPropertyID = 0; 622 break; 623 } 624 if (!j) { 625 commonValue = currentValue; 626 commonImportance = isImportant; 627 } 628 } 629 } 630 break; 631 case CSSPropertyWebkitBorderHorizontalSpacing: 632 case CSSPropertyWebkitBorderVerticalSpacing: 633 shorthandPropertyID = CSSPropertyBorderSpacing; 634 break; 635 case CSSPropertyFontFamily: 636 case CSSPropertyLineHeight: 637 case CSSPropertyFontSize: 638 case CSSPropertyFontStyle: 639 case CSSPropertyFontVariant: 640 case CSSPropertyFontWeight: 641 // Don't use CSSPropertyFont because old UAs can't recognize them but are important for editing. 642 break; 643 case CSSPropertyListStyleType: 644 case CSSPropertyListStylePosition: 645 case CSSPropertyListStyleImage: 646 shorthandPropertyID = CSSPropertyListStyle; 647 break; 648 case CSSPropertyMarginTop: 649 case CSSPropertyMarginRight: 650 case CSSPropertyMarginBottom: 651 case CSSPropertyMarginLeft: 652 shorthandPropertyID = CSSPropertyMargin; 653 break; 654 case CSSPropertyOutlineWidth: 655 case CSSPropertyOutlineStyle: 656 case CSSPropertyOutlineColor: 657 shorthandPropertyID = CSSPropertyOutline; 658 break; 659 case CSSPropertyOverflowX: 660 case CSSPropertyOverflowY: 661 shorthandPropertyID = CSSPropertyOverflow; 662 break; 663 case CSSPropertyPaddingTop: 664 case CSSPropertyPaddingRight: 665 case CSSPropertyPaddingBottom: 666 case CSSPropertyPaddingLeft: 667 shorthandPropertyID = CSSPropertyPadding; 668 break; 669 case CSSPropertyWebkitAnimationName: 670 case CSSPropertyWebkitAnimationDuration: 671 case CSSPropertyWebkitAnimationTimingFunction: 672 case CSSPropertyWebkitAnimationDelay: 673 case CSSPropertyWebkitAnimationIterationCount: 674 case CSSPropertyWebkitAnimationDirection: 675 case CSSPropertyWebkitAnimationFillMode: 676 shorthandPropertyID = CSSPropertyWebkitAnimation; 677 break; 678 case CSSPropertyWebkitFlexDirection: 679 case CSSPropertyWebkitFlexWrap: 680 shorthandPropertyID = CSSPropertyWebkitFlexFlow; 681 break; 682 case CSSPropertyWebkitMaskPositionX: 683 case CSSPropertyWebkitMaskPositionY: 684 case CSSPropertyWebkitMaskRepeatX: 685 case CSSPropertyWebkitMaskRepeatY: 686 case CSSPropertyWebkitMaskImage: 687 case CSSPropertyWebkitMaskRepeat: 688 case CSSPropertyWebkitMaskAttachment: 689 case CSSPropertyWebkitMaskPosition: 690 case CSSPropertyWebkitMaskClip: 691 case CSSPropertyWebkitMaskOrigin: 692 shorthandPropertyID = CSSPropertyWebkitMask; 693 break; 694 case CSSPropertyWebkitTransformOriginX: 695 case CSSPropertyWebkitTransformOriginY: 696 case CSSPropertyWebkitTransformOriginZ: 697 shorthandPropertyID = CSSPropertyWebkitTransformOrigin; 698 break; 699 case CSSPropertyWebkitTransitionProperty: 700 case CSSPropertyWebkitTransitionDuration: 701 case CSSPropertyWebkitTransitionTimingFunction: 702 case CSSPropertyWebkitTransitionDelay: 703 shorthandPropertyID = CSSPropertyWebkitTransition; 704 break; 705 case CSSPropertyWebkitWrapFlow: 706 case CSSPropertyWebkitWrapMargin: 707 case CSSPropertyWebkitWrapPadding: 708 shorthandPropertyID = CSSPropertyWebkitWrap; 709 break; 710 } 711 712 String value; 713 unsigned shortPropertyIndex = shorthandPropertyID - firstCSSProperty; 714 if (shorthandPropertyID) { 715 if (shorthandPropertyUsed.get(shortPropertyIndex)) 716 continue; 717 if (!shorthandPropertyAppeared.get(shortPropertyIndex)) 718 value = getPropertyValue(shorthandPropertyID); 719 shorthandPropertyAppeared.ensureSizeAndSet(shortPropertyIndex, numCSSProperties); 720 } 721 722 if (!value.isNull()) { 723 propertyID = shorthandPropertyID; 724 shorthandPropertyUsed.ensureSizeAndSet(shortPropertyIndex, numCSSProperties); 725 } else 726 value = prop.value()->cssText(); 727 728 if (value == "initial" && !CSSProperty::isInheritedProperty(propertyID)) 729 continue; 730 731 result.append(getPropertyName(static_cast<CSSPropertyID>(propertyID))); 732 result.append(": "); 733 result.append(value); 734 result.append(prop.isImportant() ? " !important" : ""); 735 result.append("; "); 587 736 } 588 737
Note: See TracChangeset
for help on using the changeset viewer.