[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aa at chromium.org aa at chromium.org
Wed Dec 22 11:56:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 815a156a114e12c93bfd90c766606061f41fa4c4
Author: aa at chromium.org <aa at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 11 22:54:35 2010 +0000

    2010-08-11  Kenneth Russell  <kbr at google.com>
    
            Reviewed by Dimitri Glazkov.
    
            Remove obsolete texImage2D and texSubImage2D entry points
            https://bugs.webkit.org/show_bug.cgi?id=40320
    
            No new tests; covered by existing WebGL tests.
    
            * html/canvas/WebGLRenderingContext.cpp:
            * html/canvas/WebGLRenderingContext.h:
            * html/canvas/WebGLRenderingContext.idl:
    2010-08-11  James Hawkins  <jhawkins at chromium.org>
    
            Reviewed by Dmitry Titov.
    
            [Chromium] Notify the WebFrameClient when the frame is detached from
            the view. This is used to clear the cached frame in the FormManager.
            Eventually this will be removed once handling forms is moved into
            WebCore.
            https://bugs.webkit.org/show_bug.cgi?id=43648
    
            * public/WebFrameClient.h:
            (WebKit::WebFrameClient::frameDetached):
            * src/FrameLoaderClientImpl.cpp:
            (WebKit::FrameLoaderClientImpl::detachedFromParent3):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65193 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8665647..33e47d9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -55,26 +55,6 @@
         * svg/graphics/SVGImage.cpp:
         (WebCore::SVGImage::dataChanged):
 
-2010-08-10  Aaron Boodman  <aa at chromium.org>
-
-        Reviewed by David Hyatt.
-
-        Make the cascade level of "user" styles configurable
-        https://bugs.webkit.org/show_bug.cgi?id=43457
-
-        * css/CSSStyleSelector.cpp:
-        (WebCore::CSSStyleSelector::CSSStyleSelector): Handle the case where user styles might have author level. Minor refactor.
-        * dom/Document.cpp:
-        (WebCore::Document::pageGroupUserSheets): Set isUserStyle on created stylesheet objects appropriately.
-        * page/PageGroup.cpp:
-        (WebCore::PageGroup::addUserStyleSheetToWorld): Add new optional "level" argument.
-        * page/PageGroup.h: Ditto.
-        * page/UserStyleSheet.h: Add level property.
-        (WebCore::UserStyleSheet::):
-        (WebCore::UserStyleSheet::UserStyleSheet):
-        (WebCore::UserStyleSheet::setLevel):
-        (WebCore::UserStyleSheet::level):
-
 2010-08-11  Rob Buis  <rwlbuis at gmail.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 1369296..2da4dee 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -820,7 +820,7 @@ __ZN7WebCore9PageGroup18addVisitedLinkHashEy
 __ZN7WebCore9PageGroup20addUserScriptToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLENS3_10PassOwnPtrINS3_6VectorIS4_Lm0EEEEESD_NS_23UserScriptInjectionTimeENS_25UserContentInjectedFramesE
 __ZN7WebCore9PageGroup20removeAllUserContentEv
 __ZN7WebCore9PageGroup21removeAllVisitedLinksEv
-__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLENS3_10PassOwnPtrINS3_6VectorIS4_Lm0EEEEESD_NS_25UserContentInjectedFramesENS_14UserStyleSheet5LevelE
+__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLENS3_10PassOwnPtrINS3_6VectorIS4_Lm0EEEEESD_NS_25UserContentInjectedFramesE
 __ZN7WebCore9PageGroup25removeUserScriptFromWorldEPNS_15DOMWrapperWorldERKNS_4KURLE
 __ZN7WebCore9PageGroup26removeUserScriptsFromWorldEPNS_15DOMWrapperWorldE
 __ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 74a97b4..2da4222 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -460,37 +460,32 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
         m_medium = new MediaQueryEvaluator(view->mediaType(), view->frame(), m_rootDefaultStyle.get());
     }
 
-    m_authorStyle = new CSSRuleSet();
-
     // FIXME: This sucks! The user sheet is reparsed every time!
