Bug 145490

Summary: Make RangeInputType into a three-part flexible box, replacing crufty layout code
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: NEW    
Severity: Normal CC: buildbot, dino, eric.carlson, rniwa, roger_fong, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 145491    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews105 for mac-mavericks-wk2
none
Archive of layout-test-results from ews100 for mac-mavericks
none
Patch
none
Patch
darin: review+
Patch for landing
none
Patch for landing none

Jer Noble
Reported 2015-05-30 00:37:54 PDT
Make RangeInputType into a three-part flexible box, replacing crufty layout code
Attachments
Patch (41.77 KB, patch)
2015-05-30 00:45 PDT, Jer Noble
no flags
Archive of layout-test-results from ews105 for mac-mavericks-wk2 (709.55 KB, application/zip)
2015-05-30 01:23 PDT, Build Bot
no flags
Archive of layout-test-results from ews100 for mac-mavericks (677.82 KB, application/zip)
2015-05-30 01:36 PDT, Build Bot
no flags
Patch (44.47 KB, patch)
2015-06-01 09:32 PDT, Jer Noble
no flags
Patch (44.47 KB, patch)
2015-06-01 10:24 PDT, Jer Noble
darin: review+
Patch for landing (49.58 KB, patch)
2015-06-01 16:26 PDT, Jer Noble
no flags
Patch for landing (51.14 KB, patch)
2015-06-01 16:43 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2015-05-30 00:45:40 PDT
Jer Noble
Comment 2 2015-05-30 00:54:37 PDT
Will fix up the efl-wk2 error in a subsequent patch.
Build Bot
Comment 3 2015-05-30 01:23:20 PDT
Comment on attachment 253952 [details] Patch Attachment 253952 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/4720096303906816 New failing tests: fast/forms/box-shadow-override.html fast/forms/input-appearance-height.html fast/forms/range/range-change-min-max.html
Build Bot
Comment 4 2015-05-30 01:23:22 PDT
Created attachment 253954 [details] Archive of layout-test-results from ews105 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Build Bot
Comment 5 2015-05-30 01:36:35 PDT
Comment on attachment 253952 [details] Patch Attachment 253952 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5103627219763200 New failing tests: fast/forms/box-shadow-override.html fast/forms/input-appearance-height.html fast/forms/range/range-change-min-max.html
Build Bot
Comment 6 2015-05-30 01:36:37 PDT
Created attachment 253957 [details] Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Jer Noble
Comment 7 2015-06-01 09:32:39 PDT
Jer Noble
Comment 8 2015-06-01 09:33:31 PDT
Added a couple of mac-mavericks rebaselines, and fixed an issue where the tracks children weren't being marked as needing layout.
Jer Noble
Comment 9 2015-06-01 10:24:37 PDT
Darin Adler
Comment 10 2015-06-01 12:00:02 PDT
Comment on attachment 254007 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254007&action=review > Source/WebCore/html/HTMLInputElement.h:154 > HTMLElement* sliderThumbElement() const; > HTMLElement* sliderTrackElement() const; > + HTMLElement* sliderMinTrackElement() const; > + HTMLElement* sliderMaxTrackElement() const; Exposing all of these elements in public functions seems like a particularly bad way to create a relationship between type-specific renderer classes and HTMLInputElement. I see that you are participating in a grand tradition of questionable design here, but I still don’t like it. > Source/WebCore/rendering/RenderSlider.cpp:121 > + HTMLElement* sliderTrackElement = element().sliderTrackElement(); > + HTMLElement* minTrackElement = element().sliderMinTrackElement(); > + HTMLElement* maxTrackElement = element().sliderMaxTrackElement(); > + > + ASSERT(sliderTrackElement); > + ASSERT(minTrackElement); > + ASSERT(maxTrackElement); Can we get at these some other way than making them public functions on HTMLInputElement? Let me put this another way. This function clearly only needs to make style changes to these elements. So could we expose functions that return RenderStyle& instead of functions that return HTMLElement? Or we could add functions that expose the renderers. And could we make RenderSlider a friend of HTMLInputElement so these could be private functions? If we were going to keep the ones that return elements I would use a return type of HTMLElement& and have the assertion inside the function rather than at the call site.
Jer Noble
Comment 11 2015-06-01 13:38:19 PDT
(In reply to comment #10) > Comment on attachment 254007 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254007&action=review > > > Source/WebCore/html/HTMLInputElement.h:154 > > HTMLElement* sliderThumbElement() const; > > HTMLElement* sliderTrackElement() const; > > + HTMLElement* sliderMinTrackElement() const; > > + HTMLElement* sliderMaxTrackElement() const; > > Exposing all of these elements in public functions seems like a particularly > bad way to create a relationship between type-specific renderer classes and > HTMLInputElement. I see that you are participating in a grand tradition of > questionable design here, but I still don’t like it. Yes, but I'm trying to make it less questionable, so this would be in the new tradition of less questionable design. :) Another option would be to put these methods on RangeInputType, and make RangeInput downcast-able from InputType. > > Source/WebCore/rendering/RenderSlider.cpp:121 > > + HTMLElement* sliderTrackElement = element().sliderTrackElement(); > > + HTMLElement* minTrackElement = element().sliderMinTrackElement(); > > + HTMLElement* maxTrackElement = element().sliderMaxTrackElement(); > > + > > + ASSERT(sliderTrackElement); > > + ASSERT(minTrackElement); > > + ASSERT(maxTrackElement); > > Can we get at these some other way than making them public functions on > HTMLInputElement? Yes, let me try the option I mention above. > Let me put this another way. This function clearly only > needs to make style changes to these elements. So could we expose functions > that return RenderStyle& instead of functions that return HTMLElement? Or we > could add functions that expose the renderers. And could we make > RenderSlider a friend of HTMLInputElement so these could be private > functions? I'll keep that in mind if I can't move these methods to RangeInputType. > If we were going to keep the ones that return elements I would use a return > type of HTMLElement& and have the assertion inside the function rather than > at the call site. I think this is a great idea regardless.
Jer Noble
Comment 12 2015-06-01 16:26:47 PDT
Created attachment 254022 [details] Patch for landing
Jer Noble
Comment 13 2015-06-01 16:43:30 PDT
Created attachment 254025 [details] Patch for landing
Note You need to log in before you can comment on or make changes to this bug.