Changeset 155366 in webkit
- Timestamp:
- Sep 9, 2013, 11:37:33 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 20 edited
-
ChangeLog (modified) (1 diff)
-
accessibility/AccessibilityRenderObject.cpp (modified) (2 diffs)
-
dom/Position.cpp (modified) (3 diffs)
-
dom/PositionIterator.cpp (modified) (1 diff)
-
editing/CompositeEditCommand.cpp (modified) (1 diff)
-
editing/Editor.cpp (modified) (1 diff)
-
editing/FrameSelection.cpp (modified) (1 diff)
-
editing/TextIterator.cpp (modified) (1 diff)
-
editing/TypingCommand.cpp (modified) (1 diff)
-
editing/htmlediting.cpp (modified) (1 diff)
-
rendering/LayoutState.cpp (modified) (1 diff)
-
rendering/RenderBlock.cpp (modified) (9 diffs)
-
rendering/RenderBox.cpp (modified) (2 diffs)
-
rendering/RenderBoxModelObject.h (modified) (1 diff)
-
rendering/RenderInline.cpp (modified) (1 diff)
-
rendering/RenderLineBoxList.cpp (modified) (1 diff)
-
rendering/RenderObject.cpp (modified) (3 diffs)
-
rendering/RenderObject.h (modified) (1 diff)
-
rendering/RenderObjectChildList.cpp (modified) (1 diff)
-
rendering/RenderView.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r155364 r155366 1 2013-09-06 David Hyatt <hyatt@apple.com> 2 3 Get rid of isBlockFlowFlexBoxOrGrid(). 4 https://bugs.webkit.org/show_bug.cgi?id=120897 5 6 Convert all callers and get rid of this method. 7 8 Reviewed by Beth Dakin. 9 10 * accessibility/AccessibilityRenderObject.cpp: 11 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): 12 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 13 * dom/Position.cpp: 14 (WebCore::Position::isCandidate): 15 (WebCore::Position::getInlineBoxAndOffset): 16 (WebCore::Position::primaryDirection): 17 * dom/PositionIterator.cpp: 18 (WebCore::PositionIterator::isCandidate): 19 * editing/CompositeEditCommand.cpp: 20 (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): 21 * editing/Editor.cpp: 22 (WebCore::Editor::baseWritingDirectionForSelectionStart): 23 * editing/FrameSelection.cpp: 24 (WebCore::caretRenderer): 25 * editing/TextIterator.cpp: 26 (WebCore::TextIterator::shouldRepresentNodeOffsetZero): 27 * editing/TypingCommand.cpp: 28 (WebCore::TypingCommand::makeEditableRootEmpty): 29 * editing/htmlediting.cpp: 30 (WebCore::isBlockFlowElement): 31 * rendering/LayoutState.cpp: 32 (WebCore::LayoutState::LayoutState): 33 * rendering/RenderBlock.cpp: 34 (WebCore::RenderBlock::layoutBlock): 35 (WebCore::RenderBlock::collapseMargins): 36 (WebCore::RenderBlock::selectionGaps): 37 (WebCore::RenderBlock::firstLineBoxBaseline): 38 (WebCore::RenderBlock::lastLineBoxBaseline): 39 (WebCore::RenderBlock::firstLineBlock): 40 (WebCore::findFirstLetterBlock): 41 (WebCore::shouldCheckLines): 42 (WebCore::RenderBlock::adjustForBorderFit): 43 * rendering/RenderBox.cpp: 44 (WebCore::RenderBox::computeRectForRepaint): 45 (WebCore::RenderBox::positionForPoint): 46 * rendering/RenderBoxModelObject.h: 47 (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): 48 * rendering/RenderInline.cpp: 49 (WebCore::RenderInline::computeRectForRepaint): 50 * rendering/RenderLineBoxList.cpp: 51 (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): 52 * rendering/RenderObject.cpp: 53 (WebCore::RenderObject::computeRectForRepaint): 54 (WebCore::RenderObject::styleWillChange): 55 (WebCore::firstLineStyleForCachedUncachedType): 56 * rendering/RenderObject.h: 57 * rendering/RenderObjectChildList.cpp: 58 (WebCore::RenderObjectChildList::insertChildNode): 59 * rendering/RenderView.h: 60 1 61 2013-09-09 Eric Carlson <eric.carlson@apple.com> 2 62 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r155211 r155366 1226 1226 return true; 1227 1227 1228 if (m_renderer->is BlockFlowFlexBoxOrGrid() && m_renderer->childrenInline() && !canSetFocusAttribute())1228 if (m_renderer->isRenderBlockFlow() && m_renderer->childrenInline() && !canSetFocusAttribute()) 1229 1229 return !toRenderBlock(m_renderer)->firstLineBox() && !mouseButtonListener(); 1230 1230 … … 2563 2563 return FooterRole; 2564 2564 2565 if (m_renderer->is BlockFlowFlexBoxOrGrid())2565 if (m_renderer->isRenderBlockFlow()) 2566 2566 return GroupRole; 2567 2567 -
trunk/Source/WebCore/dom/Position.cpp
r155318 r155366 926 926 return false; 927 927 928 if (renderer->is BlockFlowFlexBoxOrGrid()) {928 if (renderer->isRenderBlockFlow()) { 929 929 if (toRenderBlock(renderer)->logicalHeight() || m_anchorNode->hasTagName(bodyTag)) { 930 930 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer)) … … 1186 1186 if (!renderer->isText()) { 1187 1187 inlineBox = 0; 1188 if (canHaveChildrenForEditing(deprecatedNode()) && renderer->is BlockFlowFlexBoxOrGrid() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {1188 if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isRenderBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) { 1189 1189 // Try a visually equivalent position with possibly opposite editability. This helps in case |this| is in 1190 1190 // an editable block but surrounded by non-editable positions. It acts to negate the logic at the beginning … … 1334 1334 TextDirection primaryDirection = LTR; 1335 1335 for (const RenderObject* r = m_anchorNode->renderer(); r; r = r->parent()) { 1336 if (r->is BlockFlowFlexBoxOrGrid()) {1336 if (r->isRenderBlockFlow()) { 1337 1337 primaryDirection = r->style()->direction(); 1338 1338 break; -
trunk/Source/WebCore/dom/PositionIterator.cpp
r155211 r155366 160 160 return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelectNone(m_anchorNode->parentNode()); 161 161 162 if (!m_anchorNode->hasTagName(htmlTag) && renderer->is BlockFlowFlexBoxOrGrid()) {162 if (!m_anchorNode->hasTagName(htmlTag) && renderer->isRenderBlockFlow()) { 163 163 if (toRenderBlock(renderer)->logicalHeight() || m_anchorNode->hasTagName(bodyTag)) { 164 164 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer)) -
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
r155211 r155366 875 875 876 876 RenderObject* renderer = container->renderer(); 877 if (!renderer || !renderer->is BlockFlowFlexBoxOrGrid())877 if (!renderer || !renderer->isRenderBlockFlow()) 878 878 return 0; 879 879 -
trunk/Source/WebCore/editing/Editor.cpp
r155320 r155366 1428 1428 return result; 1429 1429 1430 if (!renderer->is BlockFlowFlexBoxOrGrid()) {1430 if (!renderer->isRenderBlockFlow()) { 1431 1431 renderer = renderer->containingBlock(); 1432 1432 if (!renderer) -
trunk/Source/WebCore/editing/FrameSelection.cpp
r155344 r155366 1272 1272 1273 1273 // if caretNode is a block and caret is inside it then caret should be painted by that block 1274 bool paintedByBlock = renderer->is BlockFlowFlexBoxOrGrid() && caretRendersInsideNode(node);1274 bool paintedByBlock = renderer->isRenderBlockFlow() && caretRendersInsideNode(node); 1275 1275 return paintedByBlock ? renderer : renderer->containingBlock(); 1276 1276 } -
trunk/Source/WebCore/editing/TextIterator.cpp
r155228 r155366 919 919 // we would create VisiblePositions on every call to this function without this check. 920 920 if (!m_node->renderer() || m_node->renderer()->style()->visibility() != VISIBLE 921 || (m_node->renderer()->is BlockFlowFlexBoxOrGrid() && !toRenderBlock(m_node->renderer())->height() && !m_node->hasTagName(bodyTag)))921 || (m_node->renderer()->isRenderBlockFlow() && !toRenderBlock(m_node->renderer())->height() && !m_node->hasTagName(bodyTag))) 922 922 return false; 923 923 -
trunk/Source/WebCore/editing/TypingCommand.cpp
r155211 r155366 405 405 if (root->firstChild() == root->lastChild() && root->firstElementChild() && root->firstElementChild()->hasTagName(brTag)) { 406 406 // If there is a single child and it could be a placeholder, leave it alone. 407 if (root->renderer() && root->renderer()->is BlockFlowFlexBoxOrGrid())407 if (root->renderer() && root->renderer()->isRenderBlockFlow()) 408 408 return false; 409 409 } -
trunk/Source/WebCore/editing/htmlediting.cpp
r155228 r155366 1291 1291 return false; 1292 1292 RenderObject* renderer = node->renderer(); 1293 return renderer && renderer->is BlockFlowFlexBoxOrGrid();1293 return renderer && renderer->isRenderBlockFlow(); 1294 1294 } 1295 1295 -
trunk/Source/WebCore/rendering/LayoutState.cpp
r155211 r155366 132 132 133 133 // If we have a new grid to track, then add it to our set. 134 if (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->is BlockFlowFlexBoxOrGrid())134 if (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->isRenderBlockFlow()) 135 135 establishLineGrid(toRenderBlock(renderer)); 136 136 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r155318 r155366 1721 1721 // One of our children's floats may have become an overhanging float for us. We need to look for it. 1722 1722 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 1723 if (child->is BlockFlowFlexBoxOrGrid() && !child->isFloatingOrOutOfFlowPositioned()) {1723 if (child->isRenderBlockFlow() && !child->isFloatingOrOutOfFlowPositioned()) { 1724 1724 RenderBlock* block = toRenderBlock(child); 1725 1725 if (block->lowestFloatLogicalBottom() + block->logicalTop() > newHeight) … … 2259 2259 setLogicalHeight(logicalTop); 2260 2260 RenderObject* prev = child->previousSibling(); 2261 if (prev && prev->is BlockFlowFlexBoxOrGrid() && !prev->isFloatingOrOutOfFlowPositioned()) {2261 if (prev && prev->isRenderBlockFlow() && !prev->isFloatingOrOutOfFlowPositioned()) { 2262 2262 RenderBlock* block = toRenderBlock(prev); 2263 2263 if (block->containsFloats() && !block->avoidsFloats() && (block->logicalTop() + block->lowestFloatLogicalBottom()) > logicalTop) … … 3682 3682 // fixed). 3683 3683 GapRects result; 3684 if (!is BlockFlowFlexBoxOrGrid()) // FIXME: Make multi-column selection gap filling work someday.3684 if (!isRenderBlockFlow()) // FIXME: Make multi-column selection gap filling work someday. 3685 3685 return result; 3686 3686 … … 6761 6761 int RenderBlock::firstLineBoxBaseline() const 6762 6762 { 6763 if ( !isBlockFlowFlexBoxOrGrid() || (isWritingModeRoot() && !isRubyRun()))6763 if (isWritingModeRoot() && !isRubyRun()) 6764 6764 return -1; 6765 6765 … … 6790 6790 int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const 6791 6791 { 6792 if ( !isBlockFlowFlexBoxOrGrid() || (isWritingModeRoot() && !isRubyRun()))6792 if (isWritingModeRoot() && !isRubyRun()) 6793 6793 return -1; 6794 6794 … … 6851 6851 // of flexbox. 6852 6852 if (firstLineBlock->isReplaced() || firstLineBlock->isFloating() 6853 || !parentBlock || parentBlock->firstChild() != firstLineBlock || !parentBlock->isBlockFlowFlexBoxOrGrid() 6854 || (parentBlock->isFlexibleBox() && !parentBlock->isRenderButton())) 6853 || !parentBlock || parentBlock->firstChild() != firstLineBlock || (!parentBlock->isRenderBlockFlow() && !parentBlock->isRenderButton())) 6855 6854 break; 6856 6855 ASSERT_WITH_SECURITY_IMPLICATION(parentBlock->isRenderBlock()); … … 6910 6909 RenderObject* parentBlock = firstLetterBlock->parent(); 6911 6910 if (firstLetterBlock->isReplaced() || !parentBlock || parentBlock->firstChild() != firstLetterBlock || 6912 !parentBlock->isBlockFlowFlexBoxOrGrid() || (parentBlock->isFlexibleBox() && !parentBlock->isRenderButton()))6911 (!parentBlock->isRenderBlockFlow() && !parentBlock->isRenderButton())) 6913 6912 return 0; 6914 6913 firstLetterBlock = parentBlock; … … 7092 7091 { 7093 7092 return !obj->isFloatingOrOutOfFlowPositioned() && !obj->isRunIn() 7094 && obj->is BlockFlowFlexBoxOrGrid() && obj->style()->height().isAuto()7093 && obj->isRenderBlock() && obj->style()->height().isAuto() 7095 7094 && (!obj->isDeprecatedFlexibleBox() || obj->style()->boxOrient() == VERTICAL); 7096 7095 } … … 7197 7196 for (RenderBox* obj = firstChildBox(); obj; obj = obj->nextSiblingBox()) { 7198 7197 if (!obj->isFloatingOrOutOfFlowPositioned()) { 7199 if (obj->is BlockFlowFlexBoxOrGrid() && !obj->hasOverflowClip())7198 if (obj->isRenderBlockFlow() && !obj->hasOverflowClip()) 7200 7199 toRenderBlock(obj)->adjustForBorderFit(x + obj->x(), left, right); 7201 7200 else if (obj->style()->visibility() == VISIBLE) { -
trunk/Source/WebCore/rendering/RenderBox.cpp
r155318 r155366 2104 2104 } 2105 2105 2106 if (position != AbsolutePosition && position != FixedPosition && o->hasColumns() && o->is BlockFlowFlexBoxOrGrid()) {2106 if (position != AbsolutePosition && position != FixedPosition && o->hasColumns() && o->isRenderBlockFlow()) { 2107 2107 LayoutRect repaintRect(topLeft, rect.size()); 2108 2108 toRenderBlock(o)->adjustRectForColumns(repaintRect); … … 4094 4094 4095 4095 for (RenderObject* renderObject = firstChild(); renderObject; renderObject = renderObject->nextSibling()) { 4096 if ((!renderObject->firstChild() && !renderObject->isInline() && !renderObject->is BlockFlowFlexBoxOrGrid() )4096 if ((!renderObject->firstChild() && !renderObject->isInline() && !renderObject->isRenderBlockFlow() ) 4097 4097 || renderObject->style()->visibility() != VISIBLE) 4098 4098 continue; -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r155211 r155366 176 176 virtual void setSelectionState(SelectionState s); 177 177 178 bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && is BlockFlowFlexBoxOrGrid() && !isRenderSVGBlock(); }178 bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && isRenderBlock() && !isRenderSVGBlock(); } 179 179 180 180 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r155318 r155366 1088 1088 LayoutPoint topLeft = rect.location(); 1089 1089 1090 if (o->is BlockFlowFlexBoxOrGrid() && !style()->hasOutOfFlowPosition()) {1090 if (o->isRenderBlockFlow() && !style()->hasOutOfFlowPosition()) { 1091 1091 RenderBlock* cb = toRenderBlock(o); 1092 1092 if (cb->hasColumns()) { -
trunk/Source/WebCore/rendering/RenderLineBoxList.cpp
r155318 r155366 312 312 void RenderLineBoxList::dirtyLinesFromChangedChild(RenderObject* container, RenderObject* child) 313 313 { 314 if (!container->parent() || (container->isRenderBlock() && (container->selfNeedsLayout() || !container->is BlockFlowFlexBoxOrGrid())))314 if (!container->parent() || (container->isRenderBlock() && (container->selfNeedsLayout() || !container->isRenderBlockFlow()))) 315 315 return; 316 316 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r155301 r155366 1557 1557 1558 1558 if (RenderObject* o = parent()) { 1559 if (o->is BlockFlowFlexBoxOrGrid()) {1559 if (o->isRenderBlockFlow()) { 1560 1560 RenderBlock* cb = toRenderBlock(o); 1561 1561 if (cb->hasColumns()) … … 1964 1964 s_affectsParentBlock = isFloatingOrOutOfFlowPositioned() 1965 1965 && (!newStyle->isFloating() && !newStyle->hasOutOfFlowPosition()) 1966 && parent() && (parent()->is BlockFlowFlexBoxOrGrid() || parent()->isRenderInline());1966 && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline()); 1967 1967 1968 1968 s_noLongerAffectsParentBlock = ((!isFloating() && newStyle->isFloating()) || (!isOutOfFlowPositioned() && newStyle->hasOutOfFlowPosition())) … … 2796 2796 rendererForFirstLineStyle = renderer->parent(); 2797 2797 2798 if (rendererForFirstLineStyle->is BlockFlowFlexBoxOrGrid()) {2798 if (rendererForFirstLineStyle->isRenderBlockFlow() || rendererForFirstLineStyle->isRenderButton()) { 2799 2799 if (RenderBlock* firstLineBlock = rendererForFirstLineStyle->firstLineBlock()) { 2800 2800 if (type == Cached) -
trunk/Source/WebCore/rendering/RenderObject.h
r155244 r155366 406 406 407 407 bool isTablePart() const { return isTableCell() || isRenderTableCol() || isTableCaption() || isTableRow() || isTableSection(); } 408 409 // FIXME: This is the renamed version of isBlockFlow() and it makes it more obvious that flexible boxes and grids are being included. Most410 // of the current callers did not in fact intend to include flexible boxes and grids (but have been for years), so we will want to411 // convert those callers over to isRenderBlockFlow() instead. We'll do this call site by call site in order to try to find the412 // code that is making bad assumptions and change it. Once that's finished, this method will just go away.413 bool isBlockFlowFlexBoxOrGrid() const { return isRenderBlockFlow() || isFlexibleBoxIncludingDeprecated() || isRenderGrid(); }414 408 415 409 inline bool isBeforeContent() const; -
trunk/Source/WebCore/rendering/RenderObjectChildList.cpp
r155211 r155366 119 119 { 120 120 ASSERT(!newChild->parent()); 121 ASSERT(!owner->is BlockFlowFlexBoxOrGrid() || (!newChild->isTableSection() && !newChild->isTableRow() && !newChild->isTableCell()));121 ASSERT(!owner->isRenderBlockFlow() || (!newChild->isTableSection() && !newChild->isTableRow() && !newChild->isTableCell())); 122 122 123 123 while (beforeChild && beforeChild->parent() && beforeChild->parent() != owner) -
trunk/Source/WebCore/rendering/RenderView.h
r155301 r155366 259 259 // We push LayoutState even if layoutState is disabled because it stores layoutDelta too. 260 260 if (!doingFullRepaint() || m_layoutState->isPaginated() || renderer->hasColumns() || renderer->flowThreadContainingBlock() 261 || m_layoutState->lineGrid() || (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->is BlockFlowFlexBoxOrGrid())261 || m_layoutState->lineGrid() || (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->isRenderBlockFlow()) 262 262 #if ENABLE(CSS_SHAPES) 263 263 || (renderer->isRenderBlock() && toRenderBlock(renderer)->shapeInsideInfo())
Note:
See TracChangeset
for help on using the changeset viewer.