Commit 47e2f427 authored by rniwa@webkit.org's avatar rniwa@webkit.org

2011-05-02 Ryosuke Niwa <rniwa@webkit.org>

        Reviewed by James Robinson.

        REGRESSION(r84672): showTree doesn't work for input/textarea elements
        https://bugs.webkit.org/show_bug.cgi?id=60001

        When shadow is null, try retrieving the inner element of a render text control.

        * dom/Node.cpp:
        (WebCore::traverseTreeAndMark):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f0560502
2011-05-02 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by James Robinson.
REGRESSION(r84672): showTree doesn't work for input/textarea elements
https://bugs.webkit.org/show_bug.cgi?id=60001
When shadow is null, try retrieving the inner element of a render text control.
* dom/Node.cpp:
(WebCore::traverseTreeAndMark):
2011-05-02 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by David Kilzer.
......@@ -54,6 +54,7 @@
#include "ExceptionCode.h"
#include "Frame.h"
#include "FrameView.h"
#include "HTMLElement.h"
#include "HTMLNames.h"
#include "InspectorInstrumentation.h"
#include "KeyboardEvent.h"
......@@ -73,6 +74,7 @@
#include "RenderBlock.h"
#include "RenderBox.h"
#include "RenderFullScreen.h"
#include "RenderTextControl.h"
#include "RenderView.h"
#include "ScopedEventQueue.h"
#include "SelectorNodeList.h"
......@@ -2460,7 +2462,12 @@ static void traverseTreeAndMark(const String& baseIndent, const Node* rootNode,
fprintf(stderr, "%s", indent.utf8().data());
node->showNode();
if (ContainerNode* shadow = shadowRoot(const_cast<Node*>(node))) {
ContainerNode* shadow = shadowRoot(const_cast<Node*>(node));
if (!shadow && node->renderer() && node->renderer()->isTextControl())
shadow = static_cast<RenderTextControl*>(node->renderer())->innerTextElement();
if (shadow) {
indent += "\t";
traverseTreeAndMark(indent, shadow, markedNode1, markedLabel1, markedNode2, markedLabel2);
}
......
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