Changeset 76145 in webkit
- Timestamp:
- Jan 19, 2011 11:31:36 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76144 r76145 1 2011-01-19 Chang Shu <chang.shu@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=52056 6 1. Fixed test cases in the above bug; 7 2. Partially fixed test cases in other contentEditable bugs; 8 3. Updated expected result for fast/dom/element-attribute-js-null.html. 9 However, the test itself should be fixed later in bug 52057. 10 11 * editing/editability/attr-invalid-string-expected.txt: 12 * editing/editability/attr-invalid-string.html: 13 * editing/editability/attr-missing-ancestor-false-expected.txt: 14 * editing/editability/attr-missing-ancestor-false.html: 15 * editing/editability/attr-missing-ancestor-true-expected.txt: 16 * editing/editability/attr-missing-ancestor-true.html: 17 * editing/editability/attr-missing-parent-ancestor-missing-expected.txt: 18 * editing/editability/attr-missing-parent-ancestor-missing.html: 19 * editing/editability/attr-missing-parent-false-expected.txt: 20 * editing/editability/attr-missing-parent-false.html: 21 * editing/editability/attr-missing-parent-true-expected.txt: 22 * editing/editability/attr-missing-parent-true.html: 23 * editing/editability/set-false-expected.txt: 24 * editing/editability/set-inherit-parent-false-expected.txt: 25 * editing/editability/set-inherit-parent-true-expected.txt: 26 * editing/editability/set-invalid-value-expected.txt: 27 * editing/editability/set-true-expected.txt: 28 * editing/editability/set-value-caseinsensitive-expected.txt: 29 * fast/dom/element-attribute-js-null-expected.txt: 30 1 31 2011-01-19 Levi Weintraub <leviw@chromium.org> 2 32 -
trunk/LayoutTests/editing/editability/attr-invalid-string-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("div").getAttribute("contentEditable") is "abc" 10 FAIL document.getElementById("div").contentEditable should be inherit. Was false. 11 FIXME: contentEditable attribute fails to take invalid value. https://bugs.webkit.org/show_bug.cgi?id=50636 10 PASS document.getElementById("div").contentEditable is "inherit" 12 11 PASS document.getElementById("div").isContentEditable is false 13 12 PASS window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") is "read-only" -
trunk/LayoutTests/editing/editability/attr-invalid-string.html
r75329 r76145 14 14 shouldBe('document.getElementById("div").getAttribute("contentEditable")','"abc"'); 15 15 shouldBe('document.getElementById("div").contentEditable', '"inherit"'); 16 debug("FIXME: contentEditable attribute fails to take invalid value. https://bugs.webkit.org/show_bug.cgi?id=50636");17 16 shouldBe('document.getElementById("div").isContentEditable', 'false'); 18 17 shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-only"'); -
trunk/LayoutTests/editing/editability/attr-missing-ancestor-false-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was false. 11 FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056 10 PASS document.getElementById("p").contentEditable is "inherit" 12 11 PASS document.getElementById("p").isContentEditable is false 13 12 PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only" -
trunk/LayoutTests/editing/editability/attr-missing-ancestor-false.html
r75329 r76145 20 20 shouldBe('document.getElementById("p").hasAttribute("contentEditable")', 'false'); 21 21 shouldBe('document.getElementById("p").contentEditable', '"inherit"'); 22 debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");23 22 shouldBe('document.getElementById("p").isContentEditable', 'false'); 24 23 shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"'); -
trunk/LayoutTests/editing/editability/attr-missing-ancestor-true-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was true. 11 FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056 10 PASS document.getElementById("p").contentEditable is "inherit" 12 11 PASS document.getElementById("p").isContentEditable is true 13 12 PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-write" -
trunk/LayoutTests/editing/editability/attr-missing-ancestor-true.html
r75329 r76145 21 21 shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false'); 22 22 shouldBe('document.getElementById("p").contentEditable', '"inherit"'); 23 debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");24 23 shouldBe('document.getElementById("p").isContentEditable', 'true'); 25 24 shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"'); -
trunk/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was false. 11 FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056 10 PASS document.getElementById("p").contentEditable is "inherit" 12 11 PASS document.getElementById("p").isContentEditable is false 13 12 PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only" -
trunk/LayoutTests/editing/editability/attr-missing-parent-ancestor-missing.html
r75329 r76145 20 20 shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false'); 21 21 shouldBe('document.getElementById("p").contentEditable', '"inherit"'); 22 debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");23 22 shouldBe('document.getElementById("p").isContentEditable', 'false'); 24 23 shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"'); -
trunk/LayoutTests/editing/editability/attr-missing-parent-false-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was false. 11 FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056 10 PASS document.getElementById("p").contentEditable is "inherit" 12 11 PASS document.getElementById("p").isContentEditable is false 13 12 PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-only" -
trunk/LayoutTests/editing/editability/attr-missing-parent-false.html
r75329 r76145 16 16 shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false'); 17 17 shouldBe('document.getElementById("p").contentEditable', '"inherit"'); 18 debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");19 18 shouldBe('document.getElementById("p").isContentEditable', 'false'); 20 19 shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-only"'); -
trunk/LayoutTests/editing/editability/attr-missing-parent-true-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was true. 11 FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056 10 PASS document.getElementById("p").contentEditable is "inherit" 12 11 PASS document.getElementById("p").isContentEditable is true 13 12 PASS window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify") is "read-write" -
trunk/LayoutTests/editing/editability/attr-missing-parent-true.html
r75329 r76145 16 16 shouldBe('document.getElementById("p").hasAttribute("contentEditable")','false'); 17 17 shouldBe('document.getElementById("p").contentEditable', '"inherit"'); 18 debug("FIXME: contentEditable attribute should be inherit if missing. https://bugs.webkit.org/show_bug.cgi?id=52056");19 18 shouldBe('document.getElementById("p").isContentEditable', 'true'); 20 19 shouldBe('window.getComputedStyle(p, "").getPropertyValue("-webkit-user-modify")', '"read-write"'); -
trunk/LayoutTests/editing/editability/set-false-expected.txt
r75329 r76145 9 9 10 10 PASS document.getElementById("div1").getAttribute("contentEditable") is "false" 11 FAIL document.getElementById("div1").contentEditable should be false. Was true. 11 PASS document.getElementById("div1").contentEditable is "false" 12 12 FAIL document.getElementById("div1").isContentEditable should be false. Was true. 13 13 FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058 -
trunk/LayoutTests/editing/editability/set-inherit-parent-false-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was true. 10 PASS document.getElementById("p").contentEditable is "inherit" 11 11 FAIL document.getElementById("p").isContentEditable should be false. Was true. 12 12 FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058 -
trunk/LayoutTests/editing/editability/set-inherit-parent-true-expected.txt
r75329 r76145 8 8 9 9 PASS document.getElementById("p").hasAttribute("contentEditable") is false 10 FAIL document.getElementById("p").contentEditable should be inherit. Was false. 10 PASS document.getElementById("p").contentEditable is "inherit" 11 11 FAIL document.getElementById("p").isContentEditable should be true. Was false. 12 12 FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058 -
trunk/LayoutTests/editing/editability/set-invalid-value-expected.txt
r75329 r76145 10 10 FIXME: setContentEditable with invalid string should throw exception. https://bugs.webkit.org/show_bug.cgi?id=52057 11 11 PASS document.getElementById("div").getAttribute("contentEditable") is "abc" 12 PASS document.getElementById("div").contentEditable is "true" 12 FAIL document.getElementById("div").contentEditable should be true. Was inherit. 13 13 PASS document.getElementById("div").isContentEditable is true 14 14 FAIL window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") should be read-write. Was read-only. -
trunk/LayoutTests/editing/editability/set-true-expected.txt
r75329 r76145 9 9 10 10 PASS document.getElementById("div1").getAttribute("contentEditable") is "true" 11 FAIL document.getElementById("div1").contentEditable should be true. Was false. 11 PASS document.getElementById("div1").contentEditable is "true" 12 12 FAIL document.getElementById("div1").isContentEditable should be true. Was false. 13 13 FIXME: setContentEditable with true/false/inherit string is not working properly. https://bugs.webkit.org/show_bug.cgi?id=52058 -
trunk/LayoutTests/editing/editability/set-value-caseinsensitive-expected.txt
r75329 r76145 10 10 11 11 PASS document.getElementById("div1").getAttribute("contentEditable") is "TRue" 12 FAIL document.getElementById("div1").contentEditable should be true. Was false. 12 PASS document.getElementById("div1").contentEditable is "true" 13 13 FAIL document.getElementById("div1").isContentEditable should be true. Was false. 14 14 PASS window.getComputedStyle(div1, "").getPropertyValue("-webkit-user-modify") is "read-write" … … 18 18 PASS window.getComputedStyle(p1, "").getPropertyValue("-webkit-user-modify") is "read-only" 19 19 FAIL document.getElementById("p2").hasAttribute("contentEditable") should be false. Was true. 20 FAIL document.getElementById("p2").contentEditable should be inherit. Was false. 20 PASS document.getElementById("p2").contentEditable is "inherit" 21 21 FAIL document.getElementById("p2").isContentEditable should be true. Was false. 22 22 FAIL window.getComputedStyle(p2, "").getPropertyValue("-webkit-user-modify") should be read-write. Was read-only. -
trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt
r30635 r76145 12 12 TEST SUCCEEDED: The value was the empty string. [tested HTMLElement.innerHTML] 13 13 TEST SUCCEEDED: The value was the empty string. [tested HTMLElement.innerText] 14 TEST SUCCEEDED: The value was the string 'false'. [tested HTMLElement.contentEditable]14 TEST FAILED: The value should have been the string 'false' but was the string 'true'. [tested HTMLElement.contentEditable] 15 15 16 16 TEST SUCCEEDED: The value was the empty string. [tested HTMLAnchorElement.accessKey] -
trunk/Source/WebCore/ChangeLog
r76144 r76145 1 2011-01-19 Chang Shu <chang.shu@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 The return value of contentEditable() function should depend on the DOM attribute 6 instead of render style userModify. The code change fixed test cases in the bug 7 and partially fixed test cases in other contentEditable bugs; 8 9 https://bugs.webkit.org/show_bug.cgi?id=52056 10 11 * html/HTMLElement.cpp: 12 (WebCore::HTMLElement::contentEditable): 13 1 14 2011-01-19 Levi Weintraub <leviw@chromium.org> 2 15 -
trunk/Source/WebCore/html/HTMLElement.cpp
r76115 r76145 690 690 String HTMLElement::contentEditable() const 691 691 { 692 if (!renderer()) 693 return "false"; 694 695 switch (renderer()->style()->userModify()) { 696 case READ_WRITE: 697 return "true"; 698 case READ_ONLY: 699 return "false"; 700 case READ_WRITE_PLAINTEXT_ONLY: 701 return "plaintext-only"; 702 default: 703 return "inherit"; 704 } 692 const AtomicString& value = fastGetAttribute(contenteditableAttr); 693 694 if (value.isNull()) 695 return "inherit"; 696 if (value.isEmpty() || equalIgnoringCase(value, "true")) 697 return "true"; 698 if (equalIgnoringCase(value, "false")) 699 return "false"; 700 if (equalIgnoringCase(value, "plaintext-only")) 701 return "plaintext-only"; 702 703 return "inherit"; 705 704 } 706 705
Note: See TracChangeset
for help on using the changeset viewer.