Changeset 144561 in webkit
- Timestamp:
- Mar 3, 2013 12:33:44 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r144559 r144561 1 2013-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 1 28 2013-03-02 Zan Dobersek <zdobersek@igalia.com> 2 29 -
trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp
r144520 r144561 33 33 #if ENABLE(CSS_EXCLUSIONS) 34 34 35 #include "InlineIterator.h"36 35 #include "RenderBlock.h" 37 36 38 37 namespace 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 52 38 bool ExclusionShapeInsideInfo::computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) 53 39 { -
trunk/Source/WebCore/rendering/ExclusionShapeInsideInfo.h
r144520 r144561 34 34 35 35 #include "ExclusionShapeInfo.h" 36 #include "InlineIterator.h" 36 37 #include <wtf/PassOwnPtr.h> 37 38 #include <wtf/Vector.h> … … 39 40 namespace WebCore { 40 41 41 class InlineIterator;42 42 class RenderBlock; 43 class RenderObject;44 43 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) 44 struct LineSegmentRange { 45 InlineIterator start; 46 InlineIterator end; 47 LineSegmentRange(InlineIterator start, InlineIterator end) 48 : start(start) 49 , end(end) 53 50 { 54 51 } 55 52 }; 56 57 struct LineSegmentRange {58 LineSegmentIterator start;59 LineSegmentIterator end;60 LineSegmentRange(const InlineIterator& start, const InlineIterator& end);61 };62 63 53 typedef Vector<LineSegmentRange> SegmentRangeList; 64 54 65 class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside> {55 class ExclusionShapeInsideInfo : public ExclusionShapeInfo<RenderBlock, &RenderStyle::resolvedShapeInside>, public MappedInfo<RenderBlock, ExclusionShapeInsideInfo> { 66 56 public: 67 57 static PassOwnPtr<ExclusionShapeInsideInfo> createInfo(const RenderBlock* renderer) { return adoptPtr(new ExclusionShapeInsideInfo(renderer)); } 68 58 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 } 70 64 bool lineOverlapsShapeBounds() const { return logicalLineTop() < shapeLogicalBottom() && logicalLineBottom() >= shapeLogicalTop(); } 71 65 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r144520 r144561 297 297 lineGridBox()->destroy(renderArena()); 298 298 299 #if ENABLE(CSS_EXCLUSIONS) 300 ExclusionShapeInsideInfo::removeInfo(this); 301 #endif 302 299 303 if (UNLIKELY(gDelayedUpdateScrollInfoSet != 0)) 300 304 gDelayedUpdateScrollInfoSet->remove(this); … … 1391 1395 1392 1396 #if ENABLE(CSS_EXCLUSIONS) 1397 ExclusionShapeInsideInfo* RenderBlock::exclusionShapeInsideInfo() const 1398 { 1399 return style()->resolvedShapeInside() && ExclusionShapeInsideInfo::isEnabledFor(this) ? ExclusionShapeInsideInfo::info(this) : 0; 1400 } 1401 1393 1402 void RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValue* shapeInside, const ExclusionShapeValue* oldShapeInside) 1394 1403 { … … 1398 1407 1399 1408 if (shapeInside) { 1400 ExclusionShapeInsideInfo* exclusionShapeInsideInfo = ensureExclusionShapeInsideInfo();1409 ExclusionShapeInsideInfo* exclusionShapeInsideInfo = ExclusionShapeInsideInfo::ensureInfo(this); 1401 1410 exclusionShapeInsideInfo->dirtyShapeSize(); 1402 1411 } else 1403 setExclusionShapeInsideInfo(nullptr);1412 ExclusionShapeInsideInfo::removeInfo(this); 1404 1413 } 1405 1414 #endif -
trunk/Source/WebCore/rendering/RenderBlock.h
r144520 r144561 36 36 37 37 #if ENABLE(CSS_EXCLUSIONS) 38 #include "ExclusionShapeInsideInfo.h"39 38 #include "ExclusionShapeValue.h" 40 39 #endif … … 56 55 #if ENABLE(CSS_EXCLUSIONS) 57 56 class BasicShape; 57 class ExclusionShapeInsideInfo; 58 58 #endif 59 59 class TextLayout; … … 447 447 448 448 #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; 465 450 ExclusionShapeInsideInfo* layoutExclusionShapeInsideInfo() const; 466 451 bool allowsExclusionShapeInsideInfoSharing() const { return !isInline() && !isFloating(); } … … 1251 1236 1252 1237 RootInlineBox* m_lineBreakToAvoidWidow; 1253 #if ENABLE(CSS_EXCLUSIONS)1254 OwnPtr<ExclusionShapeInsideInfo> m_shapeInsideInfo;1255 #endif1256 1238 bool m_shouldBreakAtLineToAvoidWidow : 1; 1257 1239 bool m_discardMarginBefore : 1; -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r144520 r144561 1285 1285 1286 1286 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; 1291 1289 if (i) { 1292 1290 ASSERT(segmentStart.m_obj);
Note: See TracChangeset
for help on using the changeset viewer.