Created attachment 159030[details]
TestCase
There was a extra script tag in the previous testcase which was causing the page not to render anything on the view port.
Created attachment 203511[details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 203540[details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 203542[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Comment on attachment 203537[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=203537&action=review
I would use intrinsicSize() subclassing more. You might want to investigate how intrinsicSize() is called. It may be worthwhile to turn it into intrinsicLogicalSize() to simplify subclassing, especially if nobody is really using the physical version of it.
> Source/WebCore/rendering/RenderBox.cpp:2447
> + // Some replaced renderers, such as text controls, need to calculate their 'intrinsic' height during layout.
> + updateIntrinsicLogicalHeight();
I don't get why you had to add this. Can't you just do this inside RenderTextControl's computeLogicalHeight?
> Source/WebCore/rendering/RenderBox.cpp:3052
> +static bool isReplacedElement(const RenderBox* child)
> +{
> + return child->isReplaced() || (child->node() && child->node()->isElementNode() && toElement(child->node())->isFormControlElement() && !child->isFieldset());
> +}
Let's add a FIXME about how we'd like this to just be isReplaced() eventually and file a followup bug about it too.
> Source/WebCore/rendering/RenderBox.cpp:3056
> - if (isReplaced()) {
> + if (isReplacedElement(this)) {
I think it's worth a comment about why we're not just using isReplaced.
> Source/WebCore/rendering/RenderBox.cpp:3398
> - if (isReplaced()) {
> + if (isReplacedElement(this)) {
Ditto.
> Source/WebCore/rendering/RenderBox.h:405
> + virtual LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWritingMode() ? intrinsicSize().width() : intrinsicSize().height(); }
> + virtual LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWritingMode() ? intrinsicSize().height() : intrinsicSize().width(); }
I don't get why these have to become virtual. Can't you just override the already virtual intrinsicSize()? When someone queries for the height on objects that only subclassed to provide a width, you now have two virtual function calls (one to call intrinsicLogicalHeight(), and then a second virtual function call to intrinsicSize()(.
> Source/WebCore/rendering/RenderBox.h:406
> + virtual void updateIntrinsicLogicalHeight() { };
Don't get why this is needed.
> Source/WebCore/rendering/RenderButton.h:61
> +protected:
> + virtual LayoutUnit intrinsicLogicalWidth() const { return maxPreferredLogicalWidth(); }
Just subclass intrinsicSize() instead.
> Source/WebCore/rendering/RenderMenuList.h:61
> +protected:
> + virtual LayoutUnit intrinsicLogicalWidth() const { return maxPreferredLogicalWidth(); }
Just subclass intrinsicSize() instead.
> Source/WebCore/rendering/RenderTextControl.cpp:146
> -void RenderTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
> +void RenderTextControl::updateIntrinsicLogicalHeight()
Seems like you could have just done the update in computeLogicalHeight without an extra function?
> Source/WebCore/rendering/RenderTextControl.h:69
> + virtual void updateIntrinsicLogicalHeight() OVERRIDE;
> + virtual LayoutUnit intrinsicLogicalHeight() const { return m_intrinsicLogicalHeight; }
> + virtual LayoutUnit intrinsicLogicalWidth() const { return maxPreferredLogicalWidth(); }
Definitely could just subclass intrinsicSize() here.
Comment on attachment 203884[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=203884&action=review> Source/WebCore/rendering/RenderBox.cpp:3050
> + return child->isReplaced() || (toElement(child->node())->isFormControlElement() && !child->isFieldset());
What guarantees that child->node() is an Element?
Can’t we do this check entirely on the rendering side of things?
> Source/WebCore/rendering/RenderButton.h:60
> + virtual LayoutSize intrinsicSize() const { return LayoutSize(maxPreferredLogicalWidth(), LayoutUnit()); }
Can this be private instead of public? Can this use OVERRIDE and FINAL?
> Source/WebCore/rendering/RenderListBox.h:60
> + virtual LayoutSize intrinsicSize() const { return LayoutSize(maxPreferredLogicalWidth(), m_intrinsicLogicalHeight); }
Can this be private instead of public? Can this use OVERRIDE and FINAL?
> Source/WebCore/rendering/RenderMenuList.h:60
> + virtual LayoutSize intrinsicSize() const { return LayoutSize(maxPreferredLogicalWidth(), logicalHeight()); }
Can this be private instead of public? Can this use OVERRIDE and FINAL?
> Source/WebCore/rendering/RenderTextControl.h:67
> + virtual LayoutSize intrinsicSize() const { return LayoutSize(maxPreferredLogicalWidth(), m_intrinsicLogicalHeight); }
Can this be private instead of public? Can this use OVERRIDE and FINAL?
Created attachment 204028[details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Created attachment 204091[details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 205418[details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 205422[details]
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Created attachment 205433[details]
Archive of layout-test-results from APPLE-EWS-2 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: APPLE-EWS-2 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Created attachment 205830[details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04 Port: mac-mountainlion Platform: Mac OS X 10.8.3
Created attachment 205875[details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.3
Created attachment 205949[details]
Archive of layout-test-results from APPLE-EWS-5 for win-future
The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: APPLE-EWS-5 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
I am still able to reproduce this bug in Safari 15.5 on macOS 12.4 and Safari TP 148 using "Reduction..." test case.
The input field is stretched out while in other browser, Chrome Canary 105 is also stretching it but Firefox is not. Firefox is just showing it is as normal 184*16 computed size.
If I am testing it incorrectly, please retest accordingly and ignore my comment. Thanks!
2012-08-10 11:58 PDT, Robert Hogan
2012-08-17 00:50 PDT, Pravin D
2013-05-21 12:43 PDT, Robert Hogan
2013-05-27 12:47 PDT, Robert Hogan
2013-05-27 13:04 PDT, Robert Hogan
2013-05-27 13:59 PDT, Robert Hogan
2013-06-01 00:33 PDT, Robert Hogan
2013-06-02 03:31 PDT, Build Bot
2013-06-02 09:17 PDT, Robert Hogan
2013-06-02 10:06 PDT, Build Bot
2013-06-02 10:58 PDT, Build Bot
2013-06-05 14:16 PDT, Robert Hogan
2013-06-07 02:48 PDT, Robert Hogan
2013-06-07 05:11 PDT, Build Bot
2013-06-08 07:02 PDT, Build Bot
2013-06-25 11:03 PDT, Robert Hogan
2013-06-25 12:51 PDT, Build Bot
2013-06-25 14:12 PDT, Build Bot
2013-06-25 17:54 PDT, Build Bot
2013-07-01 12:01 PDT, Robert Hogan
2013-07-01 13:00 PDT, Build Bot
2013-07-02 00:43 PDT, Build Bot
2013-07-02 15:35 PDT, Build Bot
2013-08-26 11:57 PDT, Robert Hogan