Title: [111960] releases/WebKitGTK/webkit-1.8
Diff
Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (111959 => 111960)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-03-24 01:12:23 UTC (rev 111959)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-03-24 01:13:23 UTC (rev 111960)
@@ -1,3 +1,16 @@
+2012-03-23 Daniel Bates <[email protected]>
+
+ REGRESSION(r99369): File input button doesn't highlight when pressed
+ https://bugs.webkit.org/show_bug.cgi?id=79385
+
+ Reviewed by Kent Tamura.
+
+ Add test to ensure that the file input button visually changes when pressed.
+
+ * fast/forms/file/file-input-pressed-state-expected.txt: Added.
+ * fast/forms/file/file-input-pressed-state.html: Added.
+ * platform/mac/fast/forms/file/file-input-pressed-state-expected.png: Added.
+
2012-03-23 Shawn Singh <[email protected]>
REGRESSION (r93614): scrolling div does not repaint
Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state-expected.txt (0 => 111960)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state-expected.txt 2012-03-24 01:13:23 UTC (rev 111960)
@@ -0,0 +1 @@
+
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state.html (0 => 111960)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state.html (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state.html 2012-03-24 01:13:23 UTC (rev 111960)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText(true); // Dump pixel test result.
+</script>
+</head>
+<body>
+<!-- The output of this test is only meaningful as a pixel test result because form controls have a platform-specific look-and-feel. -->
+<!-- You can run this test either in DRT as a pixel test or by hand. -->
+<div id="description">
+<p>This tests that pressing on the file input button visually changes its appearance. For instance, when pressed, the button will have an Aqua background color when using the Blue appearance (System Preferences > General) on OS X.</p>
+<p>To run this test manually, click and hold on the input file button (below). This test PASSED if the button visually highlights when pressed. Otherwise, it FAILED.</p>
+</div>
+<input type="file" id="file">
+<script>
+if (window.eventSender) {
+ // Remove the descriptive text so as minimize pixel differences due to discrepancies in font rendering.
+ document.body.removeChild(document.getElementById("description"));
+
+ var file = document.getElementById("file");
+ var x = file.offsetLeft + 10;
+ var y = file.offsetTop + 10;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+}
+</script>
+</body>
+</html>
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/forms/file/file-input-pressed-state.html
___________________________________________________________________
Added: svn:eol-style
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (111959 => 111960)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-03-24 01:12:23 UTC (rev 111959)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-03-24 01:13:23 UTC (rev 111960)
@@ -1,3 +1,27 @@
+2012-03-23 Daniel Bates <[email protected]>
+
+ REGRESSION(r99369): File input button doesn't highlight when pressed
+ https://bugs.webkit.org/show_bug.cgi?id=79385
+
+ Reviewed by Kent Tamura.
+
+ Fixes an issue where the file input button doesn't highlight on mouse press.
+
+ Currently we always override the active state of the button with whether
+ a dragged file is being hovered over the file input control (i.e. can the control
+ receive a dropped file; HTMLInputElement::canReceiveDroppedFiles()).
+ Instead, we should only override the active state of the button when the state
+ changes for whether we can receive dropped files (e.g. during a drag) so that
+ we honor the active state of the button when it is pressed.
+
+ Test: fast/forms/file/file-input-pressed-state.html
+
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::RenderFileUploadControl):
+ (WebCore::RenderFileUploadControl::updateFromElement):
+ * rendering/RenderFileUploadControl.h:
+ (RenderFileUploadControl):
+
2012-03-23 Shawn Singh <[email protected]>
REGRESSION (r93614): scrolling div does not repaint
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderFileUploadControl.cpp (111959 => 111960)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderFileUploadControl.cpp 2012-03-24 01:12:23 UTC (rev 111959)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderFileUploadControl.cpp 2012-03-24 01:13:23 UTC (rev 111960)
@@ -52,6 +52,7 @@
RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input)
: RenderBlock(input)
+ , m_canReceiveDroppedFiles(input->canReceiveDroppedFiles())
{
}
@@ -72,8 +73,12 @@
// updateFromElement() eventually.
if (button->disabled() != newDisabled)
button->setDisabled(newDisabled);
-
- button->setActive(input->canReceiveDroppedFiles());
+
+ bool newCanReceiveDroppedFilesState = input->canReceiveDroppedFiles();
+ if (m_canReceiveDroppedFiles != newCanReceiveDroppedFilesState) {
+ m_canReceiveDroppedFiles = newCanReceiveDroppedFilesState;
+ button->setActive(newCanReceiveDroppedFilesState);
+ }
}
// This only supports clearing out the files, but that's OK because for
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderFileUploadControl.h (111959 => 111960)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderFileUploadControl.h 2012-03-24 01:12:23 UTC (rev 111959)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderFileUploadControl.h 2012-03-24 01:13:23 UTC (rev 111960)
@@ -55,6 +55,8 @@
virtual VisiblePosition positionForPoint(const LayoutPoint&);
HTMLInputElement* uploadButton() const;
+
+ bool m_canReceiveDroppedFiles;
};
inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes