aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-01-19 08:33:48 -0700
committerbors-servo <metajack+bors@gmail.com>2015-01-19 08:33:48 -0700
commitee94b3e8bf659c847bda967700272f8f98fdb0cc (patch)
treeb2eb4585705b7b71229647ed2d77289d00474f75 /components/layout
parentf3dfe04fa45bd723fac40d1452550d55240f80f8 (diff)
parent394f8163433559cea294cb4a4e335cc43ccde1fe (diff)
downloadservo-ee94b3e8bf659c847bda967700272f8f98fdb0cc.tar.gz
servo-ee94b3e8bf659c847bda967700272f8f98fdb0cc.zip
auto merge of #4662 : Ms2ger/servo/overlong, r=larsbergstrom
The Rust style guide suggests 100, but we have too many violations in the tree already. This check can be tightened over time.
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/fragment.rs23
1 files changed, 18 insertions, 5 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 521b000dfcf..8bad0a288b6 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -1256,11 +1256,24 @@ impl Fragment {
pub fn find_split_info_by_new_line(&self)
-> Option<(SplitInfo, Option<SplitInfo>, Arc<Box<TextRun>> /* TODO(bjz): remove */)> {
match self.specific {
- SpecificFragmentInfo::Canvas(_) | SpecificFragmentInfo::Generic | SpecificFragmentInfo::Iframe(_) | SpecificFragmentInfo::Image(_) | SpecificFragmentInfo::Table | SpecificFragmentInfo::TableCell |
- SpecificFragmentInfo::TableRow | SpecificFragmentInfo::TableWrapper => None,
- SpecificFragmentInfo::TableColumn(_) => panic!("Table column fragments do not need to split"),
- SpecificFragmentInfo::UnscannedText(_) => panic!("Unscanned text fragments should have been scanned by now!"),
- SpecificFragmentInfo::InlineBlock(_) | SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
+ SpecificFragmentInfo::Canvas(_) |
+ SpecificFragmentInfo::Generic |
+ SpecificFragmentInfo::Iframe(_) |
+ SpecificFragmentInfo::Image(_) |
+ SpecificFragmentInfo::Table |
+ SpecificFragmentInfo::TableCell |
+ SpecificFragmentInfo::TableRow |
+ SpecificFragmentInfo::TableWrapper => {
+ None
+ }
+ SpecificFragmentInfo::TableColumn(_) => {
+ panic!("Table column fragments do not need to split")
+ }
+ SpecificFragmentInfo::UnscannedText(_) => {
+ panic!("Unscanned text fragments should have been scanned by now!")
+ }
+ SpecificFragmentInfo::InlineBlock(_) |
+ SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
panic!("Inline blocks or inline absolute hypothetical fragments do not get split")
}
SpecificFragmentInfo::ScannedText(ref text_fragment_info) => {