[webkit-changes] [145574] trunk/Source/WebCore

2013-03-12 Thread gavinp
Title: [145574] trunk/Source/WebCore








Revision 145574
Author gav...@chromium.org
Date 2013-03-12 12:43:41 -0700 (Tue, 12 Mar 2013)


Log Message
[chromium] Use lipo(1) rather than file(1) to list library architectures.
https://bugs.webkit.org/show_bug.cgi?id=47

Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
the architecture list of a library with an invocation of lipo(1), which should be more
stable.

Reviewed by Nico Weber.

No new tests, since adjust_visibility.sh doesn't have a test.

* WebCore.gyp/mac/adjust_visibility.sh:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.gyp/mac/adjust_visibility.sh




Diff

Modified: trunk/Source/WebCore/ChangeLog (145573 => 145574)

--- trunk/Source/WebCore/ChangeLog	2013-03-12 18:45:10 UTC (rev 145573)
+++ trunk/Source/WebCore/ChangeLog	2013-03-12 19:43:41 UTC (rev 145574)
@@ -1,3 +1,18 @@
+2013-03-12  Gavin Peters  
+
+[chromium] Use lipo(1) rather than file(1) to list library architectures.
+https://bugs.webkit.org/show_bug.cgi?id=47
+
+Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
+the architecture list of a library with an invocation of lipo(1), which should be more
+stable.
+
+Reviewed by Nico Weber.
+
+No new tests, since adjust_visibility.sh doesn't have a test.
+
+* WebCore.gyp/mac/adjust_visibility.sh:
+
 2013-03-12  Viatcheslav Ostapenko  
 
 Webkit unable to show gifs with applcation extension string shorter than 11 bytes


Modified: trunk/Source/WebCore/WebCore.gyp/mac/adjust_visibility.sh (145573 => 145574)

--- trunk/Source/WebCore/WebCore.gyp/mac/adjust_visibility.sh	2013-03-12 18:45:10 UTC (rev 145573)
+++ trunk/Source/WebCore/WebCore.gyp/mac/adjust_visibility.sh	2013-03-12 19:43:41 UTC (rev 145574)
@@ -55,7 +55,7 @@
 
 # ar doesn't operate on fat files.  Figure out what architectures are
 # involved.
-ARCHS=$(file "${INPUT}" | sed -Ene 's/^.*\(for architecture (.+)\):.*$/\1/p')
+ARCHS=$(lipo -info "${INPUT}" | sed -Ene 's/^.* are: (.+)/\1/p')
 if [ -z "${ARCHS}" ] ; then
   ARCHS=self
 fi






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [142170] trunk/Source/WebCore

2013-02-07 Thread gavinp
Title: [142170] trunk/Source/WebCore








Revision 142170
Author gav...@chromium.org
Date 2013-02-07 13:26:41 -0800 (Thu, 07 Feb 2013)


Log Message
Unreviewed, rolling out r142155.
http://trac.webkit.org/changeset/142155
https://bugs.webkit.org/show_bug.cgi?id=82888

cr/win build broke.

* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::types):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::typesAccessorGetter):
* dom/Clipboard.h:
(Clipboard):
* platform/blackberry/ClipboardBlackBerry.cpp:
(WebCore::ClipboardBlackBerry::types):
* platform/blackberry/ClipboardBlackBerry.h:
(ClipboardBlackBerry):
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::types):
* platform/chromium/ChromiumDataObject.h:
(ChromiumDataObject):
* platform/chromium/ClipboardChromium.cpp:
(WebCore::ClipboardChromium::types):
* platform/chromium/ClipboardChromium.h:
(ClipboardChromium):
* platform/efl/ClipboardEfl.cpp:
(WebCore::ClipboardEfl::types):
* platform/efl/ClipboardEfl.h:
(ClipboardEfl):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::ClipboardGtk::types):
* platform/gtk/ClipboardGtk.h:
(ClipboardGtk):
* platform/mac/ClipboardMac.h:
(ClipboardMac):
* platform/mac/ClipboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::ClipboardMac::types):
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::types):
* platform/qt/ClipboardQt.h:
(ClipboardQt):
* platform/win/ClipboardWin.cpp:
(WebCore::addMimeTypesForFormat):
(WebCore::ClipboardWin::types):
* platform/win/ClipboardWin.h:
(ClipboardWin):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/js/JSClipboardCustom.cpp
trunk/Source/WebCore/bindings/v8/custom/V8ClipboardCustom.cpp
trunk/Source/WebCore/dom/Clipboard.h
trunk/Source/WebCore/platform/blackberry/ClipboardBlackBerry.cpp
trunk/Source/WebCore/platform/blackberry/ClipboardBlackBerry.h
trunk/Source/WebCore/platform/chromium/ChromiumDataObject.cpp
trunk/Source/WebCore/platform/chromium/ChromiumDataObject.h
trunk/Source/WebCore/platform/chromium/ClipboardChromium.cpp
trunk/Source/WebCore/platform/chromium/ClipboardChromium.h
trunk/Source/WebCore/platform/efl/ClipboardEfl.cpp
trunk/Source/WebCore/platform/efl/ClipboardEfl.h
trunk/Source/WebCore/platform/gtk/ClipboardGtk.cpp
trunk/Source/WebCore/platform/gtk/ClipboardGtk.h
trunk/Source/WebCore/platform/mac/ClipboardMac.h
trunk/Source/WebCore/platform/mac/ClipboardMac.mm
trunk/Source/WebCore/platform/qt/ClipboardQt.cpp
trunk/Source/WebCore/platform/qt/ClipboardQt.h
trunk/Source/WebCore/platform/win/ClipboardWin.cpp
trunk/Source/WebCore/platform/win/ClipboardWin.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (142169 => 142170)

--- trunk/Source/WebCore/ChangeLog	2013-02-07 21:20:14 UTC (rev 142169)
+++ trunk/Source/WebCore/ChangeLog	2013-02-07 21:26:41 UTC (rev 142170)
@@ -1,3 +1,52 @@
+2013-02-07  Gavin Peters  
+
+Unreviewed, rolling out r142155.
+http://trac.webkit.org/changeset/142155
+https://bugs.webkit.org/show_bug.cgi?id=82888
+
+cr/win build broke.
+
+* bindings/js/JSClipboardCustom.cpp:
+(WebCore::JSClipboard::types):
+* bindings/v8/custom/V8ClipboardCustom.cpp:
+(WebCore::V8Clipboard::typesAccessorGetter):
+* dom/Clipboard.h:
+(Clipboard):
+* platform/blackberry/ClipboardBlackBerry.cpp:
+(WebCore::ClipboardBlackBerry::types):
+* platform/blackberry/ClipboardBlackBerry.h:
+(ClipboardBlackBerry):
+* platform/chromium/ChromiumDataObject.cpp:
+(WebCore::ChromiumDataObject::types):
+* platform/chromium/ChromiumDataObject.h:
+(ChromiumDataObject):
+* platform/chromium/ClipboardChromium.cpp:
+(WebCore::ClipboardChromium::types):
+* platform/chromium/ClipboardChromium.h:
+(ClipboardChromium):
+* platform/efl/ClipboardEfl.cpp:
+(WebCore::ClipboardEfl::types):
+* platform/efl/ClipboardEfl.h:
+(ClipboardEfl):
+* platform/gtk/ClipboardGtk.cpp:
+(WebCore::ClipboardGtk::types):
+* platform/gtk/ClipboardGtk.h:
+(ClipboardGtk):
+* platform/mac/ClipboardMac.h:
+(ClipboardMac):
+* platform/mac/ClipboardMac.mm:
+(WebCore::addHTMLClipboardTypesForCocoaType):
+(WebCore::ClipboardMac::types):
+* platform/qt/ClipboardQt.cpp:
+(WebCore::ClipboardQt::types):
+* platform/qt/ClipboardQt.h:
+(ClipboardQt):
+* platform/win/ClipboardWin.cpp:
+(WebCore::addMimeTypesForFormat):
+(WebCore::ClipboardWin::types):
+* platform/win/ClipboardWin.h:
+(ClipboardWin):
+
 2013-02-07  Rik Cabanier  
 
 Add support for parsing of -webkit-background-blend-mode


Modified: trunk/Source/WebCore/bindings/js/JSClipboardCustom.cpp (142169 => 142170)

--- trunk/Source/WebCore/bindings/js/JSClipboardCustom.cpp	2013-02-07 21:20:14 UTC (rev 142169)
+++ trunk/Source/WebCore/bind

[webkit-changes] [142167] trunk

2013-02-07 Thread gavinp
Title: [142167] trunk








Revision 142167
Author gav...@chromium.org
Date 2013-02-07 13:10:50 -0800 (Thu, 07 Feb 2013)


Log Message
Unreviewed, rolling out r142142.
http://trac.webkit.org/changeset/142142
https://bugs.webkit.org/show_bug.cgi?id=109154

Source/WebCore:

Mac expectations were not right. See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._registerShortcuts):

LayoutTests:

Mac expectations were not right. See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector%2Feditor%2Ftext-editor-home-button.html

* inspector/editor/text-editor-home-button-expected.txt: Removed.
* inspector/editor/text-editor-home-button.html: Removed.
* platform/efl/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/efl/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/LayoutTests/platform/qt/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js


Removed Paths

trunk/LayoutTests/inspector/editor/text-editor-home-button-expected.txt
trunk/LayoutTests/inspector/editor/text-editor-home-button.html




Diff

Modified: trunk/LayoutTests/ChangeLog (142166 => 142167)

--- trunk/LayoutTests/ChangeLog	2013-02-07 21:03:24 UTC (rev 142166)
+++ trunk/LayoutTests/ChangeLog	2013-02-07 21:10:50 UTC (rev 142167)
@@ -1,3 +1,17 @@
+2013-02-07  Gavin Peters  
+
+Unreviewed, rolling out r142142.
+http://trac.webkit.org/changeset/142142
+https://bugs.webkit.org/show_bug.cgi?id=109154
+
+Mac expectations were not right. See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector%2Feditor%2Ftext-editor-home-button.html
+
+* inspector/editor/text-editor-home-button-expected.txt: Removed.
+* inspector/editor/text-editor-home-button.html: Removed.
+* platform/efl/TestExpectations:
+* platform/mac/TestExpectations:
+* platform/qt/TestExpectations:
+
 2013-02-07  Bear Travis  
 
 [CSS Exclusions] shape-inside does not properly handle padding or border


Deleted: trunk/LayoutTests/inspector/editor/text-editor-home-button-expected.txt (142166 => 142167)

--- trunk/LayoutTests/inspector/editor/text-editor-home-button-expected.txt	2013-02-07 21:03:24 UTC (rev 142166)
+++ trunk/LayoutTests/inspector/editor/text-editor-home-button-expected.txt	2013-02-07 21:10:50 UTC (rev 142167)
@@ -1,38 +0,0 @@
-This test verifies that home button triggers selection between first symbol of the line and first non-blank symbol of the line.
-
-function foo()
-{
-return 42;
-}
-
-Running: testFirstNonBlankCharacter
-{"startLine":2,"startColumn":8,"endLine":2,"endColumn":8}
-{"startLine":2,"startColumn":4,"endLine":2,"endColumn":4}
-
-Running: testFirstNonBlankCharacterFromWhitespace
-{"startLine":2,"startColumn":2,"endLine":2,"endColumn":2}
-{"startLine":2,"startColumn":4,"endLine":2,"endColumn":4}
-
-Running: testHomeButtonTriggering
-{"startLine":2,"startColumn":2,"endLine":2,"endColumn":2}
-{"startLine":2,"startColumn":4,"endLine":2,"endColumn":4}
-{"startLine":2,"startColumn":0,"endLine":2,"endColumn":0}
-{"startLine":2,"startColumn":4,"endLine":2,"endColumn":4}
-
-Running: testHomeButtonDoesNotChangeCursor
-{"startLine":0,"startColumn":2,"endLine":0,"endColumn":2}
-{"startLine":0,"startColumn":0,"endLine":0,"endColumn":0}
-{"startLine":0,"startColumn":0,"endLine":0,"endColumn":0}
-
-Running: testHomeButtonWithShift
-{"startLine":0,"startColumn":0,"endLine":2,"endColumn":8}
-{"startLine":0,"startColumn":0,"endLine":2,"endColumn":4}
-{"startLine":0,"startColumn":0,"endLine":2,"endColumn":0}
-{"startLine":0,"startColumn":0,"endLine":2,"endColumn":4}
-
-Running: testHomeButtonWithShiftInversed
-{"startLine":3,"startColumn":1,"endLine":2,"endColumn":8}
-{"startLine":3,"startColumn":1,"endLine":2,"endColumn":4}
-{"startLine":3,"startColumn":1,"endLine":2,"endColumn":0}
-{"startLine":3,"startColumn":1,"endLine":2,"endColumn":4}
-


Deleted: trunk/LayoutTests/inspector/editor/text-editor-home-button.html (142166 => 142167)

--- trunk/LayoutTests/inspector/editor/text-editor-home-button.html	2013-02-07 21:03:24 UTC (rev 142166)
+++ trunk/LayoutTests/inspector/editor/text-editor-home-button.html	2013-02-07 21:10:50 UTC (rev 142167)
@@ -1,110 +0,0 @@
-
-
-
-
-function test()
-{
-function foo()
-{
-return 42;
-}
-var textEditor = InspectorTest.createTestEditor();
-textEditor.overrideViewportForTest(0, undefined, 3);
-textEditor.mimeType = "text/_javascript_";
-textEditor.setReadOnly(false);
-textEditor.element.focus();
-
-textEditor.setText(foo.toStr

[webkit-changes] [142166] trunk/Source/WebCore

2013-02-07 Thread gavinp
Title: [142166] trunk/Source/WebCore








Revision 142166
Author gav...@chromium.org
Date 2013-02-07 13:03:24 -0800 (Thu, 07 Feb 2013)


Log Message
Unreviewed, rolling out r142081.
http://trac.webkit.org/changeset/142081
https://bugs.webkit.org/show_bug.cgi?id=109146

The patch caused a crash in inspector-protocol/nmi-webaudio*.html .

See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .

* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.MemoryBlockViewProperties._initialize):
* platform/PlatformMemoryInstrumentation.cpp:
(WebCore):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp
trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js
trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (142165 => 142166)

--- trunk/Source/WebCore/ChangeLog	2013-02-07 20:58:25 UTC (rev 142165)
+++ trunk/Source/WebCore/ChangeLog	2013-02-07 21:03:24 UTC (rev 142166)
@@ -1,3 +1,20 @@
+2013-02-07  Gavin Peters  
+
+Unreviewed, rolling out r142081.
+http://trac.webkit.org/changeset/142081
+https://bugs.webkit.org/show_bug.cgi?id=109146
+
+The patch caused a crash in inspector-protocol/nmi-webaudio*.html .
+
+See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .
+
+* dom/WebCoreMemoryInstrumentation.cpp:
+(WebCore):
+* inspector/front-end/NativeMemorySnapshotView.js:
+(WebInspector.MemoryBlockViewProperties._initialize):
+* platform/PlatformMemoryInstrumentation.cpp:
+(WebCore):
+
 2013-02-07  Bear Travis  
 
 [CSS Exclusions] shape-inside does not properly handle padding or border


Modified: trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp (142165 => 142166)

--- trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp	2013-02-07 20:58:25 UTC (rev 142165)
+++ trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp	2013-02-07 21:03:24 UTC (rev 142166)
@@ -36,43 +36,43 @@
 
 namespace WebCore {
 
-MemoryObjectType WebCoreMemoryTypes::Page = "DOM";
-MemoryObjectType WebCoreMemoryTypes::DOM = "DOM";
-MemoryObjectType WebCoreMemoryTypes::CSS = "CSS";
-MemoryObjectType WebCoreMemoryTypes::Binding = "DOM";
-MemoryObjectType WebCoreMemoryTypes::RenderingStructures = "Rendering";
+MemoryObjectType WebCoreMemoryTypes::Page = "Page";
+MemoryObjectType WebCoreMemoryTypes::DOM = "Page.DOM";
+MemoryObjectType WebCoreMemoryTypes::CSS = "Page.CSS";
+MemoryObjectType WebCoreMemoryTypes::Binding = "Page.Binding";
+MemoryObjectType WebCoreMemoryTypes::RenderingStructures = "Page.Rendering.Structures";
 
-MemoryObjectType WebCoreMemoryTypes::MemoryCacheStructures = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResource = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceRaw = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceCSS = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceFont = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceImage = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceScript = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceSVG = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceShader = "Resources";
-MemoryObjectType WebCoreMemoryTypes::CachedResourceXSLT = "Resources";
+MemoryObjectType WebCoreMemoryTypes::MemoryCacheStructures = "MemoryCache.InternalStructures";
+MemoryObjectType WebCoreMemoryTypes::CachedResource = "MemoryCache.Resource";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceRaw = "MemoryCache.RawResource";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceCSS = "MemoryCache.CSS";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceFont = "MemoryCache.Font";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceImage = "MemoryCache.Image";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceScript = "MemoryCache.Script";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceSVG = "MemoryCache.SVG";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceShader = "MemoryCache.Shader";
+MemoryObjectType WebCoreMemoryTypes::CachedResourceXSLT = "MemoryCache.XSLT";
 
-MemoryObjectType WebCoreMemoryTypes::ExternalStrings = "JSExternalResources";
-MemoryObjectType WebCoreMemoryTypes::ExternalArrays = "JSExternalResources";
+MemoryObjectType WebCoreMemoryTypes::ExternalStrings = "JSExternalResources.Strings";
+MemoryObjectType WebCoreMemoryTypes::ExternalArrays = "JSExternalResources.Arrays";
 
 MemoryObjectType WebCo

[webkit-changes] [142143] trunk

2013-02-07 Thread gavinp
Title: [142143] trunk








Revision 142143
Author gav...@chromium.org
Date 2013-02-07 09:51:49 -0800 (Thu, 07 Feb 2013)


Log Message
Unreviewed, rolling out r142141.
http://trac.webkit.org/changeset/142141
https://bugs.webkit.org/show_bug.cgi?id=108990

Reland r142112, will update Chromium expectations and create a
Chromium bug instead for the crash.

.:

* ManualTests/remove-fixed-position-but-keep-compositing.html: Added.

Source/WebCore:

* CMakeLists.txt:
* Target.pri:
* WebCore.pri:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
(WebCore):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
(WebCore):
(ScrollingCoordinatorCoordinatedGraphics):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
(WebCore):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):

Modified Paths

trunk/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Target.pri
trunk/Source/WebCore/WebCore.pri
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp


Added Paths

trunk/ManualTests/remove-fixed-position-but-keep-compositing.html
trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h




Diff

Modified: trunk/ChangeLog (142142 => 142143)

--- trunk/ChangeLog	2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/ChangeLog	2013-02-07 17:51:49 UTC (rev 142143)
@@ -1,5 +1,16 @@
 2013-02-07  Gavin Peters  
 
+Unreviewed, rolling out r142141.
+http://trac.webkit.org/changeset/142141
+https://bugs.webkit.org/show_bug.cgi?id=108990
+
+Reland r142112, will update Chromium expectations and create a
+Chromium bug instead for the crash.
+
+* ManualTests/remove-fixed-position-but-keep-compositing.html: Added.
+
+2013-02-07  Gavin Peters  
+
 Unreviewed, rolling out r142112.
 http://trac.webkit.org/changeset/142112
 https://bugs.webkit.org/show_bug.cgi?id=108990


Added: trunk/ManualTests/remove-fixed-position-but-keep-compositing.html (0 => 142143)

--- trunk/ManualTests/remove-fixed-position-but-keep-compositing.html	(rev 0)
+++ trunk/ManualTests/remove-fixed-position-but-keep-compositing.html	2013-02-07 17:51:49 UTC (rev 142143)
@@ -0,0 +1,46 @@
+
+
+  
+
+  Toggle
+
+  
+  The black rectangle starts fixed, and due to a -webkit-transform will be composited. Toggle to unfix it and scroll: the black rectangle should scroll with the page and not overlap the numbers.
+  
+
+  
+  
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+
+
+var rect = document.getElementById("rect");
+var toggle = document.getElementById("toggle");
+
+toggle.addEventListener("click", function (ev) {
+if (rect.style.position === "fixed") {
+rect.style.position = "";
+} else {
+rect.style.position = "fixed";
+}
+});
+
Property changes on: trunk/ManualTests/remove-fixed-position-but-keep-compositing.html
___


Added: svn:eol-style

Modified: trunk/Source/WebCore/CMakeLists.txt (142142 => 142143)

--- trunk/Source/WebCore/CMakeLists.txt	2013-02-07 17:46:41 UTC (rev 142142)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-02-07 17:51:49 UTC (rev 142143)
@@ -44,6 +44,7 @@
 "${WEBCORE_DIR}/page"
 "${WEBCORE_DIR}/page/animation"
 "${WEBCORE_DIR}/page/scrolling"
+"${WEBCORE_DIR}/page/scrolling/coordinatedgraphics"
 "${WEBCORE_DIR}/platform"
 "${WEBCORE_DIR}/platform/animation"
 "${WEBCORE_DIR}/platform/audio"
@@ -1820,6 +1821,7 @@
 
 page/scrolling/ScrollingConstraints.cpp
 page/scrolling/ScrollingCoordinator.cpp
+page/scrolling/co

[webkit-changes] [142141] trunk

2013-02-07 Thread gavinp
Title: [142141] trunk








Revision 142141
Author gav...@chromium.org
Date 2013-02-07 09:32:07 -0800 (Thu, 07 Feb 2013)


Log Message
Unreviewed, rolling out r142112.
http://trac.webkit.org/changeset/142112
https://bugs.webkit.org/show_bug.cgi?id=108990

The new test scrollingcoordinator/non-fast-scrollable-region-transformed- iframe.html crashes on Lion.

See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=scrollingcoordinator%2Fnon-fast-scrollable-region-transformed-iframe.html

.:

* ManualTests/remove-fixed-position-but-keep-compositing.html: Removed.

Source/WebCore:

* CMakeLists.txt:
* Target.pri:
* WebCore.pri:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Removed.
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Removed.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(WebCore::CoordinatedGraphicsLayer::setFixedToViewport):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::updateOffsetFromViewportForSelf):
(WebKit):
(WebKit::updateOffsetFromViewportForLayer):
(WebKit::CoordinatedLayerTreeHost::syncFixedLayers):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):

Modified Paths

trunk/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Target.pri
trunk/Source/WebCore/WebCore.pri
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp


Removed Paths

trunk/ManualTests/remove-fixed-position-but-keep-compositing.html
trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h




Diff

Modified: trunk/ChangeLog (142140 => 142141)

--- trunk/ChangeLog	2013-02-07 17:29:30 UTC (rev 142140)
+++ trunk/ChangeLog	2013-02-07 17:32:07 UTC (rev 142141)
@@ -1,3 +1,15 @@
+2013-02-07  Gavin Peters  
+
+Unreviewed, rolling out r142112.
+http://trac.webkit.org/changeset/142112
+https://bugs.webkit.org/show_bug.cgi?id=108990
+
+The new test scrollingcoordinator/non-fast-scrollable-region-transformed- iframe.html crashes on Lion.
+
+See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=scrollingcoordinator%2Fnon-fast-scrollable-region-transformed-iframe.html
+
+* ManualTests/remove-fixed-position-but-keep-compositing.html: Removed.
+
 2013-02-07  Zan Dobersek  
 
 [GTK] configure.ac requires a cleanup


Deleted: trunk/ManualTests/remove-fixed-position-but-keep-compositing.html (142140 => 142141)

--- trunk/ManualTests/remove-fixed-position-but-keep-compositing.html	2013-02-07 17:29:30 UTC (rev 142140)
+++ trunk/ManualTests/remove-fixed-position-but-keep-compositing.html	2013-02-07 17:32:07 UTC (rev 142141)
@@ -1,46 +0,0 @@
-
-
-  
-
-  Toggle
-
-  
-  The black rectangle starts fixed, and due to a -webkit-transform will be composited. Toggle to unfix it and scroll: the black rectangle should scroll with the page and not overlap the numbers.
-  
-
-  
-  
-
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
-
-var rect = document.getElementById("rect");
-var toggle = document.getElementById("toggle");
-
-toggle.addEventListener("click", function (ev) {
-if (rect.style.position === "fixed") {
-rect.style.position = "";
-} else {
-rect.style.position = "fixed";
-}
-});
-


Modified: trunk/Source/WebCore/CMakeLists.txt (142140 => 142141)

--- trunk/Source/WebCore/CMakeLists.txt	2013-02-07 17:29:30 UTC (rev 142140)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-02-07 17:32:07 UTC (rev 142141)
@@ -44,7 +44,6 @@
 "${WEBCORE_DIR}/page"
 "${WEBCORE_DIR}/page/animation"
 "${WEBCORE_DIR}/page/scrolling"
-"${WEBCORE_DIR}/page/scrolling/coordinatedgraphics"
 "${WEBCORE_DIR}/platform"
 "${WEBCORE_DIR}/platform/animation"
 "${WEBCORE_DIR}/platform/audio"
@@ -1821,7 +1820,6 @@
 
 page/scrolling/ScrollingConstraints.cpp
 page/scrolling/ScrollingCoordinator.cpp
-page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
 
 pla

[webkit-changes] [139551] trunk/Source/WebCore

2013-01-12 Thread gavinp
Title: [139551] trunk/Source/WebCore








Revision 139551
Author gav...@chromium.org
Date 2013-01-12 10:05:19 -0800 (Sat, 12 Jan 2013)


Log Message
Regression(r119759): Heap-use-after-free in webkit_glue::WebURLLoaderImpl::Context::OnReceivedResponse
https://bugs.webkit.org/show_bug.cgi?id=103563

A subresource could receive a body on a 404 if its call to CachedResource::error() resulted in a nested message loop.
That caused a crash when data was received, as the Subresource was in the Finished state already. Now when receiving
data we ignore these bodies, avoiding the crash.

Reviewed by Nate Chapin.

No new tests in WebKit, since it required a nested message loop which isn't present in chromium DumpRender tree.
There's a Chrome side browser test, see https://codereview.chromium.org/11778083/

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/SubresourceLoader.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (139550 => 139551)

--- trunk/Source/WebCore/ChangeLog	2013-01-12 14:53:03 UTC (rev 139550)
+++ trunk/Source/WebCore/ChangeLog	2013-01-12 18:05:19 UTC (rev 139551)
@@ -1,3 +1,20 @@
+2013-01-12  Gavin Peters  
+
+Regression(r119759): Heap-use-after-free in webkit_glue::WebURLLoaderImpl::Context::OnReceivedResponse
+https://bugs.webkit.org/show_bug.cgi?id=103563
+
+A subresource could receive a body on a 404 if its call to CachedResource::error() resulted in a nested message loop.
+That caused a crash when data was received, as the Subresource was in the Finished state already. Now when receiving
+data we ignore these bodies, avoiding the crash.
+
+Reviewed by Nate Chapin.
+
+No new tests in WebKit, since it required a nested message loop which isn't present in chromium DumpRender tree.
+There's a Chrome side browser test, see https://codereview.chromium.org/11778083/
+
+* loader/SubresourceLoader.cpp:
+(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
+
 2013-01-12  Robert Hogan  
 
 Available height should respect min and max height


Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (139550 => 139551)

--- trunk/Source/WebCore/loader/SubresourceLoader.cpp	2013-01-12 14:53:03 UTC (rev 139550)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp	2013-01-12 18:05:19 UTC (rev 139551)
@@ -214,6 +214,8 @@
 
 void SubresourceLoader::didReceiveData(const char* data, int length, long long encodedDataLength, bool allAtOnce)
 {
+if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors())
+return;
 ASSERT(!m_resource->resourceToRevalidate());
 ASSERT(!m_resource->errorOccurred());
 ASSERT(m_state == Initialized);
@@ -232,8 +234,8 @@
 if (m_resource->response().httpStatusCode() < 400 || m_resource->shouldIgnoreHTTPStatusCodeErrors())
 return false;
 
+m_state = Finishing;
 m_resource->error(CachedResource::LoadError);
-m_state = Finishing;
 cancel();
 return true;
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [138173] trunk/Source

2012-12-19 Thread gavinp
Title: [138173] trunk/Source








Revision 138173
Author gav...@chromium.org
Date 2012-12-19 09:23:03 -0800 (Wed, 19 Dec 2012)


Log Message
[chromium] WebCore::Prerender::didStartPrerender depends on LinkLoader
https://bugs.webkit.org/show_bug.cgi?id=105290

Reviewed by Abhishek Arya.

The LinkLoader now removes itself from its prerender in time.

Source/WebCore:

Tested in unit tests, PrerenderingTest.FastRemoveElement.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::~LinkLoader):
(WebCore::LinkLoader::released):

Source/WebKit/chromium:

* tests/PrerenderingTest.cpp:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/tests/PrerenderingTest.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (138172 => 138173)

--- trunk/Source/WebCore/ChangeLog	2012-12-19 17:22:27 UTC (rev 138172)
+++ trunk/Source/WebCore/ChangeLog	2012-12-19 17:23:03 UTC (rev 138173)
@@ -1,3 +1,18 @@
+2012-12-19  Gavin Peters  
+
+[chromium] WebCore::Prerender::didStartPrerender depends on LinkLoader
+https://bugs.webkit.org/show_bug.cgi?id=105290
+
+Reviewed by Abhishek Arya.
+
+The LinkLoader now removes itself from its prerender in time.
+
+Tested in unit tests, PrerenderingTest.FastRemoveElement.
+
+* loader/LinkLoader.cpp:
+(WebCore::LinkLoader::~LinkLoader):
+(WebCore::LinkLoader::released):
+
 2012-12-19  Brian Salomon  
 
 [Chromium/Skia] Check whether bitmap has pixels in image encoders


Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (138172 => 138173)

--- trunk/Source/WebCore/loader/LinkLoader.cpp	2012-12-19 17:22:27 UTC (rev 138172)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp	2012-12-19 17:23:03 UTC (rev 138173)
@@ -63,6 +63,10 @@
 {
 if (m_cachedLinkResource)
 m_cachedLinkResource->removeClient(this);
+#if ENABLE(LINK_PRERENDER)
+if (m_prerenderHandle)
+m_prerenderHandle->removeClient();
+#endif
 }
 
 void LinkLoader::linkLoadTimerFired(Timer* timer)
