OSDN Git Service

Merge WebKit at r72805: Use Node::parent() rather than Node::parentNode()
authorSteve Block <steveblock@google.com>
Wed, 5 Jan 2011 12:37:24 +0000 (12:37 +0000)
committerSteve Block <steveblock@google.com>
Thu, 6 Jan 2011 14:20:54 +0000 (14:20 +0000)
This is a revert of
"Merge WebKit at r73109: use parentNode method."

See http://trac.webkit.org/changeset/72825

This reverts commit 23aa22bb0c8bf0d91c99d21c5dca4c64a4825a87.

Note that this is a backwards merge from Chromium release 9.0.600.0
to 9.0.597.0, to align with the Chromium 9 stable release branch.

Change-Id: I5ba4d0976c3b87b32326fdc8e2eb1cffdd7541cf

WebCore/rendering/RenderBlockLineLayout.cpp
WebKit/android/jni/WebViewCore.cpp
WebKit/android/nav/CacheBuilder.cpp

index 3c1ab60..878d1ab 100644 (file)
@@ -655,8 +655,8 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintLogica
                         // be a tab. Pick 25 for now as it covers around 160px
                         // (half of 320px) with the default font.
                         if (length > 25 || (length > 3 &&
-                                (!node->parentNode()->hasTagName(HTMLNames::aTag) &&
-                                !node->parentNode()->hasTagName(HTMLNames::liTag))))
+                                (!node->parent()->hasTagName(HTMLNames::aTag) &&
+                                !node->parent()->hasTagName(HTMLNames::liTag))))
                             hasTextToWrap = true;
                     }
                 }
index e391148..d5d2bb8 100644 (file)
@@ -1220,7 +1220,7 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height,
                 // in the html. If it is the HitTestResult, it may have zero
                 // width and height. In this case, use its parent node.
                 if (bounds.width() == 0) {
-                    node = node->parentNode();
+                    node = node->parent();
                     if (node) {
                         bounds = node->getRect();
                         DBG_NAV_LOGD("found a zero width node and use its parent, whose ob:(x=%d,y=%d,w=%d,h=%d)",
index 61e5f46..ea436e7 100644 (file)
@@ -1171,7 +1171,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
             goto keepNode;
         }
         // Only use the root contentEditable element
-        if (node->isContentEditable() && !node->parentNode()->isContentEditable()) {
+        if (node->isContentEditable() && !node->parent()->isContentEditable()) {
             bounds = absBounds;
             takesFocus = true;
             type = CONTENT_EDITABLE_CACHEDNODETYPE;