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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.h

Issue 1577433003: Statistics of LayoutBox rare data reasons Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are 10 * modification, are permitted provided that the following conditions are
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 : m_margins(positiveMarginBeforeDefault(block), 675 : m_margins(positiveMarginBeforeDefault(block),
676 negativeMarginBeforeDefault(block), 676 negativeMarginBeforeDefault(block),
677 positiveMarginAfterDefault(block), 677 positiveMarginAfterDefault(block),
678 negativeMarginAfterDefault(block)), 678 negativeMarginAfterDefault(block)),
679 m_multiColumnFlowThread(nullptr), 679 m_multiColumnFlowThread(nullptr),
680 m_breakBefore(static_cast<unsigned>(EBreakBetween::kAuto)), 680 m_breakBefore(static_cast<unsigned>(EBreakBetween::kAuto)),
681 m_breakAfter(static_cast<unsigned>(EBreakBetween::kAuto)), 681 m_breakAfter(static_cast<unsigned>(EBreakBetween::kAuto)),
682 m_lineBreakToAvoidWidow(-1), 682 m_lineBreakToAvoidWidow(-1),
683 m_didBreakAtLineToAvoidWidow(false), 683 m_didBreakAtLineToAvoidWidow(false),
684 m_discardMarginBefore(false), 684 m_discardMarginBefore(false),
685 m_discardMarginAfter(false) {} 685 m_discardMarginAfter(false) {
686 block->m_rareStat.addReason(ReasonLBFRareData);
687 }
686 688
687 static LayoutUnit positiveMarginBeforeDefault( 689 static LayoutUnit positiveMarginBeforeDefault(
688 const LayoutBlockFlow* block) { 690 const LayoutBlockFlow* block) {
689 return block->marginBefore().clampNegativeToZero(); 691 return block->marginBefore().clampNegativeToZero();
690 } 692 }
691 static LayoutUnit negativeMarginBeforeDefault( 693 static LayoutUnit negativeMarginBeforeDefault(
692 const LayoutBlockFlow* block) { 694 const LayoutBlockFlow* block) {
693 return (-block->marginBefore()).clampNegativeToZero(); 695 return (-block->marginBefore()).clampNegativeToZero();
694 } 696 }
695 static LayoutUnit positiveMarginAfterDefault(const LayoutBlockFlow* block) { 697 static LayoutUnit positiveMarginAfterDefault(const LayoutBlockFlow* block) {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 void positionDialog(); 955 void positionDialog();
954 956
955 // END METHODS DEFINED IN LayoutBlockFlowLine 957 // END METHODS DEFINED IN LayoutBlockFlowLine
956 }; 958 };
957 959
958 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); 960 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow());
959 961
960 } // namespace blink 962 } // namespace blink
961 963
962 #endif // LayoutBlockFlow_h 964 #endif // LayoutBlockFlow_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698