Changeset 72141 in webkit
- Timestamp:
- Nov 16, 2010 3:28:53 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r72138 r72141 1 2010-11-16 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=11004 6 7 font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector. 8 Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size, 9 since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version 10 of the constructor rather than using [NSFont pointSize]. 11 12 https://bugs.webkit.org/show_bug.cgi?id=49582 13 14 Negative leading is not handled correctly. There are two bugs here. The first is that 15 maxAscent and maxDescent can be negative, so we need a notion of whether or not we have 16 set them before so that we can allow them to be < 0. 17 18 The second issue is that we should understand where fonts will end up relative to 19 our baseline (excluding line height), and only allow those boxes to impact ascent and 20 descent if the actual font box (without factoring in line height) is above or below the 21 root line box baseline. 22 23 Added fast/css/negative-leading.html 24 25 These two bug fixes have to land together to keep the Acid 3 test rendering correctly. 26 27 * fast/css/negative-leading.html: Added. 28 * platform/mac/fast/compact/001-expected.checksum: 29 * platform/mac/fast/compact/001-expected.png: 30 * platform/mac/fast/compact/001-expected.txt: 31 * platform/mac/fast/css/negative-leading-expected.checksum: Added. 32 * platform/mac/fast/css/negative-leading-expected.png: Added. 33 * platform/mac/fast/css/negative-leading-expected.txt: Added. 34 * platform/mac/fast/forms/linebox-overflow-in-textarea-padding-expected.checksum: 35 * platform/mac/fast/forms/linebox-overflow-in-textarea-padding-expected.png: 36 * platform/mac/fast/forms/linebox-overflow-in-textarea-padding-expected.txt: 37 * platform/mac/fast/parser/style-script-head-test-expected.png: 38 1 39 2010-11-16 David Levin <levin@chromium.org> 2 40 -
trunk/LayoutTests/platform/mac/fast/compact/001-expected.checksum
r71062 r72141 1 59cf3d6597fc8c1700323ceacd7f4735 1 bf7c2f92f348ee027ab468c6fd6cf26b -
trunk/LayoutTests/platform/mac/fast/compact/001-expected.txt
r40259 r72141 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x 814 RenderBlock {HTML} at (0,0) size 800x 815 RenderBody {BODY} at (8,16) size 784x5 73 layer at (0,0) size 800x77 4 RenderBlock {HTML} at (0,0) size 800x76 5 RenderBody {BODY} at (8,16) size 784x52 6 6 RenderBlock {P} at (0,0) size 784x18 7 7 RenderText {#text} at (0,0) size 193x18 … … 10 10 RenderText {#text} at (0,0) size 31x18 11 11 text run at (0,0) width 31: "Test:" 12 RenderBlock {DIV} at (160,52) size 624x 5[color=#FF0000] [bgcolor=#00FF00]12 RenderBlock {DIV} at (160,52) size 624x0 [color=#FF0000] [bgcolor=#00FF00] 13 13 RenderInline {SPAN} at (0,0) size 299x18 [color=#000000] 14 14 RenderText {#text} at (0,-9) size 299x18 -
trunk/LayoutTests/platform/mac/fast/forms/linebox-overflow-in-textarea-padding-expected.checksum
r71187 r72141 1 bcdc206d48bcdb75decb4407a15b934b 1 a8e4279b6289b99c9deeba8a58c2f357 -
trunk/LayoutTests/platform/mac/fast/forms/linebox-overflow-in-textarea-padding-expected.txt
r43355 r72141 4 4 RenderBlock {HTML} at (0,0) size 800x600 5 5 RenderBody {BODY} at (8,8) size 784x576 6 RenderBlock (anonymous) at (0,0) size 784x 546 RenderBlock (anonymous) at (0,0) size 784x71 7 7 RenderText {#text} at (300,36) size 4x18 8 8 text run at (300,36) width 4: " " 9 9 RenderText {#text} at (0,0) size 0x0 10 RenderBlock {P} at (0, 70) size 784x3610 RenderBlock {P} at (0,87) size 784x36 11 11 RenderText {#text} at (0,0) size 753x36 12 12 text run at (0,0) width 753: "This is a pixel test that tests the linebox overflow in the padding on textareas. The div on the right is styled to look like a" 13 13 text run at (0,18) width 53: "textarea." 14 layer at (8,8) size 300x50 clip at (11,11) size 2 79x44 scrollHeight 5214 layer at (8,8) size 300x50 clip at (11,11) size 294x44 15 15 RenderTextControl {TEXTAREA} at (0,0) size 300x50 [color=#0000FF] [bgcolor=#FFFFFF] [border: (3px solid #FFFF00)] 16 RenderBlock {DIV} at (18,18) size 2 49x2217 RenderText {#text} at (0,-17) size 180x 4616 RenderBlock {DIV} at (18,18) size 264x0 17 RenderText {#text} at (0,-17) size 180x35 18 18 text run at (0,-17) width 162: "ggggggggg" 19 19 text run at (162,-17) width 18: " " 20 text run at (0,-6) width 162: "ggggggggg"21 layer at (312,8) size 300x50 clip at (315,11) size 279x44 scrollHeight 5222 RenderBlock {DIV} at (304,0) size 300x50 [color=#0000FF] [border: (3px solid #FFFF00)]23 RenderBlock {DIV} at (18,18) size 249x2224 RenderText {#text} at (0,-17) size 162x4625 20 text run at (0,-17) width 162: "ggggggggg" 26 text run at (0,-6) width 162: "ggggggggg" 21 layer at (312,29) size 300x50 clip at (315,32) size 294x44 22 RenderBlock {DIV} at (304,21) size 300x50 [color=#0000FF] [border: (3px solid #FFFF00)] 23 RenderBlock {DIV} at (18,18) size 264x0 24 RenderText {#text} at (0,-17) size 162x35 25 text run at (0,-17) width 162: "ggggggggg" 26 text run at (0,-17) width 162: "ggggggggg" -
trunk/WebCore/ChangeLog
r72137 r72141 1 2010-11-16 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=11004 6 7 font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector. 8 Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size, 9 since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version 10 of the constructor rather than using [NSFont pointSize]. 11 12 https://bugs.webkit.org/show_bug.cgi?id=49582 13 14 Negative leading is not handled correctly. There are two bugs here. The first is that 15 maxAscent and maxDescent can be negative, so we need a notion of whether or not we have 16 set them before so that we can allow them to be < 0. 17 18 The second issue is that we should understand where fonts will end up relative to 19 our baseline (excluding line height), and only allow those boxes to impact ascent and 20 descent if the actual font box (without factoring in line height) is above or below the 21 root line box baseline. 22 23 Added fast/css/negative-leading.html 24 25 These two bug fixes have to land together to keep the Acid 3 test rendering correctly. 26 27 * WebCore.exp.in: 28 * css/CSSStyleSelector.cpp: 29 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): 30 * platform/graphics/cocoa/FontPlatformData.h: 31 * platform/graphics/cocoa/FontPlatformDataCocoa.mm: 32 (WebCore::FontPlatformData::FontPlatformData): 33 * platform/graphics/mac/FontCacheMac.mm: 34 (WebCore::FontCache::getFontDataForCharacters): 35 (WebCore::FontCache::createFontPlatformData): 36 * platform/graphics/mac/SimpleFontDataMac.mm: 37 (WebCore::SimpleFontData::smallCapsFontData): 38 * rendering/InlineFlowBox.cpp: 39 (WebCore::InlineFlowBox::computeLogicalBoxHeights): 40 * rendering/InlineFlowBox.h: 41 * rendering/RootInlineBox.cpp: 42 (WebCore::RootInlineBox::alignBoxesInBlockDirection): 43 1 44 2010-11-16 Darin Adler <darin@apple.com> 2 45 -
trunk/WebCore/WebCore.exp.in
r71790 r72141 384 384 __ZN7WebCore16DeviceMotionData6createEN3WTF10PassRefPtrINS0_12AccelerationEEES4_NS2_INS0_12RotationRateEEEbd 385 385 __ZN7WebCore16FontFallbackList15releaseFontDataEv 386 __ZN7WebCore16FontPlatformDataC1EP6NSFont bbNS_15FontOrientationE386 __ZN7WebCore16FontPlatformDataC1EP6NSFontfbbNS_15FontOrientationE 387 387 __ZN7WebCore16FontPlatformDataD1Ev 388 388 __ZN7WebCore16HTMLInputElement13setAutofilledEb -
trunk/WebCore/css/CSSStyleSelector.cpp
r72116 r72141 6293 6293 // Also clamp to a reasonable maximum to prevent insane font sizes from causing crashes on various 6294 6294 // platforms (I'm looking at you, Windows.) 6295 return min(1000000.0f, max(zoomedSize, 1.0f));6295 return min(1000000.0f, zoomedSize); 6296 6296 } 6297 6297 -
trunk/WebCore/platform/graphics/cocoa/FontPlatformData.h
r70705 r72141 74 74 } 75 75 76 FontPlatformData(NSFont *nsFont, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal);76 FontPlatformData(NSFont *nsFont, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal); 77 77 78 78 FontPlatformData(CGFontRef cgFont, ATSUFontID fontID, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation) -
trunk/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
r71975 r72141 45 45 #endif // PLATFORM(MAC) 46 46 47 FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool syntheticOblique, FontOrientation orientation)47 FontPlatformData::FontPlatformData(NSFont *nsFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation) 48 48 : m_syntheticBold(syntheticBold) 49 49 , m_syntheticOblique(syntheticOblique) 50 , m_size(size) 50 51 , m_font(nsFont) 51 52 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) … … 59 60 ASSERT_ARG(nsFont, nsFont); 60 61 61 m_size = [nsFont pointSize];62 63 62 CGFontRef cgFont = 0; 64 loadFont(nsFont, m_size, m_font, cgFont, m_atsuFontID);63 loadFont(nsFont, size, m_font, cgFont, m_atsuFontID); 65 64 66 65 m_orientation = orientation; -
trunk/WebCore/platform/graphics/mac/FontCacheMac.mm
r70250 r72141 141 141 NSInteger substituteFontWeight = [fontManager weightOfFont:substituteFont]; 142 142 143 FontPlatformData alternateFont(substituteFont, 143 FontPlatformData alternateFont(substituteFont, platformData.size(), 144 144 !font.isPlatformFont() && isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(substituteFontWeight), 145 145 !font.isPlatformFont() && (traits & NSFontItalicTrait) && !(substituteFontTraits & NSFontItalicTrait), … … 212 212 bool syntheticOblique = (traits & NSFontItalicTrait) && !(actualTraits & NSFontItalicTrait); 213 213 214 return new FontPlatformData(platformFont, s yntheticBold, syntheticOblique, fontDescription.orientation());214 return new FontPlatformData(platformFont, size, syntheticBold, syntheticOblique, fontDescription.orientation()); 215 215 } 216 216 -
trunk/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
r71975 r72141 383 383 } else { 384 384 BEGIN_BLOCK_OBJC_EXCEPTIONS; 385 float size = [m_platformData.font() pointSize]* smallCapsFontSizeMultiplier;386 FontPlatformData smallCapsFont([[NSFontManager sharedFontManager] convertFont:m_platformData.font() toSize:size] );385 float size = m_platformData.size() * smallCapsFontSizeMultiplier; 386 FontPlatformData smallCapsFont([[NSFontManager sharedFontManager] convertFont:m_platformData.font() toSize:size], size); 387 387 388 388 // AppKit resets the type information (screen/printer) when you convert a font to a different size. -
trunk/WebCore/rendering/InlineFlowBox.cpp
r71465 r72141 398 398 399 399 void InlineFlowBox::computeLogicalBoxHeights(int& maxPositionTop, int& maxPositionBottom, 400 int& maxAscent, int& maxDescent, bool strictMode, GlyphOverflowAndFallbackFontsMap& textBoxDataMap) 401 { 400 int& maxAscent, int& maxDescent, bool& setMaxAscent, bool& setMaxDescent, 401 bool strictMode, GlyphOverflowAndFallbackFontsMap& textBoxDataMap) 402 { 403 // The primary purpose of this function is to compute the maximal ascent and descent values for 404 // a line. 405 // 406 // The maxAscent value represents the distance of the highest point of any box (including line-height) from 407 // the root box's baseline. The maxDescent value represents the distance of the lowest point of any box 408 // (also including line-height) from the root box baseline. These values can be negative. 409 // 410 // A secondary purpose of this function is to store the offset of very box's baseline from the root box's 411 // baseline. This information is cached in the logicalTop() of every box. We're effectively just using 412 // the logicalTop() as scratch space. 402 413 if (isRootInlineBox()) { 403 414 // Examine our root box. … … 407 418 int ascent = baseline; 408 419 int descent = height - ascent; 409 if (maxAscent < ascent )420 if (maxAscent < ascent || !setMaxAscent) { 410 421 maxAscent = ascent; 411 if (maxDescent < descent) 422 setMaxAscent = true; 423 } 424 if (maxDescent < descent || !setMaxDescent) { 412 425 maxDescent = descent; 426 setMaxDescent = true; 427 } 413 428 } 414 429 } … … 419 434 420 435 bool isInlineFlow = curr->isInlineFlowBox(); 421 436 437 // Because a box can be positioned such that it ends up fully above or fully below the 438 // root line box, we only consider it to affect the maxAscent and maxDescent values if some 439 // part of the box (EXCLUDING line-height) is above (for ascent) or below (for descent) the root box's baseline. 440 bool affectsAscent = false; 441 bool affectsDescent = false; 442 443 // The verticalPositionForBox function returns the distance between the child box's baseline 444 // and the root box's baseline. The value is negative if the child box's baseline is above the 445 // root box's baseline, and it is positive if the child box's baseline is below the root box's baseline. 446 curr->setLogicalTop(verticalPositionForBox(curr, m_firstLine)); 447 422 448 int lineHeight; 423 449 int baseline; … … 438 464 baseline = max(baseline, halfLeading + usedFonts->at(i)->ascent()); 439 465 baselineToBottom = max(baselineToBottom, usedFonts->at(i)->lineSpacing() - usedFonts->at(i)->ascent() - usedFonts->at(i)->descent() - halfLeading); 466 if (!affectsAscent) 467 affectsAscent = usedFonts->at(i)->ascent() - curr->logicalTop() > 0; 468 if (!affectsDescent) 469 affectsDescent = usedFonts->at(i)->descent() + curr->logicalTop() > 0; 440 470 } 441 471 lineHeight = baseline + baselineToBottom; … … 446 476 int halfLeading = (lineHeight - usedFonts->at(i)->ascent() - usedFonts->at(i)->descent()) / 2; 447 477 baseline = max(baseline, halfLeading + usedFonts->at(i)->ascent()); 478 if (!affectsAscent) 479 affectsAscent = usedFonts->at(i)->ascent() - curr->logicalTop() > 0; 480 if (!affectsDescent) 481 affectsDescent = usedFonts->at(i)->descent() + curr->logicalTop() > 0; 448 482 } 449 483 } else { … … 453 487 int halfLeading = (lineHeight - usedFonts->at(i)->ascent() - usedFonts->at(i)->descent()) / 2; 454 488 baseline = max(baseline, halfLeading + usedFonts->at(i)->ascent()); 489 if (!affectsAscent) 490 affectsAscent = usedFonts->at(i)->ascent() - curr->logicalTop() > 0; 491 if (!affectsDescent) 492 affectsDescent = usedFonts->at(i)->descent() + curr->logicalTop() > 0; 455 493 } 456 494 } … … 458 496 lineHeight = curr->lineHeight(); 459 497 baseline = curr->baselinePosition(); 460 } 461 462 curr->setLogicalTop(verticalPositionForBox(curr, m_firstLine)); 498 if (curr->isText() || isInlineFlow) { 499 // Examine the font box for inline flows and text boxes to see if any part of it is above the baseline. 500 // If the top of our font box relative to the root box baseline is above the root box baseline, then 501 // we are contributing to the maxAscent value. 502 affectsAscent = curr->renderer()->style(m_firstLine)->font().ascent() - curr->logicalTop() > 0; 503 504 // Descent is similar. If any part of our font box is below the root box's baseline, then 505 // we contribute to the maxDescent value. 506 affectsDescent = curr->renderer()->style(m_firstLine)->font().descent() + curr->logicalTop() > 0; 507 } else { 508 // Replaced elements always affect both the ascent and descent. 509 affectsAscent = true; 510 affectsDescent = true; 511 } 512 } 513 463 514 if (curr->logicalTop() == PositionTop) { 464 515 if (maxPositionTop < lineHeight) … … 468 519 maxPositionBottom = lineHeight; 469 520 } else if ((!isInlineFlow || static_cast<InlineFlowBox*>(curr)->hasTextChildren()) || curr->boxModelObject()->hasInlineDirectionBordersOrPadding() || strictMode) { 521 // Note that these values can be negative. Even though we only affect the maxAscent and maxDescent values 522 // if our box (excluding line-height) was above (for ascent) or below (for descent) the root baseline, once you factor in line-height 523 // the final box can end up being fully above or fully below the root box's baseline! This is ok, but what it 524 // means is that ascent and descent (including leading), can end up being negative. The setMaxAscent and 525 // setMaxDescent booleans are used to ensure that we're willing to initially set maxAscent/Descent to negative 526 // values. 470 527 int ascent = baseline - curr->logicalTop(); 471 528 int descent = lineHeight - ascent; 472 if ( maxAscent < ascent)529 if (affectsAscent && (maxAscent < ascent || !setMaxAscent)) { 473 530 maxAscent = ascent; 474 if (maxDescent < descent) 531 setMaxAscent = true; 532 } 533 if (affectsDescent && (maxDescent < descent || !setMaxDescent)) { 475 534 maxDescent = descent; 535 setMaxDescent = true; 536 } 476 537 } 477 538 478 539 if (curr->isInlineFlowBox()) 479 static_cast<InlineFlowBox*>(curr)->computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, s trictMode, textBoxDataMap);540 static_cast<InlineFlowBox*>(curr)->computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, setMaxAscent, setMaxDescent, strictMode, textBoxDataMap); 480 541 } 481 542 } -
trunk/WebCore/rendering/InlineFlowBox.h
r71465 r72141 156 156 int placeBoxesInInlineDirection(int logicalLeft, bool& needsWordSpacing, GlyphOverflowAndFallbackFontsMap&); 157 157 void computeLogicalBoxHeights(int& maxPositionTop, int& maxPositionBottom, 158 int& maxAscent, int& maxDescent, bool strictMode, GlyphOverflowAndFallbackFontsMap&); 158 int& maxAscent, int& maxDescent, bool& setMaxAscent, bool& setMaxDescent, 159 bool strictMode, GlyphOverflowAndFallbackFontsMap&); 159 160 void adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent, 160 161 int maxPositionTop, int maxPositionBottom); -
trunk/WebCore/rendering/RootInlineBox.cpp
r71563 r72141 227 227 int maxAscent = 0; 228 228 int maxDescent = 0; 229 bool setMaxAscent = false; 230 bool setMaxDescent = false; 229 231 230 232 // Figure out if we're in no-quirks mode. 231 233 bool noQuirksMode = renderer()->document()->inNoQuirksMode(); 232 234 233 computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, noQuirksMode, textBoxDataMap);235 computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, setMaxAscent, setMaxDescent, noQuirksMode, textBoxDataMap); 234 236 235 237 if (maxAscent + maxDescent < max(maxPositionTop, maxPositionBottom)) -
trunk/WebKit/mac/ChangeLog
r72129 r72141 1 2010-11-16 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=11004 6 7 font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector. 8 Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size, 9 since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version 10 of the constructor rather than using [NSFont pointSize]. 11 12 https://bugs.webkit.org/show_bug.cgi?id=49582 13 14 Negative leading is not handled correctly. There are two bugs here. The first is that 15 maxAscent and maxDescent can be negative, so we need a notion of whether or not we have 16 set them before so that we can allow them to be < 0. 17 18 The second issue is that we should understand where fonts will end up relative to 19 our baseline (excluding line height), and only allow those boxes to impact ascent and 20 descent if the actual font box (without factoring in line height) is above or below the 21 root line box baseline. 22 23 Added fast/css/negative-leading.html 24 25 These two bug fixes have to land together to keep the Acid 3 test rendering correctly. 26 27 * Misc/WebKitNSStringExtras.mm: 28 (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): 29 (-[NSString _web_widthWithFont:]): 30 * Misc/WebStringTruncator.mm: 31 (fontFromNSFont): 32 * WebView/WebPreferences.mm: 33 (+[WebPreferences initialize]): 34 1 35 2010-11-16 Anders Carlsson <andersca@apple.com> 2 36 -
trunk/WebKit/mac/Misc/WebKitNSStringExtras.mm
r70143 r72141 89 89 CGContextScaleCTM(cgContext, 1, -1); 90 90 91 Font webCoreFont(FontPlatformData(font ), ![nsContext isDrawingToScreen], fontSmoothingIsAllowed ? AutoSmoothing : Antialiased);91 Font webCoreFont(FontPlatformData(font, [font pointSize]), ![nsContext isDrawingToScreen], fontSmoothingIsAllowed ? AutoSmoothing : Antialiased); 92 92 TextRun run(buffer.data(), length); 93 93 run.disableRoundingHacks(); … … 135 135 136 136 if (canUseFastRenderer(buffer.data(), length)) { 137 Font webCoreFont(FontPlatformData(font ), ![[NSGraphicsContext currentContext] isDrawingToScreen]);137 Font webCoreFont(FontPlatformData(font, [font pointSize]), ![[NSGraphicsContext currentContext] isDrawingToScreen]); 138 138 TextRun run(buffer.data(), length); 139 139 run.disableRoundingHacks(); -
trunk/WebKit/mac/Misc/WebStringTruncator.mm
r44520 r72141 59 59 currentFont = font; 60 60 CFRetain(currentFont); 61 FontPlatformData f(font );61 FontPlatformData f(font, [font pointSize]); 62 62 currentRenderer = Font(f, ![[NSGraphicsContext currentContext] isDrawingToScreen]); 63 63 return currentRenderer; -
trunk/WebKit/mac/WebView/WebPreferences.mm
r70751 r72141 306 306 @"Apple Chancery", WebKitCursiveFontPreferenceKey, 307 307 @"Papyrus", WebKitFantasyFontPreferenceKey, 308 @" 1", WebKitMinimumFontSizePreferenceKey,308 @"0", WebKitMinimumFontSizePreferenceKey, 309 309 @"9", WebKitMinimumLogicalFontSizePreferenceKey, 310 310 @"16", WebKitDefaultFontSizePreferenceKey, -
trunk/WebKit/win/ChangeLog
r72136 r72141 1 2010-11-16 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=11004 6 7 font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector. 8 Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size, 9 since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version 10 of the constructor rather than using [NSFont pointSize]. 11 12 https://bugs.webkit.org/show_bug.cgi?id=49582 13 14 Negative leading is not handled correctly. There are two bugs here. The first is that 15 maxAscent and maxDescent can be negative, so we need a notion of whether or not we have 16 set them before so that we can allow them to be < 0. 17 18 The second issue is that we should understand where fonts will end up relative to 19 our baseline (excluding line height), and only allow those boxes to impact ascent and 20 descent if the actual font box (without factoring in line height) is above or below the 21 root line box baseline. 22 23 Added fast/css/negative-leading.html 24 25 These two bug fixes have to land together to keep the Acid 3 test rendering correctly. 26 27 * WebPreferences.cpp: 28 (WebPreferences::initializeDefaultSettings): 29 1 30 2010-11-16 Steve Falkenburg <sfalken@apple.com> 2 31 -
trunk/WebKit/win/WebPreferences.cpp
r68166 r72141 191 191 CFDictionaryAddValue(defaults, CFSTR(WebKitCursiveFontPreferenceKey), CFSTR("Comic Sans MS")); 192 192 CFDictionaryAddValue(defaults, CFSTR(WebKitFantasyFontPreferenceKey), CFSTR("Comic Sans MS")); 193 CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumFontSizePreferenceKey), CFSTR(" 1"));193 CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumFontSizePreferenceKey), CFSTR("0")); 194 194 CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumLogicalFontSizePreferenceKey), CFSTR("9")); 195 195 CFDictionaryAddValue(defaults, CFSTR(WebKitDefaultFontSizePreferenceKey), CFSTR("16")); -
trunk/WebKit2/ChangeLog
r72131 r72141 1 2010-11-16 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 https://bugs.webkit.org/show_bug.cgi?id=11004 6 7 font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector. 8 Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size, 9 since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version 10 of the constructor rather than using [NSFont pointSize]. 11 12 https://bugs.webkit.org/show_bug.cgi?id=49582 13 14 Negative leading is not handled correctly. There are two bugs here. The first is that 15 maxAscent and maxDescent can be negative, so we need a notion of whether or not we have 16 set them before so that we can allow them to be < 0. 17 18 The second issue is that we should understand where fonts will end up relative to 19 our baseline (excluding line height), and only allow those boxes to impact ascent and 20 descent if the actual font box (without factoring in line height) is above or below the 21 root line box baseline. 22 23 Added fast/css/negative-leading.html 24 25 These two bug fixes have to land together to keep the Acid 3 test rendering correctly. 26 27 * Shared/WebPreferencesStore.cpp: 28 (WebKit::WebPreferencesStore::WebPreferencesStore): 29 1 30 2010-11-16 Anders Carlsson <andersca@apple.com> 2 31 -
trunk/WebKit2/Shared/WebPreferencesStore.cpp
r70680 r72141 48 48 , developerExtrasEnabled(false) 49 49 , fontSmoothingLevel(FontSmoothingLevelMedium) 50 , minimumFontSize( 1)50 , minimumFontSize(0) 51 51 , minimumLogicalFontSize(9) 52 52 , defaultFontSize(16)
Note: See TracChangeset
for help on using the changeset viewer.