@@ -172,6 +176,7 @@
 #if ENABLE(LINK_PRERENDER)
 if (m_prerenderHandle) {
 m_prerenderHandle->cancel();
+m_prerenderHandle->removeClient();
 m_prerenderHandle.clear();
 }
 #endif


Modified: trunk/Source/WebKit/chromium/ChangeLog (138172 => 138173)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-12-19 17:22:27 UTC (rev 138172)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-12-19 17:23:03 UTC (rev 138173)
@@ -1,3 +1,14 @@
+2012-12-19  Gavin Peters  
+
+[chromium] WebCore::Prerender::didStartPrerender depends on LinkLoader
+https://bugs.webkit.org/show_bug.cgi?id=105290
+
+Reviewed by Abhishek Arya.
+
+The LinkLoader now removes itself from its prerender in time.
+
+* tests/PrerenderingTest.cpp:
+
 2012-12-18  Ilya Tikhonovsky  
 
 Unreviewed, rolling out r138061.


Modified: trunk/Source/WebKit/chromium/tests/PrerenderingTest.cpp (138172 => 138173)

--- trunk/Source/WebKit/chromium/tests/PrerenderingTest.cpp	2012-12-19 17:22:27 UTC (rev 138172)
+++ trunk/Source/WebKit/chromium/tests/PrerenderingTest.cpp	2012-12-19 17:23:03 UTC (rev 138173)
@@ -437,4 +437,23 @@
 webPrerender.didStartPrerender();
 }
 
+TEST_F(PrerenderingTest, FastRemoveElement)
+{
+initialize("http://www.foo.com/", "prerender/single_prerender.html");
+
+WebPrerender webPrerender = prerendererClient()->releaseWebPrerender();
+EXPECT_FALSE(webPrerender.isNull());
+
+EXPECT_EQ(1u, prerenderingSupport()->addCount(webPrerender));
+EXPECT_EQ(1u, prerenderingSupport()->totalCount());
+
+// Race removing & starting the prerender against each other, as if the element was removed very quickly.
+executeScript("removePrerender()");
+EXPECT_FALSE(webPrerender.isNull());
+webPrerender.didStartPrerender();
+
+// The page should be totally disconnected from the Prerender at this point, so the console should not have updated.
+EXPECT_EQ(0u, consoleLength());
+}
+
 } // namespace






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [137482] trunk/Source

2012-12-12 Thread gavinp
Title: [137482] trunk/Source








Revision 137482
Author gav...@chromium.org
Date 2012-12-12 10:34:01 -0800 (Wed, 12 Dec 2012)


Log Message
[chromium] Add destructor to WebPrerender
https://bugs.webkit.org/show_bug.cgi?id=104820

Reviewed by James Robinson.

When making WebPrerender default constructible and assignable, the destructor should have been moved out of WEBKIT_IMPLEMENTATION.

Source/Platform:

* chromium/public/WebPrerender.h:
(WebKit::WebPrerender::~WebPrerender):
(WebPrerender):

Source/WebCore:

Existing WebKit unit tests should test this, as do chromium browser tests.

* platform/chromium/support/WebPrerender.cpp:
(WebKit::WebPrerender::toPrerender):
(WebKit::WebPrerender::reset):

Modified Paths

trunk/Source/Platform/ChangeLog
trunk/Source/Platform/chromium/public/WebPrerender.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/chromium/support/WebPrerender.cpp




Diff

Modified: trunk/Source/Platform/ChangeLog (137481 => 137482)

--- trunk/Source/Platform/ChangeLog	2012-12-12 18:32:01 UTC (rev 137481)
+++ trunk/Source/Platform/ChangeLog	2012-12-12 18:34:01 UTC (rev 137482)
@@ -1,3 +1,16 @@
+2012-12-12  Gavin Peters  
+
+[chromium] Add destructor to WebPrerender
+https://bugs.webkit.org/show_bug.cgi?id=104820
+
+Reviewed by James Robinson.
+
+When making WebPrerender default constructible and assignable, the destructor should have been moved out of WEBKIT_IMPLEMENTATION.
+
+* chromium/public/WebPrerender.h:
+(WebKit::WebPrerender::~WebPrerender):
+(WebPrerender):
+
 2012-12-12  Alexei Filippov  
 
 Web Inspector: add memory used by memory allocator itself to NMI


Modified: trunk/Source/Platform/chromium/public/WebPrerender.h (137481 => 137482)

--- trunk/Source/Platform/chromium/public/WebPrerender.h	2012-12-12 18:32:01 UTC (rev 137481)
+++ trunk/Source/Platform/chromium/public/WebPrerender.h	2012-12-12 18:34:01 UTC (rev 137482)
@@ -54,6 +54,7 @@
 virtual ~ExtraData() { }
 };
 
+~WebPrerender() { reset(); }
 WebPrerender() { }
 WebPrerender(const WebPrerender& other) { assign(other); }
 WebPrerender& operator=(const WebPrerender& other)
@@ -64,11 +65,11 @@
 
 #if WEBKIT_IMPLEMENTATION
 explicit WebPrerender(PassRefPtr);
-~WebPrerender();
 
 const WebCore::Prerender* toPrerender() const;
 #endif
 
+WEBKIT_EXPORT void reset();
 WEBKIT_EXPORT void assign(const WebPrerender&);
 WEBKIT_EXPORT bool isNull() const;
 


Modified: trunk/Source/WebCore/ChangeLog (137481 => 137482)

--- trunk/Source/WebCore/ChangeLog	2012-12-12 18:32:01 UTC (rev 137481)
+++ trunk/Source/WebCore/ChangeLog	2012-12-12 18:34:01 UTC (rev 137482)
@@ -1,3 +1,18 @@
+2012-12-12  Gavin Peters  
+
+[chromium] Add destructor to WebPrerender
+https://bugs.webkit.org/show_bug.cgi?id=104820
+
+Reviewed by James Robinson.
+
+When making WebPrerender default constructible and assignable, the destructor should have been moved out of WEBKIT_IMPLEMENTATION.
+
+Existing WebKit unit tests should test this, as do chromium browser tests.
+
+* platform/chromium/support/WebPrerender.cpp:
+(WebKit::WebPrerender::toPrerender):
+(WebKit::WebPrerender::reset):
+
 2012-12-12  Allan Sandfeld Jensen  
 
 [Qt] Animation fails on large layers


Modified: trunk/Source/WebCore/platform/chromium/support/WebPrerender.cpp (137481 => 137482)

--- trunk/Source/WebCore/platform/chromium/support/WebPrerender.cpp	2012-12-12 18:32:01 UTC (rev 137481)
+++ trunk/Source/WebCore/platform/chromium/support/WebPrerender.cpp	2012-12-12 18:34:01 UTC (rev 137482)
@@ -64,14 +64,14 @@
 {
 }
 
-WebPrerender::~WebPrerender()
+const WebCore::Prerender* WebPrerender::toPrerender() const
 {
-m_private.reset();
+return m_private.get();
 }
 
-const WebCore::Prerender* WebPrerender::toPrerender() const
+void WebPrerender::reset()
 {
-return m_private.get();
+m_private.reset();
 }
 
 void WebPrerender::assign(const WebPrerender& other)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [137047] trunk/Source/WebCore/loader/LinkLoader.cpp

2012-12-08 Thread gavinp
Title: [137047] trunk/Source/WebCore/loader/LinkLoader.cpp








Revision 137047
Author gav...@chromium.org
Date 2012-12-08 13:19:56 -0800 (Sat, 08 Dec 2012)


Log Message
Unreviewed. Fix build after r137045 for !ENABLE(LINK_PRERENDER) platforms.

A new guard was needed.

I am sorry.

Modified Paths

trunk/Source/WebCore/loader/LinkLoader.cpp




Diff

Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (137046 => 137047)

--- trunk/Source/WebCore/loader/LinkLoader.cpp	2012-12-08 20:34:52 UTC (rev 137046)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp	2012-12-08 21:19:56 UTC (rev 137047)
@@ -90,6 +90,8 @@
 m_cachedLinkResource = 0;
 }
 
+#if ENABLE(LINK_PRERENDER)
+
 void LinkLoader::didStartPrerender()
 {
 m_client->didStartLinkPrerender();
@@ -110,6 +112,8 @@
 m_client->didSendDOMContentLoadedForLinkPrerender();
 }
 
+#endif
+
 bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type,
   const String& sizes, const KURL& href, Document* document)
 {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [127305] trunk

2012-08-31 Thread gavinp
Title: [127305] trunk








Revision 127305
Author gav...@chromium.org
Date 2012-08-31 13:10:29 -0700 (Fri, 31 Aug 2012)


Log Message
[chromium] DEPS roll with a test skip.
https://bugs.webkit.org/show_bug.cgi?id=95601

Unreviewed gardening & DEPS roll.

Source/WebKit/chromium:

fast/frames/cached-frame-counter.html was never the most stable test, and now it's failing on more platforms. Marking it flaky, along with a DEPS roll (earlier attempts at the DEPS roll failed on this)

* DEPS:

LayoutTests:

fast/frames/cached-frame-counter.html was never the most stable test, and now it's failing on more platforms. Marking it flaky, along with a DEPS roll (earlier attempts at the DEPS roll failed on this)

* platform/chromium/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/chromium/TestExpectations
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/DEPS




Diff

Modified: trunk/LayoutTests/ChangeLog (127304 => 127305)

--- trunk/LayoutTests/ChangeLog	2012-08-31 20:10:09 UTC (rev 127304)
+++ trunk/LayoutTests/ChangeLog	2012-08-31 20:10:29 UTC (rev 127305)
@@ -1,3 +1,14 @@
+2012-08-31  Gavin Peters  
+
+[chromium] DEPS roll with a test skip.
+https://bugs.webkit.org/show_bug.cgi?id=95601
+
+Unreviewed gardening & DEPS roll.
+
+fast/frames/cached-frame-counter.html was never the most stable test, and now it's failing on more platforms. Marking it flaky, along with a DEPS roll (earlier attempts at the DEPS roll failed on this)
+
+* platform/chromium/TestExpectations:
+
 2012-08-31  Simon Fraser  
 
 (Regression: r126774): Fix crash when scrolling after removing inline sticky element


Modified: trunk/LayoutTests/platform/chromium/TestExpectations (127304 => 127305)

--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-31 20:10:09 UTC (rev 127304)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-31 20:10:29 UTC (rev 127305)
@@ -1802,8 +1802,8 @@
 
 // Expectations from roll to 53171:53194
 // As of Oct 7, 2010, times out on all platforms when doing DEBUG costing 13 seconds on average. Skipping.
-BUGCR32308 SKIP DEBUG : fast/frames/cached-frame-counter.html = TIMEOUT
-BUGCR32308 WIN ANDROID RELEASE SLOW : fast/frames/cached-frame-counter.html = PASS
+// As of Aug 31, 2012, now times out in release. Marking flaky everywhere.
+BUGCR32308 : fast/frames/cached-frame-counter.html = TIMEOUT PASS
 
 BUGCR33293 SKIP : fast/media/lifetime.html = TIMEOUT
 


Modified: trunk/Source/WebKit/chromium/ChangeLog (127304 => 127305)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-31 20:10:09 UTC (rev 127304)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-31 20:10:29 UTC (rev 127305)
@@ -1,5 +1,17 @@
 2012-08-31  Gavin Peters  
 
+[chromium] DEPS roll with a test skip.
+https://bugs.webkit.org/show_bug.cgi?id=95601
+
+Unreviewed gardening & DEPS roll.
+
+
+fast/frames/cached-frame-counter.html was never the most stable test, and now it's failing on more platforms. Marking it flaky, along with a DEPS roll (earlier attempts at the DEPS roll failed on this)
+
+* DEPS:
+
+2012-08-31  Gavin Peters  
+
 [chromium] Disable WebViewTest.AutoResizeMinimumSize
 https://bugs.webkit.org/show_bug.cgi?id=95571
 


Modified: trunk/Source/WebKit/chromium/DEPS (127304 => 127305)

--- trunk/Source/WebKit/chromium/DEPS	2012-08-31 20:10:09 UTC (rev 127304)
+++ trunk/Source/WebKit/chromium/DEPS	2012-08-31 20:10:29 UTC (rev 127305)
@@ -32,7 +32,7 @@
 
 vars = {
   'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
-  'chromium_rev': '153869'
+  'chromium_rev': '154424'
 }
 
 deps = {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [127291] trunk/LayoutTests

2012-08-31 Thread gavinp
Title: [127291] trunk/LayoutTests








Revision 127291
Author gav...@chromium.org
Date 2012-08-31 11:07:10 -0700 (Fri, 31 Aug 2012)


Log Message
[chromium] Fix platform/chromium/TestExpectations typo
https://bugs.webkit.org/show_bug.cgi?id=95592

Unreviewed gardening.

Unfortunately r127174 contained a typo that broke webkit-lint on our build. See https://bugs.webkit.org/show_bug.cgi?id=95581 .

* platform/chromium/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/chromium/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (127290 => 127291)

--- trunk/LayoutTests/ChangeLog	2012-08-31 18:00:24 UTC (rev 127290)
+++ trunk/LayoutTests/ChangeLog	2012-08-31 18:07:10 UTC (rev 127291)
@@ -1,3 +1,14 @@
+2012-08-31  Gavin Peters  
+
+[chromium] Fix platform/chromium/TestExpectations typo
+https://bugs.webkit.org/show_bug.cgi?id=95592
+
+Unreviewed gardening.
+
+Unfortunately r127174 contained a typo that broke webkit-lint on our build. See https://bugs.webkit.org/show_bug.cgi?id=95581 .
+
+* platform/chromium/TestExpectations:
+
 2012-08-31  Jessie Berlin  
 
 fast/css/align-positioned-object-on-resize.html skipped on Mac platforms


Modified: trunk/LayoutTests/platform/chromium/TestExpectations (127290 => 127291)

--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-31 18:00:24 UTC (rev 127290)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-31 18:07:10 UTC (rev 127291)
@@ -3499,7 +3499,7 @@
 BUGWK95246 : http/tests/security/mixedContent/filesystem-url-in-iframe.html = PASS TEXT
 
 BUGWK95581 : http/tests/xmlhttprequest/zero-length-response.html = TIMEOUT PASS
-BUGWK95581 : http/tests/misc/_javascript_-url-stop-loaders.htm = TIMEOUT PASS
+BUGWK95581 : http/tests/misc/_javascript_-url-stop-loaders.html = TIMEOUT PASS
 
 BUGWK94261 DEBUG : http/tests/inspector/indexeddb/resources-panel.html = PASS CRASH TIMEOUT
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [127263] trunk/Source/WebKit/chromium

2012-08-31 Thread gavinp
Title: [127263] trunk/Source/WebKit/chromium








Revision 127263
Author gav...@chromium.org
Date 2012-08-31 07:59:42 -0700 (Fri, 31 Aug 2012)


Log Message
[chromium] Disable WebViewTest.AutoResizeMinimumSize
https://bugs.webkit.org/show_bug.cgi?id=95571

Unreviewed gardening.

Disabling this test since it started failing in build 17225, see http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Win/builds/17247 for instance. Will shortly file bug to re-enable this.

* tests/WebViewTest.cpp:

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/tests/WebViewTest.cpp




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (127262 => 127263)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-31 14:54:43 UTC (rev 127262)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-31 14:59:42 UTC (rev 127263)
@@ -1,3 +1,14 @@
+2012-08-31  Gavin Peters  
+
+[chromium] Disable WebViewTest.AutoResizeMinimumSize
+https://bugs.webkit.org/show_bug.cgi?id=95571
+
+Unreviewed gardening.
+
+Disabling this test since it started failing in build 17225, see http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Win/builds/17247 for instance. Will shortly file bug to re-enable this.
+
+* tests/WebViewTest.cpp:
+
 2012-08-30  James Robinson  
 
 [chromium] Revert WebCompositorSupport to raw ptrs, make dtor protected


Modified: trunk/Source/WebKit/chromium/tests/WebViewTest.cpp (127262 => 127263)

--- trunk/Source/WebKit/chromium/tests/WebViewTest.cpp	2012-08-31 14:54:43 UTC (rev 127262)
+++ trunk/Source/WebKit/chromium/tests/WebViewTest.cpp	2012-08-31 14:59:42 UTC (rev 127263)
@@ -222,7 +222,7 @@
 webView->close();
 }
 
-TEST_F(WebViewTest, AutoResizeMinimumSize)
+TEST_F(WebViewTest, DISABLED_AutoResizeMinimumSize)
 {
 WebSize minAutoResize(91, 56);
 WebSize maxAutoResize(403, 302);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [127259] trunk/LayoutTests

2012-08-31 Thread gavinp
Title: [127259] trunk/LayoutTests








Revision 127259
Author gav...@chromium.org
Date 2012-08-31 07:35:22 -0700 (Fri, 31 Aug 2012)


Log Message
Unreviewed rebaseline after r127226

The windows results needed this rebaseline, apparently the original commit omitted these windows diffs per yo...@chromium.org.

* platform/chromium-win-xp/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png: Added.
* platform/chromium-win/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/chromium-win/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png


Added Paths

trunk/LayoutTests/platform/chromium-win-xp/fast/forms/time-multiple-fields/
trunk/LayoutTests/platform/chromium-win-xp/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png




Diff

Modified: trunk/LayoutTests/ChangeLog (127258 => 127259)

--- trunk/LayoutTests/ChangeLog	2012-08-31 14:35:14 UTC (rev 127258)
+++ trunk/LayoutTests/ChangeLog	2012-08-31 14:35:22 UTC (rev 127259)
@@ -1,3 +1,12 @@
+2012-08-31  Gavin Peters  
+
+Unreviewed rebaseline after r127226
+
+The windows results needed this rebaseline, apparently the original commit omitted these windows diffs per yo...@chromium.org.
+
+* platform/chromium-win-xp/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png: Added.
+* platform/chromium-win/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png:
+
 2012-08-31  Csaba Osztrogonác  
 
 [Qt][WK2] REGRESSION(r127091): It made layout tests extremely slow


Modified: trunk/LayoutTests/platform/chromium-win/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png

(Binary files differ)


Added: trunk/LayoutTests/platform/chromium-win-xp/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png

(Binary files differ)

Property changes on: trunk/LayoutTests/platform/chromium-win-xp/fast/forms/time-multiple-fields/time-multiple-fields-appearance-basic-expected.png
___

Added: svn:mime-type




___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [127156] trunk/Source/WebKit/chromium

2012-08-30 Thread gavinp
Title: [127156] trunk/Source/WebKit/chromium








Revision 127156
Author gav...@chromium.org
Date 2012-08-30 10:23:16 -0700 (Thu, 30 Aug 2012)


Log Message
[chromium] Disable CCLayerTreeHostTestScrollMultipleRedraw.runMultiThread
https://bugs.webkit.org/show_bug.cgi?id=95472

Unreviewed gardening.

When landing r127079, this test was re-enabled, and has not passed since. I'm disabling it, and created bug 95473 to track fixing this issue.

* tests/CCLayerTreeHostTest.cpp:
(WebKitTests::TEST_F):

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (127155 => 127156)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-30 17:08:00 UTC (rev 127155)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-30 17:23:16 UTC (rev 127156)
@@ -1,3 +1,15 @@
+2012-08-30  Gavin Peters  
+
+[chromium] Disable CCLayerTreeHostTestScrollMultipleRedraw.runMultiThread
+https://bugs.webkit.org/show_bug.cgi?id=95472
+
+Unreviewed gardening.
+
+When landing r127079, this test was re-enabled, and has not passed since. I'm disabling it, and created bug 95473 to track fixing this issue.
+
+* tests/CCLayerTreeHostTest.cpp:
+(WebKitTests::TEST_F):
+
 2012-08-30  James Robinson  
 
 [chromium] Clean up some webkit compositor unit tests


Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (127155 => 127156)

--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-08-30 17:08:00 UTC (rev 127155)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-08-30 17:23:16 UTC (rev 127156)
@@ -1048,7 +1048,7 @@
 int m_scrolls;
 };
 
-TEST_F(CCLayerTreeHostTestScrollMultipleRedraw, runMultiThread)
+TEST_F(CCLayerTreeHostTestScrollMultipleRedraw, DISABLED_runMultiThread)
 {
 runTest(true);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [126792] trunk/Tools

2012-08-27 Thread gavinp
Title: [126792] trunk/Tools








Revision 126792
Author gav...@chromium.org
Date 2012-08-27 13:59:06 -0700 (Mon, 27 Aug 2012)


Log Message
[webkit-patch] Don't crash chrome-channels command when a previously unknown platform shows up.
https://bugs.webkit.org/show_bug.cgi?id=95104

Reviewed by Adam Barth.

Today I found out this command was broken by the new iOS platform showing up on omahaproxy. Now the webkit-patch chrome-channels command gracefully handles new, previously unknown platforms. Also, it prints iOS in the proper mixed case.

* Scripts/webkitpy/common/net/omahaproxy.py:
(OmahaProxy):
(OmahaProxy.get_revisions):
* Scripts/webkitpy/common/net/omahaproxy_unittest.py:
(OmahaProxyTest):
(OmahaProxyTest.test_get_revisions):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py
trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (126791 => 126792)

--- trunk/Tools/ChangeLog	2012-08-27 20:48:57 UTC (rev 126791)
+++ trunk/Tools/ChangeLog	2012-08-27 20:59:06 UTC (rev 126792)
@@ -1,3 +1,19 @@
+2012-08-27  Gavin Peters  
+
+[webkit-patch] Don't crash chrome-channels command when a previously unknown platform shows up.
+https://bugs.webkit.org/show_bug.cgi?id=95104
+
+Reviewed by Adam Barth.
+
+Today I found out this command was broken by the new iOS platform showing up on omahaproxy. Now the webkit-patch chrome-channels command gracefully handles new, previously unknown platforms. Also, it prints iOS in the proper mixed case.
+
+* Scripts/webkitpy/common/net/omahaproxy.py:
+(OmahaProxy):
+(OmahaProxy.get_revisions):
+* Scripts/webkitpy/common/net/omahaproxy_unittest.py:
+(OmahaProxyTest):
+(OmahaProxyTest.test_get_revisions):
+
 2012-08-27  Sudarsana Nagineni  
 
 [EFL][WK2] Free Url_Bar on program exit


Modified: trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py (126791 => 126792)

--- trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py	2012-08-27 20:48:57 UTC (rev 126791)
+++ trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py	2012-08-27 20:59:06 UTC (rev 126792)
@@ -43,7 +43,8 @@
 "win": "Windows",
 "mac": "Mac",
 "cros": "Chrome OS",
-"cf": "Chrome Frame"}
+"cf": "Chrome Frame",
+"ios": "iOS"}
 chrome_channels = ["canary", "dev", "beta", "stable"]
 
 def __init__(self, url="" browser=None):
@@ -70,7 +71,7 @@
 row = {
 "commit": int(version["base_webkit_revision"]),
 "channel": version["channel"],
-"platform": self.chrome_platforms[platform["os"]],
+"platform": self.chrome_platforms.get(platform["os"], platform["os"]),
 "date": version["date"],
 }
 assert(version["channel"] in self._chrome_channels)


Modified: trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py (126791 => 126792)

--- trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py	2012-08-27 20:48:57 UTC (rev 126791)
+++ trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py	2012-08-27 20:59:06 UTC (rev 126792)
@@ -100,19 +100,33 @@
  "prev_date": "04\/25\/12",
  "true_branch": "1084",
  "channel": "release",
- "branch_revision": 134854}]}]"""
+ "branch_revision": 134854}]},
+{"os": "weird-platform",
+ "versions": [
+{"base_webkit_revision": "115688",
+ "v8_ver": "3.10.6.0",
+ "wk_ver": "536.10",
+ "base_trunk_revision": 134666,
+ "prev_version": "20.0.1123.2",
+ "version": "20.0.1123.4",
+ "date": "05\/04\/12",
+ "prev_date": "05\/02\/12",
+ "true_branch": "1123",
+ "channel": "dev",
+ "branch_revision": 135092}]}]"""
 
 expected_revisions = [
 {"commit": 116185, "channel": "canary", "platform": "Windows", "date": "05/07/12"},
 {"commit": 115687, "channel": "dev", "platform": "Windows", "date": "05/04/12"},
 {"commit": 115688, "channel": "dev", "platform": "Linux", "date": "05/04/12"},
 {"commit": 112327, "channel": "beta", "platform": "Linux", "date": "05/03/12"},
+{"commit": 115688, "channel": "dev", "platform": "weird-platform", "date": "05/04/12"},
 ]
 
 def test_get_revisions(self):
 omahaproxy = MockOmahaProxy(self.example_omahaproxy_json)
 revisions = omahaproxy.get_revisions()
-self.assertEqual(len(revisions), 4)
+self.assertEqual(len(revisions), 5)
 for revision in revisions:
 self.assertTrue("commit" in revision)
 

[webkit-changes] [126714] trunk/Source/WebCore

2012-08-26 Thread gavinp
Title: [126714] trunk/Source/WebCore








Revision 126714
Author gav...@chromium.org
Date 2012-08-26 15:15:35 -0700 (Sun, 26 Aug 2012)


Log Message
Prerenderering should gracefully handle no PrerendererClient or PrerenderingPlatform being provided.
https://bugs.webkit.org/show_bug.cgi?id=95036

Reviewed by Adam Barth.

Some assertions made sure there was a prerendering platform and client, and this change should make prerendering just be a NOP when no platform is provided, and just continue without a client when there is no client provided. These assertions were causing crashes in chromium's content_shell target, and really for no good reason.

No new tests, because DumpRenderTree provides both a PrerenderingPlatform and a PrerendererClient. But there is a new layout test in chromium's WebKitBrowserTest for this behaviour, see http://codereview.chromium.org/10869068/

* loader/Prerenderer.cpp:
(WebCore::Prerenderer::Prerenderer):
(WebCore::Prerenderer::render):
(WebCore::Prerenderer::client):
* loader/Prerenderer.h:
* loader/PrerendererClient.cpp:
(WebCore::PrerendererClient::from):
* platform/chromium/Prerender.cpp:
(WebCore::Prerender::cancel):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/Prerenderer.cpp
trunk/Source/WebCore/loader/Prerenderer.h
trunk/Source/WebCore/loader/PrerendererClient.cpp
trunk/Source/WebCore/platform/chromium/Prerender.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (126713 => 126714)

--- trunk/Source/WebCore/ChangeLog	2012-08-26 21:11:54 UTC (rev 126713)
+++ trunk/Source/WebCore/ChangeLog	2012-08-26 22:15:35 UTC (rev 126714)
@@ -1,3 +1,24 @@
+2012-08-26  Gavin Peters  
+
+Prerenderering should gracefully handle no PrerendererClient or PrerenderingPlatform being provided.
+https://bugs.webkit.org/show_bug.cgi?id=95036
+
+Reviewed by Adam Barth.
+
+Some assertions made sure there was a prerendering platform and client, and this change should make prerendering just be a NOP when no platform is provided, and just continue without a client when there is no client provided. These assertions were causing crashes in chromium's content_shell target, and really for no good reason.
+
+No new tests, because DumpRenderTree provides both a PrerenderingPlatform and a PrerendererClient. But there is a new layout test in chromium's WebKitBrowserTest for this behaviour, see http://codereview.chromium.org/10869068/
+
+* loader/Prerenderer.cpp:
+(WebCore::Prerenderer::Prerenderer):
+(WebCore::Prerenderer::render):
+(WebCore::Prerenderer::client):
+* loader/Prerenderer.h:
+* loader/PrerendererClient.cpp:
+(WebCore::PrerendererClient::from):
+* platform/chromium/Prerender.cpp:
+(WebCore::Prerender::cancel):
+
 2012-08-26  David Barton  
 
 Streamline mathml.css


Modified: trunk/Source/WebCore/loader/Prerenderer.cpp (126713 => 126714)

--- trunk/Source/WebCore/loader/Prerenderer.cpp	2012-08-26 21:11:54 UTC (rev 126713)
+++ trunk/Source/WebCore/loader/Prerenderer.cpp	2012-08-26 22:15:35 UTC (rev 126714)
@@ -59,6 +59,7 @@
 
 Prerenderer::Prerenderer(Document* document)
 : ActiveDOMObject(document, this)
+, m_initializedClient(false)
 , m_client(0)
 {
 }
@@ -80,7 +81,8 @@
 
 RefPtr prerenderHandle = PrerenderHandle::create(url, referrer, referrerPolicy);
 
-client()->willAddPrerender(prerenderHandle.get());
+if (client())
+client()->willAddPrerender(prerenderHandle.get());
 prerenderHandle->add();
 
 m_activeHandles.append(prerenderHandle);
@@ -131,8 +133,12 @@
 
 PrerendererClient* Prerenderer::client()
 {
-if (!m_client)
+if (!m_initializedClient) {
+// We can't initialize the client in our contructor, because the platform might not have
+// provided our supplement by then.
+m_initializedClient = true;
 m_client = PrerendererClient::from(document()->page());
+}
 return m_client;
 }
 


Modified: trunk/Source/WebCore/loader/Prerenderer.h (126713 => 126714)

--- trunk/Source/WebCore/loader/Prerenderer.h	2012-08-26 21:11:54 UTC (rev 126713)
+++ trunk/Source/WebCore/loader/Prerenderer.h	2012-08-26 22:15:35 UTC (rev 126714)
@@ -73,6 +73,7 @@
 Document* document();
 PrerendererClient* client();
 
+bool m_initializedClient;
 PrerendererClient* m_client;
 HandleVector m_activeHandles;
 HandleVector m_suspendedHandles;


Modified: trunk/Source/WebCore/loader/PrerendererClient.cpp (126713 => 126714)

--- trunk/Source/WebCore/loader/PrerendererClient.cpp	2012-08-26 21:11:54 UTC (rev 126713)
+++ trunk/Source/WebCore/loader/PrerendererClient.cpp	2012-08-26 22:15:35 UTC (rev 126714)
@@ -51,7 +51,6 @@
 PrerendererClient* PrerendererClient::from(Page* page)
 {
 PrerendererClient* supplement = static_cast(Supplement::from(page, supplementName()));
-ASSERT(supplement);
 return supplement;
 }
 


