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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp

Issue 1908393002: Don't allow column spanners inside transforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/span/invalid-spanner-in-transform-expected.html ('k') | no next file » | 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return false; 80 return false;
81 return toLayoutBlockFlow(object).multiColumnFlowThread(); 81 return toLayoutBlockFlow(object).multiColumnFlowThread();
82 } 82 }
83 83
84 static inline bool canContainSpannerInParentFragmentationContext(const LayoutObj ect& object) 84 static inline bool canContainSpannerInParentFragmentationContext(const LayoutObj ect& object)
85 { 85 {
86 if (!object.isLayoutBlockFlow()) 86 if (!object.isLayoutBlockFlow())
87 return false; 87 return false;
88 const LayoutBlockFlow& blockFlow = toLayoutBlockFlow(object); 88 const LayoutBlockFlow& blockFlow = toLayoutBlockFlow(object);
89 return !blockFlow.createsNewFormattingContext() 89 return !blockFlow.createsNewFormattingContext()
90 && !blockFlow.hasTransformRelatedProperty()
eae 2016/04/22 16:52:23 Could you please add a comment to this method that
mstensho (USE GERRIT) 2016/04/22 17:44:39 Done.
90 && blockFlow.getPaginationBreakability() != LayoutBox::ForbidBreaks 91 && blockFlow.getPaginationBreakability() != LayoutBox::ForbidBreaks
91 && !isMultiColumnContainer(blockFlow); 92 && !isMultiColumnContainer(blockFlow);
92 } 93 }
93 94
94 static inline bool hasAnyColumnSpanners(const LayoutMultiColumnFlowThread& flowT hread) 95 static inline bool hasAnyColumnSpanners(const LayoutMultiColumnFlowThread& flowT hread)
95 { 96 {
96 LayoutBox* firstBox = flowThread.firstMultiColumnBox(); 97 LayoutBox* firstBox = flowThread.firstMultiColumnBox();
97 return firstBox && (firstBox != flowThread.lastMultiColumnBox() || firstBox- >isLayoutMultiColumnSpannerPlaceholder()); 98 return firstBox && (firstBox != flowThread.lastMultiColumnBox() || firstBox- >isLayoutMultiColumnSpannerPlaceholder());
98 } 99 }
99 100
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 } 1030 }
1030 if (canContainSpannerInParentFragmentationContext(*object)) 1031 if (canContainSpannerInParentFragmentationContext(*object))
1031 next = object->nextInPreOrder(&root); 1032 next = object->nextInPreOrder(&root);
1032 else 1033 else
1033 next = object->nextInPreOrderAfterChildren(&root); 1034 next = object->nextInPreOrderAfterChildren(&root);
1034 } 1035 }
1035 return true; 1036 return true;
1036 } 1037 }
1037 1038
1038 } // namespace blink 1039 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/span/invalid-spanner-in-transform-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698