Bug 166830 - clip: rect does not work in konqueror
Summary: clip: rect does not work in konqueror
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 167510 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-17 13:47 UTC by Johannes Köster
Modified: 2008-08-13 19:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (659 bytes, text/html)
2008-07-17 13:48 UTC, Johannes Köster
Details
a partial patch (2.35 KB, patch)
2008-07-27 07:07 UTC, Maksim Orlovich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Köster 2008-07-17 13:47:56 UTC
Version:            (using KDE 4.0.98)
Installed from:    Debian testing/unstable Packages
OS:                Linux

the css attribute clip does not work in konqueror. There exists an old bug: http://bugs.kde.org/show_bug.cgi?id=28480. Which reports the same problem for 3.0 konqeror.
Comment 1 Johannes Köster 2008-07-17 13:48:50 UTC
Created attachment 26201 [details]
Testcase
Comment 2 Maksim Orlovich 2008-07-27 06:20:45 UTC
*** Bug 167510 has been marked as a duplicate of this bug. ***
Comment 3 Maksim Orlovich 2008-07-27 06:27:43 UTC
Looks like auto: isn't handled in <shape> parsing, and for that matter in RenderStyle construction for in CSSStyleSelector. Oddly enough, RenderBox::clipRect might do the right thing if one encodes auto as Variable Length.
Comment 4 Maksim Orlovich 2008-07-27 07:07:15 UTC
Created attachment 26426 [details]
a partial patch

This takes care of the parsing and CSSStyleSelector bits, but
RenderBox::clipRect doesn't seem to handle borders properly. This stuff is
slightly confusing due to RTL, so I hope someone whose area actually is CSS
stuff can take a look.
Comment 5 Maksim Orlovich 2008-07-27 07:08:09 UTC
ergh, it also leaks on invalid lengths, if parseUnit fails.
Comment 6 Maksim Orlovich 2008-08-06 01:32:02 UTC
Erm, well, I would have committed a fix already if I could reconcile what the CSS2.1 spec says about the behavior of the property in RTL mode with what other browsers actually do.
Comment 7 Maksim Orlovich 2008-08-07 01:11:02 UTC
SVN commit 843320 by orlovich:

Proper parsing and RenderStyle construction for clip:rect(..  auto ...).
RenderBox part still needs fixing, but lets get this into SVN so I don't 
lose it.
CCBUG:166830


 M  +10 -5     cssparser.cpp  
 M  +12 -4     cssstyleselector.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=843320
Comment 8 Maksim Orlovich 2008-08-07 01:12:32 UTC
SVN commit 843321 by orlovich:

Merged revision 843320:
Proper parsing and RenderStyle construction for clip:rect(..  auto ...).
RenderBox part still needs fixing, but lets get this into SVN so I don't 
lose it.
CCBUG:166830

 M  +10 -5     cssparser.cpp  
 M  +12 -4     cssstyleselector.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=843321
Comment 9 Maksim Orlovich 2008-08-13 18:32:55 UTC
SVN commit 846526 by orlovich:

Fix handling of borders in clip:; particularly important 
if the length is auto. RTL handling left as following my reading
of the spec and not other browsers' behavior.

BUG:166830


 M  +4 -4      render_box.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=846526
Comment 10 Maksim Orlovich 2008-08-13 19:01:20 UTC
SVN commit 846542 by orlovich:

Regression test for #166830
CCBUG:166830


 A             baseline/css/css-clip1.html-dom  
 AM            baseline/css/css-clip1.html-dump.png  
 A             baseline/css/css-clip1.html-render  
 A             tests/css/css-clip1.html  


WebSVN link: http://websvn.kde.org/?view=rev&revision=846542