Changeset 104802 in webkit
- Timestamp:
- Jan 12, 2012 2:22:48 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r104796 r104802 1 2012-01-12 Mihnea Ovidenie <mihnea@adobe.com> 2 3 Add RenderStyle::isPositioned() helper method 4 https://bugs.webkit.org/show_bug.cgi?id=75959 5 6 Reviewed by Tony Chang. 7 8 No new tests since this is refactoring of existing code. 9 Replace (style()->position() == AbsolutePosition || style()->position() == FixedPosition) 10 with (style()->isPositioned()). 11 Replace (style()->position() != AbsolutePosition && style()->position() != FixedPosition) 12 with (!style()->isPositioned()). 13 14 * rendering/RenderBox.cpp: 15 (WebCore::RenderBox::updateBoxModelInfoFromStyle): 16 (WebCore::RenderBox::offsetFromContainer): 17 * rendering/RenderBoxModelObject.cpp: 18 (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint): 19 * rendering/RenderInline.cpp: 20 (WebCore::RenderInline::computeRectForRepaint): 21 * rendering/RenderObject.cpp: 22 (WebCore::RenderObject::markContainingBlocksForLayout): 23 (WebCore::RenderObject::setPreferredLogicalWidthsDirty): 24 (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths): 25 * rendering/style/RenderStyle.h: 26 (WebCore::RenderStyleBitfields::isPositioned): 27 1 28 2012-01-11 KwangHyuk Kim <hyuki.kim@samsung.com> 2 29 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r104628 r104802 410 410 setHasBoxDecorations(true); 411 411 412 setPositioned(style()-> position() == AbsolutePosition || style()->position() == FixedPosition);412 setPositioned(style()->isPositioned()); 413 413 setFloating(style()->isFloating() && (!isPositioned() || style()->floating() == PositionedFloat)); 414 414 … … 1398 1398 1399 1399 if (!isInline() || isReplaced()) { 1400 if ( style()->position() != AbsolutePosition && style()->position() != FixedPosition&& o->hasColumns()) {1400 if (!style()->isPositioned() && o->hasColumns()) { 1401 1401 RenderBlock* block = toRenderBlock(o); 1402 1402 LayoutRect columnRect(frameRect()); -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r104123 r104802 2760 2760 LayoutSize containerOffset = offsetFromContainer(o, LayoutPoint()); 2761 2761 2762 if ( style()->position() != AbsolutePosition && style()->position() != FixedPosition&& o->hasColumns()) {2762 if (!style()->isPositioned() && o->hasColumns()) { 2763 2763 RenderBlock* block = static_cast<RenderBlock*>(o); 2764 2764 LayoutPoint point(roundedLayoutPoint(transformState.mappedPoint())); -
trunk/Source/WebCore/rendering/RenderInline.cpp
r104378 r104802 1054 1054 LayoutPoint topLeft = rect.location(); 1055 1055 1056 if (o->isBlockFlow() && style()->position() != AbsolutePosition && style()->position() != FixedPosition) {1056 if (o->isBlockFlow() && !style()->isPositioned()) { 1057 1057 RenderBlock* cb = toRenderBlock(o); 1058 1058 if (cb->hasColumns()) { -
trunk/Source/WebCore/rendering/RenderObject.cpp
r104628 r104802 627 627 if (!container && !object->isRenderView()) 628 628 return; 629 if (!last->isText() && (last->style()->position() == FixedPosition || last->style()->position() == AbsolutePosition)) {629 if (!last->isText() && last->style()->isPositioned()) { 630 630 bool willSkipRelativelyPositionedInlines = !object->isRenderBlock(); 631 631 while (object && !object->isRenderBlock()) // Skip relatively positioned inlines and get to the enclosing RenderBlock. … … 667 667 bool alreadyDirty = preferredLogicalWidthsDirty(); 668 668 m_bitfields.setPreferredLogicalWidthsDirty(b); 669 if (b && !alreadyDirty && markParents && (isText() || (style()->position() != FixedPosition && style()->position() != AbsolutePosition)))669 if (b && !alreadyDirty && markParents && (isText() || !style()->isPositioned())) 670 670 invalidateContainerPreferredLogicalWidths(); 671 671 } … … 684 684 685 685 o->m_bitfields.setPreferredLogicalWidthsDirty(true); 686 if (o->style()-> position() == FixedPosition || o->style()->position() == AbsolutePosition)686 if (o->style()->isPositioned()) 687 687 // A positioned object has no effect on the min/max width of its containing block ever. 688 688 // We can optimize this case and not go up any further. -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r104625 r104802 509 509 510 510 EPosition position() const { return static_cast<EPosition>(noninherited_flags._position); } 511 bool isPositioned() const { return position() == AbsolutePosition || position() == FixedPosition; } 511 512 EFloat floating() const { return static_cast<EFloat>(noninherited_flags._floating); } 512 513
Note: See TracChangeset
for help on using the changeset viewer.