-    OwnPtr<CSSRuleSet> tempUserStyle(new CSSRuleSet);
-    if (pageUserSheet)
-        tempUserStyle->addRulesFromSheet(pageUserSheet, *m_medium, this);
-    if (pageGroupUserSheets) {
-        unsigned length = pageGroupUserSheets->size();
-        for (unsigned i = 0; i < length; i++) {
-            if (pageGroupUserSheets->at(i)->isUserStyleSheet())
-                tempUserStyle->addRulesFromSheet(pageGroupUserSheets->at(i).get(), *m_medium, this);
-            else
-                m_authorStyle->addRulesFromSheet(pageGroupUserSheets->at(i).get(), *m_medium, this);
+    if (pageUserSheet || pageGroupUserSheets) {
+        m_userStyle = new CSSRuleSet();
+        if (pageUserSheet)
+            m_userStyle->addRulesFromSheet(pageUserSheet, *m_medium, this);
+        if (pageGroupUserSheets) {
+            unsigned length = pageGroupUserSheets->size();
+            for (unsigned i = 0; i < length; i++)
+                m_userStyle->addRulesFromSheet(pageGroupUserSheets->at(i).get(), *m_medium, this);
         }
     }
 
-    if (tempUserStyle->m_ruleCount > 0)
-        m_userStyle = tempUserStyle.leakPtr();
-
+    // add stylesheets from document
+    m_authorStyle = new CSSRuleSet();
+    
     // Add rules from elements like SVG's <font-face>
     if (mappedElementSheet)
         m_authorStyle->addRulesFromSheet(mappedElementSheet, *m_medium, this);
 
-    // add stylesheets from document
     unsigned length = styleSheets->length();
     for (unsigned i = 0; i < length; i++) {
         StyleSheet* sheet = styleSheets->item(i);
         if (sheet->isCSSStyleSheet() && !sheet->disabled())
             m_authorStyle->addRulesFromSheet(static_cast<CSSStyleSheet*>(sheet), *m_medium, this);
     }
-
+    
     if (doc->renderer() && doc->renderer()->style())
         doc->renderer()->style()->font().update(fontSelector());
 }
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 59b7d6d..d08e71b 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -2225,7 +2225,7 @@ const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const
             if (!UserContentURLPattern::matchesPatterns(url(), sheet->whitelist(), sheet->blacklist()))
                 continue;
             RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::createInline(const_cast<Document*>(this), sheet->url());
-            parsedSheet->setIsUserStyleSheet(sheet->level() == UserStyleSheet::UserLevel);
+            parsedSheet->setIsUserStyleSheet(true);
             parsedSheet->parseString(sheet->source(), !inCompatMode());
             if (!m_pageGroupUserSheets)
                 m_pageGroupUserSheets.set(new Vector<RefPtr<CSSStyleSheet> >);
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index e39b812..12b1a41 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -236,12 +236,11 @@ void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& sourc
 
 void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& source, const KURL& url,
                                          PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
-                                         UserContentInjectedFrames injectedFrames,
-                                         UserStyleSheet::Level level)
+                                         UserContentInjectedFrames injectedFrames)
 {
     ASSERT_ARG(world, world);
 
-    OwnPtr<UserStyleSheet> userStyleSheet(new UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level));
+    OwnPtr<UserStyleSheet> userStyleSheet(new UserStyleSheet(source, url, whitelist, blacklist, injectedFrames));
     if (!m_userStyleSheets)
         m_userStyleSheets.set(new UserStyleSheetMap);
     UserStyleSheetVector*& styleSheetsInWorld = m_userStyleSheets->add(world, 0).first->second;
diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h
index 779704c..95db8c3 100644
--- a/WebCore/page/PageGroup.h
+++ b/WebCore/page/PageGroup.h
@@ -80,8 +80,7 @@ namespace WebCore {
                                   UserScriptInjectionTime, UserContentInjectedFrames);
         void addUserStyleSheetToWorld(DOMWrapperWorld*, const String& source, const KURL&,
                                       PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
-                                      UserContentInjectedFrames,
-                                      UserStyleSheet::Level level = UserStyleSheet::UserLevel);
+                                      UserContentInjectedFrames);
 
         void removeUserScriptFromWorld(DOMWrapperWorld*, const KURL&);
         void removeUserStyleSheetFromWorld(DOMWrapperWorld*, const KURL&);
diff --git a/WebCore/page/UserStyleSheet.h b/WebCore/page/UserStyleSheet.h
index 1acd296..4c6d708 100644
--- a/WebCore/page/UserStyleSheet.h
+++ b/WebCore/page/UserStyleSheet.h
@@ -37,20 +37,14 @@ namespace WebCore {
 
 class UserStyleSheet : public Noncopyable {
 public:
-    enum Level {
-        UserLevel,
-        AuthorLevel
-    };
-
     UserStyleSheet(const String& source, const KURL& url,
                    PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
-                   UserContentInjectedFrames injectedFrames, Level level)
+                   UserContentInjectedFrames injectedFrames)
         : m_source(source)
         , m_url(url)
         , m_whitelist(whitelist)
         , m_blacklist(blacklist)
         , m_injectedFrames(injectedFrames)
-        , m_level(level)
     {
     }
 
@@ -59,7 +53,6 @@ public:
     const Vector<String>* whitelist() const { return m_whitelist.get(); }
     const Vector<String>* blacklist() const { return m_blacklist.get(); }
     UserContentInjectedFrames injectedFrames() const { return m_injectedFrames; }
-    Level level() const { return m_level; }
 
 private:
     String m_source;
@@ -67,7 +60,6 @@ private:
     OwnPtr<Vector<String> > m_whitelist;
     OwnPtr<Vector<String> > m_blacklist;
     UserContentInjectedFrames m_injectedFrames;
-    Level m_level;
 };
 
 } // namespace WebCore
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index b5247d5..94acc55 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,13 +1,3 @@
-2010-08-10  Aaron Boodman  <aa at chromium.org>
-
-        Reviewed by David Hyatt.
-
-        Make the cascade level of "user" styles configurable
-        https://bugs.webkit.org/show_bug.cgi?id=43457
-
-        * src/WebViewImpl.cpp:
-        (WebKit::WebView::addUserStyleSheet): Send "author" for the css level of user styles.
-
 2010-08-11  James Hawkins  <jhawkins at chromium.org>
 
         Reviewed by Dmitry Titov.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 62b20d5..8733a2a 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -1949,14 +1949,8 @@ void WebView::addUserStyleSheet(const WebString& sourceCode,
 
     PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName);
     RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create());
-
-    // FIXME: Current callers always want the level to be "author". It probably makes sense to let
-    // callers specify this though, since in other cases the caller will probably want "user" level.
-    //
-    // FIXME: It would be nice to populate the URL correctly, instead of passing an empty URL.
     pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0,
-                                        static_cast<UserContentInjectedFrames>(injectIn),
-                                        UserStyleSheet::AuthorLevel);
+                                        static_cast<UserContentInjectedFrames>(injectIn));
 }
 
 void WebView::removeAllUserContent()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list