Bug 302070 - CSS text-align property broken for textarea elements
Summary: CSS text-align property broken for textarea elements
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: 4.8.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-17 16:13 UTC by Andrea Iacovitti
Modified: 2012-06-18 05:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (1.82 KB, text/html)
2012-06-17 16:13 UTC, Andrea Iacovitti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Iacovitti 2012-06-17 16:13:35 UTC
Created attachment 71890 [details]
testcase

(Attached a testcase)
Actually khtml fails to deal with 'text-align' css property, this is particularly evident in pre-filled textarea elements with 'text-align:right' style (as in the testcase).
Switching text-align via javascript fails too.

(Also note in the tescase another uncommon behavior where pre-filled textarea elements are initially showed with all content scrolled down to the end)
Comment 1 Andrea Iacovitti 2012-06-18 05:55:21 UTC
Git commit 31ce1f9365000d7c3a9c39770234aa09009a2599 by Andrea Iacovitti.
Committed on 18/06/2012 at 07:04.
Pushed by aiacovitti into branch 'KDE/4.8'.

Fix applying css text-align property on textarea widget:
- set text alignment on all textarea's paragraphs, not only the current one
(aka the one at the current cursor position).
- do not set at every setStyle call but only when it has changed (doing the
same for lineedit widget).

Also fix annoying behavior where initial content of pre-filled textarea
is showed up all scrolled down to end.

M  +44   -39   khtml/rendering/render_form.cpp
M  +3    -2    khtml/rendering/render_form.h

http://commits.kde.org/kdelibs/31ce1f9365000d7c3a9c39770234aa09009a2599