Diff
Modified: trunk/Source/WebCore/ChangeLog (144560 => 144561)
--- trunk/Source/WebCore/ChangeLog 2013-03-03 07:31:07 UTC (rev 144560)
+++ trunk/Source/WebCore/ChangeLog 2013-03-03 08:33:44 UTC (rev 144561)
@@ -1,3 +1,30 @@
+2013-03-03 Adam Barth <[email protected]>
+
+ REGRESSION(144520): Does not compile on chromium-win
+ https://bugs.webkit.org/show_bug.cgi?id=111261
+
+ Unreviewed rollout of http://trac.webkit.org/changeset/144520. This
+ patch does not compile for chromium-win. See the bug for the compile
+ error.
+
+ * rendering/ExclusionShapeInsideInfo.cpp:
+ * rendering/ExclusionShapeInsideInfo.h:
+ (WebCore):
+ (LineSegmentRange):
+ (WebCore::LineSegmentRange::LineSegmentRange):
+ (WebCore::ExclusionShapeInsideInfo::isEnabledFor):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::willBeDestroyed):
+ (WebCore::RenderBlock::exclusionShapeInsideInfo):
+ (WebCore):
+ (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange):
+ * rendering/RenderBlock.h:
+ (WebCore):
+ (RenderBlock):
+ (RenderBlockRareData):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::constructBidiRunsForLine):
+
2013-03-02 Zan Dobersek <[email protected]>
REGRESSION (r144517): IndexedDB layout test failures on GTK
Modified: trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp (144560 => 144561)
--- trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp 2013-03-03 07:31:07 UTC (rev 144560)
+++ trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp 2013-03-03 08:33:44 UTC (rev 144561)
@@ -32,23 +32,9 @@
#if ENABLE(CSS_EXCLUSIONS)
-#include "InlineIterator.h"
#include "RenderBlock.h"
namespace WebCore {
-
-LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIterator& end)
- : start(start.root(), start.object(), start.offset())
- , end(end.root(), end.object(), end.offset())
- {
- }
-
-bool ExclusionShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
-{
- ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
- return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? shapeValue->shape() : 0;
-}
-
bool ExclusionShapeInsideInfo::computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight)
{
ASSERT(lineHeight >= 0);
Modified: trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.h (144560 => 144561)
--- trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.h 2013-03-03 07:31:07 UTC (rev 144560)
+++ trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.h 2013-03-03 08:33:44 UTC (rev 144561)
@@ -33,40 +33,34 @@
#if ENABLE(CSS_EXCLUSIONS)
#include "ExclusionShapeInfo.h"
+#include "InlineIterator.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
-class InlineIterator;
class RenderBlock;
-class RenderObject;
-struct LineSegmentIterator {
- RenderObject* root;
- RenderObject* object;
- unsigned offset;
- LineSegmentIterator(RenderObject* root, RenderObject* object, unsigned offset)
- : root(root)
- , object(object)
- , offset(offset)
+struct LineSegmentRange {
+ InlineIterator start;
+ InlineIterator end;
+ LineSegmentRange(InlineIterator start, InlineIterator end)
+ : start(start)
+ , end(end)
{
}
};
-
-struct LineSegmentRange {
- LineSegmentIterator start;
- LineSegmentIterator end;
- LineSegmentRange(const InlineIterator& start, const InlineIterator& end);
-};
-
typedef Vector<LineSegmentRange> SegmentRangeList;
-class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside> {
+class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside>, public MappedInfo<RenderBlock, ExclusionShapeInsideInfo> {
public:
static PassOwnPtr<ExclusionShapeInsideInfo> createInfo(const RenderBlock* renderer) { return adoptPtr(new ExclusionShapeInsideInfo(renderer)); }
- static bool isEnabledFor(const RenderBlock* renderer);
+ static bool isEnabledFor(const RenderBlock* renderer)
+ {
+ ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
+ return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? shapeValue->shape() : 0;
+ }
bool lineOverlapsShapeBounds() const { return logicalLineTop() < shapeLogicalBottom() && logicalLineBottom() >= shapeLogicalTop(); }
bool hasSegments() const
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (144560 => 144561)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-03-03 07:31:07 UTC (rev 144560)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2013-03-03 08:33:44 UTC (rev 144561)
@@ -296,6 +296,10 @@
if (lineGridBox())
lineGridBox()->destroy(renderArena());
+#if ENABLE(CSS_EXCLUSIONS)
+ ExclusionShapeInsideInfo::removeInfo(this);
+#endif
+
if (UNLIKELY(gDelayedUpdateScrollInfoSet != 0))
gDelayedUpdateScrollInfoSet->remove(this);
@@ -1390,6 +1394,11 @@
}
#if ENABLE(CSS_EXCLUSIONS)
+ExclusionShapeInsideInfo* RenderBlock::exclusionShapeInsideInfo() const
+{
+ return style()->resolvedShapeInside() && ExclusionShapeInsideInfo::isEnabledFor(this) ? ExclusionShapeInsideInfo::info(this) : 0;
+}
+
void RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValue* shapeInside, const ExclusionShapeValue* oldShapeInside)
{
// FIXME: A future optimization would do a deep comparison for equality.
@@ -1397,10 +1406,10 @@
return;
if (shapeInside) {
- ExclusionShapeInsideInfo* exclusionShapeInsideInfo = ensureExclusionShapeInsideInfo();
+ ExclusionShapeInsideInfo* exclusionShapeInsideInfo = ExclusionShapeInsideInfo::ensureInfo(this);
exclusionShapeInsideInfo->dirtyShapeSize();
} else
- setExclusionShapeInsideInfo(nullptr);
+ ExclusionShapeInsideInfo::removeInfo(this);
}
#endif
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (144560 => 144561)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2013-03-03 07:31:07 UTC (rev 144560)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2013-03-03 08:33:44 UTC (rev 144561)
@@ -35,7 +35,6 @@
#include <wtf/ListHashSet.h>
#if ENABLE(CSS_EXCLUSIONS)
-#include "ExclusionShapeInsideInfo.h"
#include "ExclusionShapeValue.h"
#endif
@@ -55,6 +54,7 @@
class RenderRubyRun;
#if ENABLE(CSS_EXCLUSIONS)
class BasicShape;
+class ExclusionShapeInsideInfo;
#endif
class TextLayout;
class WordMeasurement;
@@ -446,22 +446,7 @@
#endif
#if ENABLE(CSS_EXCLUSIONS)
- ExclusionShapeInsideInfo* ensureExclusionShapeInsideInfo()
- {
- if (!m_rareData || !m_rareData->m_shapeInsideInfo)
- setExclusionShapeInsideInfo(ExclusionShapeInsideInfo::createInfo(this));
- return m_rareData->m_shapeInsideInfo.get();
- }
- ExclusionShapeInsideInfo* exclusionShapeInsideInfo() const
- {
- return m_rareData && m_rareData->m_shapeInsideInfo && ExclusionShapeInsideInfo::isEnabledFor(this) ? m_rareData->m_shapeInsideInfo.get() : 0;
- }
- void setExclusionShapeInsideInfo(PassOwnPtr<ExclusionShapeInsideInfo> value)
- {
- if (!m_rareData)
- m_rareData = adoptPtr(new RenderBlockRareData(this));
- m_rareData->m_shapeInsideInfo = value;
- }
+ ExclusionShapeInsideInfo* exclusionShapeInsideInfo() const;
ExclusionShapeInsideInfo* layoutExclusionShapeInsideInfo() const;
bool allowsExclusionShapeInsideInfoSharing() const { return !isInline() && !isFloating(); }
#endif
@@ -1250,9 +1235,6 @@
RootInlineBox* m_lineGridBox;
RootInlineBox* m_lineBreakToAvoidWidow;
-#if ENABLE(CSS_EXCLUSIONS)
- OwnPtr<ExclusionShapeInsideInfo> m_shapeInsideInfo;
-#endif
bool m_shouldBreakAtLineToAvoidWidow : 1;
bool m_discardMarginBefore : 1;
bool m_discardMarginAfter : 1;
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (144560 => 144561)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-03-03 07:31:07 UTC (rev 144560)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-03-03 08:33:44 UTC (rev 144561)
@@ -1284,10 +1284,8 @@
ASSERT(segmentRanges.size());
for (size_t i = 0; i < segmentRanges.size(); i++) {
- LineSegmentIterator iterator = segmentRanges[i].start;
- InlineIterator segmentStart(iterator.root, iterator.object, iterator.offset);
- iterator = segmentRanges[i].end;
- InlineIterator segmentEnd(iterator.root, iterator.object, iterator.offset);
+ InlineIterator segmentStart = segmentRanges[i].start;
+ InlineIterator segmentEnd = segmentRanges[i].end;
if (i) {
ASSERT(segmentStart.m_obj);
BidiRun* segmentMarker = createRun(segmentStart.m_pos, segmentStart.m_pos, segmentStart.m_obj, topResolver);