nsTextTransformer.cpp.
I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account
for the space as non-breaking and therefore part of the first word in the block.
bug 39901 and 38396
nsHTMLImageLoader.*, nsImageFrame.cpp
I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image
gets an unconstrained reflow and has %-based width. This does not handle %-based min-width or max-width, that would be a separate
bug that I'll file shortly. But this fixes the vast majority of real cases out there.
bug 18754
nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp
in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get
newlines before and after the HR. This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach.
bug 50257
nsLineLayout.cpp
Did a couple of things in here:
* The actual fix is controlled by FIX_BUG_50257 #define symbol. This basically says that an break (BR) will always fit on a line.
A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a
line. This is a wimpier, safer solution.
* I noticed that the way we got the compatibility mode was way out of date, very wasteful. So I fixed that.
* I noticed that there were a bunch of redundant SetFlag calls. Since the flag variable is initialized to 0, setting a flag to 0 on a newly
created object is a waste.
nsBlockFrame.cpp -- just added a comment to some odd looking code, to make sure no one comes along later and breaks it
git-svn-id: svn://10.0.0.236/trunk@78763 18797224-902f-48f8-a5cc-f745e15eee43
100 lines
2.5 KiB
CSS
100 lines
2.5 KiB
CSS
/*
|
|
* The contents of this file are subject to the Netscape Public
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.mozilla.org/NPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
* implied. See the License for the specific language governing
|
|
* rights and limitations under the License.
|
|
*
|
|
* The Original Code is mozilla.org code.
|
|
*
|
|
* The Initial Developer of the Original Code is Netscape
|
|
* Communications Corporation. Portions created by Netscape are
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
* Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
*/
|
|
|
|
/* test rule: remove before shipping
|
|
.moz-quirktest { text-decoration: underline; color: lime; }
|
|
*/
|
|
|
|
/* Quirk: input images have a blue border (b=28010)*/
|
|
input[type=image] {
|
|
border: 2px solid blue;
|
|
}
|
|
|
|
/* Quirk: DL under a OL has no margins (b=33300) */
|
|
ol dl {
|
|
margin: 0 0 0 0;
|
|
}
|
|
|
|
/* Quirk: UL under a DL has no margins (b=32989) */
|
|
dl ul {
|
|
margin: 0 0 0 0;
|
|
}
|
|
|
|
/* make orphaned li's have inside bullet */
|
|
li {
|
|
list-style-position: inside;
|
|
}
|
|
|
|
/* restore outside position for lists inside li's */
|
|
li ul, li ol, li dir, li menu {
|
|
list-style-position: outside;
|
|
}
|
|
|
|
/* undo previous two rules for properly nested lists */
|
|
ul li, dir li, menu li, ol li,
|
|
ul ul, ul dir, ul menu, ul ol,
|
|
dir ul, dir dir, dir menu, dir ol,
|
|
menu ul, menu dir, menu menu, menu ol,
|
|
ol ul, ol dir, ol menu, ol ol {
|
|
list-style-position: inherit;
|
|
}
|
|
|
|
/* Ensure that we get proper padding if the very first node
|
|
beneath an <li> is another <ul>. This is an ugly way to
|
|
fix the problem, because it extends the <li> up into
|
|
what would otherwise appear to be the <ul>'s space. */
|
|
li > ul:first-node {
|
|
padding-top: 1em;
|
|
}
|
|
|
|
li > ol:first-node {
|
|
padding-top: 1em;
|
|
}
|
|
|
|
/* text input */
|
|
input[type="text"] {
|
|
border-width: 2px !important;
|
|
border-style: inset !important;
|
|
border-color: rgb(204, 204, 204);
|
|
padding-top: 1px;
|
|
padding-bottom: 0px;
|
|
padding-left: 0px;
|
|
padding-right: 0px;
|
|
}
|
|
|
|
/* HR see bug 18754 */
|
|
/* there is code in nsLineLayout.cpp and nsHRFrame.cpp to make this work */
|
|
/* in a backwards-compatible way with HRs and floats */
|
|
|
|
hr {
|
|
display: inline;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
hr:after {
|
|
white-space: pre;
|
|
content: "\A";
|
|
}
|
|
|
|
hr:before {
|
|
white-space: pre;
|
|
content: "\A";
|
|
} |