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 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2768 for (curr = firstChildBox(); curr && curr->selectionState() == SelectionNone
; curr = curr->nextSiblingBox()) { } | 2768 for (curr = firstChildBox(); curr && curr->selectionState() == SelectionNone
; curr = curr->nextSiblingBox()) { } |
2769 | 2769 |
2770 for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->ne
xtSiblingBox()) { | 2770 for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->ne
xtSiblingBox()) { |
2771 SelectionState childState = curr->selectionState(); | 2771 SelectionState childState = curr->selectionState(); |
2772 if (childState == SelectionBoth || childState == SelectionEnd) | 2772 if (childState == SelectionBoth || childState == SelectionEnd) |
2773 sawSelectionEnd = true; | 2773 sawSelectionEnd = true; |
2774 | 2774 |
2775 if (curr->isFloatingOrOutOfFlowPositioned()) | 2775 if (curr->isFloatingOrOutOfFlowPositioned()) |
2776 continue; // We must be a normal flow object in order to even be con
sidered. | 2776 continue; // We must be a normal flow object in order to even be con
sidered. |
2777 | 2777 |
2778 if (curr->isRelPositioned() && curr->hasLayer()) { | 2778 if (curr->isInFlowPositioned() && curr->hasLayer()) { |
2779 // If the relposition offset is anything other than 0, then treat th
is just like an absolute positioned element. | 2779 // If the relposition offset is anything other than 0, then treat th
is just like an absolute positioned element. |
2780 // Just disregard it completely. | 2780 // Just disregard it completely. |
2781 LayoutSize relOffset = curr->layer()->offsetForInFlowPosition(); | 2781 LayoutSize relOffset = curr->layer()->offsetForInFlowPosition(); |
2782 if (relOffset.width() || relOffset.height()) | 2782 if (relOffset.width() || relOffset.height()) |
2783 continue; | 2783 continue; |
2784 } | 2784 } |
2785 | 2785 |
2786 bool paintsOwnSelection = curr->shouldPaintSelectionGaps() || curr->isTa
ble(); // FIXME: Eventually we won't special-case table like this. | 2786 bool paintsOwnSelection = curr->shouldPaintSelectionGaps() || curr->isTa
ble(); // FIXME: Eventually we won't special-case table like this. |
2787 bool fillBlockGaps = paintsOwnSelection || (curr->canBeSelectionLeaf() &
& childState != SelectionNone); | 2787 bool fillBlockGaps = paintsOwnSelection || (curr->canBeSelectionLeaf() &
& childState != SelectionNone); |
2788 if (fillBlockGaps) { | 2788 if (fillBlockGaps) { |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3044 FrameView* frameView = document().view(); | 3044 FrameView* frameView = document().view(); |
3045 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3045 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
3046 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3046 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
3047 if (size().height() < visibleHeight) | 3047 if (size().height() < visibleHeight) |
3048 top += (visibleHeight - size().height()) / 2; | 3048 top += (visibleHeight - size().height()) / 2; |
3049 setY(top); | 3049 setY(top); |
3050 dialog->setCentered(top); | 3050 dialog->setCentered(top); |
3051 } | 3051 } |
3052 | 3052 |
3053 } // namespace blink | 3053 } // namespace blink |
OLD | NEW |