Changeset 231717 in webkit
- Timestamp:
- May 11, 2018 1:39:30 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r231714 r231717 1 2018-05-11 Ryosuke Niwa <rniwa@webkit.org> 2 3 Tapping after CSS-based table casues an infinite loop in wordRangeFromPosition 4 https://bugs.webkit.org/show_bug.cgi?id=185465 5 <rdar://problem/35263057> 6 7 Reviewed by Antti Koivisto. 8 9 Rebaselined the tests. Most of these are due to new extra line breaks being generated after table and 10 header elements as expected. See inline comments for some newly discovered bugs and rebaselines due to 11 other non-obvious reasons. 12 13 * accessibility/internal-link-anchors2-expected.txt: This test now demonstrates a bug that WebKit doesn't 14 generate an extra line break before h3 when it has a large margin-top since an extra line break is only 15 generated after a node at the moment. 16 * accessibility/mac/mathml-elements-expected.txt: 17 * accessibility/table-headers-expected.txt: 18 * compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt: 19 * css3/flexbox/box-orient-button-expected.txt: 20 * css3/flexbox/flexitem-expected.txt: 21 * editing/execCommand/19087-expected.txt: The second blockquote which has the height of 0px no longer 22 generates an extra new line. 23 * editing/inserting/insert-list-in-table-cell-08-expected.txt: Selection is now being restored properly 24 using TextIterator in InsertListCommand. 25 * editing/selection/tapping-in-table-at-end-of-document-expected.txt: Added. 26 * editing/selection/tapping-in-table-at-end-of-document.html: Added. 27 * editing/text-iterator/table-at-end-of-document-expected.txt: Added. 28 * editing/text-iterator/table-at-end-of-document.html: Added. 29 * fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt: 30 * fast/css/css3-ch-unit-expected.txt: Line breaks are generated between block & inline-block elements 31 as expected. 32 * fast/css/percent-min-width-img-src-change-expected.txt: 33 * fast/css/percent-width-img-src-change-expected.txt: 34 * fast/css/pseudo-empty-display-none-expected.txt: 35 * fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash-expected.txt: 36 * fast/dom/HTMLDivElement/align/getset-expected.txt: 37 * fast/dom/HTMLSelectElement/listbox-select-reset-expected.txt: 38 * fast/dom/HTMLTableElement/table-with-invalid-border-expected.txt: 39 * fast/forms/option-mouseevents-expected.txt: 40 * fast/history/multiple-classes-visited-expected.txt: 41 * fast/history/self-is-visited-expected.txt: 42 * fast/html/marquee-reparent-check-expected.txt: 43 * fast/inline-block/anonymous-block-crash-expected.txt: This test now demonstrates a bug that we're not 44 generating an empty line before a block in some cases. 45 * fast/inline/inline-position-top-align-expected.txt: 46 * fast/invalid/test-case-tr-th-td-should-not-close-dl-list-expected.txt: 47 * fast/overflow/scrollbar-click-retains-focus-expected.txt: 48 * fast/parser/comments-expected.txt: 49 * fast/parser/fragment-parser-doctype-expected.txt: 50 * fast/ruby/ruby-base-merge-block-children-crash-2-expected.txt: 51 * fast/spatial-navigation/snav-radio-group-expected.txt: A line break is generated after a nested table. 52 * fast/sub-pixel/table-cells-have-stable-width-expected.txt: 53 * fast/table/table-row-oveflow-crash-expected.txt: A line break is generated after a table as expected, 54 which is followed by a BR which creates a blank line. 55 * fast/table/table-with-borderattr-null-expected.txt: 56 * fast/table/table-with-borderattr-set-to-null-expected.txt: 57 * fast/text/international/dynamic-text-combine-crash-expected.txt: 58 * fast/xsl/mozilla-tests-expected.txt: 59 * http/tests/misc/large-js-program-expected.txt: 60 * imported/blink/plugins/empty-per-context-data-expected.txt: 61 * inspector/console/js-isLikelyStackTrace-expected.txt: 62 * inspector/console/js-source-locations-expected.txt: 63 * mathml/out-of-flow-in-token-crash-expected.txt: 64 * mathml/presentation/stretchy-depth-height-expected.txt: 65 * platform/mac/accessibility/table-cells-roles-expected.txt: Line breaks are generated after a block 66 followed by two two consecutive BRs. 67 * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Ditto. 68 * svg/foreignObject/fO-fixed-position-crash-expected.txt: 69 * tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt: 70 * transforms/3d/hit-testing/coplanar-with-camera-expected.txt: 71 1 72 2018-05-11 Chris Dumez <cdumez@apple.com> 2 73 -
trunk/LayoutTests/accessibility/internal-link-anchors2-expected.txt
r198356 r231717 98 98 99 99 2.2 Tourette syndrome 100 101 100 [edit] Tourette syndrome 102 101 -
trunk/LayoutTests/accessibility/mac/mathml-elements-expected.txt
r202934 r231717 34 34 over 35 35 36 3 2 1 36 3 2 1 37 37 This tests ensures that Mac specific attributes and roles for MathML elements work as expected. 38 38 -
trunk/LayoutTests/accessibility/table-headers-expected.txt
r174675 r231717 3 3 2. Russia Moscow 4 4 3. Ukraine Kiev 5 5 6 6 7 This tests that the columnHeaders() and rowHeaders() functions return the correct headers for a table cell. -
trunk/LayoutTests/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt
r204337 r231717 1 123456Before: 1 123456 2 Before: 2 3 (GraphicsLayer 3 4 (anchor 0.00 0.00) -
trunk/LayoutTests/css3/flexbox/box-orient-button-expected.txt
r213149 r231717 12 12 hello 13 13 world 14 14 15 horizontal: 15 16 16 17 hello 17 18 world 19 18 20 vertical: 19 21 20 22 hello 21 23 world 24 22 25 default => vertical: 23 26 24 27 hello 25 28 world 29 26 30 vertical => horizontal: 27 31 -
trunk/LayoutTests/css3/flexbox/flexitem-expected.txt
r213149 r231717 29 29 30 30 31 31 32 button 32 33 … … 40 41 41 42 43 42 44 Some text 43 45 Some more text -
trunk/LayoutTests/editing/execCommand/19087-expected.txt
r49985 r231717 5 5 6 6 7 -
trunk/LayoutTests/editing/inserting/insert-list-in-table-cell-08-expected.txt
r231630 r231717 34 34 | "gghfg" 35 35 | <td> 36 | "fsfg<#selection-focus>" 36 | "fsfg" 37 | <#selection-focus> -
trunk/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt
r120761 r231717 1 1 PASSED 2 -
trunk/LayoutTests/fast/css/css3-ch-unit-expected.txt
r180171 r231717 37 37 0000 38 38 0000 39 0000 There should be more than one green '|' visible (non-monospaced fonts): 40 |||0||| 41 |||0||| 42 |||0||| 39 0000 40 There should be more than one green '|' visible (non-monospaced fonts): 41 |||0 42 ||| 43 |||0 44 ||| 45 |||0 46 ||| 43 47 This box has a 20px font size. The last two '0's should be the same size. 44 48 0 -
trunk/LayoutTests/fast/css/percent-min-width-img-src-change-expected.txt
r138332 r231717 1 1 PASS 2 2 3 -
trunk/LayoutTests/fast/css/percent-width-img-src-change-expected.txt
r137960 r231717 1 1 PASS 2 2 3 3 4 -
trunk/LayoutTests/fast/css/pseudo-empty-display-none-expected.txt
r91744 r231717 1 1 Test for bug 26570. There should be two green boxes on this page. 2 2 3 3 4 PASS -
trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash-expected.txt
r200216 r231717 1 1 This tests whether clicking on an anchor in an iframe with scrolling="no" will scroll to anchor. If clicking on the link below triggers a scroll, the test passes. 2 2 3 4 3 PASS -
trunk/LayoutTests/fast/dom/HTMLDivElement/align/getset-expected.txt
r21687 r231717 1 1 Tests: getting and setting HTMLDivElement::align 2 2 3 Condition(s): 3 4 Testing valid, invalid, and empty values -
trunk/LayoutTests/fast/dom/HTMLSelectElement/listbox-select-reset-expected.txt
r21687 r231717 3 3 4 4 You should see two element IDs below, and the word "SUCCESS" twice: 5 5 6 multiSelectElement: SUCCESS 6 7 -
trunk/LayoutTests/fast/dom/HTMLTableElement/table-with-invalid-border-expected.txt
r140436 r231717 1 1 https://bugs.webkit.org/show_bug.cgi?id=102112: There should be a black box below. 2 2 3 PASS getComputedStyle(document.querySelector("table")).borderTopWidth is "1px" 3 4 -
trunk/LayoutTests/fast/forms/option-mouseevents-expected.txt
r41589 r231717 2 2 Bug 3248: Mouse events on OPTION element seem to be ignored 3 3 https://bugs.webkit.org/show_bug.cgi?id=3248 4 4 5 5 6 -
trunk/LayoutTests/fast/history/multiple-classes-visited-expected.txt
r144152 r231717 2 2 3 3 One Two 4 4 5 PASS firstStyle.color became secondStyle.color 5 6 PASS successfullyParsed is true -
trunk/LayoutTests/fast/history/self-is-visited-expected.txt
r144152 r231717 2 2 3 3 One Two 4 4 5 PASS firstStyle.color became different from secondStyle.color 5 6 PASS firstStyle.backgroundColor became different from secondStyle.backgroundColor -
trunk/LayoutTests/fast/html/marquee-reparent-check-expected.txt
r229425 r231717 8 8 TEST COMPLETE 9 9 10 TEST 10 TEST 11 -
trunk/LayoutTests/fast/inline-block/anonymous-block-crash-expected.txt
r59786 r231717 1 1 This test verifies that no crash occurs. 2 3 2 PASS -
trunk/LayoutTests/fast/inline/inline-position-top-align-expected.txt
r81055 r231717 1 1 pre-text after-text Something 2 2 3 Tests for hitTest of element 3 4 bug 45164: REGRESSION: Clickable area too large -
trunk/LayoutTests/fast/invalid/test-case-tr-th-td-should-not-close-dl-list-expected.txt
r36051 r231717 6 6 7 7 test 8 8 9 PASSED. 9 10 PASSED. -
trunk/LayoutTests/fast/overflow/scrollbar-click-retains-focus-expected.txt
r136642 r231717 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 4 6 5 -
trunk/LayoutTests/fast/parser/comments-expected.txt
r67233 r231717 3 3 Basic comments: 4 4 PASSED 5 5 6 Comment series: 6 7 PASSED 8 7 9 Dash runs: 8 10 PASSED PASSED PASSED … … 18 20 19 21 White space after comment close: 22 20 23 Extra comment after markup declaration close: 21 24 FAILED: extra comment end and markup declaration close --> -
trunk/LayoutTests/fast/parser/fragment-parser-doctype-expected.txt
r78286 r231717 7 7 TEST COMPLETE 8 8 9 -
trunk/LayoutTests/fast/ruby/ruby-base-merge-block-children-crash-2-expected.txt
r172847 r231717 1 1 2 2 3 3 4 WebKit bug #127515. This test must be run under Guard Malloc. It passes if it does not crash. -
trunk/LayoutTests/fast/spatial-navigation/snav-radio-group-expected.txt
r72880 r231717 3 3 4 4 5 6 5 6 6 6 7 8 7 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "down" -
trunk/LayoutTests/fast/sub-pixel/table-cells-have-stable-width-expected.txt
r129529 r231717 1 1 PASS Cell in AutoTable has expected size 2 2 PASS Cell in FixedTable has expected size 3 Cc: AutoTableLayout 3 Cc: AutoTableLayout 4 4 foo 5 5 FixedTableLayout -
trunk/LayoutTests/fast/table/table-row-oveflow-crash-expected.txt
r225960 r231717 2 2 5 3 3 2 4 4 5 43 -
trunk/LayoutTests/fast/table/table-with-borderattr-null-expected.txt
r140436 r231717 1 1 There should be a black box below. 2 2 3 PASS getComputedStyle(document.querySelector("table")).borderTopWidth is "1px" 3 4 -
trunk/LayoutTests/fast/table/table-with-borderattr-set-to-null-expected.txt
r140436 r231717 1 1 There should be a black box below. 2 2 3 PASS getComputedStyle(document.querySelector("table")).borderTopWidth is "1px" 3 4 -
trunk/LayoutTests/fast/text/international/dynamic-text-combine-crash-expected.txt
r222221 r231717 4 4 5 5 6 -
trunk/LayoutTests/fast/xsl/mozilla-tests-expected.txt
r166134 r231717 39 39 Desired Result: true 40 40 Result:true 41 41 42 Testing basic xsl:apply-templates 42 43 Test:<xsl:apply-templates/> -
trunk/LayoutTests/http/tests/misc/large-js-program-expected.txt
r186606 r231717 4 4 This test should generate an out of stack exception, but have no other output. 5 5 6 -
trunk/LayoutTests/imported/blink/plugins/empty-per-context-data-expected.txt
r190629 r231717 1 2 1 3 2 This tests that invoking a plugin object from a (iframe) document that is no longer visible in a frame doesn't crash the renderer. If this test is successful, the word SUCCESS should be seen below. -
trunk/LayoutTests/imported/w3c/ChangeLog
r231698 r231717 1 2018-05-11 Ryosuke Niwa <rniwa@webkit.org> 2 3 Tapping after CSS-based table casues an infinite loop in wordRangeFromPosition 4 https://bugs.webkit.org/show_bug.cgi?id=185465 5 <rdar://problem/35263057> 6 7 Reviewed by Antti Koivisto. 8 9 Rebaselined the tests. h2 10 11 * web-platform-tests/dom/nodes/getElementsByClassName-30-expected.txt: table is generating a new line as expected. 12 * web-platform-tests/html/syntax/parsing/html5lib_menuitem-element-expected.txt: h2 is generating an extra line 13 to emulate its margin as expected. 14 * web-platform-tests/html/syntax/parsing/html5lib_tests11-expected.txt: Ditto. 15 * web-platform-tests/html/syntax/parsing/html5lib_tests21-expected.txt: Ditto. 16 * web-platform-tests/html/syntax/parsing/html5lib_tests25-expected.txt: Ditto. 17 * web-platform-tests/html/syntax/parsing/html5lib_webkit02-expected.txt: Ditto. 18 1 19 2018-05-11 Youenn Fablet <youenn@apple.com> 2 20 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/getElementsByClassName-30-expected.txt
r204090 r231717 27 27 caption 28 28 th 29 td tt u 29 td 30 tt u 30 31 ul 31 32 var -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_menuitem-element-expected.txt
r210823 r231717 23 23 PASS html5lib_menuitem-element.html 4b712b488be9ee047c139c1b0cd955bae990b8e5 24 24 afcd3b1e3317ac609ddab924d836ba1e3873b80f 25 25 26 Input 26 27 … … 49 50 | "B" 50 51 95c0c6923fe609297c1592f2cb82bb9f2d0f5aed 52 51 53 Input 52 54 … … 75 77 | "B" 76 78 e2772fe779cbcefb4458f169a0cd495cf7115845 79 77 80 Input 78 81 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests11-expected.txt
r210823 r231717 19 19 PASS html5lib_tests11.html 16e68d18f8f0fb81013fe77a30b7d396c5081e5e 20 20 0e5897aafe87e460f84576c2d1d983504d12a7db 21 21 22 Input 22 23 … … 157 158 | zoomAndPan="" 158 159 a8f7a23601363454b4a13f66aed99ec9708ae87b 160 159 161 Input 160 162 … … 185 187 | filterRes="" 186 188 f8f7f6c576acc9eb874acb0dce6988f0f7b6fc5f 189 187 190 Input 188 191 … … 213 216 | filterRes="" 214 217 fb4dc9f70129a8a045fca3a1e3acee052d0990b3 218 215 219 Input 216 220 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests21-expected.txt
r206201 r231717 26 26 PASS html5lib_tests21.html caa80af33c7880aaddd17824efff1774ece01325 27 27 80607dd011814b8d3ef5c9ca380fec044dd5e1aa 28 28 29 Input 29 30 … … 48 49 | "foo]]]>" 49 50 c9f579bf49de2d4c553d03e43772c0d94be474c0 51 50 52 Input 51 53 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_tests25-expected.txt
r210823 r231717 23 23 PASS html5lib_tests25.html d79f9119d02447226cc2d151044e6cffc5409e81 24 24 de4aa726e09215ba9c50b97d257e6c6b880107f1 25 25 26 Input 26 27 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/html5lib_webkit02-expected.txt
r210823 r231717 20 20 PASS html5lib_webkit02.html 90d3f6f2dff994f63293ca46f7cd50a75cde96a6 21 21 6e33515b4dc011dd390d433a6358bf68b786b1fd 22 22 23 Input 23 24 -
trunk/LayoutTests/inspector/console/js-isLikelyStackTrace-expected.txt
r225950 r231717 1 1 Test stack trace detection heuristic. 2 2 3 3 4 == Running test suite: WI.StackTrace.isLikelyStackTrace -
trunk/LayoutTests/inspector/console/js-source-locations-expected.txt
r188598 r231717 8 8 CONSOLE MESSAGE: line 10: error 2 9 9 Tests that JavaScript errors and warnings from inline script tags and external files are sent to the console with correct line and column information. 10 10 11 {"source":"console-api","level":"error","text":"error script","location":"errors.js:1:14","parameters":[{"type":"string"}]} 11 12 {"source":"console-api","level":"warning","text":"warn script","location":"errors.js:1:44","parameters":[{"type":"string"}]} -
trunk/LayoutTests/mathml/out-of-flow-in-token-crash-expected.txt
r224894 r231717 19 19 20 20 RenderMathMLToken 21 22 21 RenderMathMLUnderOver 23 22 -
trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt
r202934 r231717 9 9 { 10 10 x y z x y z x y z x y z x y z 11 11 12 { 12 13 1 -
trunk/LayoutTests/platform/mac/accessibility/table-cells-roles-expected.txt
r217171 r231717 5 5 3. Ukraine Kiev 6 6 All 3 countries 3 capitals 7 7 8 8 9 table2 -
trunk/LayoutTests/platform/mac/accessibility/table-roles-hierarchy-expected.txt
r217171 r231717 4 4 3. Ukraine Kiev 5 5 All 3 countries 3 capitals 6 6 7 7 8 -
trunk/LayoutTests/svg/foreignObject/fO-fixed-position-crash-expected.txt
r119914 r231717 1 1 PASS 2 -
trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic-expected.txt
r187905 r231717 1 1 Some text 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. here Container 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 3 here Container 3 4 Intermediate 4 5 Child -
trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera-expected.txt
r116543 r231717 1 The text on this element should be selectable. Hovering on this element should cause a highlight. Element at 98, 200 has id "background": PASS 1 The text on this element should be selectable. Hovering on this element should cause a highlight. 2 Element at 98, 200 has id "background": PASS 2 3 Element at 302, 200 has id "background": PASS 3 4 Element at 200, 98 has id "background": PASS -
trunk/Source/WebCore/ChangeLog
r231716 r231717 1 2018-05-11 Ryosuke Niwa <rniwa@webkit.org> 2 3 Tapping after CSS-based table casues an infinite loop in wordRangeFromPosition 4 https://bugs.webkit.org/show_bug.cgi?id=185465 5 <rdar://problem/35263057> 6 7 Reviewed by Antti Koivisto. 8 9 The bug was caused by TextIterator not emitting a line break when exiting a CSS-based table when an element 10 with `display: table-row` has an invisible text node. Specifically, TextIterator::exitNode is never called on 11 an element with `table-cell: row` when m_node is a text node with whitespaces which appears after an element 12 with `display: table-cell`. 13 14 For example, for a tree structure like: 15 table-row (R) 16 table-cell (C) 17 "text" (1) 18 " " (2) 19 Getting out of (C) would result in moving onto (2) without generating a line break for (R). 20 21 When this happens in nextBoundary as it tries to find the end of the last word in the table cell, we end up 22 finding the end of the document as the end of the word. As a result, nextWordBoundaryInDirection, the caller 23 of nextBoundary, ends up infinite looping between the positon at the end of the document and the position 24 immediately before the last word in the last table cell when it traverses words backwards. 25 26 This patch fixes the hang by addressing this root cause in TextIterator. Namely, TextIterator now generates 27 a line break when exiting a block while walking up ancestors in TextIterator::advance(). 28 29 Tests: editing/selection/tapping-in-table-at-end-of-document.html 30 editing/text-iterator/table-at-end-of-document.html 31 32 * editing/TextIterator.cpp: 33 (WebCore::TextIterator::advance): Fixed the bug. 34 (WebCore::shouldEmitNewlineAfterNode): Do generate a new line at the end of a document when we're trying to 35 generate every visible poitions even there are no renderers beyond this point. e.g. a position inside the 36 last cell of a table at the end of a document hits this condition. 37 (WebCore::shouldEmitExtraNewlineForNode): Don't emit a line break when the render box's height is 0px 38 to avoid generating many empty lines for empty paragraph and header elements (this function is used to generate 39 a blank line between p's and h1/h2/...'s). 40 (WebCore::TextIterator::exitNode): 41 1 42 2018-05-11 Dean Jackson <dino@apple.com> 2 43 -
trunk/Source/WebCore/editing/TextIterator.cpp
r231565 r231717 537 537 } 538 538 next = nextSibling(m_behavior, *m_node); 539 if (next && m_node->renderer()) 540 exitNode(m_node); 539 541 } 540 542 } … … 999 1001 } 1000 1002 1001 static bool shouldEmitNewlineAfterNode(Node& node )1003 static bool shouldEmitNewlineAfterNode(Node& node, bool emitsCharactersBetweenAllVisiblePositions = false) 1002 1004 { 1003 1005 // FIXME: It should be better but slower to create a VisiblePosition here. 1004 1006 if (!shouldEmitNewlinesBeforeAndAfterNode(node)) 1005 1007 return false; 1006 // Check if this is the very last renderer in the document. 1007 // If so, then we should not emit a newline. 1008 1009 // Don't emit a new line at the end of the document unless we're matching the behavior of VisiblePosition. 1010 if (emitsCharactersBetweenAllVisiblePositions) 1011 return true; 1008 1012 Node* subsequentNode = &node; 1009 1013 while ((subsequentNode = NodeTraversal::nextSkippingChildren(*subsequentNode))) { … … 1038 1042 return false; 1039 1043 1040 int bottomMargin = downcast<RenderBox>(*renderer).collapsedMarginAfter(); 1041 int fontSize = downcast<RenderBox>(*renderer).style().fontDescription().computedPixelSize(); 1044 auto& renderBox = downcast<RenderBox>(*renderer); 1045 if (!renderBox.height()) 1046 return false; 1047 1048 int bottomMargin = renderBox.collapsedMarginAfter(); 1049 int fontSize = renderBox.style().fontDescription().computedPixelSize(); 1042 1050 return bottomMargin * 2 >= fontSize; 1043 1051 } … … 1175 1183 // TextIterator in _web_attributedStringFromRange. 1176 1184 // See <rdar://problem/5428427> for an example of how this mismatch will cause problems. 1177 if (m_lastTextNode && shouldEmitNewlineAfterNode(*m_node )) {1185 if (m_lastTextNode && shouldEmitNewlineAfterNode(*m_node, m_behavior & TextIteratorEmitsCharactersBetweenAllVisiblePositions)) { 1178 1186 // use extra newline to represent margin bottom, as needed 1179 1187 bool addNewline = shouldEmitExtraNewlineForNode(*m_node);
Note: See TracChangeset
for help on using the changeset viewer.