Commit 39af8b67 authored by leviw@chromium.org's avatar leviw@chromium.org

2011-03-16 Levi Weintraub <leviw@chromium.org>

        Reviewed by Ryosuke Niwa.

        REGRESSION (r81165): Assert running editing/style/iframe-onload-crash.html with non-Mac editing behavior
        https://bugs.webkit.org/show_bug.cgi?id=56407

        Creating three versions of the iframe-onload-crash test to cover all editing behaviors.

        * editing/style/iframe-onload-crash-expected-mac.txt: Copied from LayoutTests/editing/style/iframe-onload-crash-expected.txt.
        * editing/style/iframe-onload-crash-expected-unix.txt: Copied from LayoutTests/editing/style/iframe-onload-crash-expected.txt.
        * editing/style/iframe-onload-crash-expected-win.txt: Copied from LayoutTests/editing/style/iframe-onload-crash-expected.txt.
        * editing/style/iframe-onload-crash-expected.txt: Removed.
        * editing/style/iframe-onload-crash-mac.html: Copied from LayoutTests/editing/style/iframe-onload-crash.html.
        * editing/style/iframe-onload-crash-unix.html: Copied from LayoutTests/editing/style/iframe-onload-crash.html.
        * editing/style/iframe-onload-crash-win.html: Copied from LayoutTests/editing/style/iframe-onload-crash.html.
        * editing/style/iframe-onload-crash.html: Removed.
        * platform/chromium/test_expectations.txt:
        * platform/gtk/Skipped:
        * platform/win/Skipped:
2011-03-15  Levi Weintraub  <leviw@chromium.org>

        Reviewed by Ryosuke Niwa.

        REGRESSION (r81165): Assert running editing/style/iframe-onload-crash.html with non-Mac editing behavior
        https://bugs.webkit.org/show_bug.cgi?id=56407

        Fixing the creation of incorrect ranges from TextIterator due to passing node/offset pairs that
        weren't parent-anchored. Also changing canHaveChildrenForEditing to properly handle nodes that
        have had children appended to them that editing wouldn't normally allow.

        Tests: editing/style/iframe-onload-crash-mac.html
               editing/style/iframe-onload-crash-unix.html
               editing/style/iframe-onload-crash-win.html

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::rangeFromLocationAndLength): Passing parent-anchored values to range.
        * editing/htmlediting.cpp:
        (WebCore::canHaveChildrenForEditing): Adding a condition that the nodes don't already have children
        for hr and datagrid, as you can append any node to another using javascript.


