mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-09 23:17:16 +08:00
Merge branch 'testing' of gitorious.org:chakra-packages/platform into testing
This commit is contained in:
commit
30f4b649ab
79
qtwebkit/MediaControl.diff
Normal file
79
qtwebkit/MediaControl.diff
Normal file
@ -0,0 +1,79 @@
|
||||
diff --git a/Source/WebCore/css/mediaControlsQt.css b/Source/WebCore/css/mediaControlsQt.css
|
||||
index 64e0ec5..0fa52e1 100644
|
||||
--- a/Source/WebCore/css/mediaControlsQt.css
|
||||
+++ b/Source/WebCore/css/mediaControlsQt.css
|
||||
@@ -22,7 +22,7 @@
|
||||
* 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.
|
||||
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* QtWebKit media controls. Extends mediaControls.css */
|
||||
@@ -68,7 +68,9 @@ audio::-webkit-media-controls-mute-button {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
padding: 6px;
|
||||
- margin: 5px 5px 5px 3px;
|
||||
+ position: relative;
|
||||
+ bottom: 5px;
|
||||
+ margin-right: 3px;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
@@ -76,7 +78,9 @@ video::-webkit-media-controls-mute-button {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
padding: 6px;
|
||||
- margin: 5px 5px 5px 3px;
|
||||
+ position: relative;
|
||||
+ bottom: 5px;
|
||||
+ margin-right: 3px;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
@@ -163,6 +167,8 @@ video::-webkit-media-controls-timeline {
|
||||
audio::-webkit-media-controls-volume-slider-container {
|
||||
-webkit-appearance: media-volume-slider-container;
|
||||
position: absolute;
|
||||
+ right: 3px;
|
||||
+ bottom: 29px;
|
||||
height: 103px;
|
||||
width: 24px;
|
||||
}
|
||||
@@ -170,30 +176,30 @@ audio::-webkit-media-controls-volume-slider-container {
|
||||
video::-webkit-media-controls-volume-slider-container {
|
||||
-webkit-appearance: media-volume-slider-container;
|
||||
position: absolute;
|
||||
+ right: 3px;
|
||||
+ bottom: 29px;
|
||||
height: 103px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
audio::-webkit-media-controls-volume-slider {
|
||||
-webkit-appearance: media-volume-slider;
|
||||
- display: inline;
|
||||
+ display: -webkit-box;
|
||||
position: absolute;
|
||||
|
||||
width: 12px; /* See RenderThemeQt::adjustSliderThumbSize(). */
|
||||
padding: 6px;
|
||||
height: 88px;
|
||||
- margin: 0 0 3px 0;
|
||||
}
|
||||
|
||||
video::-webkit-media-controls-volume-slider {
|
||||
-webkit-appearance: media-volume-slider;
|
||||
- display: inline;
|
||||
+ display: -webkit-box;
|
||||
position: absolute;
|
||||
|
||||
width: 12px; /* See RenderThemeQt::adjustSliderThumbSize(). */
|
||||
padding: 6px;
|
||||
height: 88px;
|
||||
- margin: 0 0 3px 0;
|
||||
}
|
||||
|
||||
audio::-webkit-media-controls-seek-back-button {
|
@ -6,7 +6,7 @@
|
||||
pkgname=qtwebkit
|
||||
pkgver=2.3
|
||||
_pkgver=23
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
_qtver=4.8.4
|
||||
arch=('x86_64')
|
||||
url='http://trac.webkit.org/wiki/QtWebKit'
|
||||
@ -19,16 +19,22 @@ makedepends=('gperf' 'sqlite3' 'fontconfig' 'perl' 'python2' 'mesa' 'ruby' 'git'
|
||||
source=("${pkgname}-${pkgver}.tar.gz"::"https://gitorious.org/webkit/qtwebkit-23/archive-tarball/qtwebkit-2.3-beta1"
|
||||
"http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-${_qtver}.tar.gz"
|
||||
'qwebview.patch'
|
||||
'Notifications.diff')
|
||||
'Notifications.diff'
|
||||
'MediaControl.diff'
|
||||
'WindowOpen.diff')
|
||||
sha1sums=('e5a8ffe62fc57dbbea2110241077bebbcd605fd2'
|
||||
'f5880f11c139d7d8d01ecb8d874535f7d9553198'
|
||||
'ef467fcfc9e74aa88356f27acc21792706ed1e4d'
|
||||
'37cef3fb9f853e49c2394abb722634b4cdb3a744')
|
||||
'37cef3fb9f853e49c2394abb722634b4cdb3a744'
|
||||
'd92bc12d2d0f45a7343ee2acdb66df0ebf446d18'
|
||||
'1d98d3505c85f6b70a81444939be342cf51d3540')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}"/webkit-qtwebkit-${_pkgver}
|
||||
|
||||
patch -p1 -i "${srcdir}"/Notifications.diff
|
||||
patch -p1 -i "${srcdir}"/MediaControl.diff
|
||||
patch -p1 -i "${srcdir}"/WindowOpen.diff
|
||||
|
||||
export QTDIR=/usr
|
||||
Tools/Scripts/build-webkit --qt \
|
||||
|
107
qtwebkit/WindowOpen.diff
Normal file
107
qtwebkit/WindowOpen.diff
Normal file
@ -0,0 +1,107 @@
|
||||
2013-01-22 Anders Carlsson <andersca@apple.com>
|
||||
|
||||
Use a platforom strategy for local storage
|
||||
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp
|
||||
index 2f51a81750ca5cd8f5bd5d24decde0845e0afc6a..61f9a6bd1465cf650aed0a5681dba73e8c74df3d 100644
|
||||
--- a/Source/WebCore/page/DOMWindow.cpp
|
||||
+++ b/Source/WebCore/page/DOMWindow.cpp
|
||||
@@ -339,8 +339,11 @@ FloatRect DOMWindow::adjustWindowRect(Page* page, const FloatRect& pendingChange
|
||||
window.setHeight(pendingChanges.height());
|
||||
|
||||
FloatSize minimumSize = page->chrome()->client()->minimumWindowSize();
|
||||
- window.setWidth(min(max(minimumSize.width(), window.width()), screen.width()));
|
||||
- window.setHeight(min(max(minimumSize.height(), window.height()), screen.height()));
|
||||
+ // Let size 0 pass through, since that indicates default size, not minimum size.
|
||||
+ if (window.width())
|
||||
+ window.setWidth(min(max(minimumSize.width(), window.width()), screen.width()));
|
||||
+ if (window.height())
|
||||
+ window.setHeight(min(max(minimumSize.height(), window.height()), screen.height()));
|
||||
|
||||
// Constrain the window position within the valid screen area.
|
||||
window.setX(max(screen.x(), min(window.x(), screen.maxX() - window.width())));
|
||||
diff --git a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
|
||||
index 2853d600a2f15fbdc26bad512a7fe58c23888425..aae3bbcca422a96a2a00c12a3d1c57e33e1fbe2a 100644
|
||||
--- a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
|
||||
+++ b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
|
||||
@@ -186,6 +186,7 @@ private Q_SLOTS:
|
||||
void renderOnRepaintRequestedShouldNotRecurse();
|
||||
void loadSignalsOrder_data();
|
||||
void loadSignalsOrder();
|
||||
+ void openWindowDefaultSize();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
void macCopyUnicodeToClipboard();
|
||||
@@ -410,10 +411,13 @@ void tst_QWebPage::consoleOutput()
|
||||
QCOMPARE(page.lineNumbers.at(0), 1);
|
||||
}
|
||||
|
||||
-class TestPage : public QWebPage
|
||||
-{
|
||||
+class TestPage : public QWebPage {
|
||||
+ Q_OBJECT
|
||||
public:
|
||||
- TestPage(QObject* parent = 0) : QWebPage(parent) {}
|
||||
+ TestPage(QObject* parent = 0) : QWebPage(parent)
|
||||
+ {
|
||||
+ connect(this, SIGNAL(geometryChangeRequested(QRect)), this, SLOT(slotGeometryChangeRequested(QRect)));
|
||||
+ }
|
||||
|
||||
struct Navigation {
|
||||
QPointer<QWebFrame> frame;
|
||||
@@ -422,7 +426,8 @@ public:
|
||||
};
|
||||
|
||||
QList<Navigation> navigations;
|
||||
- QList<QWebPage*> createdWindows;
|
||||
+ QList<TestPage*> createdWindows;
|
||||
+ QRect requestedGeometry;
|
||||
|
||||
virtual bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type) {
|
||||
Navigation n;
|
||||
@@ -434,10 +439,15 @@ public:
|
||||
}
|
||||
|
||||
virtual QWebPage* createWindow(WebWindowType) {
|
||||
- QWebPage* page = new TestPage(this);
|
||||
+ TestPage* page = new TestPage(this);
|
||||
createdWindows.append(page);
|
||||
return page;
|
||||
}
|
||||
+
|
||||
+private Q_SLOTS:
|
||||
+ void slotGeometryChangeRequested(const QRect& geom) {
|
||||
+ requestedGeometry = geom;
|
||||
+ }
|
||||
};
|
||||
|
||||
void tst_QWebPage::popupFormSubmission()
|
||||
@@ -3253,5 +3263,29 @@ void tst_QWebPage::undoActionHaveCustomText()
|
||||
QVERIFY(typingActionText != alignActionText);
|
||||
}
|
||||
|
||||
+void tst_QWebPage::openWindowDefaultSize()
|
||||
+{
|
||||
+ TestPage page;
|
||||
+ page.settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
|
||||
+ // Open a default window.
|
||||
+ page.mainFrame()->evaluateJavaScript("window.open()");
|
||||
+ // Open a too small window.
|
||||
+ page.mainFrame()->evaluateJavaScript("window.open('', '', 'width=10,height=10')");
|
||||
+
|
||||
+ QTest::qWait(500);
|
||||
+ // The number of popups created should be two.
|
||||
+ QVERIFY(page.createdWindows.size() == 2);
|
||||
+
|
||||
+ QRect requestedGeometry = page.createdWindows[0]->requestedGeometry;
|
||||
+ // Check default size has been requested.
|
||||
+ QVERIFY(requestedGeometry.width() == 0);
|
||||
+ QVERIFY(requestedGeometry.height() == 0);
|
||||
+
|
||||
+ requestedGeometry = page.createdWindows[1]->requestedGeometry;
|
||||
+ // Check minimum size has been requested.
|
||||
+ QVERIFY(requestedGeometry.width() == 100);
|
||||
+ QVERIFY(requestedGeometry.height() == 100);
|
||||
+}
|
||||
+
|
||||
QTEST_MAIN(tst_QWebPage)
|
||||
#include "tst_qwebpage.moc"
|
Loading…
Reference in New Issue
Block a user