2011-05-19 MORITA Hajime <morrita@google.com>
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2011 04:11:35 +0000 (04:11 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2011 04:11:35 +0000 (04:11 +0000)
commitef534fb6dfc5a767e49a1e714669916ad805ad9e
treee5eb146b981e019271d11b6a54b7643d8b644e68
parent4f972f975d72bd6cfaa94340ab542ebf1f2e4065
2011-05-19  MORITA Hajime  <morrita@google.com>

        Reviewed by Dimitri Glazkov.

        [Refactoring] Pass NodeRenderingContext to Node::rendererIsNeeded()
        https://bugs.webkit.org/show_bug.cgi?id=61114

        - Extracted NodeRenderingContext from NodeRendererFactory, giving separate files to it.
        - Changed signature rendererIsNeeded(RenderStyle*)
          to rendererIsNeeded(const NodeRenderingContext&).
          The style object is retrieved from NodeRendererFactory::style()
          This will allow rendererIsNeeded() to access contextual
          information like attaching phase and rendering-parent.

        No new tests. No behaviour change.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/CharacterData.cpp:
        (WebCore::CharacterData::updateRenderer): Pass unresolved NodeRenderingContext& to rendererIsNeeded()
        (WebCore::CharacterData::rendererIsNeeded):
        * dom/CharacterData.h:
        * dom/DOMAllInOne.cpp:
        * dom/EditingText.cpp:
        (WebCore::EditingText::rendererIsNeeded):
        * dom/EditingText.h:
        * dom/Node.cpp:
        (WebCore::Node::parentNodeForRenderingAndStyle):
        (WebCore::Node::rendererIsNeeded):
        * dom/Node.h:
        * dom/NodeRenderingContext.cpp: Added.
        (WebCore::NodeRenderingContext::NodeRenderingContext):
        (WebCore::NodeRenderingContext::~NodeRenderingContext):
        (WebCore::NodeRenderingContext::setStyle):
        (WebCore::NodeRenderingContext::releaseStyle):
        (WebCore::NodeRenderingContext::nextRenderer):
        (WebCore::NodeRenderingContext::parentRenderer):
        (WebCore::NodeRenderingContext::hostChildrenChanged):
        (WebCore::NodeRenderingContext::shouldCreateRenderer):
        (WebCore::NodeRendererFactory::NodeRendererFactory):
        (WebCore::NodeRendererFactory::createRendererAndStyle):
        (WebCore::wrapWithRenderFullScreen):
        (WebCore::NodeRendererFactory::createRendererIfNeeded):
        * dom/NodeRenderingContext.h: Added.
        (WebCore::NodeRenderingContext::node):
        (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
        (WebCore::NodeRenderingContext::style):
        (WebCore::NodeRendererFactory::context):
        * dom/ShadowContentElement.h:
        * dom/Text.cpp:
        * dom/Text.h:
        * html/HTMLAppletElement.cpp:
        * html/HTMLAppletElement.h:
        * html/HTMLElement.cpp:
        * html/HTMLElement.h:
        * html/HTMLEmbedElement.cpp:
        * html/HTMLEmbedElement.h:
        * html/HTMLFormElement.cpp:
        * html/HTMLFormElement.h:
        * html/HTMLFrameElement.cpp:
        * html/HTMLFrameElement.h:
        * html/HTMLFrameSetElement.cpp:
        * html/HTMLFrameSetElement.h:
        * html/HTMLIFrameElement.cpp:
        * html/HTMLIFrameElement.h:
        * html/HTMLInputElement.cpp:
        * html/HTMLInputElement.h:
        * html/HTMLMediaElement.cpp:
        * html/HTMLMediaElement.h:
        * html/HTMLNoScriptElement.h:
        * html/HTMLObjectElement.cpp:
        * html/HTMLObjectElement.h:
        * html/HTMLOptGroupElement.h:
        * html/HTMLOptionElement.h:
        * html/HTMLVideoElement.cpp:
        * html/HTMLVideoElement.h:
        * html/shadow/DetailsMarkerControl.cpp:
        * html/shadow/DetailsMarkerControl.h:
        * html/shadow/MeterShadowElement.cpp:
        * html/shadow/MeterShadowElement.h:
        * html/shadow/ProgressShadowElement.cpp:
        * html/shadow/ProgressShadowElement.h:
        * svg/SVGDescElement.h:
        * svg/SVGElement.h:
        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
        * svg/SVGFilterPrimitiveStandardAttributes.h:
        * svg/SVGFontElement.h:
        * svg/SVGGElement.cpp:
        * svg/SVGGElement.h:
        * svg/SVGGlyphElement.h:
        * svg/SVGHKernElement.h:
        * svg/SVGMarkerElement.h:
        * svg/SVGMissingGlyphElement.h:
        * svg/SVGSVGElement.h:
        * svg/SVGStyledElement.cpp:
        * svg/SVGStyledElement.h:
        * svg/SVGSymbolElement.h:
        * svg/SVGTRefElement.cpp:
        * svg/SVGTRefElement.h:
        * svg/SVGTSpanElement.cpp:
        * svg/SVGTSpanElement.h:
        * svg/SVGTextPathElement.cpp:
        * svg/SVGTextPathElement.h:
        * svg/SVGTitleElement.h:
        * svg/SVGVKernElement.h:
        * svg/SVGViewElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
74 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/CharacterData.cpp
Source/WebCore/dom/CharacterData.h
Source/WebCore/dom/DOMAllInOne.cpp
Source/WebCore/dom/EditingText.cpp
Source/WebCore/dom/EditingText.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/NodeRenderingContext.cpp [new file with mode: 0644]
Source/WebCore/dom/NodeRenderingContext.h [new file with mode: 0644]
Source/WebCore/dom/ShadowContentElement.h
Source/WebCore/dom/Text.cpp
Source/WebCore/dom/Text.h
Source/WebCore/html/HTMLAppletElement.cpp
Source/WebCore/html/HTMLAppletElement.h
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLElement.h
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLEmbedElement.h
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFormElement.h
Source/WebCore/html/HTMLFrameElement.cpp
Source/WebCore/html/HTMLFrameElement.h
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLFrameSetElement.h
Source/WebCore/html/HTMLIFrameElement.cpp
Source/WebCore/html/HTMLIFrameElement.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLNoScriptElement.h
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLObjectElement.h
Source/WebCore/html/HTMLOptGroupElement.h
Source/WebCore/html/HTMLOptionElement.h
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/html/shadow/DetailsMarkerControl.cpp
Source/WebCore/html/shadow/DetailsMarkerControl.h
Source/WebCore/html/shadow/MeterShadowElement.cpp
Source/WebCore/html/shadow/MeterShadowElement.h
Source/WebCore/html/shadow/ProgressShadowElement.cpp
Source/WebCore/html/shadow/ProgressShadowElement.h
Source/WebCore/svg/SVGDescElement.h
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
Source/WebCore/svg/SVGFontElement.h
Source/WebCore/svg/SVGGElement.cpp
Source/WebCore/svg/SVGGElement.h
Source/WebCore/svg/SVGGlyphElement.h
Source/WebCore/svg/SVGHKernElement.h
Source/WebCore/svg/SVGMarkerElement.h
Source/WebCore/svg/SVGMissingGlyphElement.h
Source/WebCore/svg/SVGSVGElement.h
Source/WebCore/svg/SVGStyledElement.cpp
Source/WebCore/svg/SVGStyledElement.h
Source/WebCore/svg/SVGSymbolElement.h
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/svg/SVGTRefElement.h
Source/WebCore/svg/SVGTSpanElement.cpp
Source/WebCore/svg/SVGTSpanElement.h
Source/WebCore/svg/SVGTextPathElement.cpp
Source/WebCore/svg/SVGTextPathElement.h
Source/WebCore/svg/SVGTitleElement.h
Source/WebCore/svg/SVGVKernElement.h
Source/WebCore/svg/SVGViewElement.h