[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdelibs/khtml/rendering
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2007-09-13 21:33:58
Message-ID: 1189719238.716495.16063.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 712197 by aacid:
Patch by Germain Garand to fix the bug i reported yesterday, you rock ;-)
In his words "The git of it is to skip positioned/floating objects while scanning for \
inlines." "Ported" from WebCore
BUGS: 149809
M +21 -15 render_block.cpp
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #712196:712197
@@ -385,25 +385,31 @@
// inlines yet.
//
// |stop| indicates a non-inclusive stop point. Regardless of whether |stop|
- // is inline or not, we will not include it. It's as though we encountered
+ // is inline or not, we will not include it in a run with inlines before it. \
It's as though we encountered // a non-inline.
- inlineRunStart = inlineRunEnd = 0;
-
- // Start by skipping as many non-inlines as we can.
+
RenderObject * curr = start;
- while (curr && !curr->isInline())
+ bool sawInline;
+ do {
+ while (curr && !(curr->isInline() || curr->isFloatingOrPositioned()))
+ curr = curr->nextSibling();
+
+ inlineRunStart = inlineRunEnd = curr;
+
+ if (!curr)
+ return; // No more inline children to be found.
+
+ sawInline = curr->isInline();
+
curr = curr->nextSibling();
+ while (curr && (curr->isInline() || curr->isFloatingOrPositioned()) && (curr \
!= stop)) { + inlineRunEnd = curr;
+ if (curr->isInline())
+ sawInline = true;
+ curr = curr->nextSibling();
+ }
+ } while (!sawInline);
- if (!curr)
- return; // No more inline children to be found.
-
- inlineRunStart = inlineRunEnd = curr;
-
- curr = curr->nextSibling();
- while (curr && curr->isInline() && (curr != stop)) {
- inlineRunEnd = curr;
- curr = curr->nextSibling();
- }
}
void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic