Changeset 69220 in webkit
- Timestamp:
- Oct 6, 2010 12:02:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r69219 r69220 1 2010-10-06 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=47285 6 7 Update to the latest writing-mode draft. The block-flow property is gone and has been replaced with writing-mode. 8 Change all the code to use writingMode() instead of blockFlow() and rename all functions that referred to block flow 9 as appropriate. 10 11 Also hacked all of the getComputedStyle tests to just omit dashboard regions so that the results can be 12 cross-platform. 13 14 * fast/blockflow/auto-margins-across-boundaries.html: 15 * fast/blockflow/block-formatting-context.html: 16 * fast/blockflow/block-level-images.html: 17 * fast/blockflow/display-mutation.html: 18 * fast/blockflow/fieldsets.html: 19 * fast/blockflow/floats-in-block-layout.html: 20 * fast/blockflow/inline-direction-positioning.html: 21 * fast/blockflow/margin-collapse.html: 22 * fast/blockflow/percentage-padding.html: 23 * fast/blockflow/relative-positioning-percentages.html: 24 * fast/blockflow/root-lr-basic.html: 25 * fast/blockflow/self-collapsing-block.html: 26 * fast/css/getComputedStyle/computed-style-expected.txt: 27 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 28 * fast/css/getComputedStyle/computed-style-without-renderer.html: 29 * fast/css/getComputedStyle/computed-style.html: 30 * fast/css/logical-property-resolution.html: 31 * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt: Removed. 32 * platform/mac/svg/css/getComputedStyle-basic-expected.checksum: Removed. 33 * platform/mac/svg/css/getComputedStyle-basic-expected.png: Removed. 34 * platform/win/fast/css/getComputedStyle/computed-style-expected.txt: Removed. 35 * platform/win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed. 36 * svg/css/getComputedStyle-basic-expected.txt: 37 * svg/css/getComputedStyle-basic.xhtml: 38 1 39 2010-10-06 Albert J. Wong <ajwong@chromium.org> 2 40 -
trunk/LayoutTests/fast/blockflow/auto-margins-across-boundaries.html
r68417 r69220 2 2 <head> 3 3 <style> 4 .lr { -webkit- block-flow: lr; block-flow:lr; background-color:green; margin-left:auto; margin-right:auto; width:100px; height:100px; }4 .lr { -webkit-writing-mode: vertical-lr; background-color:green; margin-left:auto; margin-right:auto; width:100px; height:100px; } 5 5 </style> 6 6 </head> -
trunk/LayoutTests/fast/blockflow/block-formatting-context.html
r68417 r69220 2 2 <head> 3 3 <style> 4 .lr { -webkit- block-flow: lr; block-flow:lr; background-color:green; margin:10px; width:100px; height:100px; }4 .lr { -webkit-writing-mode: vertical-lr; background-color:green; margin:10px; width:100px; height:100px; } 5 5 .float { width:100px; height:100px; background-color:blue; float:left} 6 6 body { margin: 0 } -
trunk/LayoutTests/fast/blockflow/block-level-images.html
r68917 r69220 1 1 <!doctype html> 2 <div style="margin:2px; float:left; height:300px;border:2px solid black;-webkit-writing-mode: tb-lr; writing-mode:tb-lr">2 <div style="margin:2px; float:left; height:300px;border:2px solid black;-webkit-writing-mode:vertical-lr"> 3 3 <div style="width:25px;background-color:green"></div> 4 4 <img style="display:block;height:50%; -webkit-border-before:2px solid maroon; -webkit-border-after:2px solid maroon; -webkit-border-start: 1px solid purple; -webkit-border-end:5px dashed grey" src="resources/circle.svg"> … … 7 7 </div> 8 8 9 <div style="margin:2px; float:left; height:300px;border:2px solid black;-webkit-writing-mode: bt-lr; writing-mode:bt-lr">9 <div style="margin:2px; float:left; height:300px;border:2px solid black;-webkit-writing-mode:vertical-lr; direction:rtl"> 10 10 <div style="width:25px;background-color:green"></div> 11 11 <img style="display:block;height:50%; -webkit-border-before:2px solid maroon; -webkit-border-after:2px solid maroon; -webkit-border-start: 1px solid purple; -webkit-border-end:5px dashed grey" src="resources/circle.svg"> -
trunk/LayoutTests/fast/blockflow/display-mutation.html
r68083 r69220 16 16 </head> 17 17 <body onload="runTest()"> 18 <span id="test" style="-webkit- block-flow:lr"></span>18 <span id="test" style="-webkit-writing-mode:vertical-lr"></span> 19 19 <div id="console"></div> -
trunk/LayoutTests/fast/blockflow/fieldsets.html
r69184 r69220 54 54 Vertical LTR fieldset with left/center/right text-align: <br> 55 55 56 <fieldset style="-webkit- block-flow:lr;">56 <fieldset style="-webkit-writing-mode:vertical-lr"> 57 57 <legend style="text-align:left; margin-top:20px"><div></div></legend> 58 58 </fieldset> 59 59 60 <fieldset style="-webkit- block-flow:lr;">60 <fieldset style="-webkit-writing-mode:vertical-lr"> 61 61 <legend style="text-align:right; margin-bottom:20px"><div></div></legend> 62 62 </fieldset> 63 63 64 <fieldset style="-webkit- block-flow:lr;">64 <fieldset style="-webkit-writing-mode:vertical-lr"> 65 65 <legend style="text-align:center"><div></div></legend> 66 66 </fieldset> … … 71 71 Vertical RTL fieldset with left/center/right text-align: <br> 72 72 73 <fieldset dir=rtl style="-webkit- block-flow:lr;">73 <fieldset dir=rtl style="-webkit-writing-mode:vertical-lr"> 74 74 <legend style="text-align:left; margin-top:20px"><div></div></legend> 75 75 </fieldset> 76 76 77 <fieldset dir=rtl style="-webkit- block-flow:lr;">77 <fieldset dir=rtl style="-webkit-writing-mode:vertical-lr"> 78 78 <legend style="text-align:right; margin-bottom:20px"><div></div></legend> 79 79 </fieldset> 80 80 81 <fieldset dir=rtl style="-webkit- block-flow:lr;">81 <fieldset dir=rtl style="-webkit-writing-mode:vertical-lr"> 82 82 <legend style="text-align:center"><div></div></legend> 83 83 </fieldset> -
trunk/LayoutTests/fast/blockflow/floats-in-block-layout.html
r69136 r69220 1 1 <!doctype html> 2 2 <html> 3 <body style="-webkit-writing-mode: tb-lr; writing-mode:tb-lr;">3 <body style="-webkit-writing-mode:vertical-lr"> 4 4 <div style="width:100px; background-color:yellow"></div> 5 5 <div style="float:left;width:100px;height:100px;background-color:green; margin-top:10px;"></div> -
trunk/LayoutTests/fast/blockflow/inline-direction-positioning.html
r68814 r69220 2 2 <body> 3 3 <div style="border:2px solid black;width:600px;"> 4 <div style="-webkit-writing-mode: tb-lr; writing-mode:tb-lr; width:100px; height:100px; margin-left:50px; background-color:green"></div>4 <div style="-webkit-writing-mode:vertical-lr; width:100px; height:100px; margin-left:50px; background-color:green"></div> 5 5 </div> 6 6 7 7 <div style="border:2px solid black;width:600px;direction:rtl"> 8 <div style="-webkit-writing-mode: tb-lr; writing-mode:tb-lr; width:100px; height:100px; margin-right:50px; background-color:green"></div>8 <div style="-webkit-writing-mode:vertical-lr; width:100px; height:100px; margin-right:50px; background-color:green"></div> 9 9 </div> -
trunk/LayoutTests/fast/blockflow/margin-collapse.html
r68842 r69220 6 6 <body> 7 7 <div style="border:2px solid black"> 8 <div style="-webkit- block-flow:lr" class="block"></div>9 <div style="-webkit- block-flow:rl" class="block"></div>10 <div style="-webkit- block-flow:bt" class="block"></div>8 <div style="-webkit-writing-mode:vertical-lr" class="block"></div> 9 <div style="-webkit-writing-mode:vertical-rl" class="block"></div> 10 <div style="-webkit-writing-mode:horizontal-bt" class="block"></div> 11 11 <div class="block"></div> 12 12 </div> -
trunk/LayoutTests/fast/blockflow/percentage-padding.html
r68417 r69220 12 12 </head> 13 13 <body> 14 <div style="width:100px;height:200px; -webkit- block-flow:lr;">14 <div style="width:100px;height:200px; -webkit-writing-mode:vertical-lr"> 15 15 <div id="test" class="block"></div> 16 16 </div> -
trunk/LayoutTests/fast/blockflow/relative-positioning-percentages.html
r68417 r69220 2 2 <head> 3 3 <style> 4 .lr { -webkit- block-flow: lr; block-flow:lr; background-color:green; width:100px; height:100px; position:relative; top:50%; }4 .lr { -webkit-writing-mode:vertical-lr; background-color:green; width:100px; height:100px; position:relative; top:50%; } 5 5 </style> 6 6 </head> -
trunk/LayoutTests/fast/blockflow/root-lr-basic.html
r68436 r69220 1 1 <!doctype html> 2 <html style="overflow:hidden; -webkit- block-flow:lr; -webkit-logical-height:100px; border:2px solid black"></html>2 <html style="overflow:hidden; -webkit-writing-mode:vertical-lr; -webkit-logical-height:100px; border:2px solid black"></html> -
trunk/LayoutTests/fast/blockflow/self-collapsing-block.html
r69141 r69220 1 1 <!doctype html> 2 2 <html> 3 <body style="-webkit-writing-mode: tb-lr; writing-mode:tb-lr">3 <body style="-webkit-writing-mode:vertical-lr"> 4 4 <div style="width:100px;background-color:green"></div> 5 5 <div style="height:100px;margin-left:100px;margin-right:100px"></div> -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r67667 r69220 2 2 3 3 background-attachment: scroll; 4 background-clip: border-box; 4 5 background-color: rgba(0, 0, 0, 0); 5 6 background-image: none; 7 background-origin: padding-box; 6 8 background-position: 0% 0%; 7 9 background-repeat: repeat; 10 background-size: auto auto; 8 11 border-bottom-color: rgb(0, 0, 0); 12 border-bottom-left-radius: 0px; 13 border-bottom-right-radius: 0px; 9 14 border-bottom-style: none; 10 15 border-bottom-width: 0px; … … 17 22 border-right-width: 0px; 18 23 border-top-color: rgb(0, 0, 0); 24 border-top-left-radius: 0px; 25 border-top-right-radius: 0px; 19 26 border-top-style: none; 20 27 border-top-width: 0px; … … 22 29 caption-side: top; 23 30 clear: none; 31 clip: auto; 24 32 color: rgb(0, 0, 0); 25 33 cursor: auto; … … 66 74 resize: none; 67 75 right: auto; 76 speak: normal; 68 77 table-layout: auto; 69 78 text-align: -webkit-auto; 70 79 text-decoration: none; 71 80 text-indent: 0px; 81 text-rendering: auto; 72 82 text-shadow: none; 73 83 text-overflow: clip; … … 80 90 widows: 2; 81 91 width: 784px; 92 word-break: normal; 82 93 word-spacing: 0px; 83 94 word-wrap: normal; … … 90 101 -webkit-animation-iteration-count: 1; 91 102 -webkit-animation-name: none; 103 -webkit-animation-play-state: running; 92 104 -webkit-animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); 93 105 -webkit-appearance: none; … … 97 109 -webkit-background-origin: padding-box; 98 110 -webkit-background-size: auto auto; 99 -webkit-block-flow: tb;100 111 -webkit-border-fit: border; 112 -webkit-border-horizontal-spacing: 0px; 101 113 -webkit-border-image: none; 102 -webkit-border-horizontal-spacing: 0px;103 114 -webkit-border-vertical-spacing: 0px; 104 115 -webkit-box-align: stretch; … … 113 124 -webkit-box-shadow: none; 114 125 -webkit-box-sizing: content-box; 126 -webkit-color-correction: default; 115 127 -webkit-column-break-after: auto; 116 128 -webkit-column-break-before: auto; … … 123 135 -webkit-column-span: 1; 124 136 -webkit-column-width: auto; 137 -webkit-font-smoothing: auto; 125 138 -webkit-highlight: none; 126 139 -webkit-line-break: normal; 127 140 -webkit-line-clamp: none; 128 -webkit-margin-b ottom-collapse: collapse;129 -webkit-margin- top-collapse: collapse;141 -webkit-margin-before-collapse: collapse; 142 -webkit-margin-after-collapse: collapse; 130 143 -webkit-marquee-direction: auto; 131 144 -webkit-marquee-increment: 6px; … … 134 147 -webkit-mask-attachment: scroll; 135 148 -webkit-mask-box-image: none; 149 -webkit-mask-clip: border-box; 150 -webkit-mask-composite: source-over; 136 151 -webkit-mask-image: none; 152 -webkit-mask-origin: border-box; 137 153 -webkit-mask-position: 0% 0%; 138 154 -webkit-mask-repeat: repeat; 139 -webkit-mask-clip: border-box;140 -webkit-mask-composite: source-over;141 -webkit-mask-origin: border-box;142 155 -webkit-mask-size: auto auto; 143 156 -webkit-nbsp-mode: normal; … … 160 173 -webkit-user-modify: read-only; 161 174 -webkit-user-select: text; 162 -webkit-border-bottom-left-radius: 0px; 163 -webkit-border-bottom-right-radius: 0px; 164 -webkit-border-top-left-radius: 0px; 165 -webkit-border-top-right-radius: 0px; 175 -webkit-writing-mode: horizontal-tb; 166 176 clip-path: none; 167 177 clip-rule: nonzero; … … 185 195 shape-rendering: auto; 186 196 stroke: none; 187 stroke-dasharray: ;188 stroke-dashoffset: ;197 stroke-dasharray: none; 198 stroke-dashoffset: 0; 189 199 stroke-linecap: butt; 190 200 stroke-linejoin: miter; 191 201 stroke-miterlimit: 4; 192 202 stroke-opacity: 1; 193 stroke-width: ; 194 text-rendering: auto; 203 stroke-width: 1; 195 204 alignment-baseline: auto; 196 205 baseline-shift: baseline; 197 206 dominant-baseline: auto; 198 kerning: ;207 kerning: 0; 199 208 text-anchor: start; 200 209 writing-mode: lr-tb; 201 210 glyph-orientation-horizontal: 0deg; 202 211 glyph-orientation-vertical: auto; 212 -webkit-svg-shadow: none; 213 vector-effect: none; 203 214 204 215 Other attributes that the computed style class supports: 205 216 206 background-position: 0% 0%; 217 background-position-x: 0%; 218 background-position-y: 0%; 207 219 border-spacing: 0px 0px; 208 220 overflow: visible; 221 -webkit-mask-position-x: 0%; 222 -webkit-mask-position-y: 0%; 209 223 -webkit-match-nearest-mail-blockquote-color: normal; 210 224 -webkit-text-size-adjust: auto; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r67667 r69220 1 1 Computed style of an element whose parent's 'display' value is 'none': 2 2 background-attachment: scroll 3 background-clip: border-box 3 4 background-color: rgb(0, 128, 0) 4 5 background-image: none 6 background-origin: padding-box 5 7 background-position: 0% 0% 6 8 background-repeat: repeat 9 background-size: auto auto 7 10 border-bottom-color: rgb(0, 0, 0) 11 border-bottom-left-radius: 0px 12 border-bottom-right-radius: 0px 8 13 border-bottom-style: none 9 14 border-bottom-width: 0px … … 16 21 border-right-width: 0px 17 22 border-top-color: rgb(0, 0, 0) 23 border-top-left-radius: 0px 24 border-top-right-radius: 0px 18 25 border-top-style: solid 19 26 border-top-width: 16px … … 21 28 caption-side: top 22 29 clear: none 30 clip: auto 23 31 color: rgb(0, 0, 0) 24 32 cursor: auto … … 65 73 resize: none 66 74 right: auto 75 speak: normal 67 76 table-layout: auto 68 77 text-align: -webkit-auto 69 78 text-decoration: none 70 79 text-indent: 0px 80 text-rendering: auto 71 81 text-shadow: none 72 82 text-overflow: clip … … 79 89 widows: 2 80 90 width: 50% 91 word-break: normal 81 92 word-spacing: 0px 82 93 word-wrap: normal … … 89 100 -webkit-animation-iteration-count: 1 90 101 -webkit-animation-name: none 102 -webkit-animation-play-state: running 91 103 -webkit-animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1) 92 104 -webkit-appearance: none … … 96 108 -webkit-background-origin: padding-box 97 109 -webkit-background-size: auto auto 98 -webkit-block-flow: tb99 110 -webkit-border-fit: border 111 -webkit-border-horizontal-spacing: 0px 100 112 -webkit-border-image: none 101 -webkit-border-horizontal-spacing: 0px102 113 -webkit-border-vertical-spacing: 0px 103 114 -webkit-box-align: stretch … … 112 123 -webkit-box-shadow: none 113 124 -webkit-box-sizing: content-box 125 -webkit-color-correction: default 114 126 -webkit-column-break-after: auto 115 127 -webkit-column-break-before: auto … … 122 134 -webkit-column-span: 1 123 135 -webkit-column-width: auto 136 -webkit-font-smoothing: auto 124 137 -webkit-highlight: none 125 138 -webkit-line-break: normal 126 139 -webkit-line-clamp: none 127 -webkit-margin-b ottom-collapse: collapse128 -webkit-margin- top-collapse: collapse140 -webkit-margin-before-collapse: collapse 141 -webkit-margin-after-collapse: collapse 129 142 -webkit-marquee-direction: auto 130 143 -webkit-marquee-increment: 6px … … 133 146 -webkit-mask-attachment: scroll 134 147 -webkit-mask-box-image: none 148 -webkit-mask-clip: border-box 149 -webkit-mask-composite: source-over 135 150 -webkit-mask-image: none 151 -webkit-mask-origin: border-box 136 152 -webkit-mask-position: 0% 0% 137 153 -webkit-mask-repeat: repeat 138 -webkit-mask-clip: border-box139 -webkit-mask-composite: source-over140 -webkit-mask-origin: border-box141 154 -webkit-mask-size: auto auto 142 155 -webkit-nbsp-mode: normal … … 159 172 -webkit-user-modify: read-only 160 173 -webkit-user-select: text 161 -webkit-border-bottom-left-radius: 0px 162 -webkit-border-bottom-right-radius: 0px 163 -webkit-border-top-left-radius: 0px 164 -webkit-border-top-right-radius: 0px 174 -webkit-writing-mode: horizontal-tb 165 175 clip-path: none 166 176 clip-rule: nonzero … … 184 194 shape-rendering: auto 185 195 stroke: none 186 stroke-dasharray: 187 stroke-dashoffset: 196 stroke-dasharray: none 197 stroke-dashoffset: 0 188 198 stroke-linecap: butt 189 199 stroke-linejoin: miter 190 200 stroke-miterlimit: 4 191 201 stroke-opacity: 1 192 stroke-width: 193 text-rendering: auto 202 stroke-width: 1 194 203 alignment-baseline: auto 195 204 baseline-shift: baseline 196 205 dominant-baseline: auto 197 kerning: 206 kerning: 0 198 207 text-anchor: start 199 208 writing-mode: lr-tb 200 209 glyph-orientation-horizontal: 0deg 201 210 glyph-orientation-vertical: auto 202 background-position: 0% 0% 211 -webkit-svg-shadow: none 212 vector-effect: none 213 background-position-x: 0% 214 background-position-y: 0% 203 215 border-spacing: 0px 0px 204 216 overflow: visible 217 -webkit-mask-position-x: 0% 218 -webkit-mask-position-y: 0% 205 219 -webkit-match-nearest-mail-blockquote-color: normal 206 220 -webkit-text-size-adjust: auto -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer.html
r43797 r69220 29 29 for (var i = 0; i != style.length; ++i) { 30 30 var name = style.item(i); 31 log(" " + name + ": " + style.getPropertyValue(name)); 31 if (name != "-webkit-dashboard-region") 32 log(" " + name + ": " + style.getPropertyValue(name)); 32 33 } 33 34 properties = others; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style.html
r43797 r69220 8 8 var name = style.item(i); 9 9 var value = style.getPropertyValue(name); 10 text += name + ": " + value + ";\n"; 10 if (name != "-webkit-dashboard-region") 11 text += name + ": " + value + ";\n"; 11 12 } 12 13 document.getElementById("exposed").textContent = text; -
trunk/LayoutTests/fast/css/logical-property-resolution.html
r68270 r69220 11 11 12 12 .tb-block { 13 -webkit- block-flow: tb13 -webkit-writing-mode: horizontal-tb; 14 14 } 15 15 16 16 .bt-block { 17 -webkit- block-flow:bt17 -webkit-writing-mode: horizontal-bt 18 18 } 19 19 20 20 .lr-block { 21 -webkit- block-flow:lr21 -webkit-writing-mode: vertical-lr 22 22 } 23 23 24 24 .rl-block { 25 -webkit- block-flow:rl25 -webkit-writing-mode: vertical-rl 26 26 } 27 27 -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r68728 r69220 215 215 rect: style.getPropertyValue(-webkit-background-size) : auto auto 216 216 rect: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList] 217 rect: style.getPropertyValue(-webkit-block-flow) : tb218 rect: style.getPropertyCSSValue(-webkit-block-flow) : [object CSSPrimitiveValue]219 217 rect: style.getPropertyValue(-webkit-border-fit) : border 220 218 rect: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue] … … 269 267 rect: style.getPropertyValue(-webkit-column-width) : auto 270 268 rect: style.getPropertyCSSValue(-webkit-column-width) : [object CSSPrimitiveValue] 271 rect: style.getPropertyValue(-webkit-dashboard-region) : null272 rect: style.getPropertyCSSValue(-webkit-dashboard-region) : [object CSSPrimitiveValue]273 269 rect: style.getPropertyValue(-webkit-font-smoothing) : auto 274 270 rect: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] … … 347 343 rect: style.getPropertyValue(-webkit-user-select) : text 348 344 rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue] 345 rect: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb 346 rect: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue] 349 347 rect: style.getPropertyValue(clip-path) : none 350 348 rect: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue] … … 639 637 g: style.getPropertyValue(-webkit-background-size) : auto auto 640 638 g: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList] 641 g: style.getPropertyValue(-webkit-block-flow) : tb642 g: style.getPropertyCSSValue(-webkit-block-flow) : [object CSSPrimitiveValue]643 639 g: style.getPropertyValue(-webkit-border-fit) : border 644 640 g: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue] … … 693 689 g: style.getPropertyValue(-webkit-column-width) : auto 694 690 g: style.getPropertyCSSValue(-webkit-column-width) : [object CSSPrimitiveValue] 695 g: style.getPropertyValue(-webkit-dashboard-region) : null696 g: style.getPropertyCSSValue(-webkit-dashboard-region) : [object CSSPrimitiveValue]697 691 g: style.getPropertyValue(-webkit-font-smoothing) : auto 698 692 g: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] … … 771 765 g: style.getPropertyValue(-webkit-user-select) : text 772 766 g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue] 767 g: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb 768 g: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue] 773 769 g: style.getPropertyValue(clip-path) : none 774 770 g: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue] -
trunk/LayoutTests/svg/css/getComputedStyle-basic.xhtml
r26522 r69220 26 26 var cssValue = style.getPropertyCSSValue(name); 27 27 28 debugLog(elementId + ": style.getPropertyValue(" + name + ") : " + value); 29 debugLog(elementId + ": style.getPropertyCSSValue(" + name + ") : " + cssValue); 28 if (name != "-webkit-dashboard-region") { 29 debugLog(elementId + ": style.getPropertyValue(" + name + ") : " + value); 30 debugLog(elementId + ": style.getPropertyCSSValue(" + name + ") : " + cssValue); 31 } 30 32 } 31 33 } -
trunk/WebCore/ChangeLog
r69216 r69220 1 2010-10-06 David Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=47285 6 7 Update to the latest writing-mode draft. The block-flow property is gone and has been replaced with writing-mode. 8 Change all the code to use writingMode() instead of blockFlow() and rename all functions that referred to block flow 9 as appropriate. 10 11 * css/CSSComputedStyleDeclaration.cpp: 12 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 13 * css/CSSParser.cpp: 14 (WebCore::CSSParser::parseValue): 15 * css/CSSPrimitiveValueMappings.h: 16 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 17 (WebCore::CSSPrimitiveValue::operator WritingMode): 18 (WebCore::CSSPrimitiveValue::operator SVGWritingMode): 19 * css/CSSProperty.cpp: 20 (WebCore::resolveToPhysicalProperty): 21 (WebCore::CSSProperty::resolveDirectionAwareProperty): 22 * css/CSSProperty.h: 23 * css/CSSPropertyNames.in: 24 * css/CSSStyleSelector.cpp: 25 (WebCore::CSSStyleSelector::styleForDocument): 26 (WebCore::CSSStyleSelector::adjustRenderStyle): 27 (WebCore::CSSStyleSelector::applyDeclarations): 28 (WebCore::CSSStyleSelector::applyProperty): 29 * css/CSSValueKeywords.in: 30 * rendering/RenderBlock.cpp: 31 (WebCore::RenderBlock::MarginInfo::MarginInfo): 32 (WebCore::RenderBlock::expandsToEncloseOverhangingFloats): 33 (WebCore::RenderBlock::setLogicalLeftForChild): 34 (WebCore::RenderBlock::setLogicalTopForChild): 35 (WebCore::RenderBlock::layoutBlockChild): 36 (WebCore::RenderBlock::insertFloatingObject): 37 (WebCore::RenderBlock::addOverhangingFloats): 38 (WebCore::RenderBlock::addIntrudingFloats): 39 (WebCore::RenderBlock::collapsedMarginBeforeForChild): 40 (WebCore::RenderBlock::collapsedMarginAfterForChild): 41 (WebCore::RenderBlock::marginBeforeForChild): 42 (WebCore::RenderBlock::marginAfterForChild): 43 (WebCore::RenderBlock::marginStartForChild): 44 (WebCore::RenderBlock::marginEndForChild): 45 (WebCore::RenderBlock::setMarginStartForChild): 46 (WebCore::RenderBlock::setMarginEndForChild): 47 (WebCore::RenderBlock::setMarginBeforeForChild): 48 (WebCore::RenderBlock::setMarginAfterForChild): 49 (WebCore::RenderBlock::marginValuesForChild): 50 * rendering/RenderBlock.h: 51 (WebCore::RenderBlock::logicalWidthForChild): 52 (WebCore::RenderBlock::logicalHeightForChild): 53 (WebCore::RenderBlock::logicalTopForChild): 54 (WebCore::RenderBlock::logicalRightOffsetForContent): 55 (WebCore::RenderBlock::logicalLeftOffsetForContent): 56 (WebCore::RenderBlock::logicalTopForFloat): 57 (WebCore::RenderBlock::logicalBottomForFloat): 58 (WebCore::RenderBlock::logicalLeftForFloat): 59 (WebCore::RenderBlock::logicalRightForFloat): 60 (WebCore::RenderBlock::logicalWidthForFloat): 61 (WebCore::RenderBlock::setLogicalTopForFloat): 62 (WebCore::RenderBlock::setLogicalLeftForFloat): 63 (WebCore::RenderBlock::setLogicalHeightForFloat): 64 (WebCore::RenderBlock::setLogicalWidthForFloat): 65 * rendering/RenderBox.cpp: 66 (WebCore::RenderBox::marginBefore): 67 (WebCore::RenderBox::marginAfter): 68 (WebCore::RenderBox::marginStart): 69 (WebCore::RenderBox::marginEnd): 70 (WebCore::RenderBox::setMarginStart): 71 (WebCore::RenderBox::setMarginEnd): 72 (WebCore::RenderBox::setMarginBefore): 73 (WebCore::RenderBox::setMarginAfter): 74 (WebCore::RenderBox::styleDidChange): 75 (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight): 76 (WebCore::RenderBox::computeLogicalWidth): 77 (WebCore::RenderBox::computeLogicalHeight): 78 (WebCore::RenderBox::availableLogicalHeightUsing): 79 (WebCore::RenderBox::avoidsFloats): 80 * rendering/RenderBox.h: 81 (WebCore::RenderBox::logicalLeft): 82 (WebCore::RenderBox::logicalTop): 83 (WebCore::RenderBox::logicalWidth): 84 (WebCore::RenderBox::logicalHeight): 85 (WebCore::RenderBox::setLogicalLeft): 86 (WebCore::RenderBox::setLogicalTop): 87 (WebCore::RenderBox::setLogicalWidth): 88 (WebCore::RenderBox::setLogicalHeight): 89 (WebCore::RenderBox::setLogicalLocation): 90 (WebCore::RenderBox::contentLogicalWidth): 91 (WebCore::RenderBox::contentLogicalHeight): 92 (WebCore::RenderBox::stretchesToViewport): 93 (WebCore::RenderBox::intrinsicLogicalWidth): 94 (WebCore::RenderBox::intrinsicLogicalHeight): 95 (WebCore::RenderBox::availableWidth): 96 (WebCore::RenderBox::availableHeight): 97 (WebCore::RenderBox::scrollbarLogicalHeight): 98 (WebCore::RenderBox::isWritingModeRoot): 99 * rendering/RenderFieldset.cpp: 100 (WebCore::RenderFieldset::paintBoxDecorations): 101 (WebCore::RenderFieldset::paintMask): 102 * rendering/RenderImage.cpp: 103 (WebCore::RenderImage::computeReplacedLogicalWidth): 104 (WebCore::RenderImage::computeReplacedLogicalHeight): 105 * rendering/RenderInline.cpp: 106 (WebCore::RenderInline::marginLeft): 107 (WebCore::RenderInline::marginRight): 108 (WebCore::RenderInline::marginTop): 109 (WebCore::RenderInline::marginBottom): 110 * rendering/RenderTableCell.cpp: 111 (WebCore::RenderTableCell::paddingTop): 112 (WebCore::RenderTableCell::paddingBottom): 113 (WebCore::RenderTableCell::paddingLeft): 114 (WebCore::RenderTableCell::paddingRight): 115 * rendering/RenderView.h: 116 (WebCore::RenderView::viewLogicalWidth): 117 (WebCore::RenderView::viewLogicalHeight): 118 * rendering/RootInlineBox.cpp: 119 (WebCore::RootInlineBox::RootInlineBox): 120 * rendering/style/RenderStyle.cpp: 121 (WebCore::RenderStyle::diff): 122 (WebCore::RenderStyle::logicalWidth): 123 (WebCore::RenderStyle::logicalHeight): 124 (WebCore::RenderStyle::logicalMinWidth): 125 (WebCore::RenderStyle::logicalMaxWidth): 126 (WebCore::RenderStyle::logicalMinHeight): 127 (WebCore::RenderStyle::logicalMaxHeight): 128 (WebCore::RenderStyle::borderBeforeWidth): 129 (WebCore::RenderStyle::borderAfterWidth): 130 (WebCore::RenderStyle::borderStartWidth): 131 (WebCore::RenderStyle::borderEndWidth): 132 (WebCore::RenderStyle::marginBefore): 133 (WebCore::RenderStyle::marginAfter): 134 (WebCore::RenderStyle::marginBeforeUsing): 135 (WebCore::RenderStyle::marginAfterUsing): 136 (WebCore::RenderStyle::marginStart): 137 (WebCore::RenderStyle::marginEnd): 138 (WebCore::RenderStyle::marginStartUsing): 139 (WebCore::RenderStyle::marginEndUsing): 140 (WebCore::RenderStyle::paddingBefore): 141 (WebCore::RenderStyle::paddingAfter): 142 (WebCore::RenderStyle::paddingStart): 143 (WebCore::RenderStyle::paddingEnd): 144 * rendering/style/RenderStyle.h: 145 (WebCore::InheritedFlags::setBitDefaults): 146 (WebCore::InheritedFlags::writingMode): 147 (WebCore::InheritedFlags::isHorizontalWritingMode): 148 (WebCore::InheritedFlags::setWritingMode): 149 (WebCore::InheritedFlags::initialWritingMode): 150 * rendering/style/RenderStyleConstants.h: 151 * rendering/style/SVGRenderStyle.h: 152 (WebCore::SVGRenderStyle::initialWritingMode): 153 (WebCore::SVGRenderStyle::setWritingMode): 154 (WebCore::SVGRenderStyle::writingMode): 155 * rendering/style/SVGRenderStyleDefs.h: 156 1 157 2010-10-06 Sheriff Bot <webkit.review.bot@gmail.com> 2 158 -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r68690 r69220 160 160 CSSPropertyWebkitBackgroundOrigin, 161 161 CSSPropertyWebkitBackgroundSize, 162 CSSPropertyWebkitBlockFlow,163 162 CSSPropertyWebkitBorderFit, 164 163 CSSPropertyWebkitBorderHorizontalSpacing, … … 227 226 CSSPropertyWebkitUserDrag, 228 227 CSSPropertyWebkitUserModify, 229 CSSPropertyWebkitUserSelect 228 CSSPropertyWebkitUserSelect, 229 CSSPropertyWebkitWritingMode 230 230 231 231 #if ENABLE(SVG) … … 735 735 return 0; 736 736 737 propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style->direction(), style-> blockFlow());737 propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style->direction(), style->writingMode()); 738 738 739 739 switch (static_cast<CSSPropertyID>(propertyID)) { … … 1355 1355 case CSSPropertyWebkitBackfaceVisibility: 1356 1356 return CSSPrimitiveValue::createIdentifier((style->backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible); 1357 case CSSPropertyWebkitBlockFlow:1358 return CSSPrimitiveValue::create(style->blockFlow());1359 1357 case CSSPropertyWebkitBorderImage: 1360 1358 return valueForNinePieceImage(style->borderImage()); … … 1464 1462 case CSSPropertyWebkitColorCorrection: 1465 1463 return CSSPrimitiveValue::create(style->colorSpace()); 1466 1464 case CSSPropertyWebkitWritingMode: 1465 return CSSPrimitiveValue::create(style->writingMode()); 1466 1467 1467 /* Shorthand properties, currently not supported see bug 13658*/ 1468 1468 case CSSPropertyBackground: … … 1480 1480 case CSSPropertyMargin: 1481 1481 case CSSPropertyPadding: 1482 case CSSPropertyWebkitWritingMode:1483 1482 break; 1484 1483 -
trunk/WebCore/css/CSSParser.cpp
r69196 r69220 1782 1782 1783 1783 // CSS Text Layout Module Level 3: Vertical writing support 1784 case CSSPropertyWebkitBlockFlow:1785 // [ "tb" | "rl" | "lr" | "bt" ]1786 if (id == CSSValueTb || id == CSSValueRl || id == CSSValueLr || id == CSSValueBt)1787 validPrimitive = true;1788 break;1789 1790 1784 case CSSPropertyWebkitWritingMode: 1791 // [ "lr-tb" | "rl-tb" | "tb-rl" | "bt-rl" | "tb-lr" | "bt-lr" ] 1792 if (id == CSSValueLrTb || id == CSSValueRlTb || id == CSSValueTbRl || id == CSSValueBtRl || id == CSSValueTbLr || id == CSSValueBtLr) 1785 if (id >= CSSValueHorizontalTb && id <= CSSValueHorizontalBt) 1793 1786 validPrimitive = true; 1794 1787 break; -
trunk/WebCore/css/CSSPrimitiveValueMappings.h
r68738 r69220 2004 2004 } 2005 2005 2006 template<> inline CSSPrimitiveValue::CSSPrimitiveValue( EBlockFlowDirectione)2007 : m_type(CSS_IDENT) 2008 , m_hasCachedCSSText(false) 2009 { 2010 switch (e) { 2011 case TopToBottom BlockFlow:2012 m_value.ident = CSSValue Tb;2013 break; 2014 case RightToLeft BlockFlow:2015 m_value.ident = CSSValue Rl;2016 break; 2017 case LeftToRight BlockFlow:2018 m_value.ident = CSSValue Lr;2019 break; 2020 case BottomToTop BlockFlow:2021 m_value.ident = CSSValue Bt;2022 break; 2023 } 2024 } 2025 2026 template<> inline CSSPrimitiveValue::operator EBlockFlowDirection() const2027 { 2028 switch (m_value.ident) { 2029 case CSSValue Tb:2030 return TopToBottom BlockFlow;2031 case CSSValue Rl:2032 return RightToLeft BlockFlow;2033 case CSSValue Lr:2034 return LeftToRight BlockFlow;2035 case CSSValue Bt:2036 return BottomToTop BlockFlow;2006 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WritingMode e) 2007 : m_type(CSS_IDENT) 2008 , m_hasCachedCSSText(false) 2009 { 2010 switch (e) { 2011 case TopToBottomWritingMode: 2012 m_value.ident = CSSValueHorizontalTb; 2013 break; 2014 case RightToLeftWritingMode: 2015 m_value.ident = CSSValueVerticalRl; 2016 break; 2017 case LeftToRightWritingMode: 2018 m_value.ident = CSSValueVerticalLr; 2019 break; 2020 case BottomToTopWritingMode: 2021 m_value.ident = CSSValueHorizontalBt; 2022 break; 2023 } 2024 } 2025 2026 template<> inline CSSPrimitiveValue::operator WritingMode() const 2027 { 2028 switch (m_value.ident) { 2029 case CSSValueHorizontalTb: 2030 return TopToBottomWritingMode; 2031 case CSSValueVerticalRl: 2032 return RightToLeftWritingMode; 2033 case CSSValueVerticalLr: 2034 return LeftToRightWritingMode; 2035 case CSSValueHorizontalBt: 2036 return BottomToTopWritingMode; 2037 2037 default: 2038 2038 ASSERT_NOT_REACHED(); 2039 return TopToBottom BlockFlow;2039 return TopToBottomWritingMode; 2040 2040 } 2041 2041 } … … 2704 2704 } 2705 2705 2706 template<> inline CSSPrimitiveValue::CSSPrimitiveValue( EWritingMode e)2706 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(SVGWritingMode e) 2707 2707 : m_type(CSS_IDENT) 2708 2708 , m_hasCachedCSSText(false) … … 2730 2730 } 2731 2731 2732 template<> inline CSSPrimitiveValue::operator EWritingMode() const2732 template<> inline CSSPrimitiveValue::operator SVGWritingMode() const 2733 2733 { 2734 2734 switch (m_value.ident) { -
trunk/WebCore/css/CSSProperty.cpp
r67882 r69220 43 43 enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide }; 44 44 45 static int resolveToPhysicalProperty(TextDirection direction, EBlockFlowDirection blockDirection, LogicalBoxSide logicalSide, const int* properties)45 static int resolveToPhysicalProperty(TextDirection direction, WritingMode writingMode, LogicalBoxSide logicalSide, const int* properties) 46 46 { 47 47 if (direction == LTR) { 48 if ( blockDirection == TopToBottomBlockFlow) {48 if (writingMode == TopToBottomWritingMode) { 49 49 // The common case. The logical and physical box sides match. 50 50 // Left = Start, Right = End, Before = Top, After = Bottom … … 52 52 } 53 53 54 if ( blockDirection == BottomToTopBlockFlow) {54 if (writingMode == BottomToTopWritingMode) { 55 55 // Start = Left, End = Right, Before = Bottom, After = Top. 56 56 switch (logicalSide) { … … 66 66 } 67 67 68 if ( blockDirection == LeftToRightBlockFlow) {68 if (writingMode == LeftToRightWritingMode) { 69 69 // Start = Top, End = Bottom, Before = Left, After = Right. 70 70 switch (logicalSide) { … … 93 93 } 94 94 95 if ( blockDirection == TopToBottomBlockFlow) {95 if (writingMode == TopToBottomWritingMode) { 96 96 // Start = Right, End = Left, Before = Top, After = Bottom 97 97 switch (logicalSide) { … … 107 107 } 108 108 109 if ( blockDirection == BottomToTopBlockFlow) {109 if (writingMode == BottomToTopWritingMode) { 110 110 // Start = Right, End = Left, Before = Bottom, After = Top 111 111 switch (logicalSide) { … … 121 121 } 122 122 123 if ( blockDirection == LeftToRightBlockFlow) {123 if (writingMode == LeftToRightWritingMode) { 124 124 // Start = Bottom, End = Top, Before = Left, After = Right 125 125 switch (logicalSide) { … … 150 150 enum LogicalExtent { LogicalWidth, LogicalHeight }; 151 151 152 static int resolveToPhysicalProperty( EBlockFlowDirection blockDirection, LogicalExtent logicalSide, const int* properties)153 { 154 if ( blockDirection == TopToBottomBlockFlow || blockDirection == BottomToTopBlockFlow)152 static int resolveToPhysicalProperty(WritingMode writingMode, LogicalExtent logicalSide, const int* properties) 153 { 154 if (writingMode == TopToBottomWritingMode || writingMode == BottomToTopWritingMode) 155 155 return properties[logicalSide]; 156 156 return logicalSide == LogicalWidth ? properties[1] : properties[0]; 157 157 } 158 158 159 int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection direction, EBlockFlowDirection blockDirection)159 int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection direction, WritingMode writingMode) 160 160 { 161 161 switch (static_cast<CSSPropertyID>(propertyID)) { 162 162 case CSSPropertyWebkitMarginEnd: { 163 163 const int properties[4] = { CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft }; 164 return resolveToPhysicalProperty(direction, blockDirection, EndSide, properties);164 return resolveToPhysicalProperty(direction, writingMode, EndSide, properties); 165 165 } 166 166 case CSSPropertyWebkitMarginStart: { 167 167 const int properties[4] = { CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft }; 168 return resolveToPhysicalProperty(direction, blockDirection, StartSide, properties);168 return resolveToPhysicalProperty(direction, writingMode, StartSide, properties); 169 169 } 170 170 case CSSPropertyWebkitMarginBefore: { 171 171 const int properties[4] = { CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft }; 172 return resolveToPhysicalProperty(direction, blockDirection, BeforeSide, properties);172 return resolveToPhysicalProperty(direction, writingMode, BeforeSide, properties); 173 173 } 174 174 case CSSPropertyWebkitMarginAfter: { 175 175 const int properties[4] = { CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft }; 176 return resolveToPhysicalProperty(direction, blockDirection, AfterSide, properties);176 return resolveToPhysicalProperty(direction, writingMode, AfterSide, properties); 177 177 } 178 178 case CSSPropertyWebkitPaddingEnd: { 179 179 const int properties[4] = { CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft }; 180 return resolveToPhysicalProperty(direction, blockDirection, EndSide, properties);180 return resolveToPhysicalProperty(direction, writingMode, EndSide, properties); 181 181 } 182 182 case CSSPropertyWebkitPaddingStart: { 183 183 const int properties[4] = { CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft }; 184 return resolveToPhysicalProperty(direction, blockDirection, StartSide, properties);184 return resolveToPhysicalProperty(direction, writingMode, StartSide, properties); 185 185 } 186 186 case CSSPropertyWebkitPaddingBefore: { 187 187 const int properties[4] = { CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft }; 188 return resolveToPhysicalProperty(direction, blockDirection, BeforeSide, properties);188 return resolveToPhysicalProperty(direction, writingMode, BeforeSide, properties); 189 189 } 190 190 case CSSPropertyWebkitPaddingAfter: { 191 191 const int properties[4] = { CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft }; 192 return resolveToPhysicalProperty(direction, blockDirection, AfterSide, properties);192 return resolveToPhysicalProperty(direction, writingMode, AfterSide, properties); 193 193 } 194 194 case CSSPropertyWebkitBorderEnd: { 195 195 const int properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft }; 196 return resolveToPhysicalProperty(direction, blockDirection, EndSide, properties);196 return resolveToPhysicalProperty(direction, writingMode, EndSide, properties); 197 197 } 198 198 case CSSPropertyWebkitBorderStart: { 199 199 const int properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft }; 200 return resolveToPhysicalProperty(direction, blockDirection, StartSide, properties);200 return resolveToPhysicalProperty(direction, writingMode, StartSide, properties); 201 201 } 202 202 case CSSPropertyWebkitBorderBefore: { 203 203 const int properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft }; 204 return resolveToPhysicalProperty(direction, blockDirection, BeforeSide, properties);204 return resolveToPhysicalProperty(direction, writingMode, BeforeSide, properties); 205 205 } 206 206 case CSSPropertyWebkitBorderAfter: { 207 207 const int properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft }; 208 return resolveToPhysicalProperty(direction, blockDirection, AfterSide, properties);208 return resolveToPhysicalProperty(direction, writingMode, AfterSide, properties); 209 209 } 210 210 case CSSPropertyWebkitBorderEndColor: { 211 211 const int properties[4] = { CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor }; 212 return resolveToPhysicalProperty(direction, blockDirection, EndSide, properties);212 return resolveToPhysicalProperty(direction, writingMode, EndSide, properties); 213 213 } 214 214 case CSSPropertyWebkitBorderStartColor: { 215 215 const int properties[4] = { CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor }; 216 return resolveToPhysicalProperty(direction, blockDirection, StartSide, properties);216 return resolveToPhysicalProperty(direction, writingMode, StartSide, properties); 217 217 } 218 218 case CSSPropertyWebkitBorderBeforeColor: { 219 219 const int properties[4] = { CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor }; 220 return resolveToPhysicalProperty(direction, blockDirection, BeforeSide, properties);220 return resolveToPhysicalProperty(direction, writingMode, BeforeSide, properties); 221 221 } 222 222 case CSSPropertyWebkitBorderAfterColor: { 223 223 const int properties[4] = { CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor }; 224 return resolveToPhysicalProperty(direction, blockDirection, AfterSide, properties);224 return resolveToPhysicalProperty(direction, writingMode, AfterSide, properties); 225 225 } 226 226 case CSSPropertyWebkitBorderEndStyle: { 227 227 const int properties[4] = { CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle }; 228 return resolveToPhysicalProperty(direction, blockDirection, EndSide, properties);228 return resolveToPhysicalProperty(direction, writingMode, EndSide, properties); 229 229 } 230 230 case CSSPropertyWebkitBorderStartStyle: { 231 231 const int properties[4] = { CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle }; 232 return resolveToPhysicalProperty(direction, blockDirection, StartSide, properties);232 return resolveToPhysicalProperty(direction, writingMode, StartSide, properties); 233 233 } 234 234 case CSSPropertyWebkitBorderBeforeStyle: { 235 235 const int properties[4] = { CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle }; 236 return resolveToPhysicalProperty(direction, blockDirection, BeforeSide, properties);236 return resolveToPhysicalProperty(direction, writingMode, BeforeSide, properties); 237 237 } 238 238 case CSSPropertyWebkitBorderAfterStyle: { 239 239 const int properties[4] = { CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle }; 240 return resolveToPhysicalProperty(direction, blockDirection, AfterSide, properties);240 return resolveToPhysicalProperty(direction, writingMode, AfterSide, properties); 241 241 } 242 242 case CSSPropertyWebkitBorderEndWidth: { 243 243 const int properties[4] = { CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth }; 244 return resolveToPhysicalProperty(direction, blockDirection, EndSide, properties);244 return resolveToPhysicalProperty(direction, writingMode, EndSide, properties); 245 245 } 246 246 case CSSPropertyWebkitBorderStartWidth: { 247 247 const int properties[4] = { CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth }; 248 return resolveToPhysicalProperty(direction, blockDirection, StartSide, properties);248 return resolveToPhysicalProperty(direction, writingMode, StartSide, properties); 249 249 } 250 250 case CSSPropertyWebkitBorderBeforeWidth: { 251 251 const int properties[4] = { CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth }; 252 return resolveToPhysicalProperty(direction, blockDirection, BeforeSide, properties);252 return resolveToPhysicalProperty(direction, writingMode, BeforeSide, properties); 253 253 } 254 254 case CSSPropertyWebkitBorderAfterWidth: { 255 255 const int properties[4] = { CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth }; 256 return resolveToPhysicalProperty(direction, blockDirection, AfterSide, properties);256 return resolveToPhysicalProperty(direction, writingMode, AfterSide, properties); 257 257 } 258 258 case CSSPropertyWebkitLogicalWidth: { 259 259 const int properties[2] = { CSSPropertyWidth, CSSPropertyHeight }; 260 return resolveToPhysicalProperty( blockDirection, LogicalWidth, properties);260 return resolveToPhysicalProperty(writingMode, LogicalWidth, properties); 261 261 } 262 262 case CSSPropertyWebkitLogicalHeight: { 263 263 const int properties[2] = { CSSPropertyWidth, CSSPropertyHeight }; 264 return resolveToPhysicalProperty( blockDirection, LogicalHeight, properties);264 return resolveToPhysicalProperty(writingMode, LogicalHeight, properties); 265 265 } 266 266 case CSSPropertyWebkitMinLogicalWidth: { 267 267 const int properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight }; 268 return resolveToPhysicalProperty( blockDirection, LogicalWidth, properties);268 return resolveToPhysicalProperty(writingMode, LogicalWidth, properties); 269 269 } 270 270 case CSSPropertyWebkitMinLogicalHeight: { 271 271 const int properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight }; 272 return resolveToPhysicalProperty( blockDirection, LogicalHeight, properties);272 return resolveToPhysicalProperty(writingMode, LogicalHeight, properties); 273 273 } 274 274 case CSSPropertyWebkitMaxLogicalWidth: { 275 275 const int properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight }; 276 return resolveToPhysicalProperty( blockDirection, LogicalWidth, properties);276 return resolveToPhysicalProperty(writingMode, LogicalWidth, properties); 277 277 } 278 278 case CSSPropertyWebkitMaxLogicalHeight: { 279 279 const int properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight }; 280 return resolveToPhysicalProperty( blockDirection, LogicalHeight, properties);280 return resolveToPhysicalProperty(writingMode, LogicalHeight, properties); 281 281 } 282 282 default: -
trunk/WebCore/css/CSSProperty.h
r67882 r69220 61 61 String cssText() const; 62 62 63 static int resolveDirectionAwareProperty(int propertyID, TextDirection, EBlockFlowDirection);63 static int resolveDirectionAwareProperty(int propertyID, TextDirection, WritingMode); 64 64 65 65 friend bool operator==(const CSSProperty&, const CSSProperty&); -
trunk/WebCore/css/CSSPropertyNames.in
r68680 r69220 21 21 font-weight 22 22 text-rendering 23 -webkit-block-flow24 23 -webkit-font-smoothing 25 24 -webkit-text-size-adjust -
trunk/WebCore/css/CSSStyleSelector.cpp
r68897 r69220 1111 1111 // Use the direction and block-flow of the document element to set the 1112 1112 // viewport's direction and block-flow. 1113 documentStyle->set BlockFlow(docElement->renderer()->style()->blockFlow());1113 documentStyle->setWritingMode(docElement->renderer()->style()->writingMode()); 1114 1114 documentStyle->setDirection(docElement->renderer()->style()->direction()); 1115 1115 } … … 1727 1727 // FIXME: Don't support this mutation for pseudo styles like first-letter or first-line, since it's not completely 1728 1728 // clear how that should work. 1729 if (style->display() == INLINE && style->styleType() == NOPSEUDO && parentStyle && style-> blockFlow() != parentStyle->blockFlow())1729 if (style->display() == INLINE && style->styleType() == NOPSEUDO && parentStyle && style->writingMode() != parentStyle->writingMode()) 1730 1730 style->setDisplay(INLINE_BLOCK); 1731 1731 … … 1739 1739 1740 1740 // FIXME: Since we don't support block-flow on either tables or flexible boxes yet, disallow setting 1741 // of block-flow to anything other than TopToBottom BlockFlow.1741 // of block-flow to anything other than TopToBottomWritingMode. 1742 1742 // https://bugs.webkit.org/show_bug.cgi?id=46417 - Tables support 1743 1743 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. 1744 if (style-> blockFlow() != TopToBottomBlockFlow&& (style->display() == TABLE || style->display() == INLINE_TABLE1744 if (style->writingMode() != TopToBottomWritingMode && (style->display() == TABLE || style->display() == INLINE_TABLE 1745 1745 || style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW_GROUP 1746 1746 || style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_ROW || style->display() == TABLE_CELL 1747 1747 || style->display() == BOX || style->display() == INLINE_BOX)) 1748 style->set BlockFlow(TopToBottomBlockFlow);1748 style->setWritingMode(TopToBottomWritingMode); 1749 1749 } 1750 1750 … … 2947 2947 if (applyFirst) { 2948 2948 COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property); 2949 COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 1 4, CSS_zoom_is_end_of_first_prop_range);2949 COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 13, CSS_zoom_is_end_of_first_prop_range); 2950 2950 COMPILE_ASSERT(CSSPropertyLineHeight == CSSPropertyZoom + 1, CSS_line_height_is_after_zoom); 2951 2951 … … 3135 3135 bool isInitial = valueType == CSSValue::CSS_INITIAL || (!m_parentNode && valueType == CSSValue::CSS_INHERIT); 3136 3136 3137 id = CSSProperty::resolveDirectionAwareProperty(id, m_style->direction(), m_style-> blockFlow());3137 id = CSSProperty::resolveDirectionAwareProperty(id, m_style->direction(), m_style->writingMode()); 3138 3138 3139 3139 if (m_checker.m_matchVisitedPseudoClass && !isValidVisitedLinkProperty(id)) { … … 5572 5572 5573 5573 // CSS Text Layout Module Level 3: Vertical writing support 5574 case CSSPropertyWebkitBlockFlow:5575 HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(blockFlow, BlockFlow)5576 return;5577 5578 5574 case CSSPropertyWebkitWritingMode: 5579 // The 'writing-mode' property is a shorthand property for the 'direction' property and the 'block-flow' property. 5580 if (isInherit) { 5581 m_style->setDirection(m_parentStyle->direction()); 5582 m_style->setBlockFlow(m_parentStyle->blockFlow()); 5583 } else if (isInitial) { 5584 m_style->setDirection(m_style->initialDirection()); 5585 m_style->setBlockFlow(m_style->initialBlockFlow()); 5586 } else { 5587 if (!primitiveValue) 5588 return; 5589 switch (primitiveValue->getIdent()) { 5590 case CSSValueLrTb: 5591 m_style->setDirection(LTR); 5592 m_style->setBlockFlow(TopToBottomBlockFlow); 5593 break; 5594 case CSSValueRlTb: 5595 m_style->setDirection(RTL); 5596 m_style->setBlockFlow(TopToBottomBlockFlow); 5597 break; 5598 case CSSValueTbRl: 5599 m_style->setDirection(LTR); 5600 m_style->setBlockFlow(RightToLeftBlockFlow); 5601 break; 5602 case CSSValueBtRl: 5603 m_style->setDirection(RTL); 5604 m_style->setBlockFlow(RightToLeftBlockFlow); 5605 break; 5606 case CSSValueTbLr: 5607 m_style->setDirection(LTR); 5608 m_style->setBlockFlow(LeftToRightBlockFlow); 5609 break; 5610 case CSSValueBtLr: 5611 m_style->setDirection(RTL); 5612 m_style->setBlockFlow(LeftToRightBlockFlow); 5613 break; 5614 default: 5615 break; 5616 } 5617 } 5575 HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(writingMode, WritingMode) 5618 5576 return; 5619 5577 -
trunk/WebCore/css/CSSValueKeywords.in
r68680 r69220 752 752 # auto 753 753 754 # -webkit-block-flow 754 # -webkit-writing-mode 755 # SVG compatibility 756 lr 757 rl 755 758 tb 756 rl757 lr758 bt759 760 # -webkit-writing-mode761 759 lr-tb 762 760 rl-tb 763 761 tb-rl 764 bt-rl 765 tb-lr 766 bt-lr 762 # Standard values from CSS3 763 horizontal-tb 764 vertical-rl 765 vertical-lr 766 horizontal-bt -
trunk/WebCore/rendering/RenderBlock.cpp
r69192 r69220 91 91 m_canCollapseWithChildren = !block->isRenderView() && !block->isRoot() && !block->isPositioned() 92 92 && !block->isFloating() && !block->isTableCell() && !block->hasOverflowClip() && !block->isInlineBlockOrInlineTable() 93 && !block->is BlockFlowRoot();93 && !block->isWritingModeRoot(); 94 94 95 95 m_canCollapseMarginBeforeWithChildren = m_canCollapseWithChildren && (beforeBorderPadding == 0) && block->style()->marginBeforeCollapse() != MSEPARATE; … … 1320 1320 { 1321 1321 return isInlineBlockOrInlineTable() || isFloatingOrPositioned() || hasOverflowClip() || (parent() && parent()->isFlexibleBox()) 1322 || hasColumns() || isTableCell() || isFieldset() || is BlockFlowRoot();1322 || hasColumns() || isTableCell() || isFieldset() || isWritingModeRoot(); 1323 1323 } 1324 1324 … … 1721 1721 void RenderBlock::setLogicalLeftForChild(RenderBox* child, int logicalLeft, ApplyLayoutDeltaMode applyDelta) 1722 1722 { 1723 if (style()->is VerticalBlockFlow()) {1723 if (style()->isHorizontalWritingMode()) { 1724 1724 if (applyDelta == ApplyLayoutDelta) 1725 1725 view()->addLayoutDelta(IntSize(child->x() - logicalLeft, 0)); … … 1734 1734 void RenderBlock::setLogicalTopForChild(RenderBox* child, int logicalTop, ApplyLayoutDeltaMode applyDelta) 1735 1735 { 1736 if (style()->is VerticalBlockFlow()) {1736 if (style()->isHorizontalWritingMode()) { 1737 1737 if (applyDelta == ApplyLayoutDelta) 1738 1738 view()->addLayoutDelta(IntSize(0, child->y() - logicalTop)); … … 1859 1859 if (markDescendantsWithFloats) 1860 1860 childRenderBlock->markAllDescendantsWithFloatsForLayout(); 1861 if (!child->is BlockFlowRoot())1861 if (!child->isWritingModeRoot()) 1862 1862 previousFloatLogicalBottom = max(previousFloatLogicalBottom, oldLogicalTop + childRenderBlock->lowestFloatLogicalBottom()); 1863 1863 } … … 2937 2937 // Just go ahead and lay out the float. 2938 2938 bool affectedByPagination = o->isRenderBlock() && view()->layoutState()->m_pageHeight; 2939 if (!affectedByPagination || is BlockFlowRoot()) // We are unsplittable if we're a block flow root.2939 if (!affectedByPagination || isWritingModeRoot()) // We are unsplittable if we're a block flow root. 2940 2940 o->layoutIfNeeded(); 2941 2941 else { … … 3721 3721 { 3722 3722 // Prevent floats from being added to the canvas by the root element, e.g., <html>. 3723 if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot() || child->hasColumns() || child->is BlockFlowRoot())3723 if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot() || child->hasColumns() || child->isWritingModeRoot()) 3724 3724 return 0; 3725 3725 … … 3736 3736 // If the object is not in the list, we add it now. 3737 3737 if (!containsFloat(r->m_renderer)) { 3738 int leftOffset = style()->is VerticalBlockFlow() ? logicalLeftOffset : logicalTopOffset;3739 int topOffset = style()->is VerticalBlockFlow() ? logicalTopOffset : logicalLeftOffset;3738 int leftOffset = style()->isHorizontalWritingMode() ? logicalLeftOffset : logicalTopOffset; 3739 int topOffset = style()->isHorizontalWritingMode() ? logicalTopOffset : logicalLeftOffset; 3740 3740 FloatingObject* floatingObj = new FloatingObject(r->type(), IntRect(r->left() - leftOffset, r->top() - topOffset, r->width(), r->height())); 3741 3741 floatingObj->m_renderer = r->m_renderer; … … 3778 3778 return; 3779 3779 3780 logicalLeftOffset += (style()->is VerticalBlockFlow() ? marginLeft() : marginTop());3780 logicalLeftOffset += (style()->isHorizontalWritingMode() ? marginLeft() : marginTop()); 3781 3781 3782 3782 DeprecatedPtrListIterator<FloatingObject> it(*prev->m_floatingObjects); … … 3795 3795 } 3796 3796 if (!f) { 3797 int leftOffset = style()->is VerticalBlockFlow() ? logicalLeftOffset : logicalTopOffset;3798 int topOffset = style()->is VerticalBlockFlow() ? logicalTopOffset : logicalLeftOffset;3797 int leftOffset = style()->isHorizontalWritingMode() ? logicalLeftOffset : logicalTopOffset; 3798 int topOffset = style()->isHorizontalWritingMode() ? logicalTopOffset : logicalLeftOffset; 3799 3799 3800 3800 FloatingObject* floatingObj = new FloatingObject(r->type(), IntRect(r->left() - leftOffset, r->top() - topOffset, r->width(), r->height())); … … 3806 3806 // will get applied twice. 3807 3807 if (prev != parent()) 3808 floatingObj->setLeft(floatingObj->left() + (style()->is VerticalBlockFlow() ? prev->marginLeft() : prev->marginTop()));3808 floatingObj->setLeft(floatingObj->left() + (style()->isHorizontalWritingMode() ? prev->marginLeft() : prev->marginTop())); 3809 3809 3810 3810 floatingObj->m_shouldPaint = false; // We are not in the direct inheritance chain for this float. We will never paint it. … … 5998 5998 // If the child has the same directionality as we do, then we can just return its 5999 5999 // collapsed margin. 6000 if (!child->is BlockFlowRoot())6000 if (!child->isWritingModeRoot()) 6001 6001 return child->collapsedMarginBefore(); 6002 6002 6003 6003 // The child has a different directionality. If the child is parallel, then it's just 6004 6004 // flipped relative to us. We can use the collapsed margin for the opposite edge. 6005 if (child->style()->is VerticalBlockFlow() == style()->isVerticalBlockFlow())6005 if (child->style()->isHorizontalWritingMode() == style()->isHorizontalWritingMode()) 6006 6006 return child->collapsedMarginAfter(); 6007 6007 … … 6015 6015 // If the child has the same directionality as we do, then we can just return its 6016 6016 // collapsed margin. 6017 if (!child->is BlockFlowRoot())6017 if (!child->isWritingModeRoot()) 6018 6018 return child->collapsedMarginAfter(); 6019 6019 6020 6020 // The child has a different directionality. If the child is parallel, then it's just 6021 6021 // flipped relative to us. We can use the collapsed margin for the opposite edge. 6022 if (child->style()->is VerticalBlockFlow() == style()->isVerticalBlockFlow())6022 if (child->style()->isHorizontalWritingMode() == style()->isHorizontalWritingMode()) 6023 6023 return child->collapsedMarginBefore(); 6024 6024 … … 6030 6030 int RenderBlock::marginBeforeForChild(RenderBoxModelObject* child) const 6031 6031 { 6032 switch (style()-> blockFlow()) {6033 case TopToBottom BlockFlow:6032 switch (style()->writingMode()) { 6033 case TopToBottomWritingMode: 6034 6034 return child->marginTop(); 6035 case BottomToTop BlockFlow:6035 case BottomToTopWritingMode: 6036 6036 return child->marginBottom(); 6037 case LeftToRight BlockFlow:6037 case LeftToRightWritingMode: 6038 6038 return child->marginLeft(); 6039 case RightToLeft BlockFlow:6039 case RightToLeftWritingMode: 6040 6040 return child->marginRight(); 6041 6041 } … … 6046 6046 int RenderBlock::marginAfterForChild(RenderBoxModelObject* child) const 6047 6047 { 6048 switch (style()-> blockFlow()) {6049 case TopToBottom BlockFlow:6048 switch (style()->writingMode()) { 6049 case TopToBottomWritingMode: 6050 6050 return child->marginBottom(); 6051 case BottomToTop BlockFlow:6051 case BottomToTopWritingMode: 6052 6052 return child->marginTop(); 6053 case LeftToRight BlockFlow:6053 case LeftToRightWritingMode: 6054 6054 return child->marginRight(); 6055 case RightToLeft BlockFlow:6055 case RightToLeftWritingMode: 6056 6056 return child->marginLeft(); 6057 6057 } … … 6062 6062 int RenderBlock::marginStartForChild(RenderBoxModelObject* child) const 6063 6063 { 6064 if (style()->is VerticalBlockFlow())6064 if (style()->isHorizontalWritingMode()) 6065 6065 return style()->isLeftToRightDirection() ? child->marginLeft() : child->marginRight(); 6066 6066 return style()->isLeftToRightDirection() ? child->marginTop() : child->marginBottom(); … … 6069 6069 int RenderBlock::marginEndForChild(RenderBoxModelObject* child) const 6070 6070 { 6071 if (style()->is VerticalBlockFlow())6071 if (style()->isHorizontalWritingMode()) 6072 6072 return style()->isLeftToRightDirection() ? child->marginRight() : child->marginLeft(); 6073 6073 return style()->isLeftToRightDirection() ? child->marginBottom() : child->marginTop(); … … 6076 6076 void RenderBlock::setMarginStartForChild(RenderBox* child, int margin) 6077 6077 { 6078 if (style()->is VerticalBlockFlow()) {6078 if (style()->isHorizontalWritingMode()) { 6079 6079 if (style()->isLeftToRightDirection()) 6080 6080 child->setMarginLeft(margin); … … 6091 6091 void RenderBlock::setMarginEndForChild(RenderBox* child, int margin) 6092 6092 { 6093 if (style()->is VerticalBlockFlow()) {6093 if (style()->isHorizontalWritingMode()) { 6094 6094 if (style()->isLeftToRightDirection()) 6095 6095 child->setMarginRight(margin); … … 6106 6106 void RenderBlock::setMarginBeforeForChild(RenderBox* child, int margin) 6107 6107 { 6108 switch (style()-> blockFlow()) {6109 case TopToBottom BlockFlow:6108 switch (style()->writingMode()) { 6109 case TopToBottomWritingMode: 6110 6110 child->setMarginTop(margin); 6111 6111 break; 6112 case BottomToTop BlockFlow:6112 case BottomToTopWritingMode: 6113 6113 child->setMarginBottom(margin); 6114 6114 break; 6115 case LeftToRight BlockFlow:6115 case LeftToRightWritingMode: 6116 6116 child->setMarginLeft(margin); 6117 6117 break; 6118 case RightToLeft BlockFlow:6118 case RightToLeftWritingMode: 6119 6119 child->setMarginRight(margin); 6120 6120 break; … … 6124 6124 void RenderBlock::setMarginAfterForChild(RenderBox* child, int margin) 6125 6125 { 6126 switch (style()-> blockFlow()) {6127 case TopToBottom BlockFlow:6126 switch (style()->writingMode()) { 6127 case TopToBottomWritingMode: 6128 6128 child->setMarginBottom(margin); 6129 6129 break; 6130 case BottomToTop BlockFlow:6130 case BottomToTopWritingMode: 6131 6131 child->setMarginTop(margin); 6132 6132 break; 6133 case LeftToRight BlockFlow:6133 case LeftToRightWritingMode: 6134 6134 child->setMarginRight(margin); 6135 6135 break; 6136 case RightToLeft BlockFlow:6136 case RightToLeftWritingMode: 6137 6137 child->setMarginLeft(margin); 6138 6138 break; … … 6154 6154 // If the child has the same directionality as we do, then we can just return its 6155 6155 // margins in the same direction. 6156 if (!child->is BlockFlowRoot()) {6156 if (!child->isWritingModeRoot()) { 6157 6157 if (childRenderBlock) { 6158 6158 childBeforePositive = childRenderBlock->maxPositiveMarginBefore(); … … 6164 6164 afterMargin = child->marginAfter(); 6165 6165 } 6166 } else if (child->style()->is VerticalBlockFlow() == style()->isVerticalBlockFlow()) {6166 } else if (child->style()->isHorizontalWritingMode() == style()->isHorizontalWritingMode()) { 6167 6167 // The child has a different directionality. If the child is parallel, then it's just 6168 6168 // flipped relative to us. We can use the margins for the opposite edges. -
trunk/WebCore/rendering/RenderBlock.h
r69184 r69220 172 172 // Accessors for logical width/height and margins in the containing block's block-flow direction. 173 173 enum ApplyLayoutDeltaMode { ApplyLayoutDelta, DoNotApplyLayoutDelta }; 174 int logicalWidthForChild(RenderBox* child) { return style()->is VerticalBlockFlow() ? child->width() : child->height(); }175 int logicalHeightForChild(RenderBox* child) { return style()->is VerticalBlockFlow() ? child->height() : child->width(); }176 int logicalTopForChild(RenderBox* child) { return style()->is VerticalBlockFlow() ? child->y() : child->x(); }174 int logicalWidthForChild(RenderBox* child) { return style()->isHorizontalWritingMode() ? child->width() : child->height(); } 175 int logicalHeightForChild(RenderBox* child) { return style()->isHorizontalWritingMode() ? child->height() : child->width(); } 176 int logicalTopForChild(RenderBox* child) { return style()->isHorizontalWritingMode() ? child->y() : child->x(); } 177 177 void setLogicalLeftForChild(RenderBox* child, int logicalLeft, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta); 178 178 void setLogicalTopForChild(RenderBox* child, int logicalTop, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta); … … 264 264 virtual void paintObject(PaintInfo&, int tx, int ty); 265 265 266 int logicalRightOffsetForContent() const { return style()->is VerticalBlockFlow() ? borderLeft() + paddingLeft() + availableLogicalWidth() : borderTop() + paddingTop() + availableLogicalWidth(); }267 int logicalLeftOffsetForContent() const { return style()->is VerticalBlockFlow() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }266 int logicalRightOffsetForContent() const { return style()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() + availableLogicalWidth() : borderTop() + paddingTop() + availableLogicalWidth(); } 267 int logicalLeftOffsetForContent() const { return style()->isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } 268 268 int logicalRightOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const; 269 269 int logicalLeftOffsetForLine(int position, int fixedOffset, bool applyTextIndent = true, int* logicalHeightRemaining = 0) const; … … 415 415 }; 416 416 417 int logicalTopForFloat(FloatingObject* child) const { return style()->is VerticalBlockFlow() ? child->top() : child->left(); }418 int logicalBottomForFloat(FloatingObject* child) const { return style()->is VerticalBlockFlow() ? child->bottom() : child->right(); }419 int logicalLeftForFloat(FloatingObject* child) const { return style()->is VerticalBlockFlow() ? child->left() : child->top(); }420 int logicalRightForFloat(FloatingObject* child) const { return style()->is VerticalBlockFlow() ? child->right() : child->bottom(); }421 int logicalWidthForFloat(FloatingObject* child) const { return style()->is VerticalBlockFlow() ? child->width() : child->height(); }417 int logicalTopForFloat(FloatingObject* child) const { return style()->isHorizontalWritingMode() ? child->top() : child->left(); } 418 int logicalBottomForFloat(FloatingObject* child) const { return style()->isHorizontalWritingMode() ? child->bottom() : child->right(); } 419 int logicalLeftForFloat(FloatingObject* child) const { return style()->isHorizontalWritingMode() ? child->left() : child->top(); } 420 int logicalRightForFloat(FloatingObject* child) const { return style()->isHorizontalWritingMode() ? child->right() : child->bottom(); } 421 int logicalWidthForFloat(FloatingObject* child) const { return style()->isHorizontalWritingMode() ? child->width() : child->height(); } 422 422 void setLogicalTopForFloat(FloatingObject* child, int logicalTop) 423 423 { 424 if (style()->is VerticalBlockFlow())424 if (style()->isHorizontalWritingMode()) 425 425 child->setTop(logicalTop); 426 426 else … … 429 429 void setLogicalLeftForFloat(FloatingObject* child, int logicalLeft) 430 430 { 431 if (style()->is VerticalBlockFlow())431 if (style()->isHorizontalWritingMode()) 432 432 child->setLeft(logicalLeft); 433 433 else … … 436 436 void setLogicalHeightForFloat(FloatingObject* child, int logicalHeight) 437 437 { 438 if (style()->is VerticalBlockFlow())438 if (style()->isHorizontalWritingMode()) 439 439 child->setHeight(logicalHeight); 440 440 else … … 443 443 void setLogicalWidthForFloat(FloatingObject* child, int logicalWidth) 444 444 { 445 if (style()->is VerticalBlockFlow())445 if (style()->isHorizontalWritingMode()) 446 446 child->setWidth(logicalWidth); 447 447 else -
trunk/WebCore/rendering/RenderBox.cpp
r69192 r69220 86 86 int RenderBox::marginBefore() const 87 87 { 88 switch (style()-> blockFlow()) {89 case TopToBottom BlockFlow:88 switch (style()->writingMode()) { 89 case TopToBottomWritingMode: 90 90 return m_marginTop; 91 case BottomToTop BlockFlow:91 case BottomToTopWritingMode: 92 92 return m_marginBottom; 93 case LeftToRight BlockFlow:93 case LeftToRightWritingMode: 94 94 return m_marginLeft; 95 case RightToLeft BlockFlow:95 case RightToLeftWritingMode: 96 96 return m_marginRight; 97 97 } … … 102 102 int RenderBox::marginAfter() const 103 103 { 104 switch (style()-> blockFlow()) {105 case TopToBottom BlockFlow:104 switch (style()->writingMode()) { 105 case TopToBottomWritingMode: 106 106 return m_marginBottom; 107 case BottomToTop BlockFlow:107 case BottomToTopWritingMode: 108 108 return m_marginTop; 109 case LeftToRight BlockFlow:109 case LeftToRightWritingMode: 110 110 return m_marginRight; 111 case RightToLeft BlockFlow:111 case RightToLeftWritingMode: 112 112 return m_marginLeft; 113 113 } … … 118 118 int RenderBox::marginStart() const 119 119 { 120 if (style()->is VerticalBlockFlow())120 if (style()->isHorizontalWritingMode()) 121 121 return style()->isLeftToRightDirection() ? m_marginLeft : m_marginRight; 122 122 return style()->isLeftToRightDirection() ? m_marginTop : m_marginBottom; … … 125 125 int RenderBox::marginEnd() const 126 126 { 127 if (style()->is VerticalBlockFlow())127 if (style()->isHorizontalWritingMode()) 128 128 return style()->isLeftToRightDirection() ? m_marginRight : m_marginLeft; 129 129 return style()->isLeftToRightDirection() ? m_marginBottom : m_marginTop; … … 132 132 void RenderBox::setMarginStart(int margin) 133 133 { 134 if (style()->is VerticalBlockFlow()) {134 if (style()->isHorizontalWritingMode()) { 135 135 if (style()->isLeftToRightDirection()) 136 136 m_marginLeft = margin; … … 147 147 void RenderBox::setMarginEnd(int margin) 148 148 { 149 if (style()->is VerticalBlockFlow()) {149 if (style()->isHorizontalWritingMode()) { 150 150 if (style()->isLeftToRightDirection()) 151 151 m_marginRight = margin; … … 162 162 void RenderBox::setMarginBefore(int margin) 163 163 { 164 switch (style()-> blockFlow()) {165 case TopToBottom BlockFlow:164 switch (style()->writingMode()) { 165 case TopToBottomWritingMode: 166 166 m_marginTop = margin; 167 167 break; 168 case BottomToTop BlockFlow:168 case BottomToTopWritingMode: 169 169 m_marginBottom = margin; 170 170 break; 171 case LeftToRight BlockFlow:171 case LeftToRightWritingMode: 172 172 m_marginLeft = margin; 173 173 break; 174 case RightToLeft BlockFlow:174 case RightToLeftWritingMode: 175 175 m_marginRight = margin; 176 176 break; … … 180 180 void RenderBox::setMarginAfter(int margin) 181 181 { 182 switch (style()-> blockFlow()) {183 case TopToBottom BlockFlow:182 switch (style()->writingMode()) { 183 case TopToBottomWritingMode: 184 184 m_marginBottom = margin; 185 185 break; 186 case BottomToTop BlockFlow:186 case BottomToTopWritingMode: 187 187 m_marginTop = margin; 188 188 break; 189 case LeftToRight BlockFlow:189 case LeftToRightWritingMode: 190 190 m_marginRight = margin; 191 191 break; 192 case RightToLeft BlockFlow:192 case RightToLeftWritingMode: 193 193 m_marginLeft = margin; 194 194 break; … … 301 301 if (isBody()) 302 302 document()->setTextColor(style()->visitedDependentColor(CSSPropertyColor)); 303 else if (isRoot() && (!oldStyle || oldStyle-> blockFlow() != style()->blockFlow() || oldStyle->direction() != style()->direction())) {303 else if (isRoot() && (!oldStyle || oldStyle->writingMode() != style()->writingMode() || oldStyle->direction() != style()->direction())) { 304 304 // Propagate the new block flow and direction up to the RenderView. 305 305 // FIXME: WinIE seems to propagate from the <body> as well. We may want to consider doing that at some point. 306 306 RenderView* viewRenderer = view(); 307 307 RenderStyle* viewStyle = viewRenderer->style(); 308 if (viewStyle-> blockFlow() != style()->blockFlow() || viewStyle->direction() != style()->direction()) {309 viewStyle->set BlockFlow(style()->blockFlow());308 if (viewStyle->writingMode() != style()->writingMode() || viewStyle->direction() != style()->direction()) { 309 viewStyle->setWritingMode(style()->writingMode()); 310 310 viewStyle->setDirection(style()->direction()); 311 311 viewRenderer->setNeedsLayoutAndPrefWidthsRecalc(); … … 1100 1100 // as a constraint. We do that for now as well even though it's likely being unconstrained is what the spec 1101 1101 // will decide. 1102 return containingBlockStyle->is VerticalBlockFlow() ? view()->frameView()->visibleHeight() : view()->frameView()->visibleWidth();1102 return containingBlockStyle->isHorizontalWritingMode() ? view()->frameView()->visibleHeight() : view()->frameView()->visibleWidth(); 1103 1103 } 1104 1104 … … 1444 1444 RenderBlock* cb = containingBlock(); 1445 1445 int containerLogicalWidth = max(0, containingBlockLogicalWidthForContent()); 1446 bool hasPerpendicularContainingBlock = cb->style()->is VerticalBlockFlow() != style()->isVerticalBlockFlow();1446 bool hasPerpendicularContainingBlock = cb->style()->isHorizontalWritingMode() != style()->isHorizontalWritingMode(); 1447 1447 int containerWidthInInlineDirection = containerLogicalWidth; 1448 1448 if (hasPerpendicularContainingBlock) … … 1619 1619 } else { 1620 1620 RenderBlock* cb = containingBlock(); 1621 bool hasPerpendicularContainingBlock = cb->style()->is VerticalBlockFlow() != style()->isVerticalBlockFlow();1621 bool hasPerpendicularContainingBlock = cb->style()->isHorizontalWritingMode() != style()->isHorizontalWritingMode(); 1622 1622 1623 1623 if (!hasPerpendicularContainingBlock) … … 1700 1700 visHeight = static_cast<int>(view()->pageHeight()); 1701 1701 else { 1702 if (style()->is VerticalBlockFlow())1702 if (style()->isHorizontalWritingMode()) 1703 1703 visHeight = view()->viewHeight(); 1704 1704 else … … 1908 1908 1909 1909 if (isRenderView()) 1910 return style()->is VerticalBlockFlow() ? toRenderView(this)->frameView()->visibleHeight() : toRenderView(this)->frameView()->visibleWidth();1910 return style()->isHorizontalWritingMode() ? toRenderView(this)->frameView()->visibleHeight() : toRenderView(this)->frameView()->visibleWidth(); 1911 1911 1912 1912 // We need to stop here, since we don't want to increase the height of the table … … 3039 3039 bool RenderBox::avoidsFloats() const 3040 3040 { 3041 return isReplaced() || hasOverflowClip() || isHR() || is BlockFlowRoot();3041 return isReplaced() || hasOverflowClip() || isHR() || isWritingModeRoot(); 3042 3042 } 3043 3043 -
trunk/WebCore/rendering/RenderBox.h
r68917 r69220 51 51 void setHeight(int height) { m_frameRect.setHeight(height); } 52 52 53 int logicalLeft() const { return style()->is VerticalBlockFlow() ? x() : y(); }54 int logicalTop() const { return style()->is VerticalBlockFlow() ? y() : x(); }55 int logicalWidth() const { return style()->is VerticalBlockFlow() ? width() : height(); }56 int logicalHeight() const { return style()->is VerticalBlockFlow() ? height() : width(); }53 int logicalLeft() const { return style()->isHorizontalWritingMode() ? x() : y(); } 54 int logicalTop() const { return style()->isHorizontalWritingMode() ? y() : x(); } 55 int logicalWidth() const { return style()->isHorizontalWritingMode() ? width() : height(); } 56 int logicalHeight() const { return style()->isHorizontalWritingMode() ? height() : width(); } 57 57 void setLogicalLeft(int left) 58 58 { 59 if (style()->is VerticalBlockFlow())59 if (style()->isHorizontalWritingMode()) 60 60 setX(left); 61 61 else … … 64 64 void setLogicalTop(int top) 65 65 { 66 if (style()->is VerticalBlockFlow())66 if (style()->isHorizontalWritingMode()) 67 67 setY(top); 68 68 else … … 71 71 void setLogicalWidth(int size) 72 72 { 73 if (style()->is VerticalBlockFlow())73 if (style()->isHorizontalWritingMode()) 74 74 setWidth(size); 75 75 else … … 78 78 void setLogicalHeight(int size) 79 79 { 80 if (style()->is VerticalBlockFlow())80 if (style()->isHorizontalWritingMode()) 81 81 setHeight(size); 82 82 else … … 85 85 void setLogicalLocation(int left, int top) 86 86 { 87 if (style()->is VerticalBlockFlow())87 if (style()->isHorizontalWritingMode()) 88 88 setLocation(left, top); 89 89 else … … 151 151 int contentWidth() const { return clientWidth() - paddingLeft() - paddingRight(); } 152 152 int contentHeight() const { return clientHeight() - paddingTop() - paddingBottom(); } 153 int contentLogicalWidth() const { return style()->is VerticalBlockFlow() ? contentWidth() : contentHeight(); }154 int contentLogicalHeight() const { return style()->is VerticalBlockFlow() ? contentHeight() : contentWidth(); }153 int contentLogicalWidth() const { return style()->isHorizontalWritingMode() ? contentWidth() : contentHeight(); } 154 int contentLogicalHeight() const { return style()->isHorizontalWritingMode() ? contentHeight() : contentWidth(); } 155 155 156 156 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines (RenderFlow) … … 273 273 bool stretchesToViewport() const 274 274 { 275 return document()->inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrPositioned() && (isRoot() || isBody()) && !is BlockFlowRoot();275 return document()->inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrPositioned() && (isRoot() || isBody()) && !isWritingModeRoot(); 276 276 } 277 277 278 278 virtual IntSize intrinsicSize() const { return IntSize(); } 279 int intrinsicLogicalWidth() const { return style()->is VerticalBlockFlow() ? intrinsicSize().width() : intrinsicSize().height(); }280 int intrinsicLogicalHeight() const { return style()->is VerticalBlockFlow() ? intrinsicSize().height() : intrinsicSize().width(); }279 int intrinsicLogicalWidth() const { return style()->isHorizontalWritingMode() ? intrinsicSize().width() : intrinsicSize().height(); } 280 int intrinsicLogicalHeight() const { return style()->isHorizontalWritingMode() ? intrinsicSize().height() : intrinsicSize().width(); } 281 281 282 282 // Whether or not the element shrinks to its intrinsic width (rather than filling the width … … 302 302 // There are a few cases where we need to refer specifically to the available physical width and available physical height. 303 303 // Relative positioning is one of those cases, since left/top offsets are physical. 304 int availableWidth() const { return style()->is VerticalBlockFlow() ? availableLogicalWidth() : availableLogicalHeight(); }305 int availableHeight() const { return style()->is VerticalBlockFlow() ? availableLogicalHeight() : availableLogicalWidth(); }304 int availableWidth() const { return style()->isHorizontalWritingMode() ? availableLogicalWidth() : availableLogicalHeight(); } 305 int availableHeight() const { return style()->isHorizontalWritingMode() ? availableLogicalHeight() : availableLogicalWidth(); } 306 306 307 307 virtual int verticalScrollbarWidth() const; 308 308 int horizontalScrollbarHeight() const; 309 int scrollbarLogicalHeight() const { return style()->is VerticalBlockFlow() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }309 int scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); } 310 310 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0); 311 311 bool canBeScrolledAndHasScrollableArea() const; … … 361 361 virtual void markDescendantBlocksAndLinesForLayout(bool inLayout = true); 362 362 363 bool is BlockFlowRoot() const { return !parent() || parent()->style()->blockFlow() != style()->blockFlow(); }363 bool isWritingModeRoot() const { return !parent() || parent()->style()->writingMode() != style()->writingMode(); } 364 364 365 365 protected: -
trunk/WebCore/rendering/RenderFieldset.cpp
r69184 r69220 142 142 // cases the legend is embedded in the right and bottom borders respectively. 143 143 // https://bugs.webkit.org/show_bug.cgi?id=47236 144 if (style()->is VerticalBlockFlow()) {144 if (style()->isHorizontalWritingMode()) { 145 145 int yOff = (legend->y() > 0) ? 0 : (legend->height() - borderTop()) / 2; 146 146 h -= yOff; … … 167 167 // cases the legend is embedded in the right and bottom borders respectively. 168 168 // https://bugs.webkit.org/show_bug.cgi?id=47236 169 if (style()->is VerticalBlockFlow()) {169 if (style()->isHorizontalWritingMode()) { 170 170 int clipTop = ty; 171 171 int clipHeight = max(static_cast<int>(style()->borderTopWidth()), legend->height()); … … 196 196 // cases the legend is embedded in the right and bottom borders respectively. 197 197 // https://bugs.webkit.org/show_bug.cgi?id=47236 198 if (style()->is VerticalBlockFlow()) {198 if (style()->isHorizontalWritingMode()) { 199 199 int yOff = (legend->y() > 0) ? 0 : (legend->height() - borderTop()) / 2; 200 200 h -= yOff; -
trunk/WebCore/rendering/RenderImage.cpp
r68917 r69220 443 443 else if (m_imageResource->usesImageContainerSize()) { 444 444 IntSize size = m_imageResource->imageSize(style()->effectiveZoom()); 445 logicalWidth = style()->is VerticalBlockFlow() ? size.width() : size.height();445 logicalWidth = style()->isHorizontalWritingMode() ? size.width() : size.height(); 446 446 } else if (m_imageResource->imageHasRelativeWidth()) 447 447 logicalWidth = 0; // If the image is relatively-sized, set the width to 0 until there is a set container size. … … 462 462 else if (m_imageResource->usesImageContainerSize()) { 463 463 IntSize size = m_imageResource->imageSize(style()->effectiveZoom()); 464 logicalHeight = style()->is VerticalBlockFlow() ? size.height() : size.width();464 logicalHeight = style()->isHorizontalWritingMode() ? size.height() : size.width(); 465 465 } else if (m_imageResource->imageHasRelativeHeight()) 466 466 logicalHeight = 0; // If the image is relatively-sized, set the height to 0 until there is a set container size. -
trunk/WebCore/rendering/RenderInline.cpp
r68177 r69220 472 472 int RenderInline::marginLeft() const 473 473 { 474 if (!style()->is VerticalBlockFlow())474 if (!style()->isHorizontalWritingMode()) 475 475 return 0; 476 476 return computeMargin(this, style()->marginLeft()); … … 479 479 int RenderInline::marginRight() const 480 480 { 481 if (!style()->is VerticalBlockFlow())481 if (!style()->isHorizontalWritingMode()) 482 482 return 0; 483 483 return computeMargin(this, style()->marginRight()); … … 486 486 int RenderInline::marginTop() const 487 487 { 488 if (style()->is VerticalBlockFlow())488 if (style()->isHorizontalWritingMode()) 489 489 return 0; 490 490 return computeMargin(this, style()->marginTop()); … … 493 493 int RenderInline::marginBottom() const 494 494 { 495 if (style()->is VerticalBlockFlow())495 if (style()->isHorizontalWritingMode()) 496 496 return 0; 497 497 return computeMargin(this, style()->marginBottom()); -
trunk/WebCore/rendering/RenderTableCell.cpp
r68817 r69220 166 166 { 167 167 int result = RenderBlock::paddingTop(); 168 if (!includeIntrinsicPadding || !style()->is VerticalBlockFlow())168 if (!includeIntrinsicPadding || !style()->isHorizontalWritingMode()) 169 169 return result; 170 return result + (style()-> blockFlow() == TopToBottomBlockFlow? intrinsicPaddingBefore() : intrinsicPaddingAfter());170 return result + (style()->writingMode() == TopToBottomWritingMode ? intrinsicPaddingBefore() : intrinsicPaddingAfter()); 171 171 } 172 172 … … 174 174 { 175 175 int result = RenderBlock::paddingBottom(); 176 if (!includeIntrinsicPadding || !style()->is VerticalBlockFlow())176 if (!includeIntrinsicPadding || !style()->isHorizontalWritingMode()) 177 177 return result; 178 return result + (style()-> blockFlow() == TopToBottomBlockFlow? intrinsicPaddingAfter() : intrinsicPaddingBefore());178 return result + (style()->writingMode() == TopToBottomWritingMode ? intrinsicPaddingAfter() : intrinsicPaddingBefore()); 179 179 } 180 180 … … 182 182 { 183 183 int result = RenderBlock::paddingLeft(); 184 if (!includeIntrinsicPadding || style()->is VerticalBlockFlow())184 if (!includeIntrinsicPadding || style()->isHorizontalWritingMode()) 185 185 return result; 186 return result + (style()-> blockFlow() == LeftToRightBlockFlow? intrinsicPaddingBefore() : intrinsicPaddingAfter());186 return result + (style()->writingMode() == LeftToRightWritingMode ? intrinsicPaddingBefore() : intrinsicPaddingAfter()); 187 187 188 188 } … … 191 191 { 192 192 int result = RenderBlock::paddingRight(); 193 if (!includeIntrinsicPadding || style()->is VerticalBlockFlow())193 if (!includeIntrinsicPadding || style()->isHorizontalWritingMode()) 194 194 return result; 195 return result + (style()-> blockFlow() == LeftToRightBlockFlow? intrinsicPaddingAfter() : intrinsicPaddingBefore());195 return result + (style()->writingMode() == LeftToRightWritingMode ? intrinsicPaddingAfter() : intrinsicPaddingBefore()); 196 196 } 197 197 -
trunk/WebCore/rendering/RenderView.h
r68436 r69220 55 55 int viewHeight() const; 56 56 int viewWidth() const; 57 int viewLogicalWidth() const { return style()->is VerticalBlockFlow() ? viewWidth() : viewHeight(); }58 int viewLogicalHeight() const { return style()->is VerticalBlockFlow() ? viewHeight() : viewWidth(); }57 int viewLogicalWidth() const { return style()->isHorizontalWritingMode() ? viewWidth() : viewHeight(); } 58 int viewLogicalHeight() const { return style()->isHorizontalWritingMode() ? viewHeight() : viewWidth(); } 59 59 60 60 float zoomFactor() const; -
trunk/WebCore/rendering/RootInlineBox.cpp
r68282 r69220 48 48 , m_paginationStrut(0) 49 49 { 50 setIsVertical(!block->style()->is VerticalBlockFlow());50 setIsVertical(!block->style()->isHorizontalWritingMode()); 51 51 } 52 52 -
trunk/WebCore/rendering/style/RenderStyle.cpp
r68976 r69220 447 447 448 448 // Check block flow direction. 449 if (inherited_flags. _blockFlow != other->inherited_flags._blockFlow)449 if (inherited_flags.m_writingMode != other->inherited_flags.m_writingMode) 450 450 return StyleDifferenceLayout; 451 451 … … 1080 1080 Length RenderStyle::logicalWidth() const 1081 1081 { 1082 if (is VerticalBlockFlow())1082 if (isHorizontalWritingMode()) 1083 1083 return width(); 1084 1084 return height(); … … 1087 1087 Length RenderStyle::logicalHeight() const 1088 1088 { 1089 if (is VerticalBlockFlow())1089 if (isHorizontalWritingMode()) 1090 1090 return height(); 1091 1091 return width(); … … 1094 1094 Length RenderStyle::logicalMinWidth() const 1095 1095 { 1096 if (is VerticalBlockFlow())1096 if (isHorizontalWritingMode()) 1097 1097 return minWidth(); 1098 1098 return minHeight(); … … 1101 1101 Length RenderStyle::logicalMaxWidth() const 1102 1102 { 1103 if (is VerticalBlockFlow())1103 if (isHorizontalWritingMode()) 1104 1104 return maxWidth(); 1105 1105 return maxHeight(); … … 1108 1108 Length RenderStyle::logicalMinHeight() const 1109 1109 { 1110 if (is VerticalBlockFlow())1110 if (isHorizontalWritingMode()) 1111 1111 return minHeight(); 1112 1112 return minWidth(); … … 1115 1115 Length RenderStyle::logicalMaxHeight() const 1116 1116 { 1117 if (is VerticalBlockFlow())1117 if (isHorizontalWritingMode()) 1118 1118 return maxHeight(); 1119 1119 return maxWidth(); … … 1122 1122 unsigned short RenderStyle::borderBeforeWidth() const 1123 1123 { 1124 switch ( blockFlow()) {1125 case TopToBottom BlockFlow:1124 switch (writingMode()) { 1125 case TopToBottomWritingMode: 1126 1126 return borderTopWidth(); 1127 case BottomToTop BlockFlow:1127 case BottomToTopWritingMode: 1128 1128 return borderBottomWidth(); 1129 case LeftToRight BlockFlow:1129 case LeftToRightWritingMode: 1130 1130 return borderLeftWidth(); 1131 case RightToLeft BlockFlow:1131 case RightToLeftWritingMode: 1132 1132 return borderRightWidth(); 1133 1133 } … … 1138 1138 unsigned short RenderStyle::borderAfterWidth() const 1139 1139 { 1140 switch ( blockFlow()) {1141 case TopToBottom BlockFlow:1140 switch (writingMode()) { 1141 case TopToBottomWritingMode: 1142 1142 return borderBottomWidth(); 1143 case BottomToTop BlockFlow:1143 case BottomToTopWritingMode: 1144 1144 return borderTopWidth(); 1145 case LeftToRight BlockFlow:1145 case LeftToRightWritingMode: 1146 1146 return borderRightWidth(); 1147 case RightToLeft BlockFlow:1147 case RightToLeftWritingMode: 1148 1148 return borderLeftWidth(); 1149 1149 } … … 1154 1154 unsigned short RenderStyle::borderStartWidth() const 1155 1155 { 1156 if (is VerticalBlockFlow())1156 if (isHorizontalWritingMode()) 1157 1157 return isLeftToRightDirection() ? borderLeftWidth() : borderRightWidth(); 1158 1158 return isLeftToRightDirection() ? borderTopWidth() : borderBottomWidth(); … … 1161 1161 unsigned short RenderStyle::borderEndWidth() const 1162 1162 { 1163 if (is VerticalBlockFlow())1163 if (isHorizontalWritingMode()) 1164 1164 return isLeftToRightDirection() ? borderRightWidth() : borderLeftWidth(); 1165 1165 return isLeftToRightDirection() ? borderBottomWidth() : borderTopWidth(); … … 1168 1168 Length RenderStyle::marginBefore() const 1169 1169 { 1170 switch ( blockFlow()) {1171 case TopToBottom BlockFlow:1170 switch (writingMode()) { 1171 case TopToBottomWritingMode: 1172 1172 return marginTop(); 1173 case BottomToTop BlockFlow:1173 case BottomToTopWritingMode: 1174 1174 return marginBottom(); 1175 case LeftToRight BlockFlow:1175 case LeftToRightWritingMode: 1176 1176 return marginLeft(); 1177 case RightToLeft BlockFlow:1177 case RightToLeftWritingMode: 1178 1178 return marginRight(); 1179 1179 } … … 1184 1184 Length RenderStyle::marginAfter() const 1185 1185 { 1186 switch ( blockFlow()) {1187 case TopToBottom BlockFlow:1186 switch (writingMode()) { 1187 case TopToBottomWritingMode: 1188 1188 return marginBottom(); 1189 case BottomToTop BlockFlow:1189 case BottomToTopWritingMode: 1190 1190 return marginTop(); 1191 case LeftToRight BlockFlow:1191 case LeftToRightWritingMode: 1192 1192 return marginRight(); 1193 case RightToLeft BlockFlow:1193 case RightToLeftWritingMode: 1194 1194 return marginLeft(); 1195 1195 } … … 1200 1200 Length RenderStyle::marginBeforeUsing(const RenderStyle* otherStyle) const 1201 1201 { 1202 switch (otherStyle-> blockFlow()) {1203 case TopToBottom BlockFlow:1202 switch (otherStyle->writingMode()) { 1203 case TopToBottomWritingMode: 1204 1204 return marginTop(); 1205 case BottomToTop BlockFlow:1205 case BottomToTopWritingMode: 1206 1206 return marginBottom(); 1207 case LeftToRight BlockFlow:1207 case LeftToRightWritingMode: 1208 1208 return marginLeft(); 1209 case RightToLeft BlockFlow:1209 case RightToLeftWritingMode: 1210 1210 return marginRight(); 1211 1211 } … … 1216 1216 Length RenderStyle::marginAfterUsing(const RenderStyle* otherStyle) const 1217 1217 { 1218 switch (otherStyle-> blockFlow()) {1219 case TopToBottom BlockFlow:1218 switch (otherStyle->writingMode()) { 1219 case TopToBottomWritingMode: 1220 1220 return marginBottom(); 1221 case BottomToTop BlockFlow:1221 case BottomToTopWritingMode: 1222 1222 return marginTop(); 1223 case LeftToRight BlockFlow:1223 case LeftToRightWritingMode: 1224 1224 return marginRight(); 1225 case RightToLeft BlockFlow:1225 case RightToLeftWritingMode: 1226 1226 return marginLeft(); 1227 1227 } … … 1232 1232 Length RenderStyle::marginStart() const 1233 1233 { 1234 if (is VerticalBlockFlow())1234 if (isHorizontalWritingMode()) 1235 1235 return isLeftToRightDirection() ? marginLeft() : marginRight(); 1236 1236 return isLeftToRightDirection() ? marginTop() : marginBottom(); … … 1239 1239 Length RenderStyle::marginEnd() const 1240 1240 { 1241 if (is VerticalBlockFlow())1241 if (isHorizontalWritingMode()) 1242 1242 return isLeftToRightDirection() ? marginRight() : marginLeft(); 1243 1243 return isLeftToRightDirection() ? marginBottom() : marginTop(); … … 1246 1246 Length RenderStyle::marginStartUsing(const RenderStyle* otherStyle) const 1247 1247 { 1248 if (otherStyle->is VerticalBlockFlow())1248 if (otherStyle->isHorizontalWritingMode()) 1249 1249 return otherStyle->isLeftToRightDirection() ? marginLeft() : marginRight(); 1250 1250 return otherStyle->isLeftToRightDirection() ? marginTop() : marginBottom(); … … 1253 1253 Length RenderStyle::marginEndUsing(const RenderStyle* otherStyle) const 1254 1254 { 1255 if (otherStyle->is VerticalBlockFlow())1255 if (otherStyle->isHorizontalWritingMode()) 1256 1256 return otherStyle->isLeftToRightDirection() ? marginRight() : marginLeft(); 1257 1257 return otherStyle->isLeftToRightDirection() ? marginBottom() : marginTop(); … … 1260 1260 Length RenderStyle::paddingBefore() const 1261 1261 { 1262 switch ( blockFlow()) {1263 case TopToBottom BlockFlow:1262 switch (writingMode()) { 1263 case TopToBottomWritingMode: 1264 1264 return paddingTop(); 1265 case BottomToTop BlockFlow:1265 case BottomToTopWritingMode: 1266 1266 return paddingBottom(); 1267 case LeftToRight BlockFlow:1267 case LeftToRightWritingMode: 1268 1268 return paddingLeft(); 1269 case RightToLeft BlockFlow:1269 case RightToLeftWritingMode: 1270 1270 return paddingRight(); 1271 1271 } … … 1276 1276 Length RenderStyle::paddingAfter() const 1277 1277 { 1278 switch ( blockFlow()) {1279 case TopToBottom BlockFlow:1278 switch (writingMode()) { 1279 case TopToBottomWritingMode: 1280 1280 return paddingBottom(); 1281 case BottomToTop BlockFlow:1281 case BottomToTopWritingMode: 1282 1282 return paddingTop(); 1283 case LeftToRight BlockFlow:1283 case LeftToRightWritingMode: 1284 1284 return paddingRight(); 1285 case RightToLeft BlockFlow:1285 case RightToLeftWritingMode: 1286 1286 return paddingLeft(); 1287 1287 } … … 1292 1292 Length RenderStyle::paddingStart() const 1293 1293 { 1294 if (is VerticalBlockFlow())1294 if (isHorizontalWritingMode()) 1295 1295 return isLeftToRightDirection() ? paddingLeft() : paddingRight(); 1296 1296 return isLeftToRightDirection() ? paddingTop() : paddingBottom(); … … 1299 1299 Length RenderStyle::paddingEnd() const 1300 1300 { 1301 if (is VerticalBlockFlow())1301 if (isHorizontalWritingMode()) 1302 1302 return isLeftToRightDirection() ? paddingRight() : paddingLeft(); 1303 1303 return isLeftToRightDirection() ? paddingBottom() : paddingTop(); -
trunk/WebCore/rendering/style/RenderStyle.h
r68899 r69220 179 179 (_pointerEvents == other._pointerEvents) && 180 180 (_insideLink == other._insideLink) && 181 ( _blockFlow == other._blockFlow);181 (m_writingMode == other.m_writingMode); 182 182 } 183 183 … … 207 207 208 208 // CSS Text Layout Module Level 3: Vertical writing support 209 unsigned _blockFlow : 2; // EBlockFlowDirection209 unsigned m_writingMode : 2; // WritingMode 210 210 // 45 bits 211 211 } inherited_flags; … … 284 284 inherited_flags._pointerEvents = initialPointerEvents(); 285 285 inherited_flags._insideLink = NotInsideLink; 286 inherited_flags. _blockFlow = initialBlockFlow();286 inherited_flags.m_writingMode = initialWritingMode(); 287 287 288 288 noninherited_flags._effectiveDisplay = noninherited_flags._originalDisplay = initialDisplay(); … … 744 744 ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); } 745 745 746 EBlockFlowDirection blockFlow() const { return static_cast<EBlockFlowDirection>(inherited_flags._blockFlow); }747 bool is VerticalBlockFlow() const { return blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow; }746 WritingMode writingMode() const { return static_cast<WritingMode>(inherited_flags.m_writingMode); } 747 bool isHorizontalWritingMode() const { return writingMode() == TopToBottomWritingMode || writingMode() == BottomToTopWritingMode; } 748 748 749 749 ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); } … … 1125 1125 } 1126 1126 1127 void set BlockFlow(EBlockFlowDirection v) { inherited_flags._blockFlow= v; }1127 void setWritingMode(WritingMode v) { inherited_flags.m_writingMode = v; } 1128 1128 1129 1129 // To tell if this style matched attribute selectors. This makes it impossible to share. … … 1166 1166 static EClear initialClear() { return CNONE; } 1167 1167 static TextDirection initialDirection() { return LTR; } 1168 static EBlockFlowDirection initialBlockFlow() { return TopToBottomBlockFlow; }1168 static WritingMode initialWritingMode() { return TopToBottomWritingMode; } 1169 1169 static EDisplay initialDisplay() { return INLINE; } 1170 1170 static EEmptyCell initialEmptyCells() { return SHOW; } -
trunk/WebCore/rendering/style/RenderStyleConstants.h
r68680 r69220 130 130 131 131 // CSS Text Layout Module Level 3: Vertical writing support 132 enum EBlockFlowDirection{133 TopToBottom BlockFlow, RightToLeftBlockFlow, LeftToRightBlockFlow, BottomToTopBlockFlow132 enum WritingMode { 133 TopToBottomWritingMode, RightToLeftWritingMode, LeftToRightWritingMode, BottomToTopWritingMode 134 134 }; 135 135 -
trunk/WebCore/rendering/style/SVGRenderStyle.h
r68976 r69220 68 68 static EShapeRendering initialShapeRendering() { return SR_AUTO; } 69 69 static ETextAnchor initialTextAnchor() { return TA_START; } 70 static EWritingMode initialWritingMode() { return WM_LRTB; }70 static SVGWritingMode initialWritingMode() { return WM_LRTB; } 71 71 static EGlyphOrientation initialGlyphOrientationHorizontal() { return GO_0DEG; } 72 72 static EGlyphOrientation initialGlyphOrientationVertical() { return GO_AUTO; } … … 133 133 void setShapeRendering(EShapeRendering val) { svg_inherited_flags._shapeRendering = val; } 134 134 void setTextAnchor(ETextAnchor val) { svg_inherited_flags._textAnchor = val; } 135 void setWritingMode( EWritingMode val) { svg_inherited_flags._writingMode = val; }135 void setWritingMode(SVGWritingMode val) { svg_inherited_flags._writingMode = val; } 136 136 void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationHorizontal = val; } 137 137 void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationVertical = val; } … … 282 282 EShapeRendering shapeRendering() const { return (EShapeRendering) svg_inherited_flags._shapeRendering; } 283 283 ETextAnchor textAnchor() const { return (ETextAnchor) svg_inherited_flags._textAnchor; } 284 EWritingMode writingMode() const { return (EWritingMode) svg_inherited_flags._writingMode; }284 SVGWritingMode writingMode() const { return (SVGWritingMode) svg_inherited_flags._writingMode; } 285 285 EGlyphOrientation glyphOrientationHorizontal() const { return (EGlyphOrientation) svg_inherited_flags._glyphOrientationHorizontal; } 286 286 EGlyphOrientation glyphOrientationVertical() const { return (EGlyphOrientation) svg_inherited_flags._glyphOrientationVertical; } … … 352 352 unsigned _colorInterpolation : 2; // EColorInterpolation 353 353 unsigned _colorInterpolationFilters : 2; // EColorInterpolation 354 unsigned _writingMode : 3; // EWritingMode354 unsigned _writingMode : 3; // SVGWritingMode 355 355 unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation 356 356 unsigned _glyphOrientationVertical : 3; // EGlyphOrientation -
trunk/WebCore/rendering/style/SVGRenderStyleDefs.h
r64830 r69220 65 65 }; 66 66 67 enum EWritingMode {67 enum SVGWritingMode { 68 68 WM_LRTB, WM_LR, WM_RLTB, WM_RL, WM_TBRL, WM_TB 69 69 };
Note: See TracChangeset
for help on using the changeset viewer.