diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/css')
12 files changed, 129 insertions, 91 deletions
diff --git a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp index 96aa0d7..b721f70 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -28,6 +28,7 @@ #include "CSSMutableStyleDeclaration.h" #include "CSSPrimitiveValue.h" #include "CSSPrimitiveValueMappings.h" +#include "CSSProperty.h" #include "CSSPropertyNames.h" #include "CSSReflectValue.h" #include "CSSTimingFunctionValue.h" @@ -1475,6 +1476,22 @@ void CSSComputedStyleDeclaration::removeComputedInheritablePropertiesFrom(CSSMut declaration->removePropertiesInSet(inheritableProperties, numInheritableProperties); } +bool CSSComputedStyleDeclaration::cssPropertyMatches(const CSSProperty* property) const +{ + if (property->id() == CSSPropertyFontSize && property->value()->isPrimitiveValue() && m_node) { + m_node->document()->updateLayoutIgnorePendingStylesheets(); + RenderStyle* style = m_node->computedStyle(); + if (style && style->fontDescription().keywordSize()) { + int sizeValue = cssIdentifierForFontSizeKeyword(style->fontDescription().keywordSize()); + CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(property->value()); + if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT && primitiveValue->getIdent() == sizeValue) + return true; + } + } + + return CSSStyleDeclaration::cssPropertyMatches(property); +} + PassRefPtr<CSSMutableStyleDeclaration> CSSComputedStyleDeclaration::copyInheritableProperties() const { RefPtr<CSSMutableStyleDeclaration> style = copyPropertiesInSet(inheritableProperties, numInheritableProperties); diff --git a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h index 23244e2..6f81b0e 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h +++ b/src/3rdparty/webkit/WebCore/css/CSSComputedStyleDeclaration.h @@ -59,6 +59,9 @@ public: static void removeComputedInheritablePropertiesFrom(CSSMutableStyleDeclaration*); +protected: + virtual bool cssPropertyMatches(const CSSProperty*) const; + private: CSSComputedStyleDeclaration(PassRefPtr<Node>); diff --git a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h index ece9fc5..8abeb4d 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h +++ b/src/3rdparty/webkit/WebCore/css/CSSPrimitiveValue.h @@ -157,7 +157,7 @@ public: DashboardRegion* getDashboardRegionValue() const { return m_type != CSS_DASHBOARD_REGION ? 0 : m_value.region; } int getIdent(); - template<typename T> operator T() const; // Defined in CSSPrimitiveValueMappings.h + template<typename T> inline operator T() const; // Defined in CSSPrimitiveValueMappings.h virtual bool parseString(const String&, bool = false); virtual String cssText() const; diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.cpp b/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.cpp index a35f817..404a978 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.cpp @@ -118,6 +118,12 @@ CSSRule* CSSStyleDeclaration::parentRule() const return (parent() && parent()->isRule()) ? static_cast<CSSRule*>(parent()) : 0; } +bool CSSStyleDeclaration::cssPropertyMatches(const CSSProperty* property) const +{ + RefPtr<CSSValue> value = getPropertyCSSValue(property->id()); + return value && value->cssText() == property->value()->cssText(); +} + void CSSStyleDeclaration::diff(CSSMutableStyleDeclaration* style) const { if (!style) @@ -128,8 +134,7 @@ void CSSStyleDeclaration::diff(CSSMutableStyleDeclaration* style) const CSSMutableStyleDeclaration::const_iterator end = style->end(); for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) { const CSSProperty& property = *it; - RefPtr<CSSValue> value = getPropertyCSSValue(property.id()); - if (value && (value->cssText() == property.value()->cssText())) + if (cssPropertyMatches(&property)) propertiesToRemove.append(property.id()); } } diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.h b/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.h index ef4cc21..18493df 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.h +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.h @@ -27,6 +27,7 @@ namespace WebCore { class CSSMutableStyleDeclaration; +class CSSProperty; class CSSRule; class CSSValue; @@ -72,6 +73,9 @@ public: protected: CSSStyleDeclaration(CSSRule* parentRule = 0); + + virtual bool cssPropertyMatches(const CSSProperty*) const; + }; } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.idl b/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.idl index 60020d9..f7ce37f 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.idl +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleDeclaration.idl @@ -23,7 +23,7 @@ module css { // Introduced in DOM Level 2: interface [ GenerateConstructor, - CustomPutFunction, + DelegatingPutFunction, HasNameGetter, HasIndexGetter, InterfaceUUID=9989b2c3-a2b6-449b-abf9-c60d2260b1d7, diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp index fbc8be3..ce4c343 100644 --- a/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp +++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSelector.cpp @@ -526,13 +526,13 @@ static void loadFullDefaultStyle() } // Strict-mode rules. - String defaultRules = String(html4UserAgentStyleSheet, sizeof(html4UserAgentStyleSheet)) + theme()->extraDefaultStyleSheet(); + String defaultRules = String(html4UserAgentStyleSheet, sizeof(html4UserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraDefaultStyleSheet(); CSSStyleSheet* defaultSheet = parseUASheet(defaultRules); defaultStyle->addRulesFromSheet(defaultSheet, screenEval()); defaultPrintStyle->addRulesFromSheet(defaultSheet, printEval()); // Quirks-mode rules. - String quirksRules = String(quirksUserAgentStyleSheet, sizeof(quirksUserAgentStyleSheet)) + theme()->extraQuirksStyleSheet(); + String quirksRules = String(quirksUserAgentStyleSheet, sizeof(quirksUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraQuirksStyleSheet(); CSSStyleSheet* quirksSheet = parseUASheet(quirksRules); defaultQuirksStyle->addRulesFromSheet(quirksSheet, screenEval()); } @@ -1138,7 +1138,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl static bool loadedMediaStyleSheet; if (!loadedMediaStyleSheet && (e->hasTagName(videoTag) || e->hasTagName(audioTag))) { loadedMediaStyleSheet = true; - String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet)) + theme()->extraMediaControlsStyleSheet(); + String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraMediaControlsStyleSheet(); CSSStyleSheet* mediaControlsSheet = parseUASheet(mediaRules); defaultStyle->addRulesFromSheet(mediaControlsSheet, screenEval()); defaultPrintStyle->addRulesFromSheet(mediaControlsSheet, printEval()); @@ -1520,7 +1520,7 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e) // Button, legend, input, select and textarea all consider width values of 'auto' to be 'intrinsic'. // This will be important when we use block flows for all form controls. if (e && (e->hasTagName(legendTag) || e->hasTagName(buttonTag) || e->hasTagName(inputTag) || - e->hasTagName(selectTag) || e->hasTagName(textareaTag) + e->hasTagName(selectTag) || e->hasTagName(textareaTag) || e->hasTagName(datagridTag) #if ENABLE(WML) || e->hasTagName(WMLNames::insertedLegendTag) || e->hasTagName(WMLNames::inputTag) @@ -1589,7 +1589,7 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e) // Let the theme also have a crack at adjusting the style. if (style->hasAppearance()) - theme()->adjustStyle(this, style, e, m_hasUAAppearance, m_borderData, m_backgroundData, m_backgroundColor); + RenderTheme::defaultTheme()->adjustStyle(this, style, e, m_hasUAAppearance, m_borderData, m_backgroundData, m_backgroundColor); #if ENABLE(SVG) if (e && e->isSVGElement()) { @@ -4292,7 +4292,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) m_lineHeightValue = 0; FontDescription fontDescription; - theme()->systemFont(primitiveValue->getIdent(), fontDescription); + RenderTheme::defaultTheme()->systemFont(primitiveValue->getIdent(), fontDescription); // Double-check and see if the theme did anything. If not, don't bother updating the font. if (fontDescription.isAbsoluteSize()) { @@ -5695,7 +5695,7 @@ static Color colorForCSSValue(int cssValueId) if (col->cssValueId == cssValueId) return col->color; } - return theme()->systemColor(cssValueId); + return RenderTheme::defaultTheme()->systemColor(cssValueId); } Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveValue) @@ -5718,7 +5718,7 @@ Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveV } else if (ident == CSSValueWebkitActivelink) col = m_element->document()->activeLinkColor(); else if (ident == CSSValueWebkitFocusRingColor) - col = focusRingColor(); + col = RenderTheme::defaultTheme()->focusRingColor(); else if (ident == CSSValueCurrentcolor) col = m_style->color(); else diff --git a/src/3rdparty/webkit/WebCore/css/html4.css b/src/3rdparty/webkit/WebCore/css/html4.css index 3e4d111..dc1f608 100644 --- a/src/3rdparty/webkit/WebCore/css/html4.css +++ b/src/3rdparty/webkit/WebCore/css/html4.css @@ -297,7 +297,7 @@ button { -webkit-appearance: button; } -input, textarea, keygen, select, button, isindex { +input, textarea, keygen, select, button, isindex, datagrid { margin: 0__qem; font: -webkit-small-control; color: initial; @@ -421,7 +421,9 @@ input[type="range"]::-webkit-slider-thumb { -webkit-appearance: sliderthumb-horizontal; } -input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, input[type="file"]:disabled::-webkit-file-upload-button, button:disabled, select:disabled, keygen:disabled, optgroup:disabled, option:disabled { +input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, +input[type="file"]:disabled::-webkit-file-upload-button, button:disabled, +select:disabled, keygen:disabled, optgroup:disabled, option:disabled, datagrid:disabled { color: GrayText } @@ -487,6 +489,20 @@ option { font-weight: normal; } +/* datagrid */ + +datagrid { + height: 150px; /* We don't use width:300px in CSS, since we want width:intrinsic and width:min-intrinsic to reset to 300 properly. */ + -webkit-appearance: datagrid; + -webkit-box-sizing: border-box; + -webkit-rtl-ordering: logical; + color: black; + background-color: white; + cursor: default; + border: 1px inset gray; + white-space: initial; +} + /* inline elements */ u, ins { diff --git a/src/3rdparty/webkit/WebCore/css/mediaControls.css b/src/3rdparty/webkit/WebCore/css/mediaControls.css index b94abbf..668458c 100644 --- a/src/3rdparty/webkit/WebCore/css/mediaControls.css +++ b/src/3rdparty/webkit/WebCore/css/mediaControls.css @@ -30,12 +30,16 @@ audio { } audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel { + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-user-select: none; position: absolute; bottom: 0; width: 100%; - height: 100%; - -webkit-user-select: none; z-index: 0; + overflow: hidden; + height: 16px; + text-align: right; } video:-webkit-full-page-media::-webkit-media-controls-panel { @@ -44,32 +48,26 @@ video:-webkit-full-page-media::-webkit-media-controls-panel { audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button { -webkit-appearance: media-mute-button; - position: absolute; - top: auto; - bottom: 0; - left: 0; - width: 17px; + display: -webkit-box; + width: 16px; height: 16px; } audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button { -webkit-appearance: media-play-button; - position: absolute; - top: auto; - bottom: 0; - left: 16px; - width: 17px; + display: -webkit-box; + width: 16px; height: 16px; } audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container { + -webkit-appearance: media-timeline-container; + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: center; + -webkit-box-pack: end; + -webkit-box-flex: 1; -webkit-user-select: none; - position: absolute; - padding: 0px 16px 0px 0px; - top: auto; - bottom: 0; - left: 32px; - right: 32px; height: 16px; } @@ -83,35 +81,27 @@ audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-contr audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { -webkit-appearance: media-slider; - position: absolute; - top: auto; - bottom: 0; - left: 0px; - right: 0px; + display: -webkit-box; + -webkit-box-flex: 1; height: 16px; padding: 0px 2px; } audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button { -webkit-appearance: media-seek-back-button; - position: absolute; - top: auto; - bottom: 0; - right: 16px; - width: 17px; + display: -webkit-box; + width: 16px; height: 16px; } audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button { -webkit-appearance: media-seek-forward-button; - position: absolute; - top: auto; - bottom: 0; - right: 0; - width: 17px; + display: -webkit-box; + width: 16px; height: 16px; } audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button { display: none; } + diff --git a/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css b/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css index 918c9bf..900dcf2 100644 --- a/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css +++ b/src/3rdparty/webkit/WebCore/css/mediaControlsQT.css @@ -22,7 +22,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* alternate media controls */ +/* alternate media controls - Extend mediaControls.css */ audio { width: 200px; @@ -30,47 +30,26 @@ audio { } audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel { - -webkit-user-select: none; - position: absolute; - bottom: 0; - width: 100%; - height: 100%; - z-index: 0; + /* In mediaControls.css */ + height: 25px; } video:-webkit-full-page-media::-webkit-media-controls-panel { - bottom: -16px; + bottom: -25px; } audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button { - -webkit-appearance: media-mute-button; - position: absolute; - top: auto; - bottom: 0; - right: 0; - left: auto; + -webkit-box-ordinal-group: 2; /* At the end of the controller bar */ width: 30px; height: 25px; } audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button { - -webkit-appearance: media-play-button; - position: absolute; - top: auto; - bottom: 0; - left: 0px; width: 30px; height: 25px; } audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container { - -webkit-appearance: media-timeline-container; - -webkit-user-select: none; - position: absolute; - top: auto; - bottom: 0; - left: 30px; - right: 30px; height: 25px; } @@ -78,17 +57,13 @@ audio::-webkit-media-controls-current-time-display, video::-webkit-media-control -webkit-appearance: media-current-time-display; -webkit-user-select: none; display: inline-block; - position: absolute; cursor: default; font: -webkit-small-control; font-size: .09em; text-align: center; overflow: hidden; line-height: 13px; - top: auto; - bottom: 6px; - left: 0px; - height: 13px; + height: 14px; width: 45px; } @@ -96,36 +71,28 @@ audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-contr -webkit-appearance: media-time-remaining-display; -webkit-user-select: none; display: inline-block; - position: absolute; cursor: default; font: -webkit-small-control; font-size: .09em; text-align: center; overflow: hidden; line-height: 13px; - top: auto; - bottom: 6px; - right: 0px; - height: 13px; + height: 14px; width: 45px; } audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { - -webkit-appearance: media-slider; - position: absolute; - top: auto; - bottom: 6px; - left: 45px; - right: 45px; height: 13px; } audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button { display: none; + width: 0px; } audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button { display: none; + width: 0px; } audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button { diff --git a/src/3rdparty/webkit/WebCore/css/themeChromiumLinux.css b/src/3rdparty/webkit/WebCore/css/themeChromiumLinux.css new file mode 100644 index 0000000..f8210c3 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/css/themeChromiumLinux.css @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2009 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* These styles override other user-agent styles for Chromium on Linux. */ + +select { + background-color: #dddddd; + border: 0px; +} diff --git a/src/3rdparty/webkit/WebCore/css/view-source.css b/src/3rdparty/webkit/WebCore/css/view-source.css index 20722ee..f898565 100644 --- a/src/3rdparty/webkit/WebCore/css/view-source.css +++ b/src/3rdparty/webkit/WebCore/css/view-source.css @@ -33,8 +33,8 @@ table { white-space: pre-wrap !important; margin: 0; word-break: break-word; - font-size: 10px; - font-family: Monaco, Lucida Console, monospace; + font-size: initial; + font-family: monospace; } td { |