OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 determineLogicalLeftPositionForChild(spanner); | 2993 determineLogicalLeftPositionForChild(spanner); |
2994 } | 2994 } |
2995 | 2995 |
2996 bool RenderBlockFlow::avoidsFloats() const | 2996 bool RenderBlockFlow::avoidsFloats() const |
2997 { | 2997 { |
2998 // Floats can't intrude into our box if we have a non-auto column count or w
idth. | 2998 // Floats can't intrude into our box if we have a non-auto column count or w
idth. |
2999 // Note: we need to use RenderBox::avoidsFloats here since RenderBlock::avoi
dsFloats is always true. | 2999 // Note: we need to use RenderBox::avoidsFloats here since RenderBlock::avoi
dsFloats is always true. |
3000 return RenderBox::avoidsFloats() || !style()->hasAutoColumnCount() || !style
()->hasAutoColumnWidth(); | 3000 return RenderBox::avoidsFloats() || !style()->hasAutoColumnCount() || !style
()->hasAutoColumnWidth(); |
3001 } | 3001 } |
3002 | 3002 |
3003 void RenderBlockFlow::moveChildrenTo(RenderBoxModelObject* toBoxModelObject, Lay
outObject* startChild, LayoutObject* endChild, LayoutObject* beforeChild, bool f
ullRemoveInsert) | 3003 void RenderBlockFlow::moveChildrenTo(LayoutBoxModelObject* toBoxModelObject, Lay
outObject* startChild, LayoutObject* endChild, LayoutObject* beforeChild, bool f
ullRemoveInsert) |
3004 { | 3004 { |
3005 if (childrenInline()) | 3005 if (childrenInline()) |
3006 deleteLineBoxTree(); | 3006 deleteLineBoxTree(); |
3007 RenderBoxModelObject::moveChildrenTo(toBoxModelObject, startChild, endChild,
beforeChild, fullRemoveInsert); | 3007 LayoutBoxModelObject::moveChildrenTo(toBoxModelObject, startChild, endChild,
beforeChild, fullRemoveInsert); |
3008 } | 3008 } |
3009 | 3009 |
3010 LayoutUnit RenderBlockFlow::logicalLeftSelectionOffset(const RenderBlock* rootBl
ock, LayoutUnit position) const | 3010 LayoutUnit RenderBlockFlow::logicalLeftSelectionOffset(const RenderBlock* rootBl
ock, LayoutUnit position) const |
3011 { | 3011 { |
3012 LayoutUnit logicalLeft = logicalLeftOffsetForLine(position, false); | 3012 LayoutUnit logicalLeft = logicalLeftOffsetForLine(position, false); |
3013 if (logicalLeft == logicalLeftOffsetForContent()) | 3013 if (logicalLeft == logicalLeftOffsetForContent()) |
3014 return RenderBlock::logicalLeftSelectionOffset(rootBlock, position); | 3014 return RenderBlock::logicalLeftSelectionOffset(rootBlock, position); |
3015 | 3015 |
3016 const RenderBlock* cb = this; | 3016 const RenderBlock* cb = this; |
3017 while (cb != rootBlock) { | 3017 while (cb != rootBlock) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3134 FrameView* frameView = document().view(); | 3134 FrameView* frameView = document().view(); |
3135 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3135 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
3136 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3136 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
3137 if (size().height() < visibleHeight) | 3137 if (size().height() < visibleHeight) |
3138 top += (visibleHeight - size().height()) / 2; | 3138 top += (visibleHeight - size().height()) / 2; |
3139 setY(top); | 3139 setY(top); |
3140 dialog->setCentered(top); | 3140 dialog->setCentered(top); |
3141 } | 3141 } |
3142 | 3142 |
3143 } // namespace blink | 3143 } // namespace blink |
OLD | NEW |