Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 #include "core/frame/FrameView.h" | 35 #include "core/frame/FrameView.h" |
| 36 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
| 37 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
| 38 #include "core/html/HTMLDialogElement.h" | 38 #include "core/html/HTMLDialogElement.h" |
| 39 #include "core/paint/BlockFlowPainter.h" | 39 #include "core/paint/BlockFlowPainter.h" |
| 40 #include "core/paint/DrawingRecorder.h" | 40 #include "core/paint/DrawingRecorder.h" |
| 41 #include "core/rendering/HitTestLocation.h" | 41 #include "core/rendering/HitTestLocation.h" |
| 42 #include "core/rendering/RenderFlowThread.h" | 42 #include "core/rendering/RenderFlowThread.h" |
| 43 #include "core/rendering/RenderLayer.h" | 43 #include "core/rendering/RenderLayer.h" |
| 44 #include "core/rendering/RenderMultiColumnFlowThread.h" | 44 #include "core/rendering/RenderMultiColumnFlowThread.h" |
| 45 #include "core/rendering/RenderMultiColumnSpannerPlaceholder.h" | |
| 45 #include "core/rendering/RenderPagedFlowThread.h" | 46 #include "core/rendering/RenderPagedFlowThread.h" |
| 46 #include "core/rendering/RenderText.h" | 47 #include "core/rendering/RenderText.h" |
| 47 #include "core/rendering/RenderView.h" | 48 #include "core/rendering/RenderView.h" |
| 48 #include "core/rendering/TextAutosizer.h" | 49 #include "core/rendering/TextAutosizer.h" |
| 49 #include "core/rendering/line/LineWidth.h" | 50 #include "core/rendering/line/LineWidth.h" |
| 50 #include "platform/geometry/TransformState.h" | 51 #include "platform/geometry/TransformState.h" |
| 51 #include "platform/text/BidiTextRun.h" | 52 #include "platform/text/BidiTextRun.h" |
| 52 | 53 |
| 53 namespace blink { | 54 namespace blink { |
| 54 | 55 |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1050 if (child->isOutOfFlowPositioned()) { | 1051 if (child->isOutOfFlowPositioned()) { |
| 1051 child->containingBlock()->insertPositionedObject(child); | 1052 child->containingBlock()->insertPositionedObject(child); |
| 1052 adjustPositionedBlock(*child, marginInfo); | 1053 adjustPositionedBlock(*child, marginInfo); |
| 1053 continue; | 1054 continue; |
| 1054 } | 1055 } |
| 1055 if (child->isFloating()) { | 1056 if (child->isFloating()) { |
| 1056 insertFloatingObject(*child); | 1057 insertFloatingObject(*child); |
| 1057 adjustFloatingBlock(marginInfo); | 1058 adjustFloatingBlock(marginInfo); |
| 1058 continue; | 1059 continue; |
| 1059 } | 1060 } |
| 1061 if (child->isColumnSpanAll()) { | |
| 1062 // This is not the containing block of the spanner. The spanner's pl aceholder will lay | |
| 1063 // it out in due course. | |
| 1064 continue; | |
| 1065 } | |
|
Julien - ping for review
2014/12/11 19:09:37
We have some code to avoid laying out some childre
mstensho (USE GERRIT)
2014/12/11 21:01:14
Then we would need to have layoutSpecialExcludedCh
Julien - ping for review
2014/12/11 23:45:44
No, we shouldn't do it as part of this change. The
| |
| 1060 | 1066 |
| 1061 // Lay out the child. | 1067 // Lay out the child. |
| 1062 layoutBlockChild(*child, marginInfo, previousFloatLogicalBottom); | 1068 layoutBlockChild(*child, marginInfo, previousFloatLogicalBottom); |
| 1063 lastNormalFlowChild = child; | 1069 lastNormalFlowChild = child; |
| 1064 } | 1070 } |
| 1065 | 1071 |
| 1066 // Now do the handling of the bottom of the block, adding in our bottom bord er/padding and | 1072 // Now do the handling of the bottom of the block, adding in our bottom bord er/padding and |
| 1067 // determining the correct collapsed bottom margin information. | 1073 // determining the correct collapsed bottom margin information. |
| 1068 handleAfterSideOfBlock(lastNormalFlowChild, beforeEdge, afterEdge, marginInf o); | 1074 handleAfterSideOfBlock(lastNormalFlowChild, beforeEdge, afterEdge, marginInf o); |
| 1069 } | 1075 } |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1964 } | 1970 } |
| 1965 | 1971 |
| 1966 parentBlockFlow->markAllDescendantsWithFloatsForLayout(); | 1972 parentBlockFlow->markAllDescendantsWithFloatsForLayout(); |
| 1967 parentBlockFlow->markSiblingsWithFloatsForLayout(); | 1973 parentBlockFlow->markSiblingsWithFloatsForLayout(); |
| 1968 } | 1974 } |
| 1969 | 1975 |
| 1970 if (diff.needsFullLayout() || !oldStyle) | 1976 if (diff.needsFullLayout() || !oldStyle) |
| 1971 createOrDestroyMultiColumnFlowThreadIfNeeded(oldStyle); | 1977 createOrDestroyMultiColumnFlowThreadIfNeeded(oldStyle); |
| 1972 } | 1978 } |
| 1973 | 1979 |
| 1980 void RenderBlockFlow::updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildre n, RenderBox& child) | |
| 1981 { | |
| 1982 if (child.isRenderMultiColumnSpannerPlaceholder() && toRenderMultiColumnSpan nerPlaceholder(child).rendererInFlowThread()->needsLayout()) { | |
| 1983 // The containing block of a spanner is the multicol container (|this| b lock), but the spanner | |
| 1984 // is laid out via its spanner set (|child|), so we need to make sure th at we enter it. | |
| 1985 child.setChildNeedsLayout(MarkOnlyThis); | |
| 1986 } | |
| 1987 RenderBlock::updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, child); | |
| 1988 } | |
| 1989 | |
| 1974 void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox& child, Layou tUnit logicalTop) | 1990 void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox& child, Layou tUnit logicalTop) |
| 1975 { | 1991 { |
| 1976 if (child.style()->isOriginalDisplayInlineType()) | 1992 if (child.style()->isOriginalDisplayInlineType()) |
| 1977 setStaticInlinePositionForChild(child, startAlignedOffsetForLine(logical Top, false)); | 1993 setStaticInlinePositionForChild(child, startAlignedOffsetForLine(logical Top, false)); |
| 1978 else | 1994 else |
| 1979 setStaticInlinePositionForChild(child, startOffsetForContent()); | 1995 setStaticInlinePositionForChild(child, startOffsetForContent()); |
| 1980 } | 1996 } |
| 1981 | 1997 |
| 1982 void RenderBlockFlow::setStaticInlinePositionForChild(RenderBox& child, LayoutUn it inlinePosition) | 1998 void RenderBlockFlow::setStaticInlinePositionForChild(RenderBox& child, LayoutUn it inlinePosition) |
| 1983 { | 1999 { |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3092 FrameView* frameView = document().view(); | 3108 FrameView* frameView = document().view(); |
| 3093 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); | 3109 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); |
| 3094 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); | 3110 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); |
| 3095 if (height() < visibleHeight) | 3111 if (height() < visibleHeight) |
| 3096 top += (visibleHeight - height()) / 2; | 3112 top += (visibleHeight - height()) / 2; |
| 3097 setY(top); | 3113 setY(top); |
| 3098 dialog->setCentered(top); | 3114 dialog->setCentered(top); |
| 3099 } | 3115 } |
| 3100 | 3116 |
| 3101 } // namespace blink | 3117 } // namespace blink |
| OLD | NEW |