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

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

Issue 2553653003: Make ifdefs consistent in WebKit/Source/core/layout/ . (Closed)
Patch Set: Created 4 years 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 return isBeforeContent() || isAfterContent(); 2495 return isBeforeContent() || isAfterContent();
2496 } 2496 }
2497 2497
2498 // setNeedsLayout() won't cause full paint invalidations as 2498 // setNeedsLayout() won't cause full paint invalidations as
2499 // setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are 2499 // setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are
2500 // identical. 2500 // identical.
2501 inline void LayoutObject::setNeedsLayout( 2501 inline void LayoutObject::setNeedsLayout(
2502 LayoutInvalidationReasonForTracing reason, 2502 LayoutInvalidationReasonForTracing reason,
2503 MarkingBehavior markParents, 2503 MarkingBehavior markParents,
2504 SubtreeLayoutScope* layouter) { 2504 SubtreeLayoutScope* layouter) {
2505 ASSERT(!isSetNeedsLayoutForbidden()); 2505 #if DCHECK_IS_ON()
2506 DCHECK(!isSetNeedsLayoutForbidden());
2507 #endif
2506 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); 2508 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout();
2507 setSelfNeedsLayout(true); 2509 setSelfNeedsLayout(true);
2508 if (!alreadyNeededLayout) { 2510 if (!alreadyNeededLayout) {
2509 TRACE_EVENT_INSTANT1( 2511 TRACE_EVENT_INSTANT1(
2510 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"), 2512 TRACE_DISABLED_BY_DEFAULT("devtools.timeline.invalidationTracking"),
2511 "LayoutInvalidationTracking", TRACE_EVENT_SCOPE_THREAD, "data", 2513 "LayoutInvalidationTracking", TRACE_EVENT_SCOPE_THREAD, "data",
2512 InspectorLayoutInvalidationTrackingEvent::data(this, reason)); 2514 InspectorLayoutInvalidationTrackingEvent::data(this, reason));
2513 if (markParents == MarkContainerChain && 2515 if (markParents == MarkContainerChain &&
2514 (!layouter || layouter->root() != this)) 2516 (!layouter || layouter->root() != this))
2515 markContainerChainForLayout(!layouter, layouter); 2517 markContainerChainForLayout(!layouter, layouter);
(...skipping 23 matching lines...) Expand all
2539 2541
2540 #if DCHECK_IS_ON() 2542 #if DCHECK_IS_ON()
2541 checkBlockPositionedObjectsNeedLayout(); 2543 checkBlockPositionedObjectsNeedLayout();
2542 #endif 2544 #endif
2543 2545
2544 setScrollAnchorDisablingStyleChanged(false); 2546 setScrollAnchorDisablingStyleChanged(false);
2545 } 2547 }
2546 2548
2547 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents, 2549 inline void LayoutObject::setChildNeedsLayout(MarkingBehavior markParents,
2548 SubtreeLayoutScope* layouter) { 2550 SubtreeLayoutScope* layouter) {
2549 ASSERT(!isSetNeedsLayoutForbidden()); 2551 #if DCHECK_IS_ON()
2552 DCHECK(!isSetNeedsLayoutForbidden());
2553 #endif
2550 bool alreadyNeededLayout = normalChildNeedsLayout(); 2554 bool alreadyNeededLayout = normalChildNeedsLayout();
2551 setNormalChildNeedsLayout(true); 2555 setNormalChildNeedsLayout(true);
2552 // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and 2556 // FIXME: Replace MarkOnlyThis with the SubtreeLayoutScope code path and
2553 // remove the MarkingBehavior argument entirely. 2557 // remove the MarkingBehavior argument entirely.
2554 if (!alreadyNeededLayout && markParents == MarkContainerChain && 2558 if (!alreadyNeededLayout && markParents == MarkContainerChain &&
2555 (!layouter || layouter->root() != this)) 2559 (!layouter || layouter->root() != this))
2556 markContainerChainForLayout(!layouter, layouter); 2560 markContainerChainForLayout(!layouter, layouter);
2557 } 2561 }
2558 2562
2559 inline void LayoutObject::setNeedsPositionedMovementLayout() { 2563 inline void LayoutObject::setNeedsPositionedMovementLayout() {
2560 bool alreadyNeededLayout = needsPositionedMovementLayout(); 2564 bool alreadyNeededLayout = needsPositionedMovementLayout();
2561 setNeedsPositionedMovementLayout(true); 2565 setNeedsPositionedMovementLayout(true);
2566 #if DCHECK_IS_ON()
2562 ASSERT(!isSetNeedsLayoutForbidden()); 2567 ASSERT(!isSetNeedsLayoutForbidden());
mstensho (USE GERRIT) 2016/12/06 09:58:46 DCHECK
Alexander Alekseev 2016/12/06 10:13:30 Done.
2568 #endif
2563 if (!alreadyNeededLayout) 2569 if (!alreadyNeededLayout)
2564 markContainerChainForLayout(); 2570 markContainerChainForLayout();
2565 } 2571 }
2566 2572
2567 inline bool LayoutObject::preservesNewline() const { 2573 inline bool LayoutObject::preservesNewline() const {
2568 if (isSVGInlineText()) 2574 if (isSVGInlineText())
2569 return false; 2575 return false;
2570 2576
2571 return style()->preserveNewline(); 2577 return style()->preserveNewline();
2572 } 2578 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 CORE_EXPORT void showLineTree(const blink::LayoutObject*); 2668 CORE_EXPORT void showLineTree(const blink::LayoutObject*);
2663 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); 2669 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1);
2664 // We don't make object2 an optional parameter so that showLayoutTree 2670 // We don't make object2 an optional parameter so that showLayoutTree
2665 // can be called from gdb easily. 2671 // can be called from gdb easily.
2666 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, 2672 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1,
2667 const blink::LayoutObject* object2); 2673 const blink::LayoutObject* object2);
2668 2674
2669 #endif 2675 #endif
2670 2676
2671 #endif // LayoutObject_h 2677 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698