зеркало из https://github.com/mozilla/pjs.git
Bug 501878. Don't suppress whitespace-only SVG text frames. r+sr=bzbarsky
This commit is contained in:
Родитель
eb37a0a0a4
Коммит
3c2ad16b52
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script type='text/javascript'>
|
||||
window.addEventListener("load", function(){ document.getElementById("x").appendChild(document.createTextNode(" ")); }, false);
|
||||
</script>
|
||||
<text id="x"><text style="position: absolute;"/>Hello</text></svg>
|
После Ширина: | Высота: | Размер: 277 B |
|
@ -239,3 +239,4 @@ load 492112-1.xhtml
|
|||
load 492163-1.xhtml
|
||||
load 495350-1.html
|
||||
load 500467-1.html
|
||||
load 501878-1.html
|
||||
|
|
|
@ -5532,16 +5532,15 @@ nsCSSFrameConstructor::ConstructFramesFromItem(nsFrameConstructorState& aState,
|
|||
// We don't do it for content that may have XBL anonymous siblings,
|
||||
// because they make it difficult to correctly create the frame
|
||||
// due to dynamic changes.
|
||||
// We don't do it for text that's not a line participant (i.e. SVG text).
|
||||
if (AtLineBoundary(aIter) &&
|
||||
!styleContext->GetStyleText()->NewlineIsSignificant() &&
|
||||
aIter.List()->ParentHasNoXBLChildren() &&
|
||||
!(aState.mAdditionalStateBits & NS_FRAME_GENERATED_CONTENT) &&
|
||||
(item.mFCData->mBits & FCDATA_IS_LINE_PARTICIPANT) &&
|
||||
item.IsWhitespace())
|
||||
return NS_OK;
|
||||
|
||||
// XXXroc Right now if you start with whitespace and then start adding chars
|
||||
// (e.g. while editing) we reframe on every change, which seems dumb.
|
||||
// Maybe we should use another flag here, or something.
|
||||
return ConstructTextFrame(item.mFCData, aState, item.mContent,
|
||||
adjParentFrame, styleContext,
|
||||
aFrameItems);
|
||||
|
|
Загрузка…
Ссылка в новой задаче