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 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2802 for (curr = firstChildBox(); curr && curr->selectionState() == SelectionNone
; curr = curr->nextSiblingBox()) { } | 2802 for (curr = firstChildBox(); curr && curr->selectionState() == SelectionNone
; curr = curr->nextSiblingBox()) { } |
2803 | 2803 |
2804 for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->ne
xtSiblingBox()) { | 2804 for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->ne
xtSiblingBox()) { |
2805 SelectionState childState = curr->selectionState(); | 2805 SelectionState childState = curr->selectionState(); |
2806 if (childState == SelectionBoth || childState == SelectionEnd) | 2806 if (childState == SelectionBoth || childState == SelectionEnd) |
2807 sawSelectionEnd = true; | 2807 sawSelectionEnd = true; |
2808 | 2808 |
2809 if (curr->isFloatingOrOutOfFlowPositioned()) | 2809 if (curr->isFloatingOrOutOfFlowPositioned()) |
2810 continue; // We must be a normal flow object in order to even be con
sidered. | 2810 continue; // We must be a normal flow object in order to even be con
sidered. |
2811 | 2811 |
2812 if (curr->isRelPositioned() && curr->hasLayer()) { | 2812 if (curr->isInFlowPositioned() && curr->hasLayer()) { |
2813 // If the relposition offset is anything other than 0, then treat th
is just like an absolute positioned element. | 2813 // If the relposition offset is anything other than 0, then treat th
is just like an absolute positioned element. |
2814 // Just disregard it completely. | 2814 // Just disregard it completely. |
2815 LayoutSize relOffset = curr->layer()->offsetForInFlowPosition(); | 2815 LayoutSize relOffset = curr->layer()->offsetForInFlowPosition(); |
2816 if (relOffset.width() || relOffset.height()) | 2816 if (relOffset.width() || relOffset.height()) |
2817 continue; | 2817 continue; |
2818 } | 2818 } |
2819 | 2819 |
2820 bool paintsOwnSelection = curr->shouldPaintSelectionGaps() || curr->isTa
ble(); // FIXME: Eventually we won't special-case table like this. | 2820 bool paintsOwnSelection = curr->shouldPaintSelectionGaps() || curr->isTa
ble(); // FIXME: Eventually we won't special-case table like this. |
2821 bool fillBlockGaps = paintsOwnSelection || (curr->canBeSelectionLeaf() &
& childState != SelectionNone); | 2821 bool fillBlockGaps = paintsOwnSelection || (curr->canBeSelectionLeaf() &
& childState != SelectionNone); |
2822 if (fillBlockGaps) { | 2822 if (fillBlockGaps) { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3078 FrameView* frameView = document().view(); | 3078 FrameView* frameView = document().view(); |
3079 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3079 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
3080 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3080 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
3081 if (size().height() < visibleHeight) | 3081 if (size().height() < visibleHeight) |
3082 top += (visibleHeight - size().height()) / 2; | 3082 top += (visibleHeight - size().height()) / 2; |
3083 setY(top); | 3083 setY(top); |
3084 dialog->setCentered(top); | 3084 dialog->setCentered(top); |
3085 } | 3085 } |
3086 | 3086 |
3087 } // namespace blink | 3087 } // namespace blink |
OLD | NEW |