Add new RenderBlockFlow class.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Sep 2013 20:54:47 +0000 (20:54 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Sep 2013 20:54:47 +0000 (20:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120777

Reviewed by Beth Dakin.

This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
base. This will save memory for all of the classes that derive from RenderBlock but have
their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
types to make it more clear when we're talking about block layout code vs. a more generic
block-level object that can have any kind of layout.

This patch adds the new class and it makes sure all the objects that should be block flows
inherit from the new class.

isBlockFlow() proved to be a problematic method (and was the source of regressions when I
landed this patch the first time). When the method was first implemented, it was added as
"I'm a block but not a table." and at the time table was the only subclass of block. However
when new subclasses were added, this function was never patched to account for them. This
means, for example, that flexible boxes and grids claim to be block flows in the codebase
and have for years. This is obviously wrong, since flexible boxes are not in fact block
flows, but because of this mistake, code has started relying on the incorrect behavior of
isBlockFlow() (form controls mostly).

What I've done to deal with this problem is renamed isBlockFlow() to be
isBlockFlowFlexBoxOrGrid() in order to make it obvious that this method is returning true
for pretty much all blocks other than tables. This makes a lot of call sites look pretty
stupid, since they obviously never intended to include flexible boxes or grids, but at least
it is clear what the method is doing now.

The plan is to land this patch and then start converting call sites from
isBlockFlowFlexBoxOrGrid() to isRenderBlockFlow() one by one, and that way we can figure
out which code is making bad assumptions and change those callers to be isRenderBlock()
instead. Ultimately this isBlockFlowFlexBoxOrGrid() method will go away with callers either
changing to use isRenderBlock() or isRenderBlockFlow().

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
(WebCore::Position::primaryDirection):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/Editor.cpp:
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::caretRenderer):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::makeEditableRootEmpty):
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::createRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::createRenderer):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::RenderSliderThumb):
* html/shadow/SliderThumbElement.h:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymous):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::shouldCheckLines):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::positionForPoint):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderDetailsMarker.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::willBeDestroyed):
(WebCore::RenderListItem::willBeRemovedFromTree):
(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::addOverflowFromChildren):
(WebCore::RenderListItem::computePreferredLogicalWidths):
(WebCore::RenderListItem::paint):
* rendering/RenderListItem.h:
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::styleWillChange):
(WebCore::firstLineStyleForCachedUncachedType):
* rendering/RenderObject.h:
(WebCore::RenderObject::isBR):
(WebCore::RenderObject::isRenderBlockFlow):
(WebCore::RenderObject::isBlockFlowFlexBoxOrGrid):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::RenderProgress):
* rendering/RenderProgress.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
* rendering/RenderRuby.cpp:
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderRubyText.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
* rendering/RenderTableCell.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
(WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::RenderTextTrackCue):
* rendering/RenderTextTrackCue.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/RenderingAllInOne.cpp:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155211 268f45cc-cd09-0410-ab3c-d52691b4dbfc

75 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/PositionIterator.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/TypingCommand.cpp
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/html/HTMLDetailsElement.cpp
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h
Source/WebCore/rendering/LayoutState.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.cpp [new file with mode: 0644]
Source/WebCore/rendering/RenderBlockFlow.h [new file with mode: 0644]
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderDetailsMarker.cpp
Source/WebCore/rendering/RenderDetailsMarker.h
Source/WebCore/rendering/RenderFieldset.cpp
Source/WebCore/rendering/RenderFieldset.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderFileUploadControl.h
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFlowThread.h
Source/WebCore/rendering/RenderFullScreen.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLineBoxList.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderListItem.h
Source/WebCore/rendering/RenderMeter.cpp
Source/WebCore/rendering/RenderMeter.h
Source/WebCore/rendering/RenderMultiColumnBlock.cpp
Source/WebCore/rendering/RenderMultiColumnBlock.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderObjectChildList.cpp
Source/WebCore/rendering/RenderProgress.cpp
Source/WebCore/rendering/RenderProgress.h
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderRegion.h
Source/WebCore/rendering/RenderRuby.cpp
Source/WebCore/rendering/RenderRuby.h
Source/WebCore/rendering/RenderRubyBase.cpp
Source/WebCore/rendering/RenderRubyBase.h
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderRubyRun.h
Source/WebCore/rendering/RenderRubyText.cpp
Source/WebCore/rendering/RenderRubyText.h
Source/WebCore/rendering/RenderTableCaption.cpp
Source/WebCore/rendering/RenderTableCaption.h
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableCell.h
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControl.h
Source/WebCore/rendering/RenderTextControlSingleLine.h
Source/WebCore/rendering/RenderTextTrackCue.cpp
Source/WebCore/rendering/RenderTextTrackCue.h
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h
Source/WebCore/rendering/RenderingAllInOne.cpp
Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
Source/WebCore/rendering/svg/RenderSVGBlock.cpp
Source/WebCore/rendering/svg/RenderSVGBlock.h

