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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 return createPositionWithAffinity(caretMaxOffset()); 1289 return createPositionWithAffinity(caretMaxOffset());
1290 if (pointLogicalTop < 0) 1290 if (pointLogicalTop < 0)
1291 return createPositionWithAffinity(caretMinOffset()); 1291 return createPositionWithAffinity(caretMinOffset());
1292 if (pointLogicalTop >= logicalHeight()) 1292 if (pointLogicalTop >= logicalHeight())
1293 return createPositionWithAffinity(caretMaxOffset()); 1293 return createPositionWithAffinity(caretMaxOffset());
1294 return PositionWithAffinity(); 1294 return PositionWithAffinity();
1295 } 1295 }
1296 1296
1297 static inline bool isChildHitTestCandidate(LayoutBox* box) { 1297 static inline bool isChildHitTestCandidate(LayoutBox* box) {
1298 return box->size().height() && 1298 return box->size().height() &&
1299 box->style()->visibility() == EVisibility::Visible && 1299 box->style()->visibility() == EVisibility::kVisible &&
1300 !box->isFloatingOrOutOfFlowPositioned() && !box->isLayoutFlowThread(); 1300 !box->isFloatingOrOutOfFlowPositioned() && !box->isLayoutFlowThread();
1301 } 1301 }
1302 1302
1303 PositionWithAffinity LayoutBlock::positionForPoint(const LayoutPoint& point) { 1303 PositionWithAffinity LayoutBlock::positionForPoint(const LayoutPoint& point) {
1304 if (isTable()) 1304 if (isTable())
1305 return LayoutBox::positionForPoint(point); 1305 return LayoutBox::positionForPoint(point);
1306 1306
1307 if (isAtomicInlineLevel()) { 1307 if (isAtomicInlineLevel()) {
1308 PositionWithAffinity position = 1308 PositionWithAffinity position =
1309 positionForPointIfOutsideAtomicInlineLevel(point); 1309 positionForPointIfOutsideAtomicInlineLevel(point);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 m_minPreferredLogicalWidth += borderAndPadding; 1466 m_minPreferredLogicalWidth += borderAndPadding;
1467 m_maxPreferredLogicalWidth += borderAndPadding; 1467 m_maxPreferredLogicalWidth += borderAndPadding;
1468 1468
1469 clearPreferredLogicalWidthsDirty(); 1469 clearPreferredLogicalWidthsDirty();
1470 } 1470 }
1471 1471
1472 void LayoutBlock::computeBlockPreferredLogicalWidths( 1472 void LayoutBlock::computeBlockPreferredLogicalWidths(
1473 LayoutUnit& minLogicalWidth, 1473 LayoutUnit& minLogicalWidth,
1474 LayoutUnit& maxLogicalWidth) const { 1474 LayoutUnit& maxLogicalWidth) const {
1475 const ComputedStyle& styleToUse = styleRef(); 1475 const ComputedStyle& styleToUse = styleRef();
1476 bool nowrap = styleToUse.whiteSpace() == EWhiteSpace::Nowrap; 1476 bool nowrap = styleToUse.whiteSpace() == EWhiteSpace::kNowrap;
1477 1477
1478 LayoutObject* child = firstChild(); 1478 LayoutObject* child = firstChild();
1479 LayoutBlock* containingBlock = this->containingBlock(); 1479 LayoutBlock* containingBlock = this->containingBlock();
1480 LayoutUnit floatLeftWidth, floatRightWidth; 1480 LayoutUnit floatLeftWidth, floatRightWidth;
1481 while (child) { 1481 while (child) {
1482 // Positioned children don't affect the min/max width. Spanners only affect 1482 // Positioned children don't affect the min/max width. Spanners only affect
1483 // the min/max width of the multicol container, not the flow thread. 1483 // the min/max width of the multicol container, not the flow thread.
1484 if (child->isOutOfFlowPositioned() || child->isColumnSpanAll()) { 1484 if (child->isOutOfFlowPositioned() || child->isColumnSpanAll()) {
1485 child = child->nextSibling(); 1485 child = child->nextSibling();
1486 continue; 1486 continue;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 w = childMaxPreferredLogicalWidth + maxLeft + maxRight; 1549 w = childMaxPreferredLogicalWidth + maxLeft + maxRight;
1550 w = std::max(w, floatLeftWidth + floatRightWidth); 1550 w = std::max(w, floatLeftWidth + floatRightWidth);
1551 } else { 1551 } else {
1552 maxLogicalWidth = 1552 maxLogicalWidth =
1553 std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth); 1553 std::max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
1554 } 1554 }
1555 floatLeftWidth = floatRightWidth = LayoutUnit(); 1555 floatLeftWidth = floatRightWidth = LayoutUnit();
1556 } 1556 }
1557 1557
1558 if (child->isFloating()) { 1558 if (child->isFloating()) {
1559 if (childStyle->floating() == EFloat::Left) 1559 if (childStyle->floating() == EFloat::kLeft)
1560 floatLeftWidth += w; 1560 floatLeftWidth += w;
1561 else 1561 else
1562 floatRightWidth += w; 1562 floatRightWidth += w;
1563 } else { 1563 } else {
1564 maxLogicalWidth = std::max(w, maxLogicalWidth); 1564 maxLogicalWidth = std::max(w, maxLogicalWidth);
1565 } 1565 }
1566 1566
1567 child = child->nextSibling(); 1567 child = child->nextSibling();
1568 } 1568 }
1569 1569
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 } 2200 }
2201 2201
2202 return availableHeight; 2202 return availableHeight;
2203 } 2203 }
2204 2204
2205 bool LayoutBlock::hasDefiniteLogicalHeight() const { 2205 bool LayoutBlock::hasDefiniteLogicalHeight() const {
2206 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); 2206 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1);
2207 } 2207 }
2208 2208
2209 } // namespace blink 2209 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/HitTestResult.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