| 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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 } | 1006 } |
| 1007 if (child->isColumnSpanAll()) { | 1007 if (child->isColumnSpanAll()) { |
| 1008 // This is not the containing block of the spanner. The spanner's pl
aceholder will lay | 1008 // This is not the containing block of the spanner. The spanner's pl
aceholder will lay |
| 1009 // it out in due course. For now we just need to consult our flow th
read, so that the | 1009 // it out in due course. For now we just need to consult our flow th
read, so that the |
| 1010 // columns (if any) preceding and following the spanner are laid out
correctly. But | 1010 // columns (if any) preceding and following the spanner are laid out
correctly. But |
| 1011 // first we apply the pending margin, so that it's taken into consid
eration and doesn't | 1011 // first we apply the pending margin, so that it's taken into consid
eration and doesn't |
| 1012 // end up on the other side of the spanner. | 1012 // end up on the other side of the spanner. |
| 1013 setLogicalHeight(logicalHeight() + marginInfo.margin()); | 1013 setLogicalHeight(logicalHeight() + marginInfo.margin()); |
| 1014 marginInfo.clearMargin(); | 1014 marginInfo.clearMargin(); |
| 1015 | 1015 |
| 1016 LayoutUnit adjustment = flowThreadContainingBlock()->skipColumnSpann
er(child, offsetFromLogicalTopOfFirstPage() + logicalHeight()); | 1016 flowThreadContainingBlock()->skipColumnSpanner(child, offsetFromLogi
calTopOfFirstPage() + logicalHeight()); |
| 1017 setLogicalHeight(logicalHeight() + adjustment); | |
| 1018 continue; | 1017 continue; |
| 1019 } | 1018 } |
| 1020 | 1019 |
| 1021 // Lay out the child. | 1020 // Lay out the child. |
| 1022 layoutBlockChild(*child, marginInfo, previousFloatLogicalBottom); | 1021 layoutBlockChild(*child, marginInfo, previousFloatLogicalBottom); |
| 1023 lastNormalFlowChild = child; | 1022 lastNormalFlowChild = child; |
| 1024 } | 1023 } |
| 1025 | 1024 |
| 1026 // Now do the handling of the bottom of the block, adding in our bottom bord
er/padding and | 1025 // Now do the handling of the bottom of the block, adding in our bottom bord
er/padding and |
| 1027 // determining the correct collapsed bottom margin information. | 1026 // determining the correct collapsed bottom margin information. |
| (...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3080 FrameView* frameView = document().view(); | 3079 FrameView* frameView = document().view(); |
| 3081 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3080 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
| 3082 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3081 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
| 3083 if (size().height() < visibleHeight) | 3082 if (size().height() < visibleHeight) |
| 3084 top += (visibleHeight - size().height()) / 2; | 3083 top += (visibleHeight - size().height()) / 2; |
| 3085 setY(top); | 3084 setY(top); |
| 3086 dialog->setCentered(top); | 3085 dialog->setCentered(top); |
| 3087 } | 3086 } |
| 3088 | 3087 |
| 3089 } // namespace blink | 3088 } // namespace blink |
| OLD | NEW |