diff options
| author | Paul Eggert | 2016-04-03 13:39:52 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-04-03 13:39:52 -0700 |
| commit | b1c7207dbbc5b35aa2fa6e69a3041299e881dbb6 (patch) | |
| tree | 823364dde3da94970a5ae79f7d131f127eb547f4 /src | |
| parent | f7c5f79ca565d3ef3feeb1e0af5ca261f1bcf58a (diff) | |
| parent | b787d5501bad8036016d835faa2f90bb0904c038 (diff) | |
| download | emacs-b1c7207dbbc5b35aa2fa6e69a3041299e881dbb6.tar.gz emacs-b1c7207dbbc5b35aa2fa6e69a3041299e881dbb6.zip | |
Merge from origin/emacs-25
b787d55 More format-time-string change fixups
13c8f29 make-xwidget unused arg cleanup
36e05f0 Remove unused arguments from make-xwidget
1042217 Document incompatible changes in 'format-time-string'
7228eb8 Improve documentation of byte-code objects
0020047 Adapt calls to 'format-time-string' to changes in Emacs 25
17b5152 Improve vc-diff with Git backend
c28f87a (js--continued-expression-p): Special-case unary plus and minus
2d02a5f ; * lisp/vc/vc-annotate.el (vc-annotate): Clarify commentary.
9151f16 Prevent C++ Mode wrongly fontifying some identifiers near tem...
b3b523c Avoid crashes due to insanely large columns in tabulated-list...
a3daa34 Teach M-x disassemble a default argument.
e30c3e9 Fix EOL decoding in vc-annotate with SVN back-end on MS-Windows
df441b3 Fix OS X specific settings in tramp-tests
2244331 Finish fixing a cacheing bug in CC Mode (see 2016-03-09)
# Conflicts:
# lisp/net/tramp-sh.el
# lisp/progmodes/cc-engine.el
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 11 | ||||
| -rw-r--r-- | src/xwidget.c | 28 |
3 files changed, 21 insertions, 19 deletions
diff --git a/src/term.c b/src/term.c index a77e5729b5b..43972109655 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1676,6 +1676,7 @@ append_composite_glyph (struct it *it) | |||
| 1676 | glyph = it->glyph_row->glyphs[it->area]; | 1676 | glyph = it->glyph_row->glyphs[it->area]; |
| 1677 | } | 1677 | } |
| 1678 | glyph->type = COMPOSITE_GLYPH; | 1678 | glyph->type = COMPOSITE_GLYPH; |
| 1679 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 1679 | glyph->pixel_width = it->pixel_width; | 1680 | glyph->pixel_width = it->pixel_width; |
| 1680 | glyph->u.cmp.id = it->cmp_it.id; | 1681 | glyph->u.cmp.id = it->cmp_it.id; |
| 1681 | if (it->cmp_it.ch < 0) | 1682 | if (it->cmp_it.ch < 0) |
diff --git a/src/xdisp.c b/src/xdisp.c index 11b20f99a27..457f28a3e6a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -25792,6 +25792,7 @@ append_glyph (struct it *it) | |||
| 25792 | glyph->object = it->object; | 25792 | glyph->object = it->object; |
| 25793 | if (it->pixel_width > 0) | 25793 | if (it->pixel_width > 0) |
| 25794 | { | 25794 | { |
| 25795 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 25795 | glyph->pixel_width = it->pixel_width; | 25796 | glyph->pixel_width = it->pixel_width; |
| 25796 | glyph->padding_p = false; | 25797 | glyph->padding_p = false; |
| 25797 | } | 25798 | } |
| @@ -25872,6 +25873,7 @@ append_composite_glyph (struct it *it) | |||
| 25872 | } | 25873 | } |
| 25873 | glyph->charpos = it->cmp_it.charpos; | 25874 | glyph->charpos = it->cmp_it.charpos; |
| 25874 | glyph->object = it->object; | 25875 | glyph->object = it->object; |
| 25876 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 25875 | glyph->pixel_width = it->pixel_width; | 25877 | glyph->pixel_width = it->pixel_width; |
| 25876 | glyph->ascent = it->ascent; | 25878 | glyph->ascent = it->ascent; |
| 25877 | glyph->descent = it->descent; | 25879 | glyph->descent = it->descent; |
| @@ -26081,7 +26083,7 @@ produce_image_glyph (struct it *it) | |||
| 26081 | { | 26083 | { |
| 26082 | glyph->charpos = CHARPOS (it->position); | 26084 | glyph->charpos = CHARPOS (it->position); |
| 26083 | glyph->object = it->object; | 26085 | glyph->object = it->object; |
| 26084 | glyph->pixel_width = it->pixel_width; | 26086 | glyph->pixel_width = clip_to_bounds (-1, it->pixel_width, SHRT_MAX); |
| 26085 | glyph->ascent = glyph_ascent; | 26087 | glyph->ascent = glyph_ascent; |
| 26086 | glyph->descent = it->descent; | 26088 | glyph->descent = it->descent; |
| 26087 | glyph->voffset = it->voffset; | 26089 | glyph->voffset = it->voffset; |
| @@ -26185,7 +26187,7 @@ produce_xwidget_glyph (struct it *it) | |||
| 26185 | { | 26187 | { |
| 26186 | glyph->charpos = CHARPOS (it->position); | 26188 | glyph->charpos = CHARPOS (it->position); |
| 26187 | glyph->object = it->object; | 26189 | glyph->object = it->object; |
| 26188 | glyph->pixel_width = it->pixel_width; | 26190 | glyph->pixel_width = clip_to_bounds (-1, it->pixel_width, SHRT_MAX); |
| 26189 | glyph->ascent = glyph_ascent; | 26191 | glyph->ascent = glyph_ascent; |
| 26190 | glyph->descent = it->descent; | 26192 | glyph->descent = it->descent; |
| 26191 | glyph->voffset = it->voffset; | 26193 | glyph->voffset = it->voffset; |
| @@ -26271,7 +26273,9 @@ append_stretch_glyph (struct it *it, Lisp_Object object, | |||
| 26271 | } | 26273 | } |
| 26272 | glyph->charpos = CHARPOS (it->position); | 26274 | glyph->charpos = CHARPOS (it->position); |
| 26273 | glyph->object = object; | 26275 | glyph->object = object; |
| 26274 | glyph->pixel_width = width; | 26276 | /* FIXME: It would be better to use TYPE_MAX here, but |
| 26277 | __typeof__ is not portable enough... */ | ||
| 26278 | glyph->pixel_width = clip_to_bounds (-1, width, SHRT_MAX); | ||
| 26275 | glyph->ascent = ascent; | 26279 | glyph->ascent = ascent; |
| 26276 | glyph->descent = height - ascent; | 26280 | glyph->descent = height - ascent; |
| 26277 | glyph->voffset = it->voffset; | 26281 | glyph->voffset = it->voffset; |
| @@ -26722,6 +26726,7 @@ append_glyphless_glyph (struct it *it, int face_id, bool for_no_font, int len, | |||
| 26722 | } | 26726 | } |
| 26723 | glyph->charpos = CHARPOS (it->position); | 26727 | glyph->charpos = CHARPOS (it->position); |
| 26724 | glyph->object = it->object; | 26728 | glyph->object = it->object; |
| 26729 | eassert (it->pixel_width <= SHRT_MAX); | ||
| 26725 | glyph->pixel_width = it->pixel_width; | 26730 | glyph->pixel_width = it->pixel_width; |
| 26726 | glyph->ascent = it->ascent; | 26731 | glyph->ascent = it->ascent; |
| 26727 | glyph->descent = it->descent; | 26732 | glyph->descent = it->descent; |
diff --git a/src/xwidget.c b/src/xwidget.c index c24475f5312..8ff4c23b1f2 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -156,27 +156,23 @@ webkit_navigation_policy_decision_requested_cb (WebKitWebView *, | |||
| 156 | 156 | ||
| 157 | DEFUN ("make-xwidget", | 157 | DEFUN ("make-xwidget", |
| 158 | Fmake_xwidget, Smake_xwidget, | 158 | Fmake_xwidget, Smake_xwidget, |
| 159 | 7, 8, 0, | 159 | 5, 6, 0, |
| 160 | doc: /* Make an xwidget from BEG to END of TYPE. | 160 | doc: /* Make an xwidget of TYPE. |
| 161 | If BUFFER is nil, use the current buffer. | 161 | If BUFFER is nil, use the current buffer. |
| 162 | If BUFFER is a string and no such buffer exists, create it. | 162 | If BUFFER is a string and no such buffer exists, create it. |
| 163 | TYPE is a symbol which can take one of the following values: | 163 | TYPE is a symbol which can take one of the following values: |
| 164 | 164 | ||
| 165 | - webkit-osr | 165 | - webkit |
| 166 | 166 | ||
| 167 | Returns the newly constructed xwidget, or nil if construction fails. */) | 167 | Returns the newly constructed xwidget, or nil if construction fails. */) |
| 168 | (Lisp_Object beg, Lisp_Object end, Lisp_Object type, | 168 | (Lisp_Object type, |
| 169 | Lisp_Object title, Lisp_Object width, Lisp_Object height, | 169 | Lisp_Object title, Lisp_Object width, Lisp_Object height, |
| 170 | Lisp_Object arguments, Lisp_Object buffer) | 170 | Lisp_Object arguments, Lisp_Object buffer) |
| 171 | { | 171 | { |
| 172 | CHECK_SYMBOL (type); | 172 | CHECK_SYMBOL (type); |
| 173 | CHECK_NATNUM (width); | 173 | CHECK_NATNUM (width); |
| 174 | CHECK_NATNUM (height); | 174 | CHECK_NATNUM (height); |
| 175 | /* This should work a bit like "make-button" | 175 | |
| 176 | (make-button BEG END &rest PROPERTIES) | ||
| 177 | TYPE etc. should be keyword args eventually. | ||
| 178 | (make-xwidget 3 3 'button "oei" 31 31 nil) | ||
| 179 | (xwidget-info (car xwidget-list)) */ | ||
| 180 | struct xwidget *xw = allocate_xwidget (); | 176 | struct xwidget *xw = allocate_xwidget (); |
| 181 | Lisp_Object val; | 177 | Lisp_Object val; |
| 182 | xw->type = type; | 178 | xw->type = type; |
| @@ -191,7 +187,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */) | |||
| 191 | xw->widget_osr = NULL; | 187 | xw->widget_osr = NULL; |
| 192 | xw->plist = Qnil; | 188 | xw->plist = Qnil; |
| 193 | 189 | ||
| 194 | if (EQ (xw->type, Qwebkit_osr)) | 190 | if (EQ (xw->type, Qwebkit)) |
| 195 | { | 191 | { |
| 196 | block_input (); | 192 | block_input (); |
| 197 | xw->widgetwindow_osr = gtk_offscreen_window_new (); | 193 | xw->widgetwindow_osr = gtk_offscreen_window_new (); |
| @@ -201,7 +197,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */) | |||
| 201 | /* WebKit OSR is the only scrolled component at the moment. */ | 197 | /* WebKit OSR is the only scrolled component at the moment. */ |
| 202 | xw->widgetscrolledwindow_osr = NULL; | 198 | xw->widgetscrolledwindow_osr = NULL; |
| 203 | 199 | ||
| 204 | if (EQ (xw->type, Qwebkit_osr)) | 200 | if (EQ (xw->type, Qwebkit)) |
| 205 | { | 201 | { |
| 206 | xw->widgetscrolledwindow_osr = gtk_scrolled_window_new (NULL, NULL); | 202 | xw->widgetscrolledwindow_osr = gtk_scrolled_window_new (NULL, NULL); |
| 207 | gtk_scrolled_window_set_min_content_height | 203 | gtk_scrolled_window_set_min_content_height |
| @@ -222,7 +218,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */) | |||
| 222 | gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width, | 218 | gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width, |
| 223 | xw->height); | 219 | xw->height); |
| 224 | 220 | ||
| 225 | if (EQ (xw->type, Qwebkit_osr)) | 221 | if (EQ (xw->type, Qwebkit)) |
| 226 | { | 222 | { |
| 227 | gtk_container_add (GTK_CONTAINER (xw->widgetwindow_osr), | 223 | gtk_container_add (GTK_CONTAINER (xw->widgetwindow_osr), |
| 228 | xw->widgetscrolledwindow_osr); | 224 | xw->widgetscrolledwindow_osr); |
| @@ -243,7 +239,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */) | |||
| 243 | g_object_set_data (G_OBJECT (xw->widgetwindow_osr), XG_XWIDGET, xw); | 239 | g_object_set_data (G_OBJECT (xw->widgetwindow_osr), XG_XWIDGET, xw); |
| 244 | 240 | ||
| 245 | /* signals */ | 241 | /* signals */ |
| 246 | if (EQ (xw->type, Qwebkit_osr)) | 242 | if (EQ (xw->type, Qwebkit)) |
| 247 | { | 243 | { |
| 248 | g_signal_connect (G_OBJECT (xw->widget_osr), | 244 | g_signal_connect (G_OBJECT (xw->widget_osr), |
| 249 | "document-load-finished", | 245 | "document-load-finished", |
| @@ -501,7 +497,7 @@ xwidget_init_view (struct xwidget *xww, | |||
| 501 | XSETWINDOW (xv->w, s->w); | 497 | XSETWINDOW (xv->w, s->w); |
| 502 | XSETXWIDGET (xv->model, xww); | 498 | XSETXWIDGET (xv->model, xww); |
| 503 | 499 | ||
| 504 | if (EQ (xww->type, Qwebkit_osr)) | 500 | if (EQ (xww->type, Qwebkit)) |
| 505 | { | 501 | { |
| 506 | xv->widget = gtk_drawing_area_new (); | 502 | xv->widget = gtk_drawing_area_new (); |
| 507 | /* Expose event handling. */ | 503 | /* Expose event handling. */ |
| @@ -512,7 +508,7 @@ xwidget_init_view (struct xwidget *xww, | |||
| 512 | g_signal_connect (G_OBJECT (xww->widgetwindow_osr), "damage-event", | 508 | g_signal_connect (G_OBJECT (xww->widgetwindow_osr), "damage-event", |
| 513 | G_CALLBACK (offscreen_damage_event), xv->widget); | 509 | G_CALLBACK (offscreen_damage_event), xv->widget); |
| 514 | 510 | ||
| 515 | if (EQ (xww->type, Qwebkit_osr)) | 511 | if (EQ (xww->type, Qwebkit)) |
| 516 | { | 512 | { |
| 517 | g_signal_connect (G_OBJECT (xv->widget), "button-press-event", | 513 | g_signal_connect (G_OBJECT (xv->widget), "button-press-event", |
| 518 | G_CALLBACK (xwidget_osr_event_forward), NULL); | 514 | G_CALLBACK (xwidget_osr_event_forward), NULL); |
| @@ -987,7 +983,7 @@ syms_of_xwidget (void) | |||
| 987 | defsubr (&Sxwidget_webkit_goto_uri); | 983 | defsubr (&Sxwidget_webkit_goto_uri); |
| 988 | defsubr (&Sxwidget_webkit_execute_script); | 984 | defsubr (&Sxwidget_webkit_execute_script); |
| 989 | defsubr (&Sxwidget_webkit_get_title); | 985 | defsubr (&Sxwidget_webkit_get_title); |
| 990 | DEFSYM (Qwebkit_osr, "webkit-osr"); | 986 | DEFSYM (Qwebkit, "webkit"); |
| 991 | 987 | ||
| 992 | defsubr (&Sxwidget_size_request); | 988 | defsubr (&Sxwidget_size_request); |
| 993 | defsubr (&Sdelete_xwidget_view); | 989 | defsubr (&Sdelete_xwidget_view); |