245 Commits

Author SHA1 Message Date
dbaron%dbaron.org
b98ae4dff3 Backing out part of changes to see which part is causing performance problem. b=74880
git-svn-id: svn://10.0.0.236/trunk@152281 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-04 08:03:40 +00:00
dbaron%dbaron.org
6b800e75e5 Implement -moz-margin-start, -moz-margin-end, -moz-padding-start, and -moz-padding-end and cascade them correctly. Use them in html.css to improve default styles for lists in RTL documents. b=74880 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@152274 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-04 06:10:56 +00:00
bryner%brianryner.com
5b5cd321a4 Guarantee that the pres context's device context will be non-null by returning failure from Init() if it's null. Rename inline getter GetDeviceContext() to DeviceContext(), convert all callers to use the inline getter, and remove the virtual/refcounting getter. Bug 229371, r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@152182 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-02 22:17:21 +00:00
bryner%brianryner.com
018aeefc0d More nsIPresContext deCOMtamination (bug 229371). Inline getters and setters for LinkHandler, VisibleArea, and Language; change some methods that don't return any useful data to |void|; make GetContainer return an already_AddRefed. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@152137 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-01 10:09:07 +00:00
bryner%brianryner.com
b4581d93cf Continuing nsIPresContext deCOMtamination (bug 229371). Remove ReParentStyleContext - callers can call frame manager directly. Removed several unused setters. Inlined getters for default colors, font scaler, and focus ring width. Changed GetDefaultFont to return a const nsFont*. r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@152127 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-31 22:41:40 +00:00
dbaron%dbaron.org
93fe82725e Fix two problems with display fixups. b=231787 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@151708 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-22 21:34:04 +00:00
bryner%brianryner.com
70bf134ff4 Continuing nsIPresContext deCOMtamination (bug 229371). Remove GetImageLoadFlags (unused). Make failure to fetch the LookAndFeel service cause Init() to fail, don't null check it after that, and inlined the getter. Move IOService caching to nsImageFrame, the only user of it. r+sr=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@151636 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-21 09:35:59 +00:00
dbaron%dbaron.org
87f96cc17d Fix parsing of 'cursor' property and ignoring of uri() values, which we don't support. b=77974 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@151470 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-18 01:12:58 +00:00
bryner%brianryner.com
9dfcd977cb Additional cleanup related to bug 64116. r=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@151039 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-08 19:23:12 +00:00
bryner%brianryner.com
468d3e2e8d Eliminate nsIStyleSet as an XPCOM interface, making the implementation internal to layout. Frame constructor ownership moves to the pres shell, and the style set methods that forward to the frame constructor are gone. Rewrote style set sheet add/remove to reduce code size. For more details, see bug 64116. r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@150998 18797224-902f-48f8-a5cc-f745e15eee43
2004-01-07 22:30:53 +00:00
bryner%brianryner.com
4cca78120d deCOMtaminate nsIPresContext::GetCompatibilityMode / SetCompatibilityMode (bug 229081). r+sr=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@150720 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-24 21:51:50 +00:00
bryner%brianryner.com
b5347dd60c Change all callers of nsIPresContext::GetShell() to use the non-refcounting versions. Most callers now use PresShell(), a few that were checking for null conditions are using GetPresShell() -- this will be remedied once we can ensure that a prescontext never has a null pres shell. Bug 227690, r+sr=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@150598 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-21 05:36:36 +00:00
dbaron%dbaron.org
914621cdfb Fix problems when using generic font when the parent font is not generic but the closest ancestor with a generic font used the same generic. Miscellaneous cleanup. b=226871 r+sr=bzbarsky a=brendan
git-svn-id: svn://10.0.0.236/trunk@149940 18797224-902f-48f8-a5cc-f745e15eee43
2003-12-02 22:24:32 +00:00
dbaron%dbaron.org
a8191642ef Do inheritance without layout-dependent computations, per CSS2.1. Remove eStyleUnit_Inherit and nsStyleCoord::SetInheritValue. b=205790 r+sr=bzbarsky a=asa
git-svn-id: svn://10.0.0.236/trunk@149687 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-24 19:46:25 +00:00
dbaron%dbaron.org
40c2c5502c Scale fixed line-heights when the minimum font size pref kicks in. b=158868 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149483 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-18 05:53:22 +00:00
dbaron%dbaron.org
cf4b71aec2 Remove unneeded chromeOverride variable. b=225936 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@149419 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-17 04:10:55 +00:00
dbaron%dbaron.org
a6fb82fcaa Clamp -moz-opacity to the range [0.0,1.0]. b=224478 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@148730 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-02 22:40:43 +00:00
uid502
bdc0f5a1e4 Bug 212366. Make '-moz-opacity' behave like CSS3 opacity: it does not inherit by default, and it composites the element and all its children as a group. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@148696 18797224-902f-48f8-a5cc-f745e15eee43
2003-11-01 22:34:59 +00:00
uid502
f97b0819f2 Bug 165149. More cleanup. Make nsStyleContext::GetPseudoType return a weak pointer. Also remove unnecessary arguments to nsHTMLContainerFrame::CreateViewForFrame. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@148055 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-17 02:38:37 +00:00
bzbarsky%mit.edu
d43d8c0e1e Add pref for the default :active styling. Bug 142163, patch by
mats.palmgren@bredband.net (Mats Palmgren), r=bzbarsky/sr=dbaron on the
layout/xpfe parts of the patch, r=glazou/sr=bzbarsky on the editor part,
moa=neil on the prefwindow changes.