index 8e03936..344489f 100644 (file)
@@ -2111,6 +2111,7 @@ set(WebCore_SOURCES
     rendering/RenderArena.cpp
     rendering/RenderBR.cpp
     rendering/RenderBlock.cpp
+    rendering/RenderBlockFlow.cpp
     rendering/RenderBlockLineLayout.cpp
     rendering/RenderBox.cpp
     rendering/RenderBoxModelObject.cpp
index 19e525a..a6ae9ee 100644 (file)
@@ -1,3 +1,183 @@
+2013-09-06  David Hyatt  <hyatt@apple.com>
+
+        Add new RenderBlockFlow class.
+        https://bugs.webkit.org/show_bug.cgi?id=120777
+
+        Reviewed by Beth Dakin.
+
+        This patch adds a new RenderBlockFlow class. The idea is to get all of the line/float/margin
+        code out of RenderBlock and into the subclass, and then we can make RenderBlock an abstract
+        base. This will save memory for all of the classes that derive from RenderBlock but have
+        their own layout systems (e.g., flexbox, grid, table), and it will let us tighten up
+        types to make it more clear when we're talking about block layout code vs. a more generic
+        block-level object that can have any kind of layout.
+
+        This patch adds the new class and it makes sure all the objects that should be block flows
+        inherit from the new class.
+        
+        isBlockFlow() proved to be a problematic method (and was the source of regressions when I
+        landed this patch the first time). When the method was first implemented, it was added as
+        "I'm a block but not a table." and at the time table was the only subclass of block. However
+        when new subclasses were added, this function was never patched to account for them. This
+        means, for example, that flexible boxes and grids claim to be block flows in the codebase
+        and have for years. This is obviously wrong, since flexible boxes are not in fact block
+        flows, but because of this mistake, code has started relying on the incorrect behavior of
+        isBlockFlow() (form controls mostly).
+        
+        What I've done to deal with this problem is renamed isBlockFlow() to be
+        isBlockFlowFlexBoxOrGrid() in order to make it obvious that this method is returning true
+        for pretty much all blocks other than tables. This makes a lot of call sites look pretty
+        stupid, since they obviously never intended to include flexible boxes or grids, but at least
+        it is clear what the method is doing now.
+        
+        The plan is to land this patch and then start converting call sites from 
+        isBlockFlowFlexBoxOrGrid() to isRenderBlockFlow() one by one, and that way we can figure
+        out which code is making bad assumptions and change those callers to be isRenderBlock()
+        instead. Ultimately this isBlockFlowFlexBoxOrGrid() method will go away with callers either
+        changing to use isRenderBlock() or isRenderBlockFlow().
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * dom/Position.cpp:
+        (WebCore::Position::isCandidate):
+        (WebCore::Position::getInlineBoxAndOffset):
+        (WebCore::Position::primaryDirection):
+        * dom/PositionIterator.cpp:
+        (WebCore::PositionIterator::isCandidate):
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
+        * editing/Editor.cpp:
+        (WebCore::Editor::baseWritingDirectionForSelectionStart):
+        * editing/FrameSelection.cpp:
+        (WebCore::caretRenderer):
+        * editing/TextIterator.cpp:
+        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
+        * editing/TypingCommand.cpp:
+        (WebCore::TypingCommand::makeEditableRootEmpty):
+        * editing/htmlediting.cpp:
+        (WebCore::isBlockFlowElement):
+        * html/HTMLDetailsElement.cpp:
+        (WebCore::HTMLDetailsElement::createRenderer):
+        * html/HTMLSummaryElement.cpp:
+        (WebCore::HTMLSummaryElement::createRenderer):
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::RenderSliderThumb::RenderSliderThumb):
+        * html/shadow/SliderThumbElement.h:
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::LayoutState):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::createAnonymous):
+        (WebCore::RenderBlock::layoutBlock):
+        (WebCore::RenderBlock::collapseMargins):
+        (WebCore::RenderBlock::selectionGaps):
+        (WebCore::RenderBlock::firstLineBoxBaseline):
+        (WebCore::RenderBlock::lastLineBoxBaseline):
+        (WebCore::RenderBlock::firstLineBlock):
+        (WebCore::findFirstLetterBlock):
+        (WebCore::shouldCheckLines):
+        (WebCore::RenderBlock::adjustForBorderFit):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeRectForRepaint):
+        (WebCore::RenderBox::positionForPoint):
+        * rendering/RenderBoxModelObject.h:
+        (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
+        (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
+        * rendering/RenderDetailsMarker.cpp:
+        (WebCore::RenderDetailsMarker::RenderDetailsMarker):
+        * rendering/RenderDetailsMarker.h:
+        * rendering/RenderFieldset.cpp:
+        (WebCore::RenderFieldset::RenderFieldset):
+        * rendering/RenderFieldset.h:
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::RenderFileUploadControl):
+        * rendering/RenderFileUploadControl.h:
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::RenderFlowThread):
+        * rendering/RenderFlowThread.h:
+        * rendering/RenderFullScreen.cpp:
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::computeRectForRepaint):
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::RenderListItem):
+        (WebCore::RenderListItem::willBeDestroyed):
+        (WebCore::RenderListItem::willBeRemovedFromTree):
+        (WebCore::RenderListItem::layout):
+        (WebCore::RenderListItem::addOverflowFromChildren):
+        (WebCore::RenderListItem::computePreferredLogicalWidths):
+        (WebCore::RenderListItem::paint):
+        * rendering/RenderListItem.h:
+        * rendering/RenderMeter.cpp:
+        (WebCore::RenderMeter::RenderMeter):
+        * rendering/RenderMeter.h:
+        * rendering/RenderMultiColumnBlock.cpp:
+        (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
+        * rendering/RenderMultiColumnBlock.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::createObject):
+        (WebCore::RenderObject::computeRectForRepaint):
+        (WebCore::RenderObject::styleWillChange):
+        (WebCore::firstLineStyleForCachedUncachedType):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isBR):
+        (WebCore::RenderObject::isRenderBlockFlow):
+        (WebCore::RenderObject::isBlockFlowFlexBoxOrGrid):
+        * rendering/RenderObjectChildList.cpp:
+        (WebCore::RenderObjectChildList::insertChildNode):
+        * rendering/RenderProgress.cpp:
+        (WebCore::RenderProgress::RenderProgress):
+        * rendering/RenderProgress.h:
+        * rendering/RenderRegion.cpp:
+        (WebCore::RenderRegion::RenderRegion):
+        * rendering/RenderRegion.h:
+        * rendering/RenderRuby.cpp:
+        (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
+        * rendering/RenderRuby.h:
+        * rendering/RenderRubyBase.cpp:
+        (WebCore::RenderRubyBase::RenderRubyBase):
+        * rendering/RenderRubyBase.h:
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::RenderRubyRun::RenderRubyRun):
+        * rendering/RenderRubyRun.h:
+        * rendering/RenderRubyText.cpp:
+        (WebCore::RenderRubyText::RenderRubyText):
+        * rendering/RenderRubyText.h:
+        * rendering/RenderTableCaption.cpp:
+        (WebCore::RenderTableCaption::RenderTableCaption):
+        * rendering/RenderTableCaption.h:
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::RenderTableCell):
+        * rendering/RenderTableCell.h:
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::RenderTextControl):
+        * rendering/RenderTextControl.h:
+        * rendering/RenderTextControlSingleLine.h:
+        (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
+        * rendering/RenderTextTrackCue.cpp:
+        (WebCore::RenderTextTrackCue::RenderTextTrackCue):
+        * rendering/RenderTextTrackCue.h:
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::RenderView):
+        * rendering/RenderView.h:
+        * rendering/RenderingAllInOne.cpp:
+        * rendering/mathml/RenderMathMLOperator.cpp:
+        (WebCore::RenderMathMLOperator::createGlyph):
+        * rendering/svg/RenderSVGBlock.cpp:
+        (WebCore::RenderSVGBlock::RenderSVGBlock):
+        * rendering/svg/RenderSVGBlock.h:
+
 2013-09-06  Vivek Galatage  <vivek.vg@samsung.com>
 
         Calling window.close() should indicate failure with warning message
index e220ae0..a3a449a 100644 (file)
@@ -4374,6 +4374,8 @@ webcore_sources += \
        Source/WebCore/rendering/RenderArena.h \
        Source/WebCore/rendering/RenderBlock.cpp \
        Source/WebCore/rendering/RenderBlock.h \
+    Source/WebCore/rendering/RenderBlockFlow.cpp \
+       Source/WebCore/rendering/RenderBlockFlow.h \
        Source/WebCore/rendering/RenderBlockLineLayout.cpp \
        Source/WebCore/rendering/RenderBox.cpp \
        Source/WebCore/rendering/RenderBox.h \
index 2d61766..60176f2 100644 (file)
@@ -1155,6 +1155,7 @@ SOURCES += \
     rendering/RenderApplet.cpp \
     rendering/RenderArena.cpp \
     rendering/RenderBlock.cpp \
+    rendering/RenderBlockFlow.cpp \
     rendering/RenderBlockLineLayout.cpp \
     rendering/RenderBox.cpp \
     rendering/RenderBoxModelObject.cpp \
index dae3a32..7ec4d08 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\rendering\RenderBlockFlow.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="..\rendering\RenderBlockLineLayout.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
index 001de4d..2179ad2 100644 (file)
                BC0B358814C4F9830055E22A /* RunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0B358614C4F9830055E22A /* RunLoop.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC0B36A40CD3C67C00AC7EB5 /* Console.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0B36A10CD3C67C00AC7EB5 /* Console.cpp */; };
                BC0B36A50CD3C67C00AC7EB5 /* Console.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0B36A20CD3C67C00AC7EB5 /* Console.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               BC10D76717D8EE6E005E2626 /* RenderBlockFlow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCFB45F417D8E49400444446 /* RenderBlockFlow.cpp */; };
+               BC10D76817D8EE71005E2626 /* RenderBlockFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFB45F317D8E39200444446 /* RenderBlockFlow.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC124EE70C2641CD009E2349 /* BarProp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC124EE40C2641CD009E2349 /* BarProp.cpp */; };
                BC124EE80C2641CD009E2349 /* BarProp.h in Headers */ = {isa = PBXBuildFile; fileRef = BC124EE50C2641CD009E2349 /* BarProp.h */; };
                BC124EFF0C26447A009E2349 /* JSBarProp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC124EFD0C26447A009E2349 /* JSBarProp.cpp */; };
                BCFB2E5D0979E46400BA703D /* CachedResourceClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedResourceClient.h; sourceTree = "<group>"; };
                BCFB2F74097A2E1A00BA703D /* Arena.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Arena.cpp; sourceTree = "<group>"; };
                BCFB2F75097A2E1A00BA703D /* Arena.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Arena.h; sourceTree = "<group>"; };
+               BCFB45F317D8E39200444446 /* RenderBlockFlow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderBlockFlow.h; sourceTree = "<group>"; };
+               BCFB45F417D8E49400444446 /* RenderBlockFlow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderBlockFlow.cpp; sourceTree = "<group>"; };
                BCFE2F0F0C1B58370020235F /* JSRect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSRect.cpp; sourceTree = "<group>"; };
                BCFE2F100C1B58370020235F /* JSRect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSRect.h; sourceTree = "<group>"; };
                BCFF648F0EAD15C200C1D6F7 /* LengthBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LengthBox.h; sourceTree = "<group>"; };
                                BCEA481F097D93020094C9E4 /* RenderArena.h */,
                                BCEA4820097D93020094C9E4 /* RenderBlock.cpp */,
                                BCEA4821097D93020094C9E4 /* RenderBlock.h */,
