Bug 302070

Summary: CSS text-align property broken for textarea elements
Product: [Applications] konqueror Reporter: Andrea Iacovitti <aiacovitti>
Component: khtml formsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.8.4   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: testcase

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