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

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

Issue 2523533002: Call scrollbarsChanged in PLSA::updateAfterStyleChange. (Closed)
Patch Set: fix test 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) 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, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 void setMarginBeforeForChild(LayoutBox& child, LayoutUnit value) const { 275 void setMarginBeforeForChild(LayoutBox& child, LayoutUnit value) const {
276 child.setMarginBefore(value, style()); 276 child.setMarginBefore(value, style());
277 } 277 }
278 void setMarginAfterForChild(LayoutBox& child, LayoutUnit value) const { 278 void setMarginAfterForChild(LayoutBox& child, LayoutUnit value) const {
279 child.setMarginAfter(value, style()); 279 child.setMarginAfter(value, style());
280 } 280 }
281 LayoutUnit collapsedMarginBeforeForChild(const LayoutBox& child) const; 281 LayoutUnit collapsedMarginBeforeForChild(const LayoutBox& child) const;
282 LayoutUnit collapsedMarginAfterForChild(const LayoutBox& child) const; 282 LayoutUnit collapsedMarginAfterForChild(const LayoutBox& child) const;
283 283
284 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, 284 enum ScrollbarChangeContext { StyleChange, Layout };
285 bool /*verticalScrollbarChanged*/); 285 virtual void scrollbarsChanged(bool horizontalScrollbarChanged,
286 bool verticalScrollbarChanged,
287 ScrollbarChangeContext = Layout);
286 288
287 LayoutUnit availableLogicalWidthForContent() const { 289 LayoutUnit availableLogicalWidthForContent() const {
288 return (logicalRightOffsetForContent() - logicalLeftOffsetForContent()) 290 return (logicalRightOffsetForContent() - logicalLeftOffsetForContent())
289 .clampNegativeToZero(); 291 .clampNegativeToZero();
290 } 292 }
291 DISABLE_CFI_PERF LayoutUnit logicalLeftOffsetForContent() const { 293 DISABLE_CFI_PERF LayoutUnit logicalLeftOffsetForContent() const {
292 return isHorizontalWritingMode() ? borderLeft() + paddingLeft() 294 return isHorizontalWritingMode() ? borderLeft() + paddingLeft()
293 : borderTop() + paddingTop(); 295 : borderTop() + paddingTop();
294 } 296 }
295 LayoutUnit logicalRightOffsetForContent() const { 297 LayoutUnit logicalRightOffsetForContent() const {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // TODO(lunalu): Temporary in order to ensure compatibility with existing 568 // TODO(lunalu): Temporary in order to ensure compatibility with existing
567 // layout test results. 569 // layout test results.
568 virtual void adjustChildDebugRect(LayoutRect&) const {} 570 virtual void adjustChildDebugRect(LayoutRect&) const {}
569 }; 571 };
570 572
571 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 573 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
572 574
573 } // namespace blink 575 } // namespace blink
574 576
575 #endif // LayoutBlock_h 577 #endif // LayoutBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698