+                               BCFB45F417D8E49400444446 /* RenderBlockFlow.cpp */,
+                               BCFB45F317D8E39200444446 /* RenderBlockFlow.h */,
                                BCEA4813097D93020094C9E4 /* RenderBlockLineLayout.cpp */,
                                BCEA4822097D93020094C9E4 /* RenderBox.cpp */,
                                BCEA4823097D93020094C9E4 /* RenderBox.h */,
                                FBB0C5B817BBD629003D3677 /* CSSFilterImageValue.h in Headers */,
                                BE16C59317CFE17200852C04 /* InbandGenericTextTrack.h in Headers */,
                                BE16C59517CFE17200852C04 /* InbandWebVTTTextTrack.h in Headers */,
+                               BC10D76817D8EE71005E2626 /* RenderBlockFlow.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                FBB0C5B717BBD626003D3677 /* CSSFilterImageValue.cpp in Sources */,
                                BE16C59217CFE17200852C04 /* InbandGenericTextTrack.cpp in Sources */,
                                BE16C59417CFE17200852C04 /* InbandWebVTTTextTrack.cpp in Sources */,
+                               BC10D76717D8EE6E005E2626 /* RenderBlockFlow.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 7ac5a5d..4a3e3f5 100644 (file)
@@ -1225,7 +1225,7 @@ bool AccessibilityRenderObject::computeAccessibilityIsIgnored() const
     if (node && node->hasTagName(spanTag))
         return true;
     
-    if (m_renderer->isBlockFlow() && m_renderer->childrenInline() && !canSetFocusAttribute())
+    if (m_renderer->isBlockFlowFlexBoxOrGrid() && m_renderer->childrenInline() && !canSetFocusAttribute())
         return !toRenderBlock(m_renderer)->firstLineBox() && !mouseButtonListener();
     
     // ignore images seemingly used as spacers
@@ -2562,7 +2562,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
     if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articleTag) && !isDescendantOfElementType(sectionTag))
         return FooterRole;
 
-    if (m_renderer->isBlockFlow())
+    if (m_renderer->isBlockFlowFlexBoxOrGrid())
         return GroupRole;
     
     // If the element does not have role, but it has ARIA attributes, accessibility should fallback to exposing it as a group.
index 7af1d72..5edecfd 100644 (file)
@@ -925,7 +925,7 @@ bool Position::isCandidate() const
     if (m_anchorNode->hasTagName(htmlTag))
         return false;
         
-    if (renderer->isBlockFlow()) {
+    if (renderer->isBlockFlowFlexBoxOrGrid()) {
         if (toRenderBlock(renderer)->logicalHeight() || m_anchorNode->hasTagName(bodyTag)) {
             if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer))
                 return atFirstEditingPositionForNode() && !Position::nodeIsUserSelectNone(deprecatedNode());
@@ -1185,7 +1185,7 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
 
     if (!renderer->isText()) {
         inlineBox = 0;
-        if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
+        if (canHaveChildrenForEditing(deprecatedNode()) && renderer->isBlockFlowFlexBoxOrGrid() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
             // Try a visually equivalent position with possibly opposite editability. This helps in case |this| is in
             // an editable block but surrounded by non-editable positions. It acts to negate the logic at the beginning
             // of RenderObject::createVisiblePosition().
@@ -1333,7 +1333,7 @@ TextDirection Position::primaryDirection() const
 {
     TextDirection primaryDirection = LTR;
     for (const RenderObject* r = m_anchorNode->renderer(); r; r = r->parent()) {
-        if (r->isBlockFlow()) {
+        if (r->isBlockFlowFlexBoxOrGrid()) {
             primaryDirection = r->style()->direction();
             break;
         }
index 9a0b974..e3ab04a 100644 (file)
@@ -159,7 +159,7 @@ bool PositionIterator::isCandidate() const
     if (isTableElement(m_anchorNode) || editingIgnoresContent(m_anchorNode))
         return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelectNone(m_anchorNode->parentNode());
 
-    if (!m_anchorNode->hasTagName(htmlTag) && renderer->isBlockFlow()) {
+    if (!m_anchorNode->hasTagName(htmlTag) && renderer->isBlockFlowFlexBoxOrGrid()) {
         if (toRenderBlock(renderer)->logicalHeight() || m_anchorNode->hasTagName(bodyTag)) {
             if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer))
                 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anchorNode);
index 8df7f3c..2b8b62e 100644 (file)
@@ -1013,7 +1013,7 @@ void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, EditingStyle* sty
 
     // Since addInlineStyleIfNeeded can't add styles to block-flow render objects, add style attribute instead.
     // FIXME: applyInlineStyleToRange should be used here instead.
-    if ((node->renderer()->isBlockFlow() || node->childNodeCount()) && node->isHTMLElement()) {
+    if ((node->renderer()->isRenderBlockFlow() || node->childNodeCount()) && node->isHTMLElement()) {
         setNodeAttribute(toHTMLElement(node), styleAttr, newInlineStyle->style()->asText());
         return;
     }
index 486920d..d2de7d3 100644 (file)
@@ -874,7 +874,7 @@ PassRefPtr<Node> CompositeEditCommand::addBlockPlaceholderIfNeeded(Element* cont
     document().updateLayoutIgnorePendingStylesheets();
 
     RenderObject* renderer = container->renderer();
-    if (!renderer || !renderer->isBlockFlow())
+    if (!renderer || !renderer->isBlockFlowFlexBoxOrGrid())
         return 0;
     
     // append the placeholder to make sure it follows
index 94cfea8..d6e76e3 100644 (file)
@@ -1429,7 +1429,7 @@ WritingDirection Editor::baseWritingDirectionForSelectionStart() const
     if (!renderer)
         return result;
 
-    if (!renderer->isBlockFlow()) {
+    if (!renderer->isBlockFlowFlexBoxOrGrid()) {
         renderer = renderer->containingBlock();
         if (!renderer)
             return result;
index f917388..d2d4e31 100644 (file)
@@ -1271,7 +1271,7 @@ static RenderObject* caretRenderer(Node* node)
         return 0;
 
     // if caretNode is a block and caret is inside it then caret should be painted by that block
-    bool paintedByBlock = renderer->isBlockFlow() && caretRendersInsideNode(node);
+    bool paintedByBlock = renderer->isBlockFlowFlexBoxOrGrid() && caretRendersInsideNode(node);
     return paintedByBlock ? renderer : renderer->containingBlock();
 }
 
index 2b0d373..fae2b2b 100644 (file)
@@ -918,7 +918,7 @@ bool TextIterator::shouldRepresentNodeOffsetZero()
     // Additionally, if the range we are iterating over contains huge sections of unrendered content, 
     // we would create VisiblePositions on every call to this function without this check.
     if (!m_node->renderer() || m_node->renderer()->style()->visibility() != VISIBLE
-        || (m_node->renderer()->isBlockFlow() && !toRenderBlock(m_node->renderer())->height() && !m_node->hasTagName(bodyTag)))
+        || (m_node->renderer()->isBlockFlowFlexBoxOrGrid() && !toRenderBlock(m_node->renderer())->height() && !m_node->hasTagName(bodyTag)))
         return false;
 
     // The startPos.isNotNull() check is needed because the start could be before the body,
index 01b2f8d..2dd4190 100644 (file)
@@ -404,7 +404,7 @@ bool TypingCommand::makeEditableRootEmpty()
 
     if (root->firstChild() == root->lastChild() && root->firstElementChild() && root->firstElementChild()->hasTagName(brTag)) {
         // If there is a single child and it could be a placeholder, leave it alone.
-        if (root->renderer() && root->renderer()->isBlockFlow())
+        if (root->renderer() && root->renderer()->isBlockFlowFlexBoxOrGrid())
             return false;
     }
 
index 55dffb9..9203ced 100644 (file)
@@ -1290,7 +1290,7 @@ bool isBlockFlowElement(const Node* node)
     if (!node->isElementNode())
         return false;
     RenderObject* renderer = node->renderer();
-    return renderer && renderer->isBlockFlow();
+    return renderer && renderer->isBlockFlowFlexBoxOrGrid();
 }
 
 Element* deprecatedEnclosingBlockFlowElement(Node* node)
index 5e539eb..bba12b2 100644 (file)
@@ -27,7 +27,7 @@
 #include "HTMLSummaryElement.h"
 #include "LocalizedStrings.h"
 #include "MouseEvent.h"
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "ShadowRoot.h"
 #include "Text.h"
 
@@ -113,7 +113,7 @@ HTMLDetailsElement::HTMLDetailsElement(const QualifiedName& tagName, Document* d
 
 RenderObject* HTMLDetailsElement::createRenderer(RenderArena* arena, RenderStyle*)
 {
-    return new (arena) RenderBlock(this);
+    return new (arena) RenderBlockFlow(this);
 }
 
 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
index 2fd44b5..5be6d7c 100644 (file)
@@ -30,7 +30,7 @@
 #include "MouseEvent.h"
 #include "NodeRenderingTraversal.h"
 #include "PlatformMouseEvent.h"
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "ShadowRoot.h"
 
 namespace WebCore {
@@ -68,7 +68,7 @@ HTMLSummaryElement::HTMLSummaryElement(const QualifiedName& tagName, Document* d
 
 RenderObject* HTMLSummaryElement::createRenderer(RenderArena* arena, RenderStyle*)
 {
-    return new (arena) RenderBlock(this);
+    return new (arena) RenderBlockFlow(this);
 }
 
 bool HTMLSummaryElement::childShouldCreateRenderer(const Node* child) const
index ad3f8ff..e0b76c3 100644 (file)
@@ -95,7 +95,7 @@ HTMLElement* sliderTrackElementOf(Node* node)
 // --------------------------------
 
 RenderSliderThumb::RenderSliderThumb(SliderThumbElement* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 4e03fc6..9f26b76 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "HTMLDivElement.h"
 #include "HTMLNames.h"
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include <wtf/Forward.h>
 
 namespace WebCore {
@@ -96,7 +96,7 @@ HTMLElement* sliderTrackElementOf(Node*);
 
 // --------------------------------
 
-class RenderSliderThumb FINAL : public RenderBlock {
+class RenderSliderThumb FINAL : public RenderBlockFlow {
 public:
     RenderSliderThumb(SliderThumbElement*);
     void updateAppearance(RenderStyle* parentStyle);
index 0d8be16..50f3d94 100644 (file)
@@ -131,7 +131,7 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const LayoutSiz
         computeLineGridPaginationOrigin(renderer);
 
     // If we have a new grid to track, then add it to our set.
-    if (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->isBlockFlow())
+    if (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->isBlockFlowFlexBoxOrGrid())
         establishLineGrid(toRenderBlock(renderer));
 
     // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
index 389b29f..db424c7 100644 (file)
@@ -237,7 +237,7 @@ RenderBlock::~RenderBlock()
 
 RenderBlock* RenderBlock::createAnonymous(Document* document)
 {
-    RenderBlock* renderer = new (document->renderArena()) RenderBlock(0);
+    RenderBlock* renderer = new (document->renderArena()) RenderBlockFlow(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
@@ -1720,7 +1720,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
         if (oldHeight > newHeight && maxFloatLogicalBottom > newHeight && !childrenInline()) {
             // One of our children's floats may have become an overhanging float for us. We need to look for it.
             for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
-                if (child->isBlockFlow() && !child->isFloatingOrOutOfFlowPositioned()) {
+                if (child->isBlockFlowFlexBoxOrGrid() && !child->isFloatingOrOutOfFlowPositioned()) {
                     RenderBlock* block = toRenderBlock(child);
                     if (block->lowestFloatLogicalBottom() + block->logicalTop() > newHeight)
                         addOverhangingFloats(block, false);
@@ -2258,7 +2258,7 @@ LayoutUnit RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo
     LayoutUnit oldLogicalHeight = logicalHeight();
     setLogicalHeight(logicalTop);
     RenderObject* prev = child->previousSibling();
-    if (prev && prev->isBlockFlow() && !prev->isFloatingOrOutOfFlowPositioned()) {
+    if (prev && prev->isBlockFlowFlexBoxOrGrid() && !prev->isFloatingOrOutOfFlowPositioned()) {
         RenderBlock* block = toRenderBlock(prev);
         if (block->containsFloats() && !block->avoidsFloats() && (block->logicalTop() + block->lowestFloatLogicalBottom()) > logicalTop) 
             addOverhangingFloats(block, false);
@@ -3683,7 +3683,7 @@ GapRects RenderBlock::selectionGaps(RenderBlock* rootBlock, const LayoutPoint& r
     // FIXME: overflow: auto/scroll regions need more math here, since painting in the border box is different from painting in the padding box (one is scrolled, the other is
     // fixed).
     GapRects result;
-    if (!isBlockFlow()) // FIXME: Make multi-column selection gap filling work someday.
+    if (!isBlockFlowFlexBoxOrGrid()) // FIXME: Make multi-column selection gap filling work someday.
         return result;
 
     if (hasColumns() || hasTransform() || style()->columnSpan()) {
@@ -6762,7 +6762,7 @@ int RenderBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin
 
 int RenderBlock::firstLineBoxBaseline() const
 {
-    if (!isBlockFlow() || (isWritingModeRoot() && !isRubyRun()))
+    if (!isBlockFlowFlexBoxOrGrid() || (isWritingModeRoot() && !isRubyRun()))
         return -1;
 
     if (childrenInline()) {
@@ -6791,7 +6791,7 @@ int RenderBlock::inlineBlockBaseline(LineDirectionMode direction) const
 
 int RenderBlock::lastLineBoxBaseline(LineDirectionMode lineDirection) const
 {
-    if (!isBlockFlow() || (isWritingModeRoot() && !isRubyRun()))
+    if (!isBlockFlowFlexBoxOrGrid() || (isWritingModeRoot() && !isRubyRun()))
         return -1;
 
     if (childrenInline()) {
@@ -6852,7 +6852,7 @@ RenderBlock* RenderBlock::firstLineBlock() const
         // FIXME: Remove when buttons are implemented with align-items instead
         // of flexbox.
         if (firstLineBlock->isReplaced() || firstLineBlock->isFloating()
-            || !parentBlock || parentBlock->firstChild() != firstLineBlock || !parentBlock->isBlockFlow()
+            || !parentBlock || parentBlock->firstChild() != firstLineBlock || !parentBlock->isBlockFlowFlexBoxOrGrid()
             || (parentBlock->isFlexibleBox() && !parentBlock->isRenderButton()))
             break;
         ASSERT_WITH_SECURITY_IMPLICATION(parentBlock->isRenderBlock());
@@ -6911,7 +6911,7 @@ static inline RenderObject* findFirstLetterBlock(RenderBlock* start)
 
         RenderObject* parentBlock = firstLetterBlock->parent();
         if (firstLetterBlock->isReplaced() || !parentBlock || parentBlock->firstChild() != firstLetterBlock || 
-            !parentBlock->isBlockFlow() || (parentBlock->isFlexibleBox() && !parentBlock->isRenderButton()))
+            !parentBlock->isBlockFlowFlexBoxOrGrid() || (parentBlock->isFlexibleBox() && !parentBlock->isRenderButton()))
             return 0;
         firstLetterBlock = parentBlock;
     } 
@@ -7093,7 +7093,7 @@ void RenderBlock::updateFirstLetter()
 static bool shouldCheckLines(RenderObject* obj)
 {
     return !obj->isFloatingOrOutOfFlowPositioned() && !obj->isRunIn()
-            && obj->isBlockFlow() && obj->style()->height().isAuto()
+            && obj->isBlockFlowFlexBoxOrGrid() && obj->style()->height().isAuto()
             && (!obj->isDeprecatedFlexibleBox() || obj->style()->boxOrient() == VERTICAL);
 }
 
@@ -7198,7 +7198,7 @@ void RenderBlock::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit&
         else {
             for (RenderBox* obj = firstChildBox(); obj; obj = obj->nextSiblingBox()) {
                 if (!obj->isFloatingOrOutOfFlowPositioned()) {
-                    if (obj->isBlockFlow() && !obj->hasOverflowClip())
+                    if (obj->isBlockFlowFlexBoxOrGrid() && !obj->hasOverflowClip())
                         toRenderBlock(obj)->adjustForBorderFit(x + obj->x(), left, right);
                     else if (obj->style()->visibility() == VISIBLE) {
                         // We are a replaced element or some kind of non-block-flow object.
index fefd386..03545ff 100644 (file)
@@ -89,9 +89,11 @@ public:
     template <class> friend struct ValueToString;
 #endif
 
+protected:
     explicit RenderBlock(ContainerNode*);
     virtual ~RenderBlock();
 
+public:
     static RenderBlock* createAnonymous(Document*);
 
     RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
@@ -627,7 +629,6 @@ private:
     virtual const char* renderName() const;
 
     virtual bool isRenderBlock() const OVERRIDE FINAL { return true; }
-    virtual bool isBlockFlow() const OVERRIDE FINAL { return (!isInline() || isReplaced()) && !isTable(); }
     virtual bool isInlineBlockOrInlineTable() const OVERRIDE FINAL { return isInline() && isReplaced(); }
 
     void makeChildrenNonInline(RenderObject* insertionPoint = 0);
diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp
new file mode 100644 (file)
index 0000000..74006e0
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ *           (C) 2007 David Smith (catfish.man@gmail.com)
+ * Copyright (C) 2003-2013 Apple Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "RenderBlockFlow.h"
+
+namespace WebCore {
+
+RenderBlockFlow::RenderBlockFlow(ContainerNode* node)
+    : RenderBlock(node)
+{
+}
+
+RenderBlockFlow::~RenderBlockFlow()
+{
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderBlockFlow.h b/Source/WebCore/rendering/RenderBlockFlow.h
new file mode 100644 (file)
index 0000000..3831f34
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ *           (C) 2007 David Smith (catfish.man@gmail.com)
+ * Copyright (C) 2003-2013,  Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RenderBlockFlow_h
+#define RenderBlockFlow_h
+
+#include "RenderBlock.h"
+
+namespace WebCore {
+
+class RenderBlockFlow : public RenderBlock {
+public:
+    explicit RenderBlockFlow(ContainerNode*);
+    virtual ~RenderBlockFlow();
+    
+    virtual bool isRenderBlockFlow() const OVERRIDE FINAL { return true; }
+};
+
+inline RenderBlockFlow& toRenderBlockFlow(RenderObject& object)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(object.isRenderBlockFlow());
+    return static_cast<RenderBlockFlow&>(object);
+}
+
+inline const RenderBlockFlow& toRenderBlockFlow(const RenderObject& object)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(object.isRenderBlockFlow());
+    return static_cast<const RenderBlockFlow&>(object);
+}
+
+inline RenderBlockFlow* toRenderBlockFlow(RenderObject* object)
+{ 
+    ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlockFlow());
+    return static_cast<RenderBlockFlow*>(object);
+}
+
+inline const RenderBlockFlow* toRenderBlockFlow(const RenderObject* object)
+{ 
+    ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlockFlow());
+    return static_cast<const RenderBlockFlow*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderBlockFlow(const RenderBlockFlow*);
+void toRenderBlockFlow(const RenderBlockFlow&);
+
+} // namespace WebCore
+
+#endif // RenderBlockFlow_h
index 58389c9..26f7221 100644 (file)
@@ -2103,7 +2103,7 @@ void RenderBox::computeRectForRepaint(const RenderLayerModelObject* repaintConta
         topLeft += layer()->offsetForInFlowPosition();
     }
     
-    if (position != AbsolutePosition && position != FixedPosition && o->hasColumns() && o->isBlockFlow()) {
+    if (position != AbsolutePosition && position != FixedPosition && o->hasColumns() && o->isBlockFlowFlexBoxOrGrid()) {
         LayoutRect repaintRect(topLeft, rect.size());
         toRenderBlock(o)->adjustRectForColumns(repaintRect);
         topLeft = repaintRect.location();
@@ -4093,7 +4093,7 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point)
         adjustedPoint.moveBy(location());
 
     for (RenderObject* renderObject = firstChild(); renderObject; renderObject = renderObject->nextSibling()) {
-        if ((!renderObject->firstChild() && !renderObject->isInline() && !renderObject->isBlockFlow() )
+        if ((!renderObject->firstChild() && !renderObject->isInline() && !renderObject->isBlockFlowFlexBoxOrGrid() )
             || renderObject->style()->visibility() != VISIBLE)
             continue;
         
index 37c01d6..2f089df 100644 (file)
@@ -175,7 +175,7 @@ public:
 
     virtual void setSelectionState(SelectionState s);
 
-    bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && isBlockFlow() && !isRenderSVGBlock(); }
+    bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !hasColumns() && !isTableCell() && isBlockFlowFlexBoxOrGrid() && !isRenderSVGBlock(); }
 
 
     void getGeometryForBackgroundImage(const RenderLayerModelObject* paintContainer, IntRect& destRect, IntPoint& phase, IntSize& tileSize) const;
index 770b5d8..fa21a9f 100644 (file)
@@ -988,7 +988,7 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
 
         child->clearOverrideSize();
         if (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))
-            || (child->style()->height().isAuto() && child->isBlockFlow())) {
+            || (child->style()->height().isAuto() && child->isRenderBlock())) {
             child->setChildNeedsLayout(true, MarkOnlyThis);
 
             // Dirty all the positioned objects.
@@ -998,7 +998,7 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
             }
         }
         child->layoutIfNeeded();
-        if (child->style()->height().isAuto() && child->isBlockFlow())
+        if (child->style()->height().isAuto() && child->isRenderBlock())
             maxLineCount = max(maxLineCount, toRenderBlock(child)->lineCount());
     }
 
@@ -1010,7 +1010,7 @@ void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool
         return;
 
     for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
-        if (childDoesNotAffectWidthOrFlexing(child) || !child->style()->height().isAuto() || !child->isBlockFlow())
+        if (childDoesNotAffectWidthOrFlexing(child) || !child->style()->height().isAuto() || !child->isRenderBlock())
             continue;
 
         RenderBlock* blockChild = toRenderBlock(child);
@@ -1087,7 +1087,7 @@ void RenderDeprecatedFlexibleBox::clearLineClamp()
 
         child->clearOverrideSize();
         if ((child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))
-            || (child->style()->height().isAuto() && child->isBlockFlow())) {
+            || (child->style()->height().isAuto() && child->isRenderBlock())) {
             child->setChildNeedsLayout(true);
 
             if (child->isRenderBlock()) {
index 2ae332f..1d6ece8 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 using namespace HTMLNames;
 
 RenderDetailsMarker::RenderDetailsMarker(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 91d5900..31ef616 100644 (file)
 #define RenderDetailsMarker_h
 
 #if ENABLE(DETAILS_ELEMENT)
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
-class RenderDetailsMarker FINAL : public RenderBlock {
+class RenderDetailsMarker FINAL : public RenderBlockFlow {
 public:
     RenderDetailsMarker(Element*);
 
index 3216999..a9d15e6 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 using namespace HTMLNames;
 
 RenderFieldset::RenderFieldset(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 54519a8..c87c51f 100644 (file)
 #ifndef RenderFieldset_h
 #define RenderFieldset_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
-class RenderFieldset FINAL : public RenderBlock {
+class RenderFieldset FINAL : public RenderBlockFlow {
 public:
     explicit RenderFieldset(Element*);
 
index cff6cbf..e536c0e 100644 (file)
@@ -51,7 +51,7 @@ const int defaultWidthNumChars = 34;
 const int buttonShadowHeight = 2;
 
 RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input)
-    : RenderBlock(input)
+    : RenderBlockFlow(input)
     , m_canReceiveDroppedFiles(input->canReceiveDroppedFiles())
 {
 }
index b19bfe5..fedf689 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef RenderFileUploadControl_h
 #define RenderFileUploadControl_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
@@ -31,7 +31,7 @@ class HTMLInputElement;
 // sufficient space to draw a file icon and filename. The RenderButton has a shadow node
 // associated with it to receive click/hover events.
 
-class RenderFileUploadControl FINAL : public RenderBlock {
+class RenderFileUploadControl FINAL : public RenderBlockFlow {
 public:
     RenderFileUploadControl(HTMLInputElement*);
     virtual ~RenderFileUploadControl();
index c228a52..f148166 100644 (file)
@@ -51,7 +51,7 @@
 namespace WebCore {
 
 RenderFlowThread::RenderFlowThread()
-    : RenderBlock(0)
+    : RenderBlockFlow(0)
     , m_previousRegionCount(0)
     , m_autoLogicalHeightRegionsCount(0)
     , m_regionsInvalidated(false)
index f486c92..0932ea8 100644 (file)
@@ -31,7 +31,7 @@
 #define RenderFlowThread_h
 
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include <wtf/HashCountedSet.h>
 #include <wtf/ListHashSet.h>
 #include <wtf/PassRefPtr.h>
@@ -55,7 +55,7 @@ typedef HashMap<RenderLayer*, RenderRegion*> LayerToRegionMap;
 // and nodeAtPoint methods to this object. Each RenderRegion will actually be a viewPort
 // of the RenderFlowThread.
 
-class RenderFlowThread: public RenderBlock {
+class RenderFlowThread: public RenderBlockFlow {
 public:
     RenderFlowThread();
     virtual ~RenderFlowThread() { };
index 3a98100..92a8218 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "RenderFullScreen.h"
 
+#include "RenderBlockFlow.h"
 #include "RenderLayer.h"
 
 #if USE(ACCELERATED_COMPOSITING)
 
 using namespace WebCore;
 
-class RenderFullScreenPlaceholder FINAL : public RenderBlock {
+class RenderFullScreenPlaceholder FINAL : public RenderBlockFlow {
 public:
     RenderFullScreenPlaceholder(RenderFullScreen* owner) 
-        : RenderBlock(0)
+        : RenderBlockFlow(0)
         , m_owner(owner) 
     {
         setDocumentForAnonymous(&owner->document());
index e20498a..17c6f36 100644 (file)
@@ -1087,7 +1087,7 @@ void RenderInline::computeRectForRepaint(const RenderLayerModelObject* repaintCo
 
     LayoutPoint topLeft = rect.location();
 
-    if (o->isBlockFlow() && !style()->hasOutOfFlowPosition()) {
+    if (o->isBlockFlowFlexBoxOrGrid() && !style()->hasOutOfFlowPosition()) {
         RenderBlock* cb = toRenderBlock(o);
         if (cb->hasColumns()) {
             LayoutRect repaintRect(topLeft, rect.size());
index 5297b84..6c501f3 100644 (file)
@@ -311,7 +311,7 @@ bool RenderLineBoxList::hitTest(RenderBoxModelObject* renderer, const HitTestReq
 
 void RenderLineBoxList::dirtyLinesFromChangedChild(RenderObject* container, RenderObject* child)
 {
-    if (!container->parent() || (container->isRenderBlock() && (container->selfNeedsLayout() || !container->isBlockFlow())))
+    if (!container->parent() || (container->isRenderBlock() && (container->selfNeedsLayout() || !container->isBlockFlowFlexBoxOrGrid())))
         return;
 
     RenderInline* inlineContainer = container->isRenderInline() ? toRenderInline(container) : 0;
index 209638d..38139f2 100644 (file)
@@ -42,7 +42,7 @@ namespace WebCore {
 using namespace HTMLNames;
 
 RenderListItem::RenderListItem(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
     , m_marker(0)
     , m_hasExplicitValue(false)
     , m_isValueUpToDate(false)
@@ -76,7 +76,7 @@ void RenderListItem::willBeDestroyed()
         m_marker->destroy();
         m_marker = 0;
     }
-    RenderBlock::willBeDestroyed();
+    RenderBlockFlow::willBeDestroyed();
 }
 
 void RenderListItem::insertedIntoTree()
@@ -88,7 +88,7 @@ void RenderListItem::insertedIntoTree()
 
 void RenderListItem::willBeRemovedFromTree()
 {
-    RenderBlock::willBeRemovedFromTree();
+    RenderBlockFlow::willBeRemovedFromTree();
 
     updateListMarkerNumbers();
 }
@@ -306,12 +306,12 @@ void RenderListItem::layout()
     ASSERT(needsLayout()); 
 
     insertOrMoveMarkerRendererIfNeeded();
-    RenderBlock::layout();
+    RenderBlockFlow::layout();
 }
 
 void RenderListItem::addOverflowFromChildren()
 {
-    RenderBlock::addOverflowFromChildren();
+    RenderBlockFlow::addOverflowFromChildren();
     positionListMarker();
 }
 
@@ -325,7 +325,7 @@ void RenderListItem::computePreferredLogicalWidths()
     SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false);
 #endif
     insertOrMoveMarkerRendererIfNeeded();
-    RenderBlock::computePreferredLogicalWidths();
+    RenderBlockFlow::computePreferredLogicalWidths();
 }
 
 void RenderListItem::positionListMarker()
@@ -428,7 +428,7 @@ void RenderListItem::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
     if (!logicalHeight() && hasOverflowClip())
         return;
 
-    RenderBlock::paint(paintInfo, paintOffset);
+    RenderBlockFlow::paint(paintInfo, paintOffset);
 }
 
 const String& RenderListItem::markerText() const
index 7219c68..c108a15 100644 (file)
 #ifndef RenderListItem_h
 #define RenderListItem_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
 class HTMLOListElement;
 class RenderListMarker;
 
-class RenderListItem FINAL : public RenderBlock {
+class RenderListItem FINAL : public RenderBlockFlow {
 public:
     explicit RenderListItem(Element*);
 
index a2ea968..3239bd7 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 using namespace HTMLNames;
 
 RenderMeter::RenderMeter(HTMLElement* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 8731f92..a6999df 100644 (file)
@@ -22,7 +22,7 @@
 #define RenderMeter_h
 
 #if ENABLE(METER_ELEMENT)
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "RenderWidget.h"
 
 
@@ -30,7 +30,7 @@ namespace WebCore {
 
 class HTMLMeterElement;
 
-class RenderMeter FINAL : public RenderBlock {
+class RenderMeter FINAL : public RenderBlockFlow {
 public:
     explicit RenderMeter(HTMLElement*);
     virtual ~RenderMeter();
index 1e68fae..055658d 100644 (file)
@@ -36,7 +36,7 @@ using namespace std;
 namespace WebCore {
 
 RenderMultiColumnBlock::RenderMultiColumnBlock(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
     , m_flowThread(0)
     , m_columnCount(1)
     , m_columnWidth(0)
index 1cbc58b..e3ff634 100644 (file)
 #ifndef RenderMultiColumnBlock_h
 #define RenderMultiColumnBlock_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
 class RenderMultiColumnFlowThread;
 
-class RenderMultiColumnBlock FINAL : public RenderBlock {
+class RenderMultiColumnBlock FINAL : public RenderBlockFlow {
 public:
     RenderMultiColumnBlock(Element*);
 
index f9ccb19..d505e2b 100644 (file)
@@ -207,7 +207,7 @@ RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
     case COMPACT:
         if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && document.regionBasedColumnsEnabled())
             return new (arena) RenderMultiColumnBlock(element);
-        return new (arena) RenderBlock(element);
+        return new (arena) RenderBlockFlow(element);
     case LIST_ITEM:
         return new (arena) RenderListItem(element);
     case TABLE:
@@ -1557,7 +1557,7 @@ void RenderObject::computeRectForRepaint(const RenderLayerModelObject* repaintCo
         return;
 
     if (RenderObject* o = parent()) {
-        if (o->isBlockFlow()) {
+        if (o->isBlockFlowFlexBoxOrGrid()) {
             RenderBlock* cb = toRenderBlock(o);
             if (cb->hasColumns())
                 cb->adjustRectForColumns(rect);
@@ -1964,7 +1964,7 @@ void RenderObject::styleWillChange(StyleDifference diff, const RenderStyle* newS
 
         s_affectsParentBlock = isFloatingOrOutOfFlowPositioned()
             && (!newStyle->isFloating() && !newStyle->hasOutOfFlowPosition())
-            && parent() && (parent()->isBlockFlow() || parent()->isRenderInline());
+            && parent() && (parent()->isBlockFlowFlexBoxOrGrid() || parent()->isRenderInline());
 
         s_noLongerAffectsParentBlock = ((!isFloating() && newStyle->isFloating()) || (!isOutOfFlowPositioned() && newStyle->hasOutOfFlowPosition()))
             && parent() && parent()->isRenderBlock();
@@ -2796,7 +2796,7 @@ static PassRefPtr<RenderStyle> firstLineStyleForCachedUncachedType(StyleCacheSta
     if (renderer->isBeforeOrAfterContent())
         rendererForFirstLineStyle = renderer->parent();
 
-    if (rendererForFirstLineStyle->isBlockFlow()) {
+    if (rendererForFirstLineStyle->isBlockFlowFlexBoxOrGrid()) {
         if (RenderBlock* firstLineBlock = rendererForFirstLineStyle->firstLineBlock()) {
             if (type == Cached)
                 return firstLineBlock->getCachedPseudoStyle(FIRST_LINE, style);
index 3e6e2a3..2918710 100644 (file)
@@ -321,7 +321,6 @@ public:
     bool isPseudoElement() const { return node() && node()->isPseudoElement(); }
 
     virtual bool isBR() const { return false; }
-    virtual bool isBlockFlow() const { return false; }
     virtual bool isBoxModelObject() const { return false; }
     virtual bool isCounter() const { return false; }
     virtual bool isQuote() const { return false; }
@@ -350,6 +349,7 @@ public:
     virtual bool isProgress() const { return false; }
 #endif
     virtual bool isRenderBlock() const { return false; }
+    virtual bool isRenderBlockFlow() const { return false; }
     virtual bool isRenderSVGBlock() const { return false; };
     virtual bool isRenderButton() const { return false; }
     virtual bool isRenderIFrame() const { return false; }
@@ -406,6 +406,12 @@ public:
 
     bool isTablePart() const { return isTableCell() || isRenderTableCol() || isTableCaption() || isTableRow() || isTableSection(); }
 
+    // FIXME: This is the renamed version of isBlockFlow() and it makes it more obvious that flexible boxes and grids are being included. Most
+    // of the current callers did not in fact intend to include flexible boxes and grids (but have been for years), so we will want to
+    // convert those callers over to isRenderBlockFlow() instead. We'll do this call site by call site in order to try to find the
+    // code that is making bad assumptions and change it. Once that's finished, this method will just go away.
+    bool isBlockFlowFlexBoxOrGrid() const { return isRenderBlockFlow() || isFlexibleBoxIncludingDeprecated() || isRenderGrid(); }
+
     inline bool isBeforeContent() const;
     inline bool isAfterContent() const;
     inline bool isBeforeOrAfterContent() const;
index 11e9c19..4491743 100644 (file)
@@ -118,7 +118,7 @@ RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
 void RenderObjectChildList::insertChildNode(RenderObject* owner, RenderObject* newChild, RenderObject* beforeChild, bool notifyRenderer)
 {
     ASSERT(!newChild->parent());
-    ASSERT(!owner->isBlockFlow() || (!newChild->isTableSection() && !newChild->isTableRow() && !newChild->isTableCell()));
+    ASSERT(!owner->isBlockFlowFlexBoxOrGrid() || (!newChild->isTableSection() && !newChild->isTableRow() && !newChild->isTableCell()));
 
     while (beforeChild && beforeChild->parent() && beforeChild->parent() != owner)
         beforeChild = beforeChild->parent();
index dc814a0..86263c0 100644 (file)
@@ -34,7 +34,7 @@ using namespace std;
 namespace WebCore {
 
 RenderProgress::RenderProgress(HTMLElement* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
     , m_position(HTMLProgressElement::InvalidPosition)
     , m_animationStartTime(0)
     , m_animationRepeatInterval(0)
index 7725dbd..5c6e262 100644 (file)
 #define RenderProgress_h
 
 #if ENABLE(PROGRESS_ELEMENT)
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
 class HTMLProgressElement;
 
-class RenderProgress FINAL : public RenderBlock {
+class RenderProgress FINAL : public RenderBlockFlow {
 public:
     explicit RenderProgress(HTMLElement*);
     virtual ~RenderProgress();
index 29ac766..5444763 100644 (file)
@@ -49,7 +49,7 @@ using namespace std;
 namespace WebCore {
 
 RenderRegion::RenderRegion(Element* element, RenderFlowThread* flowThread)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
     , m_flowThread(flowThread)
     , m_parentNamedFlowThread(0)
     , m_isValid(false)
index 61bb271..e79c39f 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef RenderRegion_h
 #define RenderRegion_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "StyleInheritedData.h"
 
 namespace WebCore {
@@ -43,7 +43,7 @@ class RenderBoxRegionInfo;
 class RenderFlowThread;
 class RenderNamedFlowThread;
 
-class RenderRegion : public RenderBlock {
+class RenderRegion : public RenderBlockFlow {
 public:
     explicit RenderRegion(Element*, RenderFlowThread*);
 
index 159b264..e2d3315 100644 (file)
@@ -216,7 +216,7 @@ void RenderRubyAsInline::removeChild(RenderObject* child)
 //=== ruby as block object ===
 
 RenderRubyAsBlock::RenderRubyAsBlock(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 4073653..fec521f 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef RenderRuby_h
 #define RenderRuby_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "RenderInline.h"
 
 namespace WebCore {
@@ -70,7 +70,7 @@ private:
 };
 
 // <ruby> when used as 'display:block' or 'display:inline-block'
-class RenderRubyAsBlock FINAL : public RenderBlock {
+class RenderRubyAsBlock FINAL : public RenderBlockFlow {
 public:
     RenderRubyAsBlock(Element*);
     virtual ~RenderRubyAsBlock();
index 0623b9e..5fa023c 100644 (file)
@@ -39,7 +39,7 @@ using namespace std;
 namespace WebCore {
 
 RenderRubyBase::RenderRubyBase()
-    : RenderBlock(0)
+    : RenderBlockFlow(0)
 {
     setInline(false);
 }
index a7742f7..11824e0 100644 (file)
 #ifndef RenderRubyBase_h
 #define RenderRubyBase_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
 class RenderRubyRun;
 
-class RenderRubyBase FINAL : public RenderBlock {
+class RenderRubyBase FINAL : public RenderBlockFlow {
 public:
     virtual ~RenderRubyBase();
     
index e97d5fb..c25879e 100644 (file)
@@ -44,7 +44,7 @@ using namespace std;
 namespace WebCore {
 
 RenderRubyRun::RenderRubyRun()
-    : RenderBlock(0)
+    : RenderBlockFlow(0)
 {
     setReplaced(true);
     setInline(true);
index 98a0d8f..a9de1ef 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef RenderRubyRun_h
 #define RenderRubyRun_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
@@ -41,7 +41,7 @@ class RenderRubyText;
 // RenderRubyRun are 'inline-block/table' like objects,and wrap a single pairing of a ruby base with its ruby text(s).
 // See RenderRuby.h for further comments on the structure
 
-class RenderRubyRun FINAL : public RenderBlock {
+class RenderRubyRun FINAL : public RenderBlockFlow {
 public:
     virtual ~RenderRubyRun();
 
index 497c8b7..b640ad9 100644 (file)
@@ -38,7 +38,7 @@ using namespace std;
 namespace WebCore {
 
 RenderRubyText::RenderRubyText(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 0220490..af1ab3e 100644 (file)
 #ifndef RenderRubyText_h
 #define RenderRubyText_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
-class RenderRubyText FINAL : public RenderBlock {
+class RenderRubyText FINAL : public RenderBlockFlow {
 public:
     RenderRubyText(Element*);
     virtual ~RenderRubyText();
index 76486f9..a49ab3d 100644 (file)
@@ -25,7 +25,7 @@
 namespace WebCore {
 
 RenderTableCaption::RenderTableCaption(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 3107a6a..c446790 100644 (file)
 #ifndef RenderTableCaption_h
 #define RenderTableCaption_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 
 namespace WebCore {
 
 class RenderTable;
 
-class RenderTableCaption FINAL : public RenderBlock {
+class RenderTableCaption FINAL : public RenderBlockFlow {
 public:
     explicit RenderTableCaption(Element*);
     virtual ~RenderTableCaption();
index 9fe9835..34eb32a 100644 (file)
@@ -48,7 +48,7 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-struct SameSizeAsRenderTableCell : public RenderBlock {
+struct SameSizeAsRenderTableCell : public RenderBlockFlow {
     unsigned bitfields;
     int paddings[2];
 };
@@ -57,7 +57,7 @@ COMPILE_ASSERT(sizeof(RenderTableCell) == sizeof(SameSizeAsRenderTableCell), Ren
 COMPILE_ASSERT(sizeof(CollapsedBorderValue) == 8, CollapsedBorderValue_should_stay_small);
 
 RenderTableCell::RenderTableCell(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
     , m_column(unsetColumnIndex)
     , m_cellWidthChanged(false)
     , m_intrinsicPaddingBefore(0)
index fbe6a95..2f0fd23 100644 (file)
@@ -25,6 +25,7 @@
 #ifndef RenderTableCell_h
 #define RenderTableCell_h
 
+#include "RenderBlockFlow.h"
 #include "RenderTableRow.h"
 #include "RenderTableSection.h"
 
@@ -35,7 +36,7 @@ static const unsigned maxColumnIndex = 0x1FFFFFFE; // 536,870,910
 
 enum IncludeBorderColorOrNot { DoNotIncludeBorderColor, IncludeBorderColor };
 
-class RenderTableCell FINAL : public RenderBlock {
+class RenderTableCell FINAL : public RenderBlockFlow {
 public:
     explicit RenderTableCell(Element*);
     
index a84bb8c..b53779a 100644 (file)
@@ -37,7 +37,7 @@ using namespace std;
 namespace WebCore {
 
 RenderTextControl::RenderTextControl(Element* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
     ASSERT(isHTMLTextFormControlElement(element));
 }
index 4d192ac..af6a208 100644 (file)
 #ifndef RenderTextControl_h
 #define RenderTextControl_h
 
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "RenderFlexibleBox.h"
 
 namespace WebCore {
 
 class HTMLTextFormControlElement;
 
-class RenderTextControl : public RenderBlock {
+class RenderTextControl : public RenderBlockFlow {
 public:
     virtual ~RenderTextControl();
 
index 7bce648..fa0317a 100644 (file)
@@ -108,9 +108,9 @@ void toRenderTextControlSingleLine(const RenderTextControlSingleLine*);
 
 // ----------------------------
 
-class RenderTextControlInnerBlock : public RenderBlock {
+class RenderTextControlInnerBlock : public RenderBlockFlow {
 public:
-    RenderTextControlInnerBlock(Element* element) : RenderBlock(element) { }
+    RenderTextControlInnerBlock(Element* element) : RenderBlockFlow(element) { }
 
 private:
     virtual bool hasLineIfEmpty() const { return true; }
index b460c97..e590f32 100644 (file)
@@ -28,6 +28,7 @@
 #if ENABLE(VIDEO_TRACK)
 
 #include "RenderTextTrackCue.h"
+#include "RenderView.h"
 
 #include "RenderView.h"
 #include "TextTrackCue.h"
@@ -37,7 +38,7 @@
 namespace WebCore {
 
 RenderTextTrackCue::RenderTextTrackCue(TextTrackCueBox* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
     , m_cue(element->getCue())
 {
 }
index cd84ab9..2599395 100644 (file)
@@ -29,7 +29,7 @@
 #if ENABLE(VIDEO_TRACK)
 
 #include "FloatPoint.h"
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "RenderInline.h"
 
 namespace WebCore {
@@ -37,7 +37,7 @@ namespace WebCore {
 class RenderBox;
 class TextTrackCueBox;
 
-class RenderTextTrackCue FINAL : public RenderBlock {
+class RenderTextTrackCue FINAL : public RenderBlockFlow {
 public:
     explicit RenderTextTrackCue(TextTrackCueBox*);
 
index 13a8fc9..9998c65 100644 (file)
@@ -57,7 +57,7 @@
 namespace WebCore {
 
 RenderView::RenderView(Document* document)
-    : RenderBlock(document)
+    : RenderBlockFlow(document)
     , m_frameView(*document->view())
     , m_selectionStart(0)
     , m_selectionEnd(0)
index d674598..c4a6c73 100644 (file)
@@ -25,7 +25,7 @@
 #include "FrameView.h"
 #include "LayoutState.h"
 #include "PODFreeListArena.h"
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include <wtf/OwnPtr.h>
 
 namespace WebCore {
@@ -43,7 +43,7 @@ class RenderLayerCompositor;
 class CustomFilterGlobalContext;
 #endif
 
-class RenderView FINAL : public RenderBlock {
+class RenderView FINAL : public RenderBlockFlow {
 public:
     explicit RenderView(Document*);
     virtual ~RenderView();
@@ -253,7 +253,7 @@ private:
     {
         // We push LayoutState even if layoutState is disabled because it stores layoutDelta too.
         if (!doingFullRepaint() || m_layoutState->isPaginated() || renderer->hasColumns() || renderer->flowThreadContainingBlock()
-            || m_layoutState->lineGrid() || (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->isBlockFlow())
+            || m_layoutState->lineGrid() || (renderer->style()->lineGrid() != RenderStyle::initialLineGrid() && renderer->isBlockFlowFlexBoxOrGrid())
 #if ENABLE(CSS_SHAPES)
             || (renderer->isRenderBlock() && toRenderBlock(renderer)->shapeInsideInfo())
             || (m_layoutState->shapeInsideInfo() && renderer->isRenderBlock() && !toRenderBlock(renderer)->allowsShapeInsideInfoSharing())
index 884d0c5..3f5cc04 100644 (file)
@@ -46,6 +46,7 @@
 #include "RenderArena.cpp"
 #include "RenderBR.cpp"
 #include "RenderBlock.cpp"
+#include "RenderBlockFlow.cpp"
 #include "RenderBlockLineLayout.cpp"
 #include "RenderBox.cpp"
 #include "RenderBoxModelObject.cpp"
index 0db6455..7d72e9f 100644 (file)
@@ -33,6 +33,7 @@
 #include "FontCache.h"
 #include "FontSelector.h"
 #include "MathMLNames.h"
+#include "RenderBlockFlow.h"
 #include "RenderText.h"
 
 namespace WebCore {
@@ -307,7 +308,7 @@ RenderBlock* RenderMathMLOperator::createGlyph(UChar glyph, int maxHeightForRend
     addChild(container);
     RenderBlock* parent = container;
     if (charRelative) {
-        RenderBlock* charBlock = new (renderArena()) RenderBlock(node());
+        RenderBlock* charBlock = new (renderArena()) RenderBlockFlow(node());
         RefPtr<RenderStyle> charStyle = RenderStyle::create();
         charStyle->inheritFrom(container->style());
         charStyle->setDisplay(INLINE_BLOCK);
index f120b99..32838d6 100644 (file)
@@ -32,7 +32,7 @@
 namespace WebCore {
 
 RenderSVGBlock::RenderSVGBlock(SVGElement* element)
-    : RenderBlock(element)
+    : RenderBlockFlow(element)
 {
 }
 
index 5de2438..592b347 100644 (file)
 #define RenderSVGBlock_h
 
 #if ENABLE(SVG)
-#include "RenderBlock.h"
+#include "RenderBlockFlow.h"
 #include "SVGRenderSupport.h"
 
 namespace WebCore {
 
 class SVGElement;
 
-class RenderSVGBlock : public RenderBlock {
+class RenderSVGBlock : public RenderBlockFlow {
 public:
     explicit RenderSVGBlock(SVGElement*);