FeatureObserver: Input types are counted unexpectedly in a page with Modernizr
https://bugs.webkit.org/show_bug.cgi?id=108141

Reviewed by Kentaro Hara.

We don't want to record input type instantiation by Modernizr. Modernizr
creates input elements with these types, append it to document.body, and
render it with visibility:hidden. So, we record input types only when
they are attached without visibility:hidden.

No new tests. FeatureObserver is not testable by layout test.

* html/InputType.cpp:
(WebCore::InputType::create): Remove FeatureObserver::observe
callsites. They are moved to TextInputType::attach.
(WebCore::InputType::observeFeatureIfVisible):
Added. A helper for attach().
* html/InputType.h:
(InputType): Add observeFeatureIfVisible.

* html/ColorInputType.cpp:
(WebCore::ColorInputType::create):
Remove a FeatureObserver::observe callsite.
(WebCore::ColorInputType::attach):
Calls FetureObserver through InputType::observeFeatureIfVisible.
* html/ColorInputType.h:
(ColorInputType): Declare attach.
* html/DateInputType.cpp: Ditto.
* html/DateInputType.h: Ditto.
* html/DateTimeInputType.cpp: Ditto.
* html/DateTimeInputType.h: Ditto.
* html/DateTimeLocalInputType.cpp: Ditto.
* html/DateTimeLocalInputType.h: Ditto.
* html/MonthInputType.cpp: Ditto.
* html/MonthInputType.h: Ditto.
* html/RangeInputType.cpp: Ditt
* html/RangeInputType.h: Ditto.
* html/TimeInputType.cpp: Ditto.
* html/TimeInputType.h: Ditto.
* html/WeekInputType.cpp: Ditto.
* html/WeekInputType.h: Ditto.

* html/TextFieldInputType.h:
(TextFieldInputType):
Make attach protected in order that sub classes can call it.
* html/EmailInputType.cpp:
(WebCore::EmailInputType::create):
Remove a FeatureObserver::observe callsite.
(WebCore::EmailInputType::attach): Calls FetureObserver through
InputType::observeFeatureIfVisible after TextFieldInptuType::attach.
* html/EmailInputType.h:
(EmailInputType):Declare attach.
* html/NumberInputType.cpp: Ditto.
* html/NumberInputType.h: Ditto.
* html/SearchInputType.cpp: Ditto.
* html/SearchInputType.h: Ditto.
* html/TelephoneInputType.cpp: Ditto.
* html/TelephoneInputType.h: Ditto.
* html/URLInputType.cpp: Ditto.
* html/URLInputType.h: Ditto.

* html/TextInputType.cpp:
(WebCore::TextInputType::attach):
Move the code for type fallback from InputType::create.
* html/TextInputType.h:
(TextInputType): Declare attach.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r140959 and r140977.
http://trac.webkit.org/changeset/140959
http://trac.webkit.org/changeset/140977
https://bugs.webkit.org/show_bug.cgi?id=108171

Reverting rebaseline because after r141067 the expected
results should be the old values. (Requested by kadam on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-29

* platform/qt-5.0-wk1/compositing/absolute-inside-out-of-view-fixed-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/backing/no-backing-for-clip-overlap-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/bounds-in-flipped-writing-mode-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/clip-child-by-non-stacking-ancestor-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-clipped-composited-child-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-clipped-composited-child-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-ignores-hidden-dynamic-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-ignores-hidden-dynamic-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/bounds-ignores-hidden-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/clip-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/clip-inside-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/composited-in-columns-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/geometry/composited-in-columns-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/flipped-writing-mode-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/geometry/flipped-writing-mode-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/foreground-layer-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/geometry/foreground-layer-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/geometry/preserve-3d-switching-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/become-composited-nested-iframes-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/become-overlapped-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/composited-parent-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/connect-compositing-iframe-delayed-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/connect-compositing-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/connect-compositing-iframe2-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/connect-compositing-iframe3-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/enter-compositing-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/iframe-resize-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/overlapped-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/overlapped-iframe-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/overlapped-nested-iframes-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/iframes/scrolling-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/images/clip-on-directly-composited-image-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/animation-overlap-with-children-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/fixed-position-out-of-view-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/fixed-position-under-transform-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/fixed-position-under-transform-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/no-compositing-for-fixed-position-under-transform-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overflow-scroll-overlap-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-animation-clipping-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-animation-container-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-child-layer-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-child-layer-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-transformed-layer-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-transformed-layer-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/rotate3d-overlap-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/stacking-context-overlap-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/layer-creation/stacking-context-overlap-nested-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/masks/mask-layer-size-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/repaint/resize-repaint-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-absolute-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-absolute-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-fixed-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-fixed-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-relative-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-relative-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/tiling/backface-preserve-3d-tiled-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/tiling/backface-preserve-3d-tiled-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/tiling/huge-layer-img-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/tiling/huge-layer-img-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/tiling/rotated-tiled-clamped-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/tiling/rotated-tiled-clamped-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/tiling/tiled-layer-resize-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/visibility/layer-visible-content-expected.png: Removed.
* platform/qt-5.0-wk1/compositing/visibility/layer-visible-content-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/visibility/visibility-image-layers-dynamic-expected.txt: Removed.
* platform/qt-5.0-wk1/css3/filters/composited-during-transition-layertree-expected.txt: Removed.
* platform/qt-5.0-wk1/css3/filters/filtered-compositing-descendant-expected.png: Removed.
* platform/qt-5.0-wk1/css3/filters/filtered-compositing-descendant-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141087 268f45cc-cd09-0410-ab3c-d52691b4dbfc