git-svn-id: svn://svn.chromium.org/blink/trunk@81266 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c48844fa
2011-03-16 Levi Weintraub <leviw@chromium.org>
Reviewed by Ryosuke Niwa.
REGRESSION (r81165): Assert running editing/style/iframe-onload-crash.html with non-Mac editing behavior
https://bugs.webkit.org/show_bug.cgi?id=56407
Creating three versions of the iframe-onload-crash test to cover all editing behaviors.
* editing/style/iframe-onload-crash-expected-mac.txt: Copied from LayoutTests/editing/style/iframe-onload-crash-expected.txt.
* editing/style/iframe-onload-crash-expected-unix.txt: Copied from LayoutTests/editing/style/iframe-onload-crash-expected.txt.
* editing/style/iframe-onload-crash-expected-win.txt: Copied from LayoutTests/editing/style/iframe-onload-crash-expected.txt.
* editing/style/iframe-onload-crash-expected.txt: Removed.
* editing/style/iframe-onload-crash-mac.html: Copied from LayoutTests/editing/style/iframe-onload-crash.html.
* editing/style/iframe-onload-crash-unix.html: Copied from LayoutTests/editing/style/iframe-onload-crash.html.
* editing/style/iframe-onload-crash-win.html: Copied from LayoutTests/editing/style/iframe-onload-crash.html.
* editing/style/iframe-onload-crash.html: Removed.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/win/Skipped:
2011-03-16 Sam Weinig <sam@webkit.org>
Skip test fast/forms/input-autofilled.html in mac-wk2 since
<meta><input><h6><nobr></nobr><datagrid><ins><button><em><iframe onload="
if (window.layoutTestController)
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setEditingBehavior('mac');
}
document.designMode='on';
document.execCommand('selectall');
......
<meta><input><h6><nobr></nobr><datagrid><ins><button><em><iframe onload="
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setEditingBehavior('unix');
}
document.designMode='on';
document.execCommand('selectall');
document.execCommand('italic');
document.execCommand('RemoveFormat');
document.execCommand('inserthtml', false);
document.body.innerHTML='PASS';">x
<meta><input><h6><nobr></nobr><datagrid><ins><button><em><iframe onload="
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setEditingBehavior('win');
}
document.designMode='on';
document.execCommand('selectall');
document.execCommand('italic');
document.execCommand('RemoveFormat');
document.execCommand('inserthtml', false);
document.body.innerHTML='PASS';">x
......@@ -3326,7 +3326,6 @@ BUG_LOISLO MAC DEBUG : fast/text/font-size-zero.html = TEXT
// Failure from WebKit r81104
BUGCR76159 MAC LINUX : http/tests/media/video-play-stall-before-meta-data.html = TEXT
BUGWK56407 LINUX WIN : editing/style/iframe-onload-crash.html = CRASH
BUGCR76253 : plugins/npruntime/np-deallocate-called-before-np-shutdown.html = CRASH
// Some transition tests are flakey since r79985
......
......@@ -178,9 +178,6 @@ fast/workers/storage/use-same-database-in-page-and-workers.html
fast/profiler/dead-time.html
fast/profiler/stop-profiling-after-setTimeout.html
# https://bugs.webkit.org/show_bug.cgi?id=56407
editing/style/iframe-onload-crash.html
###############################################################################
# EXPECTED FAILURES
###############################################################################
......
......@@ -411,9 +411,6 @@ media/video-controls-in-media-document.html
# Sometimes fails http://webkit.org/b/55329
fast/events/pageshow-pagehide-on-back-cached.html
# Assertion failure http://webkit.org/b/56407
editing/style/iframe-onload-crash.html
################################################################################
####################### No bugs filed about the below yet#######################
################################################################################
......
2011-03-15 Levi Weintraub <leviw@chromium.org>
Reviewed by Ryosuke Niwa.
REGRESSION (r81165): Assert running editing/style/iframe-onload-crash.html with non-Mac editing behavior
https://bugs.webkit.org/show_bug.cgi?id=56407
Fixing the creation of incorrect ranges from TextIterator due to passing node/offset pairs that
weren't parent-anchored. Also changing canHaveChildrenForEditing to properly handle nodes that
have had children appended to them that editing wouldn't normally allow.
Tests: editing/style/iframe-onload-crash-mac.html
editing/style/iframe-onload-crash-unix.html
editing/style/iframe-onload-crash-win.html
* editing/TextIterator.cpp:
(WebCore::TextIterator::rangeFromLocationAndLength): Passing parent-anchored values to range.
* editing/htmlediting.cpp:
(WebCore::canHaveChildrenForEditing): Adding a condition that the nodes don't already have children
for hr and datagrid, as you can append any node to another using javascript.
2011-03-16 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman.
......
......@@ -2320,7 +2320,7 @@ PassRefPtr<Range> TextIterator::rangeFromLocationAndLength(Element* scope, int r
Position runEnd = VisiblePosition(runStart).next().deepEquivalent();
if (runEnd.isNotNull()) {
ExceptionCode ec = 0;
textRunRange->setEnd(runEnd.deprecatedNode(), runEnd.deprecatedEditingOffset(), ec);
textRunRange->setEnd(runEnd.containerNode(), runEnd.computeOffsetInContainerNode(), ec);
ASSERT(!ec);
}
}
......
......@@ -73,22 +73,21 @@ bool editingIgnoresContent(const Node* node)
bool canHaveChildrenForEditing(const Node* node)
{
return !node->hasTagName(hrTag) &&
!node->hasTagName(brTag) &&
!node->hasTagName(imgTag) &&
!node->hasTagName(buttonTag) &&
!node->hasTagName(inputTag) &&
!node->hasTagName(textareaTag) &&
!node->hasTagName(objectTag) &&
!node->hasTagName(iframeTag) &&
!node->hasTagName(embedTag) &&
!node->hasTagName(appletTag) &&
!node->hasTagName(selectTag) &&
!node->hasTagName(datagridTag) &&
return !node->isTextNode()
&& !node->hasTagName(brTag)
&& !node->hasTagName(imgTag)
&& !node->hasTagName(buttonTag)
&& !node->hasTagName(inputTag)
&& !node->hasTagName(textareaTag)
&& !node->hasTagName(objectTag)
&& !node->hasTagName(iframeTag)
&& !node->hasTagName(embedTag)
&& !node->hasTagName(appletTag)
&& !node->hasTagName(selectTag)
#if ENABLE(WML)
!node->hasTagName(WMLNames::doTag) &&
&& !node->hasTagName(WMLNames::doTag)
#endif
!node->isTextNode();
&& ((!node->hasTagName(hrTag) && !node->hasTagName(datagridTag)) || node->hasChildNodes());
}
// Compare two positions, taking into account the possibility that one or both
......
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