https://bugs.webkit.org/show_bug.cgi?id=184690
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleInlineBlock):
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
* LayoutReloaded/test/inline-block-with-fixed-width-height.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230707
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-04-17 Zalan Bujtas <zalan@apple.com>
+
+ [LayoutReloaded] Set inline-block box position.
+ https://bugs.webkit.org/show_bug.cgi?id=184690
+
+ Reviewed by Antti Koivisto.
+
+ * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
+ (InlineFormattingContext.prototype._handleInlineBlock):
+ * LayoutReloaded/Utils.js:
+ (Utils._dumpBox):
+ * LayoutReloaded/test/inline-block-with-fixed-width-height.html:
+
2018-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to clear JSCContext uncaught exception
this.layoutState().formattingContext(inlineBlockBox).layout();
displayBox.setHeight(Utils.height(inlineBlockBox) + Utils.computedVerticalBorderAndPadding(inlineBlockBox.node()));
this._line().addInlineBox(displayBox.size());
+ displayBox.setTopLeft(this._line().lastLineBox().lineBoxRect.topLeft());
this._adjustLineForInlineContainerEnd(inlineBlockBox);
}
}
return indentation + box.node().tagName + " " + box.name() + "\n";
}
- if (box.name() == "RenderImage") {
- let boxRect = layoutState.displayBox(box).rect();
- return indentation + box.node().tagName + " " + box.name() + " at (" + Utils.precisionRound(boxRect.left()) + "," + Utils.precisionRound(boxRect.top()) + ") size " + Utils.precisionRound(boxRect.width()) + "x" + Utils.precisionRound(boxRect.height()) + "\n";
-
- }
if (box.isAnonymous())
return "";
let displayBox = layoutState.displayBox(box);
let boxRect = displayBox.rect();
- return indentation + (box.node().tagName ? (box.node().tagName + " ") : "") + box.name() + " at (" + boxRect.left() + "," + boxRect.top() + ") size " + boxRect.width() + "x" + boxRect.height() + "\n";
+ return indentation + (box.node().tagName ? (box.node().tagName + " ") : "") + box.name() + " at (" + Utils.precisionRound(boxRect.left()) + "," + Utils.precisionRound(boxRect.top()) + ") size " + Utils.precisionRound(boxRect.width()) + "x" + Utils.precisionRound(boxRect.height()) + "\n";
}
static _dumpLines(layoutState, root, level) {
<!DOCTYPE html>
<html>
<body>
-<div style="height: 500px"><span style="display: inline-block; width: 200px; height: 100px;">foobar</span></div>
+<div style="height: 500px">foo<span style="margin-left: 30px; display: inline-block; width: 200px; height: 100px;">foobar</span>foobar</div>
</body>
</html>