summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2010-06-22 07:04:12 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2010-06-22 07:04:12 (GMT)
commit9d0d0800062f0d0cf49ed0d28bdbd5bc5e07a1d2 (patch)
treecadc92436888fa4ffebbcbb74bfe20aeb0690bb5 /src/3rdparty
parentf02bb3b14ab0257a11cb9cde692f87a046c0308b (diff)
parent5238e6a592c43f19a7151d20e36908f1f1a44df8 (diff)
downloadQt-9d0d0800062f0d0cf49ed0d28bdbd5bc5e07a1d2.zip
Qt-9d0d0800062f0d0cf49ed0d28bdbd5bc5e07a1d2.tar.gz
Qt-9d0d0800062f0d0cf49ed0d28bdbd5bc5e07a1d2.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.6
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-dump.c8
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-global.h2
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h44
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-gpos.c128
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h8
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog32
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.h4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog40
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp33
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/resources/input_types.html8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp75
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/input_types.html8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp61
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc1
17 files changed, 365 insertions, 101 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-dump.c b/src/3rdparty/harfbuzz/src/harfbuzz-dump.c
index a1ef6b6..54d42e9 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-dump.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-dump.c
@@ -519,13 +519,13 @@ Dump_ValueRecord (HB_ValueRecord *ValueRecord, FILE *stream, int indent, HB_Type
if (value_format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE)
DUMP_FINT (ValueRecord, XAdvance);
if (value_format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE)
- RECURSE (Device, Device, &*ValueRecord->XPlacementDevice);
+ RECURSE (Device, Device, &*ValueRecord->DeviceTables[VR_X_PLACEMENT_DEVICE]);
if (value_format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE)
- RECURSE (Device, Device, &*ValueRecord->YPlacementDevice);
+ RECURSE (Device, Device, &*ValueRecord->DeviceTables[VR_Y_PLACEMENT_DEVICE]);
if (value_format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE)
- RECURSE (Device, Device, &*ValueRecord->XAdvanceDevice);
+ RECURSE (Device, Device, &*ValueRecord->DeviceTables[VR_X_ADVANCE_DEVICE]);
if (value_format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE)
- RECURSE (Device, Device, &*ValueRecord->YAdvanceDevice);
+ RECURSE (Device, Device, &*ValueRecord->DeviceTables[VR_Y_ADVANCE_DEVICE]);
#ifdef HB_SUPPORT_MULTIPLE_MASTER
if (value_format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT)
DUMP_FUINT (ValueRecord, XIdPlacement);
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
index bccd6a2..5b2b679 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h
@@ -39,7 +39,7 @@
#define HB_END_HEADER /* nothing */
#endif
-#if defined(__GNUC__) || defined(_MSC_VER)
+#if defined(__GNUC__) || defined(__ARMCC__) || defined(__CC_ARM) || defined(_MSC_VER)
#define HB_USE_PACKED_STRUCTS
#endif
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
index d513c27..39f3159 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h
@@ -38,6 +38,11 @@ HB_BEGIN_HEADER
/* shared tables */
+#define VR_X_PLACEMENT_DEVICE 0
+#define VR_Y_PLACEMENT_DEVICE 1
+#define VR_X_ADVANCE_DEVICE 2
+#define VR_Y_ADVANCE_DEVICE 3
+
struct HB_ValueRecord_
{
HB_Short XPlacement; /* horizontal adjustment for
@@ -48,14 +53,10 @@ struct HB_ValueRecord_
advance */
HB_Short YAdvance; /* vertical adjustment for
advance */
- HB_Device* XPlacementDevice; /* device table for horizontal
- placement */
- HB_Device* YPlacementDevice; /* device table for vertical
- placement */
- HB_Device* XAdvanceDevice; /* device table for horizontal
- advance */
- HB_Device* YAdvanceDevice; /* device table for vertical
- advance */
+
+ HB_Device** DeviceTables; /* device tables for placement
+ and advance */
+
#ifdef HB_SUPPORT_MULTIPLE_MASTER
HB_UShort XIdPlacement; /* horizontal placement metric ID */
HB_UShort YIdPlacement; /* vertical placement metric ID */
@@ -70,6 +71,8 @@ typedef struct HB_ValueRecord_ HB_ValueRecord;
/* Mask values to scan the value format of the ValueRecord structure.
We always expand compressed ValueRecords of the font. */
+#define HB_GPOS_FORMAT_HAVE_DEVICE_TABLES 0x00F0
+
#define HB_GPOS_FORMAT_HAVE_X_PLACEMENT 0x0001
#define HB_GPOS_FORMAT_HAVE_Y_PLACEMENT 0x0002
#define HB_GPOS_FORMAT_HAVE_X_ADVANCE 0x0004
@@ -102,13 +105,14 @@ struct HB_AnchorFormat2_
typedef struct HB_AnchorFormat2_ HB_AnchorFormat2;
+#define AF3_X_DEVICE_TABLE 0
+#define AF3_Y_DEVICE_TABLE 1
struct HB_AnchorFormat3_
{
HB_Short XCoordinate; /* horizontal value */
HB_Short YCoordinate; /* vertical value */
- HB_Device* XDeviceTable; /* device table for X coordinate */
- HB_Device* YDeviceTable; /* device table for Y coordinate */
+ HB_Device** DeviceTables; /* device tables for coordinates */
};
typedef struct HB_AnchorFormat3_ HB_AnchorFormat3;
@@ -533,18 +537,18 @@ typedef struct HB_ContextPos_ HB_ContextPos;
struct HB_ChainPosRule_
{
+ HB_UShort* Backtrack; /* array of backtrack glyph IDs */
+ HB_UShort* Input; /* array of input glyph IDs */
+ HB_UShort* Lookahead; /* array of lookahead glyph IDs */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of PosLookupRecords */
HB_UShort BacktrackGlyphCount;
/* total number of backtrack glyphs */
- HB_UShort* Backtrack; /* array of backtrack glyph IDs */
HB_UShort InputGlyphCount;
/* total number of input glyphs */
- HB_UShort* Input; /* array of input glyph IDs */
HB_UShort LookaheadGlyphCount;
/* total number of lookahead glyphs */
- HB_UShort* Lookahead; /* array of lookahead glyph IDs */
HB_UShort PosCount; /* number of PosLookupRecords */
- HB_PosLookupRecord* PosLookupRecord;
- /* array of PosLookupRecords */
};
typedef struct HB_ChainPosRule_ HB_ChainPosRule;
@@ -574,20 +578,20 @@ typedef struct HB_ChainContextPosFormat1_ HB_ChainContextPosFormat1;
struct HB_ChainPosClassRule_
{
+ HB_UShort* Backtrack; /* array of backtrack classes */
+ HB_UShort* Input; /* array of context classes */
+ HB_UShort* Lookahead; /* array of lookahead classes */
+ HB_PosLookupRecord* PosLookupRecord;
+ /* array of substitution lookups */
HB_UShort BacktrackGlyphCount;
/* total number of backtrack
classes */
- HB_UShort* Backtrack; /* array of backtrack classes */
HB_UShort InputGlyphCount;
/* total number of context classes */
- HB_UShort* Input; /* array of context classes */
HB_UShort LookaheadGlyphCount;
/* total number of lookahead
classes */
- HB_UShort* Lookahead; /* array of lookahead classes */
HB_UShort PosCount; /* number of PosLookupRecords */
- HB_PosLookupRecord* PosLookupRecord;
- /* array of substitution lookups */
};
typedef struct HB_ChainPosClassRule_ HB_ChainPosClassRule;
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
index 61e42fd..d71a85e 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
@@ -256,6 +256,20 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
else
vr->YAdvance = 0;
+ if ( format & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES )
+ {
+ if ( ALLOC_ARRAY( vr->DeviceTables, 4, HB_Device ) )
+ return error;
+ vr->DeviceTables[VR_X_ADVANCE_DEVICE] = 0;
+ vr->DeviceTables[VR_Y_ADVANCE_DEVICE] = 0;
+ vr->DeviceTables[VR_X_PLACEMENT_DEVICE] = 0;
+ vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] = 0;
+ }
+ else
+ {
+ vr->DeviceTables = 0;
+ }
+
if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE )
{
if ( ACCESS_Frame( 2L ) )
@@ -271,18 +285,11 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
- ( error = _HB_OPEN_Load_Device( &vr->XPlacementDevice,
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE],
stream ) ) != HB_Err_Ok )
return error;
(void)FILE_Seek( cur_offset );
}
- else
- goto empty1;
- }
- else
- {
- empty1:
- vr->XPlacementDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
@@ -300,18 +307,11 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
- ( error = _HB_OPEN_Load_Device( &vr->YPlacementDevice,
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE],
stream ) ) != HB_Err_Ok )
goto Fail3;
(void)FILE_Seek( cur_offset );
}
- else
- goto empty2;
- }
- else
- {
- empty2:
- vr->YPlacementDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
@@ -329,18 +329,11 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
- ( error = _HB_OPEN_Load_Device( &vr->XAdvanceDevice,
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE],
stream ) ) != HB_Err_Ok )
goto Fail2;
(void)FILE_Seek( cur_offset );
}
- else
- goto empty3;
- }
- else
- {
- empty3:
- vr->XAdvanceDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
@@ -358,18 +351,11 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
- ( error = _HB_OPEN_Load_Device( &vr->YAdvanceDevice,
+ ( error = _HB_OPEN_Load_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE],
stream ) ) != HB_Err_Ok )
goto Fail1;
(void)FILE_Seek( cur_offset );
}
- else
- goto empty4;
- }
- else
- {
- empty4:
- vr->YAdvanceDevice = 0;
}
if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT )
@@ -447,13 +433,15 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr,
return HB_Err_Ok;
Fail1:
- _HB_OPEN_Free_Device( &vr->YAdvanceDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE] );
Fail2:
- _HB_OPEN_Free_Device( &vr->XAdvanceDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE] );
Fail3:
- _HB_OPEN_Free_Device( &vr->YPlacementDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] );
+
+ FREE( vr->DeviceTables );
return error;
}
@@ -462,13 +450,14 @@ static void Free_ValueRecord( HB_ValueRecord* vr,
HB_UShort format )
{
if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
- _HB_OPEN_Free_Device( &vr->YAdvanceDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE] );
if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
- _HB_OPEN_Free_Device( &vr->XAdvanceDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE] );
if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
- _HB_OPEN_Free_Device( &vr->YPlacementDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] );
if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE )
- _HB_OPEN_Free_Device( &vr->XPlacementDevice );
+ _HB_OPEN_Free_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE] );
+ FREE( vr->DeviceTables );
}
@@ -511,24 +500,34 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi,
{
/* pixel -> fractional pixel */
+ if ( format & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES )
+ {
+ if ( ALLOC_ARRAY( vr->DeviceTables, 4, HB_Device ) )
+ return error;
+ vr->DeviceTables[VR_X_ADVANCE_DEVICE] = 0;
+ vr->DeviceTables[VR_Y_ADVANCE_DEVICE] = 0;
+ vr->DeviceTables[VR_X_PLACEMENT_DEVICE] = 0;
+ vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] = 0;
+ }
+
if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE )
{
- _HB_OPEN_Get_Device( &vr->XPlacementDevice, x_ppem, &pixel_value );
+ _HB_OPEN_Get_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE], x_ppem, &pixel_value );
gd->x_pos += pixel_value << 6;
}
if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE )
{
- _HB_OPEN_Get_Device( &vr->YPlacementDevice, y_ppem, &pixel_value );
+ _HB_OPEN_Get_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE], y_ppem, &pixel_value );
gd->y_pos += pixel_value << 6;
}
if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE )
{
- _HB_OPEN_Get_Device( &vr->XAdvanceDevice, x_ppem, &pixel_value );
+ _HB_OPEN_Get_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE], x_ppem, &pixel_value );
gd->x_advance += pixel_value << 6;
}
if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE )
{
- _HB_OPEN_Get_Device( &vr->YAdvanceDevice, y_ppem, &pixel_value );
+ _HB_OPEN_Get_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE], y_ppem, &pixel_value );
gd->y_advance += pixel_value << 6;
}
}
@@ -632,19 +631,21 @@ static HB_Error Load_Anchor( HB_Anchor* an,
if ( new_offset )
{
+ if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) )
+ return error;
+
+ an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] = 0;
+ an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] = 0;
+
new_offset += base_offset;
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
- ( error = _HB_OPEN_Load_Device( &an->af.af3.XDeviceTable,
+ ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE],
stream ) ) != HB_Err_Ok )
return error;
(void)FILE_Seek( cur_offset );
}
- else
- {
- an->af.af3.XDeviceTable = 0;
- }
if ( ACCESS_Frame( 2L ) )
goto Fail;
@@ -655,19 +656,24 @@ static HB_Error Load_Anchor( HB_Anchor* an,
if ( new_offset )
{
+ if ( !an->af.af3.DeviceTables )
+ {
+ if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) )
+ return error;
+
+ an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] = 0;
+ an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] = 0;
+ }
+
new_offset += base_offset;
cur_offset = FILE_Pos();
if ( FILE_Seek( new_offset ) ||
- ( error = _HB_OPEN_Load_Device( &an->af.af3.YDeviceTable,
+ ( error = _HB_OPEN_Load_Device( &an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE],
stream ) ) != HB_Err_Ok )
goto Fail;
(void)FILE_Seek( cur_offset );
}
- else
- {
- an->af.af3.YDeviceTable = 0;
- }
break;
case 4:
@@ -692,7 +698,9 @@ static HB_Error Load_Anchor( HB_Anchor* an,
return HB_Err_Ok;
Fail:
- _HB_OPEN_Free_Device( &an->af.af3.XDeviceTable );
+ _HB_OPEN_Free_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] );
+
+ FREE( an->af.af3.DeviceTables );
return error;
}
@@ -701,8 +709,9 @@ static void Free_Anchor( HB_Anchor* an)
{
if ( an->PosFormat == 3 )
{
- _HB_OPEN_Free_Device( &an->af.af3.YDeviceTable );
- _HB_OPEN_Free_Device( &an->af.af3.XDeviceTable );
+ _HB_OPEN_Free_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE] );
+ _HB_OPEN_Free_Device( &an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE] );
+ FREE( an->af.af3.DeviceTables );
}
}
@@ -770,9 +779,12 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi,
case 3:
if ( !gpi->dvi )
{
- _HB_OPEN_Get_Device( &an->af.af3.XDeviceTable, x_ppem, &pixel_value );
+ if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) )
+ return error;
+
+ _HB_OPEN_Get_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], x_ppem, &pixel_value );
*x_value = pixel_value << 6;
- _HB_OPEN_Get_Device( &an->af.af3.YDeviceTable, y_ppem, &pixel_value );
+ _HB_OPEN_Get_Device( &an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE], y_ppem, &pixel_value );
*y_value = pixel_value << 6;
}
else
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index 32f5781..ab5c07a 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -258,6 +258,10 @@ typedef struct HB_Font_ {
void *userData;
} HB_FontRec;
+#ifdef HB_USE_PACKED_STRUCTS
+#pragma pack(pop)
+#endif
+
typedef struct HB_ShaperItem_ HB_ShaperItem;
struct HB_ShaperItem_ {
@@ -285,10 +289,6 @@ struct HB_ShaperItem_ {
HB_Bool HB_ShapeItem(HB_ShaperItem *item);
-#ifdef HB_USE_PACKED_STRUCTS
-#pragma pack(pop)
-#endif
-
HB_END_HEADER
#endif
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index cbc163c..482982d 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- aa3f786bdba4dc153620ae7f98e4b0e41770d1d1
+ a13977ce2aba31808a046cddc082a84dc316d78b
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index f01220e..63af196 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,35 @@
+2010-06-10 Raine Makelainen <raine.makelainen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Impossible to set input method hints based HTML5 input types
+ https://bugs.webkit.org/show_bug.cgi?id=40107
+
+ Helper methods for checking "tel", "number", "email",
+ and "url" input element types.
+
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::isTelephoneField):
+ (WebCore::HTMLInputElement::isNumberField):
+ (WebCore::HTMLInputElement::isEmailField):
+ (WebCore::HTMLInputElement::isUrlField):
+
+2010-04-22 Ray Rischpater <Raymond.Rischpater@Nokia.com>
+
+ Reviewed by Darin Adler.
+
+ In HTMLInputElement.cpp, shouldUseInputMethod does not return true for
+ some text input types (TELEPHONE, NUMBER, URL, and EMAIL). Addressed
+ this by changing shouldUseInputMethod to use internal methods to
+ check that the field is a text field that isn't a password field.
+
+ No new tests.
+
+ Fixes <https://bugs.webkit.org/show_bug.cgi?id=37719>
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::shouldUseInputMethod):
+
2010-04-06 Abhinav Mithal <abhinav.mithal@nokia.com>
Reviewed by Laszlo Gombos.
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
index 652bc40..5746281 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
@@ -347,7 +347,11 @@ void HTMLInputElement::aboutToUnload()
bool HTMLInputElement::shouldUseInputMethod() const
{
- return m_type == TEXT || m_type == SEARCH || m_type == ISINDEX;
+ // The reason IME's are disabled for the password field is because IMEs
+ // can access the underlying password and display it in clear text --
+ // e.g. you can use it to access the stored password for any site
+ // with only trivial effort.
+ return isTextField() && inputType() != PASSWORD;
}
void HTMLInputElement::handleFocusEvent()
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h
index 0e2da32..50e9c00 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h
@@ -109,6 +109,10 @@ public:
virtual bool isSearchField() const { return m_type == SEARCH; }
virtual bool isInputTypeHidden() const { return m_type == HIDDEN; }
virtual bool isPasswordField() const { return m_type == PASSWORD; }
+ bool isTelephoneField() const { return m_type == TELEPHONE; }
+ bool isNumberField() const { return m_type == NUMBER; }
+ bool isEmailField() const { return m_type == EMAIL; }
+ bool isUrlField() const { return m_type == URL; }
bool checked() const { return m_checked; }
void setChecked(bool, bool sendChangeEvent = false);
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 5d37901..cf335a1 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,43 @@
+2010-06-18 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ REGRESSION(r60958) [Qt] qwebpage::inputMethods auto-test fails
+ https://bugs.webkit.org/show_bug.cgi?id=40830
+
+ When activating a regular input method field, always set or unset the ImhHiddenText
+ input method hint.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+
+2010-06-10 Raine Makelainen <raine.makelainen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Impossible to set input method hints based HTML5 input types
+ https://bugs.webkit.org/show_bug.cgi?id=40107
+
+ EditorClientQt to set input method hints for "number", "tel",
+ "email", and "url" HTML input elements.
+
+ Tests for HTML input elements and input method hints added for
+ QGraphicsWebView and QWebView.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::setInputMethodState):
+ * tests/qgraphicswebview/resources/input_types.html: Added.
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (GraphicsWebView::GraphicsWebView):
+ (GraphicsWebView::fireMouseClick):
+ (tst_QGraphicsWebView::focusInputTypes):
+ * tests/qgraphicswebview/tst_qgraphicswebview.qrc: Added.
+ * tests/qwebview/resources/input_types.html: Added.
+ * tests/qwebview/tst_qwebview.cpp:
+ (WebView::fireMouseClick):
+ (tst_QWebView::focusInputTypes):
+ * tests/qwebview/tst_qwebview.qrc:
+
2010-05-19 Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 27cc2f5..3255c8e 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -601,20 +601,29 @@ void EditorClientQt::setInputMethodState(bool active)
QWebPageClient* webPageClient = m_page->d->client;
if (webPageClient) {
#if QT_VERSION >= 0x040600
- bool isPasswordField = false;
- if (!active) {
- // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
- // for password fields. The Qt platform is responsible for determining which widget
- // will receive input method events for password fields.
- Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
- if (frame && frame->document() && frame->document()->focusedNode()) {
- if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag)) {
- HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
- active = isPasswordField = inputElement->isPasswordField();
- }
+ HTMLInputElement* inputElement = 0;
+ Frame* frame = m_page->d->page->focusController()->focusedOrMainFrame();
+ if (frame && frame->document() && frame->document()->focusedNode())
+ if (frame->document()->focusedNode()->hasTagName(HTMLNames::inputTag))
+ inputElement = static_cast<HTMLInputElement*>(frame->document()->focusedNode());
+
+ if (inputElement) {
+ if (!active) {
+ // Setting the Qt::WA_InputMethodEnabled attribute true and Qt::ImhHiddenText flag
+ // for password fields. The Qt platform is responsible for determining which widget
+ // will receive input method events for password fields.
+ active = inputElement->isPasswordField();
+ webPageClient->setInputMethodHint(Qt::ImhHiddenText, active);
+ } else {
+ // Set input method hints for "number", "tel", "email", and "url" input elements.
+ webPageClient->setInputMethodHint(Qt::ImhDialableCharactersOnly, inputElement->isTelephoneField());
+ webPageClient->setInputMethodHint(Qt::ImhDigitsOnly, inputElement->isNumberField());
+ webPageClient->setInputMethodHint(Qt::ImhEmailCharactersOnly, inputElement->isEmailField());
+ webPageClient->setInputMethodHint(Qt::ImhUrlCharactersOnly, inputElement->isUrlField());
+ webPageClient->setInputMethodHint(Qt::ImhHiddenText, inputElement->isPasswordField());
}
}
- webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
+
#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
// disables auto-uppercase and predictive text for mobile devices
webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/resources/input_types.html b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/resources/input_types.html
new file mode 100644
index 0000000..18ab314
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/resources/input_types.html
@@ -0,0 +1,8 @@
+<html><body>
+<input type='text' maxlength='20' style='position: absolute; left: 10px; top: 0px; height: 50px; width: 100px;'/><br>
+<input type='password' style='position: absolute; left: 10px; top: 50px; height: 50px; width: 100px;'/><br>
+<input type='tel' style='position: absolute; left: 10px; top: 100px; height: 50px; width: 100px;'/><br>
+<input type='number' style='position: absolute; left: 10px; top: 150px; height: 50px; width: 100px;'/><br>
+<input type='email' style='position: absolute; left: 10px; top: 200px; height: 50px; width: 100px;'/><br>
+<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>"
+</body></html> \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index a52e167..5efd8a5 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -19,6 +19,7 @@
#include <QtTest/QtTest>
+#include <QGraphicsSceneMouseEvent>
#include <QGraphicsView>
#include <qgraphicswebview.h>
#include <qwebpage.h>
@@ -54,6 +55,7 @@ class tst_QGraphicsWebView : public QObject
private slots:
void qgraphicswebview();
void crashOnViewlessWebPages();
+ void focusInputTypes();
};
void tst_QGraphicsWebView::qgraphicswebview()
@@ -97,6 +99,29 @@ private slots:
}
};
+class GraphicsWebView : public QGraphicsWebView
+{
+ Q_OBJECT
+
+public:
+ GraphicsWebView(QGraphicsItem* parent = 0): QGraphicsWebView(parent)
+ {
+ }
+
+ void fireMouseClick(QPointF point) {
+ QGraphicsSceneMouseEvent presEv(QEvent::GraphicsSceneMousePress);
+ presEv.setPos(point);
+ presEv.setButton(Qt::LeftButton);
+ presEv.setButtons(Qt::LeftButton);
+ QGraphicsSceneMouseEvent relEv(QEvent::GraphicsSceneMouseRelease);
+ relEv.setPos(point);
+ relEv.setButton(Qt::LeftButton);
+ relEv.setButtons(Qt::LeftButton);
+ QGraphicsWebView::sceneEvent(&presEv);
+ QGraphicsWebView::sceneEvent(&relEv);
+ }
+};
+
void tst_QGraphicsWebView::crashOnViewlessWebPages()
{
QGraphicsScene scene;
@@ -125,6 +150,56 @@ void tst_QGraphicsWebView::crashOnViewlessWebPages()
QVERIFY(::waitForSignal(page, SIGNAL(loadFinished(bool))));
}
+void tst_QGraphicsWebView::focusInputTypes()
+{
+ QWebPage* page = new QWebPage;
+ GraphicsWebView* webView = new GraphicsWebView;
+ webView->setPage( page );
+ QGraphicsView* view = new QGraphicsView;
+ QGraphicsScene* scene = new QGraphicsScene(view);
+ view->setScene(scene);
+ scene->addItem(webView);
+ view->setGeometry(QRect(0,0,500,500));
+ QCoreApplication::processEvents();
+ QUrl url("qrc:///resources/input_types.html");
+ page->mainFrame()->load(url);
+ page->mainFrame()->setFocus();
+
+ QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+
+ // 'text' type
+ webView->fireMouseClick(QPointF(20.0, 10.0));
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+#else
+ QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+#endif
+
+ // 'password' field
+ webView->fireMouseClick(QPointF(20.0, 60.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText);
+
+ // 'tel' field
+ webView->fireMouseClick(QPointF(20.0, 110.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly);
+
+ // 'number' field
+ webView->fireMouseClick(QPointF(20.0, 160.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly);
+
+ // 'email' field
+ webView->fireMouseClick(QPointF(20.0, 210.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly);
+
+ // 'url' field
+ webView->fireMouseClick(QPointF(20.0, 260.0));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly);
+
+ delete webView;
+ delete view;
+}
+
QTEST_MAIN(tst_QGraphicsWebView)
#include "tst_qgraphicswebview.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
new file mode 100644
index 0000000..c91bb9c
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>resources/input_types.html</file>
+</qresource>
+</RCC>
+
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/input_types.html b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/input_types.html
new file mode 100644
index 0000000..18ab314
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/input_types.html
@@ -0,0 +1,8 @@
+<html><body>
+<input type='text' maxlength='20' style='position: absolute; left: 10px; top: 0px; height: 50px; width: 100px;'/><br>
+<input type='password' style='position: absolute; left: 10px; top: 50px; height: 50px; width: 100px;'/><br>
+<input type='tel' style='position: absolute; left: 10px; top: 100px; height: 50px; width: 100px;'/><br>
+<input type='number' style='position: absolute; left: 10px; top: 150px; height: 50px; width: 100px;'/><br>
+<input type='email' style='position: absolute; left: 10px; top: 200px; height: 50px; width: 100px;'/><br>
+<input type='url' style='position: absolute; left: 10px; top: 250px; height: 50px; width: 100px;'/><br>"
+</body></html> \ No newline at end of file
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 27daf38..d466ab5 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -46,10 +46,25 @@ private slots:
void reusePage_data();
void reusePage();
+ void focusInputTypes();
void crashTests();
};
+class WebView : public QWebView
+{
+ Q_OBJECT
+
+public:
+ void fireMouseClick(QPoint point) {
+ QMouseEvent presEv(QEvent::MouseButtonPress, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QMouseEvent relEv(QEvent::MouseButtonRelease, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ QWebView::mousePressEvent(&presEv);
+ QWebView::mousePressEvent(&relEv);
+ }
+
+};
+
// This will be called before the first test function is executed.
// It is only called once.
void tst_QWebView::initTestCase()
@@ -191,6 +206,52 @@ void tst_QWebView::crashTests()
}
+void tst_QWebView::focusInputTypes()
+{
+ QWebPage* page = new QWebPage;
+ WebView* webView = new WebView;
+ webView->setPage( page );
+
+ QCoreApplication::processEvents();
+ QUrl url("qrc:///resources/input_types.html");
+ page->mainFrame()->load(url);
+ page->mainFrame()->setFocus();
+
+ QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+
+ // 'text' type
+ webView->fireMouseClick(QPoint(20, 10));
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+#else
+ QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+#endif
+
+ // 'password' field
+ webView->fireMouseClick(QPoint(20, 60));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhHiddenText);
+
+ // 'tel' field
+ webView->fireMouseClick(QPoint(20, 110));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDialableCharactersOnly);
+
+ // 'number' field
+ webView->fireMouseClick(QPoint(20, 160));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhDigitsOnly);
+
+ // 'email' field
+ webView->fireMouseClick(QPoint(20, 210));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhEmailCharactersOnly);
+
+ // 'url' field
+ webView->fireMouseClick(QPoint(20, 260));
+ QVERIFY(webView->inputMethodHints() & Qt::ImhUrlCharactersOnly);
+
+ delete webView;
+
+}
+
QTEST_MAIN(tst_QWebView)
#include "tst_qwebview.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
index ede34a9..5d71550 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
@@ -2,6 +2,7 @@
<qresource>
<file>data/index.html</file>
<file>data/frame_a.html</file>
+ <file>resources/input_types.html</file>
</qresource>
</RCC>