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

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

Issue 2356183002: Stay put at the top of the current page when inserting a forced break. (Closed)
Patch Set: Created 4 years, 2 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, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 // End helper functions and structs used by layoutBlockChildren. 374 // End helper functions and structs used by layoutBlockChildren.
375 375
376 void removeFromGlobalMaps(); 376 void removeFromGlobalMaps();
377 bool widthAvailableToChildrenHasChanged(); 377 bool widthAvailableToChildrenHasChanged();
378 378
379 protected: 379 protected:
380 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL ogicalHeightForOffset(logicalOffset); } 380 bool isPageLogicalHeightKnown(LayoutUnit logicalOffset) const { return pageL ogicalHeightForOffset(logicalOffset); }
381 381
382 // Returns the logical offset at the top of the next page, for a given offse t. 382 // Returns the logical offset at the top of the next page, for a given offse t.
383 // 383 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset) const;
384 // If the given offset is at a page boundary, using AssociateWithLatterPage as PageBoundaryRule
385 // will move us one page ahead (since the offset is at the top of the "curre nt" page). Using
386 // AssociateWithFormerPage instead will keep us where we are (since the offs et is at the bottom
387 // of the "current" page, which is exactly the same offset as the top offset on the next page).
388 //
389 // For a page height of 800px, AssociateWithLatterPage will return 1600 if t he value passed in
390 // is 800. AssociateWithFormerPage will simply return 800.
391 LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule) co nst;
392 384
393 // Paginated content inside this block was laid out. 385 // Paginated content inside this block was laid out.
394 // |logicalBottomOffsetAfterPagination| is the logical bottom offset of the child content after 386 // |logicalBottomOffsetAfterPagination| is the logical bottom offset of the child content after
395 // applying any forced or unforced breaks as needed. 387 // applying any forced or unforced breaks as needed.
396 void paginatedContentWasLaidOut(LayoutUnit logicalBottomOffsetAfterPaginatio n); 388 void paginatedContentWasLaidOut(LayoutUnit logicalBottomOffsetAfterPaginatio n);
397 389
398 // Adjust from painting offsets to the local coords of this layoutObject 390 // Adjust from painting offsets to the local coords of this layoutObject
399 void offsetForContents(LayoutPoint&) const; 391 void offsetForContents(LayoutPoint&) const;
400 392
401 PositionWithAffinity positionForPointRespectingEditingBoundaries(LineLayoutB ox child, const LayoutPoint& pointInParentCoordinates); 393 PositionWithAffinity positionForPointRespectingEditingBoundaries(LineLayoutB ox child, const LayoutPoint& pointInParentCoordinates);
(...skipping 27 matching lines...) Expand all
429 // TODO(lunalu): Temporary in order to ensure compatibility with existing la yout test 421 // TODO(lunalu): Temporary in order to ensure compatibility with existing la yout test
430 // results. 422 // results.
431 virtual void adjustChildDebugRect(LayoutRect&) const {} 423 virtual void adjustChildDebugRect(LayoutRect&) const {}
432 }; 424 };
433 425
434 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 426 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
435 427
436 } // namespace blink 428 } // namespace blink
437 429
438 #endif // LayoutBlock_h 430 #endif // LayoutBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698