Modified: trunk/Source/WebCore/platform/chr

[webkit-changes] [123798] trunk

2012-07-26 Thread gavinp
Title: [123798] trunk








Revision 123798
Author gav...@chromium.org
Date 2012-07-26 15:07:20 -0700 (Thu, 26 Jul 2012)


Log Message
Guard Prerenderer against inserting prerenders into detached documents.
https://bugs.webkit.org/show_bug.cgi?id=92401

Reviewed by Adam Barth.

Source/WebCore:

If the document is detached, we should not launch a prerender.

Test: fast/dom/HTMLLinkElement/prerender-insert-after-stop.html

* loader/Prerenderer.cpp:
(WebCore::Prerenderer::render):

LayoutTests:

If the document is detached, we should just not launch a prerender.

* fast/dom/HTMLLinkElement/prerender-insert-after-stop-expected.txt: Added.
* fast/dom/HTMLLinkElement/prerender-insert-after-stop.html: Added.
* fast/dom/HTMLLinkElement/resources/empty2.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/Prerenderer.cpp


Added Paths

trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop-expected.txt
trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop.html
trunk/LayoutTests/fast/dom/HTMLLinkElement/resources/empty2.html




Diff

Modified: trunk/LayoutTests/ChangeLog (123797 => 123798)

--- trunk/LayoutTests/ChangeLog	2012-07-26 22:03:48 UTC (rev 123797)
+++ trunk/LayoutTests/ChangeLog	2012-07-26 22:07:20 UTC (rev 123798)
@@ -1,3 +1,16 @@
+2012-07-26  Gavin Peters  
+
+Guard Prerenderer against inserting prerenders into detached documents.
+https://bugs.webkit.org/show_bug.cgi?id=92401
+
+Reviewed by Adam Barth.
+
+If the document is detached, we should just not launch a prerender.
+
+* fast/dom/HTMLLinkElement/prerender-insert-after-stop-expected.txt: Added.
+* fast/dom/HTMLLinkElement/prerender-insert-after-stop.html: Added.
+* fast/dom/HTMLLinkElement/resources/empty2.html: Added.
+
 2012-07-26  Andrew Wilson  
 
 Unreviewed chromium expectations change to fix lint err.


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop-expected.txt (0 => 123798)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop-expected.txt	2012-07-26 22:07:20 UTC (rev 123798)
@@ -0,0 +1,4 @@
+Test navigation and insertion of link prerender elements
+
+
+This test succeeds when it does not crash. The iframe above this text should also not crash, and should show "Another empty page."


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop.html (0 => 123798)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-insert-after-stop.html	2012-07-26 22:07:20 UTC (rev 123798)
@@ -0,0 +1,36 @@
+
+
+
+
+function done() {
+   if (window.testRunner)
+   testRunner.notifyDone();
+}
+
+function linkInserter(doc) {
+return function() {
+doc.getElementsByTagName('body')[0].innerHTML += "";
+done();
+}
+}
+
+function navigateIFrameThenInsertLink() {
+var iframe = document.getElementById('iframe');
+iframe._onload_ = linkInserter(iframe.contentDocument);
+iframe.contentWindow.location = "resources/empty2.html";
+}
+
+if (window.testRunner) {
+testRunner.waitUntilDone();
+testRunner.dumpAsText();
+}
+
+
+
+Test navigation and insertion of link prerender elements
+
+
+


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/resources/empty2.html (0 => 123798)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/resources/empty2.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/resources/empty2.html	2012-07-26 22:07:20 UTC (rev 123798)
@@ -0,0 +1,3 @@
+
+Another empty page.
+


Modified: trunk/Source/WebCore/ChangeLog (123797 => 123798)

--- trunk/Source/WebCore/ChangeLog	2012-07-26 22:03:48 UTC (rev 123797)
+++ trunk/Source/WebCore/ChangeLog	2012-07-26 22:07:20 UTC (rev 123798)
@@ -1,3 +1,17 @@
+2012-07-26  Gavin Peters  
+
+Guard Prerenderer against inserting prerenders into detached documents.
+https://bugs.webkit.org/show_bug.cgi?id=92401
+
+Reviewed by Adam Barth.
+
+If the document is detached, we should not launch a prerender.
+
+Test: fast/dom/HTMLLinkElement/prerender-insert-after-stop.html
+
+* loader/Prerenderer.cpp:
+(WebCore::Prerenderer::render):
+
 2012-07-26  Sheriff Bot  
 
 Unreviewed, rolling out r123525.


Modified: trunk/Source/WebCore/loader/Prerenderer.cpp (123797 => 123798)

--- trunk/Source/WebCore/loader/Prerenderer.cpp	2012-07-26 22:03:48 UTC (rev 123797)
+++ trunk/Source/WebCore/loader/Prerenderer.cpp	2012-07-26 22:07:20 UTC (rev 123798)
@@ -72,6 +72,10 @@
 // Prerenders are unlike requests in most ways (for instance, they pass down fragments, and they don't return data),
 // but they do have 

[webkit-changes] [119019] trunk

2012-05-30 Thread gavinp
Title: [119019] trunk








Revision 119019
Author gav...@chromium.org
Date 2012-05-30 18:54:50 -0700 (Wed, 30 May 2012)


Log Message
Add a LayoutTest for prerender remove after stop.
https://bugs.webkit.org/show_bug.cgi?id=87860

Tools:

These very boring mocks in DumpRenderTree mean that the basic Prerendering API
can be tested by LayoutTests now.

Reviewed by Adam Barth.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp: Added.
(MockWebPrerenderingSupport::MockWebPrerenderingSupport):
(MockWebPrerenderingSupport::~MockWebPrerenderingSupport):
(MockWebPrerenderingSupport::add):
(MockWebPrerenderingSupport::cancel):
(MockWebPrerenderingSupport::abandon):
* DumpRenderTree/chromium/MockWebPrerenderingSupport.h: Added.
(MockWebPrerenderingSupport):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::initialize):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::willAddPrerender):
(WebViewHost::setWebWidget):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

LayoutTests:

Bug 87746 was uploaded without a LayoutTest because I originally thought
it would only be testable in Chrome with a browser test.  However, that was
wrong.

Note that this test doesn't need to be disabled based on if the platform
uses Prerendering, since the test is for a crash, which won't happen on
platforms without prerendering, either.

Reviewed by Adam Barth.

* fast/dom/HTMLLinkElement/prerender-remove-after-stop-expected.txt: Added.
* fast/dom/HTMLLinkElement/prerender-remove-after-stop.html: Added.
* fast/dom/HTMLLinkElement/resources/empty.html: Added.
* fast/dom/HTMLLinkElement/resources/simple-prerender.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/DumpRenderTree.gypi
trunk/Tools/DumpRenderTree/chromium/TestShell.cpp
trunk/Tools/DumpRenderTree/chromium/TestShell.h
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
trunk/Tools/DumpRenderTree/chromium/WebViewHost.h


Added Paths

trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop-expected.txt
trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop.html
trunk/LayoutTests/fast/dom/HTMLLinkElement/resources/empty.html
trunk/LayoutTests/fast/dom/HTMLLinkElement/resources/simple-prerender.html
trunk/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp
trunk/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h




Diff

Modified: trunk/LayoutTests/ChangeLog (119018 => 119019)

--- trunk/LayoutTests/ChangeLog	2012-05-31 01:51:50 UTC (rev 119018)
+++ trunk/LayoutTests/ChangeLog	2012-05-31 01:54:50 UTC (rev 119019)
@@ -1,3 +1,23 @@
+2012-05-30  Gavin Peters  
+
+Add a LayoutTest for prerender remove after stop.
+https://bugs.webkit.org/show_bug.cgi?id=87860
+
+Bug 87746 was uploaded without a LayoutTest because I originally thought
+it would only be testable in Chrome with a browser test.  However, that was
+wrong.
+
+Note that this test doesn't need to be disabled based on if the platform
+uses Prerendering, since the test is for a crash, which won't happen on
+platforms without prerendering, either.
+
+Reviewed by Adam Barth.
+
+* fast/dom/HTMLLinkElement/prerender-remove-after-stop-expected.txt: Added.
+* fast/dom/HTMLLinkElement/prerender-remove-after-stop.html: Added.
+* fast/dom/HTMLLinkElement/resources/empty.html: Added.
+* fast/dom/HTMLLinkElement/resources/simple-prerender.html: Added.
+
 2012-05-30  Zhenyao Mo  
 
 WebKit incorrectly clears the alpha channel on readPixels, even for Framebuffers


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop-expected.txt (0 => 119019)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop-expected.txt	2012-05-31 01:54:50 UTC (rev 119019)
@@ -0,0 +1,4 @@
+Test navigation and removal of link prerender elements
+
+
+This test succeeds when it does not crash. The iframe above this text should also not crash, and should show an empty page.


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop.html (0 => 119019)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/prerender-remove-after-stop.html	2012-05-31 01:54:50 UTC (rev 119019)
@@ -0,0 +1,38 @@
+
+
+
+
+function done() {
+   if (window.layoutTestController) {
+   layoutTestController.notifyDone();
+   }
+}
+
+function elementRemover(doc, id) {
+return function() {
+var element = doc.getElementById(id);
+element.parentNode.removeChild(element);
+setTimeout(done, 0);
+}
+}
+
+function navigateIFrameThenRemoveLink() {
+var iframe

[webkit-changes] [118848] trunk/Source/WebCore

2012-05-29 Thread gavinp
Title: [118848] trunk/Source/WebCore








Revision 118848
Author gav...@chromium.org
Date 2012-05-29 16:07:49 -0700 (Tue, 29 May 2012)


Log Message
[Chromium] Remove assertions on state in Prerender.cpp
https://bugs.webkit.org/show_bug.cgi?id=87746

Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the
state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the
removedFromDocument behaviour on each element, including the  element launching the prerender.  This causes an
assertion failure.

I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the
overzealous assertions in Prerender that were inappropriate.

Reviewed by Adam Barth.

No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered
queries into Google Web Search.

* platform/chromium/Prerender.cpp:
(WebCore::Prerender::Prerender):
(WebCore::Prerender::add):
(WebCore::Prerender::cancel):
(WebCore::Prerender::abandon):
* platform/chromium/Prerender.h:
(Prerender):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/chromium/Prerender.cpp
trunk/Source/WebCore/platform/chromium/Prerender.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (118847 => 118848)

--- trunk/Source/WebCore/ChangeLog	2012-05-29 22:59:15 UTC (rev 118847)
+++ trunk/Source/WebCore/ChangeLog	2012-05-29 23:07:49 UTC (rev 118848)
@@ -1,3 +1,29 @@
+2012-05-29  Gavin Peters  
+
+[Chromium] Remove assertions on state in Prerender.cpp
+https://bugs.webkit.org/show_bug.cgi?id=87746
+
+Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the
+state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the
+removedFromDocument behaviour on each element, including the  element launching the prerender.  This causes an
+assertion failure.
+
+I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the
+overzealous assertions in Prerender that were inappropriate.
+
+Reviewed by Adam Barth.
+
+No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered
+queries into Google Web Search.
+
+* platform/chromium/Prerender.cpp:
+(WebCore::Prerender::Prerender):
+(WebCore::Prerender::add):
+(WebCore::Prerender::cancel):
+(WebCore::Prerender::abandon):
+* platform/chromium/Prerender.h:
+(Prerender):
+
 2012-05-29  Victor Carbune  
 
 Display cues in the controls area


Modified: trunk/Source/WebCore/platform/chromium/Prerender.cpp (118847 => 118848)

--- trunk/Source/WebCore/platform/chromium/Prerender.cpp	2012-05-29 22:59:15 UTC (rev 118847)
+++ trunk/Source/WebCore/platform/chromium/Prerender.cpp	2012-05-29 23:07:49 UTC (rev 118848)
@@ -47,9 +47,6 @@
 : m_url(url)
 , m_referrer(referrer)
 , m_referrerPolicy(policy)
-#ifndef NDEBUG
-, m_state(Inactive)
-#endif
 {
 }
 
@@ -57,24 +54,13 @@
 {
 }
 
-void Prerender::setState(State state)
-{
-#ifdef NDEBUG
-UNUSED_PARAM(state);
-#else
-m_state = state;
-#endif
-}
-
 void Prerender::add()
 {
-ASSERT(m_state == Inactive);
 WebKit::WebPrerenderingSupport* platform = WebKit::WebPrerenderingSupport::current();
 if (!platform)
 return;
 WebKit::WebPrerender webPrerender(this);
 platform->add(webPrerender);
-setState(Active);
 }
 
 void Prerender::cancel()
@@ -83,10 +69,8 @@
 WebKit::WebPrerenderingSupport* platform = WebKit::WebPrerenderingSupport::current();
 if (!platform)
 return;
-ASSERT(m_state == Active);
 WebKit::WebPrerender webPrerender(this);
 platform->cancel(webPrerender);
-setState(Inactive);
 }
 
 void Prerender::abandon()
@@ -94,12 +78,8 @@
 WebKit::WebPrerenderingSupport* platform = WebKit::WebPrerenderingSupport::current();
 if (!platform)
 return;
-// FIXME: Assert on the state as Inactive here. It is currently common to call abandon() on an Inactive
-// prerender, as the Prerenderer doesn't keep track of which prerenders are active, and so any page that
-// ever had a now-canceled Prerender will get this bogus stop() call.
 WebKit::WebPrerender webPrerender(this);
 platform->abandon(webPrerender);
-setState(Inactive);
 }
 
 void Prerender::suspend()


Modified: trunk/Source/WebCore/platform/chromium/Prerender.h (118847 => 118848)

--- trunk/Source/WebCore/platform/chromium/Prerender.h	2012-05-29 22:59:15 UTC (rev 118847)
+++ trunk/Source/WebCore/platform/chromium/Prerender.h	2012-05-29 23:07:49 UTC (rev 118848)
@@ -71,22 +71,11 @@
 ExtraData* extraData() { return m_extraData

[webkit-changes] [117996] trunk/Source/Platform

2012-05-22 Thread gavinp
Title: [117996] trunk/Source/Platform








Revision 117996
Author gav...@chromium.org
Date 2012-05-22 10:33:28 -0700 (Tue, 22 May 2012)


Log Message
[Chromium] Remove old staging enum value WebURLRequest::TargetType::TargetIsPrerender
https://bugs.webkit.org/show_bug.cgi?id=85021

Reviewed by Adam Barth.

* chromium/public/WebURLRequest.h:

Modified Paths

trunk/Source/Platform/ChangeLog
trunk/Source/Platform/chromium/public/WebURLRequest.h




Diff

Modified: trunk/Source/Platform/ChangeLog (117995 => 117996)

--- trunk/Source/Platform/ChangeLog	2012-05-22 17:32:59 UTC (rev 117995)
+++ trunk/Source/Platform/ChangeLog	2012-05-22 17:33:28 UTC (rev 117996)
@@ -1,3 +1,12 @@
+2012-05-22  Gavin Peters  
+
+[Chromium] Remove old staging enum value WebURLRequest::TargetType::TargetIsPrerender
+https://bugs.webkit.org/show_bug.cgi?id=85021
+
+Reviewed by Adam Barth.
+
+* chromium/public/WebURLRequest.h:
+
 2012-05-21  James Robinson  
 
 [chromium] Port chromium compositor to use WebFilterOperation(s)


Modified: trunk/Source/Platform/chromium/public/WebURLRequest.h (117995 => 117996)

--- trunk/Source/Platform/chromium/public/WebURLRequest.h	2012-05-22 17:32:59 UTC (rev 117995)
+++ trunk/Source/Platform/chromium/public/WebURLRequest.h	2012-05-22 17:33:28 UTC (rev 117996)
@@ -73,9 +73,6 @@
 TargetIsXHR = 13,
 TargetIsTextTrack = 14,
 TargetIsUnspecified = 15,
-// FIXME: This old enum value is only being left in while prerendering is staging into chromium. After http://codereview.chromium.org/10244007/
-// lands, this should be removed.
-TargetIsPrerender = TargetIsUnspecified,
 };
 
 class ExtraData {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [117023] trunk/Source/WebKit/chromium

2012-05-14 Thread gavinp
Title: [117023] trunk/Source/WebKit/chromium








Revision 117023
Author gav...@chromium.org
Date 2012-05-14 20:26:48 -0700 (Mon, 14 May 2012)


Log Message
[Chromium] remove skia/third_party/glu from DEPS
https://bugs.webkit.org/show_bug.cgi?id=86431

Chromium rev 136872 removed skia/third_party/glu, but nobody updated it in WebKit.  This
patch fixes that.

Unreviewed, remove bad Chromium repo.

* DEPS:

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/DEPS




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (117022 => 117023)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-15 01:10:52 UTC (rev 117022)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-15 03:26:48 UTC (rev 117023)
@@ -1,3 +1,15 @@
+2012-05-14  Gavin Peters  
+
+[Chromium] remove skia/third_party/glu from DEPS
+https://bugs.webkit.org/show_bug.cgi?id=86431
+
+Chromium rev 136872 removed skia/third_party/glu, but nobody updated it in WebKit.  This
+patch fixes that.
+
+Unreviewed, remove bad Chromium repo.
+
+* DEPS:
+
 2012-05-14  Dirk Pranke 
 
 Unreviewed, roll Chromium DEPS to r136942.


Modified: trunk/Source/WebKit/chromium/DEPS (117022 => 117023)

--- trunk/Source/WebKit/chromium/DEPS	2012-05-15 01:10:52 UTC (rev 117022)
+++ trunk/Source/WebKit/chromium/DEPS	2012-05-15 03:26:48 UTC (rev 117023)
@@ -58,8 +58,6 @@
 From('chromium_deps', 'src/third_party/skia/src'),
   'third_party/skia/include':
 From('chromium_deps', 'src/third_party/skia/include'),
-  'third_party/skia/third_party/glu':
-From('chromium_deps', 'src/third_party/skia/third_party/glu'),
 
   # testing
   'testing':






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [116415] trunk/Tools

2012-05-08 Thread gavinp
Title: [116415] trunk/Tools








Revision 116415
Author gav...@chromium.org
Date 2012-05-08 06:39:50 -0700 (Tue, 08 May 2012)


Log Message
[webkit-patch] Return meaningful results from single-result queries.
https://bugs.webkit.org/show_bug.cgi?id=85367

Reviewed by Dirk Pranke.

Sometimes a quicksearch returns a single result by just redirecting to the page for that single
bug. This patch hacks around that by noticing the redirect target is a single page, and constructing
a result list consisting of that one bug.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries._fetch_bugs_from_advanced_query):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py




Diff

Modified: trunk/Tools/ChangeLog (116414 => 116415)

--- trunk/Tools/ChangeLog	2012-05-08 13:37:25 UTC (rev 116414)
+++ trunk/Tools/ChangeLog	2012-05-08 13:39:50 UTC (rev 116415)
@@ -1,5 +1,19 @@
 2012-05-08  Gavin Peters  
 
+[webkit-patch] Return meaningful results from single-result queries.
+https://bugs.webkit.org/show_bug.cgi?id=85367
+
+Reviewed by Dirk Pranke.
+
+Sometimes a quicksearch returns a single result by just redirecting to the page for that single
+bug. This patch hacks around that by noticing the redirect target is a single page, and constructing
+a result list consisting of that one bug.
+
+* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+(BugzillaQueries._fetch_bugs_from_advanced_query):
+
+2012-05-08  Gavin Peters  
+
 [webkit-patch] Add new chrome-channels command to track down current chrome release channels for a committed bug.
 https://bugs.webkit.org/show_bug.cgi?id=85368
 


Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py (116414 => 116415)

--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py	2012-05-08 13:37:25 UTC (rev 116414)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py	2012-05-08 13:39:50 UTC (rev 116415)
@@ -152,6 +152,11 @@
 
 def _fetch_bugs_from_advanced_query(self, query):
 results_page = self._load_query(query)
+# Some simple searches can return a single result.
+results_url = results_page.geturl()
+if results_url.find("/show_bug.cgi?id=") != -1:
+bug_id = int(results_url.split("=")[-1])
+return [self._fetch_bug(bug_id)]
 if not self._parse_result_count(results_page):
 return []
 # Bugzilla results pages have an "XML" submit button at the bottom






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [116414] trunk/Tools

2012-05-08 Thread gavinp
Title: [116414] trunk/Tools








Revision 116414
Author gav...@chromium.org
Date 2012-05-08 06:37:25 -0700 (Tue, 08 May 2012)


Log Message
[webkit-patch] Add new chrome-channels command to track down current chrome release channels for a committed bug.
https://bugs.webkit.org/show_bug.cgi?id=85368

Reviewed by Eric Seidel.

* Scripts/webkitpy/common/config/urls.py:
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzillaQueries.fetch_bugs_matching_quicksearch):
* Scripts/webkitpy/common/net/omahaproxy.py: Added.
(OmahaProxy):
(OmahaProxy.__init__):
(OmahaProxy.set_url):
(OmahaProxy._json_url):
(OmahaProxy._get_json):
(OmahaProxy.get_revisions):
* Scripts/webkitpy/common/net/omahaproxy_unittest.py: Added.
(MockOmahaProxy):
(MockOmahaProxy.__init__):
(OmahaProxyTest):
(OmahaProxyTest.test_get_revisions):
* Scripts/webkitpy/tool/commands/__init__.py:
* Scripts/webkitpy/tool/commands/bugsearch.py:
(BugSearch):
* Scripts/webkitpy/tool/commands/chromechannels.py: Added.
(ChromeChannels):
(__init__):
(execute):
* Scripts/webkitpy/tool/commands/chromechannels_unittest.py: Added.
(MockOmahaProxy):
(MockOmahaProxy.get_revisions):
(TestableChromeChannels):
(TestableChromeChannels.__init__):
(ChromeChannelsTest):
(ChromeChannelsTest.test_single_bug):
(ChromeChannelsTest.test_with_query):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/config/urls.py
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py
trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py


Added Paths

trunk/Tools/Scripts/webkitpy/common/net/omahaproxy.py
trunk/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py
trunk/Tools/Scripts/webkitpy/tool/commands/chromechannels.py
trunk/Tools/Scripts/webkitpy/tool/commands/chromechannels_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (116413 => 116414)

--- trunk/Tools/ChangeLog	2012-05-08 13:32:32 UTC (rev 116413)
+++ trunk/Tools/ChangeLog	2012-05-08 13:37:25 UTC (rev 116414)
@@ -1,3 +1,41 @@
+2012-05-08  Gavin Peters  
+
+[webkit-patch] Add new chrome-channels command to track down current chrome release channels for a committed bug.
+https://bugs.webkit.org/show_bug.cgi?id=85368
+
+Reviewed by Eric Seidel.
+
+* Scripts/webkitpy/common/config/urls.py:
+* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
+(MockBugzillaQueries.fetch_bugs_matching_quicksearch):
+* Scripts/webkitpy/common/net/omahaproxy.py: Added.
+(OmahaProxy):
+(OmahaProxy.__init__):
+(OmahaProxy.set_url):
+(OmahaProxy._json_url):
+(OmahaProxy._get_json):
+(OmahaProxy.get_revisions):
+* Scripts/webkitpy/common/net/omahaproxy_unittest.py: Added.
+(MockOmahaProxy):
+(MockOmahaProxy.__init__):
+(OmahaProxyTest):
+(OmahaProxyTest.test_get_revisions):
+* Scripts/webkitpy/tool/commands/__init__.py:
+* Scripts/webkitpy/tool/commands/bugsearch.py:
+(BugSearch):
+* Scripts/webkitpy/tool/commands/chromechannels.py: Added.
+(ChromeChannels):
+(__init__):
+(execute):
+* Scripts/webkitpy/tool/commands/chromechannels_unittest.py: Added.
+(MockOmahaProxy):
+(MockOmahaProxy.get_revisions):
+(TestableChromeChannels):
+(TestableChromeChannels.__init__):
+(ChromeChannelsTest):
+(ChromeChannelsTest.test_single_bug):
+(ChromeChannelsTest.test_with_query):
+
 2012-05-08  Carlos Garcia Campos  
 
 Unreviewed. Fix GTK+ unit tests.


Modified: trunk/Tools/Scripts/webkitpy/common/config/urls.py (116413 => 116414)

--- trunk/Tools/Scripts/webkitpy/common/config/urls.py	2012-05-08 13:32:32 UTC (rev 116413)
+++ trunk/Tools/Scripts/webkitpy/common/config/urls.py	2012-05-08 13:37:25 UTC (rev 116414)
@@ -56,6 +56,7 @@
 buildbot_url = "http://build.webkit.org"
 chromium_buildbot_url = "http://build.chromium.org/p/chromium.webkit"
 
+omahaproxy_url = "http://omahaproxy.appspot.com/"
 
 def parse_bug_id(string):
 if not string:


Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py (116413 => 116414)

--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py	2012-05-08 13:32:32 UTC (rev 116413)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py	2012-05-08 13:37:25 UTC (rev 116414)
@@ -169,9 +169,9 @@
 "bug_status": "ASSIGNED",
 "comments": [{"comment_date":  datetime.datetime(2011, 6, 11, 9, 4, 3),
   "comment_email": "b...@foo.com",
-  "text": "Message1.",
-},
-],
+  "text": "Message1.\nCommitted r35: ",
+  },
+ ],
 }
 
 
@@ -183,7 +183,15 @@
 "cc_emails": [],
 "attachments": [_patch7],
 "bug_status": "NEW",
