Diff
Modified: trunk/Source/WebCore/ChangeLog (158810 => 158811)
--- trunk/Source/WebCore/ChangeLog 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/ChangeLog 2013-11-07 03:30:11 UTC (rev 158811)
@@ -1,3 +1,13 @@
+2013-11-06 Andreas Kling <[email protected]>
+
+ Nothing should return std::unique_ptr<InlineBox>.
+ <https://webkit.org/b/123936>
+
+ Made RenderBox, RenderLineBreak and RenderListMarker return tightly
+ typed InlineElementBoxes instead.
+
+ Reviewed by Anders Carlsson.
+
2013-11-06 Daniel Bates <[email protected]>
[iOS] Upstream Letterpress effect
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-11-07 03:30:11 UTC (rev 158811)
@@ -27,6 +27,7 @@
#include "BidiResolver.h"
#include "FloatingObjects.h"
#include "Hyphenation.h"
+#include "InlineElementBox.h"
#include "InlineIterator.h"
#include "InlineTextBox.h"
#include "LineInfo.h"
@@ -318,7 +319,7 @@
if (obj->isLineBreak()) {
// FIXME: This is terrible. This branch returns an *owned* pointer!
- InlineBox* inlineBox = toRenderLineBreak(obj)->createInlineBox().release();
+ auto inlineBox = toRenderLineBreak(obj)->createInlineBox().release();
// We only treat a box as text for a <br> if we are on a line by ourself or in strict mode
// (Note the use of strict mode. In "almost strict" mode, we don't treat the box for <br> as text.)
inlineBox->setBehavesLikeText(isOnlyRun || obj->document().inNoQuirksMode() || obj->isLineBreakOpportunity());
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2013-11-07 03:30:11 UTC (rev 158811)
@@ -1940,7 +1940,7 @@
return offset;
}
-std::unique_ptr<InlineBox> RenderBox::createInlineBox()
+std::unique_ptr<InlineElementBox> RenderBox::createInlineBox()
{
return std::make_unique<InlineElementBox>(*this);
}
Modified: trunk/Source/WebCore/rendering/RenderBox.h (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderBox.h 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderBox.h 2013-11-07 03:30:11 UTC (rev 158811)
@@ -32,6 +32,7 @@
namespace WebCore {
+class InlineElementBox;
class RenderBlockFlow;
class RenderBoxRegionInfo;
class RenderRegion;
@@ -373,7 +374,7 @@
void positionLineBox(InlineBox*);
- virtual std::unique_ptr<InlineBox> createInlineBox();
+ virtual std::unique_ptr<InlineElementBox> createInlineBox();
void dirtyLineBoxes(bool fullLayout);
// For inline replaced elements, this function returns the inline box that owns us. Enables
Modified: trunk/Source/WebCore/rendering/RenderLineBreak.cpp (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderLineBreak.cpp 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.cpp 2013-11-07 03:30:11 UTC (rev 158811)
@@ -68,7 +68,7 @@
return fontMetrics.ascent(baselineType) + (lineHeight(firstLine, direction, linePositionMode) - fontMetrics.height()) / 2;
}
-std::unique_ptr<InlineBox> RenderLineBreak::createInlineBox()
+std::unique_ptr<InlineElementBox> RenderLineBreak::createInlineBox()
{
return std::make_unique<InlineElementBox>(*this);
}
Modified: trunk/Source/WebCore/rendering/RenderLineBreak.h (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderLineBreak.h 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.h 2013-11-07 03:30:11 UTC (rev 158811)
@@ -26,6 +26,7 @@
namespace WebCore {
+class InlineElementBox;
class HTMLElement;
class Position;
@@ -39,7 +40,7 @@
virtual bool isWBR() const OVERRIDE { return m_isWBR; }
- std::unique_ptr<InlineBox> createInlineBox();
+ std::unique_ptr<InlineElementBox> createInlineBox();
InlineBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; }
void setInlineBoxWrapper(InlineBox*);
void deleteInlineBoxWrapper();
Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderListMarker.cpp 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp 2013-11-07 03:30:11 UTC (rev 158811)
@@ -28,6 +28,7 @@
#include "Document.h"
#include "Font.h"
#include "GraphicsContext.h"
+#include "InlineElementBox.h"
#include "RenderLayer.h"
#include "RenderListItem.h"
#include "RenderView.h"
@@ -1148,7 +1149,7 @@
}
}
-std::unique_ptr<InlineBox> RenderListMarker::createInlineBox()
+std::unique_ptr<InlineElementBox> RenderListMarker::createInlineBox()
{
auto box = RenderBox::createInlineBox();
box->setBehavesLikeText(isText());
Modified: trunk/Source/WebCore/rendering/RenderListMarker.h (158810 => 158811)
--- trunk/Source/WebCore/rendering/RenderListMarker.h 2013-11-07 03:26:18 UTC (rev 158810)
+++ trunk/Source/WebCore/rendering/RenderListMarker.h 2013-11-07 03:30:11 UTC (rev 158811)
@@ -60,7 +60,7 @@
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
- virtual std::unique_ptr<InlineBox> createInlineBox() OVERRIDE;
+ virtual std::unique_ptr<InlineElementBox> createInlineBox() OVERRIDE;
virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const OVERRIDE;
virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const OVERRIDE;