Changeset 144561 in webkit


Ignore:
Timestamp:
Mar 3, 2013 12:33:44 AM (11 years ago)
Author:
abarth@webkit.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r144559 r144561  
     12013-03-03  Adam Barth  <abarth@webkit.org>
     2
     3        REGRESSION(144520): Does not compile on chromium-win
     4        https://bugs.webkit.org/show_bug.cgi?id=111261
     5
     6        Unreviewed rollout of http://trac.webkit.org/changeset/144520. This
     7        patch does not compile for chromium-win. See the bug for the compile
     8        error.
     9
     10        * rendering/ExclusionShapeInsideInfo.cpp:
     11        * rendering/ExclusionShapeInsideInfo.h:
     12        (WebCore):
     13        (LineSegmentRange):
     14        (WebCore::LineSegmentRange::LineSegmentRange):
     15        (WebCore::ExclusionShapeInsideInfo::isEnabledFor):
     16        * rendering/RenderBlock.cpp:
     17        (WebCore::RenderBlock::willBeDestroyed):
     18        (WebCore::RenderBlock::exclusionShapeInsideInfo):
     19        (WebCore):
     20        (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange):
     21        * rendering/RenderBlock.h:
     22        (WebCore):
     23        (RenderBlock):
     24        (RenderBlockRareData):
     25        * rendering/RenderBlockLineLayout.cpp:
     26        (WebCore::constructBidiRunsForLine):
     27
    1282013-03-02  Zan Dobersek  <zdobersek@igalia.com>
    229
  • trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp

    r144520 r144561  
    3333#if ENABLE(CSS_EXCLUSIONS)
    3434
    35 #include "InlineIterator.h"
    3635#include "RenderBlock.h"
    3736
    3837namespace WebCore {
    39 
    40 LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIterator& end)
    41     : start(start.root(), start.object(), start.offset())
    42     , end(end.root(), end.object(), end.offset())
    43     {
    44     }
    45 
    46 bool ExclusionShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
    47 {
    48     ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
    49     return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? shapeValue->shape() : 0;
    50 }
    51 
    5238bool ExclusionShapeInsideInfo::computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight)
    5339{
  • trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.h

    r144520 r144561  
    3434
    3535#include "ExclusionShapeInfo.h"
     36#include "InlineIterator.h"
    3637#include <wtf/PassOwnPtr.h>
    3738#include <wtf/Vector.h>
     
    3940namespace WebCore {
    4041
    41 class InlineIterator;
    4242class RenderBlock;
    43 class RenderObject;
    4443
    45 struct LineSegmentIterator {
    46     RenderObject* root;
    47     RenderObject* object;
    48     unsigned offset;
    49     LineSegmentIterator(RenderObject* root, RenderObject* object, unsigned offset)
    50         : root(root)
    51         , object(object)
    52         , offset(offset)
     44struct LineSegmentRange {
     45    InlineIterator start;
     46    InlineIterator end;
     47    LineSegmentRange(InlineIterator start, InlineIterator end)
     48        : start(start)
     49        , end(end)
    5350    {
    5451    }
    5552};
    56 
    57 struct LineSegmentRange {
    58     LineSegmentIterator start;
    59     LineSegmentIterator end;
    60     LineSegmentRange(const InlineIterator& start, const InlineIterator& end);
    61 };
    62 
    6353typedef Vector<LineSegmentRange> SegmentRangeList;
    6454
    65 class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside> {
     55class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside>, public MappedInfo<RenderBlock, ExclusionShapeInsideInfo> {
    6656public:
    6757    static PassOwnPtr<ExclusionShapeInsideInfo> createInfo(const RenderBlock* renderer) { return adoptPtr(new ExclusionShapeInsideInfo(renderer)); }
    6858
    69     static bool isEnabledFor(const RenderBlock* renderer);
     59    static bool isEnabledFor(const RenderBlock* renderer)
     60    {
     61        ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
     62        return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? shapeValue->shape() : 0;
     63    }
    7064    bool lineOverlapsShapeBounds() const { return logicalLineTop() < shapeLogicalBottom() && logicalLineBottom() >= shapeLogicalTop(); }
    7165
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r144520 r144561  
    297297        lineGridBox()->destroy(renderArena());
    298298
     299#if ENABLE(CSS_EXCLUSIONS)
     300    ExclusionShapeInsideInfo::removeInfo(this);
     301#endif
     302
    299303    if (UNLIKELY(gDelayedUpdateScrollInfoSet != 0))
    300304        gDelayedUpdateScrollInfoSet->remove(this);
     
    13911395
    13921396#if ENABLE(CSS_EXCLUSIONS)
     1397ExclusionShapeInsideInfo* RenderBlock::exclusionShapeInsideInfo() const
     1398{
     1399    return style()->resolvedShapeInside() && ExclusionShapeInsideInfo::isEnabledFor(this) ? ExclusionShapeInsideInfo::info(this) : 0;
     1400}
     1401
    13931402void RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValue* shapeInside, const ExclusionShapeValue* oldShapeInside)
    13941403{
     
    13981407
    13991408    if (shapeInside) {
    1400         ExclusionShapeInsideInfo* exclusionShapeInsideInfo = ensureExclusionShapeInsideInfo();
     1409        ExclusionShapeInsideInfo* exclusionShapeInsideInfo = ExclusionShapeInsideInfo::ensureInfo(this);
    14011410        exclusionShapeInsideInfo->dirtyShapeSize();
    14021411    } else
    1403         setExclusionShapeInsideInfo(nullptr);
     1412        ExclusionShapeInsideInfo::removeInfo(this);
    14041413}
    14051414#endif
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r144520 r144561  
    3636
    3737#if ENABLE(CSS_EXCLUSIONS)
    38 #include "ExclusionShapeInsideInfo.h"
    3938#include "ExclusionShapeValue.h"
    4039#endif
     
    5655#if ENABLE(CSS_EXCLUSIONS)
    5756class BasicShape;
     57class ExclusionShapeInsideInfo;
    5858#endif
    5959class TextLayout;
     
    447447
    448448#if ENABLE(CSS_EXCLUSIONS)
    449     ExclusionShapeInsideInfo* ensureExclusionShapeInsideInfo()
    450     {
    451         if (!m_rareData || !m_rareData->m_shapeInsideInfo)
    452             setExclusionShapeInsideInfo(ExclusionShapeInsideInfo::createInfo(this));
    453         return m_rareData->m_shapeInsideInfo.get();
    454     }
    455     ExclusionShapeInsideInfo* exclusionShapeInsideInfo() const
    456     {
    457         return m_rareData && m_rareData->m_shapeInsideInfo && ExclusionShapeInsideInfo::isEnabledFor(this) ? m_rareData->m_shapeInsideInfo.get() : 0;
    458     }
    459     void setExclusionShapeInsideInfo(PassOwnPtr<ExclusionShapeInsideInfo> value)
    460     {
    461         if (!m_rareData)
    462             m_rareData = adoptPtr(new RenderBlockRareData(this));
    463         m_rareData->m_shapeInsideInfo = value;
    464     }
     449    ExclusionShapeInsideInfo* exclusionShapeInsideInfo() const;
    465450    ExclusionShapeInsideInfo* layoutExclusionShapeInsideInfo() const;
    466451    bool allowsExclusionShapeInsideInfoSharing() const { return !isInline() && !isFloating(); }
     
    12511236
    12521237        RootInlineBox* m_lineBreakToAvoidWidow;
    1253 #if ENABLE(CSS_EXCLUSIONS)
    1254         OwnPtr<ExclusionShapeInsideInfo> m_shapeInsideInfo;
    1255 #endif
    12561238        bool m_shouldBreakAtLineToAvoidWidow : 1;
    12571239        bool m_discardMarginBefore : 1;
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r144520 r144561  
    12851285
    12861286    for (size_t i = 0; i < segmentRanges.size(); i++) {
    1287         LineSegmentIterator iterator = segmentRanges[i].start;
    1288         InlineIterator segmentStart(iterator.root, iterator.object, iterator.offset);
    1289         iterator = segmentRanges[i].end;
    1290         InlineIterator segmentEnd(iterator.root, iterator.object, iterator.offset);
     1287        InlineIterator segmentStart = segmentRanges[i].start;
     1288        InlineIterator segmentEnd = segmentRanges[i].end;
    12911289        if (i) {
    12921290            ASSERT(segmentStart.m_obj);
Note: See TracChangeset for help on using the changeset viewer.