Changeset 140693 in webkit
- Timestamp:
- Jan 24, 2013 10:46:11 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140691 r140693 1 2013-01-22 Robert Hogan <robert@webkit.org> 2 3 Inline Containing Only Collapsed Whitespace Not Getting a Linebox 4 https://bugs.webkit.org/show_bug.cgi?id=31397 5 6 Reviewed by David Hyatt. 7 8 * fast/css/first-letter-capitalized-edit-select-crash-expected.txt: 9 * fast/inline/inline-containing-collapsed-whitespace-treated-as-empty-expected.html: Added. 10 * fast/inline/inline-containing-collapsed-whitespace-treated-as-empty-vertical-rl-expected.html: Added. 11 * fast/inline/inline-containing-collapsed-whitespace-treated-as-empty-vertical-rl.html: Added. 12 * fast/inline/inline-containing-collapsed-whitespace-treated-as-empty.html: Added. 13 * platform/chromium/TestExpectations: 14 * platform/efl/TestExpectations: 15 * platform/gtk/TestExpectations: 16 * platform/mac/TestExpectations: 17 * platform/qt/TestExpectations: 18 1 19 2013-01-24 Andrey Lushnikov <lushnikov@chromium.org> 2 20 -
trunk/LayoutTests/fast/css/first-letter-capitalized-edit-select-crash-expected.txt
r117197 r140693 1 1 Pass if no crash or assert in debug 2 2 3 3 -
trunk/LayoutTests/platform/chromium/TestExpectations
r140670 r140693 4334 4334 webkit.org/b/107579 [ Debug ] media/track/track-css-property-whitelist.html [ Crash ] 4335 4335 4336 # Rebaseline required after https://webkit.org/b/31397 4337 webkit.org/b/107567 svg/batik/text/xmlSpace.svg [ Failure ] 4338 webkit.org/b/107567 fast/text/capitalize-empty-generated-string.html [ Failure ] 4339 webkit.org/b/107567 fast/text/whitespace/007.html [ Failure ] 4340 webkit.org/b/107567 fast/text/whitespace/006.html [ Failure ] 4341 webkit.org/b/107567 fast/inline/drawStyledEmptyInlinesWithWS.html [ Failure ] 4342 webkit.org/b/107567 tables/mozilla/bugs/bug1318.html [ Failure ] 4343 webkit.org/b/107567 fast/inline/drawStyledEmptyInlines.html [ Failure ] 4344 webkit.org/b/107567 tables/mozilla/bugs/bug113235-3.html [ Failure ] 4345 webkit.org/b/107567 css2.1/t0505-c16-descendant-01-e.html [ Failure ] 4346 webkit.org/b/107567 tables/mozilla/bugs/bug1188.html [ Failure ] 4347 webkit.org/b/107567 editing/selection/extend-by-sentence-001.html [ Failure ] 4348 webkit.org/b/107567 svg/carto.net/combobox.svg [ Failure ] -
trunk/LayoutTests/platform/efl/TestExpectations
r140679 r140693 1816 1816 webkit.org/b/107476 fast/block/float/024.html [ Failure ] 1817 1817 webkit.org/b/107476 fast/block/margin-collapse/empty-clear-blocks.html [ Failure ] 1818 1819 # Rebaseline required after https://webkit.org/b/31397 1820 webkit.org/b/107567 svg/batik/text/xmlSpace.svg [ Failure ] 1821 webkit.org/b/107567 fast/text/capitalize-empty-generated-string.html [ Failure ] 1822 webkit.org/b/107567 fast/text/whitespace/007.html [ Failure ] 1823 webkit.org/b/107567 fast/text/whitespace/006.html [ Failure ] 1824 webkit.org/b/107567 fast/inline/drawStyledEmptyInlinesWithWS.html [ Failure ] 1825 webkit.org/b/107567 tables/mozilla/bugs/bug1318.html [ Failure ] 1826 webkit.org/b/107567 fast/inline/drawStyledEmptyInlines.html [ Failure ] 1827 webkit.org/b/107567 tables/mozilla/bugs/bug113235-3.html [ Failure ] 1828 webkit.org/b/107567 css2.1/t0505-c16-descendant-01-e.html [ Failure ] 1829 webkit.org/b/107567 tables/mozilla/bugs/bug1188.html [ Failure ] 1830 webkit.org/b/107567 editing/selection/extend-by-sentence-001.html [ Failure ] 1831 webkit.org/b/107567 svg/carto.net/combobox.svg [ Failure ] -
trunk/LayoutTests/platform/gtk/TestExpectations
r140687 r140693 58 58 webkit.org/b/107476 fast/block/margin-collapse/empty-clear-blocks.html [ Failure ] 59 59 60 # Rebaseline required after https://webkit.org/b/31397 61 webkit.org/b/107567 svg/batik/text/xmlSpace.svg [ Failure ] 62 webkit.org/b/107567 fast/text/capitalize-empty-generated-string.html [ Failure ] 63 webkit.org/b/107567 fast/text/whitespace/007.html [ Failure ] 64 webkit.org/b/107567 fast/text/whitespace/006.html [ Failure ] 65 webkit.org/b/107567 fast/inline/drawStyledEmptyInlinesWithWS.html [ Failure ] 66 webkit.org/b/107567 tables/mozilla/bugs/bug1318.html [ Failure ] 67 webkit.org/b/107567 fast/inline/drawStyledEmptyInlines.html [ Failure ] 68 webkit.org/b/107567 tables/mozilla/bugs/bug113235-3.html [ Failure ] 69 webkit.org/b/107567 css2.1/t0505-c16-descendant-01-e.html [ Failure ] 70 webkit.org/b/107567 tables/mozilla/bugs/bug1188.html [ Failure ] 71 webkit.org/b/107567 editing/selection/extend-by-sentence-001.html [ Failure ] 72 webkit.org/b/107567 svg/carto.net/combobox.svg [ Failure ] 60 73 #//////////////////////////////////////////////////////////////////////////////////////// 61 74 # Expected failures -
trunk/LayoutTests/platform/mac/TestExpectations
r140679 r140693 1289 1289 webkit.org/b/107208 fast/regions/overflow-size-change-with-stacking-context.html [ Pass Failure ImageOnlyFailure ] 1290 1290 1291 # Rebaseline required after https://webkit.org/b/31397 1292 webkit.org/b/107567 svg/batik/text/xmlSpace.svg [ Failure ] 1293 webkit.org/b/107567 fast/text/capitalize-empty-generated-string.html [ Failure ] 1294 webkit.org/b/107567 fast/text/whitespace/007.html [ Failure ] 1295 webkit.org/b/107567 fast/text/whitespace/006.html [ Failure ] 1296 webkit.org/b/107567 fast/inline/drawStyledEmptyInlinesWithWS.html [ Failure ] 1297 webkit.org/b/107567 tables/mozilla/bugs/bug1318.html [ Failure ] 1298 webkit.org/b/107567 fast/inline/drawStyledEmptyInlines.html [ Failure ] 1299 webkit.org/b/107567 tables/mozilla/bugs/bug113235-3.html [ Failure ] 1300 webkit.org/b/107567 css2.1/t0505-c16-descendant-01-e.html [ Failure ] 1301 webkit.org/b/107567 tables/mozilla/bugs/bug1188.html [ Failure ] 1302 webkit.org/b/107567 editing/selection/extend-by-sentence-001.html [ Failure ] 1303 webkit.org/b/107567 svg/carto.net/combobox.svg [ Failure ] -
trunk/LayoutTests/platform/qt/TestExpectations
r140689 r140693 2544 2544 webkit.org/b/107476 fast/block/float/024.html [ Failure ] 2545 2545 webkit.org/b/107476 fast/block/margin-collapse/empty-clear-blocks.html [ Failure ] 2546 2547 # Rebaseline required after https://webkit.org/b/31397 2548 webkit.org/b/107567 svg/batik/text/xmlSpace.svg [ Failure ] 2549 webkit.org/b/107567 fast/text/capitalize-empty-generated-string.html [ Failure ] 2550 webkit.org/b/107567 fast/text/whitespace/007.html [ Failure ] 2551 webkit.org/b/107567 fast/text/whitespace/006.html [ Failure ] 2552 webkit.org/b/107567 fast/inline/drawStyledEmptyInlinesWithWS.html [ Failure ] 2553 webkit.org/b/107567 tables/mozilla/bugs/bug1318.html [ Failure ] 2554 webkit.org/b/107567 fast/inline/drawStyledEmptyInlines.html [ Failure ] 2555 webkit.org/b/107567 tables/mozilla/bugs/bug113235-3.html [ Failure ] 2556 webkit.org/b/107567 css2.1/t0505-c16-descendant-01-e.html [ Failure ] 2557 webkit.org/b/107567 tables/mozilla/bugs/bug1188.html [ Failure ] 2558 webkit.org/b/107567 editing/selection/extend-by-sentence-001.html [ Failure ] 2559 webkit.org/b/107567 svg/carto.net/combobox.svg [ Failure ] -
trunk/Source/WebCore/ChangeLog
r140691 r140693 1 2013-01-22 Robert Hogan <robert@webkit.org> 2 3 Inline Containing Only Collapsed Whitespace Not Getting a Linebox 4 https://bugs.webkit.org/show_bug.cgi?id=31397 5 6 Reviewed by David Hyatt. 7 8 Treat inlines containing only collapsed whitespace as empty. This allows them 9 to get a linebox. 10 11 Test: fast/inline/inline-containing-collapsed-whitespace-treated-as-empty.html 12 13 * dom/Position.cpp: 14 (WebCore::boundingBoxLogicalHeight): 15 (WebCore): 16 (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): 17 * rendering/InlineIterator.h: 18 (WebCore::isEmptyInline): 19 (WebCore): 20 (WebCore::bidiNextShared): 21 (WebCore::bidiFirstSkippingEmptyInlines): 22 * rendering/RenderBlockLineLayout.cpp: 23 (WebCore::alwaysRequiresLineBox): 24 (WebCore::requiresLineBox): 25 (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): 26 * rendering/RenderText.cpp: 27 * rendering/RenderText.h: 28 (RenderText): 29 1 30 2013-01-24 Andrey Lushnikov <lushnikov@chromium.org> 2 31 -
trunk/Source/WebCore/dom/Position.cpp
r139166 r140693 29 29 #include "CSSComputedStyleDeclaration.h" 30 30 #include "HTMLNames.h" 31 #include "InlineIterator.h" 31 32 #include "InlineTextBox.h" 32 33 #include "Logging.h" 33 34 #include "PositionIterator.h" 34 35 #include "RenderBlock.h" 36 #include "RenderInline.h" 35 37 #include "RenderText.h" 36 38 #include "RuntimeEnabledFeatures.h" … … 842 844 } 843 845 846 static int boundingBoxLogicalHeight(RenderObject *o, const IntRect &rect) 847 { 848 return o->style()->isHorizontalWritingMode() ? rect.height() : rect.width(); 849 } 850 844 851 bool Position::hasRenderedNonAnonymousDescendantsWithHeight(RenderObject* renderer) 845 852 { … … 847 854 for (RenderObject *o = renderer->firstChild(); o && o != stop; o = o->nextInPreOrder()) 848 855 if (o->nonPseudoNode()) { 849 if ((o->isText() && toRenderText(o)->linesLogicalBoundingBox().height()) 850 || (o->isBox() && toRenderBox(o)->pixelSnappedLogicalHeight())) 856 if ((o->isText() && boundingBoxLogicalHeight(o, toRenderText(o)->linesBoundingBox())) 857 || (o->isBox() && toRenderBox(o)->pixelSnappedLogicalHeight()) 858 || (o->isRenderInline() && isEmptyInline(o) && boundingBoxLogicalHeight(o, toRenderInline(o)->linesBoundingBox()))) 851 859 return true; 852 860 } -
trunk/Source/WebCore/rendering/InlineIterator.h
r139213 r140693 177 177 }; 178 178 179 static bool isEmptyInline(RenderObject* object) 180 { 181 if (!object->isRenderInline()) 182 return false; 183 184 if (!object->firstChild()) 185 return true; 186 187 return object->firstChild()->isText() && (object->firstChild() == object->lastChild()) && toRenderText(object->firstChild())->isAllCollapsibleWhitespace(); 188 } 189 179 190 // FIXME: This function is misleadingly named. It has little to do with bidi. 180 191 // This function will iterate over inlines within a block, optionally notifying … … 226 237 227 238 if (isIteratorTarget(next) 228 || ((emptyInlineBehavior == IncludeEmptyInlines || !next->firstChild()) // Always return EMPTY inlines.239 || ((emptyInlineBehavior == IncludeEmptyInlines || isEmptyInline(next)) // Always return EMPTY inlines. 229 240 && next->isRenderInline())) 230 241 break; … … 266 277 if (o->isRenderInline()) { 267 278 notifyObserverEnteredObject(resolver, o); 268 if ( o->firstChild())279 if (!isEmptyInline(o)) 269 280 o = bidiNextSkippingEmptyInlines(root, o, resolver); 270 281 else { -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r140570 r140693 2213 2213 } 2214 2214 2215 static bool alwaysRequiresLineBox(Render Inline* flow)2215 static bool alwaysRequiresLineBox(RenderObject* flow) 2216 2216 { 2217 2217 // FIXME: Right now, we only allow line boxes for inlines that are truly empty. 2218 2218 // We need to fix this, though, because at the very least, inlines containing only 2219 2219 // ignorable whitespace should should also have line boxes. 2220 return !flow->firstChild() && flow->hasInlineDirectionBordersPaddingOrMargin();2220 return isEmptyInline(flow) && toRenderInline(flow)->hasInlineDirectionBordersPaddingOrMargin(); 2221 2221 } 2222 2222 … … 2226 2226 return false; 2227 2227 2228 if (it.m_obj->isRenderInline() && !alwaysRequiresLineBox( toRenderInline(it.m_obj)) && !requiresLineBoxForContent(toRenderInline(it.m_obj), lineInfo))2228 if (it.m_obj->isRenderInline() && !alwaysRequiresLineBox(it.m_obj) && !requiresLineBoxForContent(toRenderInline(it.m_obj), lineInfo)) 2229 2229 return false; 2230 2230 … … 2233 2233 2234 2234 UChar current = it.current(); 2235 return current != ' ' && current != '\t' && current != softHyphen && (current != '\n' || it.m_obj->preservesNewline())2236 && !skipNonBreakingSpace(it, lineInfo);2235 bool notJustWhitespace = current != ' ' && current != '\t' && current != softHyphen && (current != '\n' || it.m_obj->preservesNewline()) && !skipNonBreakingSpace(it, lineInfo); 2236 return notJustWhitespace || isEmptyInline(it.m_obj); 2237 2237 } 2238 2238 … … 2673 2673 } else if (current.m_obj->isRenderInline()) { 2674 2674 // Right now, we should only encounter empty inlines here. 2675 ASSERT( !current.m_obj->firstChild());2675 ASSERT(isEmptyInline(current.m_obj)); 2676 2676 2677 2677 RenderInline* flowBox = toRenderInline(current.m_obj); … … 2681 2681 // If this object is at the start of the line, we need to behave like list markers and 2682 2682 // start ignoring spaces. 2683 bool requiresLineBox = alwaysRequiresLineBox( flowBox);2683 bool requiresLineBox = alwaysRequiresLineBox(current.m_obj); 2684 2684 if (requiresLineBox || requiresLineBoxForContent(flowBox, lineInfo)) { 2685 2685 // An empty inline that only has line-height, vertical-align or font-metrics will only get a -
trunk/Source/WebCore/rendering/RenderText.cpp
r140244 r140693 1615 1615 } 1616 1616 1617 IntRect RenderText::linesLogicalBoundingBox() const1618 {1619 IntRect rect = linesBoundingBox();1620 1621 return style()->isHorizontalWritingMode() ? rect : IntRect(rect.x(), rect.y(), rect.height(), rect.width());1622 }1623 1624 1617 LayoutRect RenderText::linesVisualOverflowBoundingBox() const 1625 1618 { -
trunk/Source/WebCore/rendering/RenderText.h
r140640 r140693 97 97 virtual IntRect linesBoundingBox() const; 98 98 LayoutRect linesVisualOverflowBoundingBox() const; 99 IntRect linesLogicalBoundingBox() const;100 99 101 100 FloatPoint firstRunOrigin() const;
Note: See TracChangeset
for help on using the changeset viewer.