| 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 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 LayoutBlock::addChild(newChild, beforeChild); | 1971 LayoutBlock::addChild(newChild, beforeChild); |
| 1972 } | 1972 } |
| 1973 | 1973 |
| 1974 void LayoutBlockFlow::moveAllChildrenIncludingFloatsTo(LayoutBlock* toBlock, boo
l fullRemoveInsert) | 1974 void LayoutBlockFlow::moveAllChildrenIncludingFloatsTo(LayoutBlock* toBlock, boo
l fullRemoveInsert) |
| 1975 { | 1975 { |
| 1976 LayoutBlockFlow* toBlockFlow = toLayoutBlockFlow(toBlock); | 1976 LayoutBlockFlow* toBlockFlow = toLayoutBlockFlow(toBlock); |
| 1977 moveAllChildrenTo(toBlockFlow, fullRemoveInsert); | 1977 moveAllChildrenTo(toBlockFlow, fullRemoveInsert); |
| 1978 | 1978 |
| 1979 // When a portion of the layout tree is being detached, anonymous blocks | 1979 // When a portion of the layout tree is being detached, anonymous blocks |
| 1980 // will be combined as their children are deleted. In this process, the | 1980 // will be combined as their children are deleted. In this process, the |
| 1981 // anonymous block later in the tree is merged into the one preceeding it. | 1981 // anonymous block later in the tree is merged into the one preceding it. |
| 1982 // It can happen that the later block (this) contains floats that the | 1982 // It can happen that the later block (this) contains floats that the |
| 1983 // previous block (toBlockFlow) did not contain, and thus are not in the | 1983 // previous block (toBlockFlow) did not contain, and thus are not in the |
| 1984 // floating objects list for toBlockFlow. This can result in toBlockFlow con
taining | 1984 // floating objects list for toBlockFlow. This can result in toBlockFlow con
taining |
| 1985 // floats that are not in it's floating objects list, but are in the | 1985 // floats that are not in it's floating objects list, but are in the |
| 1986 // floating objects lists of siblings and parents. This can cause problems | 1986 // floating objects lists of siblings and parents. This can cause problems |
| 1987 // when the float itself is deleted, since the deletion code assumes that | 1987 // when the float itself is deleted, since the deletion code assumes that |
| 1988 // if a float is not in it's containing block's floating objects list, it | 1988 // if a float is not in it's containing block's floating objects list, it |
| 1989 // isn't in any floating objects list. In order to preserve this condition | 1989 // isn't in any floating objects list. In order to preserve this condition |
| 1990 // (removing it has serious performance implications), we need to copy the | 1990 // (removing it has serious performance implications), we need to copy the |
| 1991 // floating objects from the old block (this) to the new block (toBlockFlow)
. | 1991 // floating objects from the old block (this) to the new block (toBlockFlow)
. |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3106 FrameView* frameView = document().view(); | 3106 FrameView* frameView = document().view(); |
| 3107 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3107 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
| 3108 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3108 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
| 3109 if (size().height() < visibleHeight) | 3109 if (size().height() < visibleHeight) |
| 3110 top += (visibleHeight - size().height()) / 2; | 3110 top += (visibleHeight - size().height()) / 2; |
| 3111 setY(top); | 3111 setY(top); |
| 3112 dialog->setCentered(top); | 3112 dialog->setCentered(top); |
| 3113 } | 3113 } |
| 3114 | 3114 |
| 3115 } // namespace blink | 3115 } // namespace blink |
| OLD | NEW |