git-svn-id: svn://10.0.0.236/trunk@147979 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-15 01:56:12 +00:00
dbaron%dbaron.org
37de3855c7 Make URIs in the style system nsIURI pointers instead of strings. b=113173 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@147501 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-01 22:53:56 +00:00
dbaron%dbaron.org
3ca89119fb Convert jump tables to if-else trees to avoid the performance cost of function pointers. b=210550 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@144620 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-09 03:46:27 +00:00
dbaron%dbaron.org
9f2fb7fb4a Remove hints from CSS property list. b=158713 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@144408 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-02 22:17:23 +00:00
dbaron%dbaron.org
7fdc969a1d Clean up EnsureBlockDisplay and make it do the right thing for inner table display types. b=210873 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@144305 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-30 21:48:56 +00:00
dbaron%dbaron.org
4f6b46a91e Add nsIFrame::GetPresContext, which gets the pres context from the rule node which it gets from the style context. DeCOMtaminate nsStyleContext::GetRuleNode, nsRuleNode::GetRule, and nsRuleNode::GetPresContext. Remove unused nsRuleNode::PathContainsRule. b=208190 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@143968 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-20 01:22:44 +00:00
dbaron%dbaron.org
906d582953 Make CSSStyleRuleImpl immutable by changing mutation code (including some merging of code between nsDOMCSSAttributeDeclaration and DOMCSSDeclarationImpl) so that it creates a new rule for the modified declaration. Change StyleRuleChanged notification signatures, and change pres shell's handling of style rule change, addition, and removal to just do reresolution. Remove fine-grained ways of clearing style data. Change PeekStyleData so it doesn't do more work than it needs to, and can be relied on not to access rules that no longer match any content. b=188803 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@143831 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-18 01:59:57 +00:00
dbaron%dbaron.org
800f53879d Fix bustage on compilers with broken for loop scoping. b=125246
git-svn-id: svn://10.0.0.236/trunk@143424 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-08 00:36:08 +00:00
dbaron%dbaron.org
bf4ec31727 Put more information on the CSS properties in nsCSSPropList.h.
Use the property list in the tables for nsRuleNode::CheckSpecifiedProperties.
To reduce heap usage, redesign the storage of properties and values in nsCSSDeclaration to allocate all property-value pairs in a declaration block in a single allocation, and use temporary structures (like the old permanent structures) during parsing and modification.  Replace per-property switch statements in nsCSSDeclaration with table-based code to reduce code size.
b=125246  r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@143421 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-07 22:14:42 +00:00
bzbarsky%mit.edu
044fdfa54a Make font-size:larger and font-size:smaller smarter about interpolating and
extrapolating font sizes.  Bug 72164, patch by Eric Lawrence
<elawrenc69@yahoo.com>, r=bzbarsky, r+sr=dbaron, a=asa


git-svn-id: svn://10.0.0.236/trunk@142587 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-17 16:11:51 +00:00
dbaron%dbaron.org
69da9d4a19 Clean up API (and its callers) for getting style data: remove unneeded null checks and switch to new inline member functions (one for each struct) that return values. b=197205 r+sr=roc a=brendan
git-svn-id: svn://10.0.0.236/trunk@142488 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-15 03:42:21 +00:00
dbaron%dbaron.org
3a0892f33c Fix regression that text zoom was broken on text fields on Windows. b=205534 r+sr=roc a=asa
git-svn-id: svn://10.0.0.236/trunk@142465 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-14 22:37:57 +00:00
bryner%netscape.com
0c66a2052e Make --disable-xul work (bug 69995). We build enough XUL to support
scrollbars unconditionally, but can now leave out heavyweight widgets like
grid, listbox, and tree.  r=bzbarsky, sr=alecf.


