Changeset 163560 in webkit
- Timestamp:
- Feb 6, 2014 1:24:17 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 29 deleted
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r163553 r163560 1 2014-02-06 Andreas Kling <akling@apple.com> 2 3 Remove display:run-in support. 4 <https://webkit.org/b/127874> 5 <rdar://problem/15926949> 6 7 Rubber-stamped by Anders Carlsson. 8 9 * editing/undo/undo-after-event-edited.html: 10 * fast/css-generated-content/generated-runin-expected.html: Removed. 11 * fast/css-generated-content/generated-runin.html: Removed. 12 * fast/lists/parent-box-not-box-crash-expected.txt: Removed. 13 * fast/lists/parent-box-not-box-crash.html: Removed. 14 * fast/multicol/span/runin-continuation-crash-expected.txt: Removed. 15 * fast/multicol/span/runin-continuation-crash.html: Removed. 16 * fast/runin/001.html: Removed. 17 * fast/runin/002.html: Removed. 18 * fast/runin/crash-when-reparent-sibling-expected.txt: Removed. 19 * fast/runin/crash-when-reparent-sibling.html: Removed. 20 * fast/runin/generated-content-crash-expected.png: Removed. 21 * fast/runin/generated-content-crash-expected.txt: Removed. 22 * fast/runin/generated-content-crash.html: Removed. 23 * fast/runin/generated.html: Removed. 24 * fast/runin/generated2.html: Removed. 25 * fast/runin/generated3.html: Removed. 26 * fast/runin/generated4.html: Removed. 27 * fast/runin/input-text-runin-expected.txt: Removed. 28 * fast/runin/input-text-runin.html: Removed. 29 * fast/runin/insert-before-run-in-expected.png: Removed. 30 * fast/runin/insert-before-run-in-expected.txt: Removed. 31 * fast/runin/insert-before-run-in.html: Removed. 32 * fast/runin/move-run-in-original-position-crash-expected.png: Removed. 33 * fast/runin/move-run-in-original-position-crash-expected.txt: Removed. 34 * fast/runin/move-run-in-original-position-crash.html: Removed. 35 * fast/runin/nonblock-runin-expected.txt: Removed. 36 * fast/runin/nonblock-runin.html: Removed. 37 * fast/runin/progress-run-in-crash-expected.txt: Removed. 38 * fast/runin/progress-run-in-crash.html: Removed. 39 * fast/runin/run-in-after-run-in-expected.png: Removed. 40 * fast/runin/run-in-after-run-in-expected.txt: Removed. 41 * fast/runin/run-in-after-run-in.html: Removed. 42 * fast/runin/run-in-layer-not-removed-crash-expected.txt: Removed. 43 * fast/runin/run-in-layer-not-removed-crash.html: Removed. 44 * fast/runin/run-in-parent-add-child-expected.png: Removed. 45 * fast/runin/run-in-parent-add-child-expected.txt: Removed. 46 * fast/runin/run-in-parent-add-child.html: Removed. 47 * fast/runin/run-in-parent-block-child-add-and-intrude-expected.png: Removed. 48 * fast/runin/run-in-parent-block-child-add-and-intrude-expected.txt: Removed. 49 * fast/runin/run-in-parent-block-child-add-and-intrude.html: Removed. 50 * fast/runin/run-in-parent-block-child-add-expected.png: Removed. 51 * fast/runin/run-in-parent-block-child-add-expected.txt: Removed. 52 * fast/runin/run-in-parent-block-child-add.html: Removed. 53 * fast/runin/runin-between-list-marker-and-before-content-expected.png: Removed. 54 * fast/runin/runin-between-list-marker-and-before-content-expected.txt: Removed. 55 * fast/runin/runin-between-list-marker-and-before-content.html: Removed. 56 * fast/runin/runin-continuations-crash-expected.txt: Removed. 57 * fast/runin/runin-continuations-crash.html: Removed. 58 * fast/runin/runin-div-before-child-expected.png: Removed. 59 * fast/runin/runin-div-before-child-expected.txt: Removed. 60 * fast/runin/runin-div-before-child.html: Removed. 61 * fast/runin/runin-generated-before-content-expected.png: Removed. 62 * fast/runin/runin-generated-before-content-expected.txt: Removed. 63 * fast/runin/runin-generated-before-content.html: Removed. 64 * fast/runin/runin-into-div-with-float-child-expected.png: Removed. 65 * fast/runin/runin-into-div-with-float-child-expected.txt: Removed. 66 * fast/runin/runin-into-div-with-float-child.html: Removed. 67 * fast/runin/runin-not-go-into-float-expected.png: Removed. 68 * fast/runin/runin-not-go-into-float-expected.txt: Removed. 69 * fast/runin/runin-not-go-into-float.html: Removed. 70 * fast/runin/runin-remove-child-simple-expected.txt: Removed. 71 * fast/runin/runin-remove-child-simple.html: Removed. 72 * fast/runin/runin-reparent-crash-expected.txt: Removed. 73 * fast/runin/runin-reparent-crash.html: Removed. 74 * fast/runin/runin-sibling-inline-expected.txt: Removed. 75 * fast/runin/runin-sibling-inline.html: Removed. 76 * fast/runin/runin-table-before-child-expected.png: Removed. 77 * fast/runin/runin-table-before-child-expected.txt: Removed. 78 * fast/runin/runin-table-before-child.html: Removed. 79 * fast/runin/select-runin-expected.txt: Removed. 80 * fast/runin/select-runin.html: Removed. 81 * fast/runin/textarea-runin-expected.txt: Removed. 82 * fast/runin/textarea-runin.html: Removed. 83 * fast/table/form-with-table-style.html: Removed. 84 * platform/efl/fast/runin/001-expected.png: Removed. 85 * platform/efl/fast/runin/001-expected.txt: Removed. 86 * platform/efl/fast/runin/002-expected.png: Removed. 87 * platform/efl/fast/runin/002-expected.txt: Removed. 88 * platform/efl/fast/runin/generated-expected.png: Removed. 89 * platform/efl/fast/runin/generated-expected.txt: Removed. 90 * platform/efl/fast/runin/generated2-expected.png: Removed. 91 * platform/efl/fast/runin/generated2-expected.txt: Removed. 92 * platform/efl/fast/runin/generated3-expected.png: Removed. 93 * platform/efl/fast/runin/generated3-expected.txt: Removed. 94 * platform/efl/fast/runin/generated4-expected.png: Removed. 95 * platform/efl/fast/runin/generated4-expected.txt: Removed. 96 * platform/efl/fast/runin/runin-generated-before-content-expected.png: Removed. 97 * platform/gtk/fast/runin/001-expected.png: Removed. 98 * platform/gtk/fast/runin/001-expected.txt: Removed. 99 * platform/gtk/fast/runin/002-expected.png: Removed. 100 * platform/gtk/fast/runin/002-expected.txt: Removed. 101 * platform/gtk/fast/runin/generated-content-crash-expected.png: Removed. 102 * platform/gtk/fast/runin/generated-expected.png: Removed. 103 * platform/gtk/fast/runin/generated-expected.txt: Removed. 104 * platform/gtk/fast/runin/generated2-expected.png: Removed. 105 * platform/gtk/fast/runin/generated2-expected.txt: Removed. 106 * platform/gtk/fast/runin/generated3-expected.png: Removed. 107 * platform/gtk/fast/runin/generated3-expected.txt: Removed. 108 * platform/gtk/fast/runin/generated4-expected.png: Removed. 109 * platform/gtk/fast/runin/generated4-expected.txt: Removed. 110 * platform/gtk/fast/runin/insert-before-run-in-expected.png: Removed. 111 * platform/gtk/fast/runin/move-run-in-original-position-crash-expected.png: Removed. 112 * platform/gtk/fast/runin/run-in-after-run-in-expected.png: Removed. 113 * platform/gtk/fast/runin/run-in-parent-add-child-expected.png: Removed. 114 * platform/gtk/fast/runin/run-in-parent-block-child-add-and-intrude-expected.png: Removed. 115 * platform/gtk/fast/runin/run-in-parent-block-child-add-expected.png: Removed. 116 * platform/gtk/fast/runin/runin-between-list-marker-and-before-content-expected.png: Removed. 117 * platform/gtk/fast/runin/runin-div-before-child-expected.png: Removed. 118 * platform/gtk/fast/runin/runin-generated-before-content-expected.png: Removed. 119 * platform/gtk/fast/runin/runin-into-div-with-float-child-expected.png: Removed. 120 * platform/gtk/fast/runin/runin-not-go-into-float-expected.png: Removed. 121 * platform/gtk/fast/runin/runin-table-before-child-expected.png: Removed. 122 * platform/mac/fast/runin/001-expected.png: Removed. 123 * platform/mac/fast/runin/001-expected.txt: Removed. 124 * platform/mac/fast/runin/002-expected.png: Removed. 125 * platform/mac/fast/runin/002-expected.txt: Removed. 126 * platform/mac/fast/runin/generated-expected.png: Removed. 127 * platform/mac/fast/runin/generated-expected.txt: Removed. 128 * platform/mac/fast/runin/generated2-expected.png: Removed. 129 * platform/mac/fast/runin/generated2-expected.txt: Removed. 130 * platform/mac/fast/runin/generated3-expected.png: Removed. 131 * platform/mac/fast/runin/generated3-expected.txt: Removed. 132 * platform/mac/fast/runin/generated4-expected.png: Removed. 133 * platform/mac/fast/runin/generated4-expected.txt: Removed. 134 * platform/win/fast/runin/nonblock-runin-expected.txt: Removed. 135 1 136 2014-02-06 Frédéric Wang <fred.wang@free.fr> 2 137 -
trunk/LayoutTests/editing/undo/undo-after-event-edited.html
r151438 r163560 3 3 <head> 4 4 <style> 5 * { display: run-in; }5 * { display:block; } 6 6 .collapse { visibility:collapse; } 7 7 </style> -
trunk/LayoutTests/fast/forms/form-hides-table.html
r48921 r163560 4 4 <div><div style="display:block;"><form><table><tr><td>display: block</td></tr></table></form></div></div> 5 5 <div><div style="display:list-item;"><form><table><tr><td>display: list-item</td></tr></table></form></div></div> 6 <div><div style="display:run-in;"><form><table><tr><td>display: run-in</td></tr></table></form></div></div>7 6 <div><div style="display:compact;"><form><table><tr><td>display: compact</td></tr></table></form></div></div> 8 7 <div><div style="display:inline-block;"><form><table><tr><td>display: inline-block</td></tr></table></form></div></div> -
trunk/LayoutTests/fast/regions/region-element-display-change-expected.txt
r121352 r163560 7 7 PASS testElement(element, "block") is true 8 8 PASS testElement(element, "inline-block") is true 9 PASS testElement(element, "run-in") is false10 9 PASS testElement(element, "compact") is false 11 10 PASS testElement(element, "inline") is false -
trunk/LayoutTests/fast/regions/region-element-display-restriction-expected.txt
r121352 r163560 7 7 PASS createRegionElement("div", "block") is true 8 8 PASS createRegionElement("div", "inline-block") is true 9 PASS createRegionElement("div", "run-in") is false10 9 PASS createRegionElement("div", "compact") is false 11 10 PASS createRegionElement("div", "inline") is false -
trunk/LayoutTests/fast/regions/script-tests/region-element-display-change.js
r121352 r163560 17 17 shouldBeTrue('testElement(element, "block")'); 18 18 shouldBeTrue('testElement(element, "inline-block")'); 19 shouldBeFalse('testElement(element, "run-in")');20 19 shouldBeFalse('testElement(element, "compact")'); 21 20 shouldBeFalse('testElement(element, "inline")'); -
trunk/LayoutTests/fast/regions/script-tests/region-element-display-restriction.js
r121352 r163560 23 23 shouldBeTrue('createRegionElement("div", "block")'); 24 24 shouldBeTrue('createRegionElement("div", "inline-block")'); 25 shouldBeFalse('createRegionElement("div", "run-in")');26 25 shouldBeFalse('createRegionElement("div", "compact")'); 27 26 shouldBeFalse('createRegionElement("div", "inline")'); -
trunk/LayoutTests/platform/mac/fast/forms/form-hides-table-expected.txt
r117655 r163560 1 layer at (0,0) size 785x6 821 layer at (0,0) size 785x642 2 2 RenderView at (0,0) size 785x600 3 layer at (0,0) size 785x6 824 RenderBlock {HTML} at (0,0) size 785x6 825 RenderBody {BODY} at (8,8) size 769x6 663 layer at (0,0) size 785x642 4 RenderBlock {HTML} at (0,0) size 785x642 5 RenderBody {BODY} at (8,8) size 769x626 6 6 RenderBlock {P} at (0,0) size 769x18 7 7 RenderText {#text} at (0,0) size 551x18 … … 49 49 text run at (1,1) width 103: "display: list-item" 50 50 RenderBlock {DIV} at (0,206) size 769x24 51 RenderBlock (run-in) {DIV} at (0,0) size 769x2452 RenderBlock {FORM} at (0,0) size 769x2453 RenderTable {TABLE} at (0,0) size 97x2454 RenderTableSection {TBODY} at (0,0) size 97x2455 RenderTableRow {TR} at (0,2) size 97x2056 RenderTableCell {TD} at (2,2) size 93x20 [r=0 c=0 rs=1 cs=1]57 RenderText {#text} at (1,1) size 91x1858 text run at (1,1) width 91: "display: run-in"59 RenderBlock {DIV} at (0,246) size 769x2460 51 RenderBlock {DIV} at (0,0) size 769x24 61 52 RenderBlock {FORM} at (0,0) size 769x24 … … 66 57 RenderText {#text} at (1,1) size 106x18 67 58 text run at (1,1) width 106: "display: compact" 68 RenderBlock {DIV} at (0,2 86) size 769x4059 RenderBlock {DIV} at (0,246) size 769x40 69 60 RenderBlock {DIV} at (0,0) size 134x40 70 61 RenderBlock {FORM} at (0,0) size 134x24 … … 75 66 RenderText {#text} at (1,1) size 128x18 76 67 text run at (1,1) width 128: "display: inline-block" 77 RenderBlock {DIV} at (0, 326) size 769x4068 RenderBlock {DIV} at (0,286) size 769x40 78 69 RenderTable {DIV} at (0,0) size 89x40 79 70 RenderTableSection (anonymous) at (0,0) size 89x40 … … 87 78 RenderText {#text} at (1,1) size 83x18 88 79 text run at (1,1) width 83: "display: table" 89 RenderBlock {DIV} at (0,3 66) size 769x4080 RenderBlock {DIV} at (0,326) size 769x40 90 81 RenderTable {DIV} at (0,0) size 129x40 91 82 RenderTableSection (anonymous) at (0,0) size 129x40 … … 99 90 RenderText {#text} at (1,1) size 123x18 100 91 text run at (1,1) width 123: "display: inline-table" 101 RenderBlock {DIV} at (0, 406) size 769x4092 RenderBlock {DIV} at (0,366) size 769x40 102 93 RenderTable at (0,0) size 161x40 103 94 RenderTableSection {DIV} at (0,0) size 161x40 … … 111 102 RenderText {#text} at (1,1) size 155x18 112 103 text run at (1,1) width 155: "display: table-row-group" 113 RenderBlock {DIV} at (0,4 46) size 769x40104 RenderBlock {DIV} at (0,406) size 769x40 114 105 RenderTable at (0,0) size 178x40 115 106 RenderTableSection {DIV} at (0,0) size 178x40 … … 123 114 RenderText {#text} at (1,1) size 172x18 124 115 text run at (1,1) width 172: "display: table-header-group" 125 RenderBlock {DIV} at (0,4 86) size 769x40116 RenderBlock {DIV} at (0,446) size 769x40 126 117 RenderTable at (0,0) size 173x40 127 118 RenderTableSection {DIV} at (0,0) size 173x40 … … 135 126 RenderText {#text} at (1,1) size 167x18 136 127 text run at (1,1) width 167: "display: table-footer-group" 137 RenderBlock {DIV} at (0, 526) size 769x40128 RenderBlock {DIV} at (0,486) size 769x40 138 129 RenderTable at (0,0) size 119x40 139 130 RenderTableSection (anonymous) at (0,0) size 119x40 … … 147 138 RenderText {#text} at (1,1) size 113x18 148 139 text run at (1,1) width 113: "display: table-row" 149 RenderBlock {DIV} at (0,5 66) size 769x0140 RenderBlock {DIV} at (0,526) size 769x0 150 141 RenderTable at (0,0) size 0x0 151 142 RenderTableCol {DIV} at (0,0) size 0x0 152 RenderBlock {DIV} at (0,5 66) size 769x0143 RenderBlock {DIV} at (0,526) size 769x0 153 144 RenderTable at (0,0) size 0x0 154 145 RenderTableCol {DIV} at (0,0) size 0x0 155 RenderBlock {DIV} at (0,5 66) size 769x40146 RenderBlock {DIV} at (0,526) size 769x40 156 147 RenderTable at (0,0) size 116x40 157 148 RenderTableSection (anonymous) at (0,0) size 116x40 … … 165 156 RenderText {#text} at (1,1) size 110x18 166 157 text run at (1,1) width 110: "display: table-cell" 167 RenderBlock {DIV} at (0, 606) size 769x60158 RenderBlock {DIV} at (0,566) size 769x60 168 159 RenderTable at (0,0) size 55x60 169 160 RenderBlock {DIV} at (0,0) size 55x60 -
trunk/Source/WebCore/ChangeLog
r163559 r163560 1 2014-02-06 Andreas Kling <akling@apple.com> 2 3 Remove display:run-in support. 4 <https://webkit.org/b/127874> 5 <rdar://problem/15926949> 6 7 Remove support for the "run-in" display type. Blink recently removed 8 this and Gecko never supported in the first place. 9 10 Rubber-stamped by Anders Carlsson. 11 12 * css/CSSParser.cpp: 13 (WebCore::isValidKeywordPropertyAndValue): 14 * css/CSSPrimitiveValueMappings.h: 15 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 16 * css/CSSValueKeywords.in: 17 * css/StyleResolver.cpp: 18 (WebCore::equivalentBlockDisplay): 19 (WebCore::doesNotInheritTextDecoration): 20 * rendering/RenderBlock.cpp: 21 (WebCore::RenderBlock::willBeDestroyed): 22 (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): 23 (WebCore::RenderBlock::makeChildrenNonInline): 24 (WebCore::canMergeContiguousAnonymousBlocks): 25 (WebCore::RenderBlock::renderName): 26 * rendering/RenderBlock.h: 27 * rendering/RenderBlockFlow.cpp: 28 (WebCore::RenderBlockFlow::willBeDestroyed): 29 (WebCore::shouldCheckLines): 30 (WebCore::getHeightForLineCount): 31 * rendering/RenderElement.cpp: 32 (WebCore::RenderElement::createFor): 33 (WebCore::RenderElement::destroyLeftoverChildren): 34 * rendering/RenderFileUploadControl.cpp: 35 * rendering/RenderFileUploadControl.h: 36 * rendering/RenderInline.cpp: 37 (WebCore::RenderInline::updateFromStyle): 38 (WebCore::RenderInline::renderName): 39 (WebCore::RenderInline::clippedOverflowRectForRepaint): 40 * rendering/RenderListBox.cpp: 41 * rendering/RenderListBox.h: 42 * rendering/RenderMenuList.cpp: 43 * rendering/RenderMenuList.h: 44 * rendering/RenderObject.cpp: 45 * rendering/RenderObject.h: 46 * rendering/RenderProgress.cpp: 47 * rendering/RenderProgress.h: 48 * rendering/RenderSlider.cpp: 49 * rendering/RenderSlider.h: 50 * rendering/RenderTextControl.cpp: 51 * rendering/RenderTextControl.h: 52 * rendering/RenderTheme.cpp: 53 (WebCore::RenderTheme::adjustStyle): 54 * rendering/style/RenderStyleConstants.h: 55 1 56 2014-02-06 Andreas Kling <akling@apple.com> 2 57 -
trunk/Source/WebCore/css/CSSParser.cpp
r163440 r163560 673 673 break; 674 674 case CSSPropertyDisplay: 675 // inline | block | list-item | run-in |inline-block | table |675 // inline | block | list-item | inline-block | table | 676 676 // inline-table | table-row-group | table-header-group | table-footer-group | table-row | 677 677 // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r163440 r163560 1315 1315 case LIST_ITEM: 1316 1316 m_value.valueID = CSSValueListItem; 1317 break;1318 case RUN_IN:1319 m_value.valueID = CSSValueRunIn;1320 1317 break; 1321 1318 case COMPACT: -
trunk/Source/WebCore/css/CSSValueKeywords.in
r163440 r163560 346 346 block 347 347 list-item 348 run-in349 348 compact 350 349 inline-block -
trunk/Source/WebCore/css/StyleResolver.cpp
r163559 r163560 1095 1095 1096 1096 case INLINE: 1097 case RUN_IN:1098 1097 case COMPACT: 1099 1098 case INLINE_BLOCK: … … 1116 1115 1117 1116 // CSS requires text-decoration to be reset at each DOM element for tables, 1118 // inline blocks, inline tables, run-ins,shadow DOM crossings, floating elements,1117 // inline blocks, inline tables, shadow DOM crossings, floating elements, 1119 1118 // and absolute or relatively positioned elements. 1120 1119 static bool doesNotInheritTextDecoration(const RenderStyle& style, Element* e) 1121 1120 { 1122 return style.display() == TABLE || style.display() == INLINE_TABLE || style.display() == RUN_IN1121 return style.display() == TABLE || style.display() == INLINE_TABLE 1123 1122 || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || isAtShadowBoundary(e) 1124 1123 || style.isFloating() || style.hasOutOfFlowPosition(); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r163478 r163560 235 235 m_beingDestroyed = true; 236 236 237 if (!documentBeingDestroyed()) {238 if (firstChild() && firstChild()->isRunIn())239 moveRunInToOriginalPosition(*firstChild());240 }241 242 237 // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will 243 238 // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise. … … 768 763 beforeChild = beforeChildContainer; 769 764 } 770 } else { 771 // We will reach here when beforeChild is a run-in element. 772 // If run-in element precedes a block-level element, it becomes the 773 // the first inline child of that block level element. The insertion 774 // point will be before that block-level element. 775 ASSERT(beforeChild->isRunIn()); 776 beforeChild = beforeChildContainer; 777 } 778 } 779 780 // Nothing goes before the intruded run-in. 781 if (beforeChild && beforeChild->isRunIn() && runInIsPlacedIntoSiblingBlock(*beforeChild)) 782 beforeChild = beforeChild->nextSibling(); 765 } 766 } 783 767 784 768 // Check for a spanning element in columns. … … 851 835 RenderBox::addChild(newChild, beforeChild); 852 836 853 // Handle placement of run-ins.854 placeRunInIfNeeded(*newChild);855 856 837 if (madeBoxesNonInline && parent() && isAnonymousBlock() && parent()->isRenderBlock()) 857 838 toRenderBlock(parent())->removeLeftoverAnonymousBlock(this); … … 948 929 deleteLines(); 949 930 950 // Since we are going to have block children, we have to move951 // back the run-in to its original place.952 if (child->isRunIn()) {953 moveRunInToOriginalPosition(*child);954 child = firstChild();955 }956 957 931 while (child) { 958 932 RenderObject* inlineRunStart; … … 1049 1023 RenderBlock* previousAnonymousBlock = toRenderBlock(previous); 1050 1024 if (!canMergeAnonymousBlock(previousAnonymousBlock)) 1051 return false;1052 // FIXME: This check isn't required when inline run-ins can't be split into continuations.1053 RenderObject* child = previousAnonymousBlock->firstChild();1054 if (child && child->isInline() && child->isRunIn())1055 1025 return false; 1056 1026 } … … 1710 1680 } 1711 1681 1712 static void destroyRunIn(RenderBoxModelObject& runIn)1713 {1714 ASSERT(runIn.isRunIn());1715 ASSERT(!runIn.firstChild());1716 1717 // Delete our line box tree. This is needed as our children got moved1718 // and our line box tree is no longer valid.1719 if (runIn.isRenderBlock())1720 toRenderBlock(runIn).deleteLines();1721 else if (runIn.isRenderInline())1722 toRenderInline(runIn).deleteLines();1723 else1724 ASSERT_NOT_REACHED();1725 1726 runIn.destroy();1727 }1728 1729 void RenderBlock::placeRunInIfNeeded(RenderObject& newChild)1730 {1731 if (newChild.isRunIn())1732 moveRunInUnderSiblingBlockIfNeeded(newChild);1733 else if (RenderObject* prevSibling = newChild.previousSibling()) {1734 if (prevSibling->isRunIn())1735 moveRunInUnderSiblingBlockIfNeeded(*prevSibling);1736 }1737 }1738 1739 RenderBoxModelObject& RenderBlock::createReplacementRunIn(RenderBoxModelObject& runIn)1740 {1741 ASSERT(runIn.isRunIn());1742 ASSERT(runIn.element());1743 1744 RenderBoxModelObject* newRunIn = 0;1745 if (!runIn.isRenderBlockFlow())1746 newRunIn = new RenderBlockFlow(*runIn.element(), runIn.style());1747 else1748 newRunIn = new RenderInline(*runIn.element(), runIn.style());1749 1750 runIn.element()->setRenderer(newRunIn);1751 newRunIn->initializeStyle();1752 1753 runIn.moveAllChildrenTo(newRunIn, true);1754 1755 return *newRunIn;1756 }1757 1758 void RenderBlock::moveRunInUnderSiblingBlockIfNeeded(RenderObject& runIn)1759 {1760 ASSERT(runIn.isRunIn());1761 1762 // See if we have inline children. If the children aren't inline,1763 // then just treat the run-in as a normal block.1764 if (!runIn.childrenInline())1765 return;1766 1767 // FIXME: We don't handle non-block elements with run-in for now.1768 if (!runIn.isRenderBlockFlow())1769 return;1770 1771 // FIXME: We don't support run-ins with or as part of a continuation1772 // as it makes the back-and-forth placing complex.1773 if (runIn.isElementContinuation() || runIn.virtualContinuation())1774 return;1775 1776 // Check if this node is allowed to run-in. E.g. <select> expects its renderer to1777 // be a RenderListBox or RenderMenuList, and hence cannot be a RenderInline run-in.1778 if (!runIn.canBeReplacedWithInlineRunIn())1779 return;1780 1781 RenderObject* curr = runIn.nextSibling();1782 if (!curr || !curr->isRenderBlock() || !curr->childrenInline())1783 return;1784 1785 RenderBlock& nextSiblingBlock = toRenderBlock(*curr);1786 if (nextSiblingBlock.beingDestroyed())1787 return;1788 1789 // Per CSS3, "A run-in cannot run in to a block that already starts with a1790 // run-in or that itself is a run-in".1791 if (nextSiblingBlock.isRunIn() || (nextSiblingBlock.firstChild() && nextSiblingBlock.firstChild()->isRunIn()))1792 return;1793 1794 if (nextSiblingBlock.isAnonymous() || nextSiblingBlock.isFloatingOrOutOfFlowPositioned())1795 return;1796 1797 RenderBoxModelObject& oldRunIn = toRenderBoxModelObject(runIn);1798 RenderBoxModelObject& newRunIn = createReplacementRunIn(oldRunIn);1799 destroyRunIn(oldRunIn);1800 1801 // Now insert the new child under |curr| block. Use addChild instead of insertChildNode1802 // since it handles correct placement of the children, especially where we cannot insert1803 // anything before the first child. e.g. details tag. See https://bugs.webkit.org/show_bug.cgi?id=58228.1804 nextSiblingBlock.addChild(&newRunIn, nextSiblingBlock.firstChild());1805 1806 // Make sure that |this| get a layout since its run-in child moved.1807 nextSiblingBlock.setNeedsLayoutAndPrefWidthsRecalc();1808 }1809 1810 bool RenderBlock::runInIsPlacedIntoSiblingBlock(RenderObject& runIn)1811 {1812 ASSERT(runIn.isRunIn());1813 1814 // If we don't have a parent, we can't be moved into our sibling block.1815 if (!parent())1816 return false;1817 1818 // An intruded run-in needs to be an inline.1819 if (!runIn.isRenderInline())1820 return false;1821 1822 return true;1823 }1824 1825 void RenderBlock::moveRunInToOriginalPosition(RenderObject& runIn)1826 {1827 ASSERT(runIn.isRunIn());1828 1829 if (!runInIsPlacedIntoSiblingBlock(runIn))1830 return;1831 1832 // FIXME: Run-in that are now placed in sibling block can break up into continuation1833 // chains when new children are added to it. We cannot easily send them back to their1834 // original place since that requires writing integration logic with RenderInline::addChild1835 // and all other places that might cause continuations to be created (without blowing away1836 // |this|). Disabling this feature for now to prevent crashes.1837 if (runIn.isElementContinuation() || runIn.virtualContinuation())1838 return;1839 1840 RenderBoxModelObject& oldRunIn = toRenderBoxModelObject(runIn);1841 RenderBoxModelObject& newRunIn = createReplacementRunIn(oldRunIn);1842 destroyRunIn(oldRunIn);1843 1844 // Add the run-in block as our previous sibling.1845 parent()->addChild(&newRunIn, this);1846 1847 // Make sure that the parent holding the new run-in gets layout.1848 parent()->setNeedsLayoutAndPrefWidthsRecalc();1849 }1850 1682 1851 1683 LayoutUnit RenderBlock::computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderRegion* region) … … 5374 5206 if (isStickyPositioned()) 5375 5207 return "RenderBlock (sticky positioned)"; 5376 if (isRunIn())5377 return "RenderBlock (run-in)";5378 5208 return "RenderBlock"; 5379 5209 } -
trunk/Source/WebCore/rendering/RenderBlock.h
r163478 r163560 340 340 LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderRegion* = 0); 341 341 342 void placeRunInIfNeeded(RenderObject& newChild);343 bool runInIsPlacedIntoSiblingBlock(RenderObject& runIn);344 345 342 #ifndef NDEBUG 346 343 void checkPositionedObjectsNeedLayout(); … … 578 575 RenderBlock* columnsBlockForSpanningElement(RenderObject* newChild); 579 576 580 RenderBoxModelObject& createReplacementRunIn(RenderBoxModelObject& runIn);581 void moveRunInUnderSiblingBlockIfNeeded(RenderObject& runIn);582 void moveRunInToOriginalPosition(RenderObject& runIn);583 584 577 private: 585 578 bool hasRareData() const; -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r163333 r163560 160 160 if (renderNamedFlowFragment()) 161 161 setRenderNamedFlowFragment(0); 162 163 if (!documentBeingDestroyed()) {164 if (firstChild() && firstChild()->isRunIn())165 moveRunInToOriginalPosition(*firstChild());166 }167 162 168 163 // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will … … 2952 2947 static bool shouldCheckLines(const RenderBlockFlow& blockFlow) 2953 2948 { 2954 return !blockFlow.isFloatingOrOutOfFlowPositioned() && !blockFlow.isRunIn() &&blockFlow.style().height().isAuto();2949 return !blockFlow.isFloatingOrOutOfFlowPositioned() && blockFlow.style().height().isAuto(); 2955 2950 } 2956 2951 … … 3031 3026 if (result != -1) 3032 3027 return result + obj->y() + (includeBottom ? (block.borderBottom() + block.paddingBottom()) : LayoutUnit()); 3033 } else if (!obj->isFloatingOrOutOfFlowPositioned() && !obj->isRunIn())3028 } else if (!obj->isFloatingOrOutOfFlowPositioned()) 3034 3029 normalFlowChildWithoutLines = obj; 3035 3030 } -
trunk/Source/WebCore/rendering/RenderElement.cpp
r163440 r163560 152 152 case BLOCK: 153 153 case INLINE_BLOCK: 154 case RUN_IN:155 154 case COMPACT: 156 155 return createRenderer<RenderBlockFlow>(element, std::move(style)); … … 519 518 { 520 519 while (m_firstChild) { 521 if (m_firstChild->isListMarker() || (m_firstChild->style().styleType() == FIRST_LETTER && !m_firstChild->isText())) 520 if (m_firstChild->isListMarker() || (m_firstChild->style().styleType() == FIRST_LETTER && !m_firstChild->isText())) { 522 521 m_firstChild->removeFromParent(); // List markers are owned by their enclosing list and so don't get destroyed by this container. Similarly, first letters are destroyed by their remaining text fragment. 523 else if (m_firstChild->isRunIn() && m_firstChild->node()) {524 m_firstChild->node()->setRenderer(nullptr);525 m_firstChild->node()->setNeedsStyleRecalc();526 m_firstChild->destroy();527 522 } else { 528 523 // Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based text fields. -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r161738 r163560 74 74 } 75 75 76 bool RenderFileUploadControl::canBeReplacedWithInlineRunIn() const77 {78 return false;79 }80 81 76 void RenderFileUploadControl::updateFromElement() 82 77 { -
trunk/Source/WebCore/rendering/RenderFileUploadControl.h
r162198 r163560 49 49 virtual const char* renderName() const override { return "RenderFileUploadControl"; } 50 50 51 virtual bool canBeReplacedWithInlineRunIn() const override;52 51 virtual void updateFromElement() override; 53 52 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override; -
trunk/Source/WebCore/rendering/RenderInline.cpp
r162795 r163560 128 128 { 129 129 RenderBoxModelObject::updateFromStyle(); 130 131 setInline(true); // Needed for run-ins, since run-in is considered a block display type.132 130 133 131 // FIXME: Support transforms and reflections on inline flows someday. … … 786 784 if (isAnonymous()) 787 785 return "RenderInline (generated)"; 788 if (isRunIn())789 return "RenderInline (run-in)";790 786 return "RenderInline"; 791 787 } … … 1087 1083 LayoutRect RenderInline::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const 1088 1084 { 1089 // Only run-ins andfirst-letter renderers are allowed in here during layout. They mutate the tree triggering repaints.1090 ASSERT(!view().layoutStateEnabled() || isRunIn() ||style().styleType() == FIRST_LETTER);1085 // Only first-letter renderers are allowed in here during layout. They mutate the tree triggering repaints. 1086 ASSERT(!view().layoutStateEnabled() || style().styleType() == FIRST_LETTER); 1091 1087 1092 1088 if (!firstLineBoxIncludingCulling() && !continuation()) -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r163329 r163560 144 144 } 145 145 146 bool RenderListBox::canBeReplacedWithInlineRunIn() const147 {148 return false;149 }150 151 146 void RenderListBox::selectionChanged() 152 147 { -
trunk/Source/WebCore/rendering/RenderListBox.h
r163329 r163560 68 68 69 69 virtual void updateFromElement() override; 70 virtual bool canBeReplacedWithInlineRunIn() const override;71 70 virtual bool hasControlClip() const override { return true; } 72 71 virtual void paintObject(PaintInfo&, const LayoutPoint&) override; -
trunk/Source/WebCore/rendering/RenderMenuList.cpp
r162132 r163560 94 94 } 95 95 96 bool RenderMenuList::canBeReplacedWithInlineRunIn() const97 {98 return false;99 }100 101 96 void RenderMenuList::createInnerBlock() 102 97 { -
trunk/Source/WebCore/rendering/RenderMenuList.h
r162198 r163560 75 75 virtual bool hasControlClip() const override { return true; } 76 76 virtual bool canHaveGeneratedChildren() const override { return false; } 77 virtual bool canBeReplacedWithInlineRunIn() const override;78 77 79 78 virtual const char* renderName() const override { return "RenderMenuList"; } -
trunk/Source/WebCore/rendering/RenderObject.cpp
r163459 r163560 2395 2395 } 2396 2396 2397 bool RenderObject::canBeReplacedWithInlineRunIn() const2398 {2399 return true;2400 }2401 2402 2397 void RenderObject::setNeedsBoundariesUpdate() 2403 2398 { -
trunk/Source/WebCore/rendering/RenderObject.h
r163553 r163560 514 514 bool isRenderView() const { return m_bitfields.isBox() && m_bitfields.isTextOrRenderView(); } 515 515 bool isInline() const { return m_bitfields.isInline(); } // inline object 516 bool isRunIn() const { return style().display() == RUN_IN; } // run-in object517 516 bool isDragging() const { return m_bitfields.isDragging(); } 518 517 bool isReplaced() const { return m_bitfields.isReplaced(); } // a "replaced" element (see CSS) … … 890 889 void clearLayoutRootIfNeeded() const; 891 890 virtual void willBeDestroyed(); 892 893 virtual bool canBeReplacedWithInlineRunIn() const;894 891 895 892 virtual void insertedIntoTree(); -
trunk/Source/WebCore/rendering/RenderProgress.cpp
r161768 r163560 72 72 } 73 73 74 bool RenderProgress::canBeReplacedWithInlineRunIn() const75 {76 return false;77 }78 79 74 double RenderProgress::animationProgress() const 80 75 { -
trunk/Source/WebCore/rendering/RenderProgress.h
r162158 r163560 47 47 virtual bool isProgress() const override { return true; } 48 48 virtual bool requiresForcedStyleRecalcPropagation() const override { return true; } 49 virtual bool canBeReplacedWithInlineRunIn() const override;50 49 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const override; 51 50 -
trunk/Source/WebCore/rendering/RenderSlider.cpp
r158163 r163560 64 64 } 65 65 66 bool RenderSlider::canBeReplacedWithInlineRunIn() const67 {68 return false;69 }70 71 66 int RenderSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirectionMode, LinePositionMode) const 72 67 { -
trunk/Source/WebCore/rendering/RenderSlider.h
r162158 r163560 44 44 virtual const char* renderName() const override { return "RenderSlider"; } 45 45 virtual bool isSlider() const override { return true; } 46 virtual bool canBeReplacedWithInlineRunIn() const override;47 46 48 47 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r160599 r163560 345 345 #endif 346 346 347 bool RenderTextControl::canBeReplacedWithInlineRunIn() const348 {349 return false;350 }351 352 347 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderTextControl.h
r162198 r163560 82 82 virtual bool avoidsFloats() const override { return true; } 83 83 virtual bool canHaveGeneratedChildren() const override { return false; } 84 virtual bool canBeReplacedWithInlineRunIn() const override;85 84 86 85 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override; -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r162907 r163560 90 90 || style.display() == TABLE_CELL || style.display() == TABLE_CAPTION) 91 91 style.setDisplay(INLINE_BLOCK); 92 else if (style.display() == COMPACT || style.display() == RUN_IN || style.display() ==LIST_ITEM || style.display() == TABLE)92 else if (style.display() == COMPACT || style.display() == LIST_ITEM || style.display() == TABLE) 93 93 style.setDisplay(BLOCK); 94 94 -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r163079 r163560 462 462 // The order of this enum must match the order of the display values in CSSValueKeywords.in. 463 463 enum EDisplay { 464 INLINE, BLOCK, LIST_ITEM, RUN_IN,COMPACT, INLINE_BLOCK,464 INLINE, BLOCK, LIST_ITEM, COMPACT, INLINE_BLOCK, 465 465 TABLE, INLINE_TABLE, TABLE_ROW_GROUP, 466 466 TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW, -
trunk/Source/WebInspectorUI/ChangeLog
r163477 r163560 1 2014-02-06 Andreas Kling <akling@apple.com> 2 3 Remove display:run-in support. 4 <https://webkit.org/b/127874> 5 <rdar://problem/15926949> 6 7 Rubber-stamped by Anders Carlsson. 8 9 * UserInterface/CSSKeywordCompletions.js: 10 * UserInterface/External/CodeMirror/css.js: 11 1 12 2014-02-05 Brian Burg <bburg@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/CSSKeywordCompletions.js
r162794 r163560 341 341 ], 342 342 "display": [ 343 "none", "inline", "block", "list-item", " run-in", "compact", "inline-block", "table", "inline-table",343 "none", "inline", "block", "list-item", "compact", "inline-block", "table", "inline-table", 344 344 "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", 345 345 "table-column", "table-cell", "table-caption", "-webkit-box", "-webkit-inline-box", "-wap-marquee", -
trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js
r160500 r163560 516 516 "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", 517 517 "relative", "repeat", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", 518 "ridge", "right", "round", "row-resize", "rtl", "run -in", "running",518 "ridge", "right", "round", "row-resize", "rtl", "running", 519 519 "s-resize", "sans-serif", "scroll", "scrollbar", "se-resize", "searchfield", 520 520 "searchfield-cancel-button", "searchfield-decoration",
Note: See TracChangeset
for help on using the changeset viewer.