Changeset 83638 in webkit
- Timestamp:
- Apr 12, 2011 2:28:24 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83630 r83638 1 2011-04-12 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 REGRESSION(r82419): extra border in t0805-c5519-ibrdr-r-00-a.html 6 https://bugs.webkit.org/show_bug.cgi?id=57459 7 8 * fast/borders/bidi-002.html: Added. 9 * fast/borders/bidi-004.html: Added. 10 * fast/borders/bidi-009a.html: Added. 11 * platform/mac/fast/borders/bidi-002-expected.checksum: Added. 12 * platform/mac/fast/borders/bidi-002-expected.png: Added. 13 * platform/mac/fast/borders/bidi-002-expected.txt: Added. 14 * platform/mac/fast/borders/bidi-004-expected.checksum: Added. 15 * platform/mac/fast/borders/bidi-004-expected.png: Added. 16 * platform/mac/fast/borders/bidi-004-expected.txt: Added. 17 * platform/mac/fast/borders/bidi-009a-expected.checksum: Added. 18 * platform/mac/fast/borders/bidi-009a-expected.png: Added. 19 * platform/mac/fast/borders/bidi-009a-expected.txt: Added. 20 1 21 2011-04-12 Jessie Berlin <jberlin@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r83637 r83638 1 2011-04-12 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 REGRESSION(r82419): extra border in t0805-c5519-ibrdr-r-00-a.html 6 https://bugs.webkit.org/show_bug.cgi?id=57459 7 8 Slightly change the way we decide if a InlineFlowBox is the last box for its renderer. 9 We include the border in that box under these conditions: 10 (1) The next line was not created, or it is constructed. We check the previous line for rtl. 11 (2) The logicallyLastRun is not a descendant of this renderer. 12 (3) The logicallyLastRun is a descendant of this renderer, but it is the last child of this renderer and it does not wrap to the next line. 13 I added the tests from bug 47210, because now the draw the borders correctly. 14 15 Tests: fast/borders/bidi-002.html 16 fast/borders/bidi-004.html 17 fast/borders/bidi-009a.html 18 19 * rendering/InlineFlowBox.cpp: 20 (WebCore::InlineFlowBox::onEndChain): 21 (WebCore::isAnsectorAndWithinBlock): 22 (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): 23 * rendering/InlineFlowBox.h: 24 * rendering/RenderBlock.h: 25 * rendering/RenderBlockLineLayout.cpp: 26 (WebCore::RenderBlock::constructLine): 27 (WebCore::RenderBlock::layoutInlineChildren): 28 1 29 2011-04-12 Geoffrey Garen <ggaren@apple.com> 2 30 -
trunk/Source/WebCore/rendering/InlineFlowBox.cpp
r83075 r83638 263 263 RenderObject* curr = endObject; 264 264 RenderObject* parent = curr->parent(); 265 while (parent && !parent->isRenderBlock()) {266 if (parent->lastChild() != curr || parent == renderer())265 while (parent && (!parent->isRenderBlock() || parent->isInline())) { 266 if (parent->lastChild() != curr) 267 267 return false; 268 if (parent == renderer()) 269 return true; 268 270 269 271 curr = parent; … … 277 279 { 278 280 RenderObject* object = child; 279 while (object && !object->isRenderBlock()) {281 while (object && (!object->isRenderBlock() || object->isInline())) { 280 282 if (object == ancestor) 281 283 return true; … … 285 287 } 286 288 287 void InlineFlowBox::determineSpacingForFlowBoxes(bool lastLine, RenderObject* endObject, RenderObject* logicallyLastRunRenderer)289 void InlineFlowBox::determineSpacingForFlowBoxes(bool lastLine, bool isLogicallyLastRunWrapped, RenderObject* logicallyLastRunRenderer) 288 290 { 289 291 // All boxes start off open. They will not apply any margins/border/padding on … … 308 310 if (!lineBoxList->lastLineBox()->isConstructed()) { 309 311 RenderInline* inlineFlow = toRenderInline(renderer()); 310 bool isLastObjectOnLine = (endObject && endObject->isText()) ? !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer->parent()) : onEndChain(logicallyLastRunRenderer); 311 312 bool isLastObjectOnLine = !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer) || (onEndChain(logicallyLastRunRenderer) && !isLogicallyLastRunWrapped); 313 314 // We include the border under these conditions: 315 // (1) The next line was not created, or it is constructed. We check the previous line for rtl. 316 // (2) The logicallyLastRun is not a descendant of this renderer. 317 // (3) The logicallyLastRun is a descendant of this renderer, but it is the last child of this renderer and it does not wrap to the next line. 318 312 319 if (ltr) { 313 320 if (!nextLineBox() … … 328 335 if (currChild->isInlineFlowBox()) { 329 336 InlineFlowBox* currFlow = static_cast<InlineFlowBox*>(currChild); 330 currFlow->determineSpacingForFlowBoxes(lastLine, endObject, logicallyLastRunRenderer);337 currFlow->determineSpacingForFlowBoxes(lastLine, isLogicallyLastRunWrapped, logicallyLastRunRenderer); 331 338 } 332 339 } -
trunk/Source/WebCore/rendering/InlineFlowBox.h
r83075 r83638 160 160 161 161 // Helper functions used during line construction and placement. 162 void determineSpacingForFlowBoxes(bool lastLine, RenderObject* endObject, RenderObject* logicallyLastRunRenderer);162 void determineSpacingForFlowBoxes(bool lastLine, bool isLogicallyLastRunWrapped, RenderObject* logicallyLastRunRenderer); 163 163 int getFlowSpacingLogicalWidth(); 164 164 bool onEndChain(RenderObject* endObject); -
trunk/Source/WebCore/rendering/RenderBlock.h
r83240 r83638 502 502 InlineIterator findNextLineBreak(InlineBidiResolver&, bool firstLine, bool& isLineEmpty, LineBreakIteratorInfo&, bool& previousLineBrokeCleanly, bool& hyphenated, 503 503 EClear*, FloatingObject* lastFloatFromPreviousLine, Vector<RenderBox*>& positionedObjects); 504 RootInlineBox* constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool firstLine, bool lastLine, RenderObject* endObject, RenderObject* logicallyLastRunRenderer);504 RootInlineBox* constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool firstLine, bool lastLine, bool isLogicallyLastRunWrapped, RenderObject* logicallyLastRunRenderer); 505 505 InlineFlowBox* createLineBoxes(RenderObject*, bool firstLine, InlineBox* childBox); 506 506 -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r83629 r83638 267 267 } 268 268 269 RootInlineBox* RenderBlock::constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool firstLine, bool lastLine, RenderObject* endObject, RenderObject* logicallyLastRunRenderer)269 RootInlineBox* RenderBlock::constructLine(unsigned runCount, BidiRun* firstRun, BidiRun* lastRun, bool firstLine, bool lastLine, bool isLogicallyLastRunWrapped, RenderObject* logicallyLastRunRenderer) 270 270 { 271 271 ASSERT(firstRun); … … 326 326 // we determine the horizontal positions and widths of all the inline boxes on 327 327 // the line. 328 lastLineBox()->determineSpacingForFlowBoxes(lastLine, endObject, logicallyLastRunRenderer);328 lastLineBox()->determineSpacingForFlowBoxes(lastLine, isLogicallyLastRunWrapped, logicallyLastRunRenderer); 329 329 330 330 // Now mark the line boxes as being constructed. … … 903 903 if (hyphenated) 904 904 bidiRuns.logicallyLastRun()->m_hasHyphen = true; 905 bool lastLine = end.m_obj && end.m_obj->isText() ? reachedEndOfTextRenderer(bidiRuns) : !end.m_obj;905 bool isLogicallyLastRunWrapped = bidiRuns.logicallyLastRun()->m_object && bidiRuns.logicallyLastRun()->m_object->isText() ? !reachedEndOfTextRenderer(bidiRuns) : true; 906 906 // FIXME: Clearly constructLine should just take a bidiRuns object. 907 lineBox = constructLine(bidiRuns.runCount(), bidiRuns.firstRun(), bidiRuns.lastRun(), firstLine, lastLine, end.m_obj && !end.m_pos ? end.m_obj : 0, bidiRuns.logicallyLastRun()->m_object);907 lineBox = constructLine(bidiRuns.runCount(), bidiRuns.firstRun(), bidiRuns.lastRun(), firstLine, !end.m_obj, isLogicallyLastRunWrapped, bidiRuns.logicallyLastRun()->m_object); 908 908 if (lineBox) { 909 909 lineBox->setEndsWithBreak(previousLineBrokeCleanly);
Note: See TracChangeset
for help on using the changeset viewer.