WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
64253
Implement text field placeholders using shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=64253
Summary
Implement text field placeholders using shadow DOM
Kent Tamura
Reported
2011-07-11 00:26:22 PDT
In order to fix multiple placeholder regressions, adds new shadow elements (and text nodes) representing placeholders.
Attachments
WIP
(129.53 KB, patch)
2011-07-11 02:47 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch
(351.09 KB, patch)
2011-07-12 02:50 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch 2
(351.09 KB, patch)
2011-07-12 03:00 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-01
(1.41 MB, application/zip)
2011-07-12 03:46 PDT
,
WebKit Review Bot
no flags
Details
Patch 3
(387.33 KB, patch)
2011-07-12 03:54 PDT
,
Kent Tamura
dglazkov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2011-07-11 02:47:23 PDT
Created
attachment 100258
[details]
WIP
Kent Tamura
Comment 2
2011-07-11 02:49:48 PDT
(In reply to
comment #1
)
> Created an attachment (id=100258) [details] > WIP
The patch still has a problem: If a placeholder box for a textarea is higher than the textarea, a horizontal scrollbar is shown.
Dimitri Glazkov (Google)
Comment 3
2011-07-11 10:28:25 PDT
I tweaked the title a bit, sorry :)
Dimitri Glazkov (Google)
Comment 4
2011-07-11 10:30:14 PDT
Comment on
attachment 100258
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=100258&action=review
Looking forward to the final patch!
> Source/WebCore/rendering/RenderTextControl.cpp:143 > + if (RenderStyle* pseudoStyle = getCachedPseudoStyle(INPUT_PLACEHOLDER)) > + style = RenderStyle::clone(pseudoStyle); > + else { > + style = RenderStyle::create(); > + style->inheritFrom(startStyle); > + } > + style->setTextSecurity(TSNONE); > + style->setPosition(RelativePosition); > + style->setDisplay(BLOCK); > + style->setVisibility(m_placeholderVisible ? VISIBLE : HIDDEN); > + style->setPointerEvents(PE_NONE); > + return style.release();
Should use shadowPseudoId here.
Kent Tamura
Comment 5
2011-07-12 02:50:14 PDT
Created
attachment 100457
[details]
Patch
WebKit Review Bot
Comment 6
2011-07-12 02:52:58 PDT
Attachment 100457
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 ERROR: FAILURES FOR <, x86, release, cpu> ERROR: Line:6 Path does not exist. fast/form/textarea-placeholder-wrapping.html LayoutTests/platform/gtk/test_expectations.txt:6: Path does not exist. fast/form/textarea-placeholder-wrapping.html [test/expectations] [2] ERROR: FAILURES FOR <, x86, release, cpu> ERROR: Line:6 Path does not exist. fast/form/textarea-placeholder-wrapping.html LayoutTests/platform/qt/test_expectations.txt:6: Path does not exist. fast/form/textarea-placeholder-wrapping.html [test/expectations] [2] ERROR: FAILURES FOR <lucid, x86_64, release, cpu> ERROR: Line:3788 Path does not exist. fast/form/textarea-placeholder-wrapping.html LayoutTests/platform/chromium/test_expectations.txt:3788: Path does not exist. fast/form/textarea-placeholder-wrapping.html [test/expectations] [2] Total errors found: 3 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kent Tamura
Comment 7
2011-07-12 03:00:39 PDT
Created
attachment 100459
[details]
Patch 2 Fix text_expectations.txt
WebKit Review Bot
Comment 8
2011-07-12 03:46:35 PDT
Comment on
attachment 100459
[details]
Patch 2
Attachment 100459
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/9016115
New failing tests: http/tests/misc/slow-loading-mask.html fast/blockflow/japanese-rl-selection.html svg/transforms/text-with-mask-with-svg-transform.svg fast/backgrounds/background-leakage.html fast/box-shadow/scaled-box-shadow.html fast/backgrounds/repeat/negative-offset-repeat.html fast/css/pseudo-cache-stale.html svg/W3C-SVG-1.1/struct-use-01-t.svg transforms/2d/hindi-rotated.html svg/repaint/filter-repaint.svg fast/blockflow/japanese-lr-selection.html
WebKit Review Bot
Comment 9
2011-07-12 03:46:39 PDT
Created
attachment 100460
[details]
Archive of layout-test-results from ec2-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-01 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Kent Tamura
Comment 10
2011-07-12 03:54:16 PDT
Created
attachment 100463
[details]
Patch 3 Update for fast/css/pseudo-cache-stale.html
Dominic Cooney
Comment 11
2011-07-12 04:35:47 PDT
Comment on
attachment 100463
[details]
Patch 3 View in context:
https://bugs.webkit.org/attachment.cgi?id=100463&action=review
This is very cool. The placeholder text in the last textbox in each group in the input-placeholder-text-indent has moved significantly… is that expected? Why do the pixel results for isindex-placeholder and password-placeholder-text-security need to be updated? Eyeballing them they are the same.
> LayoutTests/fast/forms/placeholder-position.html:16 > +<input style="line-height:25px" value="Value">
For consistency with above maybe: - put a space after : - end with a semicolon - quote the placeholder attribute - put the placeholder attribute before the inline style Below too.
Kent Tamura
Comment 12
2011-07-12 06:55:00 PDT
(In reply to
comment #11
)
> The placeholder text in the last textbox in each group in the input-placeholder-text-indent has moved significantly… is that expected?
It's expected. The placeholders with this patch correctly respect text-indent:50%.
> Why do the pixel results for isindex-placeholder and password-placeholder-text-security need to be updated? Eyeballing them they are the same.
The difference is that the bottom 1px line of a placeholder is not drawn in the updated images. It's because the current placeholder rendering doesn't clip characters by the content-box and the patched placeholder rendering does.
Dimitri Glazkov (Google)
Comment 13
2011-07-12 08:54:14 PDT
Comment on
attachment 100463
[details]
Patch 3 View in context:
https://bugs.webkit.org/attachment.cgi?id=100463&action=review
> Source/WebCore/rendering/RenderTextControlMultiLine.h:52 > + virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren);
Whoa, this is crazy stuff. I didn't realize this mechanism existed.
Kent Tamura
Comment 14
2011-07-13 19:17:09 PDT
Committed
r90971
: <
http://trac.webkit.org/changeset/90971
>
Alexey Proskuryakov
Comment 15
2012-05-22 12:07:25 PDT
This has caused
bug 87155
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug