summaryrefslogtreecommitdiffstats
path: root/WebCore/css
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/css')
-rw-r--r--WebCore/css/CSSCanvasValue.cpp8
-rw-r--r--WebCore/css/CSSImageGeneratorValue.cpp26
-rw-r--r--WebCore/css/CSSImageGeneratorValue.h5
-rw-r--r--WebCore/css/CSSImportRule.cpp19
-rw-r--r--WebCore/css/CSSParser.cpp27
-rw-r--r--WebCore/css/CSSPrimitiveValue.cpp4
-rw-r--r--WebCore/css/CSSPrimitiveValue.h2
-rw-r--r--WebCore/css/CSSPrimitiveValueMappings.h7
-rw-r--r--WebCore/css/CSSRuleList.idl3
-rw-r--r--WebCore/css/CSSSelector.cpp5
-rw-r--r--WebCore/css/CSSSelector.h1
-rw-r--r--WebCore/css/CSSStyleDeclaration.idl3
-rw-r--r--WebCore/css/CSSStyleSelector.cpp118
-rw-r--r--WebCore/css/CSSValueKeywords.in1
-rw-r--r--WebCore/css/StyleSheetList.idl3
-rw-r--r--WebCore/css/WCSSPropertyNames.in4
-rw-r--r--WebCore/css/WCSSValueKeywords.in1
-rw-r--r--WebCore/css/html.css4
18 files changed, 50 insertions, 191 deletions
diff --git a/WebCore/css/CSSCanvasValue.cpp b/WebCore/css/CSSCanvasValue.cpp
index 0c1c3f9..cf8cb42 100644
--- a/WebCore/css/CSSCanvasValue.cpp
+++ b/WebCore/css/CSSCanvasValue.cpp
@@ -47,15 +47,15 @@ String CSSCanvasValue::cssText() const
void CSSCanvasValue::canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect)
{
IntRect imageChangeRect = enclosingIntRect(changedRect);
- RenderObjectSizeCountMap::const_iterator end = m_clients.end();
- for (RenderObjectSizeCountMap::const_iterator curr = m_clients.begin(); curr != end; ++curr)
+ HashMap<RenderObject*, IntSize>::const_iterator end = m_clients.end();
+ for (HashMap<RenderObject*, IntSize>::const_iterator curr = m_clients.begin(); curr != end; ++curr)
curr->first->imageChanged(static_cast<WrappedImagePtr>(this), &imageChangeRect);
}
void CSSCanvasValue::canvasResized(HTMLCanvasElement*)
{
- RenderObjectSizeCountMap::const_iterator end = m_clients.end();
- for (RenderObjectSizeCountMap::const_iterator curr = m_clients.begin(); curr != end; ++curr)
+ HashMap<RenderObject*, IntSize>::const_iterator end = m_clients.end();
+ for (HashMap<RenderObject*, IntSize>::const_iterator curr = m_clients.begin(); curr != end; ++curr)
curr->first->imageChanged(static_cast<WrappedImagePtr>(this));
}
diff --git a/WebCore/css/CSSImageGeneratorValue.cpp b/WebCore/css/CSSImageGeneratorValue.cpp
index 4cf0873..6e23d95 100644
--- a/WebCore/css/CSSImageGeneratorValue.cpp
+++ b/WebCore/css/CSSImageGeneratorValue.cpp
@@ -49,42 +49,24 @@ void CSSImageGeneratorValue::addClient(RenderObject* renderer, const IntSize& si
ref();
if (!size.isEmpty())
m_sizes.add(size);
-
- RenderObjectSizeCountMap::iterator it = m_clients.find(renderer);
- if (it == m_clients.end())
- m_clients.add(renderer, SizeCountPair(size, 1));
- else {
- SizeCountPair& sizeCount = it->second;
- ++sizeCount.second;
- }
+ m_clients.add(renderer, size);
}
void CSSImageGeneratorValue::removeClient(RenderObject* renderer)
{
- RenderObjectSizeCountMap::iterator it = m_clients.find(renderer);
- ASSERT(it != m_clients.end());
-
- SizeCountPair& sizeCount = it->second;
- IntSize size = sizeCount.first;
+ IntSize size = m_clients.get(renderer);
if (!size.isEmpty()) {
m_sizes.remove(size);
if (!m_sizes.contains(size))
m_images.remove(size);
}
-
- if (!--sizeCount.second)
- m_clients.remove(renderer);
-
+ m_clients.remove(renderer);
deref();
}
Image* CSSImageGeneratorValue::getImage(RenderObject* renderer, const IntSize& size)
{
- RenderObjectSizeCountMap::iterator it = m_clients.find(renderer);
- ASSERT(it != m_clients.end());
-
- SizeCountPair& sizeCount = it->second;
- IntSize oldSize = sizeCount.first;
+ IntSize oldSize = m_clients.get(renderer);
if (oldSize != size) {
removeClient(renderer);
addClient(renderer, size);
diff --git a/WebCore/css/CSSImageGeneratorValue.h b/WebCore/css/CSSImageGeneratorValue.h
index c053bfe..661fd37 100644
--- a/WebCore/css/CSSImageGeneratorValue.h
+++ b/WebCore/css/CSSImageGeneratorValue.h
@@ -57,11 +57,8 @@ protected:
Image* getImage(RenderObject*, const IntSize&);
void putImage(const IntSize&, PassRefPtr<Image>);
- typedef pair<IntSize, int> SizeCountPair;
- typedef HashMap<RenderObject*, SizeCountPair> RenderObjectSizeCountMap;
-
HashCountedSet<IntSize> m_sizes; // A count of how many times a given image size is in use.
- RenderObjectSizeCountMap m_clients; // A map from RenderObjects (with entry count) to image sizes.
+ HashMap<RenderObject*, IntSize> m_clients; // A map from RenderObjects to image sizes.
HashMap<IntSize, RefPtr<Image> > m_images; // A cache of Image objects by image size.
RefPtr<StyleGeneratedImage> m_image;
diff --git a/WebCore/css/CSSImportRule.cpp b/WebCore/css/CSSImportRule.cpp
index adcfbb9..50e60f4 100644
--- a/WebCore/css/CSSImportRule.cpp
+++ b/WebCore/css/CSSImportRule.cpp
@@ -1,7 +1,7 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
* (C) 2002-2003 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2002, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2002, 2005, 2006, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,8 +26,6 @@
#include "DocLoader.h"
#include "Document.h"
#include "MediaList.h"
-#include "Settings.h"
-#include <wtf/StdLibExtras.h>
namespace WebCore {
@@ -62,20 +60,7 @@ void CSSImportRule::setCSSStyleSheet(const String& url, const String& charset, c
CSSStyleSheet* parent = parentStyleSheet();
bool strict = !parent || parent->useStrictParsing();
- String sheetText = sheet->sheetText(strict);
- m_styleSheet->parseString(sheetText, strict);
-
- if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
- // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
- DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
- DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
- if (url.endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
- ASSERT(m_styleSheet->length() == 1);
- ExceptionCode ec;
- m_styleSheet->deleteRule(0, ec);
- }
- }
-
+ m_styleSheet->parseString(sheet->sheetText(strict), strict);
m_loading = false;
if (parent)
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index b299fcf..b79992f 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -4,7 +4,6 @@
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
* Copyright (C) 2008 Eric Seidel <eric@webkit.org>
- * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -748,11 +747,7 @@ bool CSSParser::parseValue(int propId, bool important)
// inline | block | list-item | run-in | inline-block | table |
// inline-table | table-row-group | table-header-group | table-footer-group | table-row |
// table-column-group | table-column | table-cell | table-caption | box | inline-box | none | inherit
-#if ENABLE(WCSS)
- if ((id >= CSSValueInline && id <= CSSValueWapMarquee) || id == CSSValueNone)
-#else
if ((id >= CSSValueInline && id <= CSSValueWebkitInlineBox) || id == CSSValueNone)
-#endif
valid_primitive = true;
break;
@@ -1318,28 +1313,6 @@ bool CSSParser::parseValue(int propId, bool important)
else
valid_primitive = validUnit(value, FTime|FInteger|FNonNeg, m_strict);
break;
-#if ENABLE(WCSS)
- case CSSPropertyWapMarqueeDir:
- if (id == CSSValueLtr || id == CSSValueRtl)
- valid_primitive = true;
- break;
- case CSSPropertyWapMarqueeStyle:
- if (id == CSSValueNone || id == CSSValueSlide || id == CSSValueScroll || id == CSSValueAlternate)
- valid_primitive = true;
- break;
- case CSSPropertyWapMarqueeLoop:
- if (id == CSSValueInfinite)
- valid_primitive = true;
- else
- valid_primitive = validUnit(value, FInteger | FNonNeg, m_strict);
- break;
- case CSSPropertyWapMarqueeSpeed:
- if (id == CSSValueNormal || id == CSSValueSlow || id == CSSValueFast)
- valid_primitive = true;
- else
- valid_primitive = validUnit(value, FTime | FInteger | FNonNeg, m_strict);
- break;
-#endif
case CSSPropertyWebkitUserDrag: // auto | none | element
if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueElement)
valid_primitive = true;
diff --git a/WebCore/css/CSSPrimitiveValue.cpp b/WebCore/css/CSSPrimitiveValue.cpp
index 1f2c9ca..6343dac 100644
--- a/WebCore/css/CSSPrimitiveValue.cpp
+++ b/WebCore/css/CSSPrimitiveValue.cpp
@@ -643,7 +643,7 @@ Rect* CSSPrimitiveValue::getRectValue(ExceptionCode& ec) const
return m_value.rect;
}
-PassRefPtr<RGBColor> CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const
+RGBColor* CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const
{
ec = 0;
if (m_type != CSS_RGBCOLOR) {
@@ -652,7 +652,7 @@ PassRefPtr<RGBColor> CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) cons
}
// FIMXE: This should not return a new object for each invocation.
- return RGBColor::create(m_value.rgbcolor);
+ return RGBColor::create(m_value.rgbcolor).releaseRef();
}
Pair* CSSPrimitiveValue::getPairValue(ExceptionCode& ec) const
diff --git a/WebCore/css/CSSPrimitiveValue.h b/WebCore/css/CSSPrimitiveValue.h
index d417619..85a0ba3 100644
--- a/WebCore/css/CSSPrimitiveValue.h
+++ b/WebCore/css/CSSPrimitiveValue.h
@@ -152,7 +152,7 @@ public:
Rect* getRectValue(ExceptionCode&) const;
Rect* getRectValue() const { return m_type != CSS_RECT ? 0 : m_value.rect; }
- PassRefPtr<RGBColor> getRGBColorValue(ExceptionCode&) const;
+ RGBColor* getRGBColorValue(ExceptionCode&) const;
RGBA32 getRGBA32Value() const { return m_type != CSS_RGBCOLOR ? 0 : m_value.rgbcolor; }
Pair* getPairValue(ExceptionCode&) const;
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index be96407..69cfbb1 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -1,7 +1,6 @@
/*
* Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>.
* Copyright (C) 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -523,7 +522,6 @@ template<> inline CSSPrimitiveValue::operator EBoxOrient() const
case CSSValueInlineAxis:
return HORIZONTAL;
case CSSValueVertical:
- case CSSValueBlockAxis:
return VERTICAL;
default:
ASSERT_NOT_REACHED();
@@ -779,11 +777,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e)
case TABLE_CAPTION:
m_value.ident = CSSValueTableCaption;
break;
-#if ENABLE(WCSS)
- case WAP_MARQUEE:
- m_value.ident = CSSValueWapMarquee;
- break;
-#endif
case BOX:
m_value.ident = CSSValueWebkitBox;
break;
diff --git a/WebCore/css/CSSRuleList.idl b/WebCore/css/CSSRuleList.idl
index 9add078..224d6a1 100644
--- a/WebCore/css/CSSRuleList.idl
+++ b/WebCore/css/CSSRuleList.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,7 +27,6 @@ module css {
// Introduced in DOM Level 2:
interface [
- CustomMarkFunction,
GenerateConstructor,
HasIndexGetter,
InterfaceUUID=64c346a0-1e34-49d3-9472-57ec8e0fdccb,
diff --git a/WebCore/css/CSSSelector.cpp b/WebCore/css/CSSSelector.cpp
index 25dbd87..80910a7 100644
--- a/WebCore/css/CSSSelector.cpp
+++ b/WebCore/css/CSSSelector.cpp
@@ -77,7 +77,6 @@ void CSSSelector::extractPseudoType() const
DEFINE_STATIC_LOCAL(AtomicString, before, ("before"));
DEFINE_STATIC_LOCAL(AtomicString, checked, ("checked"));
DEFINE_STATIC_LOCAL(AtomicString, fileUploadButton, ("-webkit-file-upload-button"));
- DEFINE_STATIC_LOCAL(AtomicString, defaultString, ("default"));
DEFINE_STATIC_LOCAL(AtomicString, disabled, ("disabled"));
DEFINE_STATIC_LOCAL(AtomicString, readOnly, ("read-only"));
DEFINE_STATIC_LOCAL(AtomicString, readWrite, ("read-write"));
@@ -171,9 +170,7 @@ void CSSSelector::extractPseudoType() const
else if (m_value == fileUploadButton) {
m_pseudoType = PseudoFileUploadButton;
element = true;
- } else if (m_value == defaultString)
- m_pseudoType = PseudoDefault;
- else if (m_value == disabled)
+ } else if (m_value == disabled)
m_pseudoType = PseudoDisabled;
else if (m_value == readOnly)
m_pseudoType = PseudoReadOnly;
diff --git a/WebCore/css/CSSSelector.h b/WebCore/css/CSSSelector.h
index 53de50d..18251fd 100644
--- a/WebCore/css/CSSSelector.h
+++ b/WebCore/css/CSSSelector.h
@@ -126,7 +126,6 @@ namespace WebCore {
PseudoChecked,
PseudoEnabled,
PseudoFullPageMedia,
- PseudoDefault,
PseudoDisabled,
PseudoInputPlaceholder,
PseudoOptional,
diff --git a/WebCore/css/CSSStyleDeclaration.idl b/WebCore/css/CSSStyleDeclaration.idl
index 3e37418..f7ce37f 100644
--- a/WebCore/css/CSSStyleDeclaration.idl
+++ b/WebCore/css/CSSStyleDeclaration.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@ module css {
// Introduced in DOM Level 2:
interface [
- CustomMarkFunction,
GenerateConstructor,
DelegatingPutFunction,
HasNameGetter,
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 2f7d900..9074476 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -995,9 +995,6 @@ bool CSSStyleSelector::canShareStyleWithElement(Node* n)
if (s->isEnabledFormControl() != m_element->isEnabledFormControl())
return false;
-
- if (s->isDefaultButtonForForm() != m_element->isDefaultButtonForForm())
- return false;
}
if (style->transitions() || style->animations())
@@ -2361,8 +2358,6 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
case CSSSelector::PseudoFullPageMedia:
return e && e->document() && e->document()->isMediaDocument();
break;
- case CSSSelector::PseudoDefault:
- return e && e->isDefaultButtonForForm();
case CSSSelector::PseudoDisabled:
if (e && e->isFormControlElement()) {
InputElement* inputElement = toInputElement(e);
@@ -2996,26 +2991,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
case CSSPropertyDisplay:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(display, Display)
-#if ENABLE(WCSS)
- if (primitiveValue) {
- if (primitiveValue->getIdent() == CSSValueWapMarquee) {
- // Initialize Wap Marquee style
- m_style->setOverflowX(OMARQUEE);
- m_style->setOverflowY(OMARQUEE);
- m_style->setWhiteSpace(NOWRAP);
- m_style->setMarqueeDirection(MLEFT);
- m_style->setMarqueeSpeed(85); // Normal speed
- m_style->setMarqueeLoopCount(1);
- m_style->setMarqueeBehavior(MSCROLL);
-
- if (m_parentStyle)
- m_style->setDisplay(m_parentStyle->display());
- else
- m_style->setDisplay(*primitiveValue);
- } else
- m_style->setDisplay(*primitiveValue);
- }
-#endif
return;
case CSSPropertyEmptyCells:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(emptyCells, EmptyCells)
@@ -3779,6 +3754,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
{
FontDescription fontDescription = m_style->fontDescription();
fontDescription.setKeywordSize(0);
+ bool familyIsFixed = fontDescription.genericFamily() == FontDescription::MonospaceFamily;
float oldSize = 0;
float size = 0;
@@ -3793,7 +3769,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
if (m_parentNode)
fontDescription.setKeywordSize(m_parentStyle->fontDescription().keywordSize());
} else if (isInitial) {
- size = fontSizeForKeyword(CSSValueMedium, m_style->htmlHacks(), fontDescription.useFixedDefaultSize());
+ size = fontSizeForKeyword(CSSValueMedium, m_style->htmlHacks(), familyIsFixed);
fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
} else if (primitiveValue->getIdent()) {
// Keywords are being used.
@@ -3806,7 +3782,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSValueXLarge:
case CSSValueXxLarge:
case CSSValueWebkitXxxLarge:
- size = fontSizeForKeyword(primitiveValue->getIdent(), m_style->htmlHacks(), fontDescription.useFixedDefaultSize());
+ size = fontSizeForKeyword(primitiveValue->getIdent(), m_style->htmlHacks(), familyIsFixed);
fontDescription.setKeywordSize(primitiveValue->getIdent() - CSSValueXxSmall + 1);
break;
case CSSValueLarger:
@@ -4049,12 +4025,13 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
if (m_style->setFontDescription(fontDescription))
m_fontDirty = true;
return;
- } else if (isInitial) {
+ }
+ else if (isInitial) {
FontDescription initialDesc = FontDescription();
FontDescription fontDescription = m_style->fontDescription();
// We need to adjust the size to account for the generic family change from monospace
// to non-monospace.
- if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize())
+ if (fontDescription.keywordSize() && fontDescription.genericFamily() == FontDescription::MonospaceFamily)
setFontSize(fontDescription, fontSizeForKeyword(CSSValueXxSmall + fontDescription.keywordSize() - 1, m_style->htmlHacks(), false));
fontDescription.setGenericFamily(initialDesc.genericFamily());
if (!initialDesc.firstFamily().familyIsEmpty())
@@ -4064,23 +4041,21 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
}
- if (!value->isValueList())
- return;
+ if (!value->isValueList()) return;
FontDescription fontDescription = m_style->fontDescription();
- CSSValueList* list = static_cast<CSSValueList*>(value);
+ CSSValueList *list = static_cast<CSSValueList*>(value);
int len = list->length();
FontFamily& firstFamily = fontDescription.firstFamily();
- FontFamily* currFamily = 0;
+ FontFamily *currFamily = 0;
// Before mapping in a new font-family property, we should reset the generic family.
- bool oldFamilyUsedFixedDefaultSize = fontDescription.useFixedDefaultSize();
+ bool oldFamilyIsMonospace = fontDescription.genericFamily() == FontDescription::MonospaceFamily;
fontDescription.setGenericFamily(FontDescription::NoFamily);
for (int i = 0; i < len; i++) {
- CSSValue* item = list->itemWithoutBoundsCheck(i);
- if (!item->isPrimitiveValue())
- continue;
- CSSPrimitiveValue* val = static_cast<CSSPrimitiveValue*>(item);
+ CSSValue *item = list->itemWithoutBoundsCheck(i);
+ if (!item->isPrimitiveValue()) continue;
+ CSSPrimitiveValue *val = static_cast<CSSPrimitiveValue*>(item);
AtomicString face;
Settings* settings = m_checker.m_document->settings();
if (val->primitiveType() == CSSPrimitiveValue::CSS_STRING)
@@ -4112,32 +4087,28 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
break;
}
}
-
+
if (!face.isEmpty()) {
if (!currFamily) {
// Filling in the first family.
firstFamily.setFamily(face);
- firstFamily.appendFamily(0); // Remove any inherited family-fallback list.
currFamily = &firstFamily;
- } else {
+ }
+ else {
RefPtr<SharedFontFamily> newFamily = SharedFontFamily::create();
newFamily->setFamily(face);
currFamily->appendFamily(newFamily);
currFamily = newFamily.get();
}
+
+ if (fontDescription.keywordSize() && (fontDescription.genericFamily() == FontDescription::MonospaceFamily) != oldFamilyIsMonospace)
+ setFontSize(fontDescription, fontSizeForKeyword(CSSValueXxSmall + fontDescription.keywordSize() - 1, m_style->htmlHacks(), !oldFamilyIsMonospace));
+
+ if (m_style->setFontDescription(fontDescription))
+ m_fontDirty = true;
}
}
-
- // We can't call useFixedDefaultSize() until all new font families have been added
- // If currFamily is non-zero then we set at least one family on this description.
- if (currFamily) {
- if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize() != oldFamilyUsedFixedDefaultSize)
- setFontSize(fontDescription, fontSizeForKeyword(CSSValueXxSmall + fontDescription.keywordSize() - 1, m_style->htmlHacks(), !oldFamilyUsedFixedDefaultSize));
-
- if (m_style->setFontDescription(fontDescription))
- m_fontDirty = true;
- }
- return;
+ return;
}
case CSSPropertyTextDecoration: {
// list of ident
@@ -4771,9 +4742,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_style->setMarqueeLoopCount(m_parentStyle->marqueeLoopCount());
m_style->setMarqueeBehavior(m_parentStyle->marqueeBehavior());
return;
-#if ENABLE(WCSS)
- case CSSPropertyWapMarqueeLoop:
-#endif
case CSSPropertyWebkitMarqueeRepetition: {
HANDLE_INHERIT_AND_INITIAL(marqueeLoopCount, MarqueeLoopCount)
if (!primitiveValue)
@@ -4784,9 +4752,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_style->setMarqueeLoopCount(primitiveValue->getIntValue());
return;
}
-#if ENABLE(WCSS)
- case CSSPropertyWapMarqueeSpeed:
-#endif
case CSSPropertyWebkitMarqueeSpeed: {
HANDLE_INHERIT_AND_INITIAL(marqueeSpeed, MarqueeSpeed)
if (!primitiveValue)
@@ -4837,30 +4802,9 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
}
return;
}
-#if ENABLE(WCSS)
- case CSSPropertyWapMarqueeStyle:
-#endif
case CSSPropertyWebkitMarqueeStyle:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeBehavior, MarqueeBehavior)
return;
-#if ENABLE(WCSS)
- case CSSPropertyWapMarqueeDir:
- HANDLE_INHERIT_AND_INITIAL(marqueeDirection, MarqueeDirection)
- if (primitiveValue && primitiveValue->getIdent()) {
- switch (primitiveValue->getIdent()) {
- case CSSValueLtr:
- m_style->setMarqueeDirection(MRIGHT);
- break;
- case CSSValueRtl:
- m_style->setMarqueeDirection(MLEFT);
- break;
- default:
- m_style->setMarqueeDirection(*primitiveValue);
- break;
- }
- }
- return;
-#endif
case CSSPropertyWebkitMarqueeDirection:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeDirection, MarqueeDirection)
return;
@@ -5643,7 +5587,8 @@ void CSSStyleSelector::checkForGenericFamilyChange(RenderStyle* style, RenderSty
return;
const FontDescription& parentFont = parentStyle->fontDescription();
- if (childFont.useFixedDefaultSize() == parentFont.useFixedDefaultSize())
+
+ if (childFont.genericFamily() == parentFont.genericFamily())
return;
// For now, lump all families but monospace together.
@@ -5656,16 +5601,17 @@ void CSSStyleSelector::checkForGenericFamilyChange(RenderStyle* style, RenderSty
// If the font uses a keyword size, then we refetch from the table rather than
// multiplying by our scale factor.
float size;
- if (childFont.keywordSize())
- size = fontSizeForKeyword(CSSValueXxSmall + childFont.keywordSize() - 1, style->htmlHacks(), childFont.useFixedDefaultSize());
- else {
+ if (childFont.keywordSize()) {
+ size = fontSizeForKeyword(CSSValueXxSmall + childFont.keywordSize() - 1, style->htmlHacks(),
+ childFont.genericFamily() == FontDescription::MonospaceFamily);
+ } else {
Settings* settings = m_checker.m_document->settings();
float fixedScaleFactor = settings
? static_cast<float>(settings->defaultFixedFontSize()) / settings->defaultFontSize()
: 1;
- size = parentFont.useFixedDefaultSize() ?
- childFont.specifiedSize() / fixedScaleFactor :
- childFont.specifiedSize() * fixedScaleFactor;
+ size = (parentFont.genericFamily() == FontDescription::MonospaceFamily) ?
+ childFont.specifiedSize()/fixedScaleFactor :
+ childFont.specifiedSize()*fixedScaleFactor;
}
FontDescription newFontDescription(childFont);
diff --git a/WebCore/css/CSSValueKeywords.in b/WebCore/css/CSSValueKeywords.in
index 621276b..c0b52f2 100644
--- a/WebCore/css/CSSValueKeywords.in
+++ b/WebCore/css/CSSValueKeywords.in
@@ -260,7 +260,6 @@ table-cell
table-caption
-webkit-box
-webkit-inline-box
--wap-marquee
#none
#
# CSS_PROP_CURSOR:
diff --git a/WebCore/css/StyleSheetList.idl b/WebCore/css/StyleSheetList.idl
index 574d749..2abd22f 100644
--- a/WebCore/css/StyleSheetList.idl
+++ b/WebCore/css/StyleSheetList.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@ module stylesheets {
// Introduced in DOM Level 2:
interface [
- CustomMarkFunction,
GenerateConstructor,
HasIndexGetter,
HasNameGetter,
diff --git a/WebCore/css/WCSSPropertyNames.in b/WebCore/css/WCSSPropertyNames.in
deleted file mode 100644
index 704209f..0000000
--- a/WebCore/css/WCSSPropertyNames.in
+++ /dev/null
@@ -1,4 +0,0 @@
--wap-marquee-dir
--wap-marquee-loop
--wap-marquee-speed
--wap-marquee-style
diff --git a/WebCore/css/WCSSValueKeywords.in b/WebCore/css/WCSSValueKeywords.in
deleted file mode 100644
index 00657ba..0000000
--- a/WebCore/css/WCSSValueKeywords.in
+++ /dev/null
@@ -1 +0,0 @@
-# place holder for all WCSS specific CSS value keywords
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 3d0b667..6b03390 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -483,10 +483,6 @@ select[size="1"] {
white-space: pre;
}
-datalist {
- display: none;
-}
-
optgroup {
font-weight: bolder;
}