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

mihaip at chromium.org mihaip at chromium.org
Wed Dec 22 13:40:37 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c419780bf2819fe819f8b080feecd4474f2d68ed
Author: mihaip at chromium.org <mihaip at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 23 02:08:30 2010 +0000

    2010-09-22  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] User style layout tests don't pass on Chromium
            https://bugs.webkit.org/show_bug.cgi?id=46069
    
            User style tests should now pass with the Chromium DRT since we now
            apply the styles immediately, just like the other ports (once we also
            remove some bad baselines for user-style-top-frame-only added by
            r62958).
    
            Tests still don't pass with test_shell until it starts to use
            InjectInExistingDocuments too.
    
            * platform/chromium-mac/userscripts/user-style-top-frame-only-expected.txt: Removed.
            * platform/chromium-win/userscripts/user-style-top-frame-only-expected.txt: Removed.
            * platform/chromium/drt_expectations.txt:
    2010-09-22  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] User style layout tests don't pass on Chromium
            https://bugs.webkit.org/show_bug.cgi?id=46069
    
            Instead of making resetUserStyleCacheInAllFrames be a no-op for
            Chromium, have it be controlled by a UserStyleInjectionTime enum.
    
            Also move the UserStyleSheet::Level enum to be inside
            UserStyleSheetTypes for consistency.
    
            * WebCore.exp.in:
            * dom/Document.cpp:
            (WebCore::Document::pageGroupUserSheets):
            * page/PageGroup.cpp:
            (WebCore::PageGroup::addUserStyleSheetToWorld):
            * page/PageGroup.h:
            * page/UserStyleSheet.h:
            (WebCore::UserStyleSheet::UserStyleSheet):
            (WebCore::UserStyleSheet::level):
            * page/UserStyleSheetTypes.h:
    2010-09-22  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] User style layout tests don't pass on Chromium
            https://bugs.webkit.org/show_bug.cgi?id=46069
    
            Expose UserStyleInjectionTime in WebView.
    
            * public/WebView.h:
            * src/WebViewImpl.cpp:
            (WebKit::WebView::addUserStyleSheet):
    2010-09-22  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] User style layout tests don't pass on Chromium
            https://bugs.webkit.org/show_bug.cgi?id=46069
    
            Fix a typo in LayoutTestController::addUserStyleSheet that was causing a
            crash the Chromium DRT. Pass InjectInExistingDocuments to mimic DRT
            behavior from other ports.
    
            * DumpRenderTree/chromium/LayoutTestController.cpp:
            (LayoutTestController::addUserStyleSheet):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b8f9897..9b4fa2c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-22  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] User style layout tests don't pass on Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=46069
+
+        User style tests should now pass with the Chromium DRT since we now
+        apply the styles immediately, just like the other ports (once we also
+        remove some bad baselines for user-style-top-frame-only added by 
+        r62958).
+        
+        Tests still don't pass with test_shell until it starts to use 
+        InjectInExistingDocuments too.
+
+        * platform/chromium-mac/userscripts/user-style-top-frame-only-expected.txt: Removed.
+        * platform/chromium-win/userscripts/user-style-top-frame-only-expected.txt: Removed.
+        * platform/chromium/drt_expectations.txt:
+        
 2010-09-22  Kinuko Yasuda  <kinuko at chromium.org>
 
         Unreviewed, temporarily disabling the new filesystem test on chromium.
diff --git a/LayoutTests/platform/chromium-mac/userscripts/user-style-top-frame-only-expected.txt b/LayoutTests/platform/chromium-mac/userscripts/user-style-top-frame-only-expected.txt
deleted file mode 100644
index ff1829e..0000000
--- a/LayoutTests/platform/chromium-mac/userscripts/user-style-top-frame-only-expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-2 thingers should appear on this page. Otherwise the test has failed.  
-
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-
-
---------
-Frame: '<!--framePath //<!--frame0-->/<!--frame0-->-->'
---------
diff --git a/LayoutTests/platform/chromium-win/userscripts/user-style-top-frame-only-expected.txt b/LayoutTests/platform/chromium-win/userscripts/user-style-top-frame-only-expected.txt
deleted file mode 100644
index f44be66..0000000
--- a/LayoutTests/platform/chromium-win/userscripts/user-style-top-frame-only-expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-2 thingers should appear on this page. Otherwise the test has failed.  
-
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-
-
---------
-Frame: '<!--framePath //<!--frame0-->/<!--frame0-->-->'
---------
diff --git a/LayoutTests/platform/chromium/drt_expectations.txt b/LayoutTests/platform/chromium/drt_expectations.txt
index 47a12c7..130e219 100644
--- a/LayoutTests/platform/chromium/drt_expectations.txt
+++ b/LayoutTests/platform/chromium/drt_expectations.txt
@@ -140,3 +140,7 @@ BUG_DRT WIN : fast/notifications/notifications-replace.html = TEXT
 // PASS with DRT though FAIL on test_shell
 BUG_DRT : platform/chromium/accessibility = PASS
 BUG_DRT : userscripts/user-script-top-frame-only.html = PASS
