Commit c3394ad3 authored by joepeck@webkit.org's avatar joepeck@webkit.org

2011-04-06 Joseph Pecoraro <joepeck@webkit.org>

        Reviewed by Antti Koivisto.

        Add <head> to the simpleUserAgentStyleSheet
        https://bugs.webkit.org/show_bug.cgi?id=57915

        * css/CSSStyleSelector.cpp:
        (WebCore::elementCanUseSimpleDefaultStyle): add head to the
        simple stylesheet, display:none.

git-svn-id: svn://svn.chromium.org/blink/trunk@83032 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3b5f538c
2011-04-06 Joseph Pecoraro <joepeck@webkit.org>
Reviewed by Antti Koivisto.
Add <head> to the simpleUserAgentStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=57915
* css/CSSStyleSelector.cpp:
(WebCore::elementCanUseSimpleDefaultStyle): add head to the
simple stylesheet, display:none.
2011-04-05 Mikhail Naganov <mnaganov@chromium.org> 2011-04-05 Mikhail Naganov <mnaganov@chromium.org>
Reviewed by Pavel Feldman. Reviewed by Pavel Feldman.
...@@ -439,11 +439,11 @@ RenderStyle* CSSStyleSelector::s_styleNotYetAvailable; ...@@ -439,11 +439,11 @@ RenderStyle* CSSStyleSelector::s_styleNotYetAvailable;
static void loadFullDefaultStyle(); static void loadFullDefaultStyle();
static void loadSimpleDefaultStyle(); static void loadSimpleDefaultStyle();
// FIXME: It would be nice to use some mechanism that guarantees this is in sync with the real UA stylesheet. // FIXME: It would be nice to use some mechanism that guarantees this is in sync with the real UA stylesheet.
static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}body{margin:8px}div:focus,span:focus{outline:auto 5px -webkit-focus-ring-color}a:-webkit-any-link{color:-webkit-link;text-decoration:underline}a:-webkit-any-link:active{color:-webkit-activelink}"; static const char* simpleUserAgentStyleSheet = "html,body,div{display:block}head{display:none}body{margin:8px}div:focus,span:focus{outline:auto 5px -webkit-focus-ring-color}a:-webkit-any-link{color:-webkit-link;text-decoration:underline}a:-webkit-any-link:active{color:-webkit-activelink}";
static inline bool elementCanUseSimpleDefaultStyle(Element* e) static inline bool elementCanUseSimpleDefaultStyle(Element* e)
{ {
return e->hasTagName(htmlTag) || e->hasTagName(bodyTag) || e->hasTagName(divTag) || e->hasTagName(spanTag) || e->hasTagName(brTag) || e->hasTagName(aTag); return e->hasTagName(htmlTag) || e->hasTagName(headTag) || e->hasTagName(bodyTag) || e->hasTagName(divTag) || e->hasTagName(spanTag) || e->hasTagName(brTag) || e->hasTagName(aTag);
} }
static inline void collectSiblingRulesInDefaultStyle() static inline void collectSiblingRulesInDefaultStyle()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment