Commit 948ea290 authored by abucur@adobe.com's avatar abucur@adobe.com
Browse files

RenderNamedFlowThread should not create NodeRenderingContext objects

https://bugs.webkit.org/show_bug.cgi?id=119923

Reviewed by Antti Koivisto.

Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
Original patch by Elliott Sprehn.

RenderNamedFlowThread should not create NodeRenderingContext objects

RenderNamedFlowThread is using NodeRenderingContext to get the original
parent renderer, but should just be using NodeRenderingTraversal::parent
instead (which is what NodeRenderingContext does internally anyway).

Tests: No change in functionality. No new tests.

* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d79fd74a
2013-08-22 Andrei Bucur <abucur@adobe.com>
RenderNamedFlowThread should not create NodeRenderingContext objects
https://bugs.webkit.org/show_bug.cgi?id=119923
Reviewed by Antti Koivisto.
Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
Original patch by Elliott Sprehn.
RenderNamedFlowThread should not create NodeRenderingContext objects
RenderNamedFlowThread is using NodeRenderingContext to get the original
parent renderer, but should just be using NodeRenderingTraversal::parent
instead (which is what NodeRenderingContext does internally anyway).
Tests: No change in functionality. No new tests.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):
2013-08-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
 
Introduce a SVGUnknownElement class for unknown SVG elements
......@@ -30,7 +30,7 @@
#include "FlowThreadController.h"
#include "InlineTextBox.h"
#include "InspectorInstrumentation.h"
#include "NodeRenderingContext.h"
#include "NodeRenderingTraversal.h"
#include "NodeTraversal.h"
#include "Position.h"
#include "Range.h"
......@@ -38,6 +38,7 @@
#include "RenderRegion.h"
#include "RenderText.h"
#include "RenderView.h"
#include "ShadowRoot.h"
#include "Text.h"
#include "WebKitNamedFlow.h"
......@@ -480,18 +481,16 @@ const AtomicString& RenderNamedFlowThread::flowThreadName() const
bool RenderNamedFlowThread::isChildAllowed(RenderObject* child, RenderStyle* style) const
{
ASSERT(child);
ASSERT(style);
if (!child->node())
return true;
ASSERT(child->node()->isElementNode());
RenderObject* parentRenderer = NodeRenderingContext(child->node()).parentRenderer();
if (!parentRenderer)
Node* originalParent = NodeRenderingTraversal::parent(child->node());
if (!originalParent || !originalParent->renderer())
return true;
return parentRenderer->isChildAllowed(child, style);
return originalParent->renderer()->isChildAllowed(child, style);
}
void RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment