Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1119293002: Enable new multicol for testing and experimental web platform features. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/layout/LayoutText.h" 45 #include "core/layout/LayoutText.h"
46 #include "core/layout/LayoutView.h" 46 #include "core/layout/LayoutView.h"
47 #include "core/layout/TextAutosizer.h" 47 #include "core/layout/TextAutosizer.h"
48 #include "core/layout/line/LineBreaker.h" 48 #include "core/layout/line/LineBreaker.h"
49 #include "core/layout/line/LineWidth.h" 49 #include "core/layout/line/LineWidth.h"
50 #include "core/paint/BlockFlowPainter.h" 50 #include "core/paint/BlockFlowPainter.h"
51 #include "core/paint/ClipScope.h" 51 #include "core/paint/ClipScope.h"
52 #include "core/paint/DeprecatedPaintLayer.h" 52 #include "core/paint/DeprecatedPaintLayer.h"
53 #include "core/paint/LayoutObjectDrawingRecorder.h" 53 #include "core/paint/LayoutObjectDrawingRecorder.h"
54 #include "core/paint/PaintInfo.h" 54 #include "core/paint/PaintInfo.h"
55 #include "platform/RuntimeEnabledFeatures.h"
55 #include "platform/geometry/TransformState.h" 56 #include "platform/geometry/TransformState.h"
56 #include "platform/text/BidiTextRun.h" 57 #include "platform/text/BidiTextRun.h"
57 58
58 namespace blink { 59 namespace blink {
59 60
60 bool LayoutBlockFlow::s_canPropagateFloatIntoSibling = false; 61 bool LayoutBlockFlow::s_canPropagateFloatIntoSibling = false;
61 62
62 struct SameSizeAsMarginInfo { 63 struct SameSizeAsMarginInfo {
63 uint16_t bitfields; 64 uint16_t bitfields;
64 LayoutUnit margins[2]; 65 LayoutUnit margins[2];
(...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after
3095 // Paged overflow is currently done using the multicol implementation. 3096 // Paged overflow is currently done using the multicol implementation.
3096 return LayoutPagedFlowThread::createAnonymous(document(), styleRef()); 3097 return LayoutPagedFlowThread::createAnonymous(document(), styleRef());
3097 default: 3098 default:
3098 ASSERT_NOT_REACHED(); 3099 ASSERT_NOT_REACHED();
3099 return nullptr; 3100 return nullptr;
3100 } 3101 }
3101 } 3102 }
3102 3103
3103 void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded(const Compute dStyle* oldStyle) 3104 void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded(const Compute dStyle* oldStyle)
3104 { 3105 {
3105 if (!document().regionBasedColumnsEnabled()) 3106 if (!RuntimeEnabledFeatures::regionBasedColumnsEnabled())
3106 return; 3107 return;
3107 3108
3108 // Paged overflow trumps multicol in this implementation. Ideally, it should be possible to have 3109 // Paged overflow trumps multicol in this implementation. Ideally, it should be possible to have
3109 // both paged overflow and multicol on the same element, but then we need tw o flow 3110 // both paged overflow and multicol on the same element, but then we need tw o flow
3110 // threads. Anyway, this is nothing to worry about until we can actually nes t multicol properly 3111 // threads. Anyway, this is nothing to worry about until we can actually nes t multicol properly
3111 // inside other fragmentation contexts. 3112 // inside other fragmentation contexts.
3112 FlowThreadType type = flowThreadType(styleRef()); 3113 FlowThreadType type = flowThreadType(styleRef());
3113 3114
3114 if (multiColumnFlowThread()) { 3115 if (multiColumnFlowThread()) {
3115 ASSERT(oldStyle); 3116 ASSERT(oldStyle);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 FrameView* frameView = document().view(); 3185 FrameView* frameView = document().view();
3185 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3186 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3186 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3187 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3187 if (size().height() < visibleHeight) 3188 if (size().height() < visibleHeight)
3188 top += (visibleHeight - size().height()) / 2; 3189 top += (visibleHeight - size().height()) / 2;
3189 setY(top); 3190 setY(top);
3190 dialog->setCentered(top); 3191 dialog->setCentered(top);
3191 } 3192 }
3192 3193
3193 } // namespace blink 3194 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698