-"comments": [],
+"comments":  [{"comment_date":  datetime.datetime(2011, 6, 11, 9, 4, 3),
+   

[webkit-changes] [115739] trunk/Source/Platform

2012-05-01 Thread gavinp
Title: [115739] trunk/Source/Platform








Revision 115739
Author gav...@chromium.org
Date 2012-05-01 11:23:13 -0700 (Tue, 01 May 2012)


Log Message
[Chromium] Fix WebPrerender::referrer() thunk.
https://bugs.webkit.org/show_bug.cgi?id=85290

Reviewed by Dimitri Glazkov.

* chromium/public/WebPrerender.h:
(WebKit::WebPrerender::referrer):

Modified Paths

trunk/Source/Platform/ChangeLog
trunk/Source/Platform/chromium/public/WebPrerender.h




Diff

Modified: trunk/Source/Platform/ChangeLog (115738 => 115739)

--- trunk/Source/Platform/ChangeLog	2012-05-01 18:18:19 UTC (rev 115738)
+++ trunk/Source/Platform/ChangeLog	2012-05-01 18:23:13 UTC (rev 115739)
@@ -1,3 +1,13 @@
+2012-05-01  Gavin Peters  
+
+[Chromium] Fix WebPrerender::referrer() thunk.
+https://bugs.webkit.org/show_bug.cgi?id=85290
+
+Reviewed by Dimitri Glazkov.
+
+* chromium/public/WebPrerender.h:
+(WebKit::WebPrerender::referrer):
+
 2012-04-30  Gavin Peters  
 
 [Chromium] Add thunk headers for staging Prerendering API.


Modified: trunk/Source/Platform/chromium/public/WebPrerender.h (115738 => 115739)

--- trunk/Source/Platform/chromium/public/WebPrerender.h	2012-05-01 18:18:19 UTC (rev 115738)
+++ trunk/Source/Platform/chromium/public/WebPrerender.h	2012-05-01 18:23:13 UTC (rev 115739)
@@ -56,7 +56,7 @@
 virtual ~ExtraData() { }
 };
 WebURL url() const { return WebURL(); }
-WebString referrer() const { return ""; }
+WebString referrer() const { return WebString(); }
 WebReferrerPolicy referrerPolicy() const { return WebReferrerPolicy(); }
 void setExtraData(ExtraData*) { }
 const ExtraData* extraData() const { return 0; }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [115703] trunk/Source

2012-04-30 Thread gavinp
Title: [115703] trunk/Source








Revision 115703
Author gav...@chromium.org
Date 2012-04-30 19:51:27 -0700 (Mon, 30 Apr 2012)


Log Message
[Chromium] Add thunk headers for staging Prerendering API.
https://bugs.webkit.org/show_bug.cgi?id=84880

Reviewed by Adam Barth.

These empty headers will be replaced by the actual API when Bug 85005 is commited.

Source/Platform:

* Platform.gypi:
* chromium/public/WebPrerender.h: Added.
(WebKit):
(WebPrerender):
(ExtraData):
(WebKit::WebPrerender::ExtraData::~ExtraData):
(WebKit::WebPrerender::url):
(WebKit::WebPrerender::referrer):
(WebKit::WebPrerender::referrerPolicy):
(WebKit::WebPrerender::setExtraData):
(WebKit::WebPrerender::extraData):
(WebKit::WebPrerender::WebPrerender):
(WebKit::WebPrerender::~WebPrerender):
* chromium/public/WebPrerenderingSupport.h: Added.
(WebKit):
(WebPrerenderingSupport):
(WebKit::WebPrerenderingSupport::initialize):
(WebKit::WebPrerenderingSupport::shutdown):
(WebKit::WebPrerenderingSupport::current):
(WebKit::WebPrerenderingSupport::add):
(WebKit::WebPrerenderingSupport::cancel):
(WebKit::WebPrerenderingSupport::abandon):
(WebKit::WebPrerenderingSupport::WebPrerenderingSupport):
(WebKit::WebPrerenderingSupport::~WebPrerenderingSupport):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebPrerendererClient.h: Added.
(WebKit):
(WebPrerendererClient):
* public/WebView.h:
(WebKit):
(WebKit::WebView::setPrerendererClient):

Modified Paths

trunk/Source/Platform/ChangeLog
trunk/Source/Platform/Platform.gypi
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/WebKit.gyp
trunk/Source/WebKit/chromium/public/WebView.h


Added Paths

trunk/Source/Platform/chromium/public/WebPrerender.h
trunk/Source/Platform/chromium/public/WebPrerenderingSupport.h
trunk/Source/WebKit/chromium/public/WebPrerendererClient.h




Diff

Modified: trunk/Source/Platform/ChangeLog (115702 => 115703)

--- trunk/Source/Platform/ChangeLog	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/Platform/ChangeLog	2012-05-01 02:51:27 UTC (rev 115703)
@@ -1,3 +1,37 @@
+2012-04-30  Gavin Peters  
+
+[Chromium] Add thunk headers for staging Prerendering API.
+https://bugs.webkit.org/show_bug.cgi?id=84880
+
+Reviewed by Adam Barth.
+
+These empty headers will be replaced by the actual API when Bug 85005 is commited.
+
+* Platform.gypi:
+* chromium/public/WebPrerender.h: Added.
+(WebKit):
+(WebPrerender):
+(ExtraData):
+(WebKit::WebPrerender::ExtraData::~ExtraData):
+(WebKit::WebPrerender::url):
+(WebKit::WebPrerender::referrer):
+(WebKit::WebPrerender::referrerPolicy):
+(WebKit::WebPrerender::setExtraData):
+(WebKit::WebPrerender::extraData):
+(WebKit::WebPrerender::WebPrerender):
+(WebKit::WebPrerender::~WebPrerender):
+* chromium/public/WebPrerenderingSupport.h: Added.
+(WebKit):
+(WebPrerenderingSupport):
+(WebKit::WebPrerenderingSupport::initialize):
+(WebKit::WebPrerenderingSupport::shutdown):
+(WebKit::WebPrerenderingSupport::current):
+(WebKit::WebPrerenderingSupport::add):
+(WebKit::WebPrerenderingSupport::cancel):
+(WebKit::WebPrerenderingSupport::abandon):
+(WebKit::WebPrerenderingSupport::WebPrerenderingSupport):
+(WebKit::WebPrerenderingSupport::~WebPrerenderingSupport):
+
 2012-04-26  James Robinson  
 
 [chromium] Separate IOSurface layer type from texture layers


Modified: trunk/Source/Platform/Platform.gypi (115702 => 115703)

--- trunk/Source/Platform/Platform.gypi	2012-05-01 02:38:40 UTC (rev 115702)
+++ trunk/Source/Platform/Platform.gypi	2012-05-01 02:51:27 UTC (rev 115703)
@@ -73,6 +73,8 @@
 'chromium/public/WebPeerConnectionHandler.h',
 'chromium/public/WebPeerConnectionHandlerClient.h',
 'chromium/public/WebPoint.h',
+'chromium/public/WebPrerender.h',
+'chromium/public/WebPrerenderingSupport.h',
 'chromium/public/WebPrivateOwnPtr.h',
 'chromium/public/WebPrivatePtr.h',
 'chromium/public/WebRect.h',


Added: trunk/Source/Platform/chromium/public/WebPrerender.h (0 => 115703)

--- trunk/Source/Platform/chromium/public/WebPrerender.h	(rev 0)
+++ trunk/Source/Platform/chromium/public/WebPrerender.h	2012-05-01 02:51:27 UTC (rev 115703)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2012 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 pr

[webkit-changes] [115680] trunk/Source/WebKit/chromium

2012-04-30 Thread gavinp
Title: [115680] trunk/Source/WebKit/chromium








Revision 115680
Author gav...@chromium.org
Date 2012-04-30 15:41:45 -0700 (Mon, 30 Apr 2012)


Log Message
[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
https://bugs.webkit.org/show_bug.cgi?id=84552

After http://codereview.chromium.org/10139023/ lands, this thunk is no
longer needed.

Reviewed by Adam Barth.

* WebKit.gyp:
* public/WebReferrerPolicy.h: Removed.

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/WebKit.gyp


Removed Paths

trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (115679 => 115680)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-30 22:29:10 UTC (rev 115679)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-30 22:41:45 UTC (rev 115680)
@@ -1,3 +1,16 @@
+2012-04-30  Gavin Peters  
+
+[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
+https://bugs.webkit.org/show_bug.cgi?id=84552
+
+After http://codereview.chromium.org/10139023/ lands, this thunk is no
+longer needed.
+
+Reviewed by Adam Barth.
+
+* WebKit.gyp:
+* public/WebReferrerPolicy.h: Removed.
+
 2012-04-29  Sam Weinig  
 
 Remove BlobBuilder


Modified: trunk/Source/WebKit/chromium/WebKit.gyp (115679 => 115680)

--- trunk/Source/WebKit/chromium/WebKit.gyp	2012-04-30 22:29:10 UTC (rev 115679)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2012-04-30 22:41:45 UTC (rev 115680)
@@ -228,7 +228,6 @@
 'public/WebPopupMenuInfo.h',
 'public/WebPopupType.h',
 'public/WebRange.h',
-'public/WebReferrerPolicy.h',
 'public/WebRegularExpression.h',
 'public/WebRuntimeFeatures.h',
 'public/WebScopedMicrotaskSuppression.h',


Deleted: trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h (115679 => 115680)

--- trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h	2012-04-30 22:29:10 UTC (rev 115679)
+++ trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h	2012-04-30 22:41:45 UTC (rev 115680)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-// This forwarding header exists only for staging our file move into the chromium port.
-// FIXME: Remove this forwarder after chrome issue http://codereview.chromium.org/10139023/ lands.
-#include "platform/WebReferrerPolicy.h"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [115660] trunk/Source/WebKit/chromium

2012-04-30 Thread gavinp
Title: [115660] trunk/Source/WebKit/chromium








Revision 115660
Author gav...@chromium.org
Date 2012-04-30 13:20:47 -0700 (Mon, 30 Apr 2012)


Log Message
Unreviewed.  Rolled DEPS.


* DEPS:

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/DEPS




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (115659 => 115660)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-30 19:47:22 UTC (rev 115659)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-30 20:20:47 UTC (rev 115660)
@@ -1,3 +1,9 @@
+2012-04-30  Gavin Peters  
+
+Unreviewed.  Rolled DEPS.
+
+* DEPS:
+
 2012-04-30  Mark Pilgrim  
 
 [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly


Modified: trunk/Source/WebKit/chromium/DEPS (115659 => 115660)

--- trunk/Source/WebKit/chromium/DEPS	2012-04-30 19:47:22 UTC (rev 115659)
+++ trunk/Source/WebKit/chromium/DEPS	2012-04-30 20:20:47 UTC (rev 115660)
@@ -32,7 +32,7 @@
 
 vars = {
   'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
-  'chromium_rev': '133673'
+  'chromium_rev': '134537'
 }
 
 deps = {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [115443] trunk

2012-04-27 Thread gavinp
Title: [115443] trunk








Revision 115443
Author gav...@chromium.org
Date 2012-04-27 09:38:33 -0700 (Fri, 27 Apr 2012)


Log Message
Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
https://bugs.webkit.org/show_bug.cgi?id=84871

Reviewed by Adam Barth.

Source/_javascript_Core:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/chromium:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

Source/WebKit/mac:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

Source/WebKit2:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

Tools:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

WebKitLibraries:

Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
a relatively easy change, without needing to build the infrastructure for prerendering, which
is considerably more complicated.

* win/tools/vsprops/FeatureDefinesCairo.vsprops:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/features.gypi
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig
trunk/Tools/ChangeLog
trunk/Tools/Scripts/build-webkit
trunk/WebKitLibraries/ChangeLog
trunk/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
trunk/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (115442 => 115443)

--- trunk/Source/_javascript_Core/ChangeLog	2012-04-27 16:35:38 UTC (rev 115442)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-04-27 16:38:33 UTC (rev 115443)
@@ -1,3 +1,17 @@
+2012-04-27  Gavin Peters  
+
+Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
+https://bugs.webkit.org/show_bug.cgi?id=84871
+
+Reviewed by Adam Barth.
+
+Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
+API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
+a relatively easy change, without needing to build the infrastructure for prerendering, which
+is considerably more complicated.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2012-04-26  Oliver Hunt  
 
 Allocating WeakImpl should not trigger GC, as that makes the world very tricksy.


Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (115442 => 115443)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2012-04-27 16:35:38 UTC (rev 115442)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2012-04-27 16:38:33 UTC (rev 115443)
@@ -92,6 +92,7 @@
 ENABLE_LEGACY_NOTIFICATIONS_macosx_1090 = ENABLE_LEGACY_NOTIFICATIONS;
 
 ENABLE_LINK_PREFETCH = ;
+ENABLE_LINK_PRERENDER = ;
 ENABLE_MATHML = ENABLE_MATHML;
 ENABLE_MEDIA_SO

[webkit-changes] [115436] trunk/Source/WebKit/chromium

2012-04-27 Thread gavinp
Title: [115436] trunk/Source/WebKit/chromium








Revision 115436
Author gav...@chromium.org
Date 2012-04-27 08:57:06 -0700 (Fri, 27 Apr 2012)


Log Message
[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
https://bugs.webkit.org/show_bug.cgi?id=84552

After http://codereview.chromium.org/10139023/ lands, this thunk is no
longer needed.

Reviewed by Adam Barth.

* WebKit.gyp:
* public/WebReferrerPolicy.h: Removed.

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/WebKit.gyp


Removed Paths

trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (115435 => 115436)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-27 15:29:08 UTC (rev 115435)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-27 15:57:06 UTC (rev 115436)
@@ -1,3 +1,16 @@
+2012-04-27  Gavin Peters  
+
+[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
+https://bugs.webkit.org/show_bug.cgi?id=84552
+
+After http://codereview.chromium.org/10139023/ lands, this thunk is no
+longer needed.
+
+Reviewed by Adam Barth.
+
+* WebKit.gyp:
+* public/WebReferrerPolicy.h: Removed.
+
 2012-04-27  Marcus Bulach  
 
 [chromium] Disables a few more webkit_unittests.


Modified: trunk/Source/WebKit/chromium/WebKit.gyp (115435 => 115436)

--- trunk/Source/WebKit/chromium/WebKit.gyp	2012-04-27 15:29:08 UTC (rev 115435)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2012-04-27 15:57:06 UTC (rev 115436)
@@ -226,7 +226,6 @@
 'public/WebPopupMenuInfo.h',
 'public/WebPopupType.h',
 'public/WebRange.h',
-'public/WebReferrerPolicy.h',
 'public/WebRegularExpression.h',
 'public/WebRuntimeFeatures.h',
 'public/WebScopedMicrotaskSuppression.h',


Deleted: trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h (115435 => 115436)

--- trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h	2012-04-27 15:29:08 UTC (rev 115435)
+++ trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h	2012-04-27 15:57:06 UTC (rev 115436)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-// This forwarding header exists only for staging our file move into the chromium port.
-// FIXME: Remove this forwarder after chrome issue http://codereview.chromium.org/10139023/ lands.
-#include "platform/WebReferrerPolicy.h"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [115206] trunk/Source

2012-04-25 Thread gavinp
Title: [115206] trunk/Source








Revision 115206
Author gav...@chromium.org
Date 2012-04-25 07:42:24 -0700 (Wed, 25 Apr 2012)


Log Message
[Chromium] Fix some conditional compilation logic in Platform
https://bugs.webkit.org/show_bug.cgi?id=83798

Reviewed by Darin Fisher.

Source/Platform:

* chromium/public/WebURLError.h:
(WebURLError):
* chromium/public/WebURLRequest.h:
(WebURLRequest):
* chromium/public/WebURLResponse.h:
(WebURLResponse):

Source/WebKit/chromium:

* tests/WebFrameTest.cpp:
(WebKit::TestReloadDoesntRedirectWebFrameClient::cancelledError):

Modified Paths

trunk/Source/Platform/ChangeLog
trunk/Source/Platform/chromium/public/WebURLError.h
trunk/Source/Platform/chromium/public/WebURLRequest.h
trunk/Source/Platform/chromium/public/WebURLResponse.h
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp




Diff

Modified: trunk/Source/Platform/ChangeLog (115205 => 115206)

--- trunk/Source/Platform/ChangeLog	2012-04-25 14:39:36 UTC (rev 115205)
+++ trunk/Source/Platform/ChangeLog	2012-04-25 14:42:24 UTC (rev 115206)
@@ -1,5 +1,19 @@
 2012-04-25  Gavin Peters  
 
+[Chromium] Fix some conditional compilation logic in Platform
+https://bugs.webkit.org/show_bug.cgi?id=83798
+
+Reviewed by Darin Fisher.
+
+* chromium/public/WebURLError.h:
+(WebURLError):
+* chromium/public/WebURLRequest.h:
+(WebURLRequest):
+* chromium/public/WebURLResponse.h:
+(WebURLResponse):
+
+2012-04-25  Gavin Peters  
+
 Move WebReferrerPolicy.h from WebKit to Platform
 https://bugs.webkit.org/show_bug.cgi?id=84539
 


Modified: trunk/Source/Platform/chromium/public/WebURLError.h (115205 => 115206)

--- trunk/Source/Platform/chromium/public/WebURLError.h	2012-04-25 14:39:36 UTC (rev 115205)
+++ trunk/Source/Platform/chromium/public/WebURLError.h	2012-04-25 14:42:24 UTC (rev 115206)
@@ -34,7 +34,7 @@
 #include "WebString.h"
 #include "WebURL.h"
 
-#if defined(WEBKIT_IMPLEMENTATION)
+#if WEBKIT_IMPLEMENTATION
 namespace WebCore { class ResourceError; }
 #endif
 
@@ -64,7 +64,7 @@
 
 WebURLError() : reason(0), isCancellation(false) { }
 
-#if defined(WEBKIT_IMPLEMENTATION)
+#if WEBKIT_IMPLEMENTATION
 WebURLError(const WebCore::ResourceError&);
 WebURLError& operator=(const WebCore::ResourceError&);
 operator WebCore::ResourceError() const;


Modified: trunk/Source/Platform/chromium/public/WebURLRequest.h (115205 => 115206)

--- trunk/Source/Platform/chromium/public/WebURLRequest.h	2012-04-25 14:39:36 UTC (rev 115205)
+++ trunk/Source/Platform/chromium/public/WebURLRequest.h	2012-04-25 14:42:24 UTC (rev 115206)
@@ -34,7 +34,7 @@
 #include "WebCommon.h"
 #include "WebHTTPBody.h"
 
-#if defined(WEBKIT_IMPLEMENTATION)
+#if WEBKIT_IMPLEMENTATION
 namespace WebCore { class ResourceRequest; }
 #endif
 
@@ -182,7 +182,7 @@
 WEBKIT_EXPORT ExtraData* extraData() const;
 WEBKIT_EXPORT void setExtraData(ExtraData*);
 
-#if defined(WEBKIT_IMPLEMENTATION)
+#if WEBKIT_IMPLEMENTATION
 WebCore::ResourceRequest& toMutableResourceRequest();
 const WebCore::ResourceRequest& toResourceRequest() const;
 #endif


Modified: trunk/Source/Platform/chromium/public/WebURLResponse.h (115205 => 115206)

--- trunk/Source/Platform/chromium/public/WebURLResponse.h	2012-04-25 14:39:36 UTC (rev 115205)
+++ trunk/Source/Platform/chromium/public/WebURLResponse.h	2012-04-25 14:42:24 UTC (rev 115206)
@@ -34,7 +34,7 @@
 #include "WebCommon.h"
 #include "WebPrivateOwnPtr.h"
 
-#if defined(WEBKIT_IMPLEMENTATION)
+#if WEBKIT_IMPLEMENTATION
 namespace WebCore { class ResourceResponse; }
 #endif
 
@@ -133,7 +133,7 @@
 WEBKIT_EXPORT WebCString securityInfo() const;
 WEBKIT_EXPORT void setSecurityInfo(const WebCString&);
 
-#if defined(WEBKIT_IMPLEMENTATION)
+#if WEBKIT_IMPLEMENTATION
 WebCore::ResourceResponse& toMutableResourceResponse();
 const WebCore::ResourceResponse& toResourceResponse() const;
 #endif


Modified: trunk/Source/WebKit/chromium/ChangeLog (115205 => 115206)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-25 14:39:36 UTC (rev 115205)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-25 14:42:24 UTC (rev 115206)
@@ -1,3 +1,13 @@
+2012-04-25  Gavin Peters  
+
+[Chromium] Fix some conditional compilation logic in Platform
+https://bugs.webkit.org/show_bug.cgi?id=83798
+
+Reviewed by Darin Fisher.
+
+* tests/WebFrameTest.cpp:
+(WebKit::TestReloadDoesntRedirectWebFrameClient::cancelledError):
+
 2012-04-25  Yury Semikhatsky  
 
 Web Inspector: move HeapSnapshotLoader into a separate file


Modified: trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp (115205 => 115206)

--- trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp	2012-04-25 14:39:36 UTC (rev 115205)
+++ trunk/Source/WebKit/chromium/tests/WebFrameTest.cpp	2012-04-25 14:42:24 UTC (rev 115206)
@@ -273,7 +273,12 @@
 {
 // Return a dummy error so the DocumentLoa

[webkit-changes] [115200] trunk/Source

2012-04-25 Thread gavinp
Title: [115200] trunk/Source








Revision 115200
Author gav...@chromium.org
Date 2012-04-25 07:02:08 -0700 (Wed, 25 Apr 2012)


Log Message
Move WebReferrerPolicy.h from WebKit to Platform
https://bugs.webkit.org/show_bug.cgi?id=84539

Reviewed by Adam Barth.

Source/Platform:

* Platform.gypi:
* chromium/public/WebReferrerPolicy.h: Copied from Source/WebKit/chromium/public/WebReferrerPolicy.h.
(WebKit):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebContextMenuData.h:
* public/WebFrame.h:
* public/WebReferrerPolicy.h:
* public/WebSecurityPolicy.h:
* public/platform/WebReferrerPolicy.h: Copied from Source/WebKit/chromium/public/WebReferrerPolicy.h.
* src/AssertMatchingEnums.cpp:

Modified Paths

trunk/Source/Platform/ChangeLog
trunk/Source/Platform/Platform.gypi
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/WebKit.gyp
trunk/Source/WebKit/chromium/public/WebContextMenuData.h
trunk/Source/WebKit/chromium/public/WebFrame.h
trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h
trunk/Source/WebKit/chromium/public/WebSecurityPolicy.h
trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp


Added Paths

trunk/Source/Platform/chromium/public/WebReferrerPolicy.h
trunk/Source/WebKit/chromium/public/platform/WebReferrerPolicy.h




Diff

Modified: trunk/Source/Platform/ChangeLog (115199 => 115200)

--- trunk/Source/Platform/ChangeLog	2012-04-25 13:59:20 UTC (rev 115199)
+++ trunk/Source/Platform/ChangeLog	2012-04-25 14:02:08 UTC (rev 115200)
@@ -1,3 +1,14 @@
+2012-04-25  Gavin Peters  
+
+Move WebReferrerPolicy.h from WebKit to Platform
+https://bugs.webkit.org/show_bug.cgi?id=84539
+
+Reviewed by Adam Barth.
+
+* Platform.gypi:
+* chromium/public/WebReferrerPolicy.h: Copied from Source/WebKit/chromium/public/WebReferrerPolicy.h.
+(WebKit):
+
 2012-04-24  Yuzhu Shen  
 
 [chromium] Add a description field in WebURLError and show failure description in the inspector network tab.


Modified: trunk/Source/Platform/Platform.gypi (115199 => 115200)

--- trunk/Source/Platform/Platform.gypi	2012-04-25 13:59:20 UTC (rev 115199)
+++ trunk/Source/Platform/Platform.gypi	2012-04-25 14:02:08 UTC (rev 115200)
@@ -75,6 +75,7 @@
 'chromium/public/WebPrivateOwnPtr.h',
 'chromium/public/WebPrivatePtr.h',
 'chromium/public/WebRect.h',
+'chromium/public/WebReferrerPolicy.h',
 'chromium/public/WebSessionDescriptionDescriptor.h',
 'chromium/public/WebSize.h',
 'chromium/public/WebSocketStreamError.h',


Copied: trunk/Source/Platform/chromium/public/WebReferrerPolicy.h (from rev 115199, trunk/Source/WebKit/chromium/public/WebReferrerPolicy.h) (0 => 115200)

--- trunk/Source/Platform/chromium/public/WebReferrerPolicy.h	(rev 0)
+++ trunk/Source/Platform/chromium/public/WebReferrerPolicy.h	2012-04-25 14:02:08 UTC (rev 115200)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+#ifndef WebReferrerPolicy_h
+#define WebReferrerPolicy_h
+
+namespace WebKit {
+
+enum WebReferrerPolicy {
+WebReferrerPolicyAlways,
+WebReferrerPolicyDefault,
+WebReferrerPolicyNever,
+WebReferrerPolicyOrigin,
+};
+
+} // namespace WebKit
+
+#endif


Modified: trunk/Source/WebKit/chromium/ChangeLog (115199 => 115200)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-25 13:59:20 UTC (rev 115199)
+++ trunk/Source/WebKit/chromium

[webkit-changes] [114890] trunk/Source

2012-04-23 Thread gavinp
Title: [114890] trunk/Source








Revision 114890
Author gav...@chromium.org
Date 2012-04-23 05:53:24 -0700 (Mon, 23 Apr 2012)


Log Message
Move ReferrerPolicy out of SecurityPolicy class into its own header in platform.
https://bugs.webkit.org/show_bug.cgi?id=84516

Source/WebCore:

Reviewed by Adam Barth.

No change in behaviour; same enum, different class.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::processReferrerPolicy):
* dom/Document.h:
(WebCore::Document::referrerPolicy):
(Document):
* page/SecurityPolicy.h:
* platform/ReferrerPolicy.h: Added.
(WebCore):

Source/WebKit/chromium:

Reviewed by Adam Barth.

No change in behaviour; same enum, different class.

* src/AssertMatchingEnums.cpp:
* src/WebSecurityPolicy.cpp:
(WebKit::WebSecurityPolicy::generateReferrerHeader):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/GNUmakefile.list.am
trunk/Source/WebCore/Target.pri
trunk/Source/WebCore/WebCore.exp.in
trunk/Source/WebCore/WebCore.gypi
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/dom/Document.h
trunk/Source/WebCore/page/SecurityPolicy.h
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
trunk/Source/WebKit/chromium/src/WebSecurityPolicy.cpp


Added Paths

trunk/Source/WebCore/platform/ReferrerPolicy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (114889 => 114890)

--- trunk/Source/WebCore/ChangeLog	2012-04-23 12:37:50 UTC (rev 114889)
+++ trunk/Source/WebCore/ChangeLog	2012-04-23 12:53:24 UTC (rev 114890)
@@ -1,3 +1,28 @@
+2012-04-23  Gavin Peters  
+
+Move ReferrerPolicy out of SecurityPolicy class into its own header in platform.
+https://bugs.webkit.org/show_bug.cgi?id=84516
+
+Reviewed by Adam Barth.
+
+No change in behaviour; same enum, different class.
+
+* GNUmakefile.list.am:
+* Target.pri:
+* WebCore.exp.in:
+* WebCore.gypi:
+* WebCore.vcproj/WebCore.vcproj:
+* WebCore.xcodeproj/project.pbxproj:
+* dom/Document.cpp:
+(WebCore::Document::Document):
+(WebCore::Document::processReferrerPolicy):
+* dom/Document.h:
+(WebCore::Document::referrerPolicy):
+(Document):
+* page/SecurityPolicy.h:
+* platform/ReferrerPolicy.h: Added.
+(WebCore):
+
 2012-04-23  Vineet Chaudhary  
 
 JS binding code generator doesn't handle "attribute unsigned long[]" well


Modified: trunk/Source/WebCore/GNUmakefile.list.am (114889 => 114890)

--- trunk/Source/WebCore/GNUmakefile.list.am	2012-04-23 12:37:50 UTC (rev 114889)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-04-23 12:53:24 UTC (rev 114890)
@@ -3521,6 +3521,7 @@
 	Source/WebCore/platform/PopupMenuStyle.h \
 	Source/WebCore/platform/PurgeableBuffer.h \
 	Source/WebCore/platform/PurgePriority.h \
+	Source/WebCore/platform/ReferrerPolicy.h \
 	Source/WebCore/platform/RunLoop.cpp \
 	Source/WebCore/platform/RunLoop.h \
 	Source/WebCore/platform/RuntimeApplicationChecks.cpp \


Modified: trunk/Source/WebCore/Target.pri (114889 => 114890)

--- trunk/Source/WebCore/Target.pri	2012-04-23 12:37:50 UTC (rev 114889)
+++ trunk/Source/WebCore/Target.pri	2012-04-23 12:53:24 UTC (rev 114890)
@@ -2333,6 +2333,7 @@
 platform/PlatformTouchEvent.h \
 platform/PlatformTouchPoint.h \
 platform/PopupMenu.h \
+platform/ReferrerPolicy.h \
 platform/qt/ClipboardQt.h \
 platform/qt/CookieJarQt.h \
 platform/qt/QWebPageClient.h \


Modified: trunk/Source/WebCore/WebCore.exp.in (114889 => 114890)

--- trunk/Source/WebCore/WebCore.exp.in	2012-04-23 12:37:50 UTC (rev 114889)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-04-23 12:53:24 UTC (rev 114890)
@@ -383,7 +383,7 @@
 __ZN7WebCore14SecurityOrigin6createERKNS_4KURLE
 __ZN7WebCore14SecurityPolicy18setLocalLoadPolicyENS0_15LocalLoadPolicyE
 __ZN7WebCore14SecurityPolicy18shouldHideReferrerERKNS_4KURLERKN3WTF6StringE
-__ZN7WebCore14SecurityPolicy22generateReferrerHeaderENS0_14ReferrerPolicyERKNS_4KURLERKN3WTF6StringE
+__ZN7WebCore14SecurityPolicy22generateReferrerHeaderENS_14ReferrerPolicyERKNS_4KURLERKN3WTF6StringE
 __ZN7WebCore14SecurityPolicy27resetOriginAccessWhitelistsEv
 __ZN7WebCore14SecurityPolicy29addOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
 __ZN7WebCore14SecurityPolicy32removeOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b


Modified: trunk/Source/WebCore/WebCore.gypi (114889 => 114890)

--- trunk/Source/WebCore/WebCore.gypi	2012-04-23 12:37:50 UTC (rev 114889)
+++ trunk/Source/WebCore/WebCore.gypi	2012-04-23 12:53:24 UTC (rev 114890)
@@ -3130,6 +3130,7 @@
 'platform/PlatformTouchEvent.h',
 'platform/PlatformTouch

[webkit-changes] [111391] trunk/Source/WebCore

2012-03-20 Thread gavinp
Title: [111391] trunk/Source/WebCore








Revision 111391
Author gav...@chromium.org
Date 2012-03-20 07:31:17 -0700 (Tue, 20 Mar 2012)


Log Message
New PageCache histogram for tracking the highest leverage frame reject reasons.
https://bugs.webkit.org/show_bug.cgi?id=81358

Reviewed by Adam Barth.

The current chromium FrameClientImpl always denies page cache; but
that's easily fixable.  This histogram tracks which rejection
causes occur alone with that cause.  I'm particularly interested
in knowing how many more pages would work in the page cache if we
could get plugins in.

* history/PageCache.cpp:
(WebCore::logCanCachePageDecision):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/history/PageCache.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (111390 => 111391)

--- trunk/Source/WebCore/ChangeLog	2012-03-20 14:24:51 UTC (rev 111390)
+++ trunk/Source/WebCore/ChangeLog	2012-03-20 14:31:17 UTC (rev 111391)
@@ -1,3 +1,19 @@
+2012-03-20  Gavin Peters  
+
+New PageCache histogram for tracking the highest leverage frame reject reasons.
+https://bugs.webkit.org/show_bug.cgi?id=81358
+
+Reviewed by Adam Barth.
+
+The current chromium FrameClientImpl always denies page cache; but
+that's easily fixable.  This histogram tracks which rejection
+causes occur alone with that cause.  I'm particularly interested
+in knowing how many more pages would work in the page cache if we
+could get plugins in.
+
+* history/PageCache.cpp:
+(WebCore::logCanCachePageDecision):
+
 2012-03-15  Pavel Podivilov  
 
 Web Inspector: support inline source maps.


Modified: trunk/Source/WebCore/history/PageCache.cpp (111390 => 111391)

--- trunk/Source/WebCore/history/PageCache.cpp	2012-03-20 14:24:51 UTC (rev 111390)
+++ trunk/Source/WebCore/history/PageCache.cpp	2012-03-20 14:31:17 UTC (rev 111391)
@@ -83,6 +83,22 @@
 };
 COMPILE_ASSERT(NumberOfReasonsFramesCannotBeInPageCache <= sizeof(unsigned)*8, ReasonFrameCannotBeInPageCacheDoesNotFitInBitmap);
 
+static int indexOfSingleBit(int32_t v)
+{
+int index = 0;
+if (v & 0x)
+index = 16;
+if (v & 0xFF00FF00)
+index += 8;
+if (v & 0xF0F0F0F0)
+index += 4;
+if (v & 0x)
+index += 2;
+if (v & 0x)
+index += 1;
+return index;
+}
+
 static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
 {
 #ifdef NDEBUG
@@ -272,6 +288,20 @@
 HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonByPage", i, NumberOfReasonsFramesCannotBeInPageCache);
 }
 }
+#if PLATFORM(CHROMIUM)
+// This strangely specific histogram is particular to chromium: as of 2012-03-16, the FrameClientImpl always denies caching, so
+// of particular interest are solitary reasons other than the frameRejectReasons. If we didn't get to the ClientDeniesCaching, we
+// took the early exit for the boring reason NoDocumentLoader, so we should have only one reason, and not two.
+// FIXME: remove this histogram after data is gathered.
+if (frameReasonCount == 2) {
+ASSERT(frameRejectReasons & (1 << ClientDeniesCaching));
+const unsigned singleReasonForRejectingFrameOtherThanClientDeniesCaching = frameRejectReasons & ~(1 << ClientDeniesCaching);
+COMPILE_ASSERT(NumberOfReasonsPagesCannotBeInPageCache <= 32, ReasonPageCannotBeInPageCacheDoesNotFitInInt32);
+const int index = indexOfSingleBit(static_cast(singleReasonForRejectingFrameOtherThanClientDeniesCaching));
+HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonByPageWhenSingleExcludingFrameClient", index, NumberOfReasonsPagesCannotBeInPageCache);
+}
+#endif
+
 HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonCountByPage", frameReasonCount, 1 + NumberOfReasonsFramesCannotBeInPageCache);
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [110998] trunk/Source/WebCore

2012-03-16 Thread gavinp
Title: [110998] trunk/Source/WebCore








Revision 110998
Author gav...@chromium.org
Date 2012-03-16 06:25:31 -0700 (Fri, 16 Mar 2012)


Log Message
Add asserts and improve logging in PageCache.
https://bugs.webkit.org/show_bug.cgi?id=81179

Reviewed by Brady Eidson.

The early exits from logCanCacheFrameDecision had the potential to skew histogram data.  Moving
the DocumentLoader check to the top, but eliminating the early exits is a compromise that keeps
the logged data mostly accurate.

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/history/PageCache.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (110997 => 110998)

--- trunk/Source/WebCore/ChangeLog	2012-03-16 13:13:14 UTC (rev 110997)
+++ trunk/Source/WebCore/ChangeLog	2012-03-16 13:25:31 UTC (rev 110998)
@@ -1,3 +1,17 @@
+2012-03-16  Gavin Peters  
+
+Add asserts and improve logging in PageCache.
+https://bugs.webkit.org/show_bug.cgi?id=81179
+
+Reviewed by Brady Eidson.
+
+The early exits from logCanCacheFrameDecision had the potential to skew histogram data.  Moving
+the DocumentLoader check to the top, but eliminating the early exits is a compromise that keeps
+the logged data mostly accurate.
+
+* history/PageCache.cpp:
+(WebCore::logCanCacheFrameDecision):
+
 2012-03-16  Yoshifumi Inoue  
 
 [Forms] label.form attribute doesn't work


Modified: trunk/Source/WebCore/history/PageCache.cpp (110997 => 110998)

--- trunk/Source/WebCore/history/PageCache.cpp	2012-03-16 13:13:14 UTC (rev 110997)
+++ trunk/Source/WebCore/history/PageCache.cpp	2012-03-16 13:25:31 UTC (rev 110998)
@@ -81,20 +81,20 @@
 ClientDeniesCaching,
 NumberOfReasonsFramesCannotBeInPageCache,
 };
+COMPILE_ASSERT(NumberOfReasonsFramesCannotBeInPageCache <= sizeof(unsigned)*8, ReasonFrameCannotBeInPageCacheDoesNotFitInBitmap);
 
 static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
 {
 #ifdef NDEBUG
 UNUSED_PARAM(indentLevel);
 #endif
-// Only bother logging for frames that have actually loaded and have content.
-if (frame->loader()->stateMachine()->creatingInitialEmptyDocument())
-return false;
-KURL currentURL = frame->loader()->documentLoader() ? frame->loader()->documentLoader()->url() : KURL();
-if (currentURL.isEmpty())
-return false;
-
 PCLOG("+---");
+if (!frame->loader()->documentLoader()) {
+PCLOG("   -There is no DocumentLoader object");
+return 1 << NoDocumentLoader;
+}
+
+KURL currentURL = frame->loader()->documentLoader()->url();
 KURL newURL = frame->loader()->provisionalDocumentLoader() ? frame->loader()->provisionalDocumentLoader()->url() : KURL();
 if (!newURL.isEmpty())
 PCLOG(" Determining if frame can be cached navigating from (", currentURL.string(), ") to (", newURL.string(), "):");
@@ -102,74 +102,68 @@
 PCLOG(" Determining if subframe with URL (", currentURL.string(), ") can be cached:");
  
 unsigned rejectReasons = 0;
-
-if (!frame->loader()->documentLoader()) {
-PCLOG("   -There is no DocumentLoader object");
-rejectReasons |= 1 << NoDocumentLoader;
-} else {
-if (!frame->loader()->documentLoader()->mainDocumentError().isNull()) {
-PCLOG("   -Main document has an error");
-rejectReasons |= 1 << MainDocumentError;
-}
-if (frame->loader()->documentLoader()->substituteData().isValid() && frame->loader()->documentLoader()->substituteData().failingURL().isEmpty()) {
-PCLOG("   -Frame is an error page");
-rejectReasons |= 1 << IsErrorPage;
-}
-if (frame->loader()->subframeLoader()->containsPlugins() && !frame->page()->settings()->pageCacheSupportsPlugins()) {
-PCLOG("   -Frame contains plugins");
-rejectReasons |= 1 << HasPlugins;
-}
-if (frame->document()->url().protocolIs("https")
-&& (frame->loader()->documentLoader()->response().cacheControlContainsNoCache()
-|| frame->loader()->documentLoader()->response().cacheControlContainsNoStore())) {
-PCLOG("   -Frame is HTTPS, and cache control prohibits caching or storing");
-rejectReasons |= 1 << IsHttpsAndCacheControlled;
-}
-if (frame->domWindow() && frame->domWindow()->hasEventListeners(eventNames().unloadEvent)) {
-PCLOG("   -Frame has an unload event listener");
-rejectReasons |= 1 << HasUnloadListener;
-}
+if (!frame->loader()->documentLoader()->mainDocumentError().isNull()) {
+PCLOG("   -Main document has an error");
+rejectReasons |= 1 << MainDocumentError;
+}
+if (frame->loader()->documentLoader()->substituteData().isValid() && frame->loader()->documentLoader()->substituteData().failingURL().isEmpty()) {
+PCLOG("   -Frame is an e

[webkit-changes] [110618] trunk/Source/WebCore

2012-03-13 Thread gavinp
Title: [110618] trunk/Source/WebCore








Revision 110618
Author gav...@chromium.org
Date 2012-03-13 14:59:06 -0700 (Tue, 13 Mar 2012)


Log Message
Remove vestigal abortEvent from image attribute.
https://bugs.webkit.org/show_bug.cgi?id=80795

Reviewed by Adam Barth.

It seems we installed a listener for the abort event on images,
but never ever raised them.  So this patch removes it.  This could
cause different behaviour if the user sends abort events directly
at an image element, although addEventListener will still work.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLImageElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (110617 => 110618)

--- trunk/Source/WebCore/ChangeLog	2012-03-13 21:52:27 UTC (rev 110617)
+++ trunk/Source/WebCore/ChangeLog	2012-03-13 21:59:06 UTC (rev 110618)
@@ -1,3 +1,18 @@
+2012-03-13  Gavin Peters  
+
+Remove vestigal abortEvent from image attribute.
+https://bugs.webkit.org/show_bug.cgi?id=80795
+
+Reviewed by Adam Barth.
+
+It seems we installed a listener for the abort event on images,
+but never ever raised them.  So this patch removes it.  This could
+cause different behaviour if the user sends abort events directly
+at an image element, although addEventListener will still work.
+
+* html/HTMLImageElement.cpp:
+(WebCore::HTMLImageElement::parseAttribute):
+
 2012-03-13  Nate Chapin  
 
 Rework how a CachedRawResource decides if it can be reused


Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (110617 => 110618)

--- trunk/Source/WebCore/html/HTMLImageElement.cpp	2012-03-13 21:52:27 UTC (rev 110617)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp	2012-03-13 21:59:06 UTC (rev 110618)
@@ -117,8 +117,6 @@
 m_imageLoader.updateFromElementIgnoringPreviousError();
 else if (attrName == usemapAttr)
 setIsLink(!attr->isNull());
-else if (attrName == onabortAttr)
-setAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(this, attr));
 else if (attrName == onloadAttr)
 setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
 else if (attrName == onbeforeloadAttr)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [110600] trunk/Source/WebKit/chromium

2012-03-13 Thread gavinp
Title: [110600] trunk/Source/WebKit/chromium








Revision 110600
Author gav...@chromium.org
Date 2012-03-13 13:47:58 -0700 (Tue, 13 Mar 2012)


Log Message
Implement ApplicationCacheHost::canCacheInPageCache() for chromium.
https://bugs.webkit.org/show_bug.cgi?id=80905

Reviewed by Eric Seidel.

This won't cause chrome to use the PageCache, but it will cause our histogram statistics
describing PageCache use to be more accurate.

* src/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::canCacheInPageCache):

Modified Paths

trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp




Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (110599 => 110600)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-13 20:30:24 UTC (rev 110599)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-13 20:47:58 UTC (rev 110600)
@@ -1,3 +1,16 @@
+2012-03-13  Gavin Peters  
+
+Implement ApplicationCacheHost::canCacheInPageCache() for chromium.
+https://bugs.webkit.org/show_bug.cgi?id=80905
+
+Reviewed by Eric Seidel.
+
+This won't cause chrome to use the PageCache, but it will cause our histogram statistics
+describing PageCache use to be more accurate.
+
+* src/ApplicationCacheHost.cpp:
+(WebCore::ApplicationCacheHost::canCacheInPageCache):
+
 2012-03-13  Dana Jansens  
 
 [chromium] Use CCOcclusionTracker for draw culling


Modified: trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp (110599 => 110600)

--- trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp	2012-03-13 20:30:24 UTC (rev 110599)
+++ trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp	2012-03-13 20:47:58 UTC (rev 110600)
@@ -195,8 +195,10 @@
 
 bool ApplicationCacheHost::canCacheInPageCache()
 {
-// N/A to the chromium port which doesn't use the page cache.
-return false;
+// Chromium doesn't use the page cache, however, that's controlled by WebCore::Settings, which has usesPageCache() return
+// false. So we return an hyptothetical here: Chromium won't end up using the PageCache, but the statistics in PageCache.cpp
+// will be reported correctly for re-evaluating that decision.
+return !isApplicationCacheEnabled() || status() == UNCACHED;
 }
 
 void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplicationCache)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [110567] trunk/Source/WebCore

2012-03-13 Thread gavinp
Title: [110567] trunk/Source/WebCore








Revision 110567
Author gav...@chromium.org
Date 2012-03-13 08:28:56 -0700 (Tue, 13 Mar 2012)


Log Message
New PageCache histogram which counts failures ignoring Settings.
https://bugs.webkit.org/show_bug.cgi?id=80864

Reviewed by Brady Eidson.

Chrome has a command line switch to turn on the page cache.
Currently it doesn't work, but it can cause the PageCache reasons
for failure count to read lower than it should.  Add a new
histogram to report the corrected value.

* history/PageCache.cpp:
(WebCore::logCanCachePageDecision):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/history/PageCache.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (110566 => 110567)

--- trunk/Source/WebCore/ChangeLog	2012-03-13 15:24:02 UTC (rev 110566)
+++ trunk/Source/WebCore/ChangeLog	2012-03-13 15:28:56 UTC (rev 110567)
@@ -1,3 +1,18 @@
+2012-03-13  Gavin Peters  
+
+New PageCache histogram which counts failures ignoring Settings.
+https://bugs.webkit.org/show_bug.cgi?id=80864
+
+Reviewed by Brady Eidson.
+
+Chrome has a command line switch to turn on the page cache.
+Currently it doesn't work, but it can cause the PageCache reasons
+for failure count to read lower than it should.  Add a new
+histogram to report the corrected value.
+
+* history/PageCache.cpp:
+(WebCore::logCanCachePageDecision):
+
 2012-03-13  George Staikos  
 
 Fix signed/unsigned mismatch compiler warnings.


Modified: trunk/Source/WebCore/history/PageCache.cpp (110566 => 110567)

--- trunk/Source/WebCore/history/PageCache.cpp	2012-03-13 15:24:02 UTC (rev 110566)
+++ trunk/Source/WebCore/history/PageCache.cpp	2012-03-13 15:28:56 UTC (rev 110567)
@@ -264,6 +264,8 @@
 }
 }
 HistogramSupport::histogramEnumeration("PageCache.PageRejectReasonCount", reasonCount, 1 + NumberOfReasonsPagesCannotBeInPageCache);
+const bool settingsDisabledPageCache = rejectReasons & (1 << DisabledPageCache);
+HistogramSupport::histogramEnumeration("PageCache.PageRejectReasonCountExcludingSettings", reasonCount - settingsDisabledPageCache, NumberOfReasonsPagesCannotBeInPageCache);
 
 // Report also on the frame reasons by page; this is distinct from the per frame statistics since it coalesces the
 // causes from all subframes together.






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [110564] trunk/Source

2012-03-13 Thread gavinp
Title: [110564] trunk/Source








Revision 110564
Author gav...@chromium.org
Date 2012-03-13 08:18:42 -0700 (Tue, 13 Mar 2012)


Log Message
Make ApplicationCacheHost::canCacheInPageCache() non-const.
https://bugs.webkit.org/show_bug.cgi?id=80904

Reviewed by Alexey Proskuryakov.

A const pointer to a large object like ApplicationCacheHost is not our standard
practice; so remove this (implicit) one.  See also https://bugs.webkit.org/show_bug.cgi?id=80898

Source/WebCore:

* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::canCacheInPageCache):
* loader/appcache/ApplicationCacheHost.h:
(ApplicationCacheHost):

Source/WebKit/chromium:

* src/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::canCacheInPageCache):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.h
trunk/Source/WebKit/chromium/ChangeLog
trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (110563 => 110564)

--- trunk/Source/WebCore/ChangeLog	2012-03-13 15:14:57 UTC (rev 110563)
+++ trunk/Source/WebCore/ChangeLog	2012-03-13 15:18:42 UTC (rev 110564)
@@ -1,3 +1,18 @@
+2012-03-13  Gavin Peters  
+
+Make ApplicationCacheHost::canCacheInPageCache() non-const.
+https://bugs.webkit.org/show_bug.cgi?id=80904
+
+Reviewed by Alexey Proskuryakov.
+
+A const pointer to a large object like ApplicationCacheHost is not our standard
+practice; so remove this (implicit) one.  See also https://bugs.webkit.org/show_bug.cgi?id=80898
+
+* loader/appcache/ApplicationCacheHost.cpp:
+(WebCore::ApplicationCacheHost::canCacheInPageCache):
+* loader/appcache/ApplicationCacheHost.h:
+(ApplicationCacheHost):
+
 2012-03-13  Stephen Chenney  
 
 Crash in WebCore::GraphicsContext::paintingDisabled


Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp (110563 => 110564)

--- trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp	2012-03-13 15:14:57 UTC (rev 110563)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp	2012-03-13 15:18:42 UTC (rev 110564)
@@ -228,7 +228,7 @@
 }
 }
 
-bool ApplicationCacheHost::canCacheInPageCache() const 
+bool ApplicationCacheHost::canCacheInPageCache()
 {
 return !applicationCache() && !candidateApplicationCacheGroup();
 }


Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.h (110563 => 110564)

--- trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.h	2012-03-13 15:14:57 UTC (rev 110563)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.h	2012-03-13 15:18:42 UTC (rev 110564)
@@ -136,7 +136,7 @@
 bool maybeLoadSynchronously(ResourceRequest&, ResourceError&, ResourceResponse&, Vector& data);
 void maybeLoadFallbackSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, Vector& data);
 
-bool canCacheInPageCache() const;
+bool canCacheInPageCache();
 
 Status status() const;  
 bool update();


Modified: trunk/Source/WebKit/chromium/ChangeLog (110563 => 110564)

--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-13 15:14:57 UTC (rev 110563)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-13 15:18:42 UTC (rev 110564)
@@ -1,3 +1,16 @@
+2012-03-13  Gavin Peters  
+
+Make ApplicationCacheHost::canCacheInPageCache() non-const.
+https://bugs.webkit.org/show_bug.cgi?id=80904
+
+Reviewed by Alexey Proskuryakov.
+
+A const pointer to a large object like ApplicationCacheHost is not our standard
+practice; so remove this (implicit) one.  See also https://bugs.webkit.org/show_bug.cgi?id=80898
+
+* src/ApplicationCacheHost.cpp:
+(WebCore::ApplicationCacheHost::canCacheInPageCache):
+
 2012-03-13  Kinuko Yasuda  
 
 Allow WebFileChooser to return extra file info (like displayName) in addition to mere file paths


Modified: trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp (110563 => 110564)

--- trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp	2012-03-13 15:14:57 UTC (rev 110563)
+++ trunk/Source/WebKit/chromium/src/ApplicationCacheHost.cpp	2012-03-13 15:18:42 UTC (rev 110564)
@@ -193,7 +193,7 @@
 // N/A to the chromium port
 }
 
-bool ApplicationCacheHost::canCacheInPageCache() const
+bool ApplicationCacheHost::canCacheInPageCache()
 {
 // N/A to the chromium port which doesn't use the page cache.
 return false;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [110561] trunk/Source/WebCore

2012-03-13 Thread gavinp
Title: [110561] trunk/Source/WebCore








Revision 110561
Author gav...@chromium.org
Date 2012-03-13 07:57:53 -0700 (Tue, 13 Mar 2012)


Log Message
Fix an enumeration name in ReasonsFrameCannotBeInPageCache.
https://bugs.webkit.org/show_bug.cgi?id=80849

Reviewed by Brady Eidson.

It seems that somebody goofed, and named one of the
ReasonsFrameCannotBeInPageCache antonymically.

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/history/PageCache.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (110560 => 110561)

--- trunk/Source/WebCore/ChangeLog	2012-03-13 14:38:27 UTC (rev 110560)
+++ trunk/Source/WebCore/ChangeLog	2012-03-13 14:57:53 UTC (rev 110561)
@@ -1,3 +1,16 @@
+2012-03-13  Gavin Peters  
+
+Fix an enumeration name in ReasonsFrameCannotBeInPageCache.
+https://bugs.webkit.org/show_bug.cgi?id=80849
+
+Reviewed by Brady Eidson.
+
+It seems that somebody goofed, and named one of the
+ReasonsFrameCannotBeInPageCache antonymically.
+
+* history/PageCache.cpp:
+(WebCore::logCanCacheFrameDecision):
+
 2012-03-12  Kinuko Yasuda  
 
 File upload control should use File.name() rather than File.path() to show chosen filenames


Modified: trunk/Source/WebCore/history/PageCache.cpp (110560 => 110561)

--- trunk/Source/WebCore/history/PageCache.cpp	2012-03-13 14:38:27 UTC (rev 110560)
+++ trunk/Source/WebCore/history/PageCache.cpp	2012-03-13 14:57:53 UTC (rev 110561)
@@ -76,7 +76,7 @@
 QuickRedirectComing,
 IsLoadingInAPISense,
 IsStopping,
-CanSuspendActiveDOMObjects,
+CannotSuspendActiveDOMObjects,
 DocumentLoaderUsesApplicationCache,
 ClientDeniesCaching,
 NumberOfReasonsFramesCannotBeInPageCache,
@@ -159,7 +159,7 @@
 }
 if (!frame->document()->canSuspendActiveDOMObjects()) {
 PCLOG("   -The document cannot suspect its active DOM Objects");
-rejectReasons |= 1 << CanSuspendActiveDOMObjects;
+rejectReasons |= 1 << CannotSuspendActiveDOMObjects;
 }
 if (!frame->loader()->documentLoader()->applicationCacheHost()->canCacheInPageCache()) {
 PCLOG("   -The DocumentLoader uses an application cache");






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [110057] trunk/Source/WebCore

2012-03-07 Thread gavinp
Title: [110057] trunk/Source/WebCore








Revision 110057
Author gav...@chromium.org
Date 2012-03-07 08:52:17 -0800 (Wed, 07 Mar 2012)


Log Message
Add Histograms for reporting on PageCache reject reasons
https://bugs.webkit.org/show_bug.cgi?id=80187

Enhance the PageCache debug mode so that it uses Histograms to
report on causes of failure.  Turn on the debug printing path
even in non-debug Chromium builds, so these histograms will
update.

Reviewed by Brady Eidson.

No new tests, does not change behaviour.

* history/PageCache.cpp:
(WebCore):
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCache):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/history/PageCache.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (110056 => 110057)

--- trunk/Source/WebCore/ChangeLog	2012-03-07 16:35:28 UTC (rev 110056)
+++ trunk/Source/WebCore/ChangeLog	2012-03-07 16:52:17 UTC (rev 110057)
@@ -1,3 +1,23 @@
+2012-03-07  Gavin Peters  
+
+Add Histograms for reporting on PageCache reject reasons
+https://bugs.webkit.org/show_bug.cgi?id=80187
+
+Enhance the PageCache debug mode so that it uses Histograms to
+report on causes of failure.  Turn on the debug printing path
+even in non-debug Chromium builds, so these histograms will
+update.
+
+Reviewed by Brady Eidson.
+
+No new tests, does not change behaviour.
+
+* history/PageCache.cpp:
+(WebCore):
+(WebCore::logCanCacheFrameDecision):
+(WebCore::logCanCachePageDecision):
+(WebCore::PageCache::canCache):
+
 2012-03-07  Elliot Poger  
 
 [Chromium] Remove use_skia option from GYP


Modified: trunk/Source/WebCore/history/PageCache.cpp (110056 => 110057)

--- trunk/Source/WebCore/history/PageCache.cpp	2012-03-07 16:35:28 UTC (rev 110056)
+++ trunk/Source/WebCore/history/PageCache.cpp	2012-03-07 16:52:17 UTC (rev 110057)
@@ -40,6 +40,7 @@
 #include "FrameLoader.h"
 #include "FrameLoaderClient.h"
 #include "FrameLoaderStateMachine.h"
+#include "HistogramSupport.h"
 #include "HistoryItem.h"
 #include "Logging.h"
 #include "Page.h"
@@ -56,12 +57,36 @@
 
 static const double autoreleaseInterval = 3;
 
-#ifndef NDEBUG
+#if PLATFORM(CHROMIUM) || !defined(NDEBUG)
 
 #define PCLOG(...) LOG(PageCache, "%*s%s", indentLevel*4, "", makeString(__VA_ARGS__).utf8().data())
 
