| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 RenderBoxModelObject* continuation = this->continuation(); | 118 RenderBoxModelObject* continuation = this->continuation(); |
| 119 if (!continuation || continuation->isInline()) | 119 if (!continuation || continuation->isInline()) |
| 120 return toRenderInline(continuation); | 120 return toRenderInline(continuation); |
| 121 return toRenderBlock(continuation)->inlineElementContinuation(); | 121 return toRenderBlock(continuation)->inlineElementContinuation(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void RenderInline::updateFromStyle() | 124 void RenderInline::updateFromStyle() |
| 125 { | 125 { |
| 126 RenderBoxModelObject::updateFromStyle(); | 126 RenderBoxModelObject::updateFromStyle(); |
| 127 | 127 |
| 128 setInline(true); // Needed for run-ins, since run-in is considered a block d
isplay type. | 128 // FIXME: Is this still needed. Was needed for run-ins, since run-in is cons
idered a block display type. |
| 129 setInline(true); |
| 129 | 130 |
| 130 // FIXME: Support transforms and reflections on inline flows someday. | 131 // FIXME: Support transforms and reflections on inline flows someday. |
| 131 setHasTransform(false); | 132 setHasTransform(false); |
| 132 setHasReflection(false); | 133 setHasReflection(false); |
| 133 } | 134 } |
| 134 | 135 |
| 135 static RenderObject* inFlowPositionedInlineAncestor(RenderObject* p) | 136 static RenderObject* inFlowPositionedInlineAncestor(RenderObject* p) |
| 136 { | 137 { |
| 137 while (p && p->isRenderInline()) { | 138 while (p && p->isRenderInline()) { |
| 138 if (p->isInFlowPositioned()) | 139 if (p->isInFlowPositioned()) |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 { | 744 { |
| 744 if (isRelPositioned()) | 745 if (isRelPositioned()) |
| 745 return "RenderInline (relative positioned)"; | 746 return "RenderInline (relative positioned)"; |
| 746 if (isStickyPositioned()) | 747 if (isStickyPositioned()) |
| 747 return "RenderInline (sticky positioned)"; | 748 return "RenderInline (sticky positioned)"; |
| 748 // FIXME: Temporary hack while the new generated content system is being imp
lemented. | 749 // FIXME: Temporary hack while the new generated content system is being imp
lemented. |
| 749 if (isPseudoElement()) | 750 if (isPseudoElement()) |
| 750 return "RenderInline (generated)"; | 751 return "RenderInline (generated)"; |
| 751 if (isAnonymous()) | 752 if (isAnonymous()) |
| 752 return "RenderInline (generated)"; | 753 return "RenderInline (generated)"; |
| 753 if (isRunIn()) | |
| 754 return "RenderInline (run-in)"; | |
| 755 return "RenderInline"; | 754 return "RenderInline"; |
| 756 } | 755 } |
| 757 | 756 |
| 758 bool RenderInline::nodeAtPoint(const HitTestRequest& request, HitTestResult& res
ult, | 757 bool RenderInline::nodeAtPoint(const HitTestRequest& request, HitTestResult& res
ult, |
| 759 const HitTestLocation& locationInContainer, cons
t LayoutPoint& accumulatedOffset, HitTestAction hitTestAction) | 758 const HitTestLocation& locationInContainer, cons
t LayoutPoint& accumulatedOffset, HitTestAction hitTestAction) |
| 760 { | 759 { |
| 761 return m_lineBoxes.hitTest(this, request, result, locationInContainer, accum
ulatedOffset, hitTestAction); | 760 return m_lineBoxes.hitTest(this, request, result, locationInContainer, accum
ulatedOffset, hitTestAction); |
| 762 } | 761 } |
| 763 | 762 |
| 764 namespace { | 763 namespace { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo
otBox->lineBottom()) - logicalTop; | 991 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo
otBox->lineBottom()) - logicalTop; |
| 993 | 992 |
| 994 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); | 993 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); |
| 995 if (!style()->isHorizontalWritingMode()) | 994 if (!style()->isHorizontalWritingMode()) |
| 996 rect = rect.transposedRect(); | 995 rect = rect.transposedRect(); |
| 997 return rect; | 996 return rect; |
| 998 } | 997 } |
| 999 | 998 |
| 1000 LayoutRect RenderInline::clippedOverflowRectForRepaint(const RenderLayerModelObj
ect* repaintContainer) const | 999 LayoutRect RenderInline::clippedOverflowRectForRepaint(const RenderLayerModelObj
ect* repaintContainer) const |
| 1001 { | 1000 { |
| 1002 // Only run-ins are allowed in here during layout. | 1001 ASSERT(!view() || !view()->layoutStateEnabled()); |
| 1003 ASSERT(!view() || !view()->layoutStateEnabled() || isRunIn()); | |
| 1004 | 1002 |
| 1005 if (!firstLineBoxIncludingCulling() && !continuation()) | 1003 if (!firstLineBoxIncludingCulling() && !continuation()) |
| 1006 return LayoutRect(); | 1004 return LayoutRect(); |
| 1007 | 1005 |
| 1008 LayoutRect repaintRect(linesVisualOverflowBoundingBox()); | 1006 LayoutRect repaintRect(linesVisualOverflowBoundingBox()); |
| 1009 bool hitRepaintContainer = false; | 1007 bool hitRepaintContainer = false; |
| 1010 | 1008 |
| 1011 // We need to add in the in-flow position offsets of any inlines (including
us) up to our | 1009 // We need to add in the in-flow position offsets of any inlines (including
us) up to our |
| 1012 // containing block. | 1010 // containing block. |
| 1013 RenderBlock* cb = containingBlock(); | 1011 RenderBlock* cb = containingBlock(); |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 container = this; | 1575 container = this; |
| 1578 | 1576 |
| 1579 FloatPoint absPos = container->localToAbsolute(); | 1577 FloatPoint absPos = container->localToAbsolute(); |
| 1580 region.bounds.setX(absPos.x() + region.bounds.x()); | 1578 region.bounds.setX(absPos.x() + region.bounds.x()); |
| 1581 region.bounds.setY(absPos.y() + region.bounds.y()); | 1579 region.bounds.setY(absPos.y() + region.bounds.y()); |
| 1582 | 1580 |
| 1583 regions.append(region); | 1581 regions.append(region); |
| 1584 } | 1582 } |
| 1585 | 1583 |
| 1586 } // namespace WebCore | 1584 } // namespace WebCore |
| OLD | NEW |