Bug 18610 - text-indent: negative not supported
Summary: text-indent: negative not supported
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.hixie.ch/tests/adhoc/css/t...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-04-18 18:48 PDT by jasneet
Modified: 2022-07-11 15:47 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2008-04-18 18:48:25 PDT
I Steps:
Go to 
http://www.hixie.ch/tests/adhoc/css/text/indent/001.html

II Issue:
word Fail repetitiously seen under : You should not see any text below.

III Conclusion:
issue with text-indent: negative

IV Other browsers:
IE7: ok
FF3: not ok
Opera9.24: ok

V Nightly tested: 32005
Comment 1 Anatoli Papirovski 2008-04-18 20:01:12 PDT
This is failing because of the astronamically big number to which the text-indent is set, it also fails in Firefox 3.

Per CSS spec:
"The value of 'text-indent' may be negative, but there may be implementation-specific limits."

Personally, I don't think this would be worth fixing... but then again, I can't say I have any authority on this matter. Heh.
Comment 2 Robert Blaut 2009-01-06 00:39:17 PST
(In reply to comment #1)
> This is failing because of the astronamically big number to which the
> text-indent is set, it also fails in Firefox 3.
> 
> Per CSS spec:
> "The value of 'text-indent' may be negative, but there may be
> implementation-specific limits."
> 
> Personally, I don't think this would be worth fixing... but then again, I can't
> say I have any authority on this matter. Heh.
> 

Anatoli, notice other quote from CSS 2.1 specification:

"If a negative length value cannot be supported, it should be converted to the nearest value that can be supported." 

So big negative numbers should not be ignored, it should be "decreased" to  supported value. Am I right, Ian?

Comment 3 Ian 'Hixie' Hickson 2009-03-26 19:33:17 PDT
If it's what the spec says...
Comment 4 Vineet Chaudhary (vineetc) 2011-10-21 06:33:57 PDT
(In reply to comment #2)
 
> "If a negative length value cannot be supported, it should be converted to the nearest value that can be supported." 
> 
> So big negative numbers should not be ignored, it should be "decreased" to  supported value. Am I right, Ian?

After debugging this issue below are my observations.
1) Whenever it sets text-indent value it get its length calling primitiveValue->computeLength<Lenght>(....);

2) As Length.h no longer expects 28 bit integers so max text-indent value in "em" could be +/-"8388607em" and in "px" +/-"134217727px", for greater values it resets to "0"
ref. http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSPrimitiveValue.cpp?rev=91969#L280

I tested this test on latest firefox(7.0.1), opera and IE which passes this test.

Is this is expected behavior as per our Length.h implementation? Or we should change this?
Comment 5 Brent Fulgham 2022-07-11 15:46:31 PDT
This test case appears to work properly.
Comment 6 Radar WebKit Bug Importer 2022-07-11 15:47:16 PDT
<rdar://problem/96847948>