+BUG_DRT : userscripts/mixed-case-stylesheet.html = PASS
+BUG_DRT : userscripts/simple-stylesheet.html = PASS
+BUG_DRT : userscripts/user-style-all-frames.html = PASS
+BUG_DRT : userscripts/user-style-top-frame-only.html = PASS
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d204cdf..f764940 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-09-22  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] User style layout tests don't pass on Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=46069
+        
+        Instead of making resetUserStyleCacheInAllFrames be a no-op for
+        Chromium, have it be controlled by a UserStyleInjectionTime enum.
+        
+        Also move the UserStyleSheet::Level enum to be inside
+        UserStyleSheetTypes for consistency.
+
+        * WebCore.exp.in:
+        * dom/Document.cpp:
+        (WebCore::Document::pageGroupUserSheets):
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::addUserStyleSheetToWorld):
+        * page/PageGroup.h:
+        * page/UserStyleSheet.h:
+        (WebCore::UserStyleSheet::UserStyleSheet):
+        (WebCore::UserStyleSheet::level):
+        * page/UserStyleSheetTypes.h:
+
 2010-09-22  Ruben  <chromium at hybridsource.org>
 
         Reviewed by Tony Chang.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 208a645..2d976f4 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -828,7 +828,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_25UserContentInjectedFramesENS_14UserStyleLevelENS_22UserStyleInjectionTimeE
 __ZN7WebCore9PageGroup25removeUserScriptFromWorldEPNS_15DOMWrapperWorldERKNS_4KURLE
 __ZN7WebCore9PageGroup26removeUserScriptsFromWorldEPNS_15DOMWrapperWorldE
 __ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 1bac384..367fbf4 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -2308,7 +2308,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(sheet->level() == UserStyleUserLevel);
             parsedSheet->parseString(sheet->source(), !inQuirksMode());
             if (!m_pageGroupUserSheets)
                 m_pageGroupUserSheets.set(new Vector<RefPtr<CSSStyleSheet> >);
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index 4c9403b..8b902c0 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -240,7 +240,8 @@ 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)
+                                         UserStyleLevel level,
+                                         UserStyleInjectionTime injectionTime)
 {
     ASSERT_ARG(world, world);
 
@@ -252,7 +253,8 @@ void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& s
         styleSheetsInWorld = new UserStyleSheetVector;
     styleSheetsInWorld->append(userStyleSheet.release());
 
-    resetUserStyleCacheInAllFrames();
+    if (injectionTime == InjectInExistingDocuments)
+        resetUserStyleCacheInAllFrames();
 }
 
 void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const KURL& url)
@@ -358,14 +360,12 @@ void PageGroup::removeAllUserContent()
 
 void PageGroup::resetUserStyleCacheInAllFrames()
 {
-#if !PLATFORM(CHROMIUM)
     // Clear our cached sheets and have them just reparse.
     HashSet<Page*>::const_iterator end = m_pages.end();
     for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
         for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
             frame->document()->updatePageGroupUserSheets();
     }
-#endif
 }
 
 } // namespace WebCore
diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h
index fcad773..cc47fba 100644
--- a/WebCore/page/PageGroup.h
+++ b/WebCore/page/PageGroup.h
@@ -83,8 +83,8 @@ namespace WebCore {
         void addUserStyleSheetToWorld(DOMWrapperWorld*, const String& source, const KURL&,
                                       PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
                                       UserContentInjectedFrames,
-                                      UserStyleSheet::Level level = UserStyleSheet::UserLevel);
-
+                                      UserStyleLevel level = UserStyleUserLevel,
+                                      UserStyleInjectionTime injectionTime = InjectInExistingDocuments);
         void removeUserScriptFromWorld(DOMWrapperWorld*, const KURL&);
         void removeUserStyleSheetFromWorld(DOMWrapperWorld*, const KURL&);
 
diff --git a/WebCore/page/UserStyleSheet.h b/WebCore/page/UserStyleSheet.h
index 1acd296..fa42e2c 100644
--- a/WebCore/page/UserStyleSheet.h
+++ b/WebCore/page/UserStyleSheet.h
@@ -37,14 +37,9 @@ 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, UserStyleLevel level)
         : m_source(source)
         , m_url(url)
         , m_whitelist(whitelist)
@@ -59,7 +54,7 @@ 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; }
+    UserStyleLevel level() const { return m_level; }
 
 private:
     String m_source;
@@ -67,7 +62,7 @@ private:
     OwnPtr<Vector<String> > m_whitelist;
     OwnPtr<Vector<String> > m_blacklist;
     UserContentInjectedFrames m_injectedFrames;
-    Level m_level;
+    UserStyleLevel m_level;
 };
 
 } // namespace WebCore
