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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 166033009: *** FOR PROTOTYPE PURPOSES ONLY! NOT INTENDED FOR COMMIT! *** (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 * 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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 return; 1298 return;
1299 1299
1300 // It's safe to check for control clip here, since controls can never be tab le cells. 1300 // It's safe to check for control clip here, since controls can never be tab le cells.
1301 // If we have a lightweight clip, there can never be any overflow from child ren. 1301 // If we have a lightweight clip, there can never be any overflow from child ren.
1302 if (hasControlClip() && m_overflow) 1302 if (hasControlClip() && m_overflow)
1303 clearLayoutOverflow(); 1303 clearLayoutOverflow();
1304 1304
1305 invalidateBackgroundObscurationStatus(); 1305 invalidateBackgroundObscurationStatus();
1306 } 1306 }
1307 1307
1308 void RenderBlock::preLayout()
1309 {
1310 OverflowEventDispatcher dispatcher(this);
1311 LayoutRectRecorder recorder(*this);
eseidel 2014/02/15 00:37:18 This won't work, it will expect that layout is don
atreat 2014/02/18 16:03:57 Yes, this one I missed and we'll need a stack. Mo
dsinclair 2014/02/18 16:07:06 LayoutRectRecorder should be fine, you just have t
1312
1313 // Update our first letter info now.
1314 updateFirstLetter();
1315
1316 // Table cells call layoutBlock directly, so don't add any logic here. Put code into
1317 // layoutBlock().
1318 preLayoutBlock(false, false);
1319 }
1320
1321 void RenderBlock::postLayout()
1322 {
1323 postLayoutBlock();
1324
1325 if (frameView()->partialLayout().isStopping())
1326 return;
1327
1328 // It's safe to check for control clip here, since controls can never be tab le cells.
1329 // If we have a lightweight clip, there can never be any overflow from child ren.
1330 if (hasControlClip() && m_overflow)
1331 clearLayoutOverflow();
1332
1333 invalidateBackgroundObscurationStatus();
1334 }
1335
1308 bool RenderBlock::updateImageLoadingPriorities() 1336 bool RenderBlock::updateImageLoadingPriorities()
1309 { 1337 {
1310 Vector<ImageResource*> images; 1338 Vector<ImageResource*> images;
1311 appendImagesFromStyle(images, *style()); 1339 appendImagesFromStyle(images, *style());
1312 1340
1313 if (images.isEmpty()) 1341 if (images.isEmpty())
1314 return false; 1342 return false;
1315 1343
1316 LayoutRect viewBounds = viewRect(); 1344 LayoutRect viewBounds = viewRect();
1317 LayoutRect objectBounds = absoluteContentBox(); 1345 LayoutRect objectBounds = absoluteContentBox();
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 1536
1509 return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth() || hasBorderOrPaddingLogicalWidthChanged; 1537 return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth() || hasBorderOrPaddingLogicalWidthChanged;
1510 } 1538 }
1511 1539
1512 void RenderBlock::layoutBlock(bool) 1540 void RenderBlock::layoutBlock(bool)
1513 { 1541 {
1514 ASSERT_NOT_REACHED(); 1542 ASSERT_NOT_REACHED();
1515 clearNeedsLayout(); 1543 clearNeedsLayout();
1516 } 1544 }
1517 1545
1546 void RenderBlock::preLayoutBlock(bool, bool)
1547 {
1548 ASSERT_NOT_REACHED();
1549 clearNeedsLayout();
1550 }
1551
1552 bool RenderBlock::postLayoutBlock()
1553 {
1554 ASSERT_NOT_REACHED();
1555 return false;
1556 }
1557
1518 void RenderBlock::addOverflowFromChildren() 1558 void RenderBlock::addOverflowFromChildren()
1519 { 1559 {
1520 if (!hasColumns()) { 1560 if (!hasColumns()) {
1521 if (childrenInline()) 1561 if (childrenInline())
1522 toRenderBlockFlow(this)->addOverflowFromInlineChildren(); 1562 toRenderBlockFlow(this)->addOverflowFromInlineChildren();
1523 else 1563 else
1524 addOverflowFromBlockChildren(); 1564 addOverflowFromBlockChildren();
1525 } else { 1565 } else {
1526 ColumnInfo* colInfo = columnInfo(); 1566 ColumnInfo* colInfo = columnInfo();
1527 if (columnCount(colInfo)) { 1567 if (columnCount(colInfo)) {
(...skipping 4116 matching lines...) Expand 10 before | Expand all | Expand 10 after
5644 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5684 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5645 { 5685 {
5646 showRenderObject(); 5686 showRenderObject();
5647 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5687 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5648 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5688 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5649 } 5689 }
5650 5690
5651 #endif 5691 #endif
5652 5692
5653 } // namespace WebCore 5693 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698