git-svn-id: svn://10.0.0.236/trunk@141016 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-11 00:56:27 +00:00
dbaron%dbaron.org
efc8215ab8 Ensure that GetStyleData never returns null, even in out-of-memory, by storing a backup set of style structs to return in case of failure. b=154751 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@139384 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-13 15:29:36 +00:00
roc+%cs.cmu.edu
220a586522 Bug 195883. %-values are not valid for '-moz-opacity'.
git-svn-id: svn://10.0.0.236/trunk@139134 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-08 03:08:25 +00:00
dbaron%dbaron.org
2e0108c17f Remove unused variable (fix warning). b=171830
git-svn-id: svn://10.0.0.236/trunk@139042 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-06 21:01:52 +00:00
dbaron%dbaron.org
82f6da961c Fix for bustage on older gcc. b=117316
git-svn-id: svn://10.0.0.236/trunk@139041 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-06 20:16:35 +00:00
dbaron%dbaron.org
089db98924 Implement garbage collection of the rule tree to fix some cases of memory growth and to allow us to move towards style rule immutability. b=117316 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@139035 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-06 19:14:17 +00:00
dbaron%dbaron.org
3b86a016bb Handle inline style changes by creating new style rules to wrap the modified nsCSSDeclarations, thus moving towards style rule immutability and away from property-based change hints. Patch from Boris Zbarsky <bzbarsky@mit.edu>. r=dbaron sr=roc b=171830
git-svn-id: svn://10.0.0.236/trunk@139034 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-06 19:07:22 +00:00
bryner%netscape.com
c44337949a Remove nsIStyleContext (bug 114713), r/sr=dbaron. Changed lots of methods to use nsStyleContext* or already_AddRefed<nsStyleContext> as return values, depending on whether a reference is returned. Turn on nsRefPtr (bug 104346), and change nsDerivedSafe to not declare AddRef and Release explicitly virtual, r=jag, sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@138129 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-22 00:32:13 +00:00
caillon%returnzero.com
b9398c95d8 189533, background-position has low accuracy. Specifically, it was not allowing fractional percentages.
r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@136615 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-19 02:36:04 +00:00
dbaron%dbaron.org
0d15904b17 Reduce duplication of code between handling of top/right/bottom/left margin, border, and padding. b=189537 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@136598 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-18 15:58:49 +00:00
dbaron%dbaron.org
882c872a4c Fix inheritance of 'border-color' when the value inherited came from 'color' (the default). b=189402 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@136553 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-17 23:41:20 +00:00
cbiesinger%web.de
8b51a21663 remove ifdef IBMBIDI in content/, r+sr=roc+moz, bug 89203
git-svn-id: svn://10.0.0.236/trunk@136507 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-17 12:09:23 +00:00
caillon%returnzero.com
4e9b13ef00 Bug 14777 - Give inline background image painting a rhyme and reason to how it works. Implement CSS3 proposal (-moz-)background-inline-policy.
r+sr=roc+moz


git-svn-id: svn://10.0.0.236/trunk@136499 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-17 09:33:52 +00:00
karnaze%netscape.com
205710a252 bug 161644 - don't allow a first letter to be a block unless it is floating. sr=bzbarsky, r=dbaron.
git-svn-id: svn://10.0.0.236/trunk@134694 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-03 15:48:26 +00:00
glazman%netscape.com
6726bfd196 'larger' and 'smaller' CSS values for 'font-size' were not working outside of range xx-small to xx-large and that prevented users to use very big and very small fonts in both Composer and mail composition; b=63987, r=dbaron, sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@134100 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 15:16:31 +00:00
dbaron%fas.harvard.edu
307f43b5a1 Consolidate all CSS pseudos and split them into three atom lists to distinguish between pseudo-classes, pseudo-elements, and fake-pseudo-elements used for anonymous boxes. b=147887 r,sr=roc,bz
git-svn-id: svn://10.0.0.236/trunk@134006 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-17 15:37:56 +00:00
dbaron%fas.harvard.edu
e8f31961d7 Subclass the nsCSS* structs as nsRuleData* so members can be added to the latter without bloating the former, and to allow the former to go away eventually. Propagate whether a font family name comes from HTML through the style system and use it to set a bit on nsFont indicating that quirky behavior of Symbol fonts is acceptable. b=175372 r=bzbarsky sr=kin
git-svn-id: svn://10.0.0.236/trunk@133655 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-12 15:17:07 +00:00
bzbarsky%mit.edu
a70a392a2c Make GetParent on nsStyleContext return an
already_AddRefed<nsIStyleContext>.  Bug 171808, r=jkeiser, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@131531 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-09 01:46:15 +00:00
caillon%returnzero.com
0f7366d6d0 Correcting our background painting code per the latest CSS specs. By default, backgrounds should be painted to the border
area, and not the padding area as per the CSS 2 Errata, CSS2.1 and CSS3.  Also, implementing the CSS3 'background-clip'
and 'background-origin' properties (currently with -moz- prefixes) to control this behavior.
Bug 162252, r=dbaron sr=roc+moz


git-svn-id: svn://10.0.0.236/trunk@131419 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-08 10:24:53 +00:00