WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch for landing
bug-92200-20120801152943.patch (text/plain), 9.83 KB, created by
Shinya Kawanaka
on 2012-07-31 23:30:01 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Shinya Kawanaka
Created:
2012-07-31 23:30:01 PDT
Size:
9.83 KB
patch
obsolete
>Subversion Revision: 124280 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 952f7fdc3d98108ba93a9fea836a4531f2dc45ec..abbc9ec7f4de32c39cf2802ca7b2ff1154e0cc19 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,34 @@ >+2012-07-31 Shinya Kawanaka <shinyak@chromium.org> >+ >+ The elements in Shadow DOM of input should not be modifiable. >+ https://bugs.webkit.org/show_bug.cgi?id=92200 >+ >+ Reviewed by Kent Tamura. >+ >+ Since we don't have "-webkit-user-modify: read-only !important;" for the elements in Shadow DOM of >+ input element, user can change them and it causes a crash. >+ >+ We should have "-webkit-user-modify: read-only !important;" for those elements. >+ >+ Test: fast/forms/input-user-modify.html >+ >+ * css/html.css: >+ (input::-webkit-textfield-decoration-container): >+ (input[type="search"]::-webkit-search-cancel-button): >+ (input[type="search"]::-webkit-search-decoration): >+ (input[type="search"]::-webkit-search-results-decoration): >+ (input[type="search"]::-webkit-search-results-button): >+ (input::-webkit-inner-spin-button): >+ (input::-webkit-input-speech-button): >+ (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder): >+ (input[type="file"]::-webkit-file-upload-button): >+ (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): >+ (input[type="range"]::-webkit-slider-runnable-track): >+ (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb): >+ (input[type="color"]::-webkit-color-swatch-wrapper): >+ (input[type="color"]::-webkit-color-swatch): >+ (input::-webkit-calendar-picker-indicator): >+ > 2012-07-31 Tony Chang <tony@chromium.org> > > flexbox should avoid floats >diff --git a/Source/WebCore/css/html.css b/Source/WebCore/css/html.css >index e5ad78cff1e51d31a2aa5992b24a95ac4584b97b..cce4671798bf7f014ff14c0fa13c8a6b2dd7cb24 100644 >--- a/Source/WebCore/css/html.css >+++ b/Source/WebCore/css/html.css >@@ -435,6 +435,7 @@ input[type="search"] { > input::-webkit-textfield-decoration-container { > display: -webkit-box; > -webkit-box-align: center; >+ -webkit-user-modify: read-only !important; > } > > input[type="search"]::-webkit-textfield-decoration-container { >@@ -445,24 +446,28 @@ input[type="search"]::-webkit-search-cancel-button { > -webkit-appearance: searchfield-cancel-button; > display: block; > -webkit-box-flex: 0; >+ -webkit-user-modify: read-only !important; > } > > input[type="search"]::-webkit-search-decoration { > -webkit-appearance: searchfield-decoration; > display: block; > -webkit-box-flex: 0; >+ -webkit-user-modify: read-only !important; > } > > input[type="search"]::-webkit-search-results-decoration { > -webkit-appearance: searchfield-results-decoration; > display: block; > -webkit-box-flex: 0; >+ -webkit-user-modify: read-only !important; > } > > input[type="search"]::-webkit-search-results-button { > -webkit-appearance: searchfield-results-button; > display: block; > -webkit-box-flex: 0; >+ -webkit-user-modify: read-only !important; > } > > #if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT >@@ -479,6 +484,7 @@ input::-webkit-inner-spin-button { > vertical-align: top; > -webkit-box-flex: 0; > -webkit-user-select: none; >+ -webkit-user-modify: read-only !important; > } > > #if defined(ENABLE_INPUT_SPEECH) && ENABLE_INPUT_SPEECH >@@ -487,6 +493,7 @@ input::-webkit-input-speech-button { > display: block; > vertical-align: top; > -webkit-box-flex: 0; >+ -webkit-user-modify: read-only !important; > } > #endif > >@@ -523,6 +530,7 @@ input::-webkit-input-placeholder, isindex::-webkit-input-placeholder { > white-space: pre; > word-wrap: normal; > overflow: hidden; >+ -webkit-user-modify: read-only !important; > } > > input[type="password"] { >@@ -562,6 +570,7 @@ input[type="button"], input[type="submit"], input[type="reset"] { > > input[type="file"]::-webkit-file-upload-button { > -webkit-appearance: push-button; >+ -webkit-user-modify: read-only !important; > white-space: nowrap; > margin: 0; > font-size: inherit; >@@ -590,6 +599,7 @@ input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-medi > -webkit-box-align: center; > -webkit-box-orient: horizontal; /* This property is updated by C++ code. */ > -webkit-box-sizing: border-box; >+ -webkit-user-modify: read-only !important; > display: -webkit-box; > height: 100%; > width: 100%; >@@ -598,12 +608,14 @@ input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-medi > input[type="range"]::-webkit-slider-runnable-track { > -webkit-box-flex: 1; > -webkit-box-sizing: border-box; >+ -webkit-user-modify: read-only !important; > display: block; > } > > input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb { > -webkit-appearance: sliderthumb-horizontal; > -webkit-box-sizing: border-box; >+ -webkit-user-modify: read-only !important; > display: block; > position: relative; > } >@@ -648,6 +660,7 @@ input[type="color"]::-webkit-color-swatch-wrapper { > display:-webkit-box; > padding: 4px 2px; > -webkit-box-sizing: border-box; >+ -webkit-user-modify: read-only !important; > width: 100%; > height: 100% > } >@@ -656,6 +669,7 @@ input[type="color"]::-webkit-color-swatch { > background-color: #000000; > border: 1px solid #777777; > -webkit-box-flex: 1; >+ -webkit-user-modify: read-only !important; > } > > #if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT >@@ -684,6 +698,7 @@ input::-webkit-calendar-picker-indicator { > width: 0.66em; > height: 0.66em; > padding: 0.17em 0.34em; >+ -webkit-user-modify: read-only !important; > } > > input::-webkit-calendar-picker-indicator:hover { >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f86794c7568b4845cbae1288f6fa9ce11a6c8a73..a8d1262d31a091bc3774e796c5dfaa4f8d4c7694 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2012-07-31 Shinya Kawanaka <shinyak@chromium.org> >+ >+ The elements in Shadow DOM of input should not be modifiable. >+ https://bugs.webkit.org/show_bug.cgi?id=92200 >+ >+ Reviewed by Kent Tamura. >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * fast/forms/input-user-modify-expected.txt: Added. >+ * fast/forms/input-user-modify.html: Added. >+ > 2012-07-31 Tony Chang <tony@chromium.org> > > flexbox should avoid floats >diff --git a/LayoutTests/fast/forms/input-user-modify-expected.txt b/LayoutTests/fast/forms/input-user-modify-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..767b2ed26c32a93b8366e1c1e68a801a840094a3 >--- /dev/null >+++ b/LayoutTests/fast/forms/input-user-modify-expected.txt >@@ -0,0 +1,3 @@ >+The inner element of input should not be modifiable. Trying to delete the inner element of input should not cause a crash. >+ >+PASS >diff --git a/LayoutTests/fast/forms/input-user-modify.html b/LayoutTests/fast/forms/input-user-modify.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9c0e23e059407778a64b1bccc2744d7641b4c3af >--- /dev/null >+++ b/LayoutTests/fast/forms/input-user-modify.html >@@ -0,0 +1,82 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<style> >+input::-webkit-textfield-decoration-container, >+input[type="search"]::-webkit-textfield-decoration-container, >+input[type="search"]::-webkit-search-cancel-button, >+input[type="search"]::-webkit-search-decoration, >+input[type="search"]::-webkit-search-results-decoration, >+input[type="search"]::-webkit-search-results-button, >+::-webkit-input-speech-button, >+::-webkit-input-placeholder, >+input::-webkit-input-placeholder, >+isindex::-webkit-input-placeholder, >+input[type="button"], input[type="submit"], input[type="reset"], >+input[type="file"]::-webkit-file-upload-button, >+button, >+input[type="range"]::-webkit-slider-container, >+input[type="range"]::-webkit-media-slider-container, >+input[type="range"]::-webkit-slider-runnable-track, >+input[type="range"]::-webkit-slider-thumb, >+input[type="range"]::-webkit-color-swatch-wrapper, >+input[type="range"]::-webkit-color-swatch, >+input::-webkit-calendar-picker-indicator { >+ -webkit-user-modify: read-write; >+} >+</style> >+</head> >+<body> >+ >+<p>The inner element of input should not be modifiable. >+ Trying to delete the inner element of input should not cause a crash.</p> >+ >+<div id="container"> >+ <input id="search" type="search"> >+ <input id="file" type="file"> >+ <input id="range" type="range"> >+ <input id="color" type="color"> >+ <input id="number" type="number"> >+ <input id="placeholder" type="text" placeholder="something"> >+ <input id="speech" type="text" x-webkit-speech> >+ <button id="button">something</button> >+ <input id="date" type="date"> >+ <video id="video" controls> >+ <audio id="audio" controls> >+</div> >+ >+<script> >+if (window.testRunner) >+ testRunner.dumpAsText(); >+ >+function focusAndType(id, key) >+{ >+ if (!window.eventSenver) >+ return; >+ >+ var target = document.getElementById(id); >+ eventSender.mouseMoveTo(target.offsetLeft + 2, target.offsetTop + 2); >+ eventSender.mouseDown(); >+ eventSender.mouseUp(); >+ eventSender.keyDown(key); >+} >+ >+var container = document.getElementById("container"); >+ >+focusAndType("search", "delete"); >+focusAndType("file", "delete"); >+focusAndType("range", "delete"); >+focusAndType("color", "delete"); >+focusAndType("number", "delete"); >+focusAndType("placeholder", "delete"); >+focusAndType("speech", "delete"); >+focusAndType("button", "delete"); >+focusAndType("date", "delete"); >+focusAndType("video", "delete"); >+focusAndType("audio", "delete"); >+ >+if (window.testRunner) >+ container.innerHTML = "PASS"; >+</script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 92200
:
154264
|
154520
|
155433
|
155437
|
155728
|
155967