diff --git a/WebCore/page/UserStyleSheetTypes.h b/WebCore/page/UserStyleSheetTypes.h
index ef662f2..eda6604 100644
--- a/WebCore/page/UserStyleSheetTypes.h
+++ b/WebCore/page/UserStyleSheetTypes.h
@@ -31,6 +31,9 @@
 
 namespace WebCore {
 
+enum UserStyleInjectionTime { InjectInExistingDocuments, InjectInSubsequentDocuments };
+enum UserStyleLevel { UserStyleUserLevel, UserStyleAuthorLevel };
+
 class DOMWrapperWorld;
 class UserStyleSheet;
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 02f51e0..7b65891 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-22  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] User style layout tests don't pass on Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=46069
+        
+        Expose UserStyleInjectionTime in WebView.
+
+        * public/WebView.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebView::addUserStyleSheet):
+
 2010-09-22  James Robinson  <jamesr at chromium.org>
 
         [chromium] Re-synchronizes features.gypi with upstream feature_overrides.gypi.
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index b0d0864..fb4a2d6 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -65,6 +65,13 @@ public:
         UserContentInjectInAllFrames,
         UserContentInjectInTopFrameOnly
     };
+    
+    // Controls which documents user styles are injected into.
+    enum UserStyleInjectionTime {
+        UserStyleInjectInExistingDocuments,
+        UserStyleInjectInSubsequentDocuments
+    };
+    
 
     // Initialization ------------------------------------------------------
 
@@ -328,7 +335,8 @@ public:
                                          UserContentInjectIn injectIn);
     WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode,
                                              const WebVector<WebString>& patterns,
-                                             UserContentInjectIn injectIn);
+                                             UserContentInjectIn injectIn,
+                                             UserStyleInjectionTime injectionTime = UserStyleInjectInSubsequentDocuments);
     WEBKIT_API static void removeAllUserContent();
 
     // Modal dialog support ------------------------------------------------
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index c04fbf1..f3b8f5a 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -49,6 +49,7 @@
 #include "TextAffinity.h"
 #include "UserContentTypes.h"
 #include "UserScriptTypes.h"
+#include "UserStyleSheetTypes.h"
 #include "VideoFrameChromium.h"
 #include "WebAccessibilityObject.h"
 #include "WebApplicationCacheHost.h"
@@ -353,6 +354,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentStart, InjectAtD
 COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentEnd, InjectAtDocumentEnd);
 COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInAllFrames, InjectInAllFrames);
 COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInTopFrameOnly);
+COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInExistingDocuments, InjectInExistingDocuments);
+COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInSubsequentDocuments, InjectInSubsequentDocuments);
 
 COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType);
 COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index a255040..b467517 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -2015,7 +2015,8 @@ void WebView::addUserScript(const WebString& sourceCode,
 
 void WebView::addUserStyleSheet(const WebString& sourceCode,
                                 const WebVector<WebString>& patternsIn,
-                                WebView::UserContentInjectIn injectIn)
+                                WebView::UserContentInjectIn injectIn,
+                                WebView::UserStyleInjectionTime injectionTime)
 {
     OwnPtr<Vector<String> > patterns(new Vector<String>);
     for (size_t i = 0; i < patternsIn.size(); ++i)
@@ -2030,7 +2031,8 @@ void WebView::addUserStyleSheet(const WebString& sourceCode,
     // 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);
+                                        UserStyleAuthorLevel,
+                                        static_cast<WebCore::UserStyleInjectionTime>(injectionTime));
 }
 
 void WebView::removeAllUserContent()
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 20b8a04..fe0c786 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-22  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] User style layout tests don't pass on Chromium
+        https://bugs.webkit.org/show_bug.cgi?id=46069
+
+        Fix a typo in LayoutTestController::addUserStyleSheet that was causing a
+        crash the Chromium DRT. Pass InjectInExistingDocuments to mimic DRT
+        behavior from other ports.
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::addUserStyleSheet):
+
 2010-09-22  Brent Fulgham  <bfulgham at webkit.org>
 
         Reviewed by Martin Robinson.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 2c6c600..b1c0bcd 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -1443,7 +1443,10 @@ void LayoutTestController::addUserStyleSheet(const CppArgumentList& arguments, C
         return;
     WebView::addUserStyleSheet(
         cppVariantToWebString(arguments[0]), WebVector<WebString>(),
-        arguments[2].toBoolean() ? WebView::UserContentInjectInAllFrames : WebView::UserContentInjectInTopFrameOnly);
+        arguments[1].toBoolean() ? WebView::UserContentInjectInAllFrames : WebView::UserContentInjectInTopFrameOnly,
+        // Chromium defaults to InjectInSubsequentDocuments, but for compatibility
+        // with the other ports' DRTs, we use UserStyleInjectInExistingDocuments.
+        WebView::UserStyleInjectInExistingDocuments);
 }
 
 void LayoutTestController::setEditingBehavior(const CppArgumentList& arguments, CppVariant* results)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list