-static bool logCanCacheFrameDecision(Frame* frame, int indentLevel)
+// Used in histograms, please only add at the end, and do not remove elements (renaming e.g. to "FooEnumUnused1" is fine).
+// This is because statistics may be gathered from histograms between versions over time, and re-using values causes collisions.
+enum ReasonFrameCannotBeInPageCache {
+NoDocumentLoader = 0,
+MainDocumentError,
+IsErrorPage,
+HasPlugins,
+IsHttpsAndCacheControlled,
+HasUnloadListener,
+HasDatabaseHandles,
+HasSharedWorkers,
+NoHistoryItem,
+QuickRedirectComing,
+IsLoadingInAPISense,
+IsStopping,
+CanSuspendActiveDOMObjects,
+DocumentLoaderUsesApplicationCache,
+ClientDeniesCaching,
+NumberOfReasonsFramesCannotBeInPageCache,
+};
+
+static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
 {
+#ifdef NDEBUG
+UNUSED_PARAM(indentLevel);
+#endif
 // Only bother logging for frames that have actually loaded and have content.
 if (frame->loader()->stateMachine()->creatingInitialEmptyDocument())
 return false;
@@ -75,87 +100,110 @@
 PCLOG(" Determining if frame can be cached navigating from (", currentURL.string(), ") to (", newURL.string(), "):");
 else
 PCLOG(" Determining if subframe with URL (", currentURL.string(), ") can be cached:");
+ 
+unsigned rejectReasons = 0;
 
-bool cannotCache = false;
-
 if (!frame->loader()->documentLoader()) {
 PCLOG("   -There is no DocumentLoader object");
-cannotCache = true;
+rejectReasons |= 1 << NoDocumentLoader;
 } else {
 if (!frame->loader()->documentLoader()->mainDocumentError().isNull()) {
 PCLOG("   -Main document has an error");
-cannotCache = true;
+rejectReasons |= 1 << MainDocumentError;
 }
 if (frame->loader()->documentLoader()->substituteData().isValid() && frame->loader()->documentLoader()->substituteData().failingURL().isEmpty()) {
 PCLOG("   -Frame is an error page");
-cannotCache = true;
+rejectReasons |= 1 << IsErrorPage;
 }
 if (frame->loader()->subframeLoader()->containsPlugins() && !frame->page()->settings()->pageCacheSupportsPlugins()) {
 PCLOG("   -Frame contains plugins");
-cannotCache = true;
+rejectReasons |= 1 << HasPlugins;
 }
 if (frame->document()->url().protocolIs("https")
 && (frame->loader()->documentLoader()->response().cacheControlContain

[webkit-changes] [109598] trunk/Source/WebCore

2012-03-02 Thread gavinp
Title: [109598] trunk/Source/WebCore








Revision 109598
Author gav...@chromium.org
Date 2012-03-02 12:11:16 -0800 (Fri, 02 Mar 2012)


Log Message
Sync PageCache debugging with PageCache behaviour
https://bugs.webkit.org/show_bug.cgi?id=79943

Sync up the debug printing code in PageCache with the actual logic,
and clean up the debug printing at the same time.

Reviewed by Brady Eidson.

No new tests, as this is a refactor of debug only code.

* history/PageCache.cpp:
(WebCore):
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/history/PageCache.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (109597 => 109598)

--- trunk/Source/WebCore/ChangeLog	2012-03-02 20:07:26 UTC (rev 109597)
+++ trunk/Source/WebCore/ChangeLog	2012-03-02 20:11:16 UTC (rev 109598)
@@ -1,3 +1,20 @@
+2012-03-02  Gavin Peters  
+
+Sync PageCache debugging with PageCache behaviour
+https://bugs.webkit.org/show_bug.cgi?id=79943
+
+Sync up the debug printing code in PageCache with the actual logic,
+and clean up the debug printing at the same time.
+
+Reviewed by Brady Eidson.
+
+No new tests, as this is a refactor of debug only code.
+
+* history/PageCache.cpp:
+(WebCore):
+(WebCore::logCanCacheFrameDecision):
+(WebCore::logCanCachePageDecision):
+
 2012-03-02  Maciej Stachowiak  
 
 REGRESSION(r97353): Crash when accessing location or history properties inside a navigated window


Modified: trunk/Source/WebCore/history/PageCache.cpp (109597 => 109598)

--- trunk/Source/WebCore/history/PageCache.cpp	2012-03-02 20:07:26 UTC (rev 109597)
+++ trunk/Source/WebCore/history/PageCache.cpp	2012-03-02 20:11:16 UTC (rev 109598)
@@ -58,28 +58,8 @@
 
 #ifndef NDEBUG
 
-static String& pageCacheLogPrefix(int indentLevel)
-{
-static int previousIndent = -1;
-DEFINE_STATIC_LOCAL(String, prefix, ());
+#define PCLOG(...) LOG(PageCache, "%*s%s", indentLevel*4, "", makeString(__VA_ARGS__).utf8().data())
 
-if (indentLevel != previousIndent) {
-previousIndent = indentLevel;
-prefix.truncate(0);
-for (int i = 0; i < previousIndent; ++i)
-prefix += "";
-}
-
-return prefix;
-}
-
-static void pageCacheLog(const String& prefix, const String& message)
-{
-LOG(PageCache, "%s%s", prefix.utf8().data(), message.utf8().data());
-}
-
-#define PCLOG(...) pageCacheLog(pageCacheLogPrefix(indentLevel), makeString(__VA_ARGS__))
-
 static bool logCanCacheFrameDecision(Frame* frame, int indentLevel)
 {
 // Only bother logging for frames that have actually loaded and have content.
@@ -98,22 +78,26 @@
 
 bool cannotCache = false;
 
-do {
-if (!frame->loader()->documentLoader()) {
-PCLOG("   -There is no DocumentLoader object");
-cannotCache = true;
-break;
-}
+if (!frame->loader()->documentLoader()) {
+PCLOG("   -There is no DocumentLoader object");
+cannotCache = true;
+} else {
 if (!frame->loader()->documentLoader()->mainDocumentError().isNull()) {
 PCLOG("   -Main document has an error");
 cannotCache = true;
 }
+if (frame->loader()->documentLoader()->substituteData().isValid() && frame->loader()->documentLoader()->substituteData().failingURL().isEmpty()) {
+PCLOG("   -Frame is an error page");
+cannotCache = true;
+}
 if (frame->loader()->subframeLoader()->containsPlugins() && !frame->page()->settings()->pageCacheSupportsPlugins()) {
 PCLOG("   -Frame contains plugins");
 cannotCache = true;
 }
-if (frame->document()->url().protocolIs("https")) {
-PCLOG("   -Frame is HTTPS");
+if (frame->document()->url().protocolIs("https")
+&& (frame->loader()->documentLoader()->response().cacheControlContainsNoCache()
+|| frame->loader()->documentLoader()->response().cacheControlContainsNoStore())) {
+PCLOG("   -Frame is HTTPS, and cache control prohibits caching or storing");
 cannotCache = true;
 }
 if (frame->domWindow() && frame->domWindow()->hasEventListeners(eventNames().unloadEvent)) {
@@ -164,7 +148,7 @@
 PCLOG("   -The client says this frame cannot be cached");
 cannotCache = true; 
 }
-} while (false);
+}
 
 for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
 if (!logCanCacheFrameDecision(child, indentLevel + 1))
@@ -190,7 +174,6 @@
 
 bool cannotCache = !logCanCacheFrameDecision(page->mainFrame(), 1);
 
-FrameLoadType loadType = page->mainFrame()->loader()->loadType();
 if (!page->backForward()->isActive()) {
 PCLOG("   -The back/forward list is disabled or has 0 capacity");
  

[webkit-changes] [101792] trunk/Source/WebCore

2011-12-02 Thread gavinp
Title: [101792] trunk/Source/WebCore








Revision 101792
Author gav...@chromium.org
Date 2011-12-02 07:15:43 -0800 (Fri, 02 Dec 2011)


Log Message
Remove instrumentation tracking a fixed bug
https://bugs.webkit.org/show_bug.cgi?id=73471

The underlying bug is fixed (bug 72068), and this instrumentation was intrusive and using
memory, plus the conditional compilation made me sad.

Reviewed by Nate Chapin.

No new tests.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::queueScriptForExecution):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptElement.cpp
trunk/Source/WebCore/dom/ScriptElement.h
trunk/Source/WebCore/dom/ScriptRunner.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (101791 => 101792)

--- trunk/Source/WebCore/ChangeLog	2011-12-02 14:45:44 UTC (rev 101791)
+++ trunk/Source/WebCore/ChangeLog	2011-12-02 15:15:43 UTC (rev 101792)
@@ -1,3 +1,24 @@
+2011-12-02  Gavin Peters  
+
+Remove instrumentation tracking a fixed bug
+https://bugs.webkit.org/show_bug.cgi?id=73471
+
+The underlying bug is fixed (bug 72068), and this instrumentation was intrusive and using
+memory, plus the conditional compilation made me sad.
+
+Reviewed by Nate Chapin.
+
+No new tests.
+
+* dom/ScriptElement.cpp:
+(WebCore::ScriptElement::ScriptElement):
+(WebCore::ScriptElement::requestScript):
+(WebCore::ScriptElement::stopLoadRequest):
+(WebCore::ScriptElement::notifyFinished):
+* dom/ScriptElement.h:
+* dom/ScriptRunner.cpp:
+(WebCore::ScriptRunner::queueScriptForExecution):
+
 2011-12-02  Vsevolod Vlasov  
 
 Web Inspector: Split view works weirdly in network panel when resizing, showing/hiding main element.


Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (101791 => 101792)

--- trunk/Source/WebCore/dom/ScriptElement.cpp	2011-12-02 14:45:44 UTC (rev 101791)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp	2011-12-02 15:15:43 UTC (rev 101792)
@@ -65,10 +65,6 @@
 , m_willExecuteWhenDocumentFinishedParsing(false)
 , m_forceAsync(!parserInserted)
 , m_willExecuteInOrder(false)
-#if PLATFORM(CHROMIUM)
-, m_cachedScriptState(NeverSet)
-, m_backtraceSize(0)
-#endif
 {
 ASSERT(m_element);
 }
@@ -269,10 +265,6 @@
 }
 
 if (m_cachedScript) {
-#if PLATFORM(CHROMIUM)  
-ASSERT(m_cachedScriptState == NeverSet);
-m_cachedScriptState = Set;
-#endif
 return true;
 }
 
@@ -310,12 +302,6 @@
 if (m_cachedScript) {
 if (!m_willBeParserExecuted)
 m_cachedScript->removeClient(this);
-#if PLATFORM(CHROMIUM)
-ASSERT(m_cachedScriptState == Set);
-m_cachedScriptState = ZeroedInStopLoadRequest;
-m_backtraceSize = MaxBacktraceSize;
-WTFGetBacktrace(m_backtrace, &m_backtraceSize);
-#endif
 m_cachedScript = 0;
 }
 }
@@ -342,12 +328,6 @@
 else
 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::ASYNC_EXECUTION);
 
-#if PLATFORM(CHROMIUM)
-ASSERT(m_cachedScriptState == Set);
-m_cachedScriptState = ZeroedInNotifyFinished;
-m_backtraceSize = MaxBacktraceSize;
-WTFGetBacktrace(m_backtrace, &m_backtraceSize);
-#endif
 m_cachedScript = 0;
 }
 


Modified: trunk/Source/WebCore/dom/ScriptElement.h (101791 => 101792)

--- trunk/Source/WebCore/dom/ScriptElement.h	2011-12-02 14:45:44 UTC (rev 101791)
+++ trunk/Source/WebCore/dom/ScriptElement.h	2011-12-02 15:15:43 UTC (rev 101792)
@@ -104,25 +104,6 @@
 bool m_willExecuteInOrder : 1;
 String m_characterEncoding;
 String m_fallbackCharacterEncoding;
-
-#if PLATFORM(CHROMIUM)
-// Temporary: intended to help debug how we get notifyFinished() called when m_cachedScript is null,
-// which seems to sometimes happen (see http://code.google.com/p/chromium/issues/detail?id=75604 )
-enum {
-NeverSet,
-Set,
-ZeroedInStopLoadRequest,
-ZeroedInNotifyFinished,
-} m_cachedScriptState;
-
-// We grab a backtrace when we zero m_cachedScript, so that at later crashes
-// we'll have a debuggable stack.
-enum {
-MaxBacktraceSize = 32
-};
-int m_backtraceSize;
-void* m_backtrace[MaxBacktraceSize];
-#endif
 };
 
 ScriptElement* toScriptElement(Element*);


Modified: trunk/Source/WebCore/dom/ScriptRunner.cpp (101791 => 101792)

--- trunk/Source/WebCore/dom/ScriptRunner.cpp	2011-12-02 14:45:44 UTC (rev 101791)
+++ trunk/Source/WebCore/dom/ScriptRunner.cpp	2011-12-02 15:15:43 UTC (rev 101792)
@@ -52,11 +52,7 @@
 void ScriptRunner::queueScriptForExecution(ScriptElement* scriptElement, CachedResourceHandle cachedScript, ExecutionType executionType)
 {
 ASSERT(scr

[webkit-changes] [100218] branches/chromium/912/Source/WebCore/loader/cache/ CachedResourceRequest.cpp

2011-11-14 Thread gavinp
Title: [100218] branches/chromium/912/Source/WebCore/loader/cache/CachedResourceRequest.cpp








Revision 100218
Author gav...@chromium.org
Date 2011-11-14 16:57:53 -0800 (Mon, 14 Nov 2011)


Log Message
MERGE 71122 and 72068 simultaniously.

71122:

properly end requests when a bad status code return happens
 https://bugs.webkit.org/show_bug.cgi?id=71122

Calling error without ending the request set up the CachedResourceRequest so that it could
actually send out two notifyFinished() events. This probably was the root cause of
lots of crashing instability; I know from crbug.com/75604 that this bug was causing lots
of crashes in ScriptRunner/ScriptElement for instance.

The fix is easy: just properly end the request instead of just calling error, and we won't
re-notify.

Reviewed by Nate Chapin.

No new tests, as the problem wasn't very amenable to layout tests.

There is a chromium test going through code review at  http://codereview.chromium.org/8404001/

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didReceiveData):


72068:

Protect Document during error responses
 https://bugs.webkit.org/show_bug.cgi?id=72068

Add a Document protector to the error response code handler, just
as exists for other ends of requests.

Reviewed by Nate Chapin.

Source/WebCore:

Test: http/tests/misc/xslt-bad-import.html

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didReceiveData):

Modified Paths

branches/chromium/912/Source/WebCore/loader/cache/CachedResourceRequest.cpp




Diff

Modified: branches/chromium/912/Source/WebCore/loader/cache/CachedResourceRequest.cpp (100217 => 100218)

--- branches/chromium/912/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-15 00:51:31 UTC (rev 100217)
+++ branches/chromium/912/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-15 00:57:53 UTC (rev 100218)
@@ -271,9 +271,16 @@
 if (m_resource->errorOccurred())
 return;
 
-if (m_resource->response().httpStatusCode() >= 400) {
-if (!m_resource->shouldIgnoreHTTPStatusCodeErrors())
-m_resource->error(CachedResource::LoadError);
+if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors()) {
+// Prevent the document from being destroyed before we are done with
+// the cachedResourceLoader that it will delete when the document gets deleted.
+RefPtr protector(m_cachedResourceLoader->document());
+if (!m_multipart)
+m_cachedResourceLoader->decrementRequestCount(m_resource);
+m_finishing = true;
+m_loader->clearClient();
+m_resource->error(CachedResource::LoadError);
+end();
 return;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [100094] trunk/Tools

2011-11-13 Thread gavinp
Title: [100094] trunk/Tools








Revision 100094
Author gav...@chromium.org
Date 2011-11-13 13:30:11 -0800 (Sun, 13 Nov 2011)


Log Message
command line control of webcore log channels in chromium DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=72126

The option --webcore-log-channels=,, is the same as
what chromium takes.

Reviewed by Kent Tamura.

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp




Diff

Modified: trunk/Tools/ChangeLog (100093 => 100094)

--- trunk/Tools/ChangeLog	2011-11-13 21:05:38 UTC (rev 100093)
+++ trunk/Tools/ChangeLog	2011-11-13 21:30:11 UTC (rev 100094)
@@ -1,3 +1,16 @@
+2011-11-13  Gavin Peters  
+
+command line control of webcore log channels in chromium DumpRenderTree
+https://bugs.webkit.org/show_bug.cgi?id=72126
+
+The option --webcore-log-channels=,, is the same as
+what chromium takes.
+
+Reviewed by Kent Tamura.
+
+* DumpRenderTree/chromium/DumpRenderTree.cpp:
+(main):
+
 2011-11-12  Ariya Hidayat  
 
 [Qt] Fix minor config typo in the build tool documentation


Modified: trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp (100093 => 100094)

--- trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp	2011-11-13 21:05:38 UTC (rev 100093)
+++ trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp	2011-11-13 21:30:11 UTC (rev 100094)
@@ -66,6 +66,7 @@
 static const char optionStressDeopt[] = "--stress-deopt";
 static const char optionJavaScriptFlags[] = "--js-flags=";
 static const char optionNoTimeout[] = "--no-timeout";
+static const char optionWebCoreLogChannels[] = "--webcore-log-channels=";
 
 class WebKitSupportTestEnvironment {
 public:
@@ -205,7 +206,10 @@
 _javascript_Flags = argument.substr(strlen(optionJavaScriptFlags));
 else if (argument == optionNoTimeout)
 noTimeout = true;
-else if (argument.size() && argument[0] == '-')
+else if (!argument.find(optionWebCoreLogChannels)) {
+string channels = argument.substr(strlen(optionWebCoreLogChannels));
+webkit_support::EnableWebCoreLogChannels(channels);
+} else if (argument.size() && argument[0] == '-')
 fprintf(stderr, "Unknown option: %s\n", argv[i]);
 else
 tests.append(argument);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99982] trunk

2011-11-11 Thread gavinp
Title: [99982] trunk








Revision 99982
Author gav...@chromium.org
Date 2011-11-11 08:55:31 -0800 (Fri, 11 Nov 2011)


Log Message
Protect Document during error responses
https://bugs.webkit.org/show_bug.cgi?id=72068

Add a Document protector to the error response code handler, just
as exists for other ends of requests.

Reviewed by Nate Chapin.

Source/WebCore:

Test: http/tests/misc/xslt-bad-import.html

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didReceiveData):

LayoutTests:

* http/tests/misc/resources/xslt-bad-import-uri.xml: Added.
* http/tests/misc/resources/xslt-bad-import-uri.xsl: Added.
* http/tests/misc/xslt-bad-import-expected.txt: Added.
* http/tests/misc/xslt-bad-import.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp


Added Paths

trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml
trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl
trunk/LayoutTests/http/tests/misc/xslt-bad-import.html




Diff

Modified: trunk/LayoutTests/ChangeLog (99981 => 99982)

--- trunk/LayoutTests/ChangeLog	2011-11-11 16:53:33 UTC (rev 99981)
+++ trunk/LayoutTests/ChangeLog	2011-11-11 16:55:31 UTC (rev 99982)
@@ -1,3 +1,18 @@
+2011-11-11  Gavin Peters  
+
+Protect Document during error responses
+https://bugs.webkit.org/show_bug.cgi?id=72068
+
+Add a Document protector to the error response code handler, just
+as exists for other ends of requests.
+
+Reviewed by Nate Chapin.
+
+* http/tests/misc/resources/xslt-bad-import-uri.xml: Added.
+* http/tests/misc/resources/xslt-bad-import-uri.xsl: Added.
+* http/tests/misc/xslt-bad-import-expected.txt: Added.
+* http/tests/misc/xslt-bad-import.html: Added.
+
 2011-11-11  Yury Semikhatsky  
 
 Fixed overlapping expectations.


Added: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml (0 => 99982)

--- trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml	2011-11-11 16:55:31 UTC (rev 99982)
@@ -0,0 +1,4 @@
+
+ 
+ 
Property changes on: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml
___


Added: svn:eol-style

Added: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl (0 => 99982)

--- trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl	2011-11-11 16:55:31 UTC (rev 99982)
@@ -0,0 +1,7 @@
+
+
+
+ 
+
+


Added: trunk/LayoutTests/http/tests/misc/xslt-bad-import.html (0 => 99982)

--- trunk/LayoutTests/http/tests/misc/xslt-bad-import.html	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/xslt-bad-import.html	2011-11-11 16:55:31 UTC (rev 99982)
@@ -0,0 +1,17 @@
+
+
+
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+window._onload_ = function() {
+document.getElementById('d').innerHTML=''
+}
+
+
+
+
+
+This test passes if it does not crash.
+
+
Property changes on: trunk/LayoutTests/http/tests/misc/xslt-bad-import.html
___


Added: svn:eol-style

Modified: trunk/Source/WebCore/ChangeLog (99981 => 99982)

--- trunk/Source/WebCore/ChangeLog	2011-11-11 16:53:33 UTC (rev 99981)
+++ trunk/Source/WebCore/ChangeLog	2011-11-11 16:55:31 UTC (rev 99982)
@@ -1,3 +1,18 @@
+2011-11-11  Gavin Peters  
+
+Protect Document during error responses
+https://bugs.webkit.org/show_bug.cgi?id=72068
+
+Add a Document protector to the error response code handler, just
+as exists for other ends of requests.
+
+Reviewed by Nate Chapin.
+
+Test: http/tests/misc/xslt-bad-import.html
+
+* loader/cache/CachedResourceRequest.cpp:
+(WebCore::CachedResourceRequest::didReceiveData):
+
 2011-11-11  Sheriff Bot  
 
 Unreviewed, rolling out r99979.


Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (99981 => 99982)

--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-11 16:53:33 UTC (rev 99981)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-11 16:55:31 UTC (rev 99982)
@@ -293,6 +293,9 @@
 return;
 
 if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors()) {
+// Prevent the document from being destroyed before we are done with
+// the cachedResourceLoader that it will delete when the document gets deleted.
+RefPtr protector(m_cachedResourceLoader->document());
 if (!m_multipart)
 m_cachedResourceLoader->decrementRequestCount(m_resource);
 m_finishing = true;







[webkit-changes] [99981] trunk/Source/WebCore

2011-11-11 Thread gavinp
Title: [99981] trunk/Source/WebCore








Revision 99981
Author gav...@chromium.org
Date 2011-11-11 08:53:33 -0800 (Fri, 11 Nov 2011)


Log Message
Unreviewed, rolling out r99979.
http://trac.webkit.org/changeset/99979
https://bugs.webkit.org/show_bug.cgi?id=72136

bad commit message (Requested by gavinp on #webkit).

Patch by Sheriff Bot  on 2011-11-11

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didReceiveData):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (99980 => 99981)

--- trunk/Source/WebCore/ChangeLog	2011-11-11 16:50:57 UTC (rev 99980)
+++ trunk/Source/WebCore/ChangeLog	2011-11-11 16:53:33 UTC (rev 99981)
@@ -1,3 +1,14 @@
+2011-11-11  Sheriff Bot  
+
+Unreviewed, rolling out r99979.
+http://trac.webkit.org/changeset/99979
+https://bugs.webkit.org/show_bug.cgi?id=72136
+
+bad commit message (Requested by gavinp on #webkit).
+
+* loader/cache/CachedResourceRequest.cpp:
+(WebCore::CachedResourceRequest::didReceiveData):
+
 2011-11-11  Gavin Peters  
 
 Protect Document during error responses


Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (99980 => 99981)

--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-11 16:50:57 UTC (rev 99980)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-11 16:53:33 UTC (rev 99981)
@@ -293,9 +293,6 @@
 return;
 
 if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors()) {
-// Prevent the document from being destroyed before we are done with
-// the cachedResourceLoader that it will delete when the document gets deleted.
-RefPtr protector(m_cachedResourceLoader->document());
 if (!m_multipart)
 m_cachedResourceLoader->decrementRequestCount(m_resource);
 m_finishing = true;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99979] trunk

2011-11-11 Thread gavinp
Title: [99979] trunk








Revision 99979
Author gav...@chromium.org
Date 2011-11-11 08:47:05 -0800 (Fri, 11 Nov 2011)


Log Message
Protect Document during error responses
https://bugs.webkit.org/show_bug.cgi?id=72068

Add a Document protector to the error response code handler, just
as exists for other ends of requests.

Reviewed by NOBODY (OOPS!).

Test: http/tests/misc/xslt-bad-import.html

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didReceiveData):

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (99978 => 99979)

--- trunk/LayoutTests/ChangeLog	2011-11-11 16:43:07 UTC (rev 99978)
+++ trunk/LayoutTests/ChangeLog	2011-11-11 16:47:05 UTC (rev 99979)
@@ -1,3 +1,18 @@
+2011-11-11  Gavin Peters  
+
+Protect Document during error responses
+https://bugs.webkit.org/show_bug.cgi?id=72068
+
+Add a Document protector to the error response code handler, just
+as exists for other ends of requests.
+
+Reviewed by Nate Chapin.
+
+* http/tests/misc/resources/xslt-bad-import-uri.xml: Added.
+* http/tests/misc/resources/xslt-bad-import-uri.xsl: Added.
+* http/tests/misc/xslt-bad-import-expected.txt: Added.
+* http/tests/misc/xslt-bad-import.html: Added.
+
 2011-11-11  Yury Semikhatsky  
 
 Unreviewed. Mark http/tests/inspector-enabled/dedicated-workers-list.html as timing out on Mac.


Modified: trunk/Source/WebCore/ChangeLog (99978 => 99979)

--- trunk/Source/WebCore/ChangeLog	2011-11-11 16:43:07 UTC (rev 99978)
+++ trunk/Source/WebCore/ChangeLog	2011-11-11 16:47:05 UTC (rev 99979)
@@ -1,3 +1,18 @@
+2011-11-11  Gavin Peters  
+
+Protect Document during error responses
+https://bugs.webkit.org/show_bug.cgi?id=72068
+
+Add a Document protector to the error response code handler, just
+as exists for other ends of requests.
+
+Reviewed by Nate Chapin.
+
+Test: http/tests/misc/xslt-bad-import.html
+
+* loader/cache/CachedResourceRequest.cpp:
+(WebCore::CachedResourceRequest::didReceiveData):
+
 2011-11-10  Philippe Normand  
 
 [GStreamer] GstCaps and GstPad RefPtr implementation


Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (99978 => 99979)

--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-11 16:43:07 UTC (rev 99978)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-11 16:47:05 UTC (rev 99979)
@@ -293,6 +293,9 @@
 return;
 
 if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors()) {
+// Prevent the document from being destroyed before we are done with
+// the cachedResourceLoader that it will delete when the document gets deleted.
+RefPtr protector(m_cachedResourceLoader->document());
 if (!m_multipart)
 m_cachedResourceLoader->decrementRequestCount(m_resource);
 m_finishing = true;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99975] trunk/LayoutTests/http/tests/misc

2011-11-11 Thread gavinp
Title: [99975] trunk/LayoutTests/http/tests/misc








Revision 99975
Author gav...@chromium.org
Date 2011-11-11 08:31:50 -0800 (Fri, 11 Nov 2011)


Log Message
Unreviewed, rilling out 99971,99972.

They were landed in error in using git-svn by gav...@chromium.org.

Removed Paths

trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml
trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl
trunk/LayoutTests/http/tests/misc/xslt-bad-import.html




Diff

Deleted: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml (99974 => 99975)

--- trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml	2011-11-11 16:28:46 UTC (rev 99974)
+++ trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml	2011-11-11 16:31:50 UTC (rev 99975)
@@ -1,4 +0,0 @@
-
- 
- 


Deleted: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl (99974 => 99975)

--- trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl	2011-11-11 16:28:46 UTC (rev 99974)
+++ trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl	2011-11-11 16:31:50 UTC (rev 99975)
@@ -1,7 +0,0 @@
-
-
-
- 
-
-


Deleted: trunk/LayoutTests/http/tests/misc/xslt-bad-import.html (99974 => 99975)

--- trunk/LayoutTests/http/tests/misc/xslt-bad-import.html	2011-11-11 16:28:46 UTC (rev 99974)
+++ trunk/LayoutTests/http/tests/misc/xslt-bad-import.html	2011-11-11 16:31:50 UTC (rev 99975)
@@ -1,17 +0,0 @@
-
-
-
-if (window.layoutTestController)
-layoutTestController.dumpAsText();
-window._onload_ = function() {
-document.getElementById('d').innerHTML=''
-}
-
-
-
-
-
-This test passes if it does not crash.
-
-






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99972] trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt

2011-11-11 Thread gavinp
Title: [99972] trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt








Revision 99972
Author gav...@chromium.org
Date 2011-11-11 08:25:38 -0800 (Fri, 11 Nov 2011)


Log Message
Moar

Added Paths

trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt




Diff

Added: trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt (0 => 99972)

--- trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt	2011-11-11 16:25:38 UTC (rev 99972)
@@ -0,0 +1,2 @@
+ 
+This test passes if it does not crash.
Property changes on: trunk/LayoutTests/http/tests/misc/xslt-bad-import-expected.txt
___


Added: svn:eol-style




___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99971] trunk/LayoutTests/http/tests/misc

2011-11-11 Thread gavinp
Title: [99971] trunk/LayoutTests/http/tests/misc








Revision 99971
Author gav...@chromium.org
Date 2011-11-11 08:25:26 -0800 (Fri, 11 Nov 2011)


Log Message
first shot yo

Added Paths

trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml
trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl
trunk/LayoutTests/http/tests/misc/xslt-bad-import.html




Diff

Added: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml (0 => 99971)

--- trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml	2011-11-11 16:25:26 UTC (rev 99971)
@@ -0,0 +1,4 @@
+
+ 
+ 
Property changes on: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml
___


Added: svn:eol-style

Added: trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl (0 => 99971)

--- trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl	2011-11-11 16:25:26 UTC (rev 99971)
@@ -0,0 +1,7 @@
+
+
+
+ 
+
+


Added: trunk/LayoutTests/http/tests/misc/xslt-bad-import.html (0 => 99971)

--- trunk/LayoutTests/http/tests/misc/xslt-bad-import.html	(rev 0)
+++ trunk/LayoutTests/http/tests/misc/xslt-bad-import.html	2011-11-11 16:25:26 UTC (rev 99971)
@@ -0,0 +1,17 @@
+
+
+
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+window._onload_ = function() {
+document.getElementById('d').innerHTML=''
+}
+
+
+
+
+
+This test passes if it does not crash.
+
+
Property changes on: trunk/LayoutTests/http/tests/misc/xslt-bad-import.html
___


Added: svn:eol-style




___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [99565] trunk

2011-11-08 Thread gavinp
Title: [99565] trunk








Revision 99565
Author gav...@chromium.org
Date 2011-11-08 06:42:25 -0800 (Tue, 08 Nov 2011)


Log Message
Fix width of m_type in CachedResource
https://bugs.webkit.org/show_bug.cgi?id=71727

Reviewed by Nate Chapin.

Source/WebCore:

Test: fast/dom/HTMLLinkElement/cachedresource-types.html

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResource.h:

LayoutTests:

* fast/dom/HTMLLinkElement/cachedresource-types-expected.txt: Added.
* fast/dom/HTMLLinkElement/cachedresource-types.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h


Added Paths

trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types-expected.txt
trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html




Diff

Modified: trunk/LayoutTests/ChangeLog (99564 => 99565)

--- trunk/LayoutTests/ChangeLog	2011-11-08 14:40:46 UTC (rev 99564)
+++ trunk/LayoutTests/ChangeLog	2011-11-08 14:42:25 UTC (rev 99565)
@@ -1,3 +1,13 @@
+2011-11-08  Gavin Peters  
+
+Fix width of m_type in CachedResource
+https://bugs.webkit.org/show_bug.cgi?id=71727
+
+Reviewed by Nate Chapin.
+
+* fast/dom/HTMLLinkElement/cachedresource-types-expected.txt: Added.
+* fast/dom/HTMLLinkElement/cachedresource-types.html: Added.
+
 2011-11-08  Nikolas Zimmermann  
 
 [Chromium] SVG test failures after r99539


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types-expected.txt (0 => 99565)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types-expected.txt	2011-11-08 14:42:25 UTC (rev 99565)
@@ -0,0 +1 @@
+ This test passes if it does not crash.


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html (0 => 99565)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/cachedresource-types.html	2011-11-08 14:42:25 UTC (rev 99565)
@@ -0,0 +1,9 @@
+
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+
+
+

Modified: trunk/Source/WebCore/ChangeLog (99564 => 99565)

--- trunk/Source/WebCore/ChangeLog	2011-11-08 14:40:46 UTC (rev 99564)
+++ trunk/Source/WebCore/ChangeLog	2011-11-08 14:42:25 UTC (rev 99565)
@@ -1,3 +1,16 @@
+2011-11-08  Gavin Peters  
+
+Fix width of m_type in CachedResource
+https://bugs.webkit.org/show_bug.cgi?id=71727
+
+Reviewed by Nate Chapin.
+
+Test: fast/dom/HTMLLinkElement/cachedresource-types.html
+
+* loader/cache/CachedResource.cpp:
+(WebCore::CachedResource::CachedResource):
+* loader/cache/CachedResource.h:
+
 2011-11-08  Tor Arne Vestbø  
 
 [Qt] Don't set OBJECTS_DIR and DEFINES in default_pre


Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (99564 => 99565)

--- trunk/Source/WebCore/loader/cache/CachedResource.cpp	2011-11-08 14:40:46 UTC (rev 99564)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp	2011-11-08 14:42:25 UTC (rev 99565)
@@ -112,6 +112,7 @@
 , m_resourceToRevalidate(0)
 , m_proxyResource(0)
 {
+ASSERT(m_type == unsigned(type)); // m_type is a bitfield, so this tests careless updates of the enum.
 #ifndef NDEBUG
 cachedResourceLeakCounter.increment();
 #endif


Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (99564 => 99565)

--- trunk/Source/WebCore/loader/cache/CachedResource.h	2011-11-08 14:40:46 UTC (rev 99564)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h	2011-11-08 14:42:25 UTC (rev 99565)
@@ -290,7 +290,7 @@
 bool m_inCache : 1;
 bool m_loading : 1;
 
-unsigned m_type : 3; // Type
+unsigned m_type : 4; // Type
 unsigned m_status : 3; // Status
 
 #ifndef NDEBUG






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [98987] trunk/Source/WebCore

2011-11-01 Thread gavinp
Title: [98987] trunk/Source/WebCore








Revision 98987
Author gav...@chromium.org
Date 2011-11-01 11:54:51 -0700 (Tue, 01 Nov 2011)


Log Message
properly end requests when a bad status code return happens
https://bugs.webkit.org/show_bug.cgi?id=71122

Calling error without ending the request set up the CachedResourceRequest so that it could
actually send out two notifyFinished() events.  This probably was the root cause of
lots of crashing instability; I know from crbug.com/75604 that this bug was causing lots
of crashes in ScriptRunner/ScriptElement for instance.

The fix is easy: just properly end the request instead of just calling error, and we won't
re-notify.

Reviewed by Nate Chapin.

No new tests, as the problem wasn't very amenable to layout tests.
There is a chromium test going through code review at http://codereview.chromium.org/8404001/

* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::didReceiveData):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (98986 => 98987)

--- trunk/Source/WebCore/ChangeLog	2011-11-01 18:40:03 UTC (rev 98986)
+++ trunk/Source/WebCore/ChangeLog	2011-11-01 18:54:51 UTC (rev 98987)
@@ -1,3 +1,24 @@
+2011-11-01  Gavin Peters  
+
+properly end requests when a bad status code return happens
+https://bugs.webkit.org/show_bug.cgi?id=71122
+
+Calling error without ending the request set up the CachedResourceRequest so that it could
+actually send out two notifyFinished() events.  This probably was the root cause of
+lots of crashing instability; I know from crbug.com/75604 that this bug was causing lots
+of crashes in ScriptRunner/ScriptElement for instance.
+
+The fix is easy: just properly end the request instead of just calling error, and we won't
+re-notify.
+
+Reviewed by Nate Chapin.
+
+No new tests, as the problem wasn't very amenable to layout tests.
+There is a chromium test going through code review at http://codereview.chromium.org/8404001/
+
+* loader/cache/CachedResourceRequest.cpp:
+(WebCore::CachedResourceRequest::didReceiveData):
+
 2011-11-01  Erik Arvidsson  
 
 Remove LegacyDefaultOptionalArguments flag from CanvasRenderingContext2d


Modified: trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp (98986 => 98987)

--- trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-01 18:40:03 UTC (rev 98986)
+++ trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2011-11-01 18:54:51 UTC (rev 98987)
@@ -292,7 +292,12 @@
 return;
 
 if (m_resource->response().httpStatusCode() >= 400 && !m_resource->shouldIgnoreHTTPStatusCodeErrors()) {
+if (!m_multipart)
+m_cachedResourceLoader->decrementRequestCount(m_resource);
+m_finishing = true;
+m_loader->clearClient();
 m_resource->error(CachedResource::LoadError);
+end();
 return;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [98043] branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp

2011-10-20 Thread gavinp
Title: [98043] branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp








Revision 98043
Author gav...@chromium.org
Date 2011-10-20 16:58:54 -0700 (Thu, 20 Oct 2011)


Log Message
Reland manual workaround for chromium bug 75604

BUG=75604
Review URL: http://codereview.chromium.org/8361008/

Modified Paths

branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp




Diff

Modified: branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp (98042 => 98043)

--- branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp	2011-10-20 23:56:51 UTC (rev 98042)
+++ branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp	2011-10-20 23:58:54 UTC (rev 98043)
@@ -322,6 +322,10 @@
 
 void ScriptElement::notifyFinished(CachedResource* o)
 {
+// crbug.com/75604 causes double notification in some situations, disregarding the second notification
+// is a workaround.
+if (!m_cachedScript)
+return;
 ASSERT(!m_willBeParserExecuted);
 ASSERT_UNUSED(o, o == m_cachedScript);
 if (m_willExecuteInOrder)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [98028] branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp

2011-10-20 Thread gavinp
Title: [98028] branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp








Revision 98028
Author gav...@chromium.org
Date 2011-10-20 15:32:19 -0700 (Thu, 20 Oct 2011)


Log Message
Revert manual workaround for chromium bug 75604

BUG=75604
Review URL: http://codereview.chromium.org/8361008/

Modified Paths

branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp




Diff

Modified: branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp (98027 => 98028)

--- branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp	2011-10-20 22:25:23 UTC (rev 98027)
+++ branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp	2011-10-20 22:32:19 UTC (rev 98028)
@@ -322,10 +322,6 @@
 
 void ScriptElement::notifyFinished(CachedResource* o)
 {
-// crbug.com/75604 causes double notification in some situations, disregarding the second notification
-// is a workaround.
-if (!m_cachedScript)
-return;
 ASSERT(!m_willBeParserExecuted);
 ASSERT_UNUSED(o, o == m_cachedScript);
 if (m_willExecuteInOrder)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [98017] branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp

2011-10-20 Thread gavinp
Title: [98017] branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp








Revision 98017
Author gav...@chromium.org
Date 2011-10-20 13:01:05 -0700 (Thu, 20 Oct 2011)


Log Message
Manual workaround for chromium bug 75604

BUG=75604
Review URL: http://codereview.chromium.org/8361008/

Modified Paths

branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp




Diff

Modified: branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp (98016 => 98017)

--- branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp	2011-10-20 19:59:14 UTC (rev 98016)
+++ branches/chromium/874/Source/WebCore/dom/ScriptElement.cpp	2011-10-20 20:01:05 UTC (rev 98017)
@@ -322,6 +322,10 @@
 
 void ScriptElement::notifyFinished(CachedResource* o)
 {
+// crbug.com/75604 causes double notification in some situations, disregarding the second notification
+// is a workaround.
+if (!m_cachedScript)
+return;
 ASSERT(!m_willBeParserExecuted);
 ASSERT_UNUSED(o, o == m_cachedScript);
 if (m_willExecuteInOrder)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96869] trunk/Source/JavaScriptCore

2011-10-06 Thread gavinp
Title: [96869] trunk/Source/_javascript_Core








Revision 96869
Author gav...@chromium.org
Date 2011-10-06 16:02:05 -0700 (Thu, 06 Oct 2011)


Log Message
REGRESSION (r96595): First frame in assertion backtraces is no longer labeled "1"
https://bugs.webkit.org/show_bug.cgi?id=69556

Reviewed by Adam Roben.

* wtf/Assertions.cpp:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/wtf/Assertions.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (96868 => 96869)

--- trunk/Source/_javascript_Core/ChangeLog	2011-10-06 22:55:20 UTC (rev 96868)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-06 23:02:05 UTC (rev 96869)
@@ -1,3 +1,12 @@
+2011-10-06  Gavin Peters  
+
+REGRESSION (r96595): First frame in assertion backtraces is no longer labeled "1"
+https://bugs.webkit.org/show_bug.cgi?id=69556
+
+Reviewed by Adam Roben.
+
+* wtf/Assertions.cpp:
+
 2011-10-06  Filip Pizlo  
 
 DFG implementation of UInt32ToNumber is missing a break statement


Modified: trunk/Source/_javascript_Core/wtf/Assertions.cpp (96868 => 96869)

--- trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-06 22:55:20 UTC (rev 96868)
+++ trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-06 23:02:05 UTC (rev 96869)
@@ -211,10 +211,11 @@
 if (mangledName)
 cxaDemangled = abi::__cxa_demangle(mangledName, 0, 0, 0);
 #endif
+const int frameNumber = i - framesToSkip + 1;
 if (mangledName || cxaDemangled)
-fprintf(stderr, "%-3d %p %s\n", i, samples[i], cxaDemangled ? cxaDemangled : mangledName);
+fprintf(stderr, "%-3d %p %s\n", frameNumber, samples[i], cxaDemangled ? cxaDemangled : mangledName);
 else
-fprintf(stderr, "%-3d %p\n", i, samples[i]);
+fprintf(stderr, "%-3d %p\n", frameNumber, samples[i]);
 free(cxaDemangled);
 }
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96849] trunk/Source/WebCore

2011-10-06 Thread gavinp
Title: [96849] trunk/Source/WebCore








Revision 96849
Author gav...@chromium.org
Date 2011-10-06 12:30:22 -0700 (Thu, 06 Oct 2011)


Log Message
conditionalize m_cachedScript stacks to just Chromium port
https://bugs.webkit.org/show_bug.cgi?id=69537

New stack saving telemetry code in ScriptElement shouldn't have
been put in all ports; just narrowing it to the chromium port will
save other ports the memory hit of this diagnostic code.

Reviewed by Nate Chapin.

No new tests.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptElement.cpp
trunk/Source/WebCore/dom/ScriptElement.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (96848 => 96849)

--- trunk/Source/WebCore/ChangeLog	2011-10-06 19:28:52 UTC (rev 96848)
+++ trunk/Source/WebCore/ChangeLog	2011-10-06 19:30:22 UTC (rev 96849)
@@ -1,3 +1,23 @@
+2011-10-06  Gavin Peters  
+
+conditionalize m_cachedScript stacks to just Chromium port
+https://bugs.webkit.org/show_bug.cgi?id=69537
+
+New stack saving telemetry code in ScriptElement shouldn't have
+been put in all ports; just narrowing it to the chromium port will
+save other ports the memory hit of this diagnostic code.
+
+Reviewed by Nate Chapin.
+
+No new tests.
+
+* dom/ScriptElement.cpp:
+(WebCore::ScriptElement::ScriptElement):
+(WebCore::ScriptElement::requestScript):
+(WebCore::ScriptElement::stopLoadRequest):
+(WebCore::ScriptElement::notifyFinished):
+* dom/ScriptElement.h:
+
 2011-10-06  Arthur Hsu  
 
 Ensure font loaded before calling Skia to drawPosText in Chrome sandbox


Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (96848 => 96849)

--- trunk/Source/WebCore/dom/ScriptElement.cpp	2011-10-06 19:28:52 UTC (rev 96848)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp	2011-10-06 19:30:22 UTC (rev 96849)
@@ -65,8 +65,10 @@
 , m_willExecuteWhenDocumentFinishedParsing(false)
 , m_forceAsync(!parserInserted)
 , m_willExecuteInOrder(false)
+#if PLATFORM(CHROMIUM)
 , m_cachedScriptState(NeverSet)
 , m_backtraceSize(0)
+#endif
 {
 ASSERT(m_element);
 }
@@ -263,8 +265,10 @@
 }
 
 if (m_cachedScript) {
+#if PLATFORM(CHROMIUM)  
 ASSERT(m_cachedScriptState == NeverSet);
 m_cachedScriptState = Set;
+#endif
 return true;
 }
 
@@ -302,11 +306,12 @@
 if (m_cachedScript) {
 if (!m_willBeParserExecuted)
 m_cachedScript->removeClient(this);
+#if PLATFORM(CHROMIUM)
 ASSERT(m_cachedScriptState == Set);
-
 m_cachedScriptState = ZeroedInStopLoadRequest;
 m_backtraceSize = MaxBacktraceSize;
 WTFGetBacktrace(m_backtrace, &m_backtraceSize);
+#endif
 m_cachedScript = 0;
 }
 }
@@ -333,10 +338,12 @@
 else
 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::ASYNC_EXECUTION);
 
+#if PLATFORM(CHROMIUM)
 ASSERT(m_cachedScriptState == Set);
 m_cachedScriptState = ZeroedInNotifyFinished;
 m_backtraceSize = MaxBacktraceSize;
 WTFGetBacktrace(m_backtrace, &m_backtraceSize);
+#endif
 m_cachedScript = 0;
 }
 


Modified: trunk/Source/WebCore/dom/ScriptElement.h (96848 => 96849)

--- trunk/Source/WebCore/dom/ScriptElement.h	2011-10-06 19:28:52 UTC (rev 96848)
+++ trunk/Source/WebCore/dom/ScriptElement.h	2011-10-06 19:30:22 UTC (rev 96849)
@@ -105,13 +105,14 @@
 String m_characterEncoding;
 String m_fallbackCharacterEncoding;
 
+#if PLATFORM(CHROMIUM)
 // Temporary: intended to help debug how we get notifyFinished() called when m_cachedScript is null,
 // which seems to sometimes happen (see http://code.google.com/p/chromium/issues/detail?id=75604 )
 enum {
-  NeverSet,
-  Set,
-  ZeroedInStopLoadRequest,
-  ZeroedInNotifyFinished,
+NeverSet,
+Set,
+ZeroedInStopLoadRequest,
+ZeroedInNotifyFinished,
 } m_cachedScriptState;
 
 // We grab a backtrace when we zero m_cachedScript, so that at later crashes
@@ -121,6 +122,7 @@
 };
 int m_backtraceSize;
 void* m_backtrace[MaxBacktraceSize];
+#endif
 };
 
 ScriptElement* toScriptElement(Element*);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96819] trunk/Source/WebCore

2011-10-06 Thread gavinp
Title: [96819] trunk/Source/WebCore








Revision 96819
Author gav...@chromium.org
Date 2011-10-06 09:40:47 -0700 (Thu, 06 Oct 2011)


Log Message
save resource zeroing stacks in ScriptElement for debugging
https://bugs.webkit.org/show_bug.cgi?id=69453

The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get
two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug
75604).  This patch will save a stack in the ScriptElement when this happens, so that if
we do later crash, we can see how we did the first zeroing.

See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that
this change will help track down.

Reviewed by Nate Chapin.

No new tests, this shouldn't affect output at all, and isn't particularly testable.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptElement.cpp
trunk/Source/WebCore/dom/ScriptElement.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (96818 => 96819)

--- trunk/Source/WebCore/ChangeLog	2011-10-06 16:37:35 UTC (rev 96818)
+++ trunk/Source/WebCore/ChangeLog	2011-10-06 16:40:47 UTC (rev 96819)
@@ -1,3 +1,26 @@
+2011-10-06  Gavin Peters  
+
+save resource zeroing stacks in ScriptElement for debugging
+https://bugs.webkit.org/show_bug.cgi?id=69453
+
+The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get
+two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug
+75604).  This patch will save a stack in the ScriptElement when this happens, so that if
+we do later crash, we can see how we did the first zeroing.
+
+See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that
+this change will help track down.
+
+Reviewed by Nate Chapin.
+
+No new tests, this shouldn't affect output at all, and isn't particularly testable.
+
+* dom/ScriptElement.cpp:
+(WebCore::ScriptElement::ScriptElement):
+(WebCore::ScriptElement::stopLoadRequest):
+(WebCore::ScriptElement::notifyFinished):
+* dom/ScriptElement.h:
+
 2011-10-06  Rémi Duraffort  
 
 Fix compilation by adding some missing ENABLE(VIDEO|XSLT)


Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (96818 => 96819)

--- trunk/Source/WebCore/dom/ScriptElement.cpp	2011-10-06 16:37:35 UTC (rev 96818)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp	2011-10-06 16:40:47 UTC (rev 96819)
@@ -66,6 +66,7 @@
 , m_forceAsync(!parserInserted)
 , m_willExecuteInOrder(false)
 , m_cachedScriptState(NeverSet)
+, m_backtraceSize(0)
 {
 ASSERT(m_element);
 }
@@ -302,7 +303,10 @@
 if (!m_willBeParserExecuted)
 m_cachedScript->removeClient(this);
 ASSERT(m_cachedScriptState == Set);
+
 m_cachedScriptState = ZeroedInStopLoadRequest;
+m_backtraceSize = MaxBacktraceSize;
+WTFGetBacktrace(m_backtrace, &m_backtraceSize);
 m_cachedScript = 0;
 }
 }
@@ -331,6 +335,8 @@
 
 ASSERT(m_cachedScriptState == Set);
 m_cachedScriptState = ZeroedInNotifyFinished;
+m_backtraceSize = MaxBacktraceSize;
+WTFGetBacktrace(m_backtrace, &m_backtraceSize);
 m_cachedScript = 0;
 }
 


Modified: trunk/Source/WebCore/dom/ScriptElement.h (96818 => 96819)

--- trunk/Source/WebCore/dom/ScriptElement.h	2011-10-06 16:37:35 UTC (rev 96818)
+++ trunk/Source/WebCore/dom/ScriptElement.h	2011-10-06 16:40:47 UTC (rev 96819)
@@ -113,6 +113,14 @@
   ZeroedInStopLoadRequest,
   ZeroedInNotifyFinished,
 } m_cachedScriptState;
+
+// We grab a backtrace when we zero m_cachedScript, so that at later crashes
+// we'll have a debuggable stack.
+enum {
+MaxBacktraceSize = 32
+};
+int m_backtraceSize;
+void* m_backtrace[MaxBacktraceSize];
 };
 
 ScriptElement* toScriptElement(Element*);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96809] trunk/Source/JavaScriptCore

2011-10-06 Thread gavinp
Title: [96809] trunk/Source/_javascript_Core








Revision 96809
Author gav...@chromium.org
Date 2011-10-06 06:43:04 -0700 (Thu, 06 Oct 2011)


Log Message
export new stack dumping method
https://bugs.webkit.org/show_bug.cgi?id=69018

The original landing of bug 69018 didn't export WTFGetBacktrace, so that when bug 69453 landed, the first use
of this function, many builds broke.  So here we add the exports, so that the function is usable.

Reviewed by Adam Roben.

* _javascript_Core.exp:
* _javascript_Core.vcproj/_javascript_Core/_javascript_Core.def:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/_javascript_Core.exp
trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (96808 => 96809)

--- trunk/Source/_javascript_Core/ChangeLog	2011-10-06 13:37:01 UTC (rev 96808)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-06 13:43:04 UTC (rev 96809)
@@ -1,3 +1,16 @@
+2011-10-06  Gavin Peters  
+
+export new stack dumping method
+https://bugs.webkit.org/show_bug.cgi?id=69018
+
+The original landing of bug 69018 didn't export WTFGetBacktrace, so that when bug 69453 landed, the first use
+of this function, many builds broke.  So here we add the exports, so that the function is usable.
+
+Reviewed by Adam Roben.
+
+* _javascript_Core.exp:
+* _javascript_Core.vcproj/_javascript_Core/_javascript_Core.def:
+
 2011-10-06  Csaba Osztrogonác  
 
 REGRESSION(r96347): Build is broken with MSVC compiler if !PLATFORM(WINDOWS)


Modified: trunk/Source/_javascript_Core/_javascript_Core.exp (96808 => 96809)

--- trunk/Source/_javascript_Core/_javascript_Core.exp	2011-10-06 13:37:01 UTC (rev 96808)
+++ trunk/Source/_javascript_Core/_javascript_Core.exp	2011-10-06 13:43:04 UTC (rev 96809)
@@ -90,6 +90,7 @@
 _JSWeakObjectMapGet
 _JSWeakObjectMapRemove
 _JSWeakObjectMapSet
+_WTFGetBacktrace
 _WTFLog
 _WTFLogVerbose
 _WTFReportArgumentAssertionFailure


Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def (96808 => 96809)

--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-10-06 13:37:01 UTC (rev 96808)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-10-06 13:43:04 UTC (rev 96809)
@@ -379,6 +379,7 @@
 ?writable@PropertyDescriptor@JSC@@QBE_NXZ
 ?writeBarrier@HandleHeap@JSC@@QAEXPAVJSValue@2@ABV32@@Z
 ?yield@WTF@@YAXXZ
+WTFGetBacktrace
 WTFLog
 WTFLogVerbose
 WTFReportArgumentAssertionFailure






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96756] trunk/Source/WebCore

2011-10-05 Thread gavinp
Title: [96756] trunk/Source/WebCore








Revision 96756
Author gav...@chromium.org
Date 2011-10-05 15:03:35 -0700 (Wed, 05 Oct 2011)


Log Message
save resource zeroing stacks in ScriptElement for debugging
https://bugs.webkit.org/show_bug.cgi?id=69453

The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get
two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug
75604).  This patch will save a stack in the ScriptElement when this happens, so that if
we do later crash, we can see how we did the first zeroing.

See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that
this change will help track down.

Reviewed by Nate Chapin.

No new tests, this shouldn't affect output at all, and isn't particularly testable.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptElement.cpp
trunk/Source/WebCore/dom/ScriptElement.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (96755 => 96756)

--- trunk/Source/WebCore/ChangeLog	2011-10-05 21:57:16 UTC (rev 96755)
+++ trunk/Source/WebCore/ChangeLog	2011-10-05 22:03:35 UTC (rev 96756)
@@ -1,3 +1,26 @@
+2011-10-05  Gavin Peters  
+
+save resource zeroing stacks in ScriptElement for debugging
+https://bugs.webkit.org/show_bug.cgi?id=69453
+
+The state machine tracking how m_cachedScript gets zeroed shows that sometimes we get
+two notifyFinished() events in a ScriptElement, which can crash chrome (see chrome bug
+75604).  This patch will save a stack in the ScriptElement when this happens, so that if
+we do later crash, we can see how we did the first zeroing.
+
+See http://code.google.com/p/chromium/issues/detail?id=75604 for the chromium bug that
+this change will help track down.
+
+Reviewed by Nate Chapin.
+
+No new tests, this shouldn't affect output at all, and isn't particularly testable.
+
+* dom/ScriptElement.cpp:
+(WebCore::ScriptElement::ScriptElement):
+(WebCore::ScriptElement::stopLoadRequest):
+(WebCore::ScriptElement::notifyFinished):
+* dom/ScriptElement.h:
+
 2011-10-05  Alexey Proskuryakov  
 
 More build fix.


Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (96755 => 96756)

--- trunk/Source/WebCore/dom/ScriptElement.cpp	2011-10-05 21:57:16 UTC (rev 96755)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp	2011-10-05 22:03:35 UTC (rev 96756)
@@ -66,6 +66,7 @@
 , m_forceAsync(!parserInserted)
 , m_willExecuteInOrder(false)
 , m_cachedScriptState(NeverSet)
+, m_backtraceSize(0)
 {
 ASSERT(m_element);
 }
@@ -302,7 +303,10 @@
 if (!m_willBeParserExecuted)
 m_cachedScript->removeClient(this);
 ASSERT(m_cachedScriptState == Set);
+
 m_cachedScriptState = ZeroedInStopLoadRequest;
+m_backtraceSize = MaxBacktraceSize;
+WTFGetBacktrace(m_backtrace, &m_backtraceSize);
 m_cachedScript = 0;
 }
 }
@@ -331,6 +335,8 @@
 
 ASSERT(m_cachedScriptState == Set);
 m_cachedScriptState = ZeroedInNotifyFinished;
+m_backtraceSize = MaxBacktraceSize;
+WTFGetBacktrace(m_backtrace, &m_backtraceSize);
 m_cachedScript = 0;
 }
 


Modified: trunk/Source/WebCore/dom/ScriptElement.h (96755 => 96756)

--- trunk/Source/WebCore/dom/ScriptElement.h	2011-10-05 21:57:16 UTC (rev 96755)
+++ trunk/Source/WebCore/dom/ScriptElement.h	2011-10-05 22:03:35 UTC (rev 96756)
@@ -113,6 +113,14 @@
   ZeroedInStopLoadRequest,
   ZeroedInNotifyFinished,
 } m_cachedScriptState;
+
+// We grab a backtrace when we zero m_cachedScript, so that at later crashes
+// we'll have a debuggable stack.
+enum {
+MaxBacktraceSize = 32
+};
+int m_backtraceSize;
+void* m_backtrace[MaxBacktraceSize];
 };
 
 ScriptElement* toScriptElement(Element*);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96708] trunk/Source/JavaScriptCore

2011-10-05 Thread gavinp
Title: [96708] trunk/Source/_javascript_Core








Revision 96708
Author gav...@chromium.org
Date 2011-10-05 08:51:38 -0700 (Wed, 05 Oct 2011)


Log Message
REGRESSION (r96595): WTFReportBacktrace listed as the top frame in all assertion backtraces
https://bugs.webkit.org/show_bug.cgi?id=69424

Skip an extra frame in WTFReportBacktrace.  As well, I now don't count skipped frames in maxFrames,
so I've updated maxFrames to 31, as with one skipped frame the previous value was effectively
31 reported frames.

Reviewed by Adam Roben.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/wtf/Assertions.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (96707 => 96708)

--- trunk/Source/_javascript_Core/ChangeLog	2011-10-05 15:40:05 UTC (rev 96707)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-05 15:51:38 UTC (rev 96708)
@@ -1,3 +1,17 @@
+2011-10-05  Gavin Peters  
+
+REGRESSION (r96595): WTFReportBacktrace listed as the top frame in all assertion backtraces
+https://bugs.webkit.org/show_bug.cgi?id=69424
+
+Skip an extra frame in WTFReportBacktrace.  As well, I now don't count skipped frames in maxFrames,
+so I've updated maxFrames to 31, as with one skipped frame the previous value was effectively
+31 reported frames.
+
+Reviewed by Adam Roben.
+
+* wtf/Assertions.cpp:
+* wtf/Assertions.h:
+
 2011-10-05  Patrick Gansterer  
 
 Unreviewed WinCE build fix for r96595.


Modified: trunk/Source/_javascript_Core/wtf/Assertions.cpp (96707 => 96708)

--- trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-05 15:40:05 UTC (rev 96707)
+++ trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-05 15:51:38 UTC (rev 96708)
@@ -183,7 +183,7 @@
 RtlCaptureStackBackTraceFunc captureStackBackTraceFunc = reinterpret_cast(
 ::GetProcAddress(kernel32, "RtlCaptureStackBackTrace"));
 if (captureStackBackTraceFunc)
-*size = captureStackBackTraceFunc(1, *size, stack, 0);
+*size = captureStackBackTraceFunc(0, *size, stack, 0);
 else
 *size = 0;
 #else
@@ -193,13 +193,14 @@
 
 void WTFReportBacktrace()
 {
-static const int maxFrames = 32;
-void* samples[maxFrames];
-int frames = maxFrames;
+static const int framesToShow = 31;
+static const int framesToSkip = 2;
+void* samples[framesToShow + framesToSkip];
+int frames = framesToShow + framesToSkip;
 
 WTFGetBacktrace(samples, &frames);
 
-for (int i = 1; i < frames; ++i) {
+for (int i = framesToSkip; i < frames; ++i) {
 const char* mangledName = 0;
 char* cxaDemangled = 0;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96641] trunk/Source/JavaScriptCore

2011-10-04 Thread gavinp
Title: [96641] trunk/Source/_javascript_Core








Revision 96641
Author gav...@chromium.org
Date 2011-10-04 13:56:39 -0700 (Tue, 04 Oct 2011)


Log Message
fix gtk breakage caused by changeset 96595
https://bugs.webkit.org/show_bug.cgi?id=69371

ews did not catch build breakage in the gtk WebKitPluginProcess target; this patch removes
the pretty printer on gtk, which should fix the build on that platform.

Reviewed by NOBODY, this is a build fix.

* wtf/Assertions.cpp:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/wtf/Assertions.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (96640 => 96641)

--- trunk/Source/_javascript_Core/ChangeLog	2011-10-04 20:53:09 UTC (rev 96640)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-04 20:56:39 UTC (rev 96641)
@@ -1,3 +1,15 @@
+2011-10-04  Gavin Peters  
+
+fix gtk breakage caused by changeset 96595
+https://bugs.webkit.org/show_bug.cgi?id=69371
+
+ews did not catch build breakage in the gtk WebKitPluginProcess target; this patch removes
+the pretty printer on gtk, which should fix the build on that platform.
+
+Reviewed by NOBODY, this is a build fix.
+
+* wtf/Assertions.cpp:
+
 2011-10-04  Sheriff Bot  
 
 Unreviewed, rolling out r96630.


Modified: trunk/Source/_javascript_Core/wtf/Assertions.cpp (96640 => 96641)

--- trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-04 20:53:09 UTC (rev 96640)
+++ trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-04 20:56:39 UTC (rev 96641)
@@ -203,7 +203,7 @@
 const char* mangledName = 0;
 char* cxaDemangled = 0;
 
-#if !PLATFORM(QT) && (OS(DARWIN) || OS(LINUX))
+#if !PLATFORM(GTK) && !PLATFORM(QT) && (OS(DARWIN) || OS(LINUX))
 Dl_info info;
 if (dladdr(samples[i], &info) && info.dli_sname)
 mangledName = info.dli_sname;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [96595] trunk/Source/JavaScriptCore

2011-10-04 Thread gavinp
Title: [96595] trunk/Source/_javascript_Core








Revision 96595
Author gav...@chromium.org
Date 2011-10-04 08:39:46 -0700 (Tue, 04 Oct 2011)


Log Message
   add more stack dumping methods
   https://bugs.webkit.org/show_bug.cgi?id=69018

   In addition to WTFReportBacktrace, this adds the cross-platform WTFGetBacktrace, which lets
   WebKit programmatically retrieve the current stack.  This is useful if you need to add more
   reporting to field crash report uploads, if you're tracking down an irreproducable bug,
   for instance.

   Reviewed by Darin Adler.

   * wtf/Assertions.cpp:
   * wtf/Assertions.h:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/wtf/Assertions.cpp
trunk/Source/_javascript_Core/wtf/Assertions.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (96594 => 96595)

--- trunk/Source/_javascript_Core/ChangeLog	2011-10-04 15:13:45 UTC (rev 96594)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-10-04 15:39:46 UTC (rev 96595)
@@ -1,3 +1,18 @@
+2011-10-04  Gavin Peters  
+
+   add more stack dumping methods
+   https://bugs.webkit.org/show_bug.cgi?id=69018
+
+   In addition to WTFReportBacktrace, this adds the cross-platform WTFGetBacktrace, which lets
+   WebKit programmatically retrieve the current stack.  This is useful if you need to add more
+   reporting to field crash report uploads, if you're tracking down an irreproducable bug,
+   for instance.
+
+   Reviewed by Darin Adler.
+
+   * wtf/Assertions.cpp:
+   * wtf/Assertions.h:
+
 2011-10-03  Filip Pizlo  
 
 DFG should inline Array.push and Array.pop


Modified: trunk/Source/_javascript_Core/wtf/Assertions.cpp (96594 => 96595)

--- trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-04 15:13:45 UTC (rev 96594)
+++ trunk/Source/_javascript_Core/wtf/Assertions.cpp	2011-10-04 15:39:46 UTC (rev 96595)
@@ -49,7 +49,7 @@
 #include 
 #endif
 
-#if PLATFORM(MAC)
+#if OS(DARWIN) || OS(LINUX)
 #include 
 #include 
 #include 
@@ -166,32 +166,56 @@
 printCallSite(file, line, function);
 }
 
+void WTFGetBacktrace(void** stack, int* size)
+{
+#if OS(DARWIN) || OS(LINUX)
+*size = backtrace(stack, *size);
+#elif OS(WINDOWS)
+// The CaptureStackBackTrace function is available in XP, but it is not defined
+// in the Windows Server 2003 R2 Platform SDK. So, we'll grab the function
+// through GetProcAddress.
+typedef WORD (NTAPI* RtlCaptureStackBackTraceFunc)(DWORD, DWORD, PVOID*, PDWORD);
+HMODULE kernel32 = ::GetModuleHandleW(L"Kernel32.dll");
+if (!kernel32) {
+*size = 0;
+return;
+}
+RtlCaptureStackBackTraceFunc captureStackBackTraceFunc = reinterpret_cast(
+::GetProcAddress(kernel32, "RtlCaptureStackBackTrace"));
+if (captureStackBackTraceFunc)
+*size = captureStackBackTraceFunc(1, *size, stack, 0);
+else
+*size = 0;
+#else
+*size = 0;
+#endif
+}
+
 void WTFReportBacktrace()
 {
-#if PLATFORM(MAC)
 static const int maxFrames = 32;
 void* samples[maxFrames];
-int frames = backtrace(samples, maxFrames);
+int frames = maxFrames;
 
+WTFGetBacktrace(samples, &frames);
+
 for (int i = 1; i < frames; ++i) {
-void* pointer = samples[i];
+const char* mangledName = 0;
+char* cxaDemangled = 0;
 
-// Try to get a symbol name from the dynamic linker.
+#if !PLATFORM(QT) && (OS(DARWIN) || OS(LINUX))
 Dl_info info;
-if (dladdr(pointer, &info) && info.dli_sname) {
-const char* mangledName = info.dli_sname;
-
-// Assume c++ & try to demangle the name.
-char* demangledName = abi::__cxa_demangle(mangledName, 0, 0, 0);
-if (demangledName) {
-fprintf(stderr, "%-3d %s\n", i, demangledName);
-free(demangledName);
-} else
-fprintf(stderr, "%-3d %s\n", i, mangledName);
-} else
-fprintf(stderr, "%-3d %p\n", i, pointer);
+if (dladdr(samples[i], &info) && info.dli_sname)
+mangledName = info.dli_sname;
+if (mangledName)
+cxaDemangled = abi::__cxa_demangle(mangledName, 0, 0, 0);
+#endif
+if (mangledName || cxaDemangled)
+fprintf(stderr, "%-3d %p %s\n", i, samples[i], cxaDemangled ? cxaDemangled : mangledName);
+else
+fprintf(stderr, "%-3d %p\n", i, samples[i]);
+free(cxaDemangled);
 }
-#endif
 }
 
 void WTFReportFatalError(const char* file, int line, const char* function, const char* format, ...)


Modified: trunk/Source/_javascript_Core/wtf/Assertions.h (96594 => 96595)

--- trunk/Source/_javascript_Core/wtf/Assertions.h	2011-10-04 15:13:45 UTC (rev 96594)
+++ trunk/Source/_javascript_Core/wtf/Assertions.h	2011-10-04 15:39:46 UTC (rev 96595)
@@ -144,12 +144,14 @@
 WTF_EXPORT_PRIVATE void WTFReportAssertionFailure(const char* file, int line, const char* function, c

[webkit-changes] [93871] trunk/Source/WebCore

2011-08-26 Thread gavinp
Title: [93871] trunk/Source/WebCore








Revision 93871
Author gav...@chromium.org
Date 2011-08-26 06:15:00 -0700 (Fri, 26 Aug 2011)


Log Message
add a state enumeration to track down cause of null CachedScript execution
https://bugs.webkit.org/show_bug.cgi?id=66939

Reviewed by Alexey Proskuryakov.

Over in http://code.google.com/p/chromium/issues/detail?id=75604 I
have a bug I cannot reproduce.  I added an earlier crash in
https://bugs.webkit.org/show_bug.cgi?id=65563 , and we've since
gotten many good stacks, all coming in through a failed request that
eventually calls notifyFinished() on a ScriptElement with a NULL
m_cachedScript.

I'd like to know how this got NULL.  This enumeration should let
me find that in stack dumps from reproductions.

No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce.

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptElement.cpp
trunk/Source/WebCore/dom/ScriptElement.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (93870 => 93871)

--- trunk/Source/WebCore/ChangeLog	2011-08-26 13:12:48 UTC (rev 93870)
+++ trunk/Source/WebCore/ChangeLog	2011-08-26 13:15:00 UTC (rev 93871)
@@ -1,3 +1,29 @@
+2011-08-26  Gavin Peters  
+
+add a state enumeration to track down cause of null CachedScript execution
+https://bugs.webkit.org/show_bug.cgi?id=66939
+
+Reviewed by Alexey Proskuryakov.
+
+Over in http://code.google.com/p/chromium/issues/detail?id=75604 I
+have a bug I cannot reproduce.  I added an earlier crash in
+https://bugs.webkit.org/show_bug.cgi?id=65563 , and we've since
+gotten many good stacks, all coming in through a failed request that
+eventually calls notifyFinished() on a ScriptElement with a NULL
+m_cachedScript.
+
+I'd like to know how this got NULL.  This enumeration should let
+me find that in stack dumps from reproductions.
+
+No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce.
+
+* dom/ScriptElement.cpp:
+(WebCore::ScriptElement::ScriptElement):
+(WebCore::ScriptElement::requestScript):
+(WebCore::ScriptElement::stopLoadRequest):
+(WebCore::ScriptElement::notifyFinished):
+* dom/ScriptElement.h:
+
 2011-08-26  Mike Reed  
 
 [skia] never draw with GDI, so that all text can be gpu-accelerated


Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (93870 => 93871)

--- trunk/Source/WebCore/dom/ScriptElement.cpp	2011-08-26 13:12:48 UTC (rev 93870)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp	2011-08-26 13:15:00 UTC (rev 93871)
@@ -64,6 +64,7 @@
 , m_willExecuteWhenDocumentFinishedParsing(false)
 , m_forceAsync(!parserInserted)
 , m_willExecuteInOrder(false)
+, m_cachedScriptState(NeverSet)
 {
 ASSERT(m_element);
 }
@@ -258,8 +259,11 @@
 m_cachedScript = m_element->document()->cachedResourceLoader()->requestScript(request, scriptCharset());
 m_isExternalScript = true;
 
-if (m_cachedScript)
+if (m_cachedScript) {
+ASSERT(m_cachedScriptState == NeverSet);
+m_cachedScriptState = Set;
 return true;
+}
 
 dispatchErrorEvent();
 return false;
@@ -295,6 +299,8 @@
 if (m_cachedScript) {
 if (!m_willBeParserExecuted)
 m_cachedScript->removeClient(this);
+ASSERT(m_cachedScriptState == Set);
+m_cachedScriptState = ZeroedInStopLoadRequest;
 m_cachedScript = 0;
 }
 }
@@ -320,6 +326,9 @@
 m_element->document()->scriptRunner()->notifyInOrderScriptReady();
 else
 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::ASYNC_EXECUTION);
