Add test function to get placeholder string
Created attachment 138246 [details] Cooked on EWS
Comment on attachment 138246 [details] Cooked on EWS Attachment 138246 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/12469509
Comment on attachment 138246 [details] Cooked on EWS Attachment 138246 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/12476465
Comment on attachment 138246 [details] Cooked on EWS Attachment 138246 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/12476468
Created attachment 138282 [details] Patch
Comment on attachment 138282 [details] Patch Attachment 138282 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/12482698
Created attachment 138283 [details] Patch 2 GTK fix?
Comment on attachment 138283 [details] Patch 2 Attachment 138283 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/12477683
Created attachment 138284 [details] Patch 3 Attempt to fix Windows build
Comment on attachment 138284 [details] Patch 3 View in context: https://bugs.webkit.org/attachment.cgi?id=138284&action=review > Source/WebCore/testing/Internals.cpp:397 > + if (!element->hasTagName(inputTag) && !element->hasTagName(textareaTag)) > + return String(); > + HTMLTextFormControlElement* textControl = toTextFormControl(element); toTextFormControl returns 0 when it's not a text from control element. So you can just do: if (!textControl || !textControl->placeholderShouldBeVisible()) return String(); > LayoutTests/fast/forms/placeholder-stripped-expected.txt:9 > +PASS internals.visiblePlaceholder(input0) is "first line second line" > +PASS internals.visiblePlaceholder(input1) is "" > +PASS internals.visiblePlaceholder(textarea0) is "first line second line" > +PASS internals.visiblePlaceholder(textarea1) is "" Should we explicitly test a case when we the place holder is invisible?
(In reply to comment #10) > toTextFormControl returns 0 when it's not a text from control element. So you can just do: > if (!textControl || !textControl->placeholderShouldBeVisible()) > return String(); You're right. I'll update the code and land it by CQ. > > > LayoutTests/fast/forms/placeholder-stripped-expected.txt:9 > > +PASS internals.visiblePlaceholder(input0) is "first line second line" > > +PASS internals.visiblePlaceholder(input1) is "" > > +PASS internals.visiblePlaceholder(textarea0) is "first line second line" > > +PASS internals.visiblePlaceholder(textarea1) is "" > > Should we explicitly test a case when we the place holder is invisible? The original test doesn't have intention to test it.
Created attachment 138292 [details] Patch for landing
Comment on attachment 138292 [details] Patch for landing Clearing flags on attachment: 138292 Committed r114877: <http://trac.webkit.org/changeset/114877>
All reviewed patches have been landed. Closing bug.