Last modified: 2014-03-10 18:16:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55514, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53514 - Images: Parsoid handling of format "frame" images with resizing option differs from PHP parser
Images: Parsoid handling of format "frame" images with resizing option differ...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal trivial
: ---
Assigned To: C. Scott Ananian
:
Depends on:
Blocks: 54844
  Show dependency treegraph
 
Reported: 2013-08-29 01:34 UTC by Kyle Florence
Modified: 2014-03-10 18:16 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kyle Florence 2013-08-29 01:34:37 UTC
Parsoid will render the following image with a 50 pixel width:
[[File:Example.jpg|frame|50px]]

Whereas the PHP parser would ignore the width entirely, as seen here: http://www.mediawiki.org/wiki/Help:Images
Comment 1 Ed Sanders 2013-12-18 19:31:11 UTC
Yes, the page states 'An image with _frame_ always ignores the size specification, the original image will be reduced if it exceeds the maximum size defined in user preferences.' Doesn't make much sense IMO, but we should mirror that behaviour.
Comment 2 Gabriel Wicke 2013-12-18 19:34:11 UTC
Ed's citation is from https://www.mediawiki.org/wiki/Help:Images#Size_and_frame.

If there is a MediaWiki default value for the maximum size user pref then we should perhaps use that in Parsoid output. That will still keep our output independent of individual user's prefs, which is important.
Comment 3 C. Scott Ananian 2014-03-05 14:51:27 UTC
The situation is complicated.

The spec given in https://www.mediawiki.org/wiki/Help:Images#Size_and_frame is not correct. The PHP parser code has grown bugs.  The actual current behavior is:

1. `thumbs` and `frameless` only reduce, never enlarge (the spec is correct here)
2. `frame` images always render at their default size, *unless they have a height specified*, in which case they respect the specified height and ignore the width.
3. There is user preference code for `thumb` size, but not for `frame` size --- the code is present but unreachable.
4. It looks like there are some weird behaviors related to `upright` as well.

#2 and #3 appear to be bugs.  I'm going to attempt to fix them first in core, then make parsoid match.
Comment 4 C. Scott Ananian 2014-03-05 15:05:18 UTC
See bug 62258 for the issue in core.
Comment 5 Gerrit Notification Bot 2014-03-05 16:28:06 UTC
Change 116983 had a related patch set uploaded by Cscott:
WIP: Match PHP parser behavior for image `frame` option.

https://gerrit.wikimedia.org/r/116983
Comment 6 Gerrit Notification Bot 2014-03-08 02:53:18 UTC
Change 116983 merged by jenkins-bot:
Match PHP parser behavior for image `frame` option.

https://gerrit.wikimedia.org/r/116983

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links