+
+ASSERT(m_cachedScriptState == Set);
+m_cachedScriptState = ZeroedInNotifyFinished;
 m_cachedScript = 0;
 }
 


Modified: trunk/Source/WebCore/dom/ScriptElement.h (93870 => 93871)

--- trunk/Source/WebCore/dom/ScriptElement.h	2011-08-26 13:12:48 UTC (rev 93870)
+++ trunk/Source/WebCore/dom/ScriptElement.h	2011-08-26 13:15:00 UTC (rev 93871)
@@ -104,6 +104,15 @@
 bool m_willExecuteInOrder : 1;
 String m_characterEncoding;
 String m_fallbackCharacterEncoding;
+
+// Temporary: intended to help debug how we get notifyFinished() called when m_cachedScript is null,
+// which seems to sometimes happen (see http://code.google.com/p/chromium/issues/detail?id=75604 )
+enum {
+  NeverSet,
+  Set,
+  ZeroedInStopLoadRequest,
+  ZeroedInNotifyFinished,
+} m_cachedScriptState;
 };
 
 ScriptElement* toScriptElement(Element*);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/ma

[webkit-changes] [93821] trunk/Tools/Scripts/webkitpy/common/config/committers.py

2011-08-25 Thread gavinp
Title: [93821] trunk/Tools/Scripts/webkitpy/common/config/committers.py








Revision 93821
Author gav...@chromium.org
Date 2011-08-25 13:58:15 -0700 (Thu, 25 Aug 2011)


Log Message
Added myself to committers.

Modified Paths

trunk/Tools/Scripts/webkitpy/common/config/committers.py




Diff

Modified: trunk/Tools/Scripts/webkitpy/common/config/committers.py (93820 => 93821)

--- trunk/Tools/Scripts/webkitpy/common/config/committers.py	2011-08-25 20:56:55 UTC (rev 93820)
+++ trunk/Tools/Scripts/webkitpy/common/config/committers.py	2011-08-25 20:58:15 UTC (rev 93821)
@@ -165,6 +165,7 @@
 Committer("Fumitoshi Ukai", "u...@chromium.org", "ukai"),
 Committer("Gabor Loki", "l...@webkit.org", "loki04"),
 Committer("Gabor Rapcsanyi", ["rga...@webkit.org", "rga...@inf.u-szeged.hu"], "rgabor"),
+    Committer("Gavin Peters", ["gav...@chromium.org", "gav...@webkit.org", "gav...@google.com"], "gavinp"),
 Committer("Girish Ramakrishnan", ["gir...@forwardbias.in", "ramakrishnan.gir...@gmail.com"], "girishr"),
 Committer("Graham Dennis", ["graham.den...@gmail.com", "gden...@webkit.org"]),
 Committer("Greg Bolsinga", "bolsi...@apple.com"),






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [92239] trunk/Source/WebCore

2011-08-02 Thread gavinp
Title: [92239] trunk/Source/WebCore








Revision 92239
Author gav...@chromium.org
Date 2011-08-02 15:17:51 -0700 (Tue, 02 Aug 2011)


Log Message
fail earlier to track down null CachedScript execution
https://bugs.webkit.org/show_bug.cgi?id=65563

Over in http://code.google.com/p/chromium/issues/detail?id=75604 I can't reproduce the problem.  Careful reading of the code hasn't led me
to an obvious cause either.  This patch should cause failure earlier, and lead to better stacks.  I'll watch Chrome Canary's crash
uploads carefully, and remove this CRASH() (and fix the underlying problem) once I understand it.

Reviewed by Alexey Proskuryakov.

No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce.

* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::queueScriptForExecution):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/ScriptRunner.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (92238 => 92239)

--- trunk/Source/WebCore/ChangeLog	2011-08-02 22:11:30 UTC (rev 92238)
+++ trunk/Source/WebCore/ChangeLog	2011-08-02 22:17:51 UTC (rev 92239)
@@ -1,3 +1,19 @@
+2011-08-02  Gavin Peters  
+
+fail earlier to track down null CachedScript execution
+https://bugs.webkit.org/show_bug.cgi?id=65563
+
+Over in http://code.google.com/p/chromium/issues/detail?id=75604 I can't reproduce the problem.  Careful reading of the code hasn't led me
+to an obvious cause either.  This patch should cause failure earlier, and lead to better stacks.  I'll watch Chrome Canary's crash
+uploads carefully, and remove this CRASH() (and fix the underlying problem) once I understand it.
+
+Reviewed by Alexey Proskuryakov.
+
+No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce.
+
+* dom/ScriptRunner.cpp:
+(WebCore::ScriptRunner::queueScriptForExecution):
+
 2011-08-02  Sailesh Agrawal  
 
 Chromium: Update forked ScrollbarThemeChromiumMac.mm


Modified: trunk/Source/WebCore/dom/ScriptRunner.cpp (92238 => 92239)

--- trunk/Source/WebCore/dom/ScriptRunner.cpp	2011-08-02 22:11:30 UTC (rev 92238)
+++ trunk/Source/WebCore/dom/ScriptRunner.cpp	2011-08-02 22:17:51 UTC (rev 92239)
@@ -52,6 +52,11 @@
 void ScriptRunner::queueScriptForExecution(ScriptElement* scriptElement, CachedResourceHandle cachedScript, ExecutionType executionType)
 {
 ASSERT(scriptElement);
+
+// Temporary: intended to help debug how null CachedScript objects can even get queued for execution, which
+// seems to sometimes happen (see http://code.google.com/p/chromium/issues/detail?id=75604 )
+if (!cachedScript.get())
+CRASH();
 
 Element* element = scriptElement->element();
 ASSERT(element);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [91531] trunk

2011-07-21 Thread gavinp
Title: [91531] trunk








Revision 91531
Author gav...@chromium.org
Date 2011-07-21 16:53:30 -0700 (Thu, 21 Jul 2011)


Log Message
Extend the protector of a CSS style sheet.  Because checkLoaded() can recursively delete
parent style elements, the protector should be extended to include the parent call.

https://bugs.webkit.org/show_bug.cgi?id=64736

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/css-imports-2.html

* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::checkLoaded):

LayoutTests:

* fast/css/css-imports-2-expected.txt: Added.
* fast/css/css-imports-2.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSStyleSheet.cpp


Added Paths

trunk/LayoutTests/fast/css/css-imports-2-expected.txt
trunk/LayoutTests/fast/css/css-imports-2.html




Diff

Modified: trunk/LayoutTests/ChangeLog (91530 => 91531)

--- trunk/LayoutTests/ChangeLog	2011-07-21 23:29:00 UTC (rev 91530)
+++ trunk/LayoutTests/ChangeLog	2011-07-21 23:53:30 UTC (rev 91531)
@@ -1,3 +1,15 @@
+2011-07-21  Gavin Peters  
+
+Extend the protector of a CSS style sheet.  Because checkLoaded() can recursively delete
+parent style elements, the protector should be extended to include the parent call.
+
+https://bugs.webkit.org/show_bug.cgi?id=64736
+
+Reviewed by Simon Fraser.
+
+* fast/css/css-imports-2-expected.txt: Added.
+* fast/css/css-imports-2.html: Added.
+
 2011-07-21  Ryosuke Niwa  
 
 Temporarily add failing test expectation for multi column tests after r91497.


Added: trunk/LayoutTests/fast/css/css-imports-2-expected.txt (0 => 91531)

--- trunk/LayoutTests/fast/css/css-imports-2-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/css/css-imports-2-expected.txt	2011-07-21 23:53:30 UTC (rev 91531)
@@ -0,0 +1 @@
+PASS


Added: trunk/LayoutTests/fast/css/css-imports-2.html (0 => 91531)

--- trunk/LayoutTests/fast/css/css-imports-2.html	(rev 0)
+++ trunk/LayoutTests/fast/css/css-imports-2.html	2011-07-21 23:53:30 UTC (rev 91531)
@@ -0,0 +1,9 @@
+
+@import url('resources/css-imports.css');
+
+
+if (window.layoutTestController)
+layoutTestController.dumpAsText();
+document.body.innerHTML = "PASS";
+
+


Modified: trunk/Source/WebCore/ChangeLog (91530 => 91531)

--- trunk/Source/WebCore/ChangeLog	2011-07-21 23:29:00 UTC (rev 91530)
+++ trunk/Source/WebCore/ChangeLog	2011-07-21 23:53:30 UTC (rev 91531)
@@ -1,3 +1,17 @@
+2011-07-21  Gavin Peters  
+
+Extend the protector of a CSS style sheet.  Because checkLoaded() can recursively delete
+parent style elements, the protector should be extended to include the parent call.
+
+https://bugs.webkit.org/show_bug.cgi?id=64736
+
+Reviewed by Simon Fraser.
+
+Test: fast/css/css-imports-2.html
+
+* css/CSSStyleSheet.cpp:
+(WebCore::CSSStyleSheet::checkLoaded):
+
 2011-07-21  Kenneth Russell  
 
 Update webglcontextlost / webglcontextrestored delivery to match spec changes


Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (91530 => 91531)

--- trunk/Source/WebCore/css/CSSStyleSheet.cpp	2011-07-21 23:29:00 UTC (rev 91530)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp	2011-07-21 23:53:30 UTC (rev 91531)
@@ -220,13 +220,13 @@
 {
 if (isLoading())
 return;
-if (parent())
-parent()->checkLoaded();
 
 // Avoid |this| being deleted by scripts that run via
 // ScriptableDocumentParser::executeScriptsWaitingForStylesheets().
 // See .
 RefPtr protector(this);
+if (parent())
+parent()->checkLoaded();
 m_loadCompleted = ownerNode() ? ownerNode()->sheetLoaded() : true;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [91389] branches/chromium/782/Source/WebCore/html

2011-07-20 Thread gavinp
Title: [91389] branches/chromium/782/Source/WebCore/html








Revision 91389
Author gav...@chromium.org
Date 2011-07-20 12:36:45 -0700 (Wed, 20 Jul 2011)


Log Message
Try again: Merge 89719 BUG=80729

Modified Paths

branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp
branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h




Diff

Modified: branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp (91388 => 91389)

--- branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp	2011-07-20 19:31:06 UTC (rev 91388)
+++ branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp	2011-07-20 19:36:45 UTC (rev 91389)
@@ -54,6 +54,7 @@
 : HTMLElement(tagName, document)
 #if ENABLE(LINK_PREFETCH)
 , m_onloadTimer(this, &HTMLLinkElement::onloadTimerFired)
+, m_onerrorTimer(this, &HTMLLinkElement::onerrorTimerFired)
 #endif
 , m_disabledState(Unset)
 , m_loading(false)
@@ -446,20 +447,26 @@
 void HTMLLinkElement::onloadTimerFired(Timer* timer)
 {
 ASSERT_UNUSED(timer, timer == &m_onloadTimer);
-if (m_cachedLinkResource->errorOccurred())
-dispatchEvent(Event::create(eventNames().errorEvent, false, false));
-else if (!m_cachedLinkResource->wasCanceled())
-dispatchEvent(Event::create(eventNames().loadEvent, false, false));
+dispatchEvent(Event::create(eventNames().loadEvent, false, false));
+}
 
-m_cachedLinkResource->removeClient(this);
-m_cachedLinkResource = 0;
+void HTMLLinkElement::onerrorTimerFired(Timer* timer)
+{
+ASSERT_UNUSED(timer, timer == &m_onerrorTimer);
+dispatchEvent(Event::create(eventNames().errorEvent, false, false));
 }
 
 void HTMLLinkElement::notifyFinished(CachedResource* resource)
 {
 ASSERT(m_cachedLinkResource.get() == resource || m_cachedSheet.get() == resource);
-if (m_cachedLinkResource.get() == resource)
-m_onloadTimer.startOneShot(0);
+if (m_cachedLinkResource.get() == resource) {
+if (m_cachedLinkResource->errorOccurred())
+m_onloadTimer.startOneShot(0);
+else if (!m_cachedLinkResource->wasCanceled())
+m_onerrorTimer.startOneShot(0);
+m_cachedLinkResource->removeClient(this);
+m_cachedLinkResource = 0;
+}
 }
 #endif
 


Modified: branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h (91388 => 91389)

--- branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h	2011-07-20 19:31:06 UTC (rev 91388)
+++ branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h	2011-07-20 19:36:45 UTC (rev 91389)
@@ -85,6 +85,7 @@
 
 #if ENABLE(LINK_PREFETCH)
 void onloadTimerFired(Timer*);
+void onerrorTimerFired(Timer*);
 #endif
 bool checkBeforeLoadEvent();
 void process();
@@ -132,6 +133,7 @@
 #if ENABLE(LINK_PREFETCH)
 CachedResourceHandle m_cachedLinkResource;
 Timer m_onloadTimer;
+Timer m_onerrorTimer;
 #endif
 KURL m_url;
 String m_type;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [91289] branches/chromium/782/Source/WebCore/html

2011-07-19 Thread gavinp
Title: [91289] branches/chromium/782/Source/WebCore/html








Revision 91289
Author gav...@chromium.org
Date 2011-07-19 12:55:02 -0700 (Tue, 19 Jul 2011)


Log Message
Revert 91204, Merge 90595 BUG=87729

Modified Paths

branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp
branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h




Diff

Modified: branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp (91288 => 91289)

--- branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp	2011-07-19 19:49:07 UTC (rev 91288)
+++ branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp	2011-07-19 19:55:02 UTC (rev 91289)
@@ -54,7 +54,6 @@
 : HTMLElement(tagName, document)
 #if ENABLE(LINK_PREFETCH)
 , m_onloadTimer(this, &HTMLLinkElement::onloadTimerFired)
-, m_onerrorTimer(this, &HTMLLinkElement::onerrorTimerFired)
 #endif
 , m_disabledState(Unset)
 , m_loading(false)
@@ -447,24 +446,20 @@
 void HTMLLinkElement::onloadTimerFired(Timer* timer)
 {
 ASSERT_UNUSED(timer, timer == &m_onloadTimer);
-dispatchEvent(Event::create(eventNames().loadEvent, false, false));
-}
+if (m_cachedLinkResource->errorOccurred())
+dispatchEvent(Event::create(eventNames().errorEvent, false, false));
+else if (!m_cachedLinkResource->wasCanceled())
+dispatchEvent(Event::create(eventNames().loadEvent, false, false));
 
-void HTMLLinkElement::onerrorTimerFired(Timer* timer)
-{
-ASSERT_UNUSED(timer, timer == &m_onerrorTimer);
-dispatchEvent(Event::create(eventNames().errorEvent, false, false));
+m_cachedLinkResource->removeClient(this);
+m_cachedLinkResource = 0;
 }
 
 void HTMLLinkElement::notifyFinished(CachedResource* resource)
 {
 ASSERT(m_cachedLinkResource.get() == resource || m_cachedSheet.get() == resource);
-if (m_cachedLinkResource->errorOccurred())
+if (m_cachedLinkResource.get() == resource)
 m_onloadTimer.startOneShot(0);
-else if (!m_cachedLinkResource->wasCanceled())
-m_onerrorTimer.startOneShot(0);
-m_cachedLinkResource->removeClient(this);
-m_cachedLinkResource = 0;
 }
 #endif
 


Modified: branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h (91288 => 91289)

--- branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h	2011-07-19 19:49:07 UTC (rev 91288)
+++ branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h	2011-07-19 19:55:02 UTC (rev 91289)
@@ -85,7 +85,6 @@
 
 #if ENABLE(LINK_PREFETCH)
 void onloadTimerFired(Timer*);
-void onerrorTimerFired(Timer*);
 #endif
 bool checkBeforeLoadEvent();
 void process();
@@ -133,7 +132,6 @@
 #if ENABLE(LINK_PREFETCH)
 CachedResourceHandle m_cachedLinkResource;
 Timer m_onloadTimer;
-Timer m_onerrorTimer;
 #endif
 KURL m_url;
 String m_type;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [91204] branches/chromium/782/Source/WebCore/html

2011-07-18 Thread gavinp
Title: [91204] branches/chromium/782/Source/WebCore/html








Revision 91204
Author gav...@chromium.org
Date 2011-07-18 13:20:25 -0700 (Mon, 18 Jul 2011)


Log Message
Merge 89719 BUG=80729

Modified Paths

branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp
branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h




Diff

Modified: branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp (91203 => 91204)

--- branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp	2011-07-18 20:16:02 UTC (rev 91203)
+++ branches/chromium/782/Source/WebCore/html/HTMLLinkElement.cpp	2011-07-18 20:20:25 UTC (rev 91204)
@@ -54,6 +54,7 @@
 : HTMLElement(tagName, document)
 #if ENABLE(LINK_PREFETCH)
 , m_onloadTimer(this, &HTMLLinkElement::onloadTimerFired)
+, m_onerrorTimer(this, &HTMLLinkElement::onerrorTimerFired)
 #endif
 , m_disabledState(Unset)
 , m_loading(false)
@@ -446,20 +447,24 @@
 void HTMLLinkElement::onloadTimerFired(Timer* timer)
 {
 ASSERT_UNUSED(timer, timer == &m_onloadTimer);
-if (m_cachedLinkResource->errorOccurred())
-dispatchEvent(Event::create(eventNames().errorEvent, false, false));
-else if (!m_cachedLinkResource->wasCanceled())
-dispatchEvent(Event::create(eventNames().loadEvent, false, false));
+dispatchEvent(Event::create(eventNames().loadEvent, false, false));
+}
 
-m_cachedLinkResource->removeClient(this);
-m_cachedLinkResource = 0;
+void HTMLLinkElement::onerrorTimerFired(Timer* timer)
+{
+ASSERT_UNUSED(timer, timer == &m_onerrorTimer);
+dispatchEvent(Event::create(eventNames().errorEvent, false, false));
 }
 
 void HTMLLinkElement::notifyFinished(CachedResource* resource)
 {
 ASSERT(m_cachedLinkResource.get() == resource || m_cachedSheet.get() == resource);
-if (m_cachedLinkResource.get() == resource)
+if (m_cachedLinkResource->errorOccurred())
 m_onloadTimer.startOneShot(0);
+else if (!m_cachedLinkResource->wasCanceled())
+m_onerrorTimer.startOneShot(0);
+m_cachedLinkResource->removeClient(this);
+m_cachedLinkResource = 0;
 }
 #endif
 


Modified: branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h (91203 => 91204)

--- branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h	2011-07-18 20:16:02 UTC (rev 91203)
+++ branches/chromium/782/Source/WebCore/html/HTMLLinkElement.h	2011-07-18 20:20:25 UTC (rev 91204)
@@ -85,6 +85,7 @@
 
 #if ENABLE(LINK_PREFETCH)
 void onloadTimerFired(Timer*);
+void onerrorTimerFired(Timer*);
 #endif
 bool checkBeforeLoadEvent();
 void process();
@@ -132,6 +133,7 @@
 #if ENABLE(LINK_PREFETCH)
 CachedResourceHandle m_cachedLinkResource;
 Timer m_onloadTimer;
+Timer m_onerrorTimer;
 #endif
 KURL m_url;
 String m_type;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes


[webkit-changes] [90595] trunk

2011-07-07 Thread gavinp
Title: [90595] trunk








Revision 90595
Author gav...@chromium.org
Date 2011-07-07 15:29:57 -0700 (Thu, 07 Jul 2011)


Log Message
Reviewed by Alexey Proskuryakov.

fast/dom/HTMLLinkElement/link-and-subresource-test.html is flaky on chromium debug bots
https://bugs.webkit.org/show_bug.cgi?id=60097

The culprit was that CachedResource:stopLoading() was using *this
after a call to checkNotify(), which isn't kosher.  This patch
uses a CachedResourceHandle to keep the CachedResource alive.

Source/WebCore:

The test is a very close copy of the eponymous
link-and-subresource-test.html, only substituting invalid
resources for the valid ones in that test.  The reproduction is
timing related, and happens much more consistantly with an invalid
resource for whatever reason.
Test: fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::stopLoading):

LayoutTests:

The test is a very close copy of the eponymous
link-and-subresource-test.html, only substituting invalid
resources for the valid ones in that test.  The reproduction is
timing related, and happens much more consistantly with an invalid
resource for whatever reason.

* fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent-expected.txt: Added.
* fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html: Added.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/Skipped
trunk/LayoutTests/platform/mac/Skipped
trunk/LayoutTests/platform/qt/Skipped
trunk/LayoutTests/platform/win/Skipped
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResource.cpp


Added Paths

trunk/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html
trunk/LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (90594 => 90595)

--- trunk/LayoutTests/ChangeLog	2011-07-07 22:20:21 UTC (rev 90594)
+++ trunk/LayoutTests/ChangeLog	2011-07-07 22:29:57 UTC (rev 90595)
@@ -1,3 +1,27 @@
+2011-07-07  Gavin Peters  
+
+Reviewed by Alexey Proskuryakov.
+
+fast/dom/HTMLLinkElement/link-and-subresource-test.html is flaky on chromium debug bots
+https://bugs.webkit.org/show_bug.cgi?id=60097
+
+The culprit was that CachedResource:stopLoading() was using *this
+after a call to checkNotify(), which isn't kosher.  This patch
+uses a CachedResourceHandle to keep the CachedResource alive.
+
+The test is a very close copy of the eponymous
+link-and-subresource-test.html, only substituting invalid
+resources for the valid ones in that test.  The reproduction is
+timing related, and happens much more consistantly with an invalid
+resource for whatever reason.
+
+* fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent-expected.txt: Added.
+* fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html: Added.
+* platform/gtk/Skipped:
+* platform/mac/Skipped:
+* platform/qt/Skipped:
+* platform/win/Skipped:
+
 2011-07-07  Jeff Timanus  
 
 Reviewed by Stephen White.


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html (0 => 90595)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html	2011-07-07 22:29:57 UTC (rev 90595)
@@ -0,0 +1,39 @@
+
+
+
+function log(message)
+{
+var item = document.createElement("li");
+item.appendChild(document.createTextNode(message));
+document.getElementById("console").appendChild(item);
+}
+
+dne_error_count = 0
+
+function dne_onerror()
+{
+log("DNE_ONERROR called");
+++dne_error_count;
+if (dne_error_count == 2) {
+log("SUCCESS.  Two errors.");
+layoutTestController.notifyDone();
+}
+}
+
+if (window.layoutTestController) {
+layoutTestController.waitUntilDone();
+layoutTestController.dumpAsText();
+layoutTestController.dumpResourceResponseMIMETypes();
+}
+
+This test verifies that an image which is prefetched, and which is also contained as a
+subresource of the current document can be loaded correctly as a subresource, even if the URI
+doesn't exist.
+
+When this test succeeds, you will see nothing.  When this test fails, you will crash or have another error.
+
+
+
+
+
+


Added: trunk/LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent-expected.txt (0 => 90595)

--- trunk/LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/dom/HTM

[webkit-changes] [89719] trunk/Source/WebCore

2011-06-24 Thread gavinp
Title: [89719] trunk/Source/WebCore








Revision 89719
Author gav...@chromium.org
Date 2011-06-24 17:39:33 -0700 (Fri, 24 Jun 2011)


Log Message
2011-06-24  Gavin Peters  

Reviewed by Darin Adler.

fix possible race in LinkLoader
https://bugs.webkit.org/show_bug.cgi?id=63360

In chromium bug 80729
http://code.google.com/p/chromium/issues/detail?id=80729 I am
seeing some kind of double triggering of the timer; I am concerned
that it is possible that a Link element errors out or succeeds,
sets a timer, and shortly before the timer is triggered it is
editted, launches another request.  After that, the first timer
triggers, zeroing out m_cachedResource.  Then, the second load
finishes, and *crash*.  If this is the case, this fix should stop
it.

No new tests; I haven't reproduced this.  I hope chrome's crash
telemetry will give good feedback; this crash is occuring many times a
day so the difference should be obvious.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::LinkLoader):
(WebCore::LinkLoader::linkLoadTimerFired):
(WebCore::LinkLoader::linkLoadingErrorTimerFired):
(WebCore::LinkLoader::notifyFinished):
* loader/LinkLoader.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (89718 => 89719)

--- trunk/Source/WebCore/ChangeLog	2011-06-25 00:16:36 UTC (rev 89718)
+++ trunk/Source/WebCore/ChangeLog	2011-06-25 00:39:33 UTC (rev 89719)
@@ -1,3 +1,31 @@
+2011-06-24  Gavin Peters  
+
+Reviewed by Darin Adler.
+
+fix possible race in LinkLoader
+https://bugs.webkit.org/show_bug.cgi?id=63360
+
+In chromium bug 80729
+http://code.google.com/p/chromium/issues/detail?id=80729 I am
+seeing some kind of double triggering of the timer; I am concerned
+that it is possible that a Link element errors out or succeeds,
+sets a timer, and shortly before the timer is triggered it is
+editted, launches another request.  After that, the first timer
+triggers, zeroing out m_cachedResource.  Then, the second load
+finishes, and *crash*.  If this is the case, this fix should stop
+it.
+
+No new tests; I haven't reproduced this.  I hope chrome's crash
+telemetry will give good feedback; this crash is occuring many times a
+day so the difference should be obvious.
+
+* loader/LinkLoader.cpp:
+(WebCore::LinkLoader::LinkLoader):
+(WebCore::LinkLoader::linkLoadTimerFired):
+(WebCore::LinkLoader::linkLoadingErrorTimerFired):
+(WebCore::LinkLoader::notifyFinished):
+* loader/LinkLoader.h:
+
 2011-06-24  Jer Noble  
 
 Reviewed by Eric Carlson.


Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (89718 => 89719)

--- trunk/Source/WebCore/loader/LinkLoader.cpp	2011-06-25 00:16:36 UTC (rev 89718)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp	2011-06-25 00:39:33 UTC (rev 89719)
@@ -48,7 +48,8 @@
 
 LinkLoader::LinkLoader(LinkLoaderClient* client)
 : m_client(client)
-, m_linkLoadedTimer(this, &LinkLoader::linkLoadedTimerFired)
+, m_linkLoadTimer(this, &LinkLoader::linkLoadTimerFired)
+, m_linkLoadingErrorTimer(this, &LinkLoader::linkLoadingErrorTimerFired)
 {
 }
 
@@ -58,21 +59,29 @@
 m_cachedLinkResource->removeClient(this);
 }
 
-void LinkLoader::linkLoadedTimerFired(Timer* timer)
+void LinkLoader::linkLoadTimerFired(Timer* timer)
 {
-ASSERT_UNUSED(timer, timer == &m_linkLoadedTimer);
-if (m_cachedLinkResource->errorOccurred())
-m_client->linkLoadingErrored();
-else if (!m_cachedLinkResource->wasCanceled())
-m_client->linkLoaded();
-m_cachedLinkResource->removeClient(this);
-m_cachedLinkResource = 0;
+ASSERT_UNUSED(timer, timer == &m_linkLoadTimer);
+m_client->linkLoaded();
 }
 
+void LinkLoader::linkLoadingErrorTimerFired(Timer* timer)
+{
+ASSERT_UNUSED(timer, timer == &m_linkLoadingErrorTimer);
+m_client->linkLoadingErrored();
+}
+
 void LinkLoader::notifyFinished(CachedResource* resource)
 {
 ASSERT_UNUSED(resource, m_cachedLinkResource.get() == resource);
-m_linkLoadedTimer.startOneShot(0);
+
+if (m_cachedLinkResource->errorOccurred())
+m_linkLoadingErrorTimer.startOneShot(0);
+else 
+m_linkLoadTimer.startOneShot(0);
+
+m_cachedLinkResource->removeClient(this);
+m_cachedLinkResource = 0;
 }
 
 bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type,


Modified: trunk/Source/WebCore/loader/LinkLoader.h (89718 => 89719)

--- trunk/Source/WebCore/loader/LinkLoader.h	2011-06-25 00:16:36 UTC (rev 89718)
+++ trunk/Source/WebCore/loader/LinkLoader.h	2011-06-25 00:39:33 UTC (rev 89719)
@@ -53,12 +53,14 @@
 bool loadLink(c