update patch to work with build system changes
[AROS-Contrib.git] / Networking / Apps / OWB / WebView / OWB-r1097-aros.diff
blob45794ded91fd39ea4d726d411dc4bbb5c62184be
1 diff -ruN OWB-r1097/BAL/Events/WebCore/AROS/BCEventHandlerAROS.cpp OWB-r1097.aros/BAL/Events/WebCore/AROS/BCEventHandlerAROS.cpp
2 --- OWB-r1097/BAL/Events/WebCore/AROS/BCEventHandlerAROS.cpp 1970-01-01 01:00:00.000000000 +0100
3 +++ OWB-r1097.aros/BAL/Events/WebCore/AROS/BCEventHandlerAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4 @@ -0,0 +1,131 @@
5 +/*
6 + * Copyright (C) 2008 Pleyo. All rights reserved.
7 + *
8 + * Redistribution and use in source and binary forms, with or without
9 + * modification, are permitted provided that the following conditions
10 + * are met:
11 + *
12 + * 1. Redistributions of source code must retain the above copyright
13 + * notice, this list of conditions and the following disclaimer.
14 + * 2. Redistributions in binary form must reproduce the above copyright
15 + * notice, this list of conditions and the following disclaimer in the
16 + * documentation and/or other materials provided with the distribution.
17 + * 3. Neither the name of Pleyo nor the names of
18 + * its contributors may be used to endorse or promote products derived
19 + * from this software without specific prior written permission.
20 + *
21 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
22 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
25 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 + */
33 +#include "config.h"
34 +#include "EventHandler.h"
36 +#include "ClipboardAROS.h"
37 +#include "EventNames.h"
38 +#include "FloatPoint.h"
39 +#include "FocusController.h"
40 +#include "Frame.h"
41 +#include "FrameView.h"
42 +#include "KeyboardEvent.h"
43 +#include "MouseEventWithHitTestResults.h"
44 +#include "BALBase.h"
45 +#include "Logging.h"
46 +#include "Page.h"
47 +#include "PlatformKeyboardEvent.h"
48 +#include "PlatformWheelEvent.h"
49 +#include "RenderWidget.h"
50 +#include "Scrollbar.h"
52 +namespace WebCore {
54 +const double EventHandler::TextDragDelay = 0.0;
56 +bool EventHandler::tabsToAllControls(KeyboardEvent* event) const
58 + // We always allow tabs to all controls
59 + return true;
62 +void EventHandler::focusDocumentView()
64 + if (Page* page = m_frame->page())
65 + page->focusController()->setFocusedFrame(m_frame);
68 +bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
70 + // Figure out which view to send the event to.
71 + RenderObject* target = event.targetNode() ? event.targetNode()->renderer() : 0;
72 + if (!target || !target->isWidget())
73 + return false;
75 + return passMouseDownEventToWidget(static_cast<RenderWidget*>(target)->widget());
78 +bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
80 + return passMouseDownEventToWidget(renderWidget->widget());
83 +bool EventHandler::passMouseDownEventToWidget(Widget* widget)
85 + NotImplemented();
86 + return false;
89 +bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
91 + //GTK+ activation is not necessarily tied to mouse events, so it may
92 + //not make sense to implement this
94 + NotImplemented();
95 + return false;
98 +bool EventHandler::passWheelEventToWidget(PlatformWheelEvent& event, Widget* widget)
100 + ASSERT(widget);
101 + if (!widget->isFrameView())
102 + return false;
104 + return static_cast<FrameView*>(widget)->frame()->eventHandler()->handleWheelEvent(event);
107 +PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
109 + return ClipboardBal::create(ClipboardWritable, true);
112 +bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
114 + subframe->eventHandler()->handleMousePressEvent(mev.event());
115 + return true;
118 +bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
120 + subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode);
121 + return true;
124 +bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
126 + subframe->eventHandler()->handleMouseReleaseEvent(mev.event());
127 + return true;
130 +unsigned EventHandler::accessKeyModifiers()
132 + return PlatformKeyboardEvent::AltKey;
136 diff -ruN OWB-r1097/BAL/Events/WebCore/AROS/BCEventLoopAROS.cpp OWB-r1097.aros/BAL/Events/WebCore/AROS/BCEventLoopAROS.cpp
137 --- OWB-r1097/BAL/Events/WebCore/AROS/BCEventLoopAROS.cpp 1970-01-01 01:00:00.000000000 +0100
138 +++ OWB-r1097.aros/BAL/Events/WebCore/AROS/BCEventLoopAROS.cpp 2018-06-13 07:27:37.570979727 +0100
139 @@ -0,0 +1,32 @@
141 + * Copyright (C) 2008 Nuanti Ltd.
143 + * This library is free software; you can redistribute it and/or
144 + * modify it under the terms of the GNU Library General Public
145 + * License as published by the Free Software Foundation; either
146 + * version 2 of the License, or (at your option) any later version.
148 + * This library is distributed in the hope that it will be useful,
149 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
150 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
151 + * Library General Public License for more details.
153 + * You should have received a copy of the GNU Library General Public License
154 + * along with this library; see the file COPYING.LIB. If not, write to
155 + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
156 + * Boston, MA 02110-1301, USA.
157 + */
159 +#include "config.h"
160 +#include "EventLoop.h"
163 +namespace WebCore {
165 +void EventLoop::cycle()
167 + //SDL_Event event;
168 + //SDL_WaitEvent(&event);
171 +} // namespace WebCore
172 diff -ruN OWB-r1097/BAL/Events/WebCore/AROS/BCKeyboardCodesAROS.h OWB-r1097.aros/BAL/Events/WebCore/AROS/BCKeyboardCodesAROS.h
173 --- OWB-r1097/BAL/Events/WebCore/AROS/BCKeyboardCodesAROS.h 1970-01-01 01:00:00.000000000 +0100
174 +++ OWB-r1097.aros/BAL/Events/WebCore/AROS/BCKeyboardCodesAROS.h 2018-06-13 07:27:37.570979727 +0100
175 @@ -0,0 +1,545 @@
177 + * Copyright (C) 2008 Pleyo. All rights reserved.
179 + * Redistribution and use in source and binary forms, with or without
180 + * modification, are permitted provided that the following conditions
181 + * are met:
183 + * 1. Redistributions of source code must retain the above copyright
184 + * notice, this list of conditions and the following disclaimer.
185 + * 2. Redistributions in binary form must reproduce the above copyright
186 + * notice, this list of conditions and the following disclaimer in the
187 + * documentation and/or other materials provided with the distribution.
188 + * 3. Neither the name of Pleyo nor the names of
189 + * its contributors may be used to endorse or promote products derived
190 + * from this software without specific prior written permission.
192 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
193 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
194 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
195 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
196 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
197 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
198 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
199 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
200 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
201 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
202 + */
204 +#ifndef KeyboardCodes_h
205 +#define KeyboardCodes_h
207 +namespace WebCore {
209 +// VK_LBUTTON (01) Left mouse button
210 +// VK_RBUTTON (02) Right mouse button
211 +// VK_CANCEL (03) Control-break processing
212 +// VK_MBUTTON (04) Middle mouse button (three-button mouse)
213 +// VK_XBUTTON1 (05)
214 +// VK_XBUTTON2 (06)
216 +// VK_BACK (08) BACKSPACE key
217 +const int VK_BACK = 0x08;
219 +// VK_TAB (09) TAB key
220 +const int VK_TAB = 0x09;
222 +// VK_CLEAR (0C) CLEAR key
223 +const int VK_CLEAR = 0x0C;
225 +// VK_RETURN (0D)
226 +const int VK_RETURN = 0x0D;
228 +// VK_SHIFT (10) SHIFT key
229 +const int VK_SHIFT = 0x10;
231 +// VK_CONTROL (11) CTRL key
232 +const int VK_CONTROL = 0x11;
234 +// VK_MENU (12) ALT key
235 +const int VK_MENU = 0x12;
237 +// VK_PAUSE (13) PAUSE key
238 +const int VK_PAUSE = 0x13;
240 +// VK_CAPITAL (14) CAPS LOCK key
241 +const int VK_CAPITAL = 0x14;
243 +// VK_KANA (15) Input Method Editor (IME) Kana mode
244 +const int VK_KANA = 0x15;
246 +// VK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
247 +// VK_HANGUL (15) IME Hangul mode
248 +const int VK_HANGUL = 0x15;
250 +// VK_JUNJA (17) IME Junja mode
251 +const int VK_JUNJA = 0x17;
253 +// VK_FINAL (18) IME final mode
254 +const int VK_FINAL = 0x18;
256 +// VK_HANJA (19) IME Hanja mode
257 +const int VK_HANJA = 0x19;
259 +// VK_KANJI (19) IME Kanji mode
260 +const int VK_KANJI = 0x19;
262 +// VK_ESCAPE (1B) ESC key
263 +const int VK_ESCAPE = 0x1B;
265 +// VK_CONVERT (1C) IME convert
266 +const int VK_CONVERT = 0x1C;
268 +// VK_NONCONVERT (1D) IME nonconvert
269 +const int VK_NONCONVERT = 0x1D;
271 +// VK_ACCEPT (1E) IME accept
272 +const int VK_ACCEPT = 0x1E;
274 +// VK_MODECHANGE (1F) IME mode change request
275 +const int VK_MODECHANGE = 0x1F;
277 +// VK_SPACE (20) SPACEBAR
278 +const int VK_SPACE = 0x20;
280 +// VK_PRIOR (21) PAGE UP key
281 +const int VK_PRIOR = 0x21;
283 +// VK_NEXT (22) PAGE DOWN key
284 +const int VK_NEXT = 0x22;
286 +// VK_END (23) END key
287 +const int VK_END = 0x23;
289 +// VK_HOME (24) HOME key
290 +const int VK_HOME = 0x24;
292 +// VK_LEFT (25) LEFT ARROW key
293 +const int VK_LEFT = 0x25;
295 +// VK_UP (26) UP ARROW key
296 +const int VK_UP = 0x26;
298 +// VK_RIGHT (27) RIGHT ARROW key
299 +const int VK_RIGHT = 0x27;
301 +// VK_DOWN (28) DOWN ARROW key
302 +const int VK_DOWN = 0x28;
304 +// VK_SELECT (29) SELECT key
305 +const int VK_SELECT = 0x29;
307 +// VK_PRINT (2A) PRINT key
308 +const int VK_PRINT = 0x2A;
310 +// VK_EXECUTE (2B) EXECUTE key
311 +const int VK_EXECUTE = 0x2B;
313 +// VK_SNAPSHOT (2C) PRINT SCREEN key
314 +const int VK_SNAPSHOT = 0x2C;
316 +// VK_INSERT (2D) INS key
317 +const int VK_INSERT = 0x2D;
319 +// VK_DELETE (2E) DEL key
320 +const int VK_DELETE = 0x2E;
322 +// VK_HELP (2F) HELP key
323 +const int VK_HELP = 0x2F;
325 +// (30) 0 key
326 +const int VK_0 = 0x30;
328 +// (31) 1 key
329 +const int VK_1 = 0x31;
331 +// (32) 2 key
332 +const int VK_2 = 0x32;
334 +// (33) 3 key
335 +const int VK_3 = 0x33;
337 +// (34) 4 key
338 +const int VK_4 = 0x34;
340 +// (35) 5 key;
342 +const int VK_5 = 0x35;
344 +// (36) 6 key
345 +const int VK_6 = 0x36;
347 +// (37) 7 key
348 +const int VK_7 = 0x37;
350 +// (38) 8 key
351 +const int VK_8 = 0x38;
353 +// (39) 9 key
354 +const int VK_9 = 0x39;
356 +// (41) A key
357 +const int VK_A = 0x41;
359 +// (42) B key
360 +const int VK_B = 0x42;
362 +// (43) C key
363 +const int VK_C = 0x43;
365 +// (44) D key
366 +const int VK_D = 0x44;
368 +// (45) E key
369 +const int VK_E = 0x45;
371 +// (46) F key
372 +const int VK_F = 0x46;
374 +// (47) G key
375 +const int VK_G = 0x47;
377 +// (48) H key
378 +const int VK_H = 0x48;
380 +// (49) I key
381 +const int VK_I = 0x49;
383 +// (4A) J key
384 +const int VK_J = 0x4A;
386 +// (4B) K key
387 +const int VK_K = 0x4B;
389 +// (4C) L key
390 +const int VK_L = 0x4C;
392 +// (4D) M key
393 +const int VK_M = 0x4D;
395 +// (4E) N key
396 +const int VK_N = 0x4E;
398 +// (4F) O key
399 +const int VK_O = 0x4F;
401 +// (50) P key
402 +const int VK_P = 0x50;
404 +// (51) Q key
405 +const int VK_Q = 0x51;
407 +// (52) R key
408 +const int VK_R = 0x52;
410 +// (53) S key
411 +const int VK_S = 0x53;
413 +// (54) T key
414 +const int VK_T = 0x54;
416 +// (55) U key
417 +const int VK_U = 0x55;
419 +// (56) V key
420 +const int VK_V = 0x56;
422 +// (57) W key
423 +const int VK_W = 0x57;
425 +// (58) X key
426 +const int VK_X = 0x58;
428 +// (59) Y key
429 +const int VK_Y = 0x59;
431 +// (5A) Z key
432 +const int VK_Z = 0x5A;
434 +// VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard)
435 +const int VK_LWIN = 0x5B;
437 +// VK_RWIN (5C) Right Windows key (Natural keyboard)
438 +const int VK_RWIN = 0x5C;
440 +// VK_APPS (5D) Applications key (Natural keyboard)
441 +const int VK_APPS = 0x5D;
443 +// VK_SLEEP (5F) Computer Sleep key
444 +const int VK_SLEEP = 0x5F;
446 +// VK_NUMPAD0 (60) Numeric keypad 0 key
447 +const int VK_NUMPAD0 = 0x60;
449 +// VK_NUMPAD1 (61) Numeric keypad 1 key
450 +const int VK_NUMPAD1 = 0x61;
452 +// VK_NUMPAD2 (62) Numeric keypad 2 key
453 +const int VK_NUMPAD2 = 0x62;
455 +// VK_NUMPAD3 (63) Numeric keypad 3 key
456 +const int VK_NUMPAD3 = 0x63;
458 +// VK_NUMPAD4 (64) Numeric keypad 4 key
459 +const int VK_NUMPAD4 = 0x64;
461 +// VK_NUMPAD5 (65) Numeric keypad 5 key
462 +const int VK_NUMPAD5 = 0x65;
464 +// VK_NUMPAD6 (66) Numeric keypad 6 key
465 +const int VK_NUMPAD6 = 0x66;
467 +// VK_NUMPAD7 (67) Numeric keypad 7 key
468 +const int VK_NUMPAD7 = 0x67;
470 +// VK_NUMPAD8 (68) Numeric keypad 8 key
471 +const int VK_NUMPAD8 = 0x68;
473 +// VK_NUMPAD9 (69) Numeric keypad 9 key
474 +const int VK_NUMPAD9 = 0x69;
476 +// VK_MULTIPLY (6A) Multiply key
477 +const int VK_MULTIPLY = 0x6A;
479 +// VK_ADD (6B) Add key
480 +const int VK_ADD = 0x6B;
482 +// VK_SEPARATOR (6C) Separator key
483 +const int VK_SEPARATOR = 0x6C;
485 +// VK_SUBTRACT (6D) Subtract key
486 +const int VK_SUBTRACT = 0x6D;
488 +// VK_DECIMAL (6E) Decimal key
489 +const int VK_DECIMAL = 0x6E;
491 +// VK_DIVIDE (6F) Divide key
492 +const int VK_DIVIDE = 0x6F;
494 +// VK_F1 (70) F1 key
495 +const int VK_F1 = 0x70;
497 +// VK_F2 (71) F2 key
498 +const int VK_F2 = 0x71;
500 +// VK_F3 (72) F3 key
501 +const int VK_F3 = 0x72;
503 +// VK_F4 (73) F4 key
504 +const int VK_F4 = 0x73;
506 +// VK_F5 (74) F5 key
507 +const int VK_F5 = 0x74;
509 +// VK_F6 (75) F6 key
510 +const int VK_F6 = 0x75;
512 +// VK_F7 (76) F7 key
513 +const int VK_F7 = 0x76;
515 +// VK_F8 (77) F8 key
516 +const int VK_F8 = 0x77;
518 +// VK_F9 (78) F9 key
519 +const int VK_F9 = 0x78;
521 +// VK_F10 (79) F10 key
522 +const int VK_F10 = 0x79;
524 +// VK_F11 (7A) F11 key
525 +const int VK_F11 = 0x7A;
527 +// VK_F12 (7B) F12 key
528 +const int VK_F12 = 0x7B;
530 +// VK_F13 (7C) F13 key
531 +const int VK_F13 = 0x7C;
533 +// VK_F14 (7D) F14 key
534 +const int VK_F14 = 0x7D;
536 +// VK_F15 (7E) F15 key
537 +const int VK_F15 = 0x7E;
539 +// VK_F16 (7F) F16 key
540 +const int VK_F16 = 0x7F;
542 +// VK_F17 (80H) F17 key
543 +const int VK_F17 = 0x80;
545 +// VK_F18 (81H) F18 key
546 +const int VK_F18 = 0x81;
548 +// VK_F19 (82H) F19 key
549 +const int VK_F19 = 0x82;
551 +// VK_F20 (83H) F20 key
552 +const int VK_F20 = 0x83;
554 +// VK_F21 (84H) F21 key
555 +const int VK_F21 = 0x84;
557 +// VK_F22 (85H) F22 key
558 +const int VK_F22 = 0x85;
560 +// VK_F23 (86H) F23 key
561 +const int VK_F23 = 0x86;
563 +// VK_F24 (87H) F24 key
564 +const int VK_F24 = 0x87;
566 +// VK_NUMLOCK (90) NUM LOCK key
567 +const int VK_NUMLOCK = 0x90;
569 +// VK_SCROLL (91) SCROLL LOCK key
570 +const int VK_SCROLL = 0x91;
572 +// VK_LSHIFT (A0) Left SHIFT key
573 +const int VK_LSHIFT = 0xA0;
575 +// VK_RSHIFT (A1) Right SHIFT key
576 +const int VK_RSHIFT = 0xA1;
578 +// VK_LCONTROL (A2) Left CONTROL key
579 +const int VK_LCONTROL = 0xA2;
581 +// VK_RCONTROL (A3) Right CONTROL key
582 +const int VK_RCONTROL = 0xA3;
584 +// VK_LMENU (A4) Left MENU key
585 +const int VK_LMENU = 0xA4;
587 +// VK_RMENU (A5) Right MENU key
588 +const int VK_RMENU = 0xA5;
590 +// VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key
591 +const int VK_BROWSER_BACK = 0xA6;
593 +// VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key
594 +const int VK_BROWSER_FORWARD = 0xA7;
596 +// VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key
597 +const int VK_BROWSER_REFRESH = 0xA8;
599 +// VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key
600 +const int VK_BROWSER_STOP = 0xA9;
602 +// VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
603 +const int VK_BROWSER_SEARCH = 0xAA;
605 +// VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
606 +const int VK_BROWSER_FAVORITES = 0xAB;
608 +// VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
609 +const int VK_BROWSER_HOME = 0xAC;
611 +// VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
612 +const int VK_VOLUME_MUTE = 0xAD;
614 +// VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
615 +const int VK_VOLUME_DOWN = 0xAE;
617 +// VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
618 +const int VK_VOLUME_UP = 0xAF;
620 +// VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
621 +const int VK_MEDIA_NEXT_TRACK = 0xB0;
623 +// VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
624 +const int VK_MEDIA_PREV_TRACK = 0xB1;
626 +// VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
627 +const int VK_MEDIA_STOP = 0xB2;
629 +// VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
630 +const int VK_MEDIA_PLAY_PAUSE = 0xB3;
632 +// VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
633 +const int VK_MEDIA_LAUNCH_MAIL = 0xB4;
635 +// VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
636 +const int VK_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5;
638 +// VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
639 +const int VK_MEDIA_LAUNCH_APP1 = 0xB6;
641 +// VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
642 +const int VK_MEDIA_LAUNCH_APP2 = 0xB7;
644 +// VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
645 +const int VK_OEM_1 = 0xBA;
647 +// VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key
648 +const int VK_OEM_PLUS = 0xBB;
650 +// VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key
651 +const int VK_OEM_COMMA = 0xBC;
653 +// VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key
654 +const int VK_OEM_MINUS = 0xBD;
656 +// VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key
657 +const int VK_OEM_PERIOD = 0xBE;
659 +// VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
660 +const int VK_OEM_2 = 0xBF;
662 +// VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
663 +const int VK_OEM_3 = 0xC0;
665 +// VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
666 +const int VK_OEM_4 = 0xDB;
668 +// VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
669 +const int VK_OEM_5 = 0xDC;
671 +// VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
672 +const int VK_OEM_6 = 0xDD;
674 +// VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
675 +const int VK_OEM_7 = 0xDE;
677 +// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
678 +const int VK_OEM_8 = 0xDF;
680 +// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
681 +const int VK_OEM_102 = 0xE2;
683 +// VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
684 +const int VK_PROCESSKEY = 0xE5;
686 +// VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
687 +const int VK_PACKET = 0xE7;
689 +// VK_ATTN (F6) Attn key
690 +const int VK_ATTN = 0xF6;
692 +// VK_CRSEL (F7) CrSel key
693 +const int VK_CRSEL = 0xF7;
695 +// VK_EXSEL (F8) ExSel key
696 +const int VK_EXSEL = 0xF8;
698 +// VK_EREOF (F9) Erase EOF key
699 +const int VK_EREOF = 0xF9;
701 +// VK_PLAY (FA) Play key
702 +const int VK_PLAY = 0xFA;
704 +// VK_ZOOM (FB) Zoom key
705 +const int VK_ZOOM = 0xFB;
707 +// VK_NONAME (FC) Reserved for future use
708 +const int VK_NONAME = 0xFC;
710 +// VK_PA1 (FD) PA1 key
711 +const int VK_PA1 = 0xFD;
713 +// VK_OEM_CLEAR (FE) Clear key
714 +const int VK_OEM_CLEAR = 0xFE;
716 +const int VK_UNKNOWN = 0;
720 +#endif
721 diff -ruN OWB-r1097/BAL/Events/WebCore/AROS/BCPlatformKeyboardEventAROS.cpp OWB-r1097.aros/BAL/Events/WebCore/AROS/BCPlatformKeyboardEventAROS.cpp
722 --- OWB-r1097/BAL/Events/WebCore/AROS/BCPlatformKeyboardEventAROS.cpp 1970-01-01 01:00:00.000000000 +0100
723 +++ OWB-r1097.aros/BAL/Events/WebCore/AROS/BCPlatformKeyboardEventAROS.cpp 2018-06-13 07:27:37.570979727 +0100
724 @@ -0,0 +1,300 @@
726 + * Copyright (C) 2008 Joerg Strohmayer
727 + * Copyright (C) 2008 Pleyo. All rights reserved.
729 + * Redistribution and use in source and binary forms, with or without
730 + * modification, are permitted provided that the following conditions
731 + * are met:
733 + * 1. Redistributions of source code must retain the above copyright
734 + * notice, this list of conditions and the following disclaimer.
735 + * 2. Redistributions in binary form must reproduce the above copyright
736 + * notice, this list of conditions and the following disclaimer in the
737 + * documentation and/or other materials http://gaara-fr.com/index2.phpprovided with the distribution.
738 + * 3. Neither the name of Pleyo nor the names of
739 + * its contributors may be used to endorse or promote products derived
740 + * from this software without specific prior written permission.
742 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
743 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
744 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
745 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
746 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
747 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
748 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
749 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
750 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
751 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
752 + */
754 +#include "config.h"
755 +#include "PlatformKeyboardEvent.h"
756 +#include "NotImplemented.h"
758 +#include "KeyboardCodes.h"
759 +#include "BALBase.h"
760 +#include "TextEncoding.h"
761 +#include "Unicode.h"
762 +#include "CString.h"
764 +extern "C" {
766 +#include <proto/locale.h>
767 +#include <proto/diskfont.h>
768 +#include <diskfont/diskfonttag.h>
769 +#include <intuition/intuition.h>
770 +#include <proto/exec.h>
771 +#include <exec/io.h>
772 +#include <proto/console.h>
773 +#include <devices/rawkeycodes.h>
774 +#include <aros/debug.h>
775 +#include <proto/codesets.h>
776 +#include <libraries/codesets.h>
778 +struct Device *ConsoleDevice;
782 +namespace WebCore {
784 +static struct Locale *locale;
785 +static unsigned *unicode_map;
786 +struct IOStdReq cioreq;
789 +static __attribute__((constructor)) void unicode_map_init(void)
791 + cioreq.io_Message.mn_Length = sizeof(struct IOStdReq);
792 + OpenDevice ("console.device", -1, (struct IORequest *)&cioreq, 0);
793 + ConsoleDevice = cioreq.io_Device;
795 + locale = OpenLocale(NULL);
798 +static unsigned local2unicode(unsigned c)
801 + return c;
804 +static __attribute__((destructor)) void unicode_map_exit(void)
806 + if (ConsoleDevice)
807 + CloseDevice ((struct IORequest *)&cioreq);
808 + if (locale)
809 + CloseLocale(locale);
812 +static int ConvertAmigaKeyToVirtualKey(struct IntuiMessage *im)
814 + if (IDCMP_RAWKEY == im->Class) {
815 + switch (im->Code & ~IECODE_UP_PREFIX) {
816 + case RAWKEY_RETURN: return VK_RETURN; break;
817 + case RAWKEY_TAB: return VK_TAB; break;
818 + case RAWKEY_INSERT: return VK_INSERT; break;
819 + case RAWKEY_PAGEUP: return VK_PRIOR; break;
820 + case RAWKEY_PAGEDOWN: return VK_NEXT; break;
821 + case RAWKEY_F11: return VK_F11; break;
822 + case RAWKEY_UP: return VK_UP; break;
823 + case RAWKEY_DOWN: return VK_DOWN; break;
824 + case RAWKEY_RIGHT: return VK_RIGHT; break;
825 + case RAWKEY_LEFT: return VK_LEFT; break;
826 + case RAWKEY_F1: return VK_F1; break;
827 + case RAWKEY_F2: return VK_F2; break;
828 + case RAWKEY_F3: return VK_F3; break;
829 + case RAWKEY_F4: return VK_F4; break;
830 + case RAWKEY_F5: return VK_F5; break;
831 + case RAWKEY_F6: return VK_F6; break;
832 + case RAWKEY_F7: return VK_F7; break;
833 + case RAWKEY_F8: return VK_F8; break;
834 + case RAWKEY_F9: return VK_F9; break;
835 + case RAWKEY_F10: return VK_F10; break;
836 + case RAWKEY_HELP: return VK_HELP; break;
837 + case RAWKEY_LSHIFT: return VK_SHIFT; break;
838 + case RAWKEY_RSHIFT: return VK_SHIFT; break;
839 + case RAWKEY_CAPSLOCK: return VK_CAPITAL; break;
840 + case RAWKEY_LCONTROL: return VK_CONTROL; break;
841 + case RAWKEY_LALT: return VK_MENU; break;
842 + case RAWKEY_RALT: return VK_MENU; break;
843 +// case RAWKEY_MENU: return VK_MENU; break;
844 + case RAWKEY_LAMIGA: return VK_LWIN; break;
845 + case RAWKEY_RAMIGA: return VK_RWIN; break;
846 +// case RAWKEY_PRINTSCR: return VK_PRINT; break;
847 +// case RAWKEY_BREAK: return VK_PAUSE; break;
848 + case RAWKEY_F12: return VK_F12; break;
849 + case RAWKEY_HOME: return VK_HOME; break;
850 + case RAWKEY_END: return VK_END; break;
851 + case 0x79: return VK_NUMLOCK; break;
852 + case RAWKEY_DELETE: return VK_DELETE; break;
853 + case RAWKEY_BACKSPACE: return VK_BACK; break;
854 + case RAWKEY_ESCAPE: return VK_ESCAPE; break;
855 + case RAWKEY_Q: return VK_Q; break;
856 + case RAWKEY_W: return VK_W; break;
857 + case RAWKEY_E: return VK_E; break;
858 + case RAWKEY_R: return VK_R; break;
859 + case RAWKEY_T: return VK_T; break;
860 + case RAWKEY_Y: return VK_Y; break;
861 + case RAWKEY_U: return VK_U; break;
862 + case RAWKEY_I: return VK_I; break;
863 + case RAWKEY_O: return VK_O; break;
864 + case RAWKEY_P: return VK_P; break;
865 + case RAWKEY_A: return VK_A; break;
866 + case RAWKEY_S: return VK_S; break;
867 + case RAWKEY_D: return VK_D; break;
868 + case RAWKEY_F: return VK_F; break;
869 + case RAWKEY_G: return VK_G; break;
870 + case RAWKEY_H: return VK_H; break;
871 + case RAWKEY_J: return VK_J; break;
872 + case RAWKEY_K: return VK_K; break;
873 + case RAWKEY_L: return VK_L; break;
874 + case RAWKEY_Z: return VK_Z; break;
875 + case RAWKEY_X: return VK_X; break;
876 + case RAWKEY_C: return VK_C; break;
877 + case RAWKEY_V: return VK_V; break;
878 + case RAWKEY_B: return VK_B; break;
879 + case RAWKEY_N: return VK_N; break;
880 + case RAWKEY_M: return VK_M; break;
881 + case RAWKEY_1: return VK_1; break;
882 + case RAWKEY_2: return VK_2; break;
883 + case RAWKEY_3: return VK_3; break;
884 + case RAWKEY_4: return VK_4; break;
885 + case RAWKEY_5: return VK_5; break;
886 + case RAWKEY_6: return VK_6; break;
887 + case RAWKEY_7: return VK_7; break;
888 + case RAWKEY_8: return VK_8; break;
889 + case RAWKEY_9: return VK_9; break;
890 + case RAWKEY_0: return VK_0; break;
892 + default:
893 + if ((im->Code & ~IECODE_UP_PREFIX) >= RAWKEY_SPACE)
894 + D(bug(stderr, "%s class IDCMP_RAWKEY code 0x%04x not handled\n", __PRETTY_FUNCTION__, im->Code));
895 + return 0;
896 + break;
899 + else
900 + return 0;
903 +static WebCore::String keyIdentifierForAmigaKeyCode(struct IntuiMessage *im)
905 + if (IDCMP_RAWKEY == im->Class) {
906 + switch (im->Code & ~IECODE_UP_PREFIX) {
907 + case RAWKEY_TAB: return "U+0009"; break;
908 + case RAWKEY_INSERT: return "Insert"; break;
909 + case RAWKEY_PAGEUP: return "PageUp"; break;
910 + case RAWKEY_PAGEDOWN: return "PageDown"; break;
911 + case RAWKEY_F11: return "F11"; break;
912 + case RAWKEY_UP: return "Up"; break;
913 + case RAWKEY_DOWN: return "Down"; break;
914 + case RAWKEY_RIGHT: return "Right"; break;
915 + case RAWKEY_LEFT: return "Left"; break;
916 + case RAWKEY_F1: return "F1"; break;
917 + case RAWKEY_F2: return "F2"; break;
918 + case RAWKEY_F3: return "F3"; break;
919 + case RAWKEY_F4: return "F4"; break;
920 + case RAWKEY_F5: return "F5"; break;
921 + case RAWKEY_F6: return "F6"; break;
922 + case RAWKEY_F7: return "F7"; break;
923 + case RAWKEY_F8: return "F8"; break;
924 + case RAWKEY_F9: return "F9"; break;
925 + case RAWKEY_F10: return "F10"; break;
926 + case RAWKEY_HELP: return "Help"; break;
927 + case RAWKEY_LALT: return "Alt"; break;
928 + case RAWKEY_RALT: return "Alt"; break;
929 +// case RAWKEY_MENU: return "Alt"; break;
930 +// case RAWKEY_BREAK: return "Pause"; break;
931 + case RAWKEY_F12: return "F12"; break;
932 + case RAWKEY_HOME: return "Home"; break;
933 + case RAWKEY_END: return "End"; break;
934 + case RAWKEY_RETURN: return "Enter"; break;
935 + default: return "U+0000"; break;
936 + /* TODO ctr+a -> "U+0001" */
937 + /* TODO ctr+c -> "U+0003" */
938 + /* TODO ctr+v -> "U+0016" */
939 + /* TODO ctr+x -> "U+0018" */
942 + else
943 + return "U+0000";
946 +PlatformKeyboardEvent::PlatformKeyboardEvent(struct IntuiMessage* event)
947 + : m_type(KeyDown)
948 + , m_autoRepeat(false)
949 + , m_windowsVirtualKeyCode(ConvertAmigaKeyToVirtualKey(event))
950 + , m_isKeypad(event->Qualifier & IEQUALIFIER_NUMERICPAD)
951 + , m_shiftKey(event->Qualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
952 + , m_ctrlKey(event->Qualifier & IEQUALIFIER_CONTROL)
953 + , m_altKey(event->Qualifier & (IEQUALIFIER_LALT | IEQUALIFIER_RALT))
954 + , m_metaKey(event->Qualifier & (IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND))
955 + , m_arosEventKey(event)
957 + char buffer[10];
958 + if (IDCMP_RAWKEY == event->Class) {
959 + int length;
960 + struct InputEvent ievent;
961 + if (event->Code & IECODE_UP_PREFIX)
962 + m_type = KeyUp;
964 + ievent.ie_Class = IECLASS_RAWKEY;
965 + ievent.ie_Code = event->Code;
966 + ievent.ie_Qualifier = event->Qualifier;
967 + ievent.ie_position.ie_addr = *((APTR*)event->IAddress);
969 + length = RawKeyConvert(&ievent, buffer, sizeof(buffer) - 1, NULL);
970 + if(length >= 0)
971 + buffer[length] = 0;
972 + if(length > 1)
973 + buffer[0] = 0;
976 + if(buffer[0])
978 + struct codeset *utfCodeset = CodesetsFindA("UTF-8", NULL);
979 + if(utfCodeset)
981 + char *keyConverted = CodesetsConvertStr(CSA_Source, (IPTR) buffer, (IPTR) CSA_DestCodeset, (IPTR) utfCodeset, TAG_END);
982 + if(keyConverted)
984 + D(bug("%2x converted to %2x%2x\n", buffer[0], keyConverted[0], keyConverted[1]));
985 + m_text = String::fromUTF8(keyConverted);
986 + m_unmodifiedText = String::fromUTF8(keyConverted);
987 + CodesetsFreeA(keyConverted, NULL);
992 + m_keyIdentifier = keyIdentifierForAmigaKeyCode(event);
995 +void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool backwardCompatibilityMode)
997 + // Can only change type from KeyDown to RawKeyDown or Char, as we lack information for other conversions.
998 + ASSERT(m_type == KeyDown);
999 + m_type = type;
1001 + if (backwardCompatibilityMode)
1002 + return;
1004 + if (type == RawKeyDown) {
1005 + m_text = String();
1006 + m_unmodifiedText = String();
1007 + } else {
1008 + m_keyIdentifier = String();
1009 + m_windowsVirtualKeyCode = 0;
1013 +bool PlatformKeyboardEvent::currentCapsLockState()
1015 + NotImplemented();
1016 + return false;
1019 +struct IntuiMessage* PlatformKeyboardEvent::arosEventKey() const
1021 + return m_arosEventKey;
1025 diff -ruN OWB-r1097/BAL/Events/WebCore/AROS/BCPlatformMouseEventAROS.cpp OWB-r1097.aros/BAL/Events/WebCore/AROS/BCPlatformMouseEventAROS.cpp
1026 --- OWB-r1097/BAL/Events/WebCore/AROS/BCPlatformMouseEventAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1027 +++ OWB-r1097.aros/BAL/Events/WebCore/AROS/BCPlatformMouseEventAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1028 @@ -0,0 +1,84 @@
1030 + * Copyright (C) 2008 Joerg Strohmayer
1031 + * Copyright (C) 2008 Pleyo. All rights reserved.
1033 + * Redistribution and use in source and binary forms, with or without
1034 + * modification, are permitted provided that the following conditions
1035 + * are met:
1037 + * 1. Redistributions of source code must retain the above copyright
1038 + * notice, this list of conditions and the following disclaimer.
1039 + * 2. Redistributions in binary form must reproduce the above copyright
1040 + * notice, this list of conditions and the following disclaimer in the
1041 + * documentation and/or other materials provided with the distribution.
1042 + * 3. Neither the name of Pleyo nor the names of
1043 + * its contributors may be used to endorse or promote products derived
1044 + * from this software without specific prior written permission.
1046 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1047 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1048 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1049 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1050 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1051 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1052 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1053 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1054 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1055 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1056 + */
1058 +#include "config.h"
1059 +#include "PlatformMouseEvent.h"
1061 +#include "CurrentTime.h"
1062 +#include "Assertions.h"
1063 +#include <intuition/intuition.h>
1065 +namespace WebCore {
1067 +// FIXME: Would be even better to figure out which modifier is Alt instead of always using GDK_MOD1_MASK.
1069 +// Keep this in sync with the other platform event constructors
1070 +PlatformMouseEvent::PlatformMouseEvent(BalEventButton *event)
1072 + //printf("PlatformMouseEvent eventbutton x=%d y=%d\n", (int)event->x, (int)event->y);
1073 + m_timestamp = WTF::currentTime();
1074 + m_position = IntPoint((int)event->MouseX, (int)event->MouseY);
1075 + m_globalPosition = IntPoint((int)event->MouseX, (int)event->MouseY);
1076 + m_shiftKey = event->Qualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT);
1077 + m_ctrlKey = event->Qualifier & IEQUALIFIER_CONTROL;
1078 + m_altKey = event->Qualifier & (IEQUALIFIER_LALT | IEQUALIFIER_RALT);
1079 + m_metaKey = event->Qualifier & (IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND);
1081 + m_eventType = MouseEventMoved;
1082 + m_button = NoButton;
1083 + m_clickCount = 0;
1085 + if (IDCMP_MOUSEBUTTONS == event->Class) {
1086 + if ((event->Code & ~IECODE_UP_PREFIX) == IECODE_LBUTTON)
1087 + m_button = LeftButton;
1088 + else if ((event->Code & ~IECODE_UP_PREFIX) == IECODE_MBUTTON)
1089 + m_button = MiddleButton;
1090 + else if ((event->Code & ~IECODE_UP_PREFIX) == IECODE_RBUTTON)
1091 + m_button = RightButton;
1093 + if (NoButton != m_button) {
1094 + if (event->Code & IECODE_UP_PREFIX) {
1095 + m_eventType = MouseEventReleased;
1096 + m_clickCount = 0;
1097 + } else {
1098 + m_eventType = MouseEventPressed;
1099 + m_clickCount = 1;
1102 + } else { // IDCMP_MOUSEMOVE == event->Class
1103 + if (event->Qualifier & IEQUALIFIER_LEFTBUTTON)
1104 + m_button = LeftButton;
1105 + else if (event->Qualifier & IEQUALIFIER_MIDBUTTON)
1106 + m_button = MiddleButton;
1107 + else if (event->Qualifier & IEQUALIFIER_RBUTTON)
1108 + m_button = RightButton;
1113 diff -ruN OWB-r1097/BAL/Events/WebCore/AROS/BCPlatformWheelEventAROS.cpp OWB-r1097.aros/BAL/Events/WebCore/AROS/BCPlatformWheelEventAROS.cpp
1114 --- OWB-r1097/BAL/Events/WebCore/AROS/BCPlatformWheelEventAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1115 +++ OWB-r1097.aros/BAL/Events/WebCore/AROS/BCPlatformWheelEventAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1116 @@ -0,0 +1,109 @@
1118 + * Copyright (C) 2009 Stanislaw Szymczyk
1119 + * Copyright (C) 2008 Joerg Strohmayer
1120 + * Copyright (C) 2008 Pleyo. All rights reserved.
1122 + * Redistribution and use in source and binary forms, with or without
1123 + * modification, are permitted provided that the following conditions
1124 + * are met:
1126 + * 1. Redistributions of source code must retain the above copyright
1127 + * notice, this list of conditions and the following disclaimer.
1128 + * 2. Redistributions in binary form must reproduce the above copyright
1129 + * notice, this list of conditions and the following disclaimer in the
1130 + * documentation and/or other materials provided with the distribution.
1131 + * 3. Neither the name of Pleyo nor the names of
1132 + * its contributors may be used to endorse or promote products derived
1133 + * from this software without specific prior written permission.
1135 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1136 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1137 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1138 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1139 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1140 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1141 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1142 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1143 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1144 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1145 + */
1147 +#include "config.h"
1148 +#include "PlatformWheelEvent.h"
1149 +#include "Scrollbar.h"
1150 +#include <cstdio>
1151 +#include <intuition/intuition.h>
1152 +#include <devices/rawkeycodes.h>
1154 +namespace WebCore {
1156 +// Keep this in sync with the other platform event constructors
1157 +PlatformWheelEvent::PlatformWheelEvent(BalEventScroll* event)
1159 + static const float delta = 1;
1161 + m_deltaX = 0;
1162 + m_deltaY = 0;
1164 + m_shiftKey = event->Qualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT);
1165 + m_ctrlKey = event->Qualifier & IEQUALIFIER_CONTROL;
1166 + m_altKey = event->Qualifier & (IEQUALIFIER_LALT | IEQUALIFIER_RALT);
1167 + m_metaKey = event->Qualifier & (IEQUALIFIER_LCOMMAND | IEQUALIFIER_RCOMMAND);
1169 + if (event->Class == IDCMP_RAWKEY)
1171 + double deltax, deltay;
1172 + int wheelX = 0, wheelY = 0;
1174 + switch(event->Code)
1176 + case RAWKEY_NM_WHEEL_UP:
1177 + wheelY = -1;
1178 + break;
1179 + case RAWKEY_NM_WHEEL_DOWN:
1180 + wheelY = 1;
1181 + break;
1182 + case RAWKEY_NM_WHEEL_LEFT:
1183 + wheelX = -1;
1184 + break;
1185 + case RAWKEY_NM_WHEEL_RIGHT:
1186 + wheelX = 1;
1187 + break;
1190 + /* Like on AmigaOS4 port */
1191 + if (m_ctrlKey) {
1192 + m_granularity = ScrollByPixelWheelEvent;
1193 + deltax = wheelX * -10000;
1194 + deltay = wheelY * -10000;
1195 + } else if (m_shiftKey) {
1196 + m_granularity = ScrollByPageWheelEvent;
1197 + deltax = (int)wheelX * event->IDCMPWindow->Width / -50;
1198 + deltay = (int)wheelY * event->IDCMPWindow->Height / -50;
1199 + } else {
1200 + m_granularity = ScrollByPixelWheelEvent;
1201 + deltax = wheelX * static_cast<float>(cScrollbarPixelsPerLineStep);;
1202 + deltay = wheelY * -static_cast<float>(cScrollbarPixelsPerLineStep);;
1205 + if (m_altKey) {
1206 + double temp;
1207 + temp = deltax;
1208 + deltax = deltay;
1209 + deltay = temp;
1212 + m_deltaX = deltax;
1213 + m_deltaY = deltay;
1215 + m_wheelTicksX = m_deltaX;
1216 + m_wheelTicksY = m_deltaY;
1218 + m_position = IntPoint((int)event->MouseX, (int)event->MouseY);
1219 + m_globalPosition = IntPoint((int)event->MouseX, (int)event->MouseY);
1220 + m_isAccepted = false;
1226 diff -ruN OWB-r1097/BAL/Events/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Events/WebCore/CMakeLists.txt
1227 --- OWB-r1097/BAL/Events/WebCore/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
1228 +++ OWB-r1097.aros/BAL/Events/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
1229 @@ -28,3 +28,9 @@
1231 aux_source_directory(${BAL_DIR}/Events/WebCore/SDL WEBCORE_SRC)
1232 endif(USE_GRAPHICS_SDL)
1234 +if(USE_GRAPHICS_AROS)
1235 + create_include_link(${BAL_DIR}/Events/WebCore/AROS BAL)
1237 + aux_source_directory(${BAL_DIR}/Events/WebCore/AROS WEBCORE_SRC)
1238 +endif(USE_GRAPHICS_AROS)
1239 diff -ruN OWB-r1097/BAL/Events/WebCore/WK/BCPlatformKeyboardEventWK.h OWB-r1097.aros/BAL/Events/WebCore/WK/BCPlatformKeyboardEventWK.h
1240 --- OWB-r1097/BAL/Events/WebCore/WK/BCPlatformKeyboardEventWK.h 2009-08-14 16:35:00.000000000 +0100
1241 +++ OWB-r1097.aros/BAL/Events/WebCore/WK/BCPlatformKeyboardEventWK.h 2018-06-13 07:27:37.570979727 +0100
1242 @@ -63,6 +63,10 @@
1243 class BMessage;
1244 #endif
1246 +#if PLATFORM(AROS)
1247 +struct IntuiMessage;
1248 +#endif
1250 namespace WebCore {
1252 class PlatformKeyboardEvent {
1253 @@ -156,6 +160,11 @@
1254 PlatformKeyboardEvent(BMessage*);
1255 #endif
1257 +#if PLATFORM(AROS)
1258 + PlatformKeyboardEvent(struct IntuiMessage*);
1259 + struct IntuiMessage* arosEventKey() const;
1260 +#endif
1262 #if PLATFORM(WIN) || PLATFORM(CHROMIUM)
1263 bool isSystemKey() const { return m_isSystemKey; }
1264 #endif
1265 @@ -186,6 +195,9 @@
1266 #if PLATFORM(QT)
1267 QKeyEvent* m_qtEvent;
1268 #endif
1269 +#if PLATFORM(AROS)
1270 + struct IntuiMessage* m_arosEventKey;
1271 +#endif
1274 } // namespace WebCore
1275 diff -ruN OWB-r1097/BAL/Events/WebCore/WK/BCPlatformMouseEventWK.h OWB-r1097.aros/BAL/Events/WebCore/WK/BCPlatformMouseEventWK.h
1276 --- OWB-r1097/BAL/Events/WebCore/WK/BCPlatformMouseEventWK.h 2009-09-15 07:54:14.000000000 +0100
1277 +++ OWB-r1097.aros/BAL/Events/WebCore/WK/BCPlatformMouseEventWK.h 2018-06-13 07:27:37.570979727 +0100
1278 @@ -36,7 +36,6 @@
1279 #if PLATFORM(QT)
1280 QT_BEGIN_NAMESPACE
1281 class QInputEvent;
1282 -class QGraphicsSceneMouseEvent;
1283 QT_END_NAMESPACE
1284 #endif
1286 @@ -55,6 +54,10 @@
1287 class BMessage;
1288 #endif
1290 +#if PLATFORM(AROS)
1291 +struct IntuiMessage;
1292 +#endif
1294 namespace WebCore {
1296 // These button numbers match the ones used in the DOM API, 0 through 2, except for NoButton which isn't specified.
1297 @@ -138,6 +141,10 @@
1298 PlatformMouseEvent(const BMessage*);
1299 #endif
1301 +#if PLATFORM(AROS)
1302 + PlatformMouseEvent(struct IntuiMessage*);
1303 +#endif
1305 protected:
1306 IntPoint m_position;
1307 IntPoint m_globalPosition;
1308 diff -ruN OWB-r1097/BAL/Events/WebCore/WK/BCPlatformWheelEventWK.h OWB-r1097.aros/BAL/Events/WebCore/WK/BCPlatformWheelEventWK.h
1309 --- OWB-r1097/BAL/Events/WebCore/WK/BCPlatformWheelEventWK.h 2009-09-25 16:25:08.000000000 +0100
1310 +++ OWB-r1097.aros/BAL/Events/WebCore/WK/BCPlatformWheelEventWK.h 2018-06-13 07:27:37.570979727 +0100
1311 @@ -54,6 +54,10 @@
1312 class BMessage;
1313 #endif
1315 +#if PLATFORM(AROS)
1316 +struct IntuiMessage;
1317 +#endif
1319 namespace WebCore {
1321 class FloatPoint;
1322 @@ -129,6 +133,10 @@
1323 PlatformWheelEvent(BMessage*);
1324 #endif
1326 +#if PLATFORM(AROS)
1327 + PlatformWheelEvent(struct IntuiMessage*);
1328 +#endif
1330 protected:
1331 IntPoint m_position;
1332 IntPoint m_globalPosition;
1333 diff -ruN OWB-r1097/BAL/Facilities/WebCore/AROS/BCFileChooserAROS.cpp OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCFileChooserAROS.cpp
1334 --- OWB-r1097/BAL/Facilities/WebCore/AROS/BCFileChooserAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1335 +++ OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCFileChooserAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1336 @@ -0,0 +1,53 @@
1338 + * Copyright (C) 2009 Stanislaw Szymczyk
1339 + * Copyright (C) 2008 Pleyo. All rights reserved.
1341 + * Redistribution and use in source and binary forms, with or without
1342 + * modification, are permitted provided that the following conditions
1343 + * are met:
1345 + * 1. Redistributions of source code must retain the above copyright
1346 + * notice, this list of conditions and the following disclaimer.
1347 + * 2. Redistributions in binary form must reproduce the above copyright
1348 + * notice, this list of conditions and the following disclaimer in the
1349 + * documentation and/or other materials provided with the distribution.
1350 + * 3. Neither the name of Pleyo nor the names of
1351 + * its contributors may be used to endorse or promote products derived
1352 + * from this software without specific prior written permission.
1354 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1355 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1356 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1357 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1358 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1359 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1360 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1361 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1362 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1363 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1364 + */
1366 +#include "config.h"
1367 +#include "FileChooser.h"
1369 +#include "CString.h"
1370 +#include "Document.h"
1371 +#include "FrameView.h"
1372 +#include "Icon.h"
1373 +#include "LocalizedStrings.h"
1374 +#include "StringTruncator.h"
1376 +#include <cstdio>
1378 +namespace WebCore {
1380 +String FileChooser::basenameForWidth(const Font& font, int width) const
1382 + String name = fileButtonNoFileSelectedLabel();
1384 + if(m_filenames.size() > 0)
1385 + name = m_filenames[0];
1386 + return StringTruncator::rightTruncate(name, width, font, false);
1390 diff -ruN OWB-r1097/BAL/Facilities/WebCore/AROS/BCLanguageAROS.cpp OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCLanguageAROS.cpp
1391 --- OWB-r1097/BAL/Facilities/WebCore/AROS/BCLanguageAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1392 +++ OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCLanguageAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1393 @@ -0,0 +1,43 @@
1395 + * Copyright (C) 2008 Pleyo. All rights reserved.
1397 + * Redistribution and use in source and binary forms, with or without
1398 + * modification, are permitted provided that the following conditions
1399 + * are met:
1401 + * 1. Redistributions of source code must retain the above copyright
1402 + * notice, this list of conditions and the following disclaimer.
1403 + * 2. Redistributions in binary form must reproduce the above copyright
1404 + * notice, this list of conditions and the following disclaimer in the
1405 + * documentation and/or other materials provided with the distribution.
1406 + * 3. Neither the name of Pleyo nor the names of
1407 + * its contributors may be used to endorse or promote products derived
1408 + * from this software without specific prior written permission.
1410 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1411 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1412 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1413 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1414 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1415 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1416 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1417 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1418 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1419 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1420 + */
1422 +#include "config.h"
1423 +#include "Language.h"
1425 +#include "CString.h"
1426 +#include "PlatformString.h"
1429 +namespace WebCore {
1431 +String defaultLanguage()
1433 + return "en";
1437 diff -ruN OWB-r1097/BAL/Facilities/WebCore/AROS/BCLanguageAROS.h OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCLanguageAROS.h
1438 --- OWB-r1097/BAL/Facilities/WebCore/AROS/BCLanguageAROS.h 1970-01-01 01:00:00.000000000 +0100
1439 +++ OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCLanguageAROS.h 2018-06-13 07:27:37.570979727 +0100
1440 @@ -0,0 +1,40 @@
1442 + * Copyright (C) 2008 Pleyo. All rights reserved.
1444 + * Redistribution and use in source and binary forms, with or without
1445 + * modification, are permitted provided that the following conditions
1446 + * are met:
1448 + * 1. Redistributions of source code must retain the above copyright
1449 + * notice, this list of conditions and the following disclaimer.
1450 + * 2. Redistributions in binary form must reproduce the above copyright
1451 + * notice, this list of conditions and the following disclaimer in the
1452 + * documentation and/or other materials provided with the distribution.
1453 + * 3. Neither the name of Pleyo nor the names of
1454 + * its contributors may be used to endorse or promote products derived
1455 + * from this software without specific prior written permission.
1457 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1458 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1459 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1460 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1461 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1462 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1463 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1464 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1465 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1466 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1467 + */
1469 +#ifndef Language_h
1470 +#define Language_h
1472 +namespace WebCore {
1474 + class String;
1476 + String defaultLanguage();
1480 +#endif
1481 diff -ruN OWB-r1097/BAL/Facilities/WebCore/AROS/BCLoggingAROS.cpp OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCLoggingAROS.cpp
1482 --- OWB-r1097/BAL/Facilities/WebCore/AROS/BCLoggingAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1483 +++ OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCLoggingAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1484 @@ -0,0 +1,41 @@
1486 + * Copyright (C) 2008 Pleyo. All rights reserved.
1488 + * Redistribution and use in source and binary forms, with or without
1489 + * modification, are permitted provided that the following conditions
1490 + * are met:
1492 + * 1. Redistributions of source code must retain the above copyright
1493 + * notice, this list of conditions and the following disclaimer.
1494 + * 2. Redistributions in binary form must reproduce the above copyright
1495 + * notice, this list of conditions and the following disclaimer in the
1496 + * documentation and/or other materials provided with the distribution.
1497 + * 3. Neither the name of Pleyo nor the names of
1498 + * its contributors may be used to endorse or promote products derived
1499 + * from this software without specific prior written permission.
1501 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1502 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1503 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1504 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1505 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1506 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1507 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1508 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1509 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1510 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1511 + */
1513 +#include "config.h"
1514 +#include "Logging.h"
1516 +namespace WebCore {
1518 +void InitializeLoggingChannelsIfNecessary()
1520 + // FIXME: Add a way for the user to specify which
1521 + // logs he/she would like turned on.
1522 + LogNotYetImplemented.state = WTFLogChannelOn;
1525 +} // namespace WebCore
1526 diff -ruN OWB-r1097/BAL/Facilities/WebCore/AROS/BCMIMETypeRegistryAROS.cpp OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCMIMETypeRegistryAROS.cpp
1527 --- OWB-r1097/BAL/Facilities/WebCore/AROS/BCMIMETypeRegistryAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1528 +++ OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCMIMETypeRegistryAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1529 @@ -0,0 +1,75 @@
1531 + * Copyright (C) 2008 Pleyo. All rights reserved.
1533 + * Redistribution and use in source and binary forms, with or without
1534 + * modification, are permitted provided that the following conditions
1535 + * are met:
1537 + * 1. Redistributions of source code must retain the above copyright
1538 + * notice, this list of conditions and the following disclaimer.
1539 + * 2. Redistributions in binary form must reproduce the above copyright
1540 + * notice, this list of conditions and the following disclaimer in the
1541 + * documentation and/or other materials provided with the distribution.
1542 + * 3. Neither the name of Pleyo nor the names of
1543 + * its contributors may be used to endorse or promote products derived
1544 + * from this software without specific prior written permission.
1546 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1547 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1548 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1549 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1550 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1551 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1552 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1553 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1554 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1555 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1556 + */
1558 +#include "config.h"
1559 +#include "MIMETypeRegistry.h"
1561 +namespace WebCore {
1563 +struct ExtensionMap {
1564 + const char* extension;
1565 + const char* mimeType;
1568 +static const ExtensionMap extensionMap [] = {
1569 + { "bmp", "image/bmp" },
1570 + { "css", "text/css" },
1571 + { "gif", "image/gif" },
1572 + { "html", "text/html" },
1573 + { "ico", "image/x-icon" },
1574 + { "jpeg", "image/jpeg" },
1575 + { "jpg", "image/jpeg" },
1576 + { "js", "application/x-javascript" },
1577 + { "pdf", "application/pdf" },
1578 + { "png", "image/png" },
1579 + { "rss", "application/rss+xml" },
1580 + { "svg", "image/svg+xml" },
1581 + { "text", "text/plain" },
1582 + { "txt", "text/plain" },
1583 + { "xbm", "image/x-xbitmap" },
1584 + { "xml", "text/xml" },
1585 + { "xsl", "text/xsl" },
1586 + { "xhtml", "application/xhtml+xml" },
1587 + { "iff", "image/x-ilbm" },
1588 + { 0, 0 }
1591 +String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
1593 + String s = ext.lower();
1594 + const ExtensionMap *e = extensionMap;
1595 + while (e->extension) {
1596 + if (s == e->extension)
1597 + return e->mimeType;
1598 + ++e;
1601 + return String();
1605 diff -ruN OWB-r1097/BAL/Facilities/WebCore/AROS/BCSSLKeyGeneratorAROS.cpp OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCSSLKeyGeneratorAROS.cpp
1606 --- OWB-r1097/BAL/Facilities/WebCore/AROS/BCSSLKeyGeneratorAROS.cpp 1970-01-01 01:00:00.000000000 +0100
1607 +++ OWB-r1097.aros/BAL/Facilities/WebCore/AROS/BCSSLKeyGeneratorAROS.cpp 2018-06-13 07:27:37.570979727 +0100
1608 @@ -0,0 +1,53 @@
1610 + * Copyright (C) 2008 Pleyo. All rights reserved.
1612 + * Redistribution and use in source and binary forms, with or without
1613 + * modification, are permitted provided that the following conditions
1614 + * are met:
1616 + * 1. Redistributions of source code must retain the above copyright
1617 + * notice, this list of conditions and the following disclaimer.
1618 + * 2. Redistributions in binary form must reproduce the above copyright
1619 + * notice, this list of conditions and the following disclaimer in the
1620 + * documentation and/or other materials provided with the distribution.
1621 + * 3. Neither the name of Pleyo nor the names of
1622 + * its contributors may be used to endorse or promote products derived
1623 + * from this software without specific prior written permission.
1625 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
1626 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1627 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1628 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
1629 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1630 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
1631 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
1632 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1633 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1634 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1635 + */
1637 +#include "config.h"
1638 +#include "SSLKeyGenerator.h"
1640 +#include "NotImplemented.h"
1642 +namespace WebCore {
1644 +Vector<String> supportedKeySizes()
1646 + notImplemented();
1647 + return Vector<String>();
1650 +String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url)
1652 + return String();
1655 +void getSupportedKeySizes(Vector<String>&)
1657 + notImplemented();
1662 diff -ruN OWB-r1097/BAL/Facilities/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Facilities/WebCore/CMakeLists.txt
1663 --- OWB-r1097/BAL/Facilities/WebCore/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
1664 +++ OWB-r1097.aros/BAL/Facilities/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
1665 @@ -38,3 +38,9 @@
1667 aux_source_directory(${BAL_DIR}/Facilities/WebCore/SDL WEBCORE_SRC)
1668 endif(USE_GRAPHICS_SDL)
1670 +if(USE_GRAPHICS_AROS)
1671 + create_include_link(${BAL_DIR}/Facilities/WebCore/AROS BAL)
1673 + aux_source_directory(${BAL_DIR}/Facilities/WebCore/AROS WEBCORE_SRC)
1674 +endif(USE_GRAPHICS_AROS)
1675 diff -ruN OWB-r1097/BAL/Facilities/WebCore/WK/BCMIMETypeRegistryWK.cpp OWB-r1097.aros/BAL/Facilities/WebCore/WK/BCMIMETypeRegistryWK.cpp
1676 --- OWB-r1097/BAL/Facilities/WebCore/WK/BCMIMETypeRegistryWK.cpp 2009-09-15 07:54:14.000000000 +0100
1677 +++ OWB-r1097.aros/BAL/Facilities/WebCore/WK/BCMIMETypeRegistryWK.cpp 2018-06-13 07:27:37.570979727 +0100
1678 @@ -121,6 +121,9 @@
1679 "image/bmp",
1680 "image/vnd.microsoft.icon", // ico
1681 "image/x-icon", // ico
1682 +#if PLATFORM(AROS)
1683 + "image/x-ilbm",
1684 +#endif
1685 "image/x-xbitmap" // xbm
1687 for (size_t i = 0; i < sizeof(types) / sizeof(types[0]); ++i) {
1688 diff -ruN OWB-r1097/BAL/Filesystem/WebCore/Posix/BCFileSystemPosix.cpp OWB-r1097.aros/BAL/Filesystem/WebCore/Posix/BCFileSystemPosix.cpp
1689 --- OWB-r1097/BAL/Filesystem/WebCore/Posix/BCFileSystemPosix.cpp 2009-05-06 16:25:57.000000000 +0100
1690 +++ OWB-r1097.aros/BAL/Filesystem/WebCore/Posix/BCFileSystemPosix.cpp 2018-06-13 07:27:37.570979727 +0100
1691 @@ -128,7 +128,7 @@
1693 String pathByAppendingComponent(const String& path, const String& component)
1695 - if (path.endsWith("/"))
1696 + if (path.endsWith("/") || path.endsWith(":") || path.length() == 0)
1697 return path + component;
1698 else
1699 return path + "/" + component;
1700 diff -ruN OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontCacheFreetype.cpp OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontCacheFreetype.cpp
1701 --- OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontCacheFreetype.cpp 2009-06-05 14:35:11.000000000 +0100
1702 +++ OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontCacheFreetype.cpp 2018-06-13 07:27:37.570979727 +0100
1703 @@ -41,8 +41,13 @@
1705 void FontCache::platformInit()
1707 - if (!FontPlatformData::init())
1708 + if(!FontPlatformData::m_initialized)
1709 + FontPlatformData::m_initialized = FontPlatformData::init();
1711 + if (!FontPlatformData::m_initialized)
1713 ASSERT_NOT_REACHED();
1717 const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
1718 @@ -52,7 +57,10 @@
1719 FontPlatformData* prim = const_cast<FontPlatformData*>(&font.primaryFont()->m_platformData);
1721 if (!prim->m_fallbacks)
1723 prim->m_fallbacks = FcFontSort(NULL, prim->m_pattern, FcTrue, NULL, &fresult);
1724 + FontPlatformData::m_fontsets.insert(prim->m_fallbacks);
1727 FcFontSet* fs = prim->m_fallbacks;
1729 @@ -64,6 +72,7 @@
1730 FT_Face face;
1731 for (int i = 0; i < fs->nfont; i++) {
1732 FcPattern* fin = FcFontRenderPrepare(0, prim->m_pattern, fs->fonts[i]);
1733 + FontPlatformData::m_patterns.insert(fin);
1735 if (FcPatternGetString(fin, FC_FILE, 0, &fc_filename) != FcResultMatch)
1736 continue;
1737 @@ -75,9 +84,10 @@
1739 if (FT_Error error = FT_New_Face(library, filename, id, &face))
1740 continue;
1741 + FontPlatformData::m_faces.insert(face);
1743 // FIXME: is it really necessary ?
1744 - FT_Set_Pixel_Sizes(face, 0, static_cast<uint> (font.fontDescription().computedSize()));
1745 + FT_Set_Pixel_Sizes(face, 0, static_cast<unsigned int> (font.fontDescription().computedSize()));
1747 FontPlatformData alternateFont(face, font.fontDescription().computedPixelSize(), false, false);
1748 // FIXME: FT_Done_Face(face); we should clean the face correctly the FT_Face but we can't do that here...
1749 diff -ruN OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontFreetype.cpp OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontFreetype.cpp
1750 --- OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontFreetype.cpp 2009-06-05 14:35:11.000000000 +0100
1751 +++ OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontFreetype.cpp 2018-06-13 07:27:37.570979727 +0100
1752 @@ -55,7 +55,7 @@
1753 Uint32 rmask, gmask, bmask, amask;
1754 // SDL interprets each pixel as a 32-bit number, so our masks must depend
1755 // on the endianness (byte order) of the machine
1756 -#if !PLATFORM(AMIGAOS4) && SDL_BYTEORDER == SDL_BIG_ENDIAN
1757 +#if !PLATFORM(AMIGAOS4) && !PLATFORM(AROS) && SDL_BYTEORDER == SDL_BIG_ENDIAN
1758 rmask = 0xff000000;
1759 gmask = 0x00ff0000;
1760 bmask = 0x0000ff00;
1761 @@ -200,7 +200,7 @@
1762 SDL_Surface* img;
1763 Uint32 rmask, gmask, bmask, amask;
1765 -#if !PLATFORM(AMIGAOS4) && SDL_BYTEORDER == SDL_BIG_ENDIAN
1766 +#if !PLATFORM(AMIGAOS4) && !PLATFORM(AROS) && SDL_BYTEORDER == SDL_BIG_ENDIAN
1767 rmask = 0xff000000;
1768 gmask = 0x00ff0000;
1769 bmask = 0x0000ff00;
1770 @@ -212,7 +212,7 @@
1771 amask = 0xff000000;
1772 #endif
1774 - img = SDL_CreateRGBSurface(SDL_HWSURFACE | SDL_SRCALPHA, width, height,
1775 + img = SDL_CreateRGBSurface(SDL_SRCALPHA, width, height,
1776 32, rmask, gmask, bmask, amask);
1777 //the surface can be null if the width or the height are too big, it's a sdl limitation.
1778 if (!img) {
1779 diff -ruN OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.cpp OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.cpp
1780 --- OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.cpp 2009-07-27 12:56:09.000000000 +0100
1781 +++ OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.cpp 2018-06-13 07:27:37.570979727 +0100
1782 @@ -34,6 +34,7 @@
1783 #include "FontDescription.h"
1784 #include <ft2build.h>
1785 #include FT_FREETYPE_H
1786 +#include <aros/debug.h>
1788 #include <fontconfig/fontconfig.h>
1790 @@ -42,6 +43,10 @@
1791 namespace WebCore {
1792 FT_Library FontPlatformData::m_library = 0;
1794 +std::set<FT_Face> FontPlatformData::m_faces;
1795 +std::set<FcPattern*> FontPlatformData::m_patterns;
1796 +std::set<FcFontSet*> FontPlatformData::m_fontsets;
1798 FontPlatformData::FontPlatformData(const FontDescription& fontDescription, const AtomicString& familyName)
1799 : m_pattern(0)
1800 , m_fallbacks(0)
1801 @@ -51,7 +56,8 @@
1802 , m_scaledFont(0)
1803 , m_face(0)
1805 - FontPlatformData::init();
1806 + if(!m_initialized)
1807 + m_initialized = FontPlatformData::init();
1809 CString familyNameString = familyName.string().utf8();
1810 const char* fcfamily = familyNameString.data();
1811 @@ -106,7 +112,7 @@
1813 FcResult fcresult;
1814 m_pattern = FcFontMatch(config, pattern, &fcresult);
1815 - FcPatternReference(m_pattern);
1816 + m_patterns.insert(m_pattern);
1817 // FIXME: should we set some default font?
1818 if (!m_pattern)
1819 goto freePattern;
1820 @@ -135,6 +141,7 @@
1821 m_face = 0;
1822 goto freePattern;
1824 + m_faces.insert(m_face);
1826 FT_Set_Pixel_Sizes(m_face, 0, static_cast<unsigned int> (fontDescription.computedSize()));
1827 //DBGML(MODULE_FONTS, LEVEL_INFO, "open font %s with size %d\n", filename, static_cast<uint> (fontDescription.specifiedSize()));
1828 @@ -151,6 +158,7 @@
1829 , m_syntheticBold(bold)
1830 , m_syntheticOblique(italic)
1831 , m_scaledFont(0)
1832 + , m_face(0)
1836 @@ -165,6 +173,8 @@
1837 m_face = fontFace;
1840 +bool FontPlatformData::m_initialized = false;
1842 bool FontPlatformData::init()
1844 static bool initialized = false;
1845 @@ -184,9 +194,33 @@
1846 return false;
1848 initialized = true;
1850 + atexit(FontPlatformData::destroy);
1852 return true;
1855 +void FontPlatformData::destroy()
1857 + for(std::set<FT_Face>::iterator it = m_faces.begin(); it != m_faces.end(); it++)
1859 + FT_Done_Face(*it);
1861 + for(std::set<FcFontSet*>::iterator it = m_fontsets.begin(); it != m_fontsets.end(); it++)
1863 + FcFontSetDestroy(*it);
1865 + for(std::set<FcPattern*>::iterator it = m_patterns.begin(); it != m_patterns.end(); it++)
1867 + FcPatternDestroy(*it);
1869 + if(m_initialized)
1871 + FT_Done_FreeType(m_library);
1872 + FcFini();
1876 FontPlatformData::~FontPlatformData()
1879 diff -ruN OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.h OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.h
1880 --- OWB-r1097/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.h 2009-07-27 12:56:09.000000000 +0100
1881 +++ OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCFontPlatformDataFreetype.h 2018-06-13 07:27:37.570979727 +0100
1882 @@ -31,6 +31,8 @@
1883 #include "GlyphBuffer.h"
1884 #include "FontDescription.h"
1885 #include "BALBase.h"
1886 +#include <set>
1887 +#include <fontconfig/fontconfig.h>
1889 typedef struct FT_FaceRec_* FT_Face;
1890 typedef struct FT_LibraryRec_ *FT_Library;
1891 @@ -60,6 +62,7 @@
1892 ~FontPlatformData();
1894 static bool init();
1895 + static void destroy();
1897 bool isFixedPitch();
1898 float size() const { return m_size; }
1899 @@ -89,6 +92,10 @@
1900 BalScaledFont* m_scaledFont;
1901 FT_Face m_face;
1902 static FT_Library m_library;
1903 + static bool m_initialized;
1904 + static std::set<FT_Face> m_faces;
1905 + static std::set<FcPattern*> m_patterns;
1906 + static std::set<FcFontSet*> m_fontsets;
1907 private:
1908 static BalPattern *hashTableDeletedFontValue() { return reinterpret_cast<BalPattern*>(-1); }
1910 diff -ruN OWB-r1097/BAL/Fonts/WebCore/Freetype/BCSimpleFontDataFreetype.cpp OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCSimpleFontDataFreetype.cpp
1911 --- OWB-r1097/BAL/Fonts/WebCore/Freetype/BCSimpleFontDataFreetype.cpp 2009-06-05 14:35:11.000000000 +0100
1912 +++ OWB-r1097.aros/BAL/Fonts/WebCore/Freetype/BCSimpleFontDataFreetype.cpp 2018-06-13 07:27:37.570979727 +0100
1913 @@ -72,11 +72,13 @@
1914 void SimpleFontData::platformDestroy()
1916 if (m_platformData.m_pattern && ((FcPattern*)-1 != m_platformData.m_pattern)) {
1917 + FontPlatformData::m_patterns.erase(m_platformData.m_pattern);
1918 FcPatternDestroy(m_platformData.m_pattern);
1919 m_platformData.m_pattern = 0;
1922 if (m_platformData.m_fallbacks) {
1923 + FontPlatformData::m_fontsets.erase(m_platformData.m_fallbacks);
1924 FcFontSetDestroy(m_platformData.m_fallbacks);
1925 m_platformData.m_fallbacks = 0;
1927 diff -ruN OWB-r1097/BAL/Fonts/WebCore/WK/BCFontCacheWK.h OWB-r1097.aros/BAL/Fonts/WebCore/WK/BCFontCacheWK.h
1928 --- OWB-r1097/BAL/Fonts/WebCore/WK/BCFontCacheWK.h 2009-09-21 15:00:57.000000000 +0100
1929 +++ OWB-r1097.aros/BAL/Fonts/WebCore/WK/BCFontCacheWK.h 2018-06-13 07:27:37.570979727 +0100
1930 @@ -92,9 +92,10 @@
1931 size_t inactiveFontDataCount();
1932 void purgeInactiveFontData(int count = INT_MAX);
1934 + ~FontCache();
1935 + void platformDestroy();
1936 private:
1937 FontCache();
1938 - ~FontCache();
1940 // These methods are implemented by each platform.
1941 FontPlatformData* getSimilarFontPlatformData(const Font&);
1942 diff -ruN OWB-r1097/BAL/Geolocation/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Geolocation/WebCore/CMakeLists.txt
1943 --- OWB-r1097/BAL/Geolocation/WebCore/CMakeLists.txt 2009-09-16 16:49:28.000000000 +0100
1944 +++ OWB-r1097.aros/BAL/Geolocation/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
1945 @@ -16,4 +16,9 @@
1946 create_include_link(${BAL_DIR}/Geolocation/WebCore/Mock BAL)
1947 aux_source_directory(${BAL_DIR}/Geolocation/WebCore/Mock WEBCORE_SRC)
1948 endif(USE_GRAPHICS_SDL)
1950 + if(USE_GRAPHICS_AROS)
1951 + create_include_link(${BAL_DIR}/Geolocation/WebCore/SDL BAL)
1952 + aux_source_directory(${BAL_DIR}/Geolocation/WebCore/SDL WEBCORE_SRC)
1953 + endif(USE_GRAPHICS_AROS)
1954 endif(ENABLE_GEOLOCATION)
1955 diff -ruN OWB-r1097/BAL/Graphics/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Graphics/WebCore/CMakeLists.txt
1956 --- OWB-r1097/BAL/Graphics/WebCore/CMakeLists.txt 2009-10-14 14:25:22.000000000 +0100
1957 +++ OWB-r1097.aros/BAL/Graphics/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
1958 @@ -26,11 +26,11 @@
1959 aux_source_directory(${GRAPHICS_DIR}/Qt WEBCORE_SRC)
1960 endif(USE_GRAPHICS_QT)
1962 -if(USE_GRAPHICS_SDL)
1963 +if(USE_GRAPHICS_SDL OR USE_GRAPHICS_AROS)
1964 create_include_link(${GRAPHICS_DIR}/SDL BAL)
1966 aux_source_directory(${GRAPHICS_DIR}/SDL WEBCORE_SRC)
1967 -endif(USE_GRAPHICS_SDL)
1968 +endif(USE_GRAPHICS_SDL OR USE_GRAPHICS_AROS)
1971 if(ENABLE_FILTERS)
1972 diff -ruN OWB-r1097/BAL/Graphics/WebCore/SDL/BCApplyTransparencySDL.h OWB-r1097.aros/BAL/Graphics/WebCore/SDL/BCApplyTransparencySDL.h
1973 --- OWB-r1097/BAL/Graphics/WebCore/SDL/BCApplyTransparencySDL.h 2009-02-11 16:41:27.000000000 +0000
1974 +++ OWB-r1097.aros/BAL/Graphics/WebCore/SDL/BCApplyTransparencySDL.h 2018-06-13 07:27:37.570979727 +0100
1975 @@ -39,7 +39,7 @@
1976 Uint32 rmask, gmask, bmask, amask;
1977 /* SDL interprets each pixel as a 32-bit number, so our masks must depend
1978 on the endianness (byte order) of the machine */
1979 -#if !PLATFORM(AMIGAOS4) && SDL_BYTEORDER == SDL_BIG_ENDIAN
1980 +#if !PLATFORM(AMIGAOS4) && !PLATFORM(AROS) && SDL_BYTEORDER == SDL_BIG_ENDIAN
1981 rmask = 0xff000000;
1982 gmask = 0x00ff0000;
1983 bmask = 0x0000ff00;
1984 @@ -56,6 +56,7 @@
1985 SDL_LockSurface(origin);
1986 memcpy(data, origin->pixels, sizeof(uint32_t) * height * width);
1987 final = SDL_CreateRGBSurfaceFrom(data, origin->w, origin->h, 32, origin->pitch, rmask, gmask, bmask, amask);
1988 + final->flags &= ~SDL_PREALLOC;
1989 SDL_UnlockSurface(origin);
1990 SDL_LockSurface(final);
1991 uint32_t alpha = 0;
1992 diff -ruN OWB-r1097/BAL/ImageDecoder/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/ImageDecoder/WebCore/CMakeLists.txt
1993 --- OWB-r1097/BAL/ImageDecoder/WebCore/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
1994 +++ OWB-r1097.aros/BAL/ImageDecoder/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
1995 @@ -35,3 +35,10 @@
1996 aux_source_directory(${BAL_DIR}/ImageDecoder/WebCore/WK WEBCORE_SRC)
1997 aux_source_directory(${BAL_DIR}/ImageDecoder/WebCore/SDL WEBCORE_SRC)
1998 endif(USE_GRAPHICS_SDL)
2000 +if(USE_GRAPHICS_AROS)
2001 + create_include_link(${BAL_DIR}/ImageDecoder/WebCore/Datatype/WK BAL)
2002 + aux_source_directory(${BAL_DIR}/ImageDecoder/WebCore/WK WEBCORE_SRC)
2003 + aux_source_directory(${BAL_DIR}/ImageDecoder/WebCore/SDL WEBCORE_SRC)
2004 + aux_source_directory(${BAL_DIR}/ImageDecoder/WebCore/Datatype/WK WEBCORE_SRC)
2005 +endif(USE_GRAPHICS_AROS)
2006 diff -ruN OWB-r1097/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.cpp OWB-r1097.aros/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.cpp
2007 --- OWB-r1097/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.cpp 1970-01-01 01:00:00.000000000 +0100
2008 +++ OWB-r1097.aros/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.cpp 2018-06-13 07:27:37.570979727 +0100
2009 @@ -0,0 +1,154 @@
2011 + * Copyright (C) 2009 Stanislaw Szymczyk.
2013 + * Redistribution and use in source and binary forms, with or without
2014 + * modification, are permitted provided that the following conditions
2015 + * are met:
2017 + * 1. Redistributions of source code must retain the above copyright
2018 + * notice, this list of conditions and the following disclaimer.
2019 + * 2. Redistributions in binary form must reproduce the above copyright
2020 + * notice, this list of conditions and the following disclaimer in the
2021 + * documentation and/or other materials provided with the distribution.
2022 + * 3. Neither the name of Pleyo nor the names of
2023 + * its contributors may be used to endorse or promote products derived
2024 + * from this software without specific prior written permission.
2026 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
2027 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2028 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2029 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
2030 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2031 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2032 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2033 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2034 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2035 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2036 + */
2038 +#include "config.h"
2039 +#include "DatatypeImageDecoder.h"
2041 +#if PLATFORM(AROS)
2043 +extern "C" {
2044 +#include <datatypes/datatypes.h>
2045 +#include <datatypes/pictureclass.h>
2046 +#include <proto/datatypes.h>
2047 +#include <proto/intuition.h>
2048 +#include <proto/dos.h>
2049 +#include <proto/alib.h>
2050 +#include <aros/debug.h>
2051 +#include <stdlib.h>
2052 +#include <string.h>
2055 +namespace WebCore
2058 +DatatypeImageDecoder::DatatypeImageDecoder(String filenameExtension) : m_dataFile(NULL), m_filenameExtension(filenameExtension)
2060 + m_dataFileName = (char*) "T:OWB_DatatypeImageXXXXXX";
2061 + m_dataFileName = mktemp(m_dataFileName);
2062 + if (m_dataFileName[0])
2064 + m_dataFile = Open(m_dataFileName, MODE_READWRITE);
2066 + m_frameBufferCache.resize(1);
2069 +DatatypeImageDecoder::~DatatypeImageDecoder()
2071 + if (m_dataFile)
2073 + Close(m_dataFile);
2074 + if (strncmp(m_dataFileName, "T:OWB_DatatypeImage", strlen("T:OWB_DatatypeImage")) == 0)
2076 + /* Make absolutely sure we won't delete something else */
2077 + DeleteFile(m_dataFileName);
2082 +void DatatypeImageDecoder::setData(SharedBuffer* data, bool allDataReceived)
2084 + if (!allDataReceived || !m_dataFile)
2085 + return;
2087 + if (SetFileSize(m_dataFile, 0, OFFSET_BEGINNING) == -1)
2088 + return;
2090 + if (Write(m_dataFile, data->data(), data->size()) == (LONG) data->size())
2092 + if (Seek(m_dataFile, 0, OFFSET_BEGINNING) != -1)
2094 + Object *dto = NewDTObject(m_dataFileName,
2095 + DTA_GroupID, GID_PICTURE,
2096 + PDTA_DestMode, PMODE_V43,
2097 + TAG_DONE);
2098 + if (dto)
2100 + struct BitMapHeader *bitmapHeader = NULL;
2101 + struct pdtBlitPixelArray pixelsetup;
2102 + GetDTAttrs(dto, PDTA_BitMapHeader, &bitmapHeader, TAG_DONE);
2103 + APTR dst = AllocVec(4 * bitmapHeader->bmh_Width * bitmapHeader->bmh_Height, MEMF_ANY);
2105 + if(dst)
2107 + setSize(bitmapHeader->bmh_Width, bitmapHeader->bmh_Height);
2109 + RGBA32Buffer& buffer = m_frameBufferCache[0];
2110 + // Let's resize our buffer now to the correct width/height.
2111 + buffer.setSize(bitmapHeader->bmh_Width, bitmapHeader->bmh_Height);
2113 + pixelsetup.MethodID = PDTM_READPIXELARRAY;
2114 + pixelsetup.pbpa_PixelData = dst;
2115 + pixelsetup.pbpa_PixelFormat = PBPAFMT_RGBA;
2116 + pixelsetup.pbpa_PixelArrayMod = bitmapHeader->bmh_Width * 4;
2117 + pixelsetup.pbpa_Left = 0;
2118 + pixelsetup.pbpa_Top = 0;
2119 + pixelsetup.pbpa_Width = bitmapHeader->bmh_Width;
2120 + pixelsetup.pbpa_Height = bitmapHeader->bmh_Height;
2122 + DoMethodA(dto, (Msg) &pixelsetup);
2124 + unsigned char *data = (unsigned char*) dst;
2125 + for (unsigned y = 0; y < bitmapHeader->bmh_Height; y++)
2127 + for (unsigned x = 0; x < bitmapHeader->bmh_Width; x++)
2129 + unsigned red = *data++;
2130 + unsigned green = *data++;
2131 + unsigned blue = *data++;
2132 + unsigned alpha = 0xff; data++;
2133 + buffer.setRGBA(x, y, red, green, blue, alpha);
2136 + // Update our status to be complete.
2137 + buffer.setStatus(RGBA32Buffer::FrameComplete);
2139 + FreeVec(dst);
2141 + DisposeDTObject(dto);
2147 +RGBA32Buffer* DatatypeImageDecoder::frameBufferAtIndex(size_t index)
2149 + if (index)
2150 + return 0;
2152 + RGBA32Buffer& frame = m_frameBufferCache[0];
2153 + if (frame.status() == RGBA32Buffer::FrameComplete)
2155 + return &frame;
2158 + return 0;
2163 +#endif // PLATFORM(AROS)
2164 diff -ruN OWB-r1097/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.h OWB-r1097.aros/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.h
2165 --- OWB-r1097/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.h 1970-01-01 01:00:00.000000000 +0100
2166 +++ OWB-r1097.aros/BAL/ImageDecoder/WebCore/Datatype/WK/BCDatatypeImageDecoderWK.h 2018-06-13 07:27:37.570979727 +0100
2167 @@ -0,0 +1,64 @@
2169 + * Copyright (C) 2009 Stanislaw Szymczyk.
2170 + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
2172 + * Redistribution and use in source and binary forms, with or without
2173 + * modification, are permitted provided that the following conditions
2174 + * are met:
2176 + * 1. Redistributions of source code must retain the above copyright
2177 + * notice, this list of conditions and the following disclaimer.
2178 + * 2. Redistributions in binary form must reproduce the above copyright
2179 + * notice, this list of conditions and the following disclaimer in the
2180 + * documentation and/or other materials provided with the distribution.
2181 + * 3. Neither the name of Pleyo nor the names of
2182 + * its contributors may be used to endorse or promote products derived
2183 + * from this software without specific prior written permission.
2185 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
2186 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2187 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2188 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
2189 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2190 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2191 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2192 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2193 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2194 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2195 + */
2197 +#ifndef DATATYPE_DECODER_H_
2198 +#define DATATYPE_DECODER_H_
2200 +#include "ImageDecoder.h"
2202 +extern "C" {
2203 +#include <dos/bptr.h>
2206 +namespace WebCore {
2208 +class DatatypeImageReader;
2210 +// This class decodes images using the picture datatype.
2211 +class DatatypeImageDecoder : public ImageDecoder
2213 +public:
2214 + DatatypeImageDecoder(String filenameExtension);
2215 + ~DatatypeImageDecoder();
2217 + virtual String filenameExtension() const { return m_filenameExtension; }
2219 + virtual void setData(SharedBuffer* data, bool allDataReceived);
2221 + virtual RGBA32Buffer* frameBufferAtIndex(size_t index);
2222 +private:
2223 + /* Handle of the temporary file containing the image data to be decoded */
2224 + char *m_dataFileName;
2225 + BPTR m_dataFile;
2226 + String m_filenameExtension;
2231 +#endif
2232 diff -ruN OWB-r1097/BAL/ImageDecoder/WebCore/PNG/WK/BCPNGImageDecoderWK.cpp OWB-r1097.aros/BAL/ImageDecoder/WebCore/PNG/WK/BCPNGImageDecoderWK.cpp
2233 --- OWB-r1097/BAL/ImageDecoder/WebCore/PNG/WK/BCPNGImageDecoderWK.cpp 2009-08-19 12:59:14.000000000 +0100
2234 +++ OWB-r1097.aros/BAL/ImageDecoder/WebCore/PNG/WK/BCPNGImageDecoderWK.cpp 2018-06-13 07:27:37.570979727 +0100
2235 @@ -100,7 +100,7 @@
2236 m_decodingSizeOnly = sizeOnly;
2238 // We need to do the setjmp here. Otherwise bad things will happen
2239 - if (setjmp(m_png->jmpbuf)) {
2240 + if (setjmp(png_jmpbuf(m_png))) {
2241 close();
2242 return;
2244 @@ -201,7 +201,7 @@
2245 void decodingFailed(png_structp png, png_const_charp errorMsg)
2247 static_cast<PNGImageDecoder*>(png_get_progressive_ptr(png))->decodingFailed();
2248 - longjmp(png->jmpbuf, 1);
2249 + png_longjmp(png, 1);
2252 void decodingWarning(png_structp png, png_const_charp warningMsg)
2253 @@ -226,13 +226,13 @@
2255 png_structp png = reader()->pngPtr();
2256 png_infop info = reader()->infoPtr();
2257 - png_uint_32 width = png->width;
2258 - png_uint_32 height = png->height;
2259 + png_uint_32 width = png_get_image_width(png, info);
2260 + png_uint_32 height = png_get_image_height(png, info);
2262 // Protect against large images.
2263 - if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
2264 + if (width > cMaxPNGSize || height > cMaxPNGSize) {
2265 m_failed = true;
2266 - longjmp(png->jmpbuf, 1);
2267 + png_longjmp(png, 1);
2268 return;
2271 @@ -240,7 +240,7 @@
2272 if (!ImageDecoder::isSizeAvailable()) {
2273 if (!setSize(width, height)) {
2274 // Size unreasonable, bail out.
2275 - longjmp(png->jmpbuf, 1);
2276 + png_longjmp(png, 1);
2277 return;
2279 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
2280 @@ -296,11 +296,9 @@
2282 reader()->setHasAlpha(channels == 4);
2284 - if (reader()->decodingSizeOnly()) {
2285 + if (reader()->decodingSizeOnly())
2286 // If we only needed the size, halt the reader.
2287 - reader()->setReadOffset(m_data->size() - png->buffer_size);
2288 - png->buffer_size = 0;
2290 + reader()->setReadOffset(m_data->size() - png_process_data_pause(png, 0));
2293 void rowAvailable(png_structp png, png_bytep rowBuffer,
2294 @@ -326,7 +324,7 @@
2295 #endif
2296 if (!buffer.setSize(width, height)) {
2297 static_cast<PNGImageDecoder*>(png_get_progressive_ptr(reader()->pngPtr()))->decodingFailed();
2298 - longjmp(reader()->pngPtr()->jmpbuf, 1);
2299 + png_longjmp(reader()->pngPtr(), 1);
2300 return;
2302 buffer.setStatus(RGBA32Buffer::FramePartial);
2303 @@ -335,7 +333,7 @@
2304 // For PNGs, the frame always fills the entire image.
2305 buffer.setRect(IntRect(IntPoint(), size()));
2307 - if (reader()->pngPtr()->interlaced)
2308 + if (png_get_interlace_type(reader()->pngPtr(), reader()->infoPtr()))
2309 reader()->createInterlaceBuffer((reader()->hasAlpha() ? 4 : 3) * size().width() * size().height());
2312 diff -ruN OWB-r1097/BAL/ImageDecoder/WebCore/SDL/BCImageDecoderSDL.cpp OWB-r1097.aros/BAL/ImageDecoder/WebCore/SDL/BCImageDecoderSDL.cpp
2313 --- OWB-r1097/BAL/ImageDecoder/WebCore/SDL/BCImageDecoderSDL.cpp 2009-08-31 11:33:08.000000000 +0100
2314 +++ OWB-r1097.aros/BAL/ImageDecoder/WebCore/SDL/BCImageDecoderSDL.cpp 2018-06-13 07:27:37.570979727 +0100
2315 @@ -35,7 +35,7 @@
2316 Uint32 rmask, gmask, bmask, amask;
2317 /* SDL interprets each pixel as a 32-bit number, so our masks must depend
2318 on the endianness (byte order) of the machine */
2319 -#if !PLATFORM(AMIGAOS4) && SDL_BYTEORDER == SDL_BIG_ENDIAN
2320 +#if !PLATFORM(AMIGAOS4) && !PLATFORM(AROS) && SDL_BYTEORDER == SDL_BIG_ENDIAN
2321 rmask = 0xff000000;
2322 gmask = 0x00ff0000;
2323 bmask = 0x0000ff00;
2324 diff -ruN OWB-r1097/BAL/ImageDecoder/WebCore/WK/BCImageDecoderWK.cpp OWB-r1097.aros/BAL/ImageDecoder/WebCore/WK/BCImageDecoderWK.cpp
2325 --- OWB-r1097/BAL/ImageDecoder/WebCore/WK/BCImageDecoderWK.cpp 2009-08-31 11:33:08.000000000 +0100
2326 +++ OWB-r1097.aros/BAL/ImageDecoder/WebCore/WK/BCImageDecoderWK.cpp 2018-06-13 07:27:37.570979727 +0100
2327 @@ -21,6 +21,7 @@
2328 #include "config.h"
2330 #include "ImageDecoder.h"
2331 +#include "Settings.h"
2333 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
2334 #include <algorithm>
2335 @@ -33,6 +34,7 @@
2336 #include "PNGImageDecoder.h"
2337 #include "SharedBuffer.h"
2338 #include "XBMImageDecoder.h"
2339 +#include "DatatypeImageDecoder.h"
2341 namespace WebCore {
2343 @@ -48,24 +50,45 @@
2345 // GIFs begin with GIF8(7 or 9).
2346 if (strncmp(contents, "GIF8", 4) == 0)
2347 - return new GIFImageDecoder();
2349 + if(Settings::decodesGIFWithDatatypes())
2350 + return new DatatypeImageDecoder("gif");
2351 + else
2352 + return new GIFImageDecoder();
2355 // Test for PNG.
2356 if (uContents[0]==0x89 &&
2357 uContents[1]==0x50 &&
2358 uContents[2]==0x4E &&
2359 uContents[3]==0x47)
2360 - return new PNGImageDecoder();
2362 + if(Settings::decodesPNGWithDatatypes())
2363 + return new DatatypeImageDecoder("png");
2364 + else
2365 + return new PNGImageDecoder();
2368 // JPEG
2369 if (uContents[0]==0xFF &&
2370 uContents[1]==0xD8 &&
2371 uContents[2]==0xFF)
2372 - return new JPEGImageDecoder();
2374 + if(Settings::decodesJPGWithDatatypes())
2375 + return new DatatypeImageDecoder("jpg");
2376 + else
2377 + return new JPEGImageDecoder();
2380 // BMP
2381 if (strncmp(contents, "BM", 2) == 0)
2382 - return new BMPImageDecoder();
2383 + if (strncmp(contents, "BM", 2) == 0)
2385 + if(Settings::decodesBMPWithDatatypes())
2386 + return new DatatypeImageDecoder("bmp");
2387 + else
2388 + return new BMPImageDecoder();
2391 // ICOs always begin with a 2-byte 0 followed by a 2-byte 1.
2392 // CURs begin with 2-byte 0 followed by 2-byte 2.
2393 @@ -77,6 +100,10 @@
2394 if (length >= 8 && strncmp(contents, "#define ", 8) == 0)
2395 return new XBMImageDecoder();
2397 + // IFF/ILBM
2398 + if (length >= 12 && strncmp(contents, "FORM", 4) == 0 && strncmp(&contents[8], "ILBM", 4) == 0)
2399 + return new DatatypeImageDecoder("iff");
2401 // Give up. We don't know what the heck this is.
2402 return 0;
2404 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.cpp OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.cpp
2405 --- OWB-r1097/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.cpp 1970-01-01 01:00:00.000000000 +0100
2406 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.cpp 2018-06-13 07:27:37.570979727 +0100
2407 @@ -0,0 +1,420 @@
2409 + * Copyright (C) 2009 Stanislaw Szymczyk
2410 + * Copyright (C) 2008 Pleyo. All rights reserved.
2412 + * Redistribution and use in source and binary forms, with or without
2413 + * modification, are permitted provided that the following conditions
2414 + * are met:
2416 + * 1. Redistributions of source code must retain the above copyright
2417 + * notice, this list of conditions and the following disclaimer.
2418 + * 2. Redistributions in binary form must reproduce the above copyright
2419 + * notice, this list of conditions and the following disclaimer in the
2420 + * documentation and/or other materials provided with the distribution.
2421 + * 3. Neither the name of Pleyo nor the names of
2422 + * its contributors may be used to endorse or promote products derived
2423 + * from this software without specific prior written permission.
2425 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
2426 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2427 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2428 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
2429 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2430 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2431 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2432 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2433 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2434 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2435 + */
2437 +#include "config.h"
2439 +#include "LocalizedStrings.h"
2440 +#include "PlatformString.h"
2442 +#include <exec/types.h>
2443 +#include <proto/codesets.h>
2444 +#include <libraries/codesets.h>
2445 +#include <proto/locale.h>
2446 +#define CATCOMP_NUMBERS
2447 +#define CATCOMP_ARRAY
2448 +#include "strings.h"
2451 +#define CATALOG_NAME "owb.catalog"
2452 +#define CATALOG_VERSION 3
2454 +struct Catalog *catalog;
2456 +const char* _(ULONG id)
2458 + static char string[256];
2459 + const char *catalogString;
2460 + if (LocaleBase != NULL && catalog != NULL)
2462 + catalogString = GetCatalogStr(catalog, id, CatCompArray[id].cca_Str);
2464 + else
2466 + catalogString = CatCompArray[id].cca_Str;
2468 + struct codeset *utfCodeset = CodesetsFindA("UTF-8", NULL);
2469 + if(utfCodeset)
2471 + char *stringConverted = CodesetsConvertStr(CSA_Source, (IPTR) catalogString, (IPTR) CSA_DestCodeset, (IPTR) utfCodeset, TAG_END);
2472 + if(stringConverted)
2474 + strncpy(string, stringConverted, sizeof(string));
2475 + CodesetsFreeA(stringConverted, NULL);
2476 + return (const char*) string;
2480 + return (const char*) catalogString;
2483 +static void __attribute__ ((constructor)) Locale_Initialize()
2485 + if (LocaleBase != NULL)
2487 + catalog = OpenCatalog(NULL, CATALOG_NAME, OC_Version, CATALOG_VERSION, TAG_DONE);
2489 + else
2491 + catalog = NULL;
2495 +static void __attribute__ ((destructor)) Locale_Deinitialize()
2497 + if(LocaleBase != NULL && catalog != NULL)
2498 + CloseCatalog(catalog);
2501 +namespace WebCore {
2504 +String submitButtonDefaultLabel()
2506 + return String::fromUTF8(_(MSG_SubmitButtonDefaultLabel));
2509 +String inputElementAltText()
2511 + return String::fromUTF8(_(MSG_InputElementAltText));
2514 +String resetButtonDefaultLabel()
2516 + return String::fromUTF8(_(MSG_ResetButtonDefaultLabel));
2519 +String searchableIndexIntroduction()
2521 + return String::fromUTF8(_(MSG_SearchableIndexIntroduction));
2524 +String fileButtonChooseFileLabel()
2526 + return String::fromUTF8(_(MSG_FileButtonChooseFileLabel));
2529 +String fileButtonNoFileSelectedLabel()
2531 + return String::fromUTF8(_(MSG_FileButtonNoFileSelectedLabel));
2534 +String contextMenuItemTagOpenLinkInNewWindow()
2536 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenLinkInNewWindow));
2539 +String contextMenuItemTagOpenLinkInNewTab()
2541 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenLinkInNewTab));
2544 +String contextMenuItemTagDownloadLinkToDisk()
2546 + return String::fromUTF8(_(MSG_ContextMenuItemTagDownloadLinkToDisk));
2549 +String contextMenuItemTagCopyLinkToClipboard()
2551 + return String::fromUTF8(_(MSG_ContextMenuItemTagCopyLinkToClipboard));
2554 +String contextMenuItemTagOpenImageInNewWindow()
2556 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenImageInNewWindow));
2559 +String contextMenuItemTagOpenImageInNewTab()
2561 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenImageInNewTab));
2564 +String contextMenuItemTagDownloadImageToDisk()
2566 + return String::fromUTF8(_(MSG_ContextMenuItemTagDownloadImageToDisk));
2569 +String contextMenuItemTagCopyImageToClipboard()
2571 + return String::fromUTF8(_(MSG_ContextMenuItemTagCopyImageToClipboard));
2574 +String contextMenuItemTagOpenFrameInNewWindow()
2576 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenFrameInNewWindow));
2579 +String contextMenuItemTagOpenFrameInNewTab()
2581 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenFrameInNewTab));
2584 +String contextMenuItemTagCopy()
2586 + return String::fromUTF8(_(MSG_ContextMenuItemTagCopy));
2589 +String contextMenuItemTagDelete()
2591 + return String::fromUTF8(_(MSG_ContextMenuItemTagDelete));
2594 +String contextMenuItemTagSelectAll()
2596 + return String::fromUTF8(_(MSG_ContextMenuItemTagSelectAll));
2599 +String contextMenuItemTagUnicode()
2601 + return String::fromUTF8(_(MSG_ContextMenuItemTagUnicode));
2604 +String contextMenuItemTagInputMethods()
2606 + return String::fromUTF8(_(MSG_ContextMenuItemTagInputMethods));
2609 +String contextMenuItemTagGoBack()
2611 + return String::fromUTF8(_(MSG_ContextMenuItemTagGoBack));
2614 +String contextMenuItemTagGoForward()
2616 + return String::fromUTF8(_(MSG_ContextMenuItemTagGoForward));
2619 +String contextMenuItemTagStop()
2621 + return String::fromUTF8(_(MSG_ContextMenuItemTagStop));
2624 +String contextMenuItemTagReload()
2626 + return String::fromUTF8(_(MSG_ContextMenuItemTagReload));
2629 +String contextMenuItemTagCut()
2631 + return String::fromUTF8(_(MSG_ContextMenuItemTagCut));
2634 +String contextMenuItemTagPaste()
2636 + return String::fromUTF8(_(MSG_ContextMenuItemTagPaste));
2639 +String contextMenuItemTagNoGuessesFound()
2641 + return String::fromUTF8(_(MSG_ContextMenuItemTagNoGuessesFound));
2644 +String contextMenuItemTagIgnoreSpelling()
2646 + return String::fromUTF8(_(MSG_ContextMenuItemTagIgnoreSpelling));
2649 +String contextMenuItemTagLearnSpelling()
2651 + return String::fromUTF8(_(MSG_ContextMenuItemTagLearnSpelling));
2654 +String contextMenuItemTagSearchWeb()
2656 + return String::fromUTF8(_(MSG_ContextMenuItemTagSearchWeb));
2659 +String contextMenuItemTagLookUpInDictionary()
2661 + return String::fromUTF8(_(MSG_ContextMenuItemTagLookUpInDictionary));
2664 +String contextMenuItemTagOpenLink()
2666 + return String::fromUTF8(_(MSG_ContextMenuItemTagOpenLink));
2669 +String contextMenuItemTagIgnoreGrammar()
2671 + return String::fromUTF8(_(MSG_ContextMenuItemTagIgnoreGrammar));
2674 +String contextMenuItemTagSpellingMenu()
2676 + return String::fromUTF8(_(MSG_ContextMenuItemTagSpellingMenu));
2679 +String contextMenuItemTagShowSpellingPanel(bool show)
2681 + if(show)
2682 + return String::fromUTF8(_(MSG_ContextMenuItemTagShowSpellingPanel));
2683 + else
2684 + return String::fromUTF8(_(MSG_ContextMenuItemTagHideSpellingPanel));
2687 +String contextMenuItemTagCheckSpelling()
2689 + return String::fromUTF8(_(MSG_ContextMenuItemTagCheckSpelling));
2692 +String contextMenuItemTagCheckSpellingWhileTyping()
2694 + return String::fromUTF8(_(MSG_ContextMenuItemTagCheckSpellingWhileTyping));
2697 +String contextMenuItemTagCheckGrammarWithSpelling()
2699 + return String::fromUTF8(_(MSG_ContextMenuItemTagCheckGrammarWithSpelling));
2702 +String contextMenuItemTagFontMenu()
2704 + return String::fromUTF8(_(MSG_ContextMenuItemTagFontMenu));
2707 +String contextMenuItemTagBold()
2709 + return String::fromUTF8(_(MSG_ContextMenuItemTagBold));
2712 +String contextMenuItemTagItalic()
2714 + return String::fromUTF8(_(MSG_ContextMenuItemTagItalic));
2717 +String contextMenuItemTagUnderline()
2719 + return String::fromUTF8(_(MSG_ContextMenuItemTagUnderline));
2722 +String contextMenuItemTagOutline()
2724 + return String::fromUTF8(_(MSG_ContextMenuItemTagOutline));
2727 +String contextMenuItemTagInspectElement()
2729 + return String::fromUTF8(_(MSG_ContextMenuItemTagInspectElement));
2732 +String searchMenuNoRecentSearchesText()
2734 + return String::fromUTF8(_(MSG_searchMenuNoRecentSearchesText));
2737 +String searchMenuRecentSearchesText()
2739 + return String::fromUTF8(_(MSG_searchMenuRecentSearchesText));
2742 +String searchMenuClearRecentSearchesText()
2744 + return String::fromUTF8(_(MSG_searchMenuClearRecentSearchesText));
2747 +String AXDefinitionListTermText()
2749 + return String::fromUTF8(_(MSG_AXDefinitionListTermText));
2752 +String AXDefinitionListDefinitionText()
2754 + return String::fromUTF8(_(MSG_AXDefinitionListDefinitionText));
2757 +String AXButtonActionVerb()
2759 + return String::fromUTF8(_(MSG_AXButtonActionVerb));
2762 +String AXRadioButtonActionVerb()
2764 + return String::fromUTF8(_(MSG_AXRadioButtonActionVerb));
2767 +String AXTextFieldActionVerb()
2769 + return String::fromUTF8(_(MSG_AXTextFieldActionVerb));
2772 +String AXCheckedCheckBoxActionVerb()
2774 + return String::fromUTF8(_(MSG_AXCheckedCheckBoxActionVerb));
2777 +String AXUncheckedCheckBoxActionVerb()
2779 + return String::fromUTF8(_(MSG_AXUncheckedCheckBoxActionVerb));
2782 +String AXLinkActionVerb()
2784 + return String::fromUTF8(_(MSG_AXLinkActionVerb));
2787 +String unknownFileSizeText()
2789 + return String::fromUTF8(_(MSG_unknownFileSizeText));
2792 +String imageTitle(const String& filename, const IntSize& size)
2794 + return String::fromUTF8(_(MSG_imageTitle));
2797 +String contextMenuItemTagLeftToRight()
2799 + return String::fromUTF8(_(MSG_ContextMenuItemTagLeftToRight));
2802 +String contextMenuItemTagDefaultDirection()
2804 + return String::fromUTF8(_(MSG_ContextMenuItemTagDefaultDirection));
2807 +String contextMenuItemTagRightToLeft()
2809 + return String::fromUTF8(_(MSG_ContextMenuItemTagRightToLeft));
2812 +String contextMenuItemTagWritingDirectionMenu()
2814 + return String::fromUTF8(_(MSG_ContextMenuItemTagWritingDirectionMenu));
2817 +String contextMenuItemTagTextDirectionMenu()
2819 + return String::fromUTF8(_(MSG_ContextMenuItemTagTextDirectionMenu));
2822 +String multipleFileUploadText(unsigned numberOfFiles)
2824 + return String::fromUTF8(_(MSG_MultipleFileUploadText));
2828 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.h OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.h
2829 --- OWB-r1097/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.h 1970-01-01 01:00:00.000000000 +0100
2830 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCLocalizedStringsAROS.h 2018-06-13 07:27:37.570979727 +0100
2831 @@ -0,0 +1,115 @@
2833 + * Copyright (C) 2008 Pleyo. All rights reserved.
2835 + * Redistribution and use in source and binary forms, with or without
2836 + * modification, are permitted provided that the following conditions
2837 + * are met:
2839 + * 1. Redistributions of source code must retain the above copyright
2840 + * notice, this list of conditions and the following disclaimer.
2841 + * 2. Redistributions in binary form must reproduce the above copyright
2842 + * notice, this list of conditions and the following disclaimer in the
2843 + * documentation and/or other materials provided with the distribution.
2844 + * 3. Neither the name of Pleyo nor the names of
2845 + * its contributors may be used to endorse or promote products derived
2846 + * from this software without specific prior written permission.
2848 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
2849 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2850 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2851 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
2852 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2853 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2854 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2855 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2856 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2857 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2858 + */
2860 +#ifndef LocalizedStrings_h
2861 +#define LocalizedStrings_h
2863 +namespace WebCore {
2865 + class String;
2866 + class IntSize;
2868 + String inputElementAltText();
2869 + String resetButtonDefaultLabel();
2870 + String searchableIndexIntroduction();
2871 + String submitButtonDefaultLabel();
2872 + String fileButtonChooseFileLabel();
2873 + String fileButtonNoFileSelectedLabel();
2874 + String copyImageUnknownFileLabel();
2875 + String contextMenuItemTagOpenLinkInNewWindow();
2876 + String contextMenuItemTagOpenLinkInNewTab();
2877 + String contextMenuItemTagDownloadLinkToDisk();
2878 + String contextMenuItemTagCopyLinkToClipboard();
2879 + String contextMenuItemTagOpenImageInNewWindow();
2880 + String contextMenuItemTagOpenImageInNewTab();
2881 + String contextMenuItemTagDownloadImageToDisk();
2882 + String contextMenuItemTagCopyImageToClipboard();
2883 + String contextMenuItemTagOpenFrameInNewWindow();
2884 + String contextMenuItemTagOpenFrameInNewTab();
2885 + String contextMenuItemTagCopy();
2886 + String contextMenuItemTagGoBack();
2887 + String contextMenuItemTagGoForward();
2888 + String contextMenuItemTagStop();
2889 + String contextMenuItemTagReload();
2890 + String contextMenuItemTagCut();
2891 + String contextMenuItemTagPaste();
2892 + String contextMenuItemTagDelete();
2893 + String contextMenuItemTagSelectAll();
2894 + String contextMenuItemTagInputMethods();
2895 + String contextMenuItemTagUnicode();
2896 + String contextMenuItemTagNoGuessesFound();
2897 + String contextMenuItemTagIgnoreSpelling();
2898 + String contextMenuItemTagLearnSpelling();
2899 + String contextMenuItemTagSearchWeb();
2900 + String contextMenuItemTagLookUpInDictionary();
2901 + String contextMenuItemTagOpenLink();
2902 + String contextMenuItemTagIgnoreGrammar();
2903 + String contextMenuItemTagSpellingMenu();
2904 + String contextMenuItemTagShowSpellingPanel(bool show);
2905 + String contextMenuItemTagCheckSpelling();
2906 + String contextMenuItemTagCheckSpellingWhileTyping();
2907 + String contextMenuItemTagCheckGrammarWithSpelling();
2908 + String contextMenuItemTagFontMenu();
2909 + String contextMenuItemTagBold();
2910 + String contextMenuItemTagItalic();
2911 + String contextMenuItemTagUnderline();
2912 + String contextMenuItemTagOutline();
2913 + String contextMenuItemTagWritingDirectionMenu();
2914 + String contextMenuItemTagDefaultDirection();
2915 + String contextMenuItemTagLeftToRight();
2916 + String contextMenuItemTagRightToLeft();
2918 + String contextMenuItemTagInspectElement();
2920 + String searchMenuNoRecentSearchesText();
2921 + String searchMenuRecentSearchesText();
2922 + String searchMenuClearRecentSearchesText();
2924 + String AXWebAreaText();
2925 + String AXLinkText();
2926 + String AXListMarkerText();
2927 + String AXImageMapText();
2928 + String AXHeadingText();
2929 + String AXDefinitionListTermText();
2930 + String AXDefinitionListDefinitionText();
2932 + String AXButtonActionVerb();
2933 + String AXRadioButtonActionVerb();
2934 + String AXTextFieldActionVerb();
2935 + String AXCheckedCheckBoxActionVerb();
2936 + String AXUncheckedCheckBoxActionVerb();
2937 + String AXLinkActionVerb();
2939 + String multipleFileUploadText(unsigned numberOfFiles);
2940 + String unknownFileSizeText();
2941 + String contextMenuItemTagTextDirectionMenu();
2943 + String imageTitle(const String& filename, const IntSize& size);
2946 +#endif
2947 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.cpp OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.cpp
2948 --- OWB-r1097/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.cpp 1970-01-01 01:00:00.000000000 +0100
2949 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.cpp 2018-06-13 07:27:37.570979727 +0100
2950 @@ -0,0 +1,45 @@
2952 + * Copyright (C) 2008 Pleyo. All rights reserved.
2954 + * Redistribution and use in source and binary forms, with or without
2955 + * modification, are permitted provided that the following conditions
2956 + * are met:
2958 + * 1. Redistributions of source code must retain the above copyright
2959 + * notice, this list of conditions and the following disclaimer.
2960 + * 2. Redistributions in binary form must reproduce the above copyright
2961 + * notice, this list of conditions and the following disclaimer in the
2962 + * documentation and/or other materials provided with the distribution.
2963 + * 3. Neither the name of Pleyo nor the names of
2964 + * its contributors may be used to endorse or promote products derived
2965 + * from this software without specific prior written permission.
2967 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
2968 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2969 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2970 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
2971 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2972 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2973 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2974 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2975 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2976 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2977 + */
2979 +#include "config.h"
2980 +#include "TextBreakIteratorInternalICU.h"
2982 +namespace WebCore {
2984 +const char* currentSearchLocaleID()
2986 + // FIXME: Should use system locale.
2987 + return "";
2990 +const char* currentTextBreakLocaleID()
2992 + return "en_us";
2996 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.h OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.h
2997 --- OWB-r1097/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.h 1970-01-01 01:00:00.000000000 +0100
2998 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/BCTextBreakIteratorInternalICUAROS.h 2018-06-13 07:27:37.570979727 +0100
2999 @@ -0,0 +1,41 @@
3001 + * Copyright (C) 2008 Pleyo. All rights reserved.
3003 + * Redistribution and use in source and binary forms, with or without
3004 + * modification, are permitted provided that the following conditions
3005 + * are met:
3007 + * 1. Redistributions of source code must retain the above copyright
3008 + * notice, this list of conditions and the following disclaimer.
3009 + * 2. Redistributions in binary form must reproduce the above copyright
3010 + * notice, this list of conditions and the following disclaimer in the
3011 + * documentation and/or other materials provided with the distribution.
3012 + * 3. Neither the name of Pleyo nor the names of
3013 + * its contributors may be used to endorse or promote products derived
3014 + * from this software without specific prior written permission.
3016 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
3017 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3018 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3019 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
3020 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3021 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3022 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3023 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3024 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3025 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3026 + */
3028 +#ifndef TextBreakIteratorInternalICU_h
3029 +#define TextBreakIteratorInternalICU_h
3031 +#include <wtf/unicode/Unicode.h>
3033 +namespace WebCore {
3035 + const char* currentSearchLocaleID();
3036 + const char* currentTextBreakLocaleID();
3040 +#endif
3041 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/AROS/strings.h OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/strings.h
3042 --- OWB-r1097/BAL/Internationalization/WebCore/AROS/strings.h 1970-01-01 01:00:00.000000000 +0100
3043 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/AROS/strings.h 2018-06-13 07:27:37.570979727 +0100
3044 @@ -0,0 +1,640 @@
3045 +/****************************************************************
3046 + This file was created automatically by `FlexCat 2.4'
3047 + from "/home/sszymczy/workspace/AROS/contrib/Networking/Apps/OWB/catalogs/owb.cd".
3049 + Do NOT edit by hand!
3050 +****************************************************************/
3052 +#ifndef owb_H
3053 +#define owb_H
3056 +#ifndef EXEC_TYPES_H
3057 +#include <exec/types.h>
3058 +#endif
3061 +#ifdef CATCOMP_ARRAY
3062 +#undef CATCOMP_NUMBERS
3063 +#undef CATCOMP_STRINGS
3064 +#define CATCOMP_NUMBERS
3065 +#define CATCOMP_STRINGS
3066 +#endif
3068 +#ifdef CATCOMP_BLOCK
3069 +#undef CATCOMP_STRINGS
3070 +#define CATCOMP_STRINGS
3071 +#endif
3073 +/***************************************************************/
3076 +#ifdef CATCOMP_NUMBERS
3078 +#define MSG_OWB 0
3079 +#define MSG_SubmitButtonDefaultLabel 1
3080 +#define MSG_InputElementAltText 2
3081 +#define MSG_ResetButtonDefaultLabel 3
3082 +#define MSG_SearchableIndexIntroduction 4
3083 +#define MSG_FileButtonChooseFileLabel 5
3084 +#define MSG_FileButtonNoFileSelectedLabel 6
3085 +#define MSG_ContextMenuItemTagOpenLinkInNewWindow 7
3086 +#define MSG_ContextMenuItemTagOpenLinkInNewTab 8
3087 +#define MSG_ContextMenuItemTagDownloadLinkToDisk 9
3088 +#define MSG_ContextMenuItemTagCopyLinkToClipboard 10
3089 +#define MSG_ContextMenuItemTagOpenImageInNewWindow 11
3090 +#define MSG_ContextMenuItemTagOpenImageInNewTab 12
3091 +#define MSG_ContextMenuItemTagDownloadImageToDisk 13
3092 +#define MSG_ContextMenuItemTagCopyImageToClipboard 14
3093 +#define MSG_ContextMenuItemTagOpenFrameInNewWindow 15
3094 +#define MSG_ContextMenuItemTagOpenFrameInNewTab 16
3095 +#define MSG_ContextMenuItemTagCopy 17
3096 +#define MSG_ContextMenuItemTagDelete 18
3097 +#define MSG_ContextMenuItemTagSelectAll 19
3098 +#define MSG_ContextMenuItemTagUnicode 20
3099 +#define MSG_ContextMenuItemTagInputMethods 21
3100 +#define MSG_ContextMenuItemTagGoBack 22
3101 +#define MSG_ContextMenuItemTagGoForward 23
3102 +#define MSG_ContextMenuItemTagStop 24
3103 +#define MSG_ContextMenuItemTagReload 25
3104 +#define MSG_ContextMenuItemTagCut 26
3105 +#define MSG_ContextMenuItemTagPaste 27
3106 +#define MSG_ContextMenuItemTagNoGuessesFound 28
3107 +#define MSG_ContextMenuItemTagIgnoreSpelling 29
3108 +#define MSG_ContextMenuItemTagLearnSpelling 30
3109 +#define MSG_ContextMenuItemTagSearchWeb 31
3110 +#define MSG_ContextMenuItemTagLookUpInDictionary 32
3111 +#define MSG_ContextMenuItemTagOpenLink 33
3112 +#define MSG_ContextMenuItemTagIgnoreGrammar 34
3113 +#define MSG_ContextMenuItemTagSpellingMenu 35
3114 +#define MSG_ContextMenuItemTagShowSpellingPanel 36
3115 +#define MSG_ContextMenuItemTagHideSpellingPanel 37
3116 +#define MSG_ContextMenuItemTagCheckSpelling 38
3117 +#define MSG_ContextMenuItemTagCheckSpellingWhileTyping 39
3118 +#define MSG_ContextMenuItemTagCheckGrammarWithSpelling 40
3119 +#define MSG_ContextMenuItemTagFontMenu 41
3120 +#define MSG_ContextMenuItemTagBold 42
3121 +#define MSG_ContextMenuItemTagItalic 43
3122 +#define MSG_ContextMenuItemTagUnderline 44
3123 +#define MSG_ContextMenuItemTagOutline 45
3124 +#define MSG_ContextMenuItemTagInspectElement 46
3125 +#define MSG_searchMenuNoRecentSearchesText 47
3126 +#define MSG_searchMenuRecentSearchesText 48
3127 +#define MSG_searchMenuClearRecentSearchesText 49
3128 +#define MSG_AXDefinitionListTermText 50
3129 +#define MSG_AXDefinitionListDefinitionText 51
3130 +#define MSG_AXButtonActionVerb 52
3131 +#define MSG_AXRadioButtonActionVerb 53
3132 +#define MSG_AXTextFieldActionVerb 54
3133 +#define MSG_AXCheckedCheckBoxActionVerb 55
3134 +#define MSG_AXUncheckedCheckBoxActionVerb 56
3135 +#define MSG_AXLinkActionVerb 57
3136 +#define MSG_unknownFileSizeText 58
3137 +#define MSG_imageTitle 59
3138 +#define MSG_ContextMenuItemTagLeftToRight 60
3139 +#define MSG_ContextMenuItemTagDefaultDirection 61
3140 +#define MSG_ContextMenuItemTagRightToLeft 62
3141 +#define MSG_ContextMenuItemTagWritingDirectionMenu 63
3142 +#define MSG_ContextMenuItemTagTextDirectionMenu 64
3143 +#define MSG_MultipleFileUploadText 65
3144 +#define MSG_Loading 66
3145 +#define MSG_Ready 67
3146 +#define MSG_Connecting 68
3147 +#define MSG_Error 69
3148 +#define MSG_Untitled 70
3149 +#define MSG_DownloadState_Starting 71
3150 +#define MSG_DownloadState_Active 72
3151 +#define MSG_DownloadState_Failed 73
3152 +#define MSG_DownloadState_Finished 74
3153 +#define MSG_UnknownFileSize 75
3154 +#define MSG_UnknownFileName 76
3155 +#define MSG_UnknownDownloadSpeed 77
3156 +#define MSG_DownloadFileSize 78
3157 +#define MSG_DownloadFileName 79
3158 +#define MSG_DownloadSpeed 80
3159 +#define MSG_DownloadState 81
3160 +#define MSG_DownloadProgress 82
3161 +#define MSG_DownloadManager_Title 83
3162 +#define MSG_DownloadManager_Cancel 84
3163 +#define MSG_DownloadManager_ClearFinished 85
3164 +#define MSG_SearchWindow_Title 86
3165 +#define MSG_SearchWindow_Locate 87
3166 +#define MSG_SearchWindow_CaseSensitive 88
3167 +#define MSG_SearchWindow_FindNext 89
3168 +#define MSG_SearchWindow_FindPrevious 90
3169 +#define MSG_PreferencesManager_Title 91
3170 +#define MSG_PreferencesManager_Main 92
3171 +#define MSG_PreferencesManager_Downloads 93
3172 +#define MSG_PreferencesManager_SaveFilesTo 94
3173 +#define MSG_PreferencesManager_ZuneSettings 95
3174 +#define MSG_PreferencesManager_OpenZuneSettings 96
3175 +#define MSG_PreferencesManager_ProxySettings 97
3176 +#define MSG_PreferencesManager_HttpProxy 98
3177 +#define MSG_PreferencesManager_Content 99
3178 +#define MSG_PreferencesManager_JavaScript 100
3179 +#define MSG_PreferencesManager_EnableJavaScript 101
3180 +#define MSG_PreferencesManager_Images 102
3181 +#define MSG_PreferencesManager_LoadImagesAutomatically 103
3182 +#define MSG_PreferencesManager_AllowAnimatedImages 104
3183 +#define MSG_PreferencesManager_AllowLoopedAnimation 105
3184 +#define MSG_PreferencesManager_DecodeBMPWithDatatypes 106
3185 +#define MSG_PreferencesManager_DecodePNGWithDatatypes 107
3186 +#define MSG_PreferencesManager_DecodeGIFWithDatatypes 108
3187 +#define MSG_PreferencesManager_DecodeJPGWithDatatypes 109
3188 +#define MSG_PreferencesManager_Fonts 110
3189 +#define MSG_PreferencesManager_DefaultFontSize 111
3190 +#define MSG_PreferencesManager_MinimumFontSize 112
3191 +#define MSG_PreferencesManager_StandardFontFamily 113
3192 +#define MSG_PreferencesManager_DefaultFixedFontSize 114
3193 +#define MSG_PreferencesManager_FixedFontFamily 115
3194 +#define MSG_PreferencesManager_SerifFontFamily 116
3195 +#define MSG_PreferencesManager_SansSerifFontFamily 117
3196 +#define MSG_PreferencesManager_CursiveFontFamily 118
3197 +#define MSG_PreferencesManager_FantasyFontFamily 119
3198 +#define MSG_PreferencesManager_Save 120
3199 +#define MSG_PreferencesManager_Use 121
3200 +#define MSG_PreferencesManager_Cancel 122
3201 +#define MSG_Tabs 123
3202 +#define MSG_Tabs_OpenNew 124
3203 +#define MSG_Tabs_CloseActive 125
3204 +#define MSG_Tabs_Bookmark 126
3205 +#define MSG_JavaScript_Alert 127
3206 +#define MSG_JavaScript_AlertOK 128
3207 +#define MSG_JavaScript_Confirm 129
3208 +#define MSG_JavaScript_ConfirmOptions 130
3209 +#define MSG_JavaScript_Prompt 131
3210 +#define MSG_JavaScript_PromptOK 132
3211 +#define MSG_JavaScript_PromptCancel 133
3212 +#define MSG_RequestPolicy_Title 134
3213 +#define MSG_RequestPolicy_Message 135
3214 +#define MSG_RequestPolicy_Options 136
3215 +#define MSG_RequestCredentials_Title 137
3216 +#define MSG_RequestCredentials_Message 138
3217 +#define MSG_RequestCredentials_Username 139
3218 +#define MSG_RequestCredentials_Password 140
3219 +#define MSG_RequestCredentials_OK 141
3220 +#define MSG_RequestCredentials_Cancel 142
3221 +#define MSG_BookmarkManager_Title 143
3222 +#define MSG_BookmarkManager_Label 144
3223 +#define MSG_BookmarkManager_URL 145
3224 +#define MSG_BookmarkManager_Insert 146
3225 +#define MSG_BookmarkManager_Change 147
3226 +#define MSG_BookmarkManager_Remove 148
3227 +#define MSG_BookmarkManager_MenuTitle 149
3228 +#define MSG_BookmarkManager_MoveUp 150
3229 +#define MSG_BookmarkManager_MoveDown 151
3230 +#define MSG_MainMenu_File 152
3231 +#define MSG_MainMenu_OpenNewTab 153
3232 +#define MSG_MainMenu_OpenNewWindow 154
3233 +#define MSG_MainMenu_OpenFile 155
3234 +#define MSG_MainMenu_CloseCurrentTab 156
3235 +#define MSG_MainMenu_CloseWindow 157
3236 +#define MSG_MainMenu_Quit 158
3237 +#define MSG_MainMenu_Edit 159
3238 +#define MSG_MainMenu_Find 160
3239 +#define MSG_MainMenu_FindNext 161
3240 +#define MSG_MainMenu_Preferences 162
3241 +#define MSG_MainMenu_Tools 163
3242 +#define MSG_MainMenu_BookmarkManager 164
3243 +#define MSG_MainMenu_DownloadManager 165
3244 +#define MSG_MainMenu_Cut 166
3245 +#define MSG_MainMenu_Copy 167
3246 +#define MSG_MainMenu_Paste 168
3247 +#define MSG_MainMenu_View 169
3248 +#define MSG_MainMenu_ZoomIn 170
3249 +#define MSG_MainMenu_ZoomOut 171
3250 +#define MSG_MainMenu_ZoomReset 172
3251 +#define MSG_MainMenu_ViewSource 173
3253 +#endif /* CATCOMP_NUMBERS */
3256 +/***************************************************************/
3258 +#ifdef CATCOMP_STRINGS
3260 +#define MSG_OWB_STR "OWB"
3261 +#define MSG_SubmitButtonDefaultLabel_STR "Submit"
3262 +#define MSG_InputElementAltText_STR "Submit"
3263 +#define MSG_ResetButtonDefaultLabel_STR "Reset"
3264 +#define MSG_SearchableIndexIntroduction_STR "Searchable Index"
3265 +#define MSG_FileButtonChooseFileLabel_STR "Choose File"
3266 +#define MSG_FileButtonNoFileSelectedLabel_STR "(None)"
3267 +#define MSG_ContextMenuItemTagOpenLinkInNewWindow_STR "Open Link in New Window"
3268 +#define MSG_ContextMenuItemTagOpenLinkInNewTab_STR "Open Link in New Tab"
3269 +#define MSG_ContextMenuItemTagDownloadLinkToDisk_STR "Download Linked File"
3270 +#define MSG_ContextMenuItemTagCopyLinkToClipboard_STR "Copy Link Location"
3271 +#define MSG_ContextMenuItemTagOpenImageInNewWindow_STR "Open Image in New Window"
3272 +#define MSG_ContextMenuItemTagOpenImageInNewTab_STR "Open Image in New Tab"
3273 +#define MSG_ContextMenuItemTagDownloadImageToDisk_STR "Save Image As"
3274 +#define MSG_ContextMenuItemTagCopyImageToClipboard_STR "Copy Image"
3275 +#define MSG_ContextMenuItemTagOpenFrameInNewWindow_STR "Open Frame in New Window"
3276 +#define MSG_ContextMenuItemTagOpenFrameInNewTab_STR "Open Frame in New Tab"
3277 +#define MSG_ContextMenuItemTagCopy_STR "copy"
3278 +#define MSG_ContextMenuItemTagDelete_STR "delete"
3279 +#define MSG_ContextMenuItemTagSelectAll_STR "Select All"
3280 +#define MSG_ContextMenuItemTagUnicode_STR "Insert Unicode Control Character"
3281 +#define MSG_ContextMenuItemTagInputMethods_STR "Input Methods"
3282 +#define MSG_ContextMenuItemTagGoBack_STR "back"
3283 +#define MSG_ContextMenuItemTagGoForward_STR "forward"
3284 +#define MSG_ContextMenuItemTagStop_STR "stop"
3285 +#define MSG_ContextMenuItemTagReload_STR "Reload"
3286 +#define MSG_ContextMenuItemTagCut_STR "cut"
3287 +#define MSG_ContextMenuItemTagPaste_STR "paste"
3288 +#define MSG_ContextMenuItemTagNoGuessesFound_STR "No Guesses Found"
3289 +#define MSG_ContextMenuItemTagIgnoreSpelling_STR "Ignore Spelling"
3290 +#define MSG_ContextMenuItemTagLearnSpelling_STR "Learn Spelling"
3291 +#define MSG_ContextMenuItemTagSearchWeb_STR "Search the Web"
3292 +#define MSG_ContextMenuItemTagLookUpInDictionary_STR "Look Up in Dictionary"
3293 +#define MSG_ContextMenuItemTagOpenLink_STR "Open Link"
3294 +#define MSG_ContextMenuItemTagIgnoreGrammar_STR "Ignore Grammar"
3295 +#define MSG_ContextMenuItemTagSpellingMenu_STR "Spelling and Grammar"
3296 +#define MSG_ContextMenuItemTagShowSpellingPanel_STR "Show Spelling and Grammar"
3297 +#define MSG_ContextMenuItemTagHideSpellingPanel_STR "Hide Spelling and Grammar"
3298 +#define MSG_ContextMenuItemTagCheckSpelling_STR "Check Document Now"
3299 +#define MSG_ContextMenuItemTagCheckSpellingWhileTyping_STR "Check Spelling While Typing"
3300 +#define MSG_ContextMenuItemTagCheckGrammarWithSpelling_STR "Check Grammar With Spelling"
3301 +#define MSG_ContextMenuItemTagFontMenu_STR "Font"
3302 +#define MSG_ContextMenuItemTagBold_STR "Bold"
3303 +#define MSG_ContextMenuItemTagItalic_STR "Italic"
3304 +#define MSG_ContextMenuItemTagUnderline_STR "Underline"
3305 +#define MSG_ContextMenuItemTagOutline_STR "Outline"
3306 +#define MSG_ContextMenuItemTagInspectElement_STR "Inspect Element"
3307 +#define MSG_searchMenuNoRecentSearchesText_STR "No recent searches"
3308 +#define MSG_searchMenuRecentSearchesText_STR "Recent searches"
3309 +#define MSG_searchMenuClearRecentSearchesText_STR "Clear recent searches"
3310 +#define MSG_AXDefinitionListTermText_STR "term"
3311 +#define MSG_AXDefinitionListDefinitionText_STR "definition"
3312 +#define MSG_AXButtonActionVerb_STR ""
3313 +#define MSG_AXRadioButtonActionVerb_STR ""
3314 +#define MSG_AXTextFieldActionVerb_STR ""
3315 +#define MSG_AXCheckedCheckBoxActionVerb_STR ""
3316 +#define MSG_AXUncheckedCheckBoxActionVerb_STR ""
3317 +#define MSG_AXLinkActionVerb_STR ""
3318 +#define MSG_unknownFileSizeText_STR "Unknown"
3319 +#define MSG_imageTitle_STR ""
3320 +#define MSG_ContextMenuItemTagLeftToRight_STR "Left to Right context menu item"
3321 +#define MSG_ContextMenuItemTagDefaultDirection_STR "Default writing direction context menu item"
3322 +#define MSG_ContextMenuItemTagRightToLeft_STR "Right to Left context menu item"
3323 +#define MSG_ContextMenuItemTagWritingDirectionMenu_STR "Writing direction context sub-menu item"
3324 +#define MSG_ContextMenuItemTagTextDirectionMenu_STR "Text direction context sub-menu item"
3325 +#define MSG_MultipleFileUploadText_STR ""
3326 +#define MSG_Loading_STR "Loading..."
3327 +#define MSG_Ready_STR "Ready"
3328 +#define MSG_Connecting_STR "Connecting..."
3329 +#define MSG_Error_STR "Error"
3330 +#define MSG_Untitled_STR "(Untitled)"
3331 +#define MSG_DownloadState_Starting_STR "Starting"
3332 +#define MSG_DownloadState_Active_STR "Downloading"
3333 +#define MSG_DownloadState_Failed_STR "Error"
3334 +#define MSG_DownloadState_Finished_STR "Finished"
3335 +#define MSG_UnknownFileSize_STR "unknown"
3336 +#define MSG_UnknownFileName_STR "unknown"
3337 +#define MSG_UnknownDownloadSpeed_STR "unknown"
3338 +#define MSG_DownloadFileSize_STR "File size"
3339 +#define MSG_DownloadFileName_STR "File name"
3340 +#define MSG_DownloadSpeed_STR "Speed"
3341 +#define MSG_DownloadState_STR "Status"
3342 +#define MSG_DownloadProgress_STR "Progress"
3343 +#define MSG_DownloadManager_Title_STR "OWB Download Manager"
3344 +#define MSG_DownloadManager_Cancel_STR "Cancel"
3345 +#define MSG_DownloadManager_ClearFinished_STR "Clear finished"
3346 +#define MSG_SearchWindow_Title_STR "OWB Search Window"
3347 +#define MSG_SearchWindow_Locate_STR "Locate:"
3348 +#define MSG_SearchWindow_CaseSensitive_STR "Case Sensitive"
3349 +#define MSG_SearchWindow_FindNext_STR "Find next"
3350 +#define MSG_SearchWindow_FindPrevious_STR "Find previous"
3351 +#define MSG_PreferencesManager_Title_STR "OWB Preferences"
3352 +#define MSG_PreferencesManager_Main_STR "Main"
3353 +#define MSG_PreferencesManager_Downloads_STR "Downloads"
3354 +#define MSG_PreferencesManager_SaveFilesTo_STR "Save files to:"
3355 +#define MSG_PreferencesManager_ZuneSettings_STR "Zune Settings"
3356 +#define MSG_PreferencesManager_OpenZuneSettings_STR "Open Zune Settings"
3357 +#define MSG_PreferencesManager_ProxySettings_STR "Proxy Settings"
3358 +#define MSG_PreferencesManager_HttpProxy_STR "HTTP Proxy:"
3359 +#define MSG_PreferencesManager_Content_STR "Content"
3360 +#define MSG_PreferencesManager_JavaScript_STR "JavaScript"
3361 +#define MSG_PreferencesManager_EnableJavaScript_STR "Enable JavaScript:"
3362 +#define MSG_PreferencesManager_Images_STR "Images"
3363 +#define MSG_PreferencesManager_LoadImagesAutomatically_STR "Load images automatically:"
3364 +#define MSG_PreferencesManager_AllowAnimatedImages_STR "Allow animated images:"
3365 +#define MSG_PreferencesManager_AllowLoopedAnimation_STR "Allow looped animation:"
3366 +#define MSG_PreferencesManager_DecodeBMPWithDatatypes_STR "Decode BMP with Datatypes:"
3367 +#define MSG_PreferencesManager_DecodePNGWithDatatypes_STR "Decode PNG with Datatypes:"
3368 +#define MSG_PreferencesManager_DecodeGIFWithDatatypes_STR "Decode GIF with Datatypes:"
3369 +#define MSG_PreferencesManager_DecodeJPGWithDatatypes_STR "Decode JPG with Datatypes:"
3370 +#define MSG_PreferencesManager_Fonts_STR "Fonts"
3371 +#define MSG_PreferencesManager_DefaultFontSize_STR "Default font size:"
3372 +#define MSG_PreferencesManager_MinimumFontSize_STR "Minimum font size:"
3373 +#define MSG_PreferencesManager_StandardFontFamily_STR "Standard font family:"
3374 +#define MSG_PreferencesManager_DefaultFixedFontSize_STR "Default fixed font size:"
3375 +#define MSG_PreferencesManager_FixedFontFamily_STR "Fixed font family:"
3376 +#define MSG_PreferencesManager_SerifFontFamily_STR "Serif font family:"
3377 +#define MSG_PreferencesManager_SansSerifFontFamily_STR "Sans-serif font family:"
3378 +#define MSG_PreferencesManager_CursiveFontFamily_STR "Cursive font family:"
3379 +#define MSG_PreferencesManager_FantasyFontFamily_STR "Fantasy font family:"
3380 +#define MSG_PreferencesManager_Save_STR "Save"
3381 +#define MSG_PreferencesManager_Use_STR "Use"
3382 +#define MSG_PreferencesManager_Cancel_STR "Cancel"
3383 +#define MSG_Tabs_STR "Tabs"
3384 +#define MSG_Tabs_OpenNew_STR "Open new tab"
3385 +#define MSG_Tabs_CloseActive_STR "Close active tab"
3386 +#define MSG_Tabs_Bookmark_STR "Bookmark this tab"
3387 +#define MSG_JavaScript_Alert_STR "OWB JavaScript Alert"
3388 +#define MSG_JavaScript_AlertOK_STR "OK"
3389 +#define MSG_JavaScript_Confirm_STR "OWB JavaScript Confirm"
3390 +#define MSG_JavaScript_ConfirmOptions_STR "Cancel|OK"
3391 +#define MSG_JavaScript_Prompt_STR "OWB JavaScript Prompt"
3392 +#define MSG_JavaScript_PromptOK_STR "OK"
3393 +#define MSG_JavaScript_PromptCancel_STR "Cancel"
3394 +#define MSG_RequestPolicy_Title_STR "OWB Policy Requester"
3395 +#define MSG_RequestPolicy_Message_STR "You are about to open file '%s' having MIME type '%s'.\nWhat should OWB do with this file?"
3396 +#define MSG_RequestPolicy_Options_STR "Download|Show|Cancel"
3397 +#define MSG_RequestCredentials_Title_STR "OWB Authentication Requester"
3398 +#define MSG_RequestCredentials_Message_STR "Please enter username and password to access realm %s at host %s."
3399 +#define MSG_RequestCredentials_Username_STR "Username:"
3400 +#define MSG_RequestCredentials_Password_STR "Password:"
3401 +#define MSG_RequestCredentials_OK_STR "OK"
3402 +#define MSG_RequestCredentials_Cancel_STR "Cancel"
3403 +#define MSG_BookmarkManager_Title_STR "Bookmark Manager"
3404 +#define MSG_BookmarkManager_Label_STR "Label"
3405 +#define MSG_BookmarkManager_URL_STR "URL"
3406 +#define MSG_BookmarkManager_Insert_STR "Insert"
3407 +#define MSG_BookmarkManager_Change_STR "Change"
3408 +#define MSG_BookmarkManager_Remove_STR "Remove"
3409 +#define MSG_BookmarkManager_MenuTitle_STR "Bookmarks"
3410 +#define MSG_BookmarkManager_MoveUp_STR "Move up"
3411 +#define MSG_BookmarkManager_MoveDown_STR "Move down"
3412 +#define MSG_MainMenu_File_STR "File"
3413 +#define MSG_MainMenu_OpenNewTab_STR "Open new tab"
3414 +#define MSG_MainMenu_OpenNewWindow_STR "Open new window"
3415 +#define MSG_MainMenu_OpenFile_STR "Open file"
3416 +#define MSG_MainMenu_CloseCurrentTab_STR "Close current tab"
3417 +#define MSG_MainMenu_CloseWindow_STR "Close window"
3418 +#define MSG_MainMenu_Quit_STR "Quit"
3419 +#define MSG_MainMenu_Edit_STR "Edit"
3420 +#define MSG_MainMenu_Find_STR "Find"
3421 +#define MSG_MainMenu_FindNext_STR "Find next"
3422 +#define MSG_MainMenu_Preferences_STR "Preferences"
3423 +#define MSG_MainMenu_Tools_STR "Tools"
3424 +#define MSG_MainMenu_BookmarkManager_STR "Bookmark manager"
3425 +#define MSG_MainMenu_DownloadManager_STR "Download manager"
3426 +#define MSG_MainMenu_Cut_STR "Cut"
3427 +#define MSG_MainMenu_Copy_STR "Copy"
3428 +#define MSG_MainMenu_Paste_STR "Paste"
3429 +#define MSG_MainMenu_View_STR "View"
3430 +#define MSG_MainMenu_ZoomIn_STR "Zoom in"
3431 +#define MSG_MainMenu_ZoomOut_STR "Zoom out"
3432 +#define MSG_MainMenu_ZoomReset_STR "Reset zoom"
3433 +#define MSG_MainMenu_ViewSource_STR "View source"
3435 +#endif /* CATCOMP_STRINGS */
3438 +/***************************************************************/
3441 +#ifdef CATCOMP_ARRAY
3443 +struct CatCompArrayType
3445 + LONG cca_ID;
3446 + STRPTR cca_Str;
3449 +static const struct CatCompArrayType CatCompArray[] =
3451 + {MSG_OWB,(STRPTR)MSG_OWB_STR},
3452 + {MSG_SubmitButtonDefaultLabel,(STRPTR)MSG_SubmitButtonDefaultLabel_STR},
3453 + {MSG_InputElementAltText,(STRPTR)MSG_InputElementAltText_STR},
3454 + {MSG_ResetButtonDefaultLabel,(STRPTR)MSG_ResetButtonDefaultLabel_STR},
3455 + {MSG_SearchableIndexIntroduction,(STRPTR)MSG_SearchableIndexIntroduction_STR},
3456 + {MSG_FileButtonChooseFileLabel,(STRPTR)MSG_FileButtonChooseFileLabel_STR},
3457 + {MSG_FileButtonNoFileSelectedLabel,(STRPTR)MSG_FileButtonNoFileSelectedLabel_STR},
3458 + {MSG_ContextMenuItemTagOpenLinkInNewWindow,(STRPTR)MSG_ContextMenuItemTagOpenLinkInNewWindow_STR},
3459 + {MSG_ContextMenuItemTagOpenLinkInNewTab,(STRPTR)MSG_ContextMenuItemTagOpenLinkInNewTab_STR},
3460 + {MSG_ContextMenuItemTagDownloadLinkToDisk,(STRPTR)MSG_ContextMenuItemTagDownloadLinkToDisk_STR},
3461 + {MSG_ContextMenuItemTagCopyLinkToClipboard,(STRPTR)MSG_ContextMenuItemTagCopyLinkToClipboard_STR},
3462 + {MSG_ContextMenuItemTagOpenImageInNewWindow,(STRPTR)MSG_ContextMenuItemTagOpenImageInNewWindow_STR},
3463 + {MSG_ContextMenuItemTagOpenImageInNewTab,(STRPTR)MSG_ContextMenuItemTagOpenImageInNewTab_STR},
3464 + {MSG_ContextMenuItemTagDownloadImageToDisk,(STRPTR)MSG_ContextMenuItemTagDownloadImageToDisk_STR},
3465 + {MSG_ContextMenuItemTagCopyImageToClipboard,(STRPTR)MSG_ContextMenuItemTagCopyImageToClipboard_STR},
3466 + {MSG_ContextMenuItemTagOpenFrameInNewWindow,(STRPTR)MSG_ContextMenuItemTagOpenFrameInNewWindow_STR},
3467 + {MSG_ContextMenuItemTagOpenFrameInNewTab,(STRPTR)MSG_ContextMenuItemTagOpenFrameInNewTab_STR},
3468 + {MSG_ContextMenuItemTagCopy,(STRPTR)MSG_ContextMenuItemTagCopy_STR},
3469 + {MSG_ContextMenuItemTagDelete,(STRPTR)MSG_ContextMenuItemTagDelete_STR},
3470 + {MSG_ContextMenuItemTagSelectAll,(STRPTR)MSG_ContextMenuItemTagSelectAll_STR},
3471 + {MSG_ContextMenuItemTagUnicode,(STRPTR)MSG_ContextMenuItemTagUnicode_STR},
3472 + {MSG_ContextMenuItemTagInputMethods,(STRPTR)MSG_ContextMenuItemTagInputMethods_STR},
3473 + {MSG_ContextMenuItemTagGoBack,(STRPTR)MSG_ContextMenuItemTagGoBack_STR},
3474 + {MSG_ContextMenuItemTagGoForward,(STRPTR)MSG_ContextMenuItemTagGoForward_STR},
3475 + {MSG_ContextMenuItemTagStop,(STRPTR)MSG_ContextMenuItemTagStop_STR},
3476 + {MSG_ContextMenuItemTagReload,(STRPTR)MSG_ContextMenuItemTagReload_STR},
3477 + {MSG_ContextMenuItemTagCut,(STRPTR)MSG_ContextMenuItemTagCut_STR},
3478 + {MSG_ContextMenuItemTagPaste,(STRPTR)MSG_ContextMenuItemTagPaste_STR},
3479 + {MSG_ContextMenuItemTagNoGuessesFound,(STRPTR)MSG_ContextMenuItemTagNoGuessesFound_STR},
3480 + {MSG_ContextMenuItemTagIgnoreSpelling,(STRPTR)MSG_ContextMenuItemTagIgnoreSpelling_STR},
3481 + {MSG_ContextMenuItemTagLearnSpelling,(STRPTR)MSG_ContextMenuItemTagLearnSpelling_STR},
3482 + {MSG_ContextMenuItemTagSearchWeb,(STRPTR)MSG_ContextMenuItemTagSearchWeb_STR},
3483 + {MSG_ContextMenuItemTagLookUpInDictionary,(STRPTR)MSG_ContextMenuItemTagLookUpInDictionary_STR},
3484 + {MSG_ContextMenuItemTagOpenLink,(STRPTR)MSG_ContextMenuItemTagOpenLink_STR},
3485 + {MSG_ContextMenuItemTagIgnoreGrammar,(STRPTR)MSG_ContextMenuItemTagIgnoreGrammar_STR},
3486 + {MSG_ContextMenuItemTagSpellingMenu,(STRPTR)MSG_ContextMenuItemTagSpellingMenu_STR},
3487 + {MSG_ContextMenuItemTagShowSpellingPanel,(STRPTR)MSG_ContextMenuItemTagShowSpellingPanel_STR},
3488 + {MSG_ContextMenuItemTagHideSpellingPanel,(STRPTR)MSG_ContextMenuItemTagHideSpellingPanel_STR},
3489 + {MSG_ContextMenuItemTagCheckSpelling,(STRPTR)MSG_ContextMenuItemTagCheckSpelling_STR},
3490 + {MSG_ContextMenuItemTagCheckSpellingWhileTyping,(STRPTR)MSG_ContextMenuItemTagCheckSpellingWhileTyping_STR},
3491 + {MSG_ContextMenuItemTagCheckGrammarWithSpelling,(STRPTR)MSG_ContextMenuItemTagCheckGrammarWithSpelling_STR},
3492 + {MSG_ContextMenuItemTagFontMenu,(STRPTR)MSG_ContextMenuItemTagFontMenu_STR},
3493 + {MSG_ContextMenuItemTagBold,(STRPTR)MSG_ContextMenuItemTagBold_STR},
3494 + {MSG_ContextMenuItemTagItalic,(STRPTR)MSG_ContextMenuItemTagItalic_STR},
3495 + {MSG_ContextMenuItemTagUnderline,(STRPTR)MSG_ContextMenuItemTagUnderline_STR},
3496 + {MSG_ContextMenuItemTagOutline,(STRPTR)MSG_ContextMenuItemTagOutline_STR},
3497 + {MSG_ContextMenuItemTagInspectElement,(STRPTR)MSG_ContextMenuItemTagInspectElement_STR},
3498 + {MSG_searchMenuNoRecentSearchesText,(STRPTR)MSG_searchMenuNoRecentSearchesText_STR},
3499 + {MSG_searchMenuRecentSearchesText,(STRPTR)MSG_searchMenuRecentSearchesText_STR},
3500 + {MSG_searchMenuClearRecentSearchesText,(STRPTR)MSG_searchMenuClearRecentSearchesText_STR},
3501 + {MSG_AXDefinitionListTermText,(STRPTR)MSG_AXDefinitionListTermText_STR},
3502 + {MSG_AXDefinitionListDefinitionText,(STRPTR)MSG_AXDefinitionListDefinitionText_STR},
3503 + {MSG_AXButtonActionVerb,(STRPTR)MSG_AXButtonActionVerb_STR},
3504 + {MSG_AXRadioButtonActionVerb,(STRPTR)MSG_AXRadioButtonActionVerb_STR},
3505 + {MSG_AXTextFieldActionVerb,(STRPTR)MSG_AXTextFieldActionVerb_STR},
3506 + {MSG_AXCheckedCheckBoxActionVerb,(STRPTR)MSG_AXCheckedCheckBoxActionVerb_STR},
3507 + {MSG_AXUncheckedCheckBoxActionVerb,(STRPTR)MSG_AXUncheckedCheckBoxActionVerb_STR},
3508 + {MSG_AXLinkActionVerb,(STRPTR)MSG_AXLinkActionVerb_STR},
3509 + {MSG_unknownFileSizeText,(STRPTR)MSG_unknownFileSizeText_STR},
3510 + {MSG_imageTitle,(STRPTR)MSG_imageTitle_STR},
3511 + {MSG_ContextMenuItemTagLeftToRight,(STRPTR)MSG_ContextMenuItemTagLeftToRight_STR},
3512 + {MSG_ContextMenuItemTagDefaultDirection,(STRPTR)MSG_ContextMenuItemTagDefaultDirection_STR},
3513 + {MSG_ContextMenuItemTagRightToLeft,(STRPTR)MSG_ContextMenuItemTagRightToLeft_STR},
3514 + {MSG_ContextMenuItemTagWritingDirectionMenu,(STRPTR)MSG_ContextMenuItemTagWritingDirectionMenu_STR},
3515 + {MSG_ContextMenuItemTagTextDirectionMenu,(STRPTR)MSG_ContextMenuItemTagTextDirectionMenu_STR},
3516 + {MSG_MultipleFileUploadText,(STRPTR)MSG_MultipleFileUploadText_STR},
3517 + {MSG_Loading,(STRPTR)MSG_Loading_STR},
3518 + {MSG_Ready,(STRPTR)MSG_Ready_STR},
3519 + {MSG_Connecting,(STRPTR)MSG_Connecting_STR},
3520 + {MSG_Error,(STRPTR)MSG_Error_STR},
3521 + {MSG_Untitled,(STRPTR)MSG_Untitled_STR},
3522 + {MSG_DownloadState_Starting,(STRPTR)MSG_DownloadState_Starting_STR},
3523 + {MSG_DownloadState_Active,(STRPTR)MSG_DownloadState_Active_STR},
3524 + {MSG_DownloadState_Failed,(STRPTR)MSG_DownloadState_Failed_STR},
3525 + {MSG_DownloadState_Finished,(STRPTR)MSG_DownloadState_Finished_STR},
3526 + {MSG_UnknownFileSize,(STRPTR)MSG_UnknownFileSize_STR},
3527 + {MSG_UnknownFileName,(STRPTR)MSG_UnknownFileName_STR},
3528 + {MSG_UnknownDownloadSpeed,(STRPTR)MSG_UnknownDownloadSpeed_STR},
3529 + {MSG_DownloadFileSize,(STRPTR)MSG_DownloadFileSize_STR},
3530 + {MSG_DownloadFileName,(STRPTR)MSG_DownloadFileName_STR},
3531 + {MSG_DownloadSpeed,(STRPTR)MSG_DownloadSpeed_STR},
3532 + {MSG_DownloadState,(STRPTR)MSG_DownloadState_STR},
3533 + {MSG_DownloadProgress,(STRPTR)MSG_DownloadProgress_STR},
3534 + {MSG_DownloadManager_Title,(STRPTR)MSG_DownloadManager_Title_STR},
3535 + {MSG_DownloadManager_Cancel,(STRPTR)MSG_DownloadManager_Cancel_STR},
3536 + {MSG_DownloadManager_ClearFinished,(STRPTR)MSG_DownloadManager_ClearFinished_STR},
3537 + {MSG_SearchWindow_Title,(STRPTR)MSG_SearchWindow_Title_STR},
3538 + {MSG_SearchWindow_Locate,(STRPTR)MSG_SearchWindow_Locate_STR},
3539 + {MSG_SearchWindow_CaseSensitive,(STRPTR)MSG_SearchWindow_CaseSensitive_STR},
3540 + {MSG_SearchWindow_FindNext,(STRPTR)MSG_SearchWindow_FindNext_STR},
3541 + {MSG_SearchWindow_FindPrevious,(STRPTR)MSG_SearchWindow_FindPrevious_STR},
3542 + {MSG_PreferencesManager_Title,(STRPTR)MSG_PreferencesManager_Title_STR},
3543 + {MSG_PreferencesManager_Main,(STRPTR)MSG_PreferencesManager_Main_STR},
3544 + {MSG_PreferencesManager_Downloads,(STRPTR)MSG_PreferencesManager_Downloads_STR},
3545 + {MSG_PreferencesManager_SaveFilesTo,(STRPTR)MSG_PreferencesManager_SaveFilesTo_STR},
3546 + {MSG_PreferencesManager_ZuneSettings,(STRPTR)MSG_PreferencesManager_ZuneSettings_STR},
3547 + {MSG_PreferencesManager_OpenZuneSettings,(STRPTR)MSG_PreferencesManager_OpenZuneSettings_STR},
3548 + {MSG_PreferencesManager_ProxySettings,(STRPTR)MSG_PreferencesManager_ProxySettings_STR},
3549 + {MSG_PreferencesManager_HttpProxy,(STRPTR)MSG_PreferencesManager_HttpProxy_STR},
3550 + {MSG_PreferencesManager_Content,(STRPTR)MSG_PreferencesManager_Content_STR},
3551 + {MSG_PreferencesManager_JavaScript,(STRPTR)MSG_PreferencesManager_JavaScript_STR},
3552 + {MSG_PreferencesManager_EnableJavaScript,(STRPTR)MSG_PreferencesManager_EnableJavaScript_STR},
3553 + {MSG_PreferencesManager_Images,(STRPTR)MSG_PreferencesManager_Images_STR},
3554 + {MSG_PreferencesManager_LoadImagesAutomatically,(STRPTR)MSG_PreferencesManager_LoadImagesAutomatically_STR},
3555 + {MSG_PreferencesManager_AllowAnimatedImages,(STRPTR)MSG_PreferencesManager_AllowAnimatedImages_STR},
3556 + {MSG_PreferencesManager_AllowLoopedAnimation,(STRPTR)MSG_PreferencesManager_AllowLoopedAnimation_STR},
3557 + {MSG_PreferencesManager_DecodeBMPWithDatatypes,(STRPTR)MSG_PreferencesManager_DecodeBMPWithDatatypes_STR},
3558 + {MSG_PreferencesManager_DecodePNGWithDatatypes,(STRPTR)MSG_PreferencesManager_DecodePNGWithDatatypes_STR},
3559 + {MSG_PreferencesManager_DecodeGIFWithDatatypes,(STRPTR)MSG_PreferencesManager_DecodeGIFWithDatatypes_STR},
3560 + {MSG_PreferencesManager_DecodeJPGWithDatatypes,(STRPTR)MSG_PreferencesManager_DecodeJPGWithDatatypes_STR},
3561 + {MSG_PreferencesManager_Fonts,(STRPTR)MSG_PreferencesManager_Fonts_STR},
3562 + {MSG_PreferencesManager_DefaultFontSize,(STRPTR)MSG_PreferencesManager_DefaultFontSize_STR},
3563 + {MSG_PreferencesManager_MinimumFontSize,(STRPTR)MSG_PreferencesManager_MinimumFontSize_STR},
3564 + {MSG_PreferencesManager_StandardFontFamily,(STRPTR)MSG_PreferencesManager_StandardFontFamily_STR},
3565 + {MSG_PreferencesManager_DefaultFixedFontSize,(STRPTR)MSG_PreferencesManager_DefaultFixedFontSize_STR},
3566 + {MSG_PreferencesManager_FixedFontFamily,(STRPTR)MSG_PreferencesManager_FixedFontFamily_STR},
3567 + {MSG_PreferencesManager_SerifFontFamily,(STRPTR)MSG_PreferencesManager_SerifFontFamily_STR},
3568 + {MSG_PreferencesManager_SansSerifFontFamily,(STRPTR)MSG_PreferencesManager_SansSerifFontFamily_STR},
3569 + {MSG_PreferencesManager_CursiveFontFamily,(STRPTR)MSG_PreferencesManager_CursiveFontFamily_STR},
3570 + {MSG_PreferencesManager_FantasyFontFamily,(STRPTR)MSG_PreferencesManager_FantasyFontFamily_STR},
3571 + {MSG_PreferencesManager_Save,(STRPTR)MSG_PreferencesManager_Save_STR},
3572 + {MSG_PreferencesManager_Use,(STRPTR)MSG_PreferencesManager_Use_STR},
3573 + {MSG_PreferencesManager_Cancel,(STRPTR)MSG_PreferencesManager_Cancel_STR},
3574 + {MSG_Tabs,(STRPTR)MSG_Tabs_STR},
3575 + {MSG_Tabs_OpenNew,(STRPTR)MSG_Tabs_OpenNew_STR},
3576 + {MSG_Tabs_CloseActive,(STRPTR)MSG_Tabs_CloseActive_STR},
3577 + {MSG_Tabs_Bookmark,(STRPTR)MSG_Tabs_Bookmark_STR},
3578 + {MSG_JavaScript_Alert,(STRPTR)MSG_JavaScript_Alert_STR},
3579 + {MSG_JavaScript_AlertOK,(STRPTR)MSG_JavaScript_AlertOK_STR},
3580 + {MSG_JavaScript_Confirm,(STRPTR)MSG_JavaScript_Confirm_STR},
3581 + {MSG_JavaScript_ConfirmOptions,(STRPTR)MSG_JavaScript_ConfirmOptions_STR},
3582 + {MSG_JavaScript_Prompt,(STRPTR)MSG_JavaScript_Prompt_STR},
3583 + {MSG_JavaScript_PromptOK,(STRPTR)MSG_JavaScript_PromptOK_STR},
3584 + {MSG_JavaScript_PromptCancel,(STRPTR)MSG_JavaScript_PromptCancel_STR},
3585 + {MSG_RequestPolicy_Title,(STRPTR)MSG_RequestPolicy_Title_STR},
3586 + {MSG_RequestPolicy_Message,(STRPTR)MSG_RequestPolicy_Message_STR},
3587 + {MSG_RequestPolicy_Options,(STRPTR)MSG_RequestPolicy_Options_STR},
3588 + {MSG_RequestCredentials_Title,(STRPTR)MSG_RequestCredentials_Title_STR},
3589 + {MSG_RequestCredentials_Message,(STRPTR)MSG_RequestCredentials_Message_STR},
3590 + {MSG_RequestCredentials_Username,(STRPTR)MSG_RequestCredentials_Username_STR},
3591 + {MSG_RequestCredentials_Password,(STRPTR)MSG_RequestCredentials_Password_STR},
3592 + {MSG_RequestCredentials_OK,(STRPTR)MSG_RequestCredentials_OK_STR},
3593 + {MSG_RequestCredentials_Cancel,(STRPTR)MSG_RequestCredentials_Cancel_STR},
3594 + {MSG_BookmarkManager_Title,(STRPTR)MSG_BookmarkManager_Title_STR},
3595 + {MSG_BookmarkManager_Label,(STRPTR)MSG_BookmarkManager_Label_STR},
3596 + {MSG_BookmarkManager_URL,(STRPTR)MSG_BookmarkManager_URL_STR},
3597 + {MSG_BookmarkManager_Insert,(STRPTR)MSG_BookmarkManager_Insert_STR},
3598 + {MSG_BookmarkManager_Change,(STRPTR)MSG_BookmarkManager_Change_STR},
3599 + {MSG_BookmarkManager_Remove,(STRPTR)MSG_BookmarkManager_Remove_STR},
3600 + {MSG_BookmarkManager_MenuTitle,(STRPTR)MSG_BookmarkManager_MenuTitle_STR},
3601 + {MSG_BookmarkManager_MoveUp,(STRPTR)MSG_BookmarkManager_MoveUp_STR},
3602 + {MSG_BookmarkManager_MoveDown,(STRPTR)MSG_BookmarkManager_MoveDown_STR},
3603 + {MSG_MainMenu_File,(STRPTR)MSG_MainMenu_File_STR},
3604 + {MSG_MainMenu_OpenNewTab,(STRPTR)MSG_MainMenu_OpenNewTab_STR},
3605 + {MSG_MainMenu_OpenNewWindow,(STRPTR)MSG_MainMenu_OpenNewWindow_STR},
3606 + {MSG_MainMenu_OpenFile,(STRPTR)MSG_MainMenu_OpenFile_STR},
3607 + {MSG_MainMenu_CloseCurrentTab,(STRPTR)MSG_MainMenu_CloseCurrentTab_STR},
3608 + {MSG_MainMenu_CloseWindow,(STRPTR)MSG_MainMenu_CloseWindow_STR},
3609 + {MSG_MainMenu_Quit,(STRPTR)MSG_MainMenu_Quit_STR},
3610 + {MSG_MainMenu_Edit,(STRPTR)MSG_MainMenu_Edit_STR},
3611 + {MSG_MainMenu_Find,(STRPTR)MSG_MainMenu_Find_STR},
3612 + {MSG_MainMenu_FindNext,(STRPTR)MSG_MainMenu_FindNext_STR},
3613 + {MSG_MainMenu_Preferences,(STRPTR)MSG_MainMenu_Preferences_STR},
3614 + {MSG_MainMenu_Tools,(STRPTR)MSG_MainMenu_Tools_STR},
3615 + {MSG_MainMenu_BookmarkManager,(STRPTR)MSG_MainMenu_BookmarkManager_STR},
3616 + {MSG_MainMenu_DownloadManager,(STRPTR)MSG_MainMenu_DownloadManager_STR},
3617 + {MSG_MainMenu_Cut,(STRPTR)MSG_MainMenu_Cut_STR},
3618 + {MSG_MainMenu_Copy,(STRPTR)MSG_MainMenu_Copy_STR},
3619 + {MSG_MainMenu_Paste,(STRPTR)MSG_MainMenu_Paste_STR},
3620 + {MSG_MainMenu_View,(STRPTR)MSG_MainMenu_View_STR},
3621 + {MSG_MainMenu_ZoomIn,(STRPTR)MSG_MainMenu_ZoomIn_STR},
3622 + {MSG_MainMenu_ZoomOut,(STRPTR)MSG_MainMenu_ZoomOut_STR},
3623 + {MSG_MainMenu_ZoomReset,(STRPTR)MSG_MainMenu_ZoomReset_STR},
3624 + {MSG_MainMenu_ViewSource,(STRPTR)MSG_MainMenu_ViewSource_STR},
3625 + {0,NULL}
3628 +#endif /* CATCOMP_ARRAY */
3630 +/***************************************************************/
3633 +#ifdef CATCOMP_BLOCK
3635 +//static const chat CatCompBlock[] =
3636 +//{
3637 +//
3638 +//};
3640 +#endif /* CATCOMP_BLOCK */
3642 +/***************************************************************/
3644 +struct LocaleInfo
3646 + APTR li_LocaleBase;
3647 + APTR li_Catalog;
3651 +#ifdef CATCOMP_CODE
3653 +STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
3655 + LONG *l;
3656 + UWORD *w;
3657 + STRPTR builtIn;
3659 + l = (LONG *)CatCompBlock;
3661 + while (*l != stringNum)
3663 + w = (UWORD *)((IPTR)l + 4);
3664 + l = (LONG *)((IPTR)l + (LONG)*w + 6);
3666 + builtIn = (STRPTR)((IPTR)l + 6);
3668 +#define XLocaleBase LocaleBase
3669 +#define LocaleBase li->li_LocaleBase
3671 + if (LocaleBase)
3672 + return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
3673 +#define LocaleBase XLocaleBase
3674 +#undef XLocaleBase
3676 + return (builtIn);
3679 +#endif /* CATCOMP_CODE */
3681 +/***************************************************************/
3684 +#endif
3685 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Internationalization/WebCore/CMakeLists.txt
3686 --- OWB-r1097/BAL/Internationalization/WebCore/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
3687 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
3688 @@ -37,6 +37,12 @@
3689 aux_source_directory(${BAL_DIR}/Internationalization/WebCore/Generic WEBCORE_SRC)
3690 endif(USE_I18N_GENERIC)
3692 +if(USE_GRAPHICS_AROS)
3693 + create_include_link(${BAL_DIR}/Internationalization/WebCore/AROS BAL)
3695 + aux_source_directory(${BAL_DIR}/Internationalization/WebCore/AROS WEBCORE_SRC)
3696 +endif(USE_GRAPHICS_AROS)
3698 if(USE_I18N_QT)
3699 create_include_link(${BAL_DIR}/Internationalization/WebCore/Qt BAL)
3700 create_include_link(${BAL_DIR}/Internationalization/WebCore/Qt BAL/qt)
3701 diff -ruN OWB-r1097/BAL/Internationalization/WebCore/ICU/BCTextEncodingDetectorICU.cpp OWB-r1097.aros/BAL/Internationalization/WebCore/ICU/BCTextEncodingDetectorICU.cpp
3702 --- OWB-r1097/BAL/Internationalization/WebCore/ICU/BCTextEncodingDetectorICU.cpp 2009-03-27 17:37:38.000000000 +0000
3703 +++ OWB-r1097.aros/BAL/Internationalization/WebCore/ICU/BCTextEncodingDetectorICU.cpp 2018-06-13 07:27:37.570979727 +0100
3704 @@ -53,7 +53,7 @@
3705 UNUSED_PARAM(hintEncodingName);
3706 return false;
3707 #else
3708 - int matchesCount = 0;
3709 + int32_t matchesCount = 0;
3710 UErrorCode status = U_ZERO_ERROR;
3711 UCharsetDetector* detector = ucsdet_open(&status);
3712 if (U_FAILURE(status))
3713 diff -ruN OWB-r1097/BAL/Media/WebCore/AROS/BCSoundAROS.cpp OWB-r1097.aros/BAL/Media/WebCore/AROS/BCSoundAROS.cpp
3714 --- OWB-r1097/BAL/Media/WebCore/AROS/BCSoundAROS.cpp 1970-01-01 01:00:00.000000000 +0100
3715 +++ OWB-r1097.aros/BAL/Media/WebCore/AROS/BCSoundAROS.cpp 2018-06-13 07:27:37.570979727 +0100
3716 @@ -0,0 +1,42 @@
3718 + * Copyright (C) 2009 Stanislaw Szymczyk
3719 + * Copyright (C) 2008 Pleyo. All rights reserved.
3721 + * Redistribution and use in source and binary forms, with or without
3722 + * modification, are permitted provided that the following conditions
3723 + * are met:
3725 + * 1. Redistributions of source code must retain the above copyright
3726 + * notice, this list of conditions and the following disclaimer.
3727 + * 2. Redistributions in binary form must reproduce the above copyright
3728 + * notice, this list of conditions and the following disclaimer in the
3729 + * documentation and/or other materials provided with the distribution.
3730 + * 3. Neither the name of Pleyo nor the names of
3731 + * its contributors may be used to endorse or promote products derived
3732 + * from this software without specific prior written permission.
3734 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
3735 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3736 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3737 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
3738 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3739 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3740 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3741 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3742 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3743 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3744 + */
3746 +#include "config.h"
3748 +#include "Sound.h"
3749 +#include <proto/intuition.h>
3751 +namespace WebCore {
3753 +void systemBeep()
3755 + DisplayBeep(NULL);
3759 diff -ruN OWB-r1097/BAL/Media/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Media/WebCore/CMakeLists.txt
3760 --- OWB-r1097/BAL/Media/WebCore/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
3761 +++ OWB-r1097.aros/BAL/Media/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
3762 @@ -39,3 +39,7 @@
3763 endif(ENABLE_VIDEO)
3764 aux_source_directory(${BAL_DIR}/Media/WebCore/SDL WEBCORE_SRC)
3765 endif(USE_GRAPHICS_SDL)
3767 +if(USE_GRAPHICS_AROS)
3768 + aux_source_directory(${BAL_DIR}/Media/WebCore/AROS WEBCORE_SRC)
3769 +endif(USE_GRAPHICS_AROS)
3770 diff -ruN OWB-r1097/BAL/Memory/WTF/BCFastMallocWTF.cpp OWB-r1097.aros/BAL/Memory/WTF/BCFastMallocWTF.cpp
3771 --- OWB-r1097/BAL/Memory/WTF/BCFastMallocWTF.cpp 2009-10-05 11:36:03.000000000 +0100
3772 +++ OWB-r1097.aros/BAL/Memory/WTF/BCFastMallocWTF.cpp 2018-06-13 07:27:37.570979727 +0100
3773 @@ -192,10 +192,11 @@
3774 #if FORCE_SYSTEM_MALLOC
3776 #include <stdlib.h>
3777 -#if !PLATFORM(WIN_OS)
3778 - #include <pthread.h>
3779 -#else
3780 +#if PLATFORM(WIN_OS)
3781 #include "windows.h"
3782 +#elif PLATFORM(AROS)
3783 +#else
3784 + #include <pthread.h>
3785 #endif
3787 namespace WTF {
3788 diff -ruN OWB-r1097/BAL/Memory/WTF/BCTCSystemAllocWTF.cpp OWB-r1097.aros/BAL/Memory/WTF/BCTCSystemAllocWTF.cpp
3789 --- OWB-r1097/BAL/Memory/WTF/BCTCSystemAllocWTF.cpp 2009-07-29 12:38:23.000000000 +0100
3790 +++ OWB-r1097.aros/BAL/Memory/WTF/BCTCSystemAllocWTF.cpp 2018-06-13 07:27:37.570979727 +0100
3791 @@ -52,8 +52,10 @@
3792 #else
3793 #include <errno.h>
3794 #include <unistd.h>
3795 +#if !PLATFORM(AROS)
3796 #include <sys/mman.h>
3797 #endif
3798 +#endif
3800 #ifndef MAP_ANONYMOUS
3801 #define MAP_ANONYMOUS MAP_ANON
3802 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCAuthenticationChallengeCurl.h OWB-r1097.aros/BAL/Network/WebCore/Curl/BCAuthenticationChallengeCurl.h
3803 --- OWB-r1097/BAL/Network/WebCore/Curl/BCAuthenticationChallengeCurl.h 2008-12-10 09:32:50.000000000 +0000
3804 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCAuthenticationChallengeCurl.h 2018-06-13 07:27:37.570979727 +0100
3805 @@ -39,8 +39,9 @@
3809 - AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
3810 + AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error, ResourceHandle* sourceHandle)
3811 : AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
3812 + , m_sourceHandle(sourceHandle)
3816 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCCookieManagerCurl.cpp OWB-r1097.aros/BAL/Network/WebCore/Curl/BCCookieManagerCurl.cpp
3817 --- OWB-r1097/BAL/Network/WebCore/Curl/BCCookieManagerCurl.cpp 2009-10-16 19:40:05.000000000 +0100
3818 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCCookieManagerCurl.cpp 2018-06-13 07:27:37.570979727 +0100
3819 @@ -79,7 +79,7 @@
3820 bool CookieManager::shouldRejectForSecurityReason(const ParsedCookie* cookie, const KURL& url)
3822 // Check if path attribute is a prefix of the request URI.
3823 - if (!cookie->path().endsWith(url.path()) == -1) {
3824 + if (!url.path().startsWith(cookie->path())) {
3825 LOG_ERROR("Cookie %s is rejected because its path does not math the URL %s\n", cookie->toString().utf8().data(), url.string().utf8().data());
3826 return true;
3828 @@ -117,8 +117,8 @@
3829 if (url.string().startsWith(httpsPrefix, false))
3830 isConnectionSecure = true;
3832 - // The max size is the number of cookie per host multiplied by the maximum length of a cookie. We add 1 for the final '\0'.
3833 - static const size_t cookiesMaxLength = s_maxCookieLength * s_maxCookieCountPerHost + 1;
3834 + // The max size is the number of cookie per host multiplied by the maximum length of a cookie with a space appended. We add 1 for the final '\0'.
3835 + static const size_t cookiesMaxLength = (s_maxCookieLength + 1) * s_maxCookieCountPerHost + 1;
3836 Vector<UChar> cookiePairs;
3837 cookiePairs.reserveInitialCapacity(cookiesMaxLength);
3838 for (HashMap<String, CookieMap*>::iterator it = m_managerMap.begin(); it != m_managerMap.end(); ++it) {
3839 @@ -134,6 +134,7 @@
3840 if (url.path().startsWith(cookie->path(), false) && (isConnectionSecure || !cookie->isSecure()) && (filter == WithHttpOnlyCookies || !cookie->isHttpOnly())) {
3841 String nameValuePair = cookie->toNameValuePair();
3842 append(cookiePairs, nameValuePair);
3843 + cookiePairs.append(' ');
3847 @@ -141,6 +142,10 @@
3848 // Per construction of our cookies, we should not grow our vector.
3849 ASSERT(cookiePairs.capacity() == cookiesMaxLength);
3851 + // remove the unnecessary final cookie separating space
3852 + if (cookiePairs.size() > 0)
3853 + cookiePairs.removeLast();
3855 // Append the final '\0'.
3856 static const String nullTerminator("\0");
3857 append(cookiePairs, nullTerminator);
3858 @@ -161,8 +166,11 @@
3860 void CookieManager::setCookieJar(const char* fileName)
3862 + if(m_cookieJarFileName == fileName)
3863 + return;
3864 m_cookieJarFileName = String(fileName);
3865 cookieBackingStore().open(m_cookieJarFileName);
3866 + getBackingStoreCookies();
3869 void CookieManager::checkAndTreatCookie(ParsedCookie* cookie)
3870 @@ -251,9 +259,10 @@
3871 for (size_t i = 0; i < cookies.size(); ++i) {
3872 ParsedCookie* newCookie = cookies[i];
3874 - if (newCookie->hasExpired())
3875 + if (newCookie->hasExpired()) {
3876 + cookieBackingStore().remove(newCookie);
3877 delete newCookie;
3878 - else {
3879 + } else {
3880 CookieMap* curMap = m_managerMap.get(newCookie->domain());
3881 if (!curMap) {
3882 curMap = new CookieMap();
3883 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCCookieParserCurl.cpp OWB-r1097.aros/BAL/Network/WebCore/Curl/BCCookieParserCurl.cpp
3884 --- OWB-r1097/BAL/Network/WebCore/Curl/BCCookieParserCurl.cpp 2009-08-14 16:35:00.000000000 +0100
3885 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCCookieParserCurl.cpp 2018-06-13 07:27:37.570979727 +0100
3886 @@ -316,9 +316,16 @@
3887 if (!res->domain() || !res->domain().length())
3888 res->setDomain("." + m_defaultCookieURL.host());
3890 - // If no path was provided, set it to the host's path
3891 - if (!res->path() || !res->path().length())
3892 - res->setPath(m_defaultCookieURL.path());
3893 + // If no path was provided, set it to the host's path up to the last slash
3894 + if (!res->path() || !res->path().length()) {
3895 + String cookiePath = m_defaultCookieURL.path();
3896 + int lastSlashLocation = cookiePath.reverseFind('/');
3897 + if (lastSlashLocation > 0) {
3898 + res->setPath(cookiePath.substring(0, lastSlashLocation));
3899 + } else {
3900 + res->setPath("/");
3904 return res;
3906 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.cpp OWB-r1097.aros/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.cpp
3907 --- OWB-r1097/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.cpp 2008-12-10 09:32:50.000000000 +0000
3908 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.cpp 2018-06-13 07:27:37.570979727 +0100
3909 @@ -110,4 +110,14 @@
3910 return m_formDataElementIndex < elements.size();
3913 +void FormDataStream::rewind()
3915 + if (m_file) {
3916 + fclose(m_file);
3917 + m_file = 0;
3919 + m_formDataElementIndex = 0;
3920 + m_formDataElementDataOffset = 0;
3923 } // namespace WebCore
3924 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.h OWB-r1097.aros/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.h
3925 --- OWB-r1097/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.h 2008-12-10 09:32:50.000000000 +0000
3926 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCFormDataStreamCurl.h 2018-06-13 07:27:37.570979727 +0100
3927 @@ -47,6 +47,7 @@
3929 size_t read(void* ptr, size_t blockSize, size_t numberOfBlocks);
3930 bool hasMoreElements() const;
3931 + void rewind();
3933 private:
3934 // We can hold a weak reference to our ResourceHandle as it holds a strong reference
3935 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCResourceHandleCurl.cpp OWB-r1097.aros/BAL/Network/WebCore/Curl/BCResourceHandleCurl.cpp
3936 --- OWB-r1097/BAL/Network/WebCore/Curl/BCResourceHandleCurl.cpp 2009-10-16 19:40:05.000000000 +0100
3937 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCResourceHandleCurl.cpp 2018-06-13 07:27:37.570979727 +0100
3938 @@ -238,20 +238,87 @@
3939 response = syncLoader.resourceResponse();
3942 -//stubs needed for windows version
3943 -void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&)
3944 +void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
3946 - notImplemented();
3947 + /* FIXME: add support for FTP, HTTPS, and FTPS authentication,
3948 + * get the right port, server and authentication scheme
3949 + */
3950 + ResourceHandleInternal* d = getInternal();
3951 + if (d->m_continueWithoutCredential)
3952 + return;
3954 + cancel();
3956 + ProtectionSpace protectionSpace;
3957 + unsigned previousFailureCount = 0;
3958 + if (challenge.isNull()) {
3959 + String authHeader = d->m_response.httpHeaderField("WWW-Authenticate");
3960 + String authType;
3961 + String realm;
3962 + int splitPos = authHeader.find(' ');
3963 + if(splitPos != -1)
3964 + authType = authHeader.left(splitPos).stripWhiteSpace();
3965 + Vector<String> authParams;
3966 + authHeader.substring(splitPos+1).stripWhiteSpace().split(",", authParams);
3967 + for(Vector<String>::iterator it = authParams.begin(); it != authParams.end(); it++)
3969 + if((*it).startsWith("realm=", false))
3970 + realm = (*it).substring(6);
3973 + ProtectionSpaceAuthenticationScheme protectionScheme = ProtectionSpaceAuthenticationSchemeDefault;
3974 + if(authType.lower() == "basic")
3975 + protectionScheme = ProtectionSpaceAuthenticationSchemeHTTPBasic;
3976 + else if(authType.lower() == "digest")
3977 + protectionScheme = ProtectionSpaceAuthenticationSchemeHTTPDigest;
3979 + protectionSpace = ProtectionSpace(d->m_request.url().host(),
3980 + 80,
3981 + ProtectionSpaceServerHTTP,
3982 + realm,
3983 + protectionScheme);
3984 + } else {
3985 + protectionSpace = d->m_webChallenge.protectionSpace();
3986 + previousFailureCount = d->m_webChallenge.previousFailureCount()+1;
3989 + d->m_webChallenge = AuthenticationChallenge(protectionSpace,
3990 + challenge.proposedCredential(),
3991 + previousFailureCount,
3992 + d->m_response,
3993 + challenge.error(),
3994 + this);
3996 + if (d->client())
3997 + d->client()->didReceiveAuthenticationChallenge(this, d->m_webChallenge);
4000 -void ResourceHandle::receivedCredential(const AuthenticationChallenge&, const Credential&)
4001 +void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge, const Credential& credential)
4003 - notImplemented();
4004 + ASSERT(!challenge.isNull());
4005 + ResourceHandleInternal* d = getInternal();
4006 + if (challenge != d->m_webChallenge)
4007 + return;
4009 + d->m_webChallenge = AuthenticationChallenge(challenge.protectionSpace(),
4010 + credential,
4011 + challenge.previousFailureCount(),
4012 + challenge.failureResponse(),
4013 + challenge.error(),
4014 + this);
4016 + ResourceHandleManager::sharedInstance()->add(this);
4019 -void ResourceHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
4020 +void ResourceHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& challenge)
4022 - notImplemented();
4023 + ASSERT(!challenge.isNull());
4024 + ResourceHandleInternal* d = getInternal();
4025 + if (challenge != d->m_webChallenge)
4026 + return;
4028 + d->m_continueWithoutCredential = true;
4029 + ResourceHandleManager::sharedInstance()->add(this);
4032 void ResourceHandle::receivedCancellation(const AuthenticationChallenge&)
4033 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.cpp OWB-r1097.aros/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.cpp
4034 --- OWB-r1097/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.cpp 2009-10-16 19:40:05.000000000 +0100
4035 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.cpp 2018-06-13 07:27:37.570979727 +0100
4036 @@ -50,13 +50,18 @@
4037 #include <wtf/Threading.h>
4038 #include <wtf/Vector.h>
4040 +#if PLATFORM(AROS)
4041 + #include <proto/bsdsocket.h>
4042 + #include <aros/debug.h>
4043 +#endif
4045 namespace WebCore {
4047 const int selectTimeoutMS = 5;
4048 -const double pollTimeSeconds = 0.05;
4049 -const int maxRunningJobs = 5;
4050 +const double pollTimeSeconds = 0.001;
4051 +const int maxRunningJobs = 10;
4053 -static const bool ignoreSSLErrors = getenv("WEBKIT_IGNORE_SSL_ERRORS");
4054 +static const bool ignoreSSLErrors = true; // getenv("WEBKIT_IGNORE_SSL_ERRORS");
4056 static CString certificatePath()
4058 @@ -185,6 +190,16 @@
4059 if (CURLE_OK == err && httpCode >= 300 && httpCode < 400)
4060 return totalSize;
4062 + // authentication challenge must be issued in write callback because
4063 + // during digest authentication server sends 401 followed by 200 and
4064 + // there's no way to know in header callback whether authentication
4065 + // succeeded or not
4066 + if (CURLE_OK == err && httpCode == 401 && d->m_response.isHTTP())
4068 + job->didReceiveAuthenticationChallenge(d->m_webChallenge);
4069 + return totalSize;
4072 if (!d->m_response.responseFired()) {
4073 handleLocalReceiveResponse(h, job, d);
4074 if (d->m_cancelled)
4075 @@ -249,6 +264,10 @@
4076 d->m_response.setTextEncodingName(extractCharsetFromMediaType(d->m_response.httpHeaderField("Content-Type")));
4077 d->m_response.setSuggestedFilename(filenameFromHTTPContentDisposition(d->m_response.httpHeaderField("Content-Disposition")));
4079 + // HTTP authentication happens in writeCallback()
4080 + if (httpCode == 401 && d->m_response.isHTTP())
4081 + return totalSize;
4083 // HTTP redirection
4084 if (httpCode >= 300 && httpCode < 400) {
4085 String location = d->m_response.httpHeaderField("location");
4086 @@ -277,6 +296,15 @@
4087 return totalSize;
4090 + // Ignore "100: Continue" as it's means that we should either:
4091 + // * send the remainder of the request (cURL and readCallback() will take care of that), or
4092 + // * ignore this response if the request has already been completed
4093 + // In any case it's not a final server response and shouldn't be treated like one.
4094 + if (httpCode == 100) {
4095 + ASSERT(job->request().httpMethod() == "POST");
4096 + return totalSize;
4099 if (client)
4100 client->didReceiveResponse(job, d->m_response);
4101 d->m_response.setResponseFired(true);
4102 @@ -340,6 +368,21 @@
4103 return sent;
4106 +curlioerr ioctlCallback(CURL *handle, curliocmd cmd, void *data)
4108 + ResourceHandle* job = static_cast<ResourceHandle*>(data);
4109 + ResourceHandleInternal* d = job->getInternal();
4111 + switch(cmd) {
4112 + case CURLIOCMD_RESTARTREAD:
4113 + d->m_formDataStream.rewind();
4114 + break;
4115 + default:
4116 + return CURLIOE_UNKNOWNCMD;
4118 + return CURLIOE_OK;
4121 void ResourceHandleManager::downloadTimerCallback(Timer<ResourceHandleManager>* timer)
4123 startScheduledJobs();
4124 @@ -364,7 +407,11 @@
4125 // and bail out, stopping the file download. So make sure we
4126 // have valid file descriptors before calling select.
4127 if (maxfd >= 0)
4128 +#if PLATFORM(AROS)
4129 + rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
4130 +#else
4131 rc = ::select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
4132 +#endif
4133 } while (rc == -1 && errno == EINTR);
4135 if (-1 == rc) {
4136 @@ -530,11 +577,13 @@
4137 if (sizeof(long long) == expectedSizeOfCurlOffT)
4138 curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDSIZE_LARGE, (long long)size);
4139 else
4140 - curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDSIZE_LARGE, (int)size);
4141 + curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDSIZE, (long)size);
4144 curl_easy_setopt(d->m_handle, CURLOPT_READFUNCTION, readCallback);
4145 curl_easy_setopt(d->m_handle, CURLOPT_READDATA, job);
4146 + curl_easy_setopt(d->m_handle, CURLOPT_IOCTLFUNCTION, ioctlCallback);
4147 + curl_easy_setopt(d->m_handle, CURLOPT_IOCTLDATA, job);
4150 void ResourceHandleManager::add(ResourceHandle* job)
4151 @@ -705,7 +754,13 @@
4152 d->m_response.setMimeType(MIMETypeRegistry::getMIMETypeForPath(url));
4155 + // HTTP Authentication scheduled job cancellation, but it was not done yet, so we do it now
4156 + if(d->m_handle && d->m_cancelled)
4157 + removeFromCurl(job);
4159 d->m_handle = curl_easy_init();
4160 + // HTTP Authentication cancels the job so be sure the new job is not cancelled
4161 + d->m_cancelled = false;
4163 #if LIBCURL_VERSION_NUM > 0x071800
4164 if (d->m_defersLoading) {
4165 @@ -749,6 +804,33 @@
4166 d->m_url = strdup(url.latin1().data());
4167 curl_easy_setopt(d->m_handle, CURLOPT_URL, d->m_url);
4169 + if (!d->m_webChallenge.isNull() && !d->m_continueWithoutCredential) {
4170 + long curlAuth;
4171 + switch(d->m_webChallenge.protectionSpace().authenticationScheme()) {
4172 + case ProtectionSpaceAuthenticationSchemeHTTPDigest:
4173 + curlAuth = CURLAUTH_DIGEST;
4174 + break;
4175 + case ProtectionSpaceAuthenticationSchemeHTTPBasic:
4176 + case ProtectionSpaceAuthenticationSchemeDefault:
4177 + default:
4178 + curlAuth = CURLAUTH_BASIC;
4179 + break;
4182 + Credential credential = d->m_webChallenge.proposedCredential();
4183 + char* userpwd = strdup((credential.user() + ":" + credential.password()).utf8().data());
4185 + curl_easy_setopt(d->m_handle, CURLOPT_HTTPAUTH, curlAuth);
4186 + curl_easy_setopt(d->m_handle, CURLOPT_USERPWD, userpwd);
4187 + m_rememberedCredentials.set(kurl.host(), std::pair<long,char*>(curlAuth, userpwd));
4189 + else if(m_rememberedCredentials.contains(kurl.host()) && !d->m_continueWithoutCredential)
4191 + std::pair<long,char*> authData = m_rememberedCredentials.get(kurl.host());
4192 + curl_easy_setopt(d->m_handle, CURLOPT_HTTPAUTH, authData.first);
4193 + curl_easy_setopt(d->m_handle, CURLOPT_USERPWD, authData.second);
4196 struct curl_slist* headers = 0;
4197 if (job->request().httpHeaderFields().size() > 0) {
4198 HTTPHeaderMap customHeaders = job->request().httpHeaderFields();
4199 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.h OWB-r1097.aros/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.h
4200 --- OWB-r1097/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.h 2009-08-12 21:20:06.000000000 +0100
4201 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/BCResourceHandleManagerCurl.h 2018-06-13 07:27:37.570979727 +0100
4202 @@ -73,6 +73,7 @@
4203 Vector<ResourceHandle*> m_resourceHandleList;
4204 const CString m_certificatePath;
4205 int m_runningJobs;
4206 + HashMap<AtomicString,std::pair<long,char*> > m_rememberedCredentials;
4210 diff -ruN OWB-r1097/BAL/Network/WebCore/Curl/CookieDatabaseBackingStore/BCCookieDatabaseBackingStoreCurl.cpp OWB-r1097.aros/BAL/Network/WebCore/Curl/CookieDatabaseBackingStore/BCCookieDatabaseBackingStoreCurl.cpp
4211 --- OWB-r1097/BAL/Network/WebCore/Curl/CookieDatabaseBackingStore/BCCookieDatabaseBackingStoreCurl.cpp 2009-08-14 16:35:00.000000000 +0100
4212 +++ OWB-r1097.aros/BAL/Network/WebCore/Curl/CookieDatabaseBackingStore/BCCookieDatabaseBackingStoreCurl.cpp 2018-06-13 07:27:37.570979727 +0100
4213 @@ -131,7 +131,7 @@
4215 // Binds all the values
4216 if (updateStatement.bindText(1, cookie->name()) || updateStatement.bindText(2, cookie->value())
4217 - || updateStatement.bindText(3, cookie->path()) || updateStatement.bindText(4, cookie->domain())
4218 + || updateStatement.bindText(3, cookie->domain()) || updateStatement.bindText(4, cookie->path())
4219 || updateStatement.bindDouble(5, cookie->expiry()) || updateStatement.bindDouble(6, cookie->lastAccessed())
4220 || updateStatement.bindInt64(7, cookie->isSecure()) || updateStatement.bindInt64(8, cookie->isHttpOnly())) {
4221 LOG_ERROR("Cannot update cookie");
4222 diff -ruN OWB-r1097/BAL/Network/WebCore/WK/BCResourceHandleInternalWK.h OWB-r1097.aros/BAL/Network/WebCore/WK/BCResourceHandleInternalWK.h
4223 --- OWB-r1097/BAL/Network/WebCore/WK/BCResourceHandleInternalWK.h 2009-09-16 16:49:28.000000000 +0100
4224 +++ OWB-r1097.aros/BAL/Network/WebCore/WK/BCResourceHandleInternalWK.h 2018-06-13 07:27:37.570979727 +0100
4225 @@ -108,6 +108,8 @@
4226 , m_shouldIncludeExpectHeader(true)
4227 , m_cancelled(false)
4228 , m_formDataStream(loader)
4229 + , m_webChallenge()
4230 + , m_continueWithoutCredential(false)
4231 #endif
4232 #if USE(SOUP)
4233 , m_msg(0)
4234 @@ -192,6 +194,8 @@
4236 FormDataStream m_formDataStream;
4237 Vector<char> m_postBytes;
4238 + AuthenticationChallenge m_webChallenge;
4239 + bool m_continueWithoutCredential;
4240 #endif
4241 #if USE(SOUP)
4242 SoupMessage* m_msg;
4243 diff -ruN OWB-r1097/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.cpp OWB-r1097.aros/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.cpp
4244 --- OWB-r1097/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.cpp 1970-01-01 01:00:00.000000000 +0100
4245 +++ OWB-r1097.aros/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4246 @@ -0,0 +1,165 @@
4248 + * Copyright (C) 2009 Stanislaw Szymczyk
4249 + * Copyright (C) 2008 Pleyo. All rights reserved.
4251 + * Redistribution and use in source and binary forms, with or without
4252 + * modification, are permitted provided that the following conditions
4253 + * are met:
4255 + * 1. Redistributions of source code must retain the above copyright
4256 + * notice, this list of conditions and the following disclaimer.
4257 + * 2. Redistributions in binary form must reproduce the above copyright
4258 + * notice, this list of conditions and the following disclaimer in the
4259 + * documentation and/or other materials provided with the distribution.
4260 + * 3. Neither the name of Pleyo nor the names of
4261 + * its contributors may be used to endorse or promote products derived
4262 + * from this software without specific prior written permission.
4264 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4265 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4266 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4267 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4268 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4269 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4270 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4271 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4272 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4273 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4274 + */
4275 +#include "config.h"
4276 +#include "SharedTimer.h"
4278 +#include "CurrentTime.h"
4279 +#include <wtf/Assertions.h>
4280 +#include <assert.h>
4281 +#include <signal.h>
4282 +#include <sys/time.h>
4283 +#include <stdio.h>
4284 +#include "Platform.h"
4286 +#include <proto/exec.h>
4287 +#include <devices/timer.h>
4289 +namespace WebCore {
4291 +void (*sharedTimerFiredFunction)() = NULL;
4293 +// Single timer, shared to implement all the timers managed by the Timer class.
4294 +// Not intended to be used directly; use the Timer class instead.
4296 +#if !PLATFORM(GTK)
4297 +/**
4298 + * Macro to use to protect code from firing timers.
4299 + * This ensures that there is no concurrent access on ressource and prevent deadlocks.
4300 + */
4301 +#define ENTER_CRITICAL_SECTION
4303 +#define LEAVE_CRITICAL_SECTION
4306 +static unsigned int m_count = 0;
4307 +/**
4308 + * We absolutely need to protect these 2 functions in a critical section.
4309 + * Signals/timers will increment count, event loop will decrement it: 2 concurrent accesses.
4310 + * Increment is usually done in 3 machine instructions, so there's room for a concurrent access.
4311 + * See ticket #123. Maybe we should put timers in a separate thread to be able to use mutexes.
4312 + */
4313 +void incrementTimerCount()
4315 + ENTER_CRITICAL_SECTION;
4316 + m_count++;
4317 + LEAVE_CRITICAL_SECTION;
4320 +void fireTimerIfNeeded()
4322 + ENTER_CRITICAL_SECTION;
4323 + if (m_count>0) {
4324 + m_count--;
4325 + sharedTimerFiredFunction();
4327 + LEAVE_CRITICAL_SECTION;
4329 +#endif
4331 +static unsigned timerint_func(struct ExceptionContext *Context, struct ExecBase *SysBase, void *UserData)
4333 + if (sharedTimerFiredFunction)
4334 + incrementTimerCount();
4335 + return 0;
4338 +static struct MsgPort *mp = NULL;
4339 +static struct timerequest *timereq = NULL;
4340 +static struct Interrupt timerint = { { NULL, NULL, 0, NT_UNKNOWN, "OWB shared timer int" }, NULL, (void (*)(void)) timerint_func };
4342 +static void cleanup(void)
4344 + AbortIO((struct IORequest *)timereq);
4345 + CloseDevice((struct IORequest *)timereq);
4346 + DeleteIORequest((struct IORequest *) timereq);
4347 + DeleteMsgPort(mp);
4350 +void setSharedTimerFiredFunction(void (*f)())
4352 + if ( NULL == sharedTimerFiredFunction )
4354 + sharedTimerFiredFunction = f;
4356 + mp = (struct MsgPort *) CreateMsgPort();
4357 + mp->mp_Flags = PA_SOFTINT;
4358 + mp->mp_SoftInt = &timerint;
4359 + if (mp)
4361 + timereq = (struct timerequest *) CreateIORequest(mp, sizeof (struct timerequest));
4362 + if (timereq)
4364 + if(OpenDevice("timer.device", UNIT_MICROHZ, (struct IORequest *) timereq, 0) == 0)
4366 + timereq->tr_node.io_Command = TR_ADDREQUEST;
4367 + timereq->tr_time.tv_secs = 1;
4368 + timereq->tr_time.tv_micro = 0;
4370 + atexit(cleanup);
4371 + return;
4373 + DeleteIORequest((struct IORequest *) timereq);
4374 + timereq = NULL;
4376 + DeleteMsgPort(mp);
4378 + fprintf(stderr, "couldn't create shared timer\n");
4379 + exit(1);
4383 +// The fire time is relative to the classic POSIX epoch of January 1, 1970,
4384 +// as the result of currentTime() is.
4385 +void setSharedTimerFireTime(double fireTime)
4387 + assert(sharedTimerFiredFunction);
4389 + double interval = fireTime - currentTime();
4390 + unsigned intervalInUS = 0;
4391 + if (interval > 0) {
4392 + interval = interval * 1000 * 1000;
4393 + intervalInUS = static_cast<unsigned>(interval);
4396 + if (intervalInUS < 10 * 1000) // min. time 1/100 sec.
4397 + intervalInUS = 10 * 1000;
4399 + stopSharedTimer();
4401 + timereq->tr_time.tv_secs = intervalInUS / (1000 * 1000);
4402 + timereq->tr_time.tv_micro = intervalInUS % (1000 * 1000);
4403 + SendIO((struct IORequest *) timereq);
4406 +void stopSharedTimer()
4408 + AbortIO((struct IORequest *)timereq);
4412 diff -ruN OWB-r1097/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.h OWB-r1097.aros/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.h
4413 --- OWB-r1097/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.h 1970-01-01 01:00:00.000000000 +0100
4414 +++ OWB-r1097.aros/BAL/Timer/WebCore/AROS/BCSharedTimerAROS.h 2018-06-13 07:27:37.570979727 +0100
4415 @@ -0,0 +1,86 @@
4417 + * Copyright (C) 2008 Pleyo. All rights reserved.
4419 + * Redistribution and use in source and binary forms, with or without
4420 + * modification, are permitted provided that the following conditions
4421 + * are met:
4423 + * 1. Redistributions of source code must retain the above copyright
4424 + * notice, this list of conditions and the following disclaimer.
4425 + * 2. Redistributions in binary form must reproduce the above copyright
4426 + * notice, this list of conditions and the following disclaimer in the
4427 + * documentation and/or other materials provided with the distribution.
4428 + * 3. Neither the name of Pleyo nor the names of
4429 + * its contributors may be used to endorse or promote products derived
4430 + * from this software without specific prior written permission.
4432 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4433 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4434 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4435 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4436 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4437 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4438 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4439 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4440 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4441 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4442 + */
4444 +#ifndef SharedTimer_h
4445 +#define SharedTimer_h
4447 +#include "wtf/Platform.h"
4449 +namespace WebCore {
4451 + // Each thread has its own single instance of shared timer, which implements this interface.
4452 + // This instance is shared by all timers in the thread.
4453 + // Not intended to be used directly; use the Timer class instead.
4454 + class SharedTimer {
4455 + public:
4456 + virtual ~SharedTimer() {}
4457 + virtual void setFiredFunction(void (*)()) = 0;
4459 + // The fire time is relative to the classic POSIX epoch of January 1, 1970,
4460 + // as the result of currentTime() is.
4461 + virtual void setFireTime(double) = 0;
4462 + virtual void stop() = 0;
4463 + };
4466 + // Single timer, shared to implement all the timers managed by the Timer class.
4467 + // Not intended to be used directly; use the Timer class instead.
4469 + void setSharedTimerFiredFunction(void (*)());
4471 + // The fire time is relative to the classic POSIX epoch of January 1, 1970,
4472 + // as the result of currentTime() is.
4474 + void setSharedTimerFireTime(double fireTime);
4475 + void stopSharedTimer();
4477 +#if !PLATFORM(GTK)
4478 + void fireTimerIfNeeded();
4479 +#endif
4481 + // Implementation of SharedTimer for the main thread.
4482 + class MainThreadSharedTimer : public SharedTimer {
4483 + public:
4484 + virtual void setFiredFunction(void (*function)())
4486 + setSharedTimerFiredFunction(function);
4489 + virtual void setFireTime(double fireTime)
4491 + setSharedTimerFireTime(fireTime);
4494 + virtual void stop()
4496 + stopSharedTimer();
4498 + };
4501 +#endif
4502 diff -ruN OWB-r1097/BAL/Timer/WebCore/AROS/BCSystemTimeAROS.cpp OWB-r1097.aros/BAL/Timer/WebCore/AROS/BCSystemTimeAROS.cpp
4503 --- OWB-r1097/BAL/Timer/WebCore/AROS/BCSystemTimeAROS.cpp 1970-01-01 01:00:00.000000000 +0100
4504 +++ OWB-r1097.aros/BAL/Timer/WebCore/AROS/BCSystemTimeAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4505 @@ -0,0 +1,41 @@
4507 + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
4508 + * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
4509 + * All rights reserved.
4511 + * Redistribution and use in source and binary forms, with or without
4512 + * modification, are permitted provided that the following conditions
4513 + * are met:
4514 + * 1. Redistributions of source code must retain the above copyright
4515 + * notice, this list of conditions and the following disclaimer.
4516 + * 2. Redistributions in binary form must reproduce the above copyright
4517 + * notice, this list of conditions and the following disclaimer in the
4518 + * documentation and/or other materials provided with the distribution.
4520 + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
4521 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4522 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
4523 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
4524 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
4525 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
4526 + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
4527 + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
4528 + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4529 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4530 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4531 + */
4533 +#include "config.h"
4534 +#include "SystemTime.h"
4535 +#include "NotImplemented.h"
4537 +#include <float.h>
4539 +namespace WebCore {
4541 +float userIdleTime()
4543 + notImplemented();
4544 + return FLT_MAX;
4547 diff -ruN OWB-r1097/BAL/Timer/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Timer/WebCore/CMakeLists.txt
4548 --- OWB-r1097/BAL/Timer/WebCore/CMakeLists.txt 2009-03-09 15:37:11.000000000 +0000
4549 +++ OWB-r1097.aros/BAL/Timer/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
4550 @@ -18,3 +18,7 @@
4551 aux_source_directory(${BAL_DIR}/Timer/WebCore/Qt WEBCORE_SRC)
4552 endif(USE_TIMER_QT)
4554 +if(USE_TIMER_AROS)
4555 + create_include_link(${BAL_DIR}/Timer/WebCore/AROS BAL)
4556 + aux_source_directory(${BAL_DIR}/Timer/WebCore/AROS WEBCORE_SRC)
4557 +endif(USE_TIMER_AROS)
4558 diff -ruN OWB-r1097/BAL/Types/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Types/WebCore/CMakeLists.txt
4559 --- OWB-r1097/BAL/Types/WebCore/CMakeLists.txt 2009-09-15 07:54:14.000000000 +0100
4560 +++ OWB-r1097.aros/BAL/Types/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
4561 @@ -25,3 +25,12 @@
4562 ${TYPES_DIR}/SDL/BCKURLSDL.cpp
4564 endif(USE_GRAPHICS_SDL)
4566 +if(USE_GRAPHICS_AROS)
4567 + create_include_link(${TYPES_DIR}/SDL BAL)
4568 + list(APPEND WEBCORE_SRC
4569 + ${TYPES_DIR}/SDL/BCIconSDL.cpp
4570 + ${TYPES_DIR}/SDL/BCSharedBufferSDL.cpp
4571 + ${TYPES_DIR}/SDL/BCKURLSDL.cpp
4573 +endif(USE_GRAPHICS_AROS)
4574 diff -ruN OWB-r1097/BAL/Types/WTF/BCTCSpinLockWTF.h OWB-r1097.aros/BAL/Types/WTF/BCTCSpinLockWTF.h
4575 --- OWB-r1097/BAL/Types/WTF/BCTCSpinLockWTF.h 2009-10-06 09:13:04.000000000 +0100
4576 +++ OWB-r1097.aros/BAL/Types/WTF/BCTCSpinLockWTF.h 2018-06-13 07:27:37.570979727 +0100
4577 @@ -33,7 +33,7 @@
4578 #ifndef TCMALLOC_INTERNAL_SPINLOCK_H__
4579 #define TCMALLOC_INTERNAL_SPINLOCK_H__
4581 -#if (PLATFORM(X86) || PLATFORM(PPC)) && (COMPILER(GCC) || COMPILER(MSVC))
4582 +#if (!PLATFORM(AROS) && (PLATFORM(X86) || PLATFORM(PPC))) && (COMPILER(GCC) || COMPILER(MSVC))
4584 #include <time.h> /* For nanosleep() */
4586 @@ -191,6 +191,31 @@
4590 +#elif PLATFORM(AROS)
4592 +#include <libraries/thread.h>
4593 +#include <proto/thread.h>
4595 +// AROS version
4596 +struct TCMalloc_SpinLock {
4597 + void *private_lock_;
4599 + inline void Init() {
4600 + if ((private_lock_ = CreateMutex()) == NULL) abort();
4602 + inline void Finalize() {
4603 + DestroyMutex(private_lock_);
4605 + inline void Lock() {
4606 + LockMutex(private_lock_);
4608 + inline void Unlock() {
4609 + UnlockMutex(private_lock_);
4613 +#define SPINLOCK_INITIALIZER { NULL }
4615 #else
4617 #include <pthread.h>
4618 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectAROS.cpp
4619 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectAROS.cpp 1970-01-01 01:00:00.000000000 +0100
4620 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4621 @@ -0,0 +1,40 @@
4623 + * Copyright (C) 2008 Pleyo. All rights reserved.
4625 + * Redistribution and use in source and binary forms, with or without
4626 + * modification, are permitted provided that the following conditions
4627 + * are met:
4629 + * 1. Redistributions of source code must retain the above copyright
4630 + * notice, this list of conditions and the following disclaimer.
4631 + * 2. Redistributions in binary form must reproduce the above copyright
4632 + * notice, this list of conditions and the following disclaimer in the
4633 + * documentation and/or other materials provided with the distribution.
4634 + * 3. Neither the name of Pleyo nor the names of
4635 + * its contributors may be used to endorse or promote products derived
4636 + * from this software without specific prior written permission.
4638 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4639 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4640 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4641 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4642 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4643 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4644 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4645 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4646 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4647 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4648 + */
4650 +#include "config.h"
4651 +#include "AccessibilityObject.h"
4653 +namespace WebCore {
4655 +#if HAVE(ACCESSIBILITY)
4656 +bool AccessibilityObject::accessibilityIgnoreAttachment() const
4658 + return false;
4660 +#endif
4661 +} // namespace WebCore
4662 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectWrapperAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectWrapperAROS.cpp
4663 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectWrapperAROS.cpp 1970-01-01 01:00:00.000000000 +0100
4664 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCAccessibilityObjectWrapperAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4665 @@ -0,0 +1,53 @@
4667 + * Copyright (C) 2008 Pleyo. All rights reserved.
4669 + * Redistribution and use in source and binary forms, with or without
4670 + * modification, are permitted provided that the following conditions
4671 + * are met:
4673 + * 1. Redistributions of source code must retain the above copyright
4674 + * notice, this list of conditions and the following disclaimer.
4675 + * 2. Redistributions in binary form must reproduce the above copyright
4676 + * notice, this list of conditions and the following disclaimer in the
4677 + * documentation and/or other materials provided with the distribution.
4678 + * 3. Neither the name of Pleyo nor the names of
4679 + * its contributors may be used to endorse or promote products derived
4680 + * from this software without specific prior written permission.
4682 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4683 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4684 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4685 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4686 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4687 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4688 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4689 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4690 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4691 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4692 + */
4694 +#include "config.h"
4695 +#include "AccessibilityObject.h"
4696 +#include "RefCounted.h"
4698 +class AccessibilityObjectWrapper {
4702 +namespace WebCore {
4705 +#if HAVE(ACCESSIBILITY)
4706 +AccessibilityObjectWrapper* AccessibilityObject::wrapper() const
4708 + return m_wrapper;
4711 +void AccessibilityObject::setWrapper(AccessibilityObjectWrapper* wrapper)
4713 + m_wrapper = wrapper;
4715 +#endif
4719 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCAXObjectCacheAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCAXObjectCacheAROS.cpp
4720 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCAXObjectCacheAROS.cpp 1970-01-01 01:00:00.000000000 +0100
4721 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCAXObjectCacheAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4722 @@ -0,0 +1,57 @@
4724 + * Copyright (C) 2008 Pleyo. All rights reserved.
4726 + * Redistribution and use in source and binary forms, with or without
4727 + * modification, are permitted provided that the following conditions
4728 + * are met:
4730 + * 1. Redistributions of source code must retain the above copyright
4731 + * notice, this list of conditions and the following disclaimer.
4732 + * 2. Redistributions in binary form must reproduce the above copyright
4733 + * notice, this list of conditions and the following disclaimer in the
4734 + * documentation and/or other materials provided with the distribution.
4735 + * 3. Neither the name of Pleyo nor the names of
4736 + * its contributors may be used to endorse or promote products derived
4737 + * from this software without specific prior written permission.
4739 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4740 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4741 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4742 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4743 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4744 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4745 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4746 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4747 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4748 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4749 + */
4751 +#include "config.h"
4752 +#include "AXObjectCache.h"
4754 +#include "AccessibilityObject.h"
4756 +namespace WebCore {
4758 +#if HAVE(ACCESSIBILITY)
4759 +void AXObjectCache::detachWrapper(AccessibilityObject* obj)
4763 +void AXObjectCache::attachWrapper(AccessibilityObject* obj)
4767 +void AXObjectCache::postNotification(RenderObject*, const String&)
4771 +void AXObjectCache::postNotificationToElement(RenderObject*, const String&)
4775 +void AXObjectCache::handleFocusedUIElementChanged()
4778 +#endif
4779 +} // namespace WebCore
4780 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCClipboardAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCClipboardAROS.cpp
4781 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCClipboardAROS.cpp 1970-01-01 01:00:00.000000000 +0100
4782 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCClipboardAROS.cpp 2018-06-13 07:27:37.570979727 +0100
4783 @@ -0,0 +1,147 @@
4785 + * Copyright (C) 2008 Pleyo. All rights reserved.
4787 + * Redistribution and use in source and binary forms, with or without
4788 + * modification, are permitted provided that the following conditions
4789 + * are met:
4791 + * 1. Redistributions of source code must retain the above copyright
4792 + * notice, this list of conditions and the following disclaimer.
4793 + * 2. Redistributions in binary form must reproduce the above copyright
4794 + * notice, this list of conditions and the following disclaimer in the
4795 + * documentation and/or other materials provided with the distribution.
4796 + * 3. Neither the name of Pleyo nor the names of
4797 + * its contributors may be used to endorse or promote products derived
4798 + * from this software without specific prior written permission.
4800 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4801 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4802 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4803 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4804 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4805 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4806 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4807 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4808 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4809 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4810 + */
4812 +#include "config.h"
4813 +#include "ClipboardAROS.h"
4815 +#include "NotImplemented.h"
4816 +#include "StringHash.h"
4817 +#include "FileList.h"
4819 +#include "Editor.h"
4821 +#include <cstdio>
4823 +namespace WebCore {
4824 +PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
4826 + return ClipboardBal::create(policy, false);
4829 +ClipboardBal::ClipboardBal(ClipboardAccessPolicy policy, bool forDragging)
4830 + : Clipboard(policy, forDragging)
4832 + NotImplemented();
4835 +ClipboardBal::~ClipboardBal()
4837 + NotImplemented();
4840 +void ClipboardBal::clearData(const String&)
4842 + NotImplemented();
4845 +void ClipboardBal::clearAllData()
4847 + NotImplemented();
4850 +String ClipboardBal::getData(const String&, bool &success) const
4852 + NotImplemented();
4853 + success = false;
4854 + return String();
4857 +bool ClipboardBal::setData(const String&, const String&)
4859 + NotImplemented();
4860 + return false;
4863 +HashSet<String> ClipboardBal::types() const
4865 + NotImplemented();
4866 + return HashSet<String>();
4869 +PassRefPtr<FileList> ClipboardBal::files() const
4871 + notImplemented();
4872 + return 0;
4875 +IntPoint ClipboardBal::dragLocation() const
4877 + NotImplemented();
4878 + return IntPoint(0, 0);
4881 +CachedImage* ClipboardBal::dragImage() const
4883 + NotImplemented();
4884 + return 0;
4887 +void ClipboardBal::setDragImage(CachedImage*, const IntPoint&)
4889 + NotImplemented();
4892 +Node* ClipboardBal::dragImageElement()
4894 + NotImplemented();
4895 + return 0;
4898 +void ClipboardBal::setDragImageElement(Node*, const IntPoint&)
4900 + NotImplemented();
4903 +DragImageRef ClipboardBal::createDragImage(IntPoint&) const
4905 + NotImplemented();
4906 + return 0;
4909 +void ClipboardBal::declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*)
4911 + NotImplemented();
4914 +void ClipboardBal::writeURL(const KURL&, const String&, Frame*)
4916 + NotImplemented();
4919 +void ClipboardBal::writeRange(Range*, Frame*)
4921 + NotImplemented();
4924 +bool ClipboardBal::hasData()
4926 + NotImplemented();
4927 + return false;
4931 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCClipboardAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCClipboardAROS.h
4932 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCClipboardAROS.h 1970-01-01 01:00:00.000000000 +0100
4933 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCClipboardAROS.h 2018-06-13 07:27:37.570979727 +0100
4934 @@ -0,0 +1,76 @@
4936 + * Copyright (C) 2008 Pleyo. All rights reserved.
4938 + * Redistribution and use in source and binary forms, with or without
4939 + * modification, are permitted provided that the following conditions
4940 + * are met:
4942 + * 1. Redistributions of source code must retain the above copyright
4943 + * notice, this list of conditions and the following disclaimer.
4944 + * 2. Redistributions in binary form must reproduce the above copyright
4945 + * notice, this list of conditions and the following disclaimer in the
4946 + * documentation and/or other materials provided with the distribution.
4947 + * 3. Neither the name of Pleyo nor the names of
4948 + * its contributors may be used to endorse or promote products derived
4949 + * from this software without specific prior written permission.
4951 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
4952 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4953 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4954 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
4955 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4956 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4957 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4958 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4959 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4960 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4961 + */
4964 +#ifndef ClipboardGdk_h
4965 +#define ClipboardGdk_h
4967 +#include "Clipboard.h"
4968 +#include "BALBase.h"
4970 +namespace WebCore {
4971 + class CachedImage;
4972 + class FileList;
4974 + // State available during IE's events for drag and drop and copy/paste
4975 + // Created from the EventHandlerGtk to be used by the dom
4976 + class ClipboardBal : public Clipboard {
4977 + public:
4978 + static PassRefPtr<ClipboardBal> create(ClipboardAccessPolicy policy, bool isForDragging)
4980 + return adoptRef(new ClipboardBal(policy, isForDragging));
4982 + virtual ~ClipboardBal();
4985 + void clearData(const String&);
4986 + void clearAllData();
4987 + String getData(const String&, bool&) const;
4988 + bool setData(const String&, const String&);
4990 + HashSet<String> types() const;
4991 + virtual PassRefPtr<FileList> files() const;
4993 + IntPoint dragLocation() const;
4994 + CachedImage* dragImage() const;
4995 + void setDragImage(CachedImage*, const IntPoint&);
4996 + Node* dragImageElement();
4997 + void setDragImageElement(Node*, const IntPoint&);
4999 + virtual DragImageRef createDragImage(IntPoint&) const;
5000 + virtual void declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*);
5001 + virtual void writeURL(const KURL&, const String&, Frame*);
5002 + virtual void writeRange(Range*, Frame*);
5004 + virtual bool hasData();
5005 + private:
5006 + ClipboardBal(ClipboardAccessPolicy, bool);
5007 + };
5010 +#endif
5011 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCContextMenuAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCContextMenuAROS.cpp
5012 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCContextMenuAROS.cpp 1970-01-01 01:00:00.000000000 +0100
5013 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCContextMenuAROS.cpp 2018-06-13 07:27:37.570979727 +0100
5014 @@ -0,0 +1,107 @@
5016 + * Copyright (C) 2009 Stanislaw Szymczyk.
5017 + * Copyright (C) 2008 Pleyo. All rights reserved.
5019 + * Redistribution and use in source and binary forms, with or without
5020 + * modification, are permitted provided that the following conditions
5021 + * are met:
5023 + * 1. Redistributions of source code must retain the above copyright
5024 + * notice, this list of conditions and the following disclaimer.
5025 + * 2. Redistributions in binary form must reproduce the above copyright
5026 + * notice, this list of conditions and the following disclaimer in the
5027 + * documentation and/or other materials provided with the distribution.
5028 + * 3. Neither the name of Pleyo nor the names of
5029 + * its contributors may be used to endorse or promote products derived
5030 + * from this software without specific prior written permission.
5032 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
5033 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5034 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5035 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
5036 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5037 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5038 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5039 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5040 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5041 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5042 + */
5045 +#include "config.h"
5046 +#include "ContextMenu.h"
5048 +#include "ContextMenuController.h"
5050 +#include <cstdio>
5052 +extern "C" {
5053 +#include <exec/types.h>
5054 +#include <libraries/mui.h>
5055 +#include <proto/muimaster.h>
5056 +#include <proto/alib.h>
5057 +#include <proto/intuition.h>
5058 +#include <aros/debug.h>
5059 +#include <utility/hooks.h>
5062 +namespace WebCore {
5064 +static void menuItemActivated(struct Hook *hook, Object *menuItem, ContextMenuController **controller)
5066 + D(bug("menuItemActivated\n"));
5067 + ContextMenuItem item(menuItem);
5069 + if(controller && *controller)
5071 + (*controller)->contextMenuItemSelected(&item);
5075 +// TODO: ref-counting correctness checking.
5076 +// See http://bugs.webkit.org/show_bug.cgi?id=16115
5078 +ContextMenu::ContextMenu(const HitTestResult& result)
5079 + : m_hitTestResult(result)
5081 + m_platformDescription = MenuObject, MUIA_Menu_Title, "OWB", End;
5082 + D(bug("created menu: %p\n", m_platformDescription));
5083 + menuItemActivatedHook.h_Entry = (APTR)HookEntry;
5084 + menuItemActivatedHook.h_SubEntry = (APTR) menuItemActivated;
5087 +ContextMenu::~ContextMenu()
5091 +void ContextMenu::appendItem(ContextMenuItem& item)
5093 + Object *menuItem = ContextMenuItem::createNativeMenuItem(item.releasePlatformDescription());
5095 + DoMethod(menuItem, MUIM_Notify, MUIA_Menuitem_Trigger, MUIV_EveryTime,
5096 + (IPTR) menuItem, 3,
5097 + MUIM_CallHook, &menuItemActivatedHook, controller());
5099 + DoMethod(m_platformDescription, MUIM_Family_AddTail, menuItem);
5102 +void ContextMenu::setPlatformDescription(PlatformMenuDescription menu)
5104 + MUI_DisposeObject(m_platformDescription);
5105 + m_platformDescription = menu;
5108 +PlatformMenuDescription ContextMenu::platformDescription() const
5110 + return m_platformDescription;
5113 +PlatformMenuDescription ContextMenu::releasePlatformDescription()
5115 + PlatformMenuDescription description = m_platformDescription;
5116 + m_platformDescription = 0;
5118 + return description;
5122 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCContextMenuItemAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCContextMenuItemAROS.cpp
5123 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCContextMenuItemAROS.cpp 1970-01-01 01:00:00.000000000 +0100
5124 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCContextMenuItemAROS.cpp 2018-06-13 07:27:37.570979727 +0100
5125 @@ -0,0 +1,200 @@
5127 + * Copyright (C) 2009 Stanislaw Szymczyk.
5128 + * Copyright (C) 2008 Pleyo. All rights reserved.
5130 + * Redistribution and use in source and binary forms, with or without
5131 + * modification, are permitted provided that the following conditions
5132 + * are met:
5134 + * 1. Redistributions of source code must retain the above copyright
5135 + * notice, this list of conditions and the following disclaimer.
5136 + * 2. Redistributions in binary form must reproduce the above copyright
5137 + * notice, this list of conditions and the following disclaimer in the
5138 + * documentation and/or other materials provided with the distribution.
5139 + * 3. Neither the name of Pleyo nor the names of
5140 + * its contributors may be used to endorse or promote products derived
5141 + * from this software without specific prior written permission.
5143 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
5144 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5145 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5146 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
5147 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5148 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5149 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5150 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5151 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5152 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5153 + */
5156 +#include "config.h"
5157 +#include "ContextMenu.h"
5158 +#include "ContextMenuItem.h"
5159 +#include "CString.h"
5160 +#include "Logging.h"
5162 +#include <cstdio>
5163 +#include <cstring>
5165 +extern "C" {
5166 +#include <exec/types.h>
5167 +#include <libraries/mui.h>
5168 +#include <proto/muimaster.h>
5169 +#include <proto/alib.h>
5170 +#include <aros/debug.h>
5171 +#include <exec/nodes.h>
5172 +#include <exec/lists.h>
5173 +#include <proto/intuition.h>
5174 +#include <proto/codesets.h>
5175 +#include <libraries/codesets.h>
5178 +#define WEBKIT_CONTEXT_MENU_ACTION "webkit-context-menu"
5180 +namespace WebCore {
5182 +// Extract the ActionType from the menu item
5183 +ContextMenuItem::ContextMenuItem(BalMenuItem* item)
5184 + : m_platformDescription()
5186 + char *title;
5187 + GetAttr(MUIA_Menuitem_Title, item, (IPTR*) &title);
5189 + IPTR checkable = 0;
5190 + GetAttr(MUIA_Menuitem_Checkit, item, (IPTR*) &checkable);
5191 + IPTR checked = 0;
5192 + GetAttr(MUIA_Menuitem_Checked, item, (IPTR*) &checkable);
5194 + int childcount = 0;
5195 + /*
5196 + * TODO - add support for nested menus
5197 + struct MinList *children;
5198 + GetAttr(MUIA_Family_List, item, (IPTR*) &children);
5199 + ListLength(children,childcount)
5200 + */
5202 + D(bug("title: %p, childcount: %d, checkable: %d, checked: %d\n", title, childcount, checkable, checked));
5204 + if (title == NM_BARLABEL)
5205 + m_platformDescription.type = SeparatorType;
5206 + else if (childcount > 0)
5207 + m_platformDescription.type = SubmenuType;
5208 + else if (checkable) {
5209 + m_platformDescription.type = CheckableActionType;
5210 + m_platformDescription.checked = (bool) checked;
5211 + } else
5212 + m_platformDescription.type = ActionType;
5214 + IPTR menuAction;
5215 + GetAttr(MUIA_UserData, item, (IPTR*) &menuAction);
5216 + m_platformDescription.action = (ContextMenuAction) menuAction;
5218 + m_platformDescription.subMenu = GTK_MENU(gtk_menu_item_get_submenu(item));
5219 + if (m_platformDescription.subMenu)
5220 + g_object_ref(m_platformDescription.subMenu); */
5223 +ContextMenuItem::ContextMenuItem(ContextMenu*)
5225 + NotImplemented();
5228 +ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction action, const String& title, ContextMenu* subMenu)
5230 + m_platformDescription.type = type;
5231 + m_platformDescription.action = action;
5232 + m_platformDescription.title = title;
5234 + setSubMenu(subMenu);
5237 +ContextMenuItem::~ContextMenuItem()
5241 +BalMenuItem* ContextMenuItem::createNativeMenuItem(const PlatformMenuItemDescription& menu)
5243 + /* TODO: release the title memory after destroying menu */
5244 + char *title;
5245 + if(menu.title.length() > 0)
5247 + title = strdup(menu.title.utf8().data());
5248 + char *titleConverted = CodesetsUTF8ToStr(CSA_Source, (IPTR) title, TAG_END);
5249 + if(titleConverted)
5251 + free(title);
5252 + title = titleConverted;
5255 + else
5256 + title = NM_BARLABEL;
5258 + D(bug("creating menu item with title %s\n", menu.title.utf8().data()));
5259 + Object *menuItem = MenuitemObject,
5260 + MUIA_Menuitem_Checked, (IPTR) menu.checked,
5261 + MUIA_Menuitem_Enabled, (IPTR) menu.enabled,
5262 + MUIA_Menuitem_Title, (IPTR) title,
5263 + MUIA_UserData, (IPTR) menu.action,
5264 + End;
5265 + return menuItem;
5268 +PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription()
5270 + PlatformMenuItemDescription description = m_platformDescription;
5271 + m_platformDescription = PlatformMenuItemDescription();
5272 + return description;
5275 +ContextMenuItemType ContextMenuItem::type() const
5277 + return m_platformDescription.type;
5280 +void ContextMenuItem::setType(ContextMenuItemType type)
5282 + m_platformDescription.type = type;
5285 +ContextMenuAction ContextMenuItem::action() const
5287 + return m_platformDescription.action;
5290 +void ContextMenuItem::setAction(ContextMenuAction action)
5292 + m_platformDescription.action = action;
5295 +String ContextMenuItem::title() const
5297 + NotImplemented();
5298 + return String();
5301 +void ContextMenuItem::setTitle(const String&)
5303 + NotImplemented();
5306 +PlatformMenuDescription ContextMenuItem::platformSubMenu() const
5308 + return m_platformDescription.subMenu;
5311 +void ContextMenuItem::setSubMenu(ContextMenu* menu)
5315 +void ContextMenuItem::setChecked(bool shouldCheck)
5317 + m_platformDescription.checked = shouldCheck;
5320 +void ContextMenuItem::setEnabled(bool shouldEnable)
5322 + m_platformDescription.enabled = shouldEnable;
5326 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCCursorAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCCursorAROS.cpp
5327 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCCursorAROS.cpp 1970-01-01 01:00:00.000000000 +0100
5328 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCCursorAROS.cpp 2018-06-13 07:27:37.570979727 +0100
5329 @@ -0,0 +1,371 @@
5331 + * Copyright (C) 2009 Stanislaw Szymczyk
5332 + * Copyright (C) 2008 Pleyo. All rights reserved.
5334 + * Redistribution and use in source and binary forms, with or without
5335 + * modification, are permitted provided that the following conditions
5336 + * are met:
5338 + * 1. Redistributions of source code must retain the above copyright
5339 + * notice, this list of conditions and the following disclaimer.
5340 + * 2. Redistributions in binary form must reproduce the above copyright
5341 + * notice, this list of conditions and the following disclaimer in the
5342 + * documentation and/or other materials provided with the distribution.
5343 + * 3. Neither the name of Pleyo nor the names of
5344 + * its contributors may be used to endorse or promote products derived
5345 + * from this software without specific prior written permission.
5347 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
5348 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5349 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5350 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
5351 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5352 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5353 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5354 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5355 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5356 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5357 + */
5360 +#include "config.h"
5362 +#include "Logging.h"
5363 +#include <wtf/Assertions.h>
5364 +#include "stdio.h"
5365 +#include "Cursor.h"
5366 +#include "BALBase.h"
5368 +namespace WebCore {
5370 +Cursor::Cursor(const Cursor& other)
5371 + : m_impl(other.m_impl)
5373 + NotImplemented();
5376 +Cursor::Cursor(Image*, const IntPoint&)
5378 + NotImplemented();
5381 +Cursor::~Cursor()
5383 + //printf("Cursor::~Cursor\n");
5386 +Cursor& Cursor::operator=(const Cursor& other)
5388 + m_impl = other.m_impl;
5389 + return *this;
5392 +Cursor::Cursor(PlatformCursor c)
5393 + : m_impl(c)
5395 + m_impl = c;
5396 + NotImplemented();
5399 +const Cursor& pointerCursor()
5401 + BalNotImplemented();
5402 + static Cursor c;
5403 + return c;
5406 +const Cursor& crossCursor()
5408 + BalNotImplemented();
5409 + static Cursor c;
5410 + return c;
5413 +const Cursor& handCursor()
5415 + BalNotImplemented();
5416 + static Cursor c;
5417 + return c;
5420 +const Cursor& moveCursor()
5422 + BalNotImplemented();
5423 + static Cursor c;
5424 + return c;
5427 +const Cursor& iBeamCursor()
5429 + BalNotImplemented();
5430 + static Cursor c;
5431 + return c;
5434 +const Cursor& waitCursor()
5436 + BalNotImplemented();
5437 + static Cursor c;
5438 + return c;
5441 +const Cursor& helpCursor()
5443 + BalNotImplemented();
5444 + static Cursor c;
5445 + return c;
5448 +const Cursor& eastResizeCursor()
5450 + BalNotImplemented();
5451 + static Cursor c;
5452 + return c;
5455 +const Cursor& northResizeCursor()
5457 + BalNotImplemented();
5458 + static Cursor c;
5459 + return c;
5462 +const Cursor& northEastResizeCursor()
5464 + BalNotImplemented();
5465 + static Cursor c;
5466 + return c;
5469 +const Cursor& northWestResizeCursor()
5471 + BalNotImplemented();
5472 + static Cursor c;
5473 + return c;
5476 +const Cursor& southResizeCursor()
5478 + BalNotImplemented();
5479 + static Cursor c;
5480 + return c;
5483 +const Cursor& southEastResizeCursor()
5485 + BalNotImplemented();
5486 + static Cursor c;
5487 + return c;
5490 +const Cursor& southWestResizeCursor()
5492 + BalNotImplemented();
5493 + static Cursor c;
5494 + return c;
5497 +const Cursor& westResizeCursor()
5499 + BalNotImplemented();
5500 + static Cursor c;
5501 + return c;
5504 +const Cursor& northSouthResizeCursor()
5506 + BalNotImplemented();
5507 + static Cursor c;
5508 + return c;
5511 +const Cursor& eastWestResizeCursor()
5513 + BalNotImplemented();
5514 + static Cursor c;
5515 + return c;
5518 +const Cursor& northEastSouthWestResizeCursor()
5520 + BalNotImplemented();
5521 + static Cursor c;
5522 + return c;
5525 +const Cursor& northWestSouthEastResizeCursor()
5527 + BalNotImplemented();
5528 + static Cursor c;
5529 + return c;
5531 +const Cursor& columnResizeCursor()
5533 + BalNotImplemented();
5534 + static Cursor c;
5535 + return c;
5538 +const Cursor& rowResizeCursor()
5540 + BalNotImplemented();
5541 + static Cursor c;
5542 + return c;
5545 +const Cursor& middlePanningCursor()
5547 + BalNotImplemented();
5548 + static Cursor c;
5549 + return c;
5552 +const Cursor& eastPanningCursor()
5554 + BalNotImplemented();
5555 + static Cursor c;
5556 + return c;
5559 +const Cursor& northPanningCursor()
5561 + BalNotImplemented();
5562 + static Cursor c;
5563 + return c;
5566 +const Cursor& northEastPanningCursor()
5568 + BalNotImplemented();
5569 + static Cursor c;
5570 + return c;
5573 +const Cursor& northWestPanningCursor()
5575 + BalNotImplemented();
5576 + static Cursor c;
5577 + return c;
5580 +const Cursor& southPanningCursor()
5582 + BalNotImplemented();
5583 + static Cursor c;
5584 + return c;
5587 +const Cursor& southEastPanningCursor()
5589 + BalNotImplemented();
5590 + static Cursor c;
5591 + return c;
5594 +const Cursor& southWestPanningCursor()
5596 + BalNotImplemented();
5597 + static Cursor c;
5598 + return c;
5601 +const Cursor& westPanningCursor()
5603 + BalNotImplemented();
5604 + static Cursor c;
5605 + return c;
5608 +const Cursor& verticalTextCursor()
5610 + BalNotImplemented();
5611 + static Cursor c;
5612 + return c;
5615 +const Cursor& cellCursor()
5617 + BalNotImplemented();
5618 + static Cursor c;
5619 + return c;
5622 +const Cursor& contextMenuCursor()
5624 + BalNotImplemented();
5625 + static Cursor c;
5626 + return c;
5629 +const Cursor& noDropCursor()
5631 + BalNotImplemented();
5632 + static Cursor c;
5633 + return c;
5636 +const Cursor& copyCursor()
5638 + BalNotImplemented();
5639 + static Cursor c;
5640 + return c;
5643 +const Cursor& progressCursor()
5645 + BalNotImplemented();
5646 + static Cursor c;
5647 + return c;
5650 +const Cursor& aliasCursor()
5652 + BalNotImplemented();
5653 + static Cursor c;
5654 + return c;
5657 +const Cursor& noneCursor()
5659 + BalNotImplemented();
5660 + static Cursor c;
5661 + return c;
5664 +const Cursor& notAllowedCursor()
5666 + BalNotImplemented();
5667 + static Cursor c;
5668 + return c;
5671 +const Cursor& zoomInCursor()
5673 + BalNotImplemented();
5674 + static Cursor c;
5675 + return c;
5678 +const Cursor& zoomOutCursor()
5680 + BalNotImplemented();
5681 + static Cursor c;
5682 + return c;
5685 +const Cursor& grabCursor()
5687 + BalNotImplemented();
5688 + static Cursor c;
5689 + return c;
5692 +const Cursor& grabbingCursor()
5694 + BalNotImplemented();
5695 + static Cursor c;
5696 + return c;
5701 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCCursorAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCCursorAROS.h
5702 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCCursorAROS.h 1970-01-01 01:00:00.000000000 +0100
5703 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCCursorAROS.h 2018-06-13 07:27:37.570979727 +0100
5704 @@ -0,0 +1,104 @@
5706 + * Copyright (C) 2008 Pleyo. All rights reserved.
5708 + * Redistribution and use in source and binary forms, with or without
5709 + * modification, are permitted provided that the following conditions
5710 + * are met:
5712 + * 1. Redistributions of source code must retain the above copyright
5713 + * notice, this list of conditions and the following disclaimer.
5714 + * 2. Redistributions in binary form must reproduce the above copyright
5715 + * notice, this list of conditions and the following disclaimer in the
5716 + * documentation and/or other materials provided with the distribution.
5717 + * 3. Neither the name of Pleyo nor the names of
5718 + * its contributors may be used to endorse or promote products derived
5719 + * from this software without specific prior written permission.
5721 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
5722 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5723 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5724 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
5725 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5726 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5727 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5728 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5729 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5730 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5731 + */
5734 +#ifndef Cursor_h
5735 +#define Cursor_h
5737 +#include <wtf/Platform.h>
5738 +#include "BALBase.h"
5740 +namespace WebCore {
5742 + class Image;
5743 + class IntPoint;
5745 + class Cursor {
5746 + public:
5747 + Cursor()
5748 + { }
5750 + Cursor(Image*, const IntPoint& hotspot);
5751 + Cursor(const Cursor&);
5752 + ~Cursor();
5753 + Cursor& operator=(const Cursor&);
5755 + Cursor(PlatformCursor);
5756 + PlatformCursor impl() const { return m_impl; }
5758 + private:
5759 + PlatformCursor m_impl;
5760 + };
5762 + const Cursor& pointerCursor();
5763 + const Cursor& crossCursor();
5764 + const Cursor& handCursor();
5765 + const Cursor& moveCursor();
5766 + const Cursor& iBeamCursor();
5767 + const Cursor& waitCursor();
5768 + const Cursor& helpCursor();
5769 + const Cursor& eastResizeCursor();
5770 + const Cursor& northResizeCursor();
5771 + const Cursor& northEastResizeCursor();
5772 + const Cursor& northWestResizeCursor();
5773 + const Cursor& southResizeCursor();
5774 + const Cursor& southEastResizeCursor();
5775 + const Cursor& southWestResizeCursor();
5776 + const Cursor& westResizeCursor();
5777 + const Cursor& northSouthResizeCursor();
5778 + const Cursor& eastWestResizeCursor();
5779 + const Cursor& northEastSouthWestResizeCursor();
5780 + const Cursor& northWestSouthEastResizeCursor();
5781 + const Cursor& columnResizeCursor();
5782 + const Cursor& rowResizeCursor();
5783 + const Cursor& middlePanningCursor();
5784 + const Cursor& eastPanningCursor();
5785 + const Cursor& northPanningCursor();
5786 + const Cursor& northEastPanningCursor();
5787 + const Cursor& northWestPanningCursor();
5788 + const Cursor& southPanningCursor();
5789 + const Cursor& southEastPanningCursor();
5790 + const Cursor& southWestPanningCursor();
5791 + const Cursor& westPanningCursor();
5792 + const Cursor& verticalTextCursor();
5793 + const Cursor& cellCursor();
5794 + const Cursor& contextMenuCursor();
5795 + const Cursor& noDropCursor();
5796 + const Cursor& notAllowedCursor();
5797 + const Cursor& progressCursor();
5798 + const Cursor& aliasCursor();
5799 + const Cursor& zoomInCursor();
5800 + const Cursor& zoomOutCursor();
5801 + const Cursor& copyCursor();
5802 + const Cursor& noneCursor();
5803 + const Cursor& grabCursor();
5804 + const Cursor& grabbingCursor();
5806 +} // namespace WebCore
5808 +#endif // Cursor_h
5809 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCDragControllerAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCDragControllerAROS.cpp
5810 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCDragControllerAROS.cpp 1970-01-01 01:00:00.000000000 +0100
5811 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCDragControllerAROS.cpp 2018-06-13 07:27:37.570979727 +0100
5812 @@ -0,0 +1,76 @@
5814 + * Copyright (C) 2008 Pleyo. All rights reserved.
5816 + * Redistribution and use in source and binary forms, with or without
5817 + * modification, are permitted provided that the following conditions
5818 + * are met:
5820 + * 1. Redistributions of source code must retain the above copyright
5821 + * notice, this list of conditions and the following disclaimer.
5822 + * 2. Redistributions in binary form must reproduce the above copyright
5823 + * notice, this list of conditions and the following disclaimer in the
5824 + * documentation and/or other materials provided with the distribution.
5825 + * 3. Neither the name of Pleyo nor the names of
5826 + * its contributors may be used to endorse or promote products derived
5827 + * from this software without specific prior written permission.
5829 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
5830 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5831 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5832 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
5833 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5834 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5835 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5836 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5837 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5838 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5839 + */
5842 +#include "config.h"
5843 +#include "DragController.h"
5845 +#include "DragData.h"
5846 +#include "Frame.h"
5847 +#include "FrameView.h"
5848 +#include "Page.h"
5850 +#include <cstdio>
5852 +namespace WebCore {
5854 +// FIXME: These values are straight out of DragControllerMac, so probably have
5855 +// little correlation with Gdk standards...
5856 +const int DragController::LinkDragBorderInset = 2;
5857 +const int DragController::MaxOriginalImageArea = 1500 * 1500;
5858 +const int DragController::DragIconRightInset = 7;
5859 +const int DragController::DragIconBottomInset = 3;
5861 +const float DragController::DragImageAlpha = 0.75f;
5863 +bool DragController::isCopyKeyDown()
5865 + return false;
5868 +DragOperation DragController::dragOperation(DragData* dragData)
5870 + //FIXME: This logic is incomplete
5871 + if (dragData->containsURL())
5872 + return DragOperationCopy;
5874 + return DragOperationNone;
5877 +const IntSize& DragController::maxDragImageSize()
5879 + static const IntSize maxDragImageSize(400, 400);
5881 + return maxDragImageSize;
5884 +void DragController::cleanupAfterSystemDrag()
5889 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCFrameAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCFrameAROS.cpp
5890 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCFrameAROS.cpp 1970-01-01 01:00:00.000000000 +0100
5891 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCFrameAROS.cpp 2018-06-13 07:27:37.570979727 +0100
5892 @@ -0,0 +1,42 @@
5894 + * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5895 + * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
5896 + * Copyright (C) 2007 Holger Hans Peter Freyther
5897 + * Copyright (C) 2008 Collabora Ltd. All rights reserved.
5898 + * All rights reserved.
5900 + * Redistribution and use in source and binary forms, with or without
5901 + * modification, are permitted provided that the following conditions
5902 + * are met:
5903 + * 1. Redistributions of source code must retain the above copyright
5904 + * notice, this list of conditions and the following disclaimer.
5905 + * 2. Redistributions in binary form must reproduce the above copyright
5906 + * notice, this list of conditions and the following disclaimer in the
5907 + * documentation and/or other materials provided with the distribution.
5909 + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
5910 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5911 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
5912 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
5913 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
5914 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
5915 + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
5916 + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
5917 + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5918 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5919 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5920 + */
5922 +#include "config.h"
5923 +#include "Frame.h"
5924 +#include "NotImplemented.h"
5926 +namespace WebCore {
5928 +DragImageRef Frame::dragImageForSelection()
5930 + notImplemented();
5931 + return 0;
5935 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.cpp
5936 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.cpp 1970-01-01 01:00:00.000000000 +0100
5937 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.cpp 2018-06-13 07:27:37.570979727 +0100
5938 @@ -0,0 +1,287 @@
5940 + * Copyright (C) 2009 Stanislaw Szymczyk
5941 + * Copyright (C) 2008 Pleyo. All rights reserved.
5943 + * Redistribution and use in source and binary forms, with or without
5944 + * modification, are permitted provided that the following conditions
5945 + * are met:
5947 + * 1. Redistributions of source code must retain the above copyright
5948 + * notice, this list of conditions and the following disclaimer.
5949 + * 2. Redistributions in binary form must reproduce the above copyright
5950 + * notice, this list of conditions and the following disclaimer in the
5951 + * documentation and/or other materials provided with the distribution.
5952 + * 3. Neither the name of Pleyo nor the names of
5953 + * its contributors may be used to endorse or promote products derived
5954 + * from this software without specific prior written permission.
5956 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
5957 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
5958 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5959 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
5960 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
5961 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
5962 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
5963 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5964 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
5965 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5966 + */
5968 +#include "config.h"
5969 +#include "Logging.h"
5970 +#include "Pasteboard.h"
5972 +#include "CString.h"
5973 +#include "DocumentFragment.h"
5974 +#include "Frame.h"
5975 +#include "PlatformString.h"
5976 +#include "Image.h"
5977 +#include "Range.h"
5978 +#include "RenderImage.h"
5979 +#include "KURL.h"
5980 +#include "markup.h"
5982 +#include <cstdio>
5984 +extern "C" {
5985 +#include <libraries/iffparse.h>
5986 +#include <proto/iffparse.h>
5987 +#include <datatypes/textclass.h>
5988 +#include <proto/intuition.h>
5989 +#include <proto/codesets.h>
5990 +#include <libraries/codesets.h>
5993 +namespace WebCore {
5995 +/* FIXME: we must get rid of this and use the enum in webkitwebview.h someway */
5996 +typedef enum
5998 + WEBKIT_WEB_VIEW_TARGET_INFO_HTML = - 1,
5999 + WEBKIT_WEB_VIEW_TARGET_INFO_TEXT = - 2
6000 +} WebKitWebViewTargetInfo;
6002 +class PasteboardSelectionData {
6003 +public:
6004 + PasteboardSelectionData(char* text, char* markup)
6005 + : m_text(text)
6006 + , m_markup(markup) { }
6008 + ~PasteboardSelectionData() {
6009 + free(m_text);
6010 + free(m_markup);
6013 + const char* text() const { return m_text; }
6014 + const char* markup() const { return m_markup; }
6016 +private:
6017 + char* m_text;
6018 + char* m_markup;
6021 +Pasteboard* Pasteboard::generalPasteboard()
6023 + static Pasteboard* pasteboard = new Pasteboard();
6024 + return pasteboard;
6027 +Pasteboard::Pasteboard()
6029 + NotImplemented();
6032 +Pasteboard::~Pasteboard()
6034 + delete m_helper;
6037 +void Pasteboard::setHelper(PasteboardHelper* helper)
6039 + m_helper = helper;
6042 +void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
6044 + writePlainText(frame->selectedText());
6047 +void Pasteboard::writePlainText(const String& text)
6049 + IFFHandle *ih;
6050 + CString utf8 = text.utf8(); //selectedRange->text().utf8();
6051 + const char *data = utf8.data();
6052 + size_t len = utf8.length();
6054 + bool copied = false;
6057 + if (data && len && (ih = AllocIFF()))
6059 + if (ih->iff_Stream = (IPTR) OpenClipboard(PRIMARY_CLIP))
6061 + InitIFFasClip(ih);
6063 + if (0 == OpenIFF(ih, IFFF_WRITE))
6065 + if (0 == PushChunk(ih, ID_FTXT, ID_FORM, IFFSIZE_UNKNOWN))
6067 + if (0 == PushChunk(ih, 0, ID_CHRS, IFFSIZE_UNKNOWN))
6069 + ULONG dataConvertedLength;
6070 + STRPTR dataConverted = CodesetsUTF8ToStr(
6071 + CSA_Source, (IPTR) data,
6072 + CSA_SourceLen, (IPTR) len,
6073 + CSA_DestLenPtr, (IPTR) &dataConvertedLength,
6074 + TAG_END
6075 + );
6076 + if(dataConverted)
6078 + if (WriteChunkBytes(ih, (APTR) dataConverted, dataConvertedLength) > 0)
6079 + copied = true;
6080 + CodesetsFreeA(dataConverted, NULL);
6082 + PopChunk(ih);
6084 + PopChunk(ih);
6086 + CloseIFF(ih);
6088 + CloseClipboard((ClipboardHandle*) ih->iff_Stream);
6090 + FreeIFF(ih);
6093 + if (!copied)
6094 + DisplayBeep(NULL);
6097 +void Pasteboard::writeURL(const KURL& url, const String&, Frame* frame)
6099 + IFFHandle *ih;
6100 + CString utf8 = url.string().utf8();
6101 + const char *data = utf8.data();
6102 + size_t len = utf8.length();
6104 + bool copied = false;
6106 + if (data && len && (ih = AllocIFF()))
6108 + if (ih->iff_Stream = (IPTR) OpenClipboard(PRIMARY_CLIP))
6110 + InitIFFasClip(ih);
6112 + if (0 == OpenIFF(ih, IFFF_WRITE))
6114 + if (0 == PushChunk(ih, ID_FTXT, ID_FORM, IFFSIZE_UNKNOWN))
6116 + if (0 == PushChunk(ih, 0, ID_CHRS, IFFSIZE_UNKNOWN))
6118 + ULONG dataConvertedLength;
6119 + STRPTR dataConverted = CodesetsUTF8ToStr(
6120 + CSA_Source, (IPTR) data,
6121 + CSA_SourceLen, (IPTR) len,
6122 + CSA_DestLenPtr, (IPTR) &dataConvertedLength,
6123 + TAG_END
6124 + );
6125 + if(dataConverted)
6127 + if (WriteChunkBytes(ih, (APTR) dataConverted, dataConvertedLength) > 0)
6128 + copied = true;
6129 + CodesetsFreeA(dataConverted, NULL);
6131 + PopChunk(ih);
6133 + PopChunk(ih);
6135 + CloseIFF(ih);
6137 + CloseClipboard((ClipboardHandle*) ih->iff_Stream);
6139 + FreeIFF(ih);
6143 +void Pasteboard::writeImage(Node* node, const KURL&, const String&)
6145 + NotImplemented();
6148 +void Pasteboard::clear()
6152 +bool Pasteboard::canSmartReplace()
6154 + NotImplemented();
6155 + return false;
6158 +PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context,
6159 + bool allowPlainText, bool& chosePlainText)
6161 + if (allowPlainText) {
6162 + String text = plainText(frame);
6164 + chosePlainText = true;
6165 + RefPtr<DocumentFragment> fragment = createFragmentFromText(context.get(), text);
6166 + if (fragment)
6167 + return fragment.release();
6171 +String Pasteboard::plainText(Frame* frame)
6173 + String result;
6175 + struct codeset *utfCodeset = CodesetsFindA("UTF-8", NULL);
6176 + if(!utfCodeset)
6177 + return result;
6179 + if (IFFHandle *ih = AllocIFF()) {
6180 + if (ih->iff_Stream = (IPTR) OpenClipboard(PRIMARY_CLIP))
6182 + InitIFFasClip(ih);
6184 + if (0 == OpenIFF(ih, IFFF_READ))
6186 + LONG chunks[] = { ID_FTXT, ID_CHRS };
6188 + if (0 == CollectionChunks(ih, chunks, 1) && 0 == StopOnExit(ih, ID_FTXT, ID_FORM))
6189 + while (true)
6190 + if (IFFERR_EOC == ParseIFF(ih, IFFPARSE_SCAN))
6192 + CollectionItem *ci;
6194 + ci = FindCollection(ih, ID_FTXT, ID_CHRS);
6195 + if (ci)
6197 + ULONG dataConvertedLength;
6198 + STRPTR dataConverted = CodesetsConvertStr(
6199 + CSA_Source, (IPTR) ci->ci_Data,
6200 + CSA_SourceLen, (IPTR) ci->ci_Size,
6201 + CSA_DestLenPtr, (IPTR) &dataConvertedLength,
6202 + CSA_DestCodeset, (IPTR) utfCodeset,
6203 + TAG_END
6204 + );
6205 + if(dataConverted)
6207 + result.append(String::fromUTF8((const char *) dataConverted, dataConvertedLength));
6208 + CodesetsFreeA(dataConverted, NULL);
6212 + else
6213 + break;
6215 + CloseIFF(ih);
6217 + CloseClipboard((ClipboardHandle*) ih->iff_Stream);
6219 + FreeIFF(ih);
6222 + return result;
6226 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.h
6227 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.h 1970-01-01 01:00:00.000000000 +0100
6228 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPasteboardAROS.h 2018-06-13 07:27:37.570979727 +0100
6229 @@ -0,0 +1,79 @@
6231 + * Copyright (C) 2008 Pleyo. All rights reserved.
6233 + * Redistribution and use in source and binary forms, with or without
6234 + * modification, are permitted provided that the following conditions
6235 + * are met:
6237 + * 1. Redistributions of source code must retain the above copyright
6238 + * notice, this list of conditions and the following disclaimer.
6239 + * 2. Redistributions in binary form must reproduce the above copyright
6240 + * notice, this list of conditions and the following disclaimer in the
6241 + * documentation and/or other materials provided with the distribution.
6242 + * 3. Neither the name of Pleyo nor the names of
6243 + * its contributors may be used to endorse or promote products derived
6244 + * from this software without specific prior written permission.
6246 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6247 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6248 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6249 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6250 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6251 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6252 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6253 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6254 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6255 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6256 + */
6258 +#ifndef Pasteboard_h
6259 +#define Pasteboard_h
6261 +#include <wtf/Forward.h>
6262 +#include <wtf/HashSet.h>
6263 +#include <wtf/Noncopyable.h>
6266 +#include <PasteboardHelper.h>
6268 +// FIXME: This class is too high-level to be in the platform directory, since it
6269 +// uses the DOM and makes calls to Editor. It should either be divested of its
6270 +// knowledge of the frame and editor or moved into the editing directory.
6273 +namespace WebCore {
6275 +class CString;
6276 +class DocumentFragment;
6277 +class Frame;
6278 +class HitTestResult;
6279 +class KURL;
6280 +class Node;
6281 +class Range;
6282 +class String;
6284 +class Pasteboard : Noncopyable {
6285 +public:
6286 + static Pasteboard* generalPasteboard();
6287 + void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*);
6288 + void writePlainText(const String&);
6289 + void writeURL(const KURL&, const String&, Frame* = 0);
6290 + void writeImage(Node*, const KURL&, const String& title);
6292 + void clear();
6293 + bool canSmartReplace();
6294 + PassRefPtr<DocumentFragment> documentFragment(Frame*, PassRefPtr<Range>, bool allowPlainText, bool& chosePlainText);
6295 + String plainText(Frame* = 0);
6297 + void setHelper(PasteboardHelper*);
6299 +private:
6300 + Pasteboard();
6301 + ~Pasteboard();
6303 + PasteboardHelper* m_helper;
6306 +} // namespace WebCore
6308 +#endif // Pasteboard_h
6309 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPasteboardHelperAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPasteboardHelperAROS.h
6310 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPasteboardHelperAROS.h 1970-01-01 01:00:00.000000000 +0100
6311 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPasteboardHelperAROS.h 2018-06-13 07:27:37.570979727 +0100
6312 @@ -0,0 +1,54 @@
6314 + * Copyright (C) 2008 Pleyo. All rights reserved.
6316 + * Redistribution and use in source and binary forms, with or without
6317 + * modification, are permitted provided that the following conditions
6318 + * are met:
6320 + * 1. Redistributions of source code must retain the above copyright
6321 + * notice, this list of conditions and the following disclaimer.
6322 + * 2. Redistributions in binary form must reproduce the above copyright
6323 + * notice, this list of conditions and the following disclaimer in the
6324 + * documentation and/or other materials provided with the distribution.
6325 + * 3. Neither the name of Pleyo nor the names of
6326 + * its contributors may be used to endorse or promote products derived
6327 + * from this software without specific prior written permission.
6329 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6330 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6331 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6332 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6333 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6334 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6335 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6336 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6337 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6338 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6339 + */
6342 +#ifndef PasteboardHelper_h
6343 +#define PasteboardHelper_h
6345 +#include "BALBase.h"
6347 + * FIXME: this is for WebCore support and must be removed once
6348 + * a better solution is found
6349 + */
6350 +#include "Frame.h"
6353 +namespace WebCore {
6355 +class PasteboardHelper {
6356 +public:
6357 + virtual ~PasteboardHelper() {};
6359 + virtual BalClipboard* getClipboard(Frame*) const = 0;
6360 + virtual BalTargetList* getCopyTargetList(Frame*) const = 0;
6361 + virtual BalTargetList* getPasteTargetList(Frame*) const = 0;
6366 +#endif // PasteboardHelper_h
6367 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPlatformMenuDescriptionAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPlatformMenuDescriptionAROS.h
6368 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPlatformMenuDescriptionAROS.h 1970-01-01 01:00:00.000000000 +0100
6369 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPlatformMenuDescriptionAROS.h 2018-06-13 07:27:37.570979727 +0100
6370 @@ -0,0 +1,40 @@
6372 + * Copyright (C) 2008 Pleyo. All rights reserved.
6374 + * Redistribution and use in source and binary forms, with or without
6375 + * modification, are permitted provided that the following conditions
6376 + * are met:
6378 + * 1. Redistributions of source code must retain the above copyright
6379 + * notice, this list of conditions and the following disclaimer.
6380 + * 2. Redistributions in binary form must reproduce the above copyright
6381 + * notice, this list of conditions and the following disclaimer in the
6382 + * documentation and/or other materials provided with the distribution.
6383 + * 3. Neither the name of Pleyo nor the names of
6384 + * its contributors may be used to endorse or promote products derived
6385 + * from this software without specific prior written permission.
6387 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6388 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6389 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6390 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6391 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6392 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6393 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6394 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6395 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6396 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6397 + */
6400 +#ifndef PlatformMenuDescription_h
6401 +#define PlatformMenuDescription_h
6403 +#include "BALBase.h"
6404 +namespace WebCore {
6406 + typedef BalMenu* PlatformMenuDescription;
6408 +} // namespace
6410 +#endif // PlatformMenuDescription_h
6411 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.cpp
6412 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.cpp 1970-01-01 01:00:00.000000000 +0100
6413 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.cpp 2018-06-13 07:27:37.570979727 +0100
6414 @@ -0,0 +1,84 @@
6416 + * Copyright (C) 2009 Stanislaw Szymczyk
6417 + * Copyright (C) 2008 Pleyo. All rights reserved.
6419 + * Redistribution and use in source and binary forms, with or without
6420 + * modification, are permitted provided that the following conditions
6421 + * are met:
6423 + * 1. Redistributions of source code must retain the above copyright
6424 + * notice, this list of conditions and the following disclaimer.
6425 + * 2. Redistributions in binary form must reproduce the above copyright
6426 + * notice, this list of conditions and the following disclaimer in the
6427 + * documentation and/or other materials provided with the distribution.
6428 + * 3. Neither the name of Pleyo nor the names of
6429 + * its contributors may be used to endorse or promote products derived
6430 + * from this software without specific prior written permission.
6432 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6433 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6434 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6435 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6436 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6437 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6438 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6439 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6440 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6441 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6442 + */
6445 +#include "config.h"
6446 +#include "PlatformScreen.h"
6447 +#include "Assertions.h"
6448 +#include "Logging.h"
6449 +#include "HostWindow.h"
6450 +#include "ScrollView.h"
6451 +#include "Widget.h"
6452 +#include <proto/graphics.h>
6453 +#include <proto/intuition.h>
6454 +#include <intuition/intuition.h>
6455 +#include <libraries/mui.h>
6457 +namespace WebCore {
6459 +int screenDepth(Widget* widget)
6461 + struct Screen *screen;
6462 + int depth;
6463 + struct DrawInfo *info;
6464 + screen = LockPubScreen(NULL);
6465 + info = GetScreenDrawInfo(screen);
6466 + depth = info->dri_Depth;
6467 + UnlockPubScreen(NULL, screen);
6468 + return depth;
6471 +int screenDepthPerComponent(Widget*)
6473 + NotImplemented();
6474 + return 8;
6477 +bool screenIsMonochrome(Widget* widget)
6479 + return screenDepth(widget) < 2;
6482 +FloatRect screenRect(Widget* widget)
6484 + struct Screen *screen;
6485 + int width, height;
6486 + screen = LockPubScreen(NULL);
6487 + width = screen->Width;
6488 + height = screen->Height;
6489 + UnlockPubScreen(NULL, screen);
6490 + return FloatRect(0, 0, width, height);
6493 +FloatRect screenAvailableRect(Widget* widget)
6495 + return screenRect(widget);
6498 +} // namespace WebCore
6499 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.h
6500 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.h 1970-01-01 01:00:00.000000000 +0100
6501 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPlatformScreenAROS.h 2018-06-13 07:27:37.570979727 +0100
6502 @@ -0,0 +1,53 @@
6504 + * Copyright (C) 2008 Pleyo. All rights reserved.
6506 + * Redistribution and use in source and binary forms, with or without
6507 + * modification, are permitted provided that the following conditions
6508 + * are met:
6510 + * 1. Redistributions of source code must retain the above copyright
6511 + * notice, this list of conditions and the following disclaimer.
6512 + * 2. Redistributions in binary form must reproduce the above copyright
6513 + * notice, this list of conditions and the following disclaimer in the
6514 + * documentation and/or other materials provided with the distribution.
6515 + * 3. Neither the name of Pleyo nor the names of
6516 + * its contributors may be used to endorse or promote products derived
6517 + * from this software without specific prior written permission.
6519 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6520 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6521 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6522 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6523 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6524 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6525 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6526 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6527 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6528 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6529 + */
6532 +#ifndef PlatformScreen_h
6533 +#define PlatformScreen_h
6535 +#include "FloatRect.h"
6536 +#include <wtf/Forward.h>
6537 +#include <wtf/RefPtr.h>
6538 +#include "BALBase.h"
6540 +namespace WebCore {
6542 + class FloatRect;
6543 + class Widget;
6545 + int screenDepth(Widget*);
6546 + int screenDepthPerComponent(Widget*);
6547 + bool screenIsMonochrome(Widget*);
6549 + FloatRect screenRect(Widget*);
6550 + FloatRect screenAvailableRect(Widget*);
6553 +} // namespace WebCore
6555 +#endif // PlatformScreen_h
6556 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.cpp
6557 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.cpp 1970-01-01 01:00:00.000000000 +0100
6558 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.cpp 2018-06-13 07:27:37.570979727 +0100
6559 @@ -0,0 +1,253 @@
6561 + * Copyright (C) 2009 Stanislaw Szymczyk
6562 + * Copyright (C) 2008 Pleyo. All rights reserved.
6564 + * Redistribution and use in source and binary forms, with or without
6565 + * modification, are permitted provided that the following conditions
6566 + * are met:
6568 + * 1. Redistributions of source code must retain the above copyright
6569 + * notice, this list of conditions and the following disclaimer.
6570 + * 2. Redistributions in binary form must reproduce the above copyright
6571 + * notice, this list of conditions and the following disclaimer in the
6572 + * documentation and/or other materials provided with the distribution.
6573 + * 3. Neither the name of Pleyo nor the names of
6574 + * its contributors may be used to endorse or promote products derived
6575 + * from this software without specific prior written permission.
6577 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6578 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6579 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6580 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6581 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6582 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6583 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6584 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6585 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6586 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6587 + */
6590 +#include "config.h"
6591 +#include "PopupMenu.h"
6593 +#include "Document.h"
6594 +#include "FloatRect.h"
6595 +#include "FontSelector.h"
6596 +#include "FrameView.h"
6597 +#include "GraphicsContext.h"
6598 +#include "HTMLNames.h"
6599 +#include "Page.h"
6600 +#include "PlatformMouseEvent.h"
6601 +#include "PlatformScreen.h"
6602 +#include "RenderTheme.h"
6603 +#include "RenderView.h"
6604 +#include "Scrollbar.h"
6605 +#include "ScrollbarTheme.h"
6606 +#include "SimpleFontData.h"
6607 +#include "ObserverServiceData.h"
6608 +#include "CString.h"
6610 +extern "C" {
6611 +#include <exec/types.h>
6612 +#include <proto/exec.h>
6613 +#include <libraries/mui.h>
6614 +#include <proto/muimaster.h>
6615 +#include <proto/intuition.h>
6616 +#include <aros/debug.h>
6617 +#include <proto/alib.h>
6618 +#include <proto/codesets.h>
6619 +#include <libraries/codesets.h>
6622 +using std::min;
6624 +namespace WebCore {
6626 +using namespace HTMLNames;
6628 +// Default Window animation duration in milliseconds
6629 +static const int defaultAnimationDuration = 200;
6630 +// Maximum height of a popup window
6631 +static const int maxPopupHeight = 320;
6633 +static const int popupWindowAlphaPercent = 95;
6635 +const int optionSpacingMiddle = 1;
6636 +const int popupWindowBorderWidth = 1;
6638 +// FIXME: Remove this as soon as practical.
6639 +static inline bool isASCIIPrintable(unsigned c)
6641 + return c >= 0x20 && c <= 0x7E;
6644 +static void cancelled(struct Hook *hook, Object *popupwin, PopupMenu **that)
6646 + (*that)->hide();
6649 +static void closed(struct Hook *hook, Object *popupwin, PopupMenu **that)
6651 + WebCore::ObserverServiceData::createObserverService()->notifyObserver("PopupMenuHide", "", (*that));
6652 + (*that)->client()->popupDidHide();
6655 +static void opened(struct Hook *hook, Object *popupwin, PopupMenu **that)
6657 + WebCore::ObserverServiceData::createObserverService()->notifyObserver("PopupMenuShow", "", (*that));
6660 +static void itemActivated(struct Hook *hook, Object *list, PopupMenu **that)
6662 + IPTR activeItem;
6663 + GetAttr(MUIA_List_Active, list, (IPTR*) &activeItem);
6664 + D(bug("setting active item to %d\n", activeItem));
6665 + (*that)->client()->valueChanged(activeItem);
6666 + (*that)->hide();
6669 +PopupMenu::PopupMenu(PopupMenuClient* client)
6670 + : m_popupClient(client)
6671 + , m_popup(0)
6673 + int itemCount = this->client()->listSize();
6675 + m_items = (char**) AllocVec(sizeof(char*) * (itemCount + 1), MEMF_ANY | MEMF_CLEAR);
6676 + for (int i = 0; i < itemCount; ++i) {
6677 + String text = this->client()->itemText(i);
6679 + if(text.isEmpty())
6680 + m_items[i] = (char*) StrDup("");
6681 + else
6683 + char *textChars = strdup(text.utf8().data());
6685 + if(textChars)
6687 + char *textConverted = CodesetsUTF8ToStr(CSA_Source, (IPTR) textChars, TAG_END);
6688 + if(textConverted)
6690 + m_items[i] = (char*) StrDup(textConverted);
6691 + CodesetsFreeA(textConverted, NULL);
6693 + free(textChars);
6698 + Object *list;
6700 + m_popup = WindowObject,
6701 + MUIA_Window_Borderless, (IPTR) TRUE,
6702 + MUIA_Window_DragBar, (IPTR) FALSE,
6703 + MUIA_Window_CloseGadget, (IPTR) FALSE,
6704 + MUIA_Window_DepthGadget, (IPTR) FALSE,
6705 + MUIA_Window_SizeGadget, (IPTR) FALSE,
6706 + WindowContents,
6707 + m_listview = ListviewObject,
6708 + MUIA_Listview_List,
6709 + list = ListObject,
6710 + MUIA_List_SourceArray, m_items,
6711 + End,
6712 + End,
6713 + End;
6715 + m_itemActivatedHook.h_Entry = (APTR)HookEntry;
6716 + m_itemActivatedHook.h_SubEntry = (APTR)itemActivated;
6718 + m_cancelledHook.h_Entry = (APTR)HookEntry;
6719 + m_cancelledHook.h_SubEntry = (APTR)cancelled;
6721 + m_hideHook.h_Entry = (APTR)HookEntry;
6722 + m_hideHook.h_SubEntry = (APTR)closed;
6724 + m_showHook.h_Entry = (APTR)HookEntry;
6725 + m_showHook.h_SubEntry = (APTR)opened;
6727 + DoMethod(list, MUIM_Notify, MUIA_List_Active, MUIV_EveryTime,
6728 + list, 3,
6729 + MUIM_CallHook, &m_itemActivatedHook, (IPTR) this);
6731 + DoMethod(m_popup, MUIM_Notify, MUIA_Window_Activate, FALSE,
6732 + m_popup, 3,
6733 + MUIM_CallHook, &m_cancelledHook, (IPTR) this);
6735 + DoMethod(m_popup, MUIM_Notify, MUIA_Window_Open, FALSE,
6736 + m_popup, 3,
6737 + MUIM_CallHook, &m_hideHook, (IPTR) this);
6739 + DoMethod(m_popup, MUIM_Notify, MUIA_Window_Open, TRUE,
6740 + m_popup, 3,
6741 + MUIM_CallHook, &m_showHook, (IPTR) this);
6743 + /* Add popup window to application */
6744 + Object *webView = (Object*) m_popupClient->hostWindow()->platformPageClient();
6745 + DoMethod(_app(webView), OM_ADDMEMBER, m_popup);
6748 +PopupMenu::~PopupMenu()
6750 + DoMethod(_app(m_popup), MUIM_Set, MUIA_Window_Open, (IPTR) FALSE);
6751 + DoMethod(_app(m_popup), OM_REMMEMBER, m_popup);
6753 + int itemCount = this->client()->listSize();
6754 + for (int i = 0; i < itemCount; ++i) {
6755 + FreeVec(m_items[i]);
6757 + FreeVec(m_items);
6759 + MUI_DisposeObject(m_popup);
6762 +void PopupMenu::show(const IntRect& r, FrameView* view, int index)
6764 + ASSERT(client());
6766 + Object *webView = (Object*) view->hostWindow()->platformPageClient();
6768 + IntRect rScreenCoords(view->contentsToWindow(r.location()), r.size());
6769 + rScreenCoords.setY(rScreenCoords.y() + rScreenCoords.height());
6771 + struct MUI_MinMax MinMaxInfo;
6772 + DoMethod(m_listview, MUIM_AskMinMax, &MinMaxInfo);
6774 + rScreenCoords.setHeight(MinMaxInfo.DefHeight);
6775 + rScreenCoords.setWidth(max(rScreenCoords.width(), (int) MinMaxInfo.DefWidth));
6777 + /* Get offsets to compute absolute position of new window on the screen */
6778 + IPTR winOffsetX, winOffsetY;
6779 + struct Window *parentWindow;
6780 + GetAttr(MUIA_Window, webView, (IPTR*) &parentWindow);
6781 + winOffsetX = parentWindow->LeftEdge;
6782 + winOffsetY = parentWindow->TopEdge;
6784 + SetAttrs(m_popup,
6785 + MUIA_Window_LeftEdge, (IPTR) _left(webView) + winOffsetX + rScreenCoords.x(),
6786 + MUIA_Window_TopEdge, (IPTR) _top(webView) + winOffsetY + rScreenCoords.y(),
6787 + MUIA_Window_Width, (IPTR) rScreenCoords.width(),
6788 + TAG_DONE
6789 + );
6791 + DoMethod(_app(m_popup), MUIM_Application_PushMethod, m_popup, 3, MUIM_Set, MUIA_Window_Open, (IPTR) TRUE);
6794 +void PopupMenu::hide()
6796 + /* It has to be this way because List object crashes if we close its parent window
6797 + * inside a notification call for this object */
6798 + DoMethod(_app(m_popup), MUIM_Application_PushMethod, m_popup, 3, MUIM_Set, MUIA_Window_Open, (IPTR) FALSE);
6802 +void PopupMenu::updateFromElement()
6804 + client()->setTextFromItem(client()->selectedIndex());
6807 +bool PopupMenu::itemWritingDirectionIsNatural()
6809 + return false;
6813 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.h
6814 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.h 1970-01-01 01:00:00.000000000 +0100
6815 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCPopupMenuAROS.h 2018-06-13 07:27:37.570979727 +0100
6816 @@ -0,0 +1,84 @@
6818 + * Copyright (C) 2008 Pleyo. All rights reserved.
6820 + * Redistribution and use in source and binary forms, with or without
6821 + * modification, are permitted provided that the following conditions
6822 + * are met:
6824 + * 1. Redistributions of source code must retain the above copyright
6825 + * notice, this list of conditions and the following disclaimer.
6826 + * 2. Redistributions in binary form must reproduce the above copyright
6827 + * notice, this list of conditions and the following disclaimer in the
6828 + * documentation and/or other materials provided with the distribution.
6829 + * 3. Neither the name of Pleyo nor the names of
6830 + * its contributors may be used to endorse or promote products derived
6831 + * from this software without specific prior written permission.
6833 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6834 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6835 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6836 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6837 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6838 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6839 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6840 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6841 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6842 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6843 + */
6846 +#ifndef PopupMenu_h
6847 +#define PopupMenu_h
6849 +#include "IntRect.h"
6850 +#include "PopupMenuClient.h"
6851 +#include <wtf/PassRefPtr.h>
6852 +#include <wtf/RefCounted.h>
6853 +#include "BALBase.h"
6855 +#include "Scrollbar.h"
6856 +#include "ScrollbarClient.h"
6857 +#include <wtf/RefPtr.h>
6859 +#include <wtf/HashMap.h>
6861 +#include <utility/hooks.h>
6863 +namespace WebCore {
6865 +class FrameView;
6866 +class Scrollbar;
6868 +class PopupMenu : public RefCounted<PopupMenu>
6870 +public:
6871 + static PassRefPtr<PopupMenu> create(PopupMenuClient* client) { return new PopupMenu(client); }
6872 + ~PopupMenu();
6874 + void disconnectClient() { m_popupClient = 0; }
6876 + void show(const IntRect&, FrameView*, int index);
6877 + void hide();
6879 + void updateFromElement();
6881 + PopupMenuClient* client() const { return m_popupClient; }
6883 + static bool itemWritingDirectionIsNatural();
6885 +protected:
6886 + PopupMenu(PopupMenuClient*);
6888 +private:
6889 + PopupMenuClient* m_popupClient;
6891 + BalWidget* m_popup;
6892 + BalWidget* m_listview;
6893 + int m_focusedIndex;
6894 + char **m_items;
6895 + struct Hook m_itemActivatedHook, m_hideHook, m_cancelledHook, m_showHook;
6900 +#endif
6901 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.cpp
6902 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.cpp 1970-01-01 01:00:00.000000000 +0100
6903 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.cpp 2018-06-13 07:27:37.570979727 +0100
6904 @@ -0,0 +1,510 @@
6906 + * Copyright (C) 2008 Pleyo. All rights reserved.
6908 + * Redistribution and use in source and binary forms, with or without
6909 + * modification, are permitted provided that the following conditions
6910 + * are met:
6912 + * 1. Redistributions of source code must retain the above copyright
6913 + * notice, this list of conditions and the following disclaimer.
6914 + * 2. Redistributions in binary form must reproduce the above copyright
6915 + * notice, this list of conditions and the following disclaimer in the
6916 + * documentation and/or other materials provided with the distribution.
6917 + * 3. Neither the name of Pleyo nor the names of
6918 + * its contributors may be used to endorse or promote products derived
6919 + * from this software without specific prior written permission.
6921 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
6922 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6923 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6924 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
6925 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6926 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6927 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
6928 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6929 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
6930 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6931 + */
6934 +#include "config.h"
6935 +#include "Logging.h"
6936 +#include "InputElement.h"
6937 +#include "RenderObject.h"
6938 +#include "RenderThemeAROS.h"
6940 +#include "GraphicsContext.h"
6941 +#include "Pen.h"
6942 +#include "RenderBox.h"
6944 +#include <cstdio>
6946 +#define THEME_COLOR 204
6947 +#define THEME_FONT 210
6949 +// Generic state constants
6950 +#define TS_NORMAL 1
6951 +#define TS_HOVER 2
6952 +#define TS_ACTIVE 3
6953 +#define TS_DISABLED 4
6954 +#define TS_FOCUSED 5
6956 +// Button constants
6957 +#define BP_BUTTON 1
6958 +#define BP_RADIO 2
6959 +#define BP_CHECKBOX 3
6961 +// Textfield constants
6962 +#define TFP_TEXTFIELD 1
6963 +#define TFS_READONLY 6
6966 +namespace WebCore {
6968 +PassRefPtr<RenderTheme> RenderThemeBal::create()
6970 + return adoptRef(new RenderThemeBal());
6973 +PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
6975 + static RenderTheme* rt = RenderThemeBal::create().releaseRef();
6976 + return rt;
6979 +void RenderThemeBal::addIntrinsicMargins(RenderStyle* style) const
6981 + // Cut out the intrinsic margins completely if we end up using a small font size
6982 + if (style->fontSize() < 11)
6983 + return;
6985 + // Intrinsic margin value.
6986 + const int m = 2;
6988 + // FIXME: Using width/height alone and not also dealing with min-width/max-width is flawed.
6989 + if (style->width().isIntrinsicOrAuto()) {
6990 + if (style->marginLeft().quirk())
6991 + style->setMarginLeft(Length(m, Fixed));
6992 + if (style->marginRight().quirk())
6993 + style->setMarginRight(Length(m, Fixed));
6996 + if (style->height().isAuto()) {
6997 + if (style->marginTop().quirk())
6998 + style->setMarginTop(Length(m, Fixed));
6999 + if (style->marginBottom().quirk())
7000 + style->setMarginBottom(Length(m, Fixed));
7005 +RenderThemeBal::RenderThemeBal()
7006 + : m_balWindow(0)
7007 + , m_balContainer(0)
7008 + , m_balEntry(0)
7009 + , m_balTreeView(0)
7013 +bool RenderThemeBal::supportsFocusRing(const RenderStyle* style) const
7015 + return false;
7018 +bool RenderThemeBal::controlSupportsTints(const RenderObject* o) const
7020 + return isEnabled(o);
7023 +int RenderThemeBal::baselinePosition(const RenderObject* o) const
7025 + // FIXME: This strategy is possibly incorrect for the GTK+ port.
7026 + if (o->style()->appearance() == CheckboxPart ||
7027 + o->style()->appearance() == RadioPart)
7028 + return toRenderBox(o)->marginTop() + toRenderBox(o)->height() - 2;
7029 + return RenderTheme::baselinePosition(o);
7034 +void RenderThemeBal::setCheckboxSize(RenderStyle* style) const
7036 + // If the width and height are both specified, then we have nothing to do.
7037 + if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
7038 + return;
7040 + // FIXME: A hard-coded size of 13 is used. This is wrong but necessary for now. It matches Firefox.
7041 + // At different DPI settings on Windows, querying the theme gives you a larger size that accounts for
7042 + // the higher DPI. Until our entire engine honors a DPI setting other than 96, we can't rely on the theme's
7043 + // metrics.
7044 + if (style->width().isIntrinsicOrAuto())
7045 + style->setWidth(Length(13, Fixed));
7046 + if (style->height().isAuto())
7047 + style->setHeight(Length(13, Fixed));
7050 +bool RenderThemeBal::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
7052 + i.context->save();
7053 + i.context->setStrokeStyle(SolidStroke);
7054 + i.context->setStrokeColor(Color::black);
7055 + PassRefPtr<RenderStyle> style = RenderStyle::create();
7056 + addIntrinsicMargins(style.get());
7058 + EBorderStyle v = INSET;
7059 + style->setBorderTopStyle(v);
7060 + style->setBorderLeftStyle(v);
7061 + style->setBorderBottomStyle(v);
7062 + style->setBorderRightStyle(v);
7063 + int borderWidth = 1;
7064 + style->setBorderTopWidth(borderWidth);
7065 + style->setBorderLeftWidth(borderWidth);
7066 + style->setBorderBottomWidth(borderWidth);
7067 + style->setBorderRightWidth(borderWidth);
7068 + toRenderBox(o)->paintFillLayerExtended(i,
7069 + o->style()->backgroundColor(), o->style()->backgroundLayers(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height(), 0, style->backgroundComposite());
7070 + toRenderBox(o)->paintBorder(i.context,
7071 + r.x(), r.y(), r.width(), r.height(),
7072 + style.get(), true, true);
7074 + if( o->node()->active() ) {
7075 + IntRect r2(r);
7076 + r2.inflate(-2);
7077 + i.context->setFillColor(WebCore::Color(0xc0,0xc0,0xc0));
7078 + i.context->drawRect(r2);
7079 + v = GROOVE;
7080 + style->setBorderTopStyle(v);
7081 + style->setBorderLeftStyle(v);
7082 + style->setBorderBottomStyle(v);
7083 + style->setBorderRightStyle(v);
7084 + int borderWidth = 1;
7085 + style->setBorderTopWidth(borderWidth);
7086 + style->setBorderLeftWidth(borderWidth);
7087 + style->setBorderBottomWidth(borderWidth);
7088 + style->setBorderRightWidth(borderWidth);
7089 + toRenderBox(o)->paintFillLayerExtended(i,
7090 + o->style()->backgroundColor(), o->style()->backgroundLayers(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height(), 0, style->backgroundComposite());
7091 + toRenderBox(o)->paintBorder(i.context,
7092 + r.x(), r.y(), r.width(), r.height(),
7093 + style.get(), true, true);
7095 + InputElement *input = toInputElement(static_cast<Element*>(o->node()));
7096 + if(input && input->isChecked()) {
7097 + i.context->setStrokeColor(Color::black);
7098 + i.context->setStrokeStyle(SolidStroke);
7099 + IntRect r2(r);
7100 + r2.inflate(-borderWidth-2);
7101 + i.context->drawLine(IntPoint(r2.x(),r2.y()), IntPoint(r2.x()+r2.width(),r2.y()+r2.height()));
7102 + i.context->drawLine(IntPoint(r2.x()+r2.width(),r2.y()), IntPoint(r2.x(),r2.y()+r2.height()));
7104 + i.context->restore();
7105 + return false;
7108 +void RenderThemeBal::setRadioSize(RenderStyle* style) const
7110 + // This is the same as checkboxes.
7111 + setCheckboxSize(style);
7114 +bool RenderThemeBal::paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
7116 + i.context->save();
7117 + i.context->setStrokeStyle(SolidStroke);
7118 + PassRefPtr<RenderStyle> style = RenderStyle::create();
7119 + EBorderStyle v = RIDGE;
7120 + style->setBorderTopStyle(v);
7121 + style->setBorderLeftStyle(v);
7122 + style->setBorderBottomStyle(v);
7123 + style->setBorderRightStyle(v);
7124 +#if PLATFORM(AMIGAOS4)
7125 + int borderWidth = 2;
7126 +#else
7127 + int borderWidth = 1;
7128 +#endif
7129 + style->setBorderTopWidth(borderWidth);
7130 + style->setBorderLeftWidth(borderWidth);
7131 + style->setBorderBottomWidth(borderWidth);
7132 + style->setBorderRightWidth(borderWidth);
7134 + toRenderBox(o)->paintFillLayerExtended(i,
7135 + o->style()->backgroundColor(), o->style()->backgroundLayers(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height(), 0, style->backgroundComposite());
7136 + toRenderBox(o)->paintBorder(i.context,
7137 + r.x(), r.y(), r.width(), r.height(),
7138 + style.get(), true, true);
7139 + InputElement *input = toInputElement(static_cast<Element*>(o->node()));
7140 + if(input && input->isChecked()) {
7141 + IntRect r2(r);
7142 +#if PLATFORM(AMIGAOS4)
7143 + r2.inflate(-borderWidth - 1);
7144 + i.context->setFillColor(Color(0xFF618ECE));
7145 +#else
7146 + r2.inflate(-borderWidth - 2);
7147 +#endif
7148 + i.context->drawRect(r2);
7150 + i.context->restore();
7151 + return false;
7154 +void RenderThemeBal::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
7156 + addIntrinsicMargins(style);
7159 +bool RenderThemeBal::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
7161 + toRenderBox(o)->paintFillLayerExtended(i,
7162 + o->style()->backgroundColor(), o->style()->backgroundLayers(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height(), 0, o->style()->backgroundComposite());
7163 + toRenderBox(o)->paintBorder(i.context,
7164 + r.x(), r.y(), r.width(), r.height(),
7165 + o->style(), true, true);
7166 + return false;
7169 +void RenderThemeBal::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
7171 + style->resetBorder();
7172 + style->resetPadding();
7173 + style->setHeight(Length(Auto));
7174 + style->setWhiteSpace(PRE);
7177 +bool RenderThemeBal::paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
7179 + PassRefPtr<RenderStyle> style = RenderStyle::create();
7180 + style->setMarginLeft(Length(10, Fixed));
7181 + style->setMarginTop(Length(10, Fixed));
7182 + EBorderStyle v = INSET;
7183 + style->setBorderTopStyle(v);
7184 + style->setBorderLeftStyle(v);
7185 + style->setBorderBottomStyle(v);
7186 + style->setBorderRightStyle(v);
7187 + style->setBorderTopWidth(1);
7188 + style->setBorderLeftWidth(1);
7189 + style->setBorderBottomWidth(1);
7190 + style->setBorderRightWidth(1);
7191 + toRenderBox(o)->paintFillLayerExtended(i,
7192 + o->style()->backgroundColor(), o->style()->backgroundLayers(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height(), 0, style->backgroundComposite());
7193 + toRenderBox(o)->paintBorder(i.context,
7194 + r.x(), r.y(), r.width(), r.height(),
7195 + style.get(), true, true);
7196 + return false;
7200 +void RenderThemeBal::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
7202 + style->resetBorder();
7203 + style->resetPadding();
7204 + style->setHeight(Length(Auto));
7205 + style->setWhiteSpace(PRE);
7208 +bool RenderThemeBal::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
7210 + i.context->save();
7211 + i.context->setStrokeStyle(SolidStroke);
7212 + i.context->setStrokeColor(Color::black);
7213 + PassRefPtr<RenderStyle> style = RenderStyle::create();
7214 + addIntrinsicMargins(style.get());
7216 + EBorderStyle v = INSET;
7217 + style->setBorderTopStyle(v);
7218 + style->setBorderLeftStyle(v);
7219 + style->setBorderBottomStyle(v);
7220 + style->setBorderRightStyle(v);
7221 + int borderWidth = 1;
7222 + style->setBorderTopWidth(borderWidth);
7223 + style->setBorderLeftWidth(borderWidth);
7224 + style->setBorderBottomWidth(borderWidth);
7225 + style->setBorderRightWidth(borderWidth);
7226 + toRenderBox(o)->paintFillLayerExtended(i,
7227 + o->style()->backgroundColor(), o->style()->backgroundLayers(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height(), 0, style->backgroundComposite());
7228 + toRenderBox(o)->paintBorder(i.context,
7229 + r.x(), r.y(), r.width(), r.height(),
7230 + style.get(), true, true);
7232 + i.context->restore();
7233 + return false;
7236 +void RenderThemeBal::adjustTextAreaStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
7238 + adjustTextFieldStyle(selector, style, e);
7241 +bool RenderThemeBal::paintTextArea(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
7243 + return paintTextField(o, i, r);
7246 +void RenderThemeBal::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
7248 + adjustSearchFieldCancelButtonStyle(selector, style, e);
7251 +bool RenderThemeBal::paintSearchFieldResultsButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
7253 + return true;
7256 +void RenderThemeBal::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
7258 + style->resetBorder();
7259 + style->resetPadding();
7261 + // FIXME: This should not be hard-coded.
7262 + IntSize size = IntSize(14, 14);
7263 + style->setWidth(Length(size.width(), Fixed));
7264 + style->setHeight(Length(size.height(), Fixed));
7267 +bool RenderThemeBal::paintSearchFieldResultsDecoration(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
7269 + return true;
7272 +void RenderThemeBal::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
7274 + style->resetBorder();
7275 + style->resetPadding();
7277 + // FIXME: This should not be hard-coded.
7278 + IntSize size = IntSize(14, 14);
7279 + style->setWidth(Length(size.width(), Fixed));
7280 + style->setHeight(Length(size.height(), Fixed));
7283 +bool RenderThemeBal::paintSearchFieldCancelButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
7285 + return true;
7288 +void RenderThemeBal::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
7290 + adjustTextFieldStyle(selector, style, e);
7293 +bool RenderThemeBal::paintSearchField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
7295 + return paintTextField(o, i, rect);
7298 +Color RenderThemeBal::platformActiveSelectionBackgroundColor() const
7300 +#if PLATFORM(AMIGAOS4)
7301 + Color c(0xFF618ECE);
7302 +#else
7303 + Color c(0, 0, 255);
7304 +#endif
7305 + return c;
7308 +Color RenderThemeBal::platformInactiveSelectionBackgroundColor() const
7310 +#if PLATFORM(AMIGAOS4)
7311 + Color c(0xFFCFCFCF);
7312 +#else
7313 + Color c(0, 0, 255);
7314 +#endif
7315 + return c;
7318 +Color RenderThemeBal::platformActiveSelectionForegroundColor() const
7320 +#if PLATFORM(AMIGAOS4)
7321 + Color c(0xFF000000);
7322 +#else
7323 + Color c(255, 255, 255);
7324 +#endif
7325 + return c;
7328 +Color RenderThemeBal::platformInactiveSelectionForegroundColor() const
7330 +#if PLATFORM(AMIGAOS4)
7331 + Color c(0xFF3F3F3F);
7332 +#else
7333 + Color c(255, 255, 255);
7334 +#endif
7335 + return c;
7338 +Color RenderThemeBal::activeListBoxSelectionBackgroundColor() const
7340 +#if PLATFORM(AMIGAOS4)
7341 + Color c(0xFF618ECE);
7342 +#else
7343 + Color c(0, 0, 255);
7344 +#endif
7345 + return c;
7348 +Color RenderThemeBal::inactiveListBoxSelectionBackgroundColor() const
7350 +#if PLATFORM(AMIGAOS4)
7351 + Color c(0xFFCFCFCF);
7352 +#else
7353 + Color c(0, 0, 255);
7354 +#endif
7355 + return c;
7358 +Color RenderThemeBal::activeListBoxSelectionForegroundColor() const
7360 +#if PLATFORM(AMIGAOS4)
7361 + Color c(0xFF000000);
7362 +#else
7363 + Color c(255, 255, 255);
7364 +#endif
7365 + return c;
7368 +Color RenderThemeBal::inactiveListBoxSelectionForegroundColor() const
7370 +#if PLATFORM(AMIGAOS4)
7371 + Color c(0xFF3F3F3F);
7372 +#else
7373 + Color c(255, 255, 255);
7374 +#endif
7375 + return c;
7378 +double RenderThemeBal::caretBlinkInterval() const
7380 + return 1.0;
7383 +void RenderThemeBal::systemFont(int, FontDescription&) const
7385 + // If you remove this notImplemented(), replace it with an comment that explains why.
7386 + NotImplemented();
7390 +BalContainer* RenderThemeBal::balContainer() const
7392 + if (m_balContainer)
7393 + return m_balContainer;
7395 + return m_balContainer;
7398 +BalWidget* RenderThemeBal::balEntry() const
7400 + if (m_balEntry)
7401 + return m_balEntry;
7403 + return m_balEntry;
7406 +BalWidget* RenderThemeBal::balTreeView() const
7408 + if (m_balTreeView)
7409 + return m_balTreeView;
7411 + return m_balTreeView;
7415 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.h
7416 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.h 1970-01-01 01:00:00.000000000 +0100
7417 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCRenderThemeAROS.h 2018-06-13 07:27:37.570979727 +0100
7418 @@ -0,0 +1,136 @@
7420 + * Copyright (C) 2008 Pleyo. All rights reserved.
7422 + * Redistribution and use in source and binary forms, with or without
7423 + * modification, are permitted provided that the following conditions
7424 + * are met:
7426 + * 1. Redistributions of source code must retain the above copyright
7427 + * notice, this list of conditions and the following disclaimer.
7428 + * 2. Redistributions in binary form must reproduce the above copyright
7429 + * notice, this list of conditions and the following disclaimer in the
7430 + * documentation and/or other materials provided with the distribution.
7431 + * 3. Neither the name of Pleyo nor the names of
7432 + * its contributors may be used to endorse or promote products derived
7433 + * from this software without specific prior written permission.
7435 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
7436 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7437 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7438 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
7439 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
7440 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7441 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
7442 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7443 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
7444 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7445 + */
7448 +#ifndef RenderThemeGdk_h
7449 +#define RenderThemeGdk_h
7451 +#include "RenderTheme.h"
7452 +#include "GraphicsContext.h"
7454 +#include "BALBase.h"
7456 +namespace WebCore {
7458 +class RenderThemeBal : public RenderTheme {
7459 +private:
7460 + RenderThemeBal();
7461 + virtual ~RenderThemeBal() { }
7463 +public:
7464 + static PassRefPtr<RenderTheme> create();
7466 + // A method asking if the theme's controls actually care about redrawing when hovered.
7467 + virtual bool supportsHover(const RenderStyle* style) const { return true; }
7469 + // A method asking if the theme is able to draw the focus ring.
7470 + virtual bool supportsFocusRing(const RenderStyle*) const;
7472 + // A method asking if the control changes its tint when the window has focus or not.
7473 + virtual bool controlSupportsTints(const RenderObject*) const;
7475 + // A general method asking if any control tinting is supported at all.
7476 + virtual bool supportsControlTints() const { return true; }
7478 + // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline
7479 + // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
7480 + // controls that need to do this.
7481 + virtual int baselinePosition(const RenderObject*) const;
7483 + // The platform selection color.
7484 + virtual Color platformActiveSelectionBackgroundColor() const;
7485 + virtual Color platformInactiveSelectionBackgroundColor() const;
7486 + virtual Color platformActiveSelectionForegroundColor() const;
7487 + virtual Color platformInactiveSelectionForegroundColor() const;
7489 + // List Box selection color
7490 + virtual Color activeListBoxSelectionBackgroundColor() const;
7491 + virtual Color activeListBoxSelectionForegroundColor() const;
7492 + virtual Color inactiveListBoxSelectionBackgroundColor() const;
7493 + virtual Color inactiveListBoxSelectionForegroundColor() const;
7495 + virtual double caretBlinkInterval() const;
7497 + // System fonts.
7498 + virtual void systemFont(int propId, FontDescription&) const;
7500 +protected:
7501 + virtual bool paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
7502 + virtual void setCheckboxSize(RenderStyle* style) const;
7504 + virtual bool paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
7505 + virtual void setRadioSize(RenderStyle* style) const;
7507 + virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7508 + virtual bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7510 + virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7511 + virtual bool paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7513 + virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7514 + virtual bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7516 + virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7517 + virtual bool paintMenuList(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7519 + virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7520 + virtual bool paintSearchFieldResultsDecoration(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7522 + virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7523 + virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7525 + virtual void adjustSearchFieldResultsButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7526 + virtual bool paintSearchFieldResultsButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7528 + virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
7529 + virtual bool paintSearchFieldCancelButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
7532 +private:
7533 + /*
7534 + * hold the state
7535 + */
7536 + BalWidget* balEntry() const;
7537 + BalWidget* balTreeView() const;
7539 + /*
7540 + * unmapped GdkWindow having a container. This is holding all
7541 + * our fake widgets
7542 + */
7543 + BalContainer* balContainer() const;
7544 + void addIntrinsicMargins(RenderStyle* style) const;
7545 +private:
7546 + mutable BalWidget* m_balWindow;
7547 + mutable BalContainer* m_balContainer;
7548 + mutable BalWidget* m_balEntry;
7549 + mutable BalWidget* m_balTreeView;
7554 +#endif
7555 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.cpp
7556 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.cpp 1970-01-01 01:00:00.000000000 +0100
7557 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.cpp 2018-06-13 07:27:37.570979727 +0100
7558 @@ -0,0 +1,260 @@
7560 + * Copyright (C) 2008 Apple Inc. All Rights Reserved.
7562 + * Redistribution and use in source and binary forms, with or without
7563 + * modification, are permitted provided that the following conditions
7564 + * are met:
7565 + * 1. Redistributions of source code must retain the above copyright
7566 + * notice, this list of conditions and the following disclaimer.
7567 + * 2. Redistributions in binary form must reproduce the above copyright
7568 + * notice, this list of conditions and the following disclaimer in the
7569 + * documentation and/or other materials provided with the distribution.
7571 + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
7572 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7573 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7574 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
7575 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
7576 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
7577 + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
7578 + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
7579 + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7580 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7581 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7582 + */
7584 +#include "config.h"
7585 +#include "ScrollbarThemeAROS.h"
7587 +#include "BALBase.h"
7588 +#include "ChromeClient.h"
7589 +#include "Frame.h"
7590 +#include "FrameView.h"
7591 +#include "GraphicsContext.h"
7592 +#include "Logging.h"
7593 +#include "Page.h"
7594 +#include "PlatformMouseEvent.h"
7595 +#include "GraphicsContext.h"
7596 +#include "Scrollbar.h"
7597 +#include "ScrollbarClient.h"
7598 +#include "Settings.h"
7600 +namespace WebCore {
7602 +// Constants used to figure the drag rect outside which we should snap the
7603 +// scrollbar thumb back to its origin. These calculations are based on
7604 +// observing the behavior of the MSVC8 main window scrollbar + some
7605 +// guessing/extrapolation.
7606 +static const int kOffEndMultiplier = 3;
7607 +static const int kOffSideMultiplier = 8;
7610 +ScrollbarTheme* ScrollbarTheme::nativeTheme()
7612 + static ScrollbarThemeBal theme;
7613 + return &theme;
7616 +ScrollbarThemeBal::~ScrollbarThemeBal()
7621 +int ScrollbarThemeBal::scrollbarThickness(ScrollbarControlSize controlSize)
7623 + BalNotImplemented();
7624 + return 11;
7627 +bool ScrollbarThemeBal::hasThumb(Scrollbar* scrollbar)
7629 + return thumbLength(scrollbar) > 0;
7632 +IntRect ScrollbarThemeBal::backButtonRect(Scrollbar* scrollbar, ScrollbarPart part, bool)
7634 + if (part == BackButtonEndPart)
7635 + return IntRect();
7637 + // Our desired rect is essentially 17x17.
7639 + // Our actual rect will shrink to half the available space when
7640 + // we have < 34 pixels left. This allows the scrollbar
7641 + // to scale down and function even at tiny sizes.
7642 + int thickness = scrollbarThickness();
7643 + if (scrollbar->orientation() == HorizontalScrollbar)
7644 + return IntRect(scrollbar->x(), scrollbar->y(),
7645 + scrollbar->width() < 2 * thickness ? scrollbar->width() / 2 : thickness, thickness);
7646 + return IntRect(scrollbar->x(), scrollbar->y(),
7647 + thickness, scrollbar->height() < 2 * thickness ? scrollbar->height() / 2 : thickness);
7650 +IntRect ScrollbarThemeBal::forwardButtonRect(Scrollbar* scrollbar, ScrollbarPart part, bool)
7652 + if (part == ForwardButtonStartPart)
7653 + return IntRect();
7655 + // Our desired rect is essentially 17x17.
7657 + // Our actual rect will shrink to half the available space when
7658 + // we have < 34 pixels left. This allows the scrollbar
7659 + // to scale down and function even at tiny sizes.
7660 + int thickness = scrollbarThickness();
7661 + if (scrollbar->orientation() == HorizontalScrollbar) {
7662 + int w = scrollbar->width() < 2 * thickness ? scrollbar->width() / 2 : thickness;
7663 + return IntRect(scrollbar->x() + scrollbar->width() - w, scrollbar->y(), w, thickness);
7666 + int h = scrollbar->height() < 2 * thickness ? scrollbar->height() / 2 : thickness;
7667 + return IntRect(scrollbar->x(), scrollbar->y() + scrollbar->height() - h, thickness, h);
7670 +IntRect ScrollbarThemeBal::trackRect(Scrollbar* scrollbar, bool)
7672 + int thickness = scrollbarThickness();
7673 + if (scrollbar->orientation() == HorizontalScrollbar) {
7674 + if (scrollbar->width() < 2 * thickness)
7675 + return IntRect();
7676 + return IntRect(scrollbar->x() + thickness, scrollbar->y(), scrollbar->width() - 2 * thickness, thickness);
7678 + if (scrollbar->height() < 2 * thickness)
7679 + return IntRect();
7680 + return IntRect(scrollbar->x(), scrollbar->y() + thickness, thickness, scrollbar->height() - 2 * thickness);
7683 +void ScrollbarThemeBal::paintButton(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart part)
7685 + context->save();
7686 + bool start = (part == BackButtonStartPart);
7687 + static RefPtr<WebCore::Image> left = Image::loadPlatformResource("/ScrollbarTheme/left");
7688 + if (!left->isNull()) {
7689 + IntPoint startPos(rect.location());
7690 + if (start) {
7691 + if (scrollbar->orientation() == HorizontalScrollbar)
7692 + context->drawImage(left.get(), startPos);
7693 + else {
7694 + static RefPtr<WebCore::Image> up = Image::loadPlatformResource("/ScrollbarTheme/up");
7695 + context->drawImage(up.get(), startPos);
7697 + } else {
7698 + if (scrollbar->orientation() == HorizontalScrollbar) {
7699 + static RefPtr<WebCore::Image> right = Image::loadPlatformResource("/ScrollbarTheme/right");
7700 + context->drawImage(right.get(), startPos);
7701 + } else {
7702 + static RefPtr<WebCore::Image> down = Image::loadPlatformResource("/ScrollbarTheme/down");
7703 + context->drawImage(down.get(), startPos);
7706 + } else {
7707 + context->drawRect(rect);
7708 + context->fillRect(IntRect(rect.x() + 1, rect.y() + 1, rect.width() - 2, rect.height() - 2), Color::gray);
7710 + if (start) {
7711 + if (scrollbar->orientation() == HorizontalScrollbar) {
7712 + context->drawLine(IntPoint(rect.right(), rect.y()), IntPoint(rect.x() - 1, (rect.bottom() + rect.y())/2));
7713 + context->drawLine(IntPoint(rect.right(), rect.bottom()), IntPoint(rect.x() - 1, (rect.bottom() + rect.y())/2));
7714 + } else {
7715 + context->drawLine(IntPoint(rect.x(), rect.bottom()), IntPoint((rect.x() + rect.right())/2, rect.y() + 1));
7716 + context->drawLine(IntPoint(rect.right() - 1, rect.bottom()), IntPoint((rect.x() + rect.right())/2, rect.y() + 1));
7718 + } else {
7719 + if (scrollbar->orientation() == HorizontalScrollbar) {
7720 + context->drawLine(IntPoint(rect.x(), rect.y()), IntPoint(rect.right() - 1, (rect.bottom() + rect.y())/2));
7721 + context->drawLine(IntPoint(rect.x(), rect.bottom()), IntPoint(rect.right() - 1, (rect.bottom() + rect.y())/2));
7722 + } else {
7723 + context->drawLine(IntPoint(rect.x(), rect.y()), IntPoint((rect.x() + rect.right())/2, rect.bottom() - 1));
7724 + context->drawLine(IntPoint(rect.right(), rect.y()), IntPoint((rect.x() + rect.right())/2, rect.bottom() - 1));
7728 + context->restore();
7731 +void ScrollbarThemeBal::paintThumb(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect)
7733 + context->save();
7734 + if (scrollbar->orientation() == HorizontalScrollbar) {
7735 + static RefPtr<WebCore::Image> thumbH = Image::loadPlatformResource("/ScrollbarTheme/thumbH");
7736 + if (!thumbH->isNull()) {
7737 + static RefPtr<WebCore::Image> thumbHL = Image::loadPlatformResource("/ScrollbarTheme/thumbHL");
7738 + static RefPtr<WebCore::Image> thumbHR = Image::loadPlatformResource("/ScrollbarTheme/thumbHR");
7739 + IntPoint startPos(rect.location());
7740 + IntPoint endPos(rect.right() - thumbHR->width(), rect.y());
7741 + IntRect destRect(rect.x() + thumbHL->width() - 1, rect.y(), rect.width() - thumbHR->width() - thumbHL->width() + 1, rect.height());
7743 + context->drawImage(thumbHL.get(), startPos);
7744 + context->drawTiledImage(thumbH.get(), destRect, IntPoint(0, 0), IntSize(thumbH->width(), thumbH->height()));
7745 + context->drawImage(thumbHR.get(), endPos);
7747 + } else {
7748 + context->drawRect(rect);
7749 + context->fillRect(IntRect(rect.x() + 1, rect.y() + 1, rect.width() - 2, rect.height() - 2), Color::gray);
7751 + } else {
7752 + static RefPtr<WebCore::Image> thumbV = Image::loadPlatformResource("/ScrollbarTheme/thumbV");
7753 + if (!thumbV->isNull()) {
7754 + static RefPtr<WebCore::Image> thumbVU = Image::loadPlatformResource("/ScrollbarTheme/thumbVU");
7755 + static RefPtr<WebCore::Image> thumbVD = Image::loadPlatformResource("/ScrollbarTheme/thumbVD");
7756 + IntPoint startPos(rect.location());
7757 + IntPoint endPos(rect.x(), rect.bottom() - thumbVD->height());
7758 + IntRect destRect(rect.x(), rect.y() + thumbVU->height(), rect.width(), rect.height() - thumbVU->height() - thumbVD->height());
7760 + context->drawImage(thumbVU.get(), startPos);
7761 + context->drawTiledImage(thumbV.get(), destRect, IntPoint(0, 0), IntSize(thumbV->width(), thumbV->height()));
7762 + context->drawImage(thumbVD.get(), endPos);
7763 + } else {
7764 + context->drawRect(rect);
7765 + context->fillRect(IntRect(rect.x() + 1, rect.y() + 1, rect.width() - 2, rect.height() - 2), Color::gray);
7768 + context->restore();
7772 +void ScrollbarThemeBal::paintTrackBackground(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect)
7774 + // Just assume a forward track part. We only paint the track as a single piece when there is no thumb.
7775 + if (!hasThumb(scrollbar))
7776 + paintTrackPiece(context, scrollbar, rect, ForwardTrackPart);
7779 +bool ScrollbarThemeBal::invalidateOnMouseEnterExit()
7781 + return false;
7784 +void ScrollbarThemeBal::themeChanged()
7788 +bool ScrollbarThemeBal::shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent& evt)
7790 + return evt.shiftKey() && evt.button() == LeftButton;
7793 +void ScrollbarThemeBal::paintTrackPiece(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart partType)
7795 + context->save();
7797 + static RefPtr<WebCore::Image> bg = Image::loadPlatformResource("/ScrollbarTheme/bg");
7798 + if (!bg->isNull()) {
7799 + if (scrollbar->orientation() == HorizontalScrollbar) {
7800 + static RefPtr<WebCore::Image> bgh = Image::loadPlatformResource("/ScrollbarTheme/bgh");
7801 + IntRect destRect(rect.x() - 1, rect.y(), rect.width() + 2, rect.height());
7802 + context->drawTiledImage(bgh.get(), destRect, IntPoint(0, 0), IntSize(bgh->width(), bgh->height()));
7803 + } else {
7804 + IntRect destRect(rect.x(), rect.y() - 1, rect.width(), rect.height() + 2 );
7805 + context->drawTiledImage(bg.get(), destRect, IntPoint(0, 0), IntSize(bg->width(), bg->height()));
7807 + } else {
7808 + context->fillRect(rect, Color::white);
7809 + if (scrollbar->orientation() == HorizontalScrollbar)
7810 + context->drawLine(IntPoint(rect.x(), (rect.bottom() + rect.y()) / 2), IntPoint(rect.right(), (rect.bottom() + rect.y()) / 2));
7811 + else
7812 + context->drawLine(IntPoint((rect.right() + rect.x()) / 2, rect.y()), IntPoint((rect.right() + rect.x()) / 2, rect.bottom()));
7814 + context->restore();
7819 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.h
7820 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.h 1970-01-01 01:00:00.000000000 +0100
7821 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollbarThemeAROS.h 2018-06-13 07:27:37.570979727 +0100
7822 @@ -0,0 +1,61 @@
7824 + * Copyright (C) 2008 Apple Inc. All Rights Reserved.
7826 + * Redistribution and use in source and binary forms, with or without
7827 + * modification, are permitted provided that the following conditions
7828 + * are met:
7829 + * 1. Redistributions of source code must retain the above copyright
7830 + * notice, this list of conditions and the following disclaimer.
7831 + * 2. Redistributions in binary form must reproduce the above copyright
7832 + * notice, this list of conditions and the following disclaimer in the
7833 + * documentation and/or other materials provided with the distribution.
7835 + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
7836 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7837 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7838 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
7839 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
7840 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
7841 + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
7842 + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
7843 + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7844 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7845 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7846 + */
7848 +#ifndef ScrollbarThemeBal_h
7849 +#define ScrollbarThemeBal_h
7851 +#include "ScrollbarThemeComposite.h"
7853 +namespace WebCore {
7855 +class ScrollbarThemeBal : public ScrollbarThemeComposite {
7856 +public:
7857 + ScrollbarThemeBal() {};
7858 + virtual ~ScrollbarThemeBal();
7860 + virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
7862 + virtual void themeChanged();
7864 + virtual bool invalidateOnMouseEnterExit();
7866 +protected:
7867 + virtual bool hasButtons(Scrollbar*) { return true; }
7868 + virtual bool hasThumb(Scrollbar*);
7870 + virtual IntRect backButtonRect(Scrollbar*, ScrollbarPart, bool painting = false);
7871 + virtual IntRect forwardButtonRect(Scrollbar*, ScrollbarPart, bool painting = false);
7872 + virtual IntRect trackRect(Scrollbar*, bool painting = false);
7874 + virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&);
7876 + virtual void paintTrackBackground(GraphicsContext*, Scrollbar*, const IntRect&);
7877 + virtual void paintTrackPiece(GraphicsContext*, Scrollbar*, const IntRect&, ScrollbarPart);
7878 + virtual void paintButton(GraphicsContext*, Scrollbar*, const IntRect&, ScrollbarPart);
7879 + virtual void paintThumb(GraphicsContext*, Scrollbar*, const IntRect&);
7883 +#endif
7884 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.cpp
7885 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.cpp 1970-01-01 01:00:00.000000000 +0100
7886 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.cpp 2018-06-13 07:27:37.570979727 +0100
7887 @@ -0,0 +1,47 @@
7889 + * Copyright (C) 2008 Pleyo. All rights reserved.
7891 + * Redistribution and use in source and binary forms, with or without
7892 + * modification, are permitted provided that the following conditions
7893 + * are met:
7895 + * 1. Redistributions of source code must retain the above copyright
7896 + * notice, this list of conditions and the following disclaimer.
7897 + * 2. Redistributions in binary form must reproduce the above copyright
7898 + * notice, this list of conditions and the following disclaimer in the
7899 + * documentation and/or other materials provided with the distribution.
7900 + * 3. Neither the name of Pleyo nor the names of
7901 + * its contributors may be used to endorse or promote products derived
7902 + * from this software without specific prior written permission.
7904 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
7905 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7906 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7907 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
7908 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
7909 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
7910 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
7911 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7912 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
7913 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7914 + */
7917 +#include "config.h"
7918 +#include "ScrollView.h"
7920 +#include "FloatRect.h"
7921 +#include "GraphicsContext.h"
7922 +#include "HostWindow.h"
7923 +#include "IntRect.h"
7924 +#include "NotImplemented.h"
7925 +#include "PlatformMouseEvent.h"
7926 +#include "PlatformWheelEvent.h"
7928 +namespace WebCore {
7930 +void ScrollView::setBalAdjustments(BalAdjustment* hadj, BalAdjustment* vadj)
7934 +} // Namespace WebCore
7935 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.h
7936 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.h 1970-01-01 01:00:00.000000000 +0100
7937 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCScrollViewAROS.h 2018-06-13 07:27:37.570979727 +0100
7938 @@ -0,0 +1,300 @@
7940 + * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
7942 + * Redistribution and use in source and binary forms, with or without
7943 + * modification, are permitted provided that the following conditions
7944 + * are met:
7945 + * 1. Redistributions of source code must retain the above copyright
7946 + * notice, this list of conditions and the following disclaimer.
7947 + * 2. Redistributions in binary form must reproduce the above copyright
7948 + * notice, this list of conditions and the following disclaimer in the
7949 + * documentation and/or other materials provided with the distribution.
7951 + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
7952 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7953 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
7954 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
7955 + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
7956 + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
7957 + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
7958 + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
7959 + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7960 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7961 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7962 + */
7964 +#ifndef ScrollView_h
7965 +#define ScrollView_h
7967 +#include "IntRect.h"
7968 +#include "Scrollbar.h"
7969 +#include "ScrollbarClient.h"
7970 +#include "ScrollTypes.h"
7971 +#include "Widget.h"
7973 +#include <wtf/HashSet.h>
7974 +#include "BALBase.h"
7976 +namespace WebCore {
7978 +class PlatformWheelEvent;
7979 +class Scrollbar;
7980 +class HostWindow;
7982 +class ScrollView : public Widget, public ScrollbarClient {
7983 +public:
7984 + ~ScrollView();
7986 + // ScrollbarClient method. FrameView overrides the other two.
7987 + virtual void valueChanged(Scrollbar*);
7989 + // The window thats hosts the ScrollView. The ScrollView will communicate scrolls and repaints to the
7990 + // host window in the window's coordinate space.
7991 + virtual HostWindow* hostWindow() const = 0;
7993 + // Returns a clip rect in host window coordinates. Used to clip the blit on a scroll.
7994 + virtual IntRect windowClipRect(bool clipToContents = true) const = 0;
7996 + // Methods for child manipulation and inspection.
7997 + const HashSet<RefPtr<Widget> >* children() const { return &m_children; }
7998 + void addChild(PassRefPtr<Widget>);
7999 + void removeChild(Widget*);
8001 + // If the scroll view does not use a native widget, then it will have cross-platform Scrollbars. These methods
8002 + // can be used to obtain those scrollbars.
8003 + Scrollbar* horizontalScrollbar() const { return m_horizontalScrollbar.get(); }
8004 + Scrollbar* verticalScrollbar() const { return m_verticalScrollbar.get(); }
8005 + bool isScrollViewScrollbar(const Widget* child) const { return horizontalScrollbar() == child || verticalScrollbar() == child; }
8007 + // Methods for setting and retrieving the scrolling mode in each axis (horizontal/vertical). The mode has values of
8008 + // AlwaysOff, AlwaysOn, and Auto. AlwaysOff means never show a scrollbar, AlwaysOn means always show a scrollbar.
8009 + // Auto means show a scrollbar only when one is needed.
8010 + // Note that for platforms with native widgets, these modes are considered advisory. In other words the underlying native
8011 + // widget may choose not to honor the requested modes.
8012 + void setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode verticalMode);
8013 + void setHorizontalScrollbarMode(ScrollbarMode mode) { setScrollbarModes(mode, verticalScrollbarMode()); }
8014 + void setVerticalScrollbarMode(ScrollbarMode mode) { setScrollbarModes(horizontalScrollbarMode(), mode); }
8015 + void scrollbarModes(ScrollbarMode& horizontalMode, ScrollbarMode& verticalMode) const;
8016 + ScrollbarMode horizontalScrollbarMode() const { ScrollbarMode horizontal, vertical; scrollbarModes(horizontal, vertical); return horizontal; }
8017 + ScrollbarMode verticalScrollbarMode() const { ScrollbarMode horizontal, vertical; scrollbarModes(horizontal, vertical); return vertical; }
8018 + virtual void setCanHaveScrollbars(bool flag);
8019 + bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
8021 + // Overridden by FrameView to create custom CSS scrollbars if applicable.
8022 + virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
8024 + // If the prohibits scrolling flag is set, then all scrolling in the view (even programmatic scrolling) is turned off.
8025 + void setProhibitsScrolling(bool b) { m_prohibitsScrolling = b; }
8026 + bool prohibitsScrolling() const { return m_prohibitsScrolling; }
8028 + // Whether or not a scroll view will blit visible contents when it is scrolled. Blitting is disabled in situations
8029 + // where it would cause rendering glitches (such as with fixed backgrounds or when the view is partially transparent).
8030 + void setCanBlitOnScroll(bool);
8031 + bool canBlitOnScroll() const;
8033 + // The visible content rect has a location that is the scrolled offset of the document. The width and height are the viewport width
8034 + // and height. By default the scrollbars themselves are excluded from this rectangle, but an optional boolean argument allows them to be
8035 + // included.
8036 + IntRect visibleContentRect(bool includeScrollbars = false) const;
8037 + int visibleWidth() const { return visibleContentRect().width(); }
8038 + int visibleHeight() const { return visibleContentRect().height(); }
8040 + // Methods for getting/setting the size webkit should use to layout the contents. By default this is the same as the visible
8041 + // content size. Explicitly setting a layout size value will cause webkit to layout the contents using this size instead.
8042 + int layoutWidth() const;
8043 + int layoutHeight() const;
8044 + IntSize fixedLayoutSize() const;
8045 + void setFixedLayoutSize(const IntSize&);
8046 + bool useFixedLayout() const;
8047 + void setUseFixedLayout(bool enable);
8049 + // Methods for getting/setting the size of the document contained inside the ScrollView (as an IntSize or as individual width and height
8050 + // values).
8051 + IntSize contentsSize() const; // Always at least as big as the visibleWidth()/visibleHeight().
8052 + int contentsWidth() const { return contentsSize().width(); }
8053 + int contentsHeight() const { return contentsSize().height(); }
8054 + virtual void setContentsSize(const IntSize&);
8056 + // Methods for querying the current scrolled position (both as a point, a size, or as individual X and Y values).
8057 + IntPoint scrollPosition() const { return visibleContentRect().location(); }
8058 + IntSize scrollOffset() const { return visibleContentRect().location() - IntPoint(); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes.
8059 + IntPoint maximumScrollPosition() const; // The maximum position we can be scrolled to.
8060 + int scrollX() const { return scrollPosition().x(); }
8061 + int scrollY() const { return scrollPosition().y(); }
8063 + // Methods for scrolling the view. setScrollPosition is the only method that really scrolls the view. The other two methods are helper functions
8064 + // that ultimately end up calling setScrollPosition.
8065 + void setScrollPosition(const IntPoint&);
8066 + void scrollBy(const IntSize& s) { return setScrollPosition(scrollPosition() + s); }
8067 + void scrollRectIntoViewRecursively(const IntRect&);
8069 + // This method scrolls by lines, pages or pixels.
8070 + bool scroll(ScrollDirection, ScrollGranularity);
8072 + // Scroll the actual contents of the view (either blitting or invalidating as needed).
8073 + void scrollContents(const IntSize& scrollDelta);
8075 + // This gives us a means of blocking painting on our scrollbars until the first layout has occurred.
8076 + void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = false);
8077 + bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; }
8079 + // Event coordinates are assumed to be in the coordinate space of a window that contains
8080 + // the entire widget hierarchy. It is up to the platform to decide what the precise definition
8081 + // of containing window is. (For example on Mac it is the containing NSWindow.)
8082 + IntPoint windowToContents(const IntPoint&) const;
8083 + IntPoint contentsToWindow(const IntPoint&) const;
8084 + IntRect windowToContents(const IntRect&) const;
8085 + IntRect contentsToWindow(const IntRect&) const;
8087 + // Methods for converting to and from screen coordinates.
8088 + IntRect contentsToScreen(const IntRect&) const;
8089 + IntPoint screenToContents(const IntPoint&) const;
8091 + // The purpose of this method is to answer whether or not the scroll view is currently visible. Animations and painting updates can be suspended if
8092 + // we know that we are either not in a window right now or if that window is not visible.
8093 + bool isOffscreen() const;
8095 + // These methods are used to enable scrollbars to avoid window resizer controls that overlap the scroll view. This happens on Mac
8096 + // for example.
8097 + virtual IntRect windowResizerRect() const { return IntRect(); }
8098 + bool containsScrollbarsAvoidingResizer() const;
8099 + void adjustScrollbarsAvoidingResizerCount(int overlapDelta);
8100 + virtual void setParent(ScrollView*); // Overridden to update the overlapping scrollbar count.
8102 + // Called when our frame rect changes (or the rect/scroll position of an ancestor changes).
8103 + virtual void frameRectsChanged();
8105 + // Widget override to update our scrollbars and notify our contents of the resize.
8106 + virtual void setFrameRect(const IntRect&);
8108 + // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32).
8109 + Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint);
8111 + // This method exists for scrollviews that need to handle wheel events manually.
8112 + // On Mac the underlying NSScrollView just does the scrolling, but on other platforms
8113 + // (like Windows), we need this method in order to do the scroll ourselves.
8114 + void wheelEvent(PlatformWheelEvent&);
8116 + IntPoint convertChildToSelf(const Widget* child, const IntPoint& point) const
8118 + IntPoint newPoint = point;
8119 + if (!isScrollViewScrollbar(child))
8120 + newPoint = point - scrollOffset();
8121 + newPoint.move(child->x(), child->y());
8122 + return newPoint;
8125 + IntPoint convertSelfToChild(const Widget* child, const IntPoint& point) const
8127 + IntPoint newPoint = point;
8128 + if (!isScrollViewScrollbar(child))
8129 + newPoint = point + scrollOffset();
8130 + newPoint.move(-child->x(), -child->y());
8131 + return newPoint;
8134 + // Widget override. Handles painting of the contents of the view as well as the scrollbars.
8135 + virtual void paint(GraphicsContext*, const IntRect&);
8137 + // Widget overrides to ensure that our children's visibility status is kept up to date when we get shown and hidden.
8138 + virtual void show();
8139 + virtual void hide();
8140 + virtual void setParentVisible(bool);
8142 + // Pan scrolling.
8143 + static const int noPanScrollRadius = 15;
8144 + void addPanScrollIcon(const IntPoint&);
8145 + void removePanScrollIcon();
8147 + virtual bool isPointInScrollbarCorner(const IntPoint&);
8148 + virtual bool scrollbarCornerPresent() const;
8150 + virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
8151 + virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const;
8152 + virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, const IntPoint&) const;
8153 + virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const;
8155 +protected:
8156 + ScrollView();
8158 + virtual void repaintContentRectangle(const IntRect&, bool now = false);
8159 + virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
8161 + virtual void contentsResized() = 0;
8162 + virtual void visibleContentsResized() = 0;
8164 + // These methods are used to create/destroy scrollbars.
8165 + void setHasHorizontalScrollbar(bool);
8166 + void setHasVerticalScrollbar(bool);
8168 + IntRect scrollCornerRect() const;
8169 + virtual void updateScrollCorner();
8170 + virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect);
8172 +private:
8173 + RefPtr<Scrollbar> m_horizontalScrollbar;
8174 + RefPtr<Scrollbar> m_verticalScrollbar;
8175 + ScrollbarMode m_horizontalScrollbarMode;
8176 + ScrollbarMode m_verticalScrollbarMode;
8177 + bool m_prohibitsScrolling;
8179 + HashSet<RefPtr<Widget> > m_children;
8181 + // This bool is unused on Mac OS because we directly ask the platform widget
8182 + // whether it is safe to blit on scroll.
8183 + bool m_canBlitOnScroll;
8184 + IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared.
8185 + IntSize m_fixedLayoutSize;
8186 + IntSize m_contentsSize;
8188 + int m_scrollbarsAvoidingResizer;
8189 + bool m_scrollbarsSuppressed;
8191 + bool m_inUpdateScrollbars;
8192 + unsigned m_updateScrollbarsPass;
8194 + IntPoint m_panScrollIconPoint;
8195 + bool m_drawPanScrollIcon;
8196 + bool m_useFixedLayout;
8198 + void init();
8199 + void destroy();
8201 + // Called to update the scrollbars to accurately reflect the state of the view.
8202 + void updateScrollbars(const IntSize& desiredOffset);
8204 + void platformInit();
8205 + void platformDestroy();
8206 + void platformAddChild(Widget*);
8207 + void platformRemoveChild(Widget*);
8208 + void platformSetScrollbarModes();
8209 + void platformScrollbarModes(ScrollbarMode& horizontal, ScrollbarMode& vertical) const;
8210 + void platformSetCanBlitOnScroll(bool);
8211 + bool platformCanBlitOnScroll() const;
8212 + IntRect platformVisibleContentRect(bool includeScrollbars) const;
8213 + IntSize platformContentsSize() const;
8214 + void platformSetContentsSize();
8215 + IntRect platformContentsToScreen(const IntRect&) const;
8216 + IntPoint platformScreenToContents(const IntPoint&) const;
8217 + void platformSetScrollPosition(const IntPoint&);
8218 + bool platformScroll(ScrollDirection, ScrollGranularity);
8219 + void platformSetScrollbarsSuppressed(bool repaintOnUnsuppress);
8220 + void platformRepaintContentRectangle(const IntRect&, bool now);
8221 + bool platformIsOffscreen() const;
8222 + bool platformHandleHorizontalAdjustment(const IntSize&);
8223 + bool platformHandleVerticalAdjustment(const IntSize&);
8224 + bool platformHasHorizontalAdjustment() const;
8225 + bool platformHasVerticalAdjustment() const;
8226 + bool rootPreventsBlitting() const { return false; }
8228 +public:
8229 + void setBalAdjustments(BalAdjustment* hadj, BalAdjustment* vadj);
8230 + BalAdjustment* m_horizontalAdjustment;
8231 + BalAdjustment* m_verticalAdjustment;
8232 + void setScrollOffset(const IntSize& offset) { m_scrollOffset = offset; }
8234 +}; // class ScrollView
8236 +} // namespace WebCore
8238 +#endif // ScrollView_h
8239 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.cpp
8240 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.cpp 1970-01-01 01:00:00.000000000 +0100
8241 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.cpp 2018-06-13 07:27:37.570979727 +0100
8242 @@ -0,0 +1,60 @@
8244 + * Copyright (C) 2008 Pleyo. All rights reserved.
8246 + * Redistribution and use in source and binary forms, with or without
8247 + * modification, are permitted provided that the following conditions
8248 + * are met:
8250 + * 1. Redistributions of source code must retain the above copyright
8251 + * notice, this list of conditions and the following disclaimer.
8252 + * 2. Redistributions in binary form must reproduce the above copyright
8253 + * notice, this list of conditions and the following disclaimer in the
8254 + * documentation and/or other materials provided with the distribution.
8255 + * 3. Neither the name of Pleyo nor the names of
8256 + * its contributors may be used to endorse or promote products derived
8257 + * from this software without specific prior written permission.
8259 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8260 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8261 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8262 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8263 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8264 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8265 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8266 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8267 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8268 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8269 + */
8272 +#include "config.h"
8273 +#include "Logging.h"
8274 +#include "SearchPopupMenu.h"
8276 +#include <cstdio>
8278 +namespace WebCore {
8280 +SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client)
8281 + : PopupMenu(client)
8283 + NotImplemented();
8286 +void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&)
8288 + NotImplemented();
8291 +void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&)
8293 + NotImplemented();
8296 +bool SearchPopupMenu::enabled()
8298 + NotImplemented();
8299 + return true;
8303 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.h
8304 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.h 1970-01-01 01:00:00.000000000 +0100
8305 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCSearchPopupMenuAROS.h 2018-06-13 07:27:37.570979727 +0100
8306 @@ -0,0 +1,58 @@
8308 + * Copyright (C) 2008 Pleyo. All rights reserved.
8310 + * Redistribution and use in source and binary forms, with or without
8311 + * modification, are permitted provided that the following conditions
8312 + * are met:
8314 + * 1. Redistributions of source code must retain the above copyright
8315 + * notice, this list of conditions and the following disclaimer.
8316 + * 2. Redistributions in binary form must reproduce the above copyright
8317 + * notice, this list of conditions and the following disclaimer in the
8318 + * documentation and/or other materials provided with the distribution.
8319 + * 3. Neither the name of Pleyo nor the names of
8320 + * its contributors may be used to endorse or promote products derived
8321 + * from this software without specific prior written permission.
8323 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8324 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8325 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8326 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8327 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8328 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8329 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8330 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8331 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8332 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8333 + */
8336 +#ifndef SearchPopupMenu_h
8337 +#define SearchPopupMenu_h
8339 +#include "PopupMenu.h"
8340 +#include <wtf/Forward.h>
8341 +#include <wtf/Vector.h>
8342 +#include "BALBase.h"
8344 +namespace WebCore {
8346 +class AtomicString;
8348 +class SearchPopupMenu : public PopupMenu {
8349 +public:
8350 + static PassRefPtr<SearchPopupMenu> create(PopupMenuClient* client) { return new SearchPopupMenu(client); }
8352 + void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems);
8353 + void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems);
8355 + bool enabled();
8357 +protected:
8358 + SearchPopupMenu(PopupMenuClient* client);
8364 +#endif
8365 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/BCWidgetAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCWidgetAROS.cpp
8366 --- OWB-r1097/BAL/Widgets/WebCore/AROS/BCWidgetAROS.cpp 1970-01-01 01:00:00.000000000 +0100
8367 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/BCWidgetAROS.cpp 2018-06-13 07:27:37.570979727 +0100
8368 @@ -0,0 +1,129 @@
8370 + * Copyright (C) 2008 Pleyo. All rights reserved.
8372 + * Redistribution and use in source and binary forms, with or without
8373 + * modification, are permitted provided that the following conditions
8374 + * are met:
8376 + * 1. Redistributions of source code must retain the above copyright
8377 + * notice, this list of conditions and the following disclaimer.
8378 + * 2. Redistributions in binary form must reproduce the above copyright
8379 + * notice, this list of conditions and the following disclaimer in the
8380 + * documentation and/or other materials provided with the distribution.
8381 + * 3. Neither the name of Pleyo nor the names of
8382 + * its contributors may be used to endorse or promote products derived
8383 + * from this software without specific prior written permission.
8385 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8386 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8387 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8388 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8389 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8390 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8391 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8392 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8393 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8394 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8395 + */
8398 +#include "config.h"
8399 +#include "Widget.h"
8401 +#include "Cursor.h"
8402 +#include "FrameView.h"
8403 +#include "GraphicsContext.h"
8404 +#include "IntRect.h"
8405 +#include "Logging.h"
8406 +#include "RenderObject.h"
8409 +namespace WebCore {
8411 +typedef void BalCursor;
8413 +//TODO : redo the WidgetPrivate on AROS
8414 +class WidgetPrivate {
8415 +public:
8416 + BalCursor* cursor;
8419 +Widget::Widget(PlatformWidget widget)
8421 + init(widget);
8424 +Widget::~Widget()
8426 + ASSERT(!parent());
8429 +void Widget::setFocus()
8431 + NotImplemented();
8434 +void Widget::setCursor(const Cursor& cursor)
8436 + NotImplemented();
8439 +void Widget::show()
8441 + NotImplemented();
8444 +void Widget::hide()
8446 + NotImplemented();
8449 +void Widget::paint(GraphicsContext* context, const IntRect &r)
8451 + if (!platformWidget())
8452 + return;
8454 + if (!context->balExposeEvent())
8455 + return;
8457 +/* printf("Widget::paint(\n");
8458 + BalWidget* widget = platformWidget();
8459 + if(widget)
8460 + DoMethod(widget, MUIM_WebView_Expose); */
8463 +void Widget::setIsSelected(bool)
8465 + NotImplemented();
8468 +void Widget::invalidateRect(const IntRect& rect)
8470 +/* if (!parent()) {
8471 + if (isFrameView())
8472 + static_cast<FrameView*>(this)->addToDirtyRegion(rect);
8473 + return;
8476 + // Get the root widget.
8477 + ScrollView* outermostView = parent();
8478 + while (outermostView && outermostView->parent())
8479 + outermostView = outermostView->parent();
8480 + if (!outermostView)
8481 + return;
8483 + IntRect windowRect = convertToContainingWindow(rect);
8484 + outermostView->addToDirtyRegion(windowRect);*/
8487 +IntRect Widget::frameRect() const
8489 + return m_frame;
8492 +void Widget::setFrameRect(const IntRect& rect)
8494 + m_frame = rect;
8498 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/exceptions.txt OWB-r1097.aros/BAL/Widgets/WebCore/AROS/exceptions.txt
8499 --- OWB-r1097/BAL/Widgets/WebCore/AROS/exceptions.txt 1970-01-01 01:00:00.000000000 +0100
8500 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/exceptions.txt 2018-06-13 07:27:37.570979727 +0100
8501 @@ -0,0 +1,4 @@
8502 +BCClipboardAROS.h ClipboardAROS.h
8503 +BCRenderThemeAROS.h RenderThemeAROS.h
8504 +BCScrollbarThemeAROS.h ScrollbarThemeAROS.h
8505 +PasteboardHelperAROS.h PasteboardHelperAROS.h
8506 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.cpp OWB-r1097.aros/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.cpp
8507 --- OWB-r1097/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.cpp 1970-01-01 01:00:00.000000000 +0100
8508 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.cpp 2018-06-13 07:27:37.570979727 +0100
8509 @@ -0,0 +1,54 @@
8511 + * Copyright (C) 2008 Pleyo. All rights reserved.
8513 + * Redistribution and use in source and binary forms, with or without
8514 + * modification, are permitted provided that the following conditions
8515 + * are met:
8517 + * 1. Redistributions of source code must retain the above copyright
8518 + * notice, this list of conditions and the following disclaimer.
8519 + * 2. Redistributions in binary form must reproduce the above copyright
8520 + * notice, this list of conditions and the following disclaimer in the
8521 + * documentation and/or other materials provided with the distribution.
8522 + * 3. Neither the name of Pleyo nor the names of
8523 + * its contributors may be used to endorse or promote products derived
8524 + * from this software without specific prior written permission.
8526 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8527 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8528 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8529 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8530 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8531 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8532 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8533 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8534 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8535 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8536 + */
8538 +#include "config.h"
8539 +#include "Frame.h"
8540 +#include "PasteboardHelperAROS.h"
8542 +#include <cstdio>
8544 +using namespace WebCore;
8546 +namespace WebKit{
8548 +BalClipboard* PasteboardHelperBal::getClipboard(Frame* frame) const
8550 + return 0;
8553 +BalTargetList* PasteboardHelperBal::getCopyTargetList(Frame* frame) const
8555 + return 0;
8558 +BalTargetList* PasteboardHelperBal::getPasteTargetList(Frame* frame) const
8560 + return 0;
8564 diff -ruN OWB-r1097/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.h OWB-r1097.aros/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.h
8565 --- OWB-r1097/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.h 1970-01-01 01:00:00.000000000 +0100
8566 +++ OWB-r1097.aros/BAL/Widgets/WebCore/AROS/PasteboardHelperAROS.h 2018-06-13 07:27:37.570979727 +0100
8567 @@ -0,0 +1,57 @@
8569 + * Copyright (C) 2008 Pleyo. All rights reserved.
8571 + * Redistribution and use in source and binary forms, with or without
8572 + * modification, are permitted provided that the following conditions
8573 + * are met:
8575 + * 1. Redistributions of source code must retain the above copyright
8576 + * notice, this list of conditions and the following disclaimer.
8577 + * 2. Redistributions in binary form must reproduce the above copyright
8578 + * notice, this list of conditions and the following disclaimer in the
8579 + * documentation and/or other materials provided with the distribution.
8580 + * 3. Neither the name of Pleyo nor the names of
8581 + * its contributors may be used to endorse or promote products derived
8582 + * from this software without specific prior written permission.
8584 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8585 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8586 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8587 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8588 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8589 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8590 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8591 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8592 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8593 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8594 + */
8597 +#ifndef PasteboardHelperAROS_h
8598 +#define PasteboardHelperAROS_h
8601 + * FIXME: this is for WebCore support and must be removed once
8602 + * a better solution is found
8603 + */
8605 +#include "Frame.h"
8606 +#include "PasteboardHelper.h"
8608 +#include "BALBase.h"
8610 +using namespace WebCore;
8612 +namespace WebKit {
8614 +class PasteboardHelperBal : public PasteboardHelper {
8615 +public:
8616 + PasteboardHelperBal() { }
8617 + virtual BalClipboard* getClipboard(Frame*) const;
8618 + virtual BalTargetList* getCopyTargetList(Frame*) const;
8619 + virtual BalTargetList* getPasteTargetList(Frame*) const;
8624 +#endif // PasteboardHelperAROS_h
8625 diff -ruN OWB-r1097/BAL/Widgets/WebCore/CMakeLists.txt OWB-r1097.aros/BAL/Widgets/WebCore/CMakeLists.txt
8626 --- OWB-r1097/BAL/Widgets/WebCore/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
8627 +++ OWB-r1097.aros/BAL/Widgets/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
8628 @@ -31,4 +31,10 @@
8629 aux_source_directory(${WIDGETS_DIR}/SDL WEBCORE_SRC)
8630 endif(USE_GRAPHICS_SDL)
8632 +if(USE_GRAPHICS_AROS)
8633 + create_include_link(${WIDGETS_DIR}/AROS BAL)
8635 + aux_source_directory(${WIDGETS_DIR}/AROS WEBCORE_SRC)
8636 +endif(USE_GRAPHICS_AROS)
8638 aux_source_directory(${WIDGETS_DIR}/WK WEBCORE_SRC)
8639 diff -ruN OWB-r1097/BAL/Widgets/WebCore/WK/BCContextMenuItemWK.h OWB-r1097.aros/BAL/Widgets/WebCore/WK/BCContextMenuItemWK.h
8640 --- OWB-r1097/BAL/Widgets/WebCore/WK/BCContextMenuItemWK.h 2009-09-18 16:34:57.000000000 +0100
8641 +++ OWB-r1097.aros/BAL/Widgets/WebCore/WK/BCContextMenuItemWK.h 2018-06-13 07:27:37.570979727 +0100
8642 @@ -59,12 +59,21 @@
8643 enum ContextMenuAction {
8644 ContextMenuItemTagNoAction=0, // This item is not actually in WebUIDelegate.h
8645 ContextMenuItemTagOpenLinkInNewWindow=1,
8646 +#if PLATFORM(AROS)
8647 + ContextMenuItemTagOpenLinkInNewTab,
8648 +#endif
8649 ContextMenuItemTagDownloadLinkToDisk,
8650 ContextMenuItemTagCopyLinkToClipboard,
8651 ContextMenuItemTagOpenImageInNewWindow,
8652 +#if PLATFORM(AROS)
8653 + ContextMenuItemTagOpenImageInNewTab,
8654 +#endif
8655 ContextMenuItemTagDownloadImageToDisk,
8656 ContextMenuItemTagCopyImageToClipboard,
8657 ContextMenuItemTagOpenFrameInNewWindow,
8658 +#if PLATFORM(AROS)
8659 + ContextMenuItemTagOpenFrameInNewTab,
8660 +#endif
8661 ContextMenuItemTagCopy,
8662 ContextMenuItemTagGoBack,
8663 ContextMenuItemTagGoForward,
8664 @@ -208,6 +217,23 @@
8666 #elif PLATFORM(HAIKU)
8667 typedef BMenuItem* PlatformMenuItemDescription;
8668 +#elif PLATFORM(AROS)
8669 + struct PlatformMenuItemDescription {
8670 + PlatformMenuItemDescription()
8671 + : type(ActionType)
8672 + , action(ContextMenuItemTagNoAction)
8673 + , subMenu(0)
8674 + , checked(false)
8675 + , enabled(true)
8676 + {}
8678 + ContextMenuItemType type;
8679 + ContextMenuAction action;
8680 + String title;
8681 + Object* subMenu;
8682 + bool checked;
8683 + bool enabled;
8684 + };
8685 #else
8686 typedef void* PlatformMenuItemDescription;
8687 #endif
8688 @@ -219,6 +245,8 @@
8689 ContextMenuItem(ContextMenuItemType type, ContextMenuAction action, const String& title, ContextMenu* subMenu = 0);
8690 #if PLATFORM(GTK)
8691 ContextMenuItem(GtkMenuItem*);
8692 +#elif PLATFORM(AROS)
8693 + ContextMenuItem(Object*);
8694 #endif
8695 ~ContextMenuItem();
8697 @@ -244,6 +272,8 @@
8698 // FIXME: Do we need a keyboard accelerator here?
8699 #if PLATFORM(GTK)
8700 static GtkMenuItem* createNativeMenuItem(const PlatformMenuItemDescription&);
8701 +#elif PLATFORM(AROS)
8702 + static Object* createNativeMenuItem(const PlatformMenuItemDescription&);
8703 #endif
8705 private:
8706 diff -ruN OWB-r1097/BAL/Widgets/WebCore/WK/BCContextMenuWK.cpp OWB-r1097.aros/BAL/Widgets/WebCore/WK/BCContextMenuWK.cpp
8707 --- OWB-r1097/BAL/Widgets/WebCore/WK/BCContextMenuWK.cpp 2009-10-05 11:36:03.000000000 +0100
8708 +++ OWB-r1097.aros/BAL/Widgets/WebCore/WK/BCContextMenuWK.cpp 2018-06-13 07:27:37.570979727 +0100
8709 @@ -259,12 +259,20 @@
8710 ContextMenuItem OpenLinkItem(ActionType, ContextMenuItemTagOpenLink, contextMenuItemTagOpenLink());
8711 ContextMenuItem OpenLinkInNewWindowItem(ActionType, ContextMenuItemTagOpenLinkInNewWindow,
8712 contextMenuItemTagOpenLinkInNewWindow());
8713 +#if PLATFORM(AROS)
8714 + ContextMenuItem OpenLinkInNewTabItem(ActionType, ContextMenuItemTagOpenLinkInNewTab,
8715 + contextMenuItemTagOpenLinkInNewTab());
8716 +#endif
8717 ContextMenuItem DownloadFileItem(ActionType, ContextMenuItemTagDownloadLinkToDisk,
8718 contextMenuItemTagDownloadLinkToDisk());
8719 ContextMenuItem CopyLinkItem(ActionType, ContextMenuItemTagCopyLinkToClipboard,
8720 contextMenuItemTagCopyLinkToClipboard());
8721 ContextMenuItem OpenImageInNewWindowItem(ActionType, ContextMenuItemTagOpenImageInNewWindow,
8722 contextMenuItemTagOpenImageInNewWindow());
8723 +#if PLATFORM(AROS)
8724 + ContextMenuItem OpenImageInNewTabItem(ActionType, ContextMenuItemTagOpenImageInNewTab,
8725 + contextMenuItemTagOpenImageInNewTab());
8726 +#endif
8727 ContextMenuItem DownloadImageItem(ActionType, ContextMenuItemTagDownloadImageToDisk,
8728 contextMenuItemTagDownloadImageToDisk());
8729 ContextMenuItem CopyImageItem(ActionType, ContextMenuItemTagCopyImageToClipboard,
8730 @@ -281,8 +289,12 @@
8731 ContextMenuItem ForwardItem(ActionType, ContextMenuItemTagGoForward, contextMenuItemTagGoForward());
8732 ContextMenuItem StopItem(ActionType, ContextMenuItemTagStop, contextMenuItemTagStop());
8733 ContextMenuItem ReloadItem(ActionType, ContextMenuItemTagReload, contextMenuItemTagReload());
8734 - ContextMenuItem OpenFrameItem(ActionType, ContextMenuItemTagOpenFrameInNewWindow,
8735 + ContextMenuItem OpenFrameInNewWindowItem(ActionType, ContextMenuItemTagOpenFrameInNewWindow,
8736 contextMenuItemTagOpenFrameInNewWindow());
8737 +#if PLATFORM(AROS)
8738 + ContextMenuItem OpenFrameInNewTabItem(ActionType, ContextMenuItemTagOpenFrameInNewTab,
8739 + contextMenuItemTagOpenFrameInNewTab());
8740 +#endif
8741 ContextMenuItem NoGuessesItem(ActionType, ContextMenuItemTagNoGuessesFound,
8742 contextMenuItemTagNoGuessesFound());
8743 ContextMenuItem IgnoreSpellingItem(ActionType, ContextMenuItemTagIgnoreSpelling,
8744 @@ -318,6 +330,9 @@
8745 if (loader->canHandleRequest(ResourceRequest(linkURL))) {
8746 appendItem(OpenLinkItem);
8747 appendItem(OpenLinkInNewWindowItem);
8748 +#if PLATFORM(AROS)
8749 + appendItem(OpenLinkInNewTabItem);
8750 +#endif
8751 appendItem(DownloadFileItem);
8753 appendItem(CopyLinkItem);
8754 @@ -329,6 +344,9 @@
8755 appendItem(*separatorItem());
8757 appendItem(OpenImageInNewWindowItem);
8758 +#if PLATFORM(AROS)
8759 + appendItem(OpenImageInNewTabItem);
8760 +#endif
8761 appendItem(DownloadImageItem);
8762 if (imageURL.isLocalFile() || m_hitTestResult.image())
8763 appendItem(CopyImageItem);
8764 @@ -376,7 +394,12 @@
8765 #endif
8767 if (frame->page() && frame != frame->page()->mainFrame())
8768 - appendItem(OpenFrameItem);
8770 + appendItem(OpenFrameInNewWindowItem);
8771 +#if PLATFORM(AROS)
8772 + appendItem(OpenFrameInNewTabItem);
8773 +#endif
8777 } else { // Make an editing context menu
8778 @@ -434,6 +457,9 @@
8779 if (loader->canHandleRequest(ResourceRequest(linkURL))) {
8780 appendItem(OpenLinkItem);
8781 appendItem(OpenLinkInNewWindowItem);
8782 +#if PLATFORM(AROS)
8783 + appendItem(OpenLinkInNewTabItem);
8784 +#endif
8785 appendItem(DownloadFileItem);
8787 appendItem(CopyLinkItem);
8788 @@ -746,12 +772,21 @@
8789 #endif
8790 case ContextMenuItemTagNoAction:
8791 case ContextMenuItemTagOpenLinkInNewWindow:
8792 +#if PLATFORM(AROS)
8793 + case ContextMenuItemTagOpenLinkInNewTab:
8794 +#endif
8795 case ContextMenuItemTagDownloadLinkToDisk:
8796 case ContextMenuItemTagCopyLinkToClipboard:
8797 case ContextMenuItemTagOpenImageInNewWindow:
8798 +#if PLATFORM(AROS)
8799 + case ContextMenuItemTagOpenImageInNewTab:
8800 +#endif
8801 case ContextMenuItemTagDownloadImageToDisk:
8802 case ContextMenuItemTagCopyImageToClipboard:
8803 case ContextMenuItemTagOpenFrameInNewWindow:
8804 +#if PLATFORM(AROS)
8805 + case ContextMenuItemTagOpenFrameInNewTab:
8806 +#endif
8807 case ContextMenuItemTagSpellingGuess:
8808 case ContextMenuItemTagOther:
8809 case ContextMenuItemTagSearchInSpotlight:
8810 diff -ruN OWB-r1097/BAL/Widgets/WebCore/WK/BCContextMenuWK.h OWB-r1097.aros/BAL/Widgets/WebCore/WK/BCContextMenuWK.h
8811 --- OWB-r1097/BAL/Widgets/WebCore/WK/BCContextMenuWK.h 2009-07-15 19:00:34.000000000 +0100
8812 +++ OWB-r1097.aros/BAL/Widgets/WebCore/WK/BCContextMenuWK.h 2018-06-13 07:27:37.570979727 +0100
8813 @@ -36,6 +36,10 @@
8814 #include <wtf/RetainPtr.h>
8815 #elif PLATFORM(QT)
8816 #include <QMenu>
8817 +#elif PLATFORM(AROS)
8818 +extern "C" {
8819 +#include <utility/hooks.h>
8821 #endif
8823 namespace WebCore {
8824 @@ -81,6 +85,9 @@
8825 #else
8826 PlatformMenuDescription m_platformDescription;
8827 #endif
8828 +#if PLATFORM(AROS)
8829 + struct Hook menuItemActivatedHook;
8830 +#endif
8834 diff -ruN OWB-r1097/Base/AROS/BALTypeAROS.h OWB-r1097.aros/Base/AROS/BALTypeAROS.h
8835 --- OWB-r1097/Base/AROS/BALTypeAROS.h 1970-01-01 01:00:00.000000000 +0100
8836 +++ OWB-r1097.aros/Base/AROS/BALTypeAROS.h 2018-06-13 07:27:37.570979727 +0100
8837 @@ -0,0 +1,82 @@
8839 + * Copyright (C) 2008 Pleyo. All rights reserved.
8841 + * Redistribution and use in source and binary forms, with or without
8842 + * modification, are permitted provided that the following conditions
8843 + * are met:
8845 + * 1. Redistributions of source code must retain the above copyright
8846 + * notice, this list of conditions and the following disclaimer.
8847 + * 2. Redistributions in binary form must reproduce the above copyright
8848 + * notice, this list of conditions and the following disclaimer in the
8849 + * documentation and/or other materials provided with the distribution.
8850 + * 3. Neither the name of Pleyo nor the names of
8851 + * its contributors may be used to endorse or promote products derived
8852 + * from this software without specific prior written permission.
8854 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8855 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8856 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8857 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8858 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8859 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8860 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8861 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8862 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8863 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8864 + */
8866 +#ifndef BALType_h
8867 +#define BALType_h
8869 +struct SDL_Surface;
8870 +struct SDL_Color;
8871 +struct FT_FaceRec_;
8872 +struct _FcPattern;
8874 +namespace WebCore {
8875 + class FloatSize;
8878 +#include <exec/types.h>
8879 +#ifndef __typedef_Object
8880 +# define __typedef_Object
8881 + typedef ULONG Object;
8882 +#endif
8884 +typedef FT_FaceRec_ BalFontFace;
8885 +typedef void BalFont;
8886 +typedef struct _FcPattern BalPattern;
8887 +typedef void BalScaledFont;
8888 +typedef void BalDrawable;
8889 +typedef SDL_Surface BalSurface;
8890 +typedef Object BalMenuItem;
8891 +typedef Object BalMenu;
8892 +typedef void BalClipboard;
8893 +typedef void BalTargetList;
8894 +typedef void BalAdjustment;
8895 +typedef void BalContainer;
8896 +typedef void BalPixbuf;
8897 +typedef SDL_Color BalColor;
8898 +typedef struct _BalMatrix{double m11; double m12; double m13; double m14;
8899 + double m21; double m22; double m23; double m24;
8900 + double m31; double m32; double m33; double m34;
8901 + double m41; double m42; double m43; double m44;} BalMatrix;
8904 +typedef SDL_Surface PlatformGraphicsContext;
8905 +typedef BalWidget* PlatformWidget;
8906 +typedef void* PlatformPatternPtr;
8908 +namespace WebCore {
8909 + typedef void* PlatformGradient;
8910 + typedef void* PlatformPath;
8911 + typedef void* PlatformCursor;
8912 + typedef void* DragImageRef;
8913 + typedef void* DragDataRef;
8914 + typedef unsigned short GlyphBufferGlyph;
8915 + typedef WebCore::FloatSize GlyphBufferAdvance;
8916 + typedef void* PlatformCursorHandle;
8919 +#endif
8920 diff -ruN OWB-r1097/Base/BALBase.h OWB-r1097.aros/Base/BALBase.h
8921 --- OWB-r1097/Base/BALBase.h 1970-01-01 01:00:00.000000000 +0100
8922 +++ OWB-r1097.aros/Base/BALBase.h 2018-06-13 07:27:37.570979727 +0100
8923 @@ -0,0 +1,75 @@
8925 + * Copyright (C) 2008 Pleyo. All rights reserved.
8927 + * Redistribution and use in source and binary forms, with or without
8928 + * modification, are permitted provided that the following conditions
8929 + * are met:
8931 + * 1. Redistributions of source code must retain the above copyright
8932 + * notice, this list of conditions and the following disclaimer.
8933 + * 2. Redistributions in binary form must reproduce the above copyright
8934 + * notice, this list of conditions and the following disclaimer in the
8935 + * documentation and/or other materials provided with the distribution.
8936 + * 3. Neither the name of Pleyo nor the names of
8937 + * its contributors may be used to endorse or promote products derived
8938 + * from this software without specific prior written permission.
8940 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
8941 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8942 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8943 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
8944 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
8945 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
8946 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8947 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8948 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
8949 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8950 + */
8952 +#ifndef BALBase_h
8953 +#define BALBase_h
8955 +#include "owb-config.h"
8956 +#include "Platform.h"
8957 +#include "WebKitTypes.h"
8959 +#ifdef NDEBUG
8960 +#define supressNotImplementedWarning() true
8961 +#else
8962 +#define supressNotImplementedWarning() false
8963 +#endif
8964 +//#undef NotImplemented()
8965 +#define NotImplemented() do { \
8966 + static bool havePrinted = false; \
8967 + if (!havePrinted && !supressNotImplementedWarning()) { \
8968 + WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &LogNotYetImplemented, "UNIMPLEMENTED: "); \
8969 + havePrinted = true; \
8970 + } \
8971 + } while (0)
8973 +#define BalNotImplemented() NotImplemented();
8975 +#if PLATFORM(AMIGAOS4)
8976 +#include "AmigaOS4/BALTypeAmigaOS4.h"
8977 +#endif
8979 +#if PLATFORM(SDL)
8980 +#include "SDL/BALTypeSDL.h"
8981 +#endif
8983 +#if PLATFORM(AROS)
8984 +#include "AROS/BALTypeAROS.h"
8985 +#endif
8987 +#if PLATFORM(GTK)
8988 +#include "Gtk/BALTypeGtk.h"
8989 +#endif
8991 +#if PLATFORM()
8992 +#include ""
8993 +#endif
8995 +class BALBase {
8998 +#endif
8999 diff -ruN OWB-r1097/Base/BALBase.h.in OWB-r1097.aros/Base/BALBase.h.in
9000 --- OWB-r1097/Base/BALBase.h.in 2009-03-24 14:43:00.000000000 +0000
9001 +++ OWB-r1097.aros/Base/BALBase.h.in 2018-06-13 07:27:37.570979727 +0100
9002 @@ -57,6 +57,10 @@
9003 #include "SDL/BALTypeSDL.h"
9004 #endif
9006 +#if PLATFORM(AROS)
9007 +#include "AROS/BALTypeAROS.h"
9008 +#endif
9010 #if PLATFORM(GTK)
9011 #include "Gtk/BALTypeGtk.h"
9012 #endif
9013 diff -ruN OWB-r1097/Base/NotImplemented.h OWB-r1097.aros/Base/NotImplemented.h
9014 --- OWB-r1097/Base/NotImplemented.h 2009-01-16 14:33:31.000000000 +0000
9015 +++ OWB-r1097.aros/Base/NotImplemented.h 2018-06-13 07:27:37.570979727 +0100
9016 @@ -29,7 +29,8 @@
9017 #include "Logging.h"
9018 #include <Assertions.h>
9020 -#if PLATFORM(GTK)
9021 +#if !defined(supressNotImplementedWarning)
9022 +#if PLATFORM(GTK) || PLATFORM(AROS)
9023 #define supressNotImplementedWarning() getenv("DISABLE_NI_WARNING")
9024 #elif PLATFORM(QT)
9025 #include <QByteArray>
9026 @@ -37,6 +38,7 @@
9027 #else
9028 #define supressNotImplementedWarning() false
9029 #endif
9030 +#endif
9032 #if defined(NDEBUG)
9033 #define notImplemented() ((void)0)
9034 diff -ruN OWB-r1097/Base/owb-config.h OWB-r1097.aros/Base/owb-config.h
9035 --- OWB-r1097/Base/owb-config.h 1970-01-01 01:00:00.000000000 +0100
9036 +++ OWB-r1097.aros/Base/owb-config.h 2018-06-13 07:27:37.570979727 +0100
9037 @@ -0,0 +1,10 @@
9038 +#ifndef OWB_CONFIG_H
9039 +#define OWB_CONFIG_H
9041 +#define BOOKMARKLET_INSTALL_PATH "PROGDIR:bookmarklet/"
9042 +#define OWB_DATA "PROGDIR:config/"
9043 +#define INSTALL_PREFIX "PROGDIR:"
9044 +#define RESOURCE_PATH "PROGDIR:resources"
9046 +#endif //OWB_CONFIG_H
9048 diff -ruN OWB-r1097/Base/owb-config.h.in OWB-r1097.aros/Base/owb-config.h.in
9049 --- OWB-r1097/Base/owb-config.h.in 2008-12-08 20:05:27.000000000 +0000
9050 +++ OWB-r1097.aros/Base/owb-config.h.in 2018-06-13 07:27:37.570979727 +0100
9051 @@ -1,10 +1,10 @@
9052 #ifndef OWB_CONFIG_H
9053 #define OWB_CONFIG_H
9055 -#define BOOKMARKLET_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/share/owb/bookmarklet/"
9056 -#define OWB_DATA "${WITH_OWB_CONFIG_DIR}"
9057 -#define INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
9058 -#define RESOURCE_PATH "${CMAKE_INSTALL_PREFIX}/share/webkit-owb/resources/"
9059 +#define BOOKMARKLET_INSTALL_PATH "PROGDIR:bookmarklet/"
9060 +#define OWB_DATA "PROGDIR:config/"
9061 +#define INSTALL_PREFIX "PROGDIR:"
9062 +#define RESOURCE_PATH "PROGDIR:resources"
9064 #endif //OWB_CONFIG_H
9066 diff -ruN OWB-r1097/Base/WebKitTypes.h OWB-r1097.aros/Base/WebKitTypes.h
9067 --- OWB-r1097/Base/WebKitTypes.h 1970-01-01 01:00:00.000000000 +0100
9068 +++ OWB-r1097.aros/Base/WebKitTypes.h 2018-06-13 07:27:37.570979727 +0100
9069 @@ -0,0 +1,210 @@
9071 + * Copyright (C) 2008 Pleyo. All rights reserved.
9073 + * Redistribution and use in source and binary forms, with or without
9074 + * modification, are permitted provided that the following conditions
9075 + * are met:
9077 + * 1. Redistributions of source code must retain the above copyright
9078 + * notice, this list of conditions and the following disclaimer.
9079 + * 2. Redistributions in binary form must reproduce the above copyright
9080 + * notice, this list of conditions and the following disclaimer in the
9081 + * documentation and/or other materials provided with the distribution.
9082 + * 3. Neither the name of Pleyo nor the names of
9083 + * its contributors may be used to endorse or promote products derived
9084 + * from this software without specific prior written permission.
9086 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
9087 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9088 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
9089 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
9090 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
9091 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
9092 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
9093 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9094 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
9095 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9096 + */
9098 +#ifndef WebKitTypes_h
9099 +#define WebKitTypes_h
9101 +#include <WebKitDefines.h>
9103 +#if PLATFORM(GTK)
9105 +#include <gtk/gtk.h>
9107 +typedef GtkWidget BalWidget;
9108 +typedef struct _BalEventExpose{} BalEventExpose;
9109 +typedef struct _BalResizeEvent{} BalResizeEvent;
9110 +typedef struct _BalQuitEvent{} BalQuitEvent;
9111 +typedef struct _BalUserEvent{} BalUserEvent;
9112 +typedef struct _BalEventKey{} BalEventKey;
9113 +typedef struct _BalEventButton{} BalEventButton;
9114 +typedef struct _BalEventMotion{} BalEventMotion;
9115 +typedef struct _BalEventScroll{} BalEventScroll;
9117 +typedef GdkPoint BalPoint;
9118 +typedef GdkRectangle BalRectangle;
9120 +#elif PLATFORM(AMIGAOS4)
9122 +#include <cairo.h>
9124 +struct Window;
9125 +struct Gadget;
9126 +struct Hook;
9127 +struct AppIcon;
9128 +struct Node;
9129 +struct List;
9130 +class WebView;
9132 +struct AmigaOWBWindow
9134 + AmigaOWBWindow* next;
9135 + Window* window;
9136 + WebView* webView;
9137 + int offsetx, offsety;
9138 + int left, top, width, height;
9139 + int webViewWidth, webViewHeight;
9140 + _cairo* cr;
9141 + _cairo_surface* surface;
9142 + void *img_back, *img_forward, *img_stop,
9143 + *img_search, *img_home, *img_reload,
9144 + *img_iconify, *img_bookmark, *img_bookmarkadd;
9145 + Gadget *gad_toolbar, *gad_vbar, *gad_hbar,
9146 + *gad_url, *gad_fuelgauge, *gad_stop,
9147 + *gad_back, *gad_forward, *gad_iconify,
9148 + *gad_search, *gad_status, *gad_webview,
9149 + *gad_statuspage, *gad_hlayout, *gad_bookmark,
9150 + *gad_bookmarkadd, *gad_clicktab, *gad_vlayout;
9151 + Hook* backfill_hook;
9152 + char title[256];
9153 + char url[2000];
9154 + char search[500];
9155 + char statusBarText[256];
9156 + char toolTipText[256];
9157 + char statusToolTipText[512];
9158 + AppIcon* appicon;
9159 + void* curentCursor;
9160 + unsigned int fuelGaugeArgs[2];
9161 + const char* arexxPortName;
9162 + void* bookmark;
9163 + unsigned long* page;
9164 + List* clickTabList;
9165 + Node* clickTabNode;
9166 + bool expose;
9169 +typedef struct AmigaOWBWindow BalWidget;
9171 +struct AmigaOWBResizeEvent
9173 + int w, h;
9176 +typedef int BalEventExpose;
9177 +typedef struct AmigaOWBResizeEvent BalResizeEvent;
9178 +typedef int BalQuitEvent;
9179 +typedef int BalUserEvent;
9180 +typedef struct IntuiMessage BalEventKey;
9181 +typedef struct IntuiMessage BalEventButton;
9182 +typedef struct IntuiMessage BalEventMotion;
9183 +typedef struct IntuiMessage BalEventScroll;
9185 +typedef struct _BalPoint{
9186 + int x;
9187 + int y;
9188 +} BalPoint;
9189 +typedef struct _BalRectangle{
9190 + int x, y;
9191 + int w, h;
9192 +} BalRectangle;
9194 +#elif PLATFORM(QT)
9196 +#include <QWidget>
9197 +#include <QRect>
9198 +#include <QPoint>
9199 +#include <QMouseEvent>
9200 +#include <QWheelEvent>
9201 +#include <QKeyEvent>
9202 +#include <QFocusEvent>
9203 +#include <QEvent>
9205 +typedef QWidget BalWidget;
9206 +typedef QPaintEvent* BalEventExpose;
9207 +typedef QResizeEvent* BalResizeEvent;
9208 +typedef QEvent* BalQuitEvent;
9209 +typedef struct _BalUserEvent{} BalUserEvent;
9210 +typedef QKeyEvent* BalEventKey;
9211 +typedef QMouseEvent* BalEventButton;
9212 +typedef QMouseEvent* BalEventMotion;
9213 +typedef QWheelEvent* BalEventScroll;
9215 +typedef QPoint BalPoint;
9216 +typedef QRect BalRectangle;
9218 +#elif PLATFORM(SDL)
9220 +#include <SDL.h>
9222 +typedef SDL_Surface BalWidget;
9224 +typedef struct SDL_ExposeEvent BalEventExpose;
9225 +typedef struct SDL_ResizeEvent BalResizeEvent;
9226 +typedef struct SDL_QuitEvent BalQuitEvent;
9227 +typedef struct SDL_UserEvent BalUserEvent;
9228 +typedef struct SDL_KeyboardEvent BalEventKey;
9229 +typedef struct SDL_MouseButtonEvent BalEventButton;
9230 +typedef struct SDL_MouseMotionEvent BalEventMotion;
9231 +typedef struct SDL_MouseButtonEvent BalEventScroll;
9233 +typedef struct _BalPoint{
9234 + int x;
9235 + int y;
9236 +} BalPoint;
9237 +typedef SDL_Rect BalRectangle;
9239 +#elif PLATFORM(AROS)
9241 +#include <SDL.h>
9243 +#include <exec/types.h>
9244 +#ifndef __typedef_Object
9245 +# define __typedef_Object
9246 + typedef ULONG Object;
9247 +#endif
9249 +struct IntuiMessage;
9251 +typedef Object BalWidget;
9253 +typedef struct SDL_ExposeEvent BalEventExpose;
9254 +typedef struct SDL_ResizeEvent BalResizeEvent;
9255 +typedef struct SDL_QuitEvent BalQuitEvent;
9256 +typedef struct SDL_UserEvent BalUserEvent;
9257 +typedef struct IntuiMessage BalEventKey;
9258 +typedef struct IntuiMessage BalEventButton;
9259 +typedef struct IntuiMessage BalEventMotion;
9260 +typedef struct IntuiMessage BalEventScroll;
9262 +typedef struct _BalPoint{
9263 + int x;
9264 + int y;
9265 +} BalPoint;
9266 +typedef SDL_Rect BalRectangle;
9268 +#elif PLATFORM()
9269 +#include ""
9271 +#endif
9273 +typedef enum WebCacheModel {
9274 + WebCacheModelDocumentViewer = 0,
9275 + WebCacheModelDocumentBrowser = 1,
9276 + WebCacheModelPrimaryWebBrowser = 2
9277 +} WebCacheModel;
9279 +#endif
9280 diff -ruN OWB-r1097/Base/WebKitTypes.h.in OWB-r1097.aros/Base/WebKitTypes.h.in
9281 --- OWB-r1097/Base/WebKitTypes.h.in 2009-03-24 14:34:03.000000000 +0000
9282 +++ OWB-r1097.aros/Base/WebKitTypes.h.in 2018-06-13 07:27:37.570979727 +0100
9283 @@ -167,6 +167,35 @@
9284 } BalPoint;
9285 typedef SDL_Rect BalRectangle;
9287 +#elif PLATFORM(AROS)
9289 +#include <SDL.h>
9291 +#include <exec/types.h>
9292 +#ifndef __typedef_Object
9293 +# define __typedef_Object
9294 + typedef ULONG Object;
9295 +#endif
9297 +struct IntuiMessage;
9299 +typedef Object BalWidget;
9301 +typedef struct SDL_ExposeEvent BalEventExpose;
9302 +typedef struct SDL_ResizeEvent BalResizeEvent;
9303 +typedef struct SDL_QuitEvent BalQuitEvent;
9304 +typedef struct SDL_UserEvent BalUserEvent;
9305 +typedef struct IntuiMessage BalEventKey;
9306 +typedef struct IntuiMessage BalEventButton;
9307 +typedef struct IntuiMessage BalEventMotion;
9308 +typedef struct IntuiMessage BalEventScroll;
9310 +typedef struct _BalPoint{
9311 + int x;
9312 + int y;
9313 +} BalPoint;
9314 +typedef SDL_Rect BalRectangle;
9316 #elif PLATFORM(@CUSTOMER@)
9317 #include "@WEBKIT_TYPES_CUSTOMER_INCLUDE@"
9319 diff -ruN OWB-r1097/Base/wtf/Platform.h OWB-r1097.aros/Base/wtf/Platform.h
9320 --- OWB-r1097/Base/wtf/Platform.h 2009-10-16 19:40:05.000000000 +0100
9321 +++ OWB-r1097.aros/Base/wtf/Platform.h 2018-06-13 07:27:37.570979727 +0100
9322 @@ -47,6 +47,15 @@
9323 #undef WTF_PLATFORM_MACPORT
9324 #endif
9326 +/* PLATFORM(AROS) */
9327 +/* Operating system level dependencies for AROS that should */
9328 +/* be used regardless of operating environment */
9329 +#if defined(__AROS__)
9330 +#define WTF_PLATFORM_AROS 1
9331 +#define WTF_USE_CURL 1
9332 +#define USE_SYSTEM_MALLOC 1
9333 +#endif
9335 /* PLATFORM(DARWIN) */
9336 /* Operating system level dependencies for Mac OS X / Darwin that should */
9337 /* be used regardless of operating environment */
9338 @@ -554,7 +563,7 @@
9339 #endif
9341 #if !PLATFORM(WIN_OS) && !PLATFORM(SOLARIS) && !PLATFORM(QNX) \
9342 - && !PLATFORM(SYMBIAN) && !PLATFORM(HAIKU) && !COMPILER(RVCT) && !PLATFORM(AMIGAOS4)
9343 + && !PLATFORM(SYMBIAN) && !PLATFORM(HAIKU) && !COMPILER(RVCT) && !PLATFORM(AMIGAOS4) && !PLATFORM(AROS)
9344 #define HAVE_TM_GMTOFF 1
9345 #define HAVE_TM_ZONE 1
9346 #define HAVE_TIMEGM 1
9347 @@ -621,6 +630,14 @@
9348 #define HAVE_SYS_PARAM_H 1
9349 #define HAVE_SYS_TIME_H 1
9351 +#elif PLATFORM(AROS)
9353 +#define HAVE_ERRNO_H 1
9354 +#define HAVE_STRINGS_H 1
9355 +#define HAVE_SYS_PARAM_H 1
9356 +#define HAVE_SYS_TIME_H 1
9357 +#define HAVE_POSIX_MEMALIGN 1
9359 #else
9361 /* FIXME: is this actually used or do other platforms generate their own config.h? */
9362 @@ -726,7 +743,7 @@
9363 #endif
9365 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
9366 -#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX))
9367 +#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX) || PLATFORM(AROS))
9368 #define WTF_USE_JSVALUE64 1
9369 #elif PLATFORM(ARM) || PLATFORM(PPC64)
9370 #define WTF_USE_JSVALUE32 1
9371 diff -ruN OWB-r1097/cmake/AddGlobalCompilerFlags.cmake OWB-r1097.aros/cmake/AddGlobalCompilerFlags.cmake
9372 --- OWB-r1097/cmake/AddGlobalCompilerFlags.cmake 2009-10-14 14:25:22.000000000 +0100
9373 +++ OWB-r1097.aros/cmake/AddGlobalCompilerFlags.cmake 2018-06-13 07:27:37.570979727 +0100
9374 @@ -1,13 +1,15 @@
9375 if(CMAKE_COMPILER_IS_GNUCXX)
9376 - set(CMAKE_C_FLAGS "-Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fPIC")
9377 - set(CMAKE_CXX_FLAGS "-Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fvisibility-inlines-hidden -fPIC")
9378 - if(ENABLE_DEBUG)
9379 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
9380 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
9381 - else(ENABLE_DEBUG)
9382 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
9383 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
9384 - endif(ENABLE_DEBUG)
9385 + if(NOT AROS)
9386 + set(CMAKE_C_FLAGS "--sysroot ${CMAKE_SYSROOT} -Uunix -U__unix -U__unix__ -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses")
9387 + set(CMAKE_CXX_FLAGS "--sysroot ${CMAKE_SYSROOT} -Uunix -U__unix -U__unix__ -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fvisibility-inlines-hidden")
9388 + if(ENABLE_DEBUG)
9389 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
9390 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
9391 + else(ENABLE_DEBUG)
9392 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
9393 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
9394 + endif(ENABLE_DEBUG)
9395 + endif(NOT AROS)
9396 else(CMAKE_COMPILER_IS_GNUCXX)
9397 message(STATUS "Flag for Windows compiler is not implemented")
9398 endif(CMAKE_COMPILER_IS_GNUCXX)
9399 @@ -28,6 +30,10 @@
9400 add_definitions(-DWTF_USE_SOUP=1)
9401 endif(USE_NETWORK_SOUP)
9403 +if(ENABLE_3D_RENDERING)
9404 + add_definitions(-DENABLE_3D_RENDERING)
9405 +endif(ENABLE_3D_RENDERING)
9407 if(ENABLE_DEBUG)
9408 add_definitions(-DUSE_SYSTEM_MALLOC)
9409 else (ENABLE_DEBUG)
9410 @@ -120,6 +126,11 @@
9411 add_definitions(-DWTF_PLATFORM_BAL=1)
9412 endif(USE_GRAPHICS_AMIGAOS4)
9414 +if(USE_GRAPHICS_AROS)
9415 + add_definitions(-DWTF_PLATFORM_AROS=1)
9416 + add_definitions(-DWTF_PLATFORM_BAL=1)
9417 +endif(USE_GRAPHICS_AROS)
9419 if(USE_I18N_GENERIC)
9420 add_definitions(-DWTF_USE_BALI18N=1)
9421 endif(USE_I18N_GENERIC)
9422 diff -ruN OWB-r1097/cmake/CheckBaseDependencies.cmake OWB-r1097.aros/cmake/CheckBaseDependencies.cmake
9423 --- OWB-r1097/cmake/CheckBaseDependencies.cmake 2009-09-15 09:59:14.000000000 +0100
9424 +++ OWB-r1097.aros/cmake/CheckBaseDependencies.cmake 2018-06-13 07:27:37.570979727 +0100
9425 @@ -17,7 +17,7 @@
9426 endif(NOT GPERF_EXECUTABLE)
9428 IF(NOT WIN32)
9429 - pkg_check_modules(OWB_BASE_DEPS REQUIRED libxml-2.0>=2.6)
9430 +# pkg_check_modules(OWB_BASE_DEPS REQUIRED libxml-2.0>=2.6)
9431 ELSE(NOT WIN32)
9432 ## Pkg-config under cygwin gives to cmake .a lib and we need .lib for Visual Studio projects.
9433 find_path(LIB_XML2_PATH libxml2.lib ${WINLIB_LIB_PATH})
9434 diff -ruN OWB-r1097/cmake/CheckPlatformFonts.cmake OWB-r1097.aros/cmake/CheckPlatformFonts.cmake
9435 --- OWB-r1097/cmake/CheckPlatformFonts.cmake 2009-10-06 09:13:04.000000000 +0100
9436 +++ OWB-r1097.aros/cmake/CheckPlatformFonts.cmake 2018-06-13 07:27:37.570979727 +0100
9437 @@ -13,8 +13,8 @@
9439 if(USE_FONTS STREQUAL "FREETYPE")
9440 IF(NOT WIN32)
9441 - pkg_check_modules(FONTCONFIG REQUIRED fontconfig>=2.4)
9442 - pkg_check_modules(FREETYPE REQUIRED freetype2>=9.0)
9443 +# pkg_check_modules(FONTCONFIG REQUIRED fontconfig>=2.4)
9444 +# pkg_check_modules(FREETYPE REQUIRED freetype2>=9.0)
9445 ELSE(NOT WIN32)
9446 ## We haven't got a good pkg-config under Windows so we let cmake search libs
9447 find_path(FONTCONFIG_INCLUDE_DIRS fontconfig.h ${WINLIB_INC_PATH} ${WINLIB_INC_PATH}/fontconfig)
9448 diff -ruN OWB-r1097/cmake/CheckPlatformGraphics.cmake OWB-r1097.aros/cmake/CheckPlatformGraphics.cmake
9449 --- OWB-r1097/cmake/CheckPlatformGraphics.cmake 2009-10-06 09:13:04.000000000 +0100
9450 +++ OWB-r1097.aros/cmake/CheckPlatformGraphics.cmake 2018-06-13 07:27:37.570979727 +0100
9451 @@ -47,3 +47,15 @@
9453 set(REQUIREMENT "sdl >= 1.2.10")
9454 endif(USE_GRAPHICS STREQUAL "SDL")
9456 +if(${USE_GRAPHICS} STREQUAL "AROS")
9457 +# pkg_check_modules(SDL REQUIRED sdl>=1.2.10)
9458 + include(FindSDL_gfx)
9459 + set(GRAPHICS_INCLUDE_DIRS ${SDL_INCLUDE_DIRS} ${SDLGFX_INCLUDE_DIR})
9460 + set(GRAPHICS_LIBRARIES ${SDL_LDFLAGS} ${SDLGFX_LIBRARY})
9462 + set(USE_GRAPHICS_AROS TRUE)
9463 + mark_as_advanced(USE_GRAPHICS_AROS)
9465 + set(REQUIREMENT "sdl >= 1.2.10")
9466 +endif(${USE_GRAPHICS} STREQUAL "AROS")
9467 diff -ruN OWB-r1097/cmake/CheckPlatformImageDecoder.cmake OWB-r1097.aros/cmake/CheckPlatformImageDecoder.cmake
9468 --- OWB-r1097/cmake/CheckPlatformImageDecoder.cmake 2009-09-15 09:59:14.000000000 +0100
9469 +++ OWB-r1097.aros/cmake/CheckPlatformImageDecoder.cmake 2018-06-13 07:27:37.570979727 +0100
9470 @@ -1,6 +1,6 @@
9471 if(NOT HAS_CUSTOMER)
9472 IF(NOT WIN32)
9473 - pkg_check_modules(PNG12 REQUIRED libpng12)
9474 +# pkg_check_modules(PNG12 REQUIRED libpng12)
9475 find_package(JPEG QUIET REQUIRED)
9476 ELSE(NOT WIN32)
9477 ## We haven't got a good pkg-config under Windows so we let cmake search libs
9478 diff -ruN OWB-r1097/cmake/CheckPlatformInternationalization.cmake OWB-r1097.aros/cmake/CheckPlatformInternationalization.cmake
9479 --- OWB-r1097/cmake/CheckPlatformInternationalization.cmake 2009-09-15 09:59:14.000000000 +0100
9480 +++ OWB-r1097.aros/cmake/CheckPlatformInternationalization.cmake 2018-06-13 07:27:37.570979727 +0100
9481 @@ -22,10 +22,10 @@
9483 if(USE_I18N STREQUAL "ICU")
9484 IF(NOT WIN32)
9485 - find_package(ICU REQUIRED)
9486 - if(NOT ICU_FOUND)
9487 - message(FATAL_ERROR "icu package not found. Install it to be able to compile owb.")
9488 - endif(NOT ICU_FOUND)
9489 +# find_package(ICU REQUIRED)
9490 +# if(NOT ICU_FOUND)
9491 +# message(FATAL_ERROR "icu package not found. Install it to be able to compile owb.")
9492 +# endif(NOT ICU_FOUND)
9493 ELSE(NOT WIN32)
9494 ## We haven't got a good pkg-config under Windows so we let cmake search libs
9495 find_path(ICU_INC pwin32.h ${WINLIB_INC_PATH} ${WINLIB_INC_PATH}/icu ${WINLIB_INC_PATH}/unicode)
9496 diff -ruN OWB-r1097/cmake/CheckPlatformNetwork.cmake OWB-r1097.aros/cmake/CheckPlatformNetwork.cmake
9497 --- OWB-r1097/cmake/CheckPlatformNetwork.cmake 2009-09-23 14:00:11.000000000 +0100
9498 +++ OWB-r1097.aros/cmake/CheckPlatformNetwork.cmake 2018-06-13 07:27:37.570979727 +0100
9499 @@ -1,6 +1,6 @@
9500 if(USE_NETWORK STREQUAL "CURL")
9501 IF(NOT WIN32)
9502 - pkg_check_modules(CURL REQUIRED libcurl>=7.15)
9503 +# pkg_check_modules(CURL REQUIRED libcurl>=7.15)
9504 ELSE(NOT WIN32)
9505 ## We haven't got a good pkg-config under Windows so we let cmake search libs
9506 find_path(CURL_INCLUDE_DIRS curl.h ${WINLIB_INC_PATH} ${WINLIB_INC_PATH}/curl)
9507 diff -ruN OWB-r1097/cmake/CheckPlatformSystem.cmake OWB-r1097.aros/cmake/CheckPlatformSystem.cmake
9508 --- OWB-r1097/cmake/CheckPlatformSystem.cmake 2009-04-02 16:14:35.000000000 +0100
9509 +++ OWB-r1097.aros/cmake/CheckPlatformSystem.cmake 2018-06-13 07:33:46.150961779 +0100
9510 @@ -16,3 +16,9 @@
9511 add_definitions(-DWTF_PLATFORM_MACPORT=1)
9512 endif(APPLE)
9513 endif(UNIX)
9515 +if(AROS)
9516 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CPP_FLAGS}" CACHE STRING "" FORCE)
9517 + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CPP_FLAGS}" CACHE STRING "" FORCE)
9518 +endif(AROS)
9520 diff -ruN OWB-r1097/cmake/CheckPlatformTimer.cmake OWB-r1097.aros/cmake/CheckPlatformTimer.cmake
9521 --- OWB-r1097/cmake/CheckPlatformTimer.cmake 2009-02-11 16:41:27.000000000 +0000
9522 +++ OWB-r1097.aros/cmake/CheckPlatformTimer.cmake 2018-06-13 07:27:37.570979727 +0100
9523 @@ -20,3 +20,8 @@
9524 set(USE_TIMER_QT TRUE)
9525 mark_as_advanced(USE_TIMER_QT)
9526 endif(USE_TIMER STREQUAL "QT")
9528 +if(${USE_TIMER} STREQUAL "AROS")
9529 + set(USE_TIMER_AROS TRUE)
9530 + mark_as_advanced(USE_TIMER_AROS)
9531 +endif(${USE_TIMER} STREQUAL "AROS")
9532 diff -ruN OWB-r1097/cmake/CheckSqlite3.cmake OWB-r1097.aros/cmake/CheckSqlite3.cmake
9533 --- OWB-r1097/cmake/CheckSqlite3.cmake 2008-10-04 18:41:49.000000000 +0100
9534 +++ OWB-r1097.aros/cmake/CheckSqlite3.cmake 2018-06-13 07:27:37.570979727 +0100
9535 @@ -1,5 +1,5 @@
9536 if(ENABLE_DATABASE)
9537 - pkg_check_modules(SQLITE3 REQUIRED sqlite3>=3.0)
9538 +# pkg_check_modules(SQLITE3 REQUIRED sqlite3>=3.0)
9539 set(DATABASE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
9540 set(DATABASE_LIBRARIES ${SQLITE3_LIBRARIES})
9541 endif(ENABLE_DATABASE)
9542 diff -ruN OWB-r1097/cmake/CheckXSLT.cmake OWB-r1097.aros/cmake/CheckXSLT.cmake
9543 --- OWB-r1097/cmake/CheckXSLT.cmake 2009-09-15 09:59:14.000000000 +0100
9544 +++ OWB-r1097.aros/cmake/CheckXSLT.cmake 2018-06-13 07:27:37.570979727 +0100
9545 @@ -1,6 +1,6 @@
9546 if(ENABLE_XSLT)
9547 IF(NOT WIN32)
9548 - pkg_check_modules(LIBXSLT REQUIRED libxslt>=1.1.7)
9549 +# pkg_check_modules(LIBXSLT REQUIRED libxslt>=1.1.7)
9550 ELSE(NOT WIN32)
9551 ## Pkg-config under cygwin gives to cmake .a lib and we need .lib for Visual Studio projects.
9552 find_path(LIB_XSLT_PATH libxslt.lib ${WINLIB_LIB_PATH})
9553 diff -ruN OWB-r1097/cmake/ConfigureBuildSDL.cmake OWB-r1097.aros/cmake/ConfigureBuildSDL.cmake
9554 --- OWB-r1097/cmake/ConfigureBuildSDL.cmake 2009-10-16 19:40:05.000000000 +0100
9555 +++ OWB-r1097.aros/cmake/ConfigureBuildSDL.cmake 2018-06-13 07:27:37.570979727 +0100
9556 @@ -7,7 +7,7 @@
9557 set(ARCH ${PROCESSOR})
9558 endif(UNIX)
9560 -set(ENABLE_DEBUG ON CACHE BOOLEAN "Enable debug support" FORCE)
9561 +set(ENABLE_DEBUG OFF CACHE BOOLEAN "Enable debug support" FORCE)
9562 set(ENABLE_TESTS ON CACHE BOOLEAN "Enable tests" FORCE)
9564 set(ENABLE_3D_CANVAS ON CACHE BOOLEAN "Enable 3D canvas support" FORCE)
9565 diff -ruN OWB-r1097/cmake/SetCMakeVars.cmake OWB-r1097.aros/cmake/SetCMakeVars.cmake
9566 --- OWB-r1097/cmake/SetCMakeVars.cmake 2009-08-12 21:20:06.000000000 +0100
9567 +++ OWB-r1097.aros/cmake/SetCMakeVars.cmake 2018-06-13 07:27:37.570979727 +0100
9568 @@ -22,6 +22,14 @@
9570 endif(USE_GRAPHICS_SDL)
9572 +if(USE_GRAPHICS_AROS)
9573 + list(APPEND API_HEADER
9574 + ${OWB_SOURCE_DIR}/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.h
9575 + ${OWB_SOURCE_DIR}/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.h
9576 + ${OWB_SOURCE_DIR}/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.h
9578 +endif(USE_GRAPHICS_AROS)
9580 list(APPEND BASE_INCLUDE_DIRS
9581 ${OWB_SOURCE_DIR}
9582 ${OWB_SOURCE_DIR}/Base
9583 @@ -103,6 +111,12 @@
9584 ${NETWORK_LIBRARIES}
9585 ${THREADS_LIBRARIES}
9586 ${TIMER_LIBRARIES}
9587 + codesets
9588 + amiga
9589 + arosc
9591 + mui
9592 + thread
9595 if(ENABLE_DATABASE)
9596 diff -ruN OWB-r1097/CMakeLists.txt OWB-r1097.aros/CMakeLists.txt
9597 --- OWB-r1097/CMakeLists.txt 2009-10-14 14:25:22.000000000 +0100
9598 +++ OWB-r1097.aros/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
9599 @@ -72,11 +72,11 @@
9601 set(USE_FILESYSTEM_ACCESS "POSIX" CACHE STRING "Choose the filesystem access method, options are: GLIB POSIX QT")
9602 set(USE_FONTS "FREETYPE" CACHE STRING "Choose the font engine, options are: AMIGAOS4 EMBEDDED FREETYPE GTK QT")
9603 -set(USE_GRAPHICS "SDL" CACHE STRING "Choose the graphic backend, options are: AMIGAOS4 GTK QT SDL")
9604 +set(USE_GRAPHICS "AROS" CACHE STRING "Choose the graphic backend, options are: AMIGAOS4 GTK SDL QT AROS")
9605 set(USE_I18N "ICU" CACHE STRING "Choose the internationalization library, options are: GENERIC GLIB ICU QT")
9606 set(USE_NETWORK "CURL" CACHE STRING "Choose the network backend, options are: CURL QT SOUP")
9607 -set(USE_THREADS "PTHREADS" CACHE STRING "Choose the thread backend, options are: GTHREADS NONE PTHREADS QT")
9608 -set(USE_TIMER "LINUX" CACHE STRING "Choose the timer backend, options are: GLIB LINUX QT")
9609 +set(USE_THREADS "NONE" CACHE STRING "Choose the thread backend, options are: GTHREADS NONE PTHREADS QT")
9610 +set(USE_TIMER "AROS" CACHE STRING "Choose the timer backend, options are: GLIB LINUX QT AROS")
9612 set(WITH_OWB_CONFIG_DIR "$ENV{HOME}/.owb/conf/" CACHE STRING "Set configuration directory for owb")
9614 diff -ruN OWB-r1097/JavaScriptCore/CMakeLists.txt OWB-r1097.aros/JavaScriptCore/CMakeLists.txt
9615 --- OWB-r1097/JavaScriptCore/CMakeLists.txt 2009-10-09 15:58:16.000000000 +0100
9616 +++ OWB-r1097.aros/JavaScriptCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
9617 @@ -71,11 +71,19 @@
9618 add_library(jsc STATIC ${JSC_SRC})
9619 add_dependencies(jsc wtf)
9621 +IF(AROS)
9622 + install(TARGETS jsc
9623 + LIBRARY DESTINATION lib
9624 + ARCHIVE DESTINATION lib
9626 +ENDIF(AROS)
9628 ##################################################
9629 # Tests compilation. #
9630 ##################################################
9632 +if(ENABLE_TESTS)
9634 link_directories(${THREADS_LIBRARY_DIRS})
9635 add_executable(jshell EXCLUDE_FROM_ALL jsc.cpp)
9636 set_target_properties(jshell
9637 @@ -95,3 +103,5 @@
9638 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/mozilla
9640 add_dependencies(jsctests jshell)
9642 +endif(ENABLE_TESTS)
9643 diff -ruN OWB-r1097/JavaScriptCore/interpreter/Interpreter.cpp OWB-r1097.aros/JavaScriptCore/interpreter/Interpreter.cpp
9644 --- OWB-r1097/JavaScriptCore/interpreter/Interpreter.cpp 2009-10-12 11:20:21.000000000 +0100
9645 +++ OWB-r1097.aros/JavaScriptCore/interpreter/Interpreter.cpp 2018-06-13 07:27:37.570979727 +0100
9646 @@ -2497,7 +2497,7 @@
9647 double dValue = 0;
9648 JSValue jsValue = callFrame->r(value).jsValue();
9649 if (jsValue.isInt32())
9650 - jsByteArray->setIndex(i, jsValue.asInt32());
9651 + jsByteArray->setIndex(i, (int)jsValue.asInt32());
9652 else if (jsValue.getNumber(dValue))
9653 jsByteArray->setIndex(i, dValue);
9654 else
9655 @@ -3052,10 +3052,10 @@
9657 // First step is to copy the "expected" parameters from their normal location relative to the callframe
9658 for (; i < inplaceArgs; i++)
9659 - argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams];
9660 + argStore[i] = callFrame->registers()[(int32_t) i - (int32_t) RegisterFile::CallFrameHeaderSize - (int32_t) expectedParams];
9661 // Then we copy any additional arguments that may be further up the stack ('-1' to account for 'this')
9662 for (; i < argCount; i++)
9663 - argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams - argCount - 1];
9664 + argStore[i] = callFrame->registers()[(int32_t) i - (int32_t) RegisterFile::CallFrameHeaderSize - (int32_t) expectedParams - (int32_t) argCount - 1];
9665 } else if (!arguments.isUndefinedOrNull()) {
9666 if (!arguments.isObject()) {
9667 exceptionValue = createInvalidParamError(callFrame, "Function.prototype.apply", arguments, vPC - callFrame->codeBlock()->instructions().begin(), callFrame->codeBlock());
9668 diff -ruN OWB-r1097/JavaScriptCore/interpreter/RegisterFile.cpp OWB-r1097.aros/JavaScriptCore/interpreter/RegisterFile.cpp
9669 --- OWB-r1097/JavaScriptCore/interpreter/RegisterFile.cpp 2009-09-23 14:00:11.000000000 +0100
9670 +++ OWB-r1097.aros/JavaScriptCore/interpreter/RegisterFile.cpp 2018-06-13 07:27:37.570979727 +0100
9671 @@ -40,7 +40,7 @@
9672 VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT);
9673 #endif
9674 VirtualFree(m_buffer, 0, MEM_RELEASE);
9675 -#elif PLATFORM(AMIGAOS4)
9676 +#elif PLATFORM(AMIGAOS4) || PLATFORM(AROS)
9677 fastFree(m_buffer);
9678 #else
9679 fastFree(m_buffer);
9680 diff -ruN OWB-r1097/JavaScriptCore/parser/Grammar.y OWB-r1097.aros/JavaScriptCore/parser/Grammar.y
9681 --- OWB-r1097/JavaScriptCore/parser/Grammar.y 2009-10-09 15:58:16.000000000 +0100
9682 +++ OWB-r1097.aros/JavaScriptCore/parser/Grammar.y 2018-06-13 07:27:37.570979727 +0100
9683 @@ -1,4 +1,6 @@
9684 -%pure_parser
9685 +%pure-parser
9686 +%parse-param { void* globalPtr }
9687 +%lex-param { void* globalPtr }
9691 @@ -49,7 +51,7 @@
9692 #define YYERROR_VERBOSE
9693 #endif
9695 -int jscyyerror(const char*);
9696 +int jscyyerror(void*, void*, const char*);
9698 static inline bool allowAutomaticSemicolon(JSC::Lexer&, int);
9700 @@ -86,9 +88,6 @@
9702 #endif
9704 -#define YYPARSE_PARAM globalPtr
9705 -#define YYLEX_PARAM globalPtr
9707 template <typename T> inline NodeDeclarationInfo<T> createNodeDeclarationInfo(T node,
9708 ParserArenaData<DeclarationStacks::VarStack>* varDecls,
9709 ParserArenaData<DeclarationStacks::FunctionStack>* funcDecls,
9710 @@ -2069,7 +2068,7 @@
9713 // Called by yyparse on error.
9714 -int yyerror(const char*)
9715 +int yyerror(void*, void *, const char*)
9717 return 1;
9719 diff -ruN OWB-r1097/JavaScriptCore/runtime/Arguments.cpp OWB-r1097.aros/JavaScriptCore/runtime/Arguments.cpp
9720 --- OWB-r1097/JavaScriptCore/runtime/Arguments.cpp 2009-08-28 13:59:49.000000000 +0100
9721 +++ OWB-r1097.aros/JavaScriptCore/runtime/Arguments.cpp 2018-06-13 07:27:37.570979727 +0100
9722 @@ -71,7 +71,7 @@
9725 if (LIKELY(!d->deletedArguments)) {
9726 - unsigned parametersLength = min(min(d->numParameters, d->numArguments), maxSize);
9727 + unsigned parametersLength = min((uint32_t)min(d->numParameters, d->numArguments), maxSize);
9728 unsigned i = 0;
9729 for (; i < parametersLength; ++i)
9730 buffer[i] = d->registers[d->firstParameterIndex + i].jsValue();
9731 @@ -80,7 +80,7 @@
9732 return;
9735 - unsigned parametersLength = min(min(d->numParameters, d->numArguments), maxSize);
9736 + unsigned parametersLength = min((uint32_t)min(d->numParameters, d->numArguments), maxSize);
9737 unsigned i = 0;
9738 for (; i < parametersLength; ++i) {
9739 if (!d->deletedArguments[i])
9740 diff -ruN OWB-r1097/JavaScriptCore/runtime/CMakeLists.txt OWB-r1097.aros/JavaScriptCore/runtime/CMakeLists.txt
9741 --- OWB-r1097/JavaScriptCore/runtime/CMakeLists.txt 2009-10-09 15:58:16.000000000 +0100
9742 +++ OWB-r1097.aros/JavaScriptCore/runtime/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
9743 @@ -62,7 +62,7 @@
9744 runtime/Lookup.cpp
9745 runtime/MathObject.cpp
9746 runtime/MarkStack.cpp
9747 - runtime/MarkStackPosix.cpp
9748 + runtime/MarkStackAROS.cpp
9749 runtime/NativeErrorConstructor.cpp
9750 runtime/NativeErrorPrototype.cpp
9751 runtime/NumberConstructor.cpp
9752 diff -ruN OWB-r1097/JavaScriptCore/runtime/Collector.cpp OWB-r1097.aros/JavaScriptCore/runtime/Collector.cpp
9753 --- OWB-r1097/JavaScriptCore/runtime/Collector.cpp 2009-10-09 15:58:16.000000000 +0100
9754 +++ OWB-r1097.aros/JavaScriptCore/runtime/Collector.cpp 2018-06-13 07:27:37.570979727 +0100
9755 @@ -95,6 +95,10 @@
9756 #include <malloc.h>
9757 #include <proto/exec.h>
9759 +#elif PLATFORM(AROS)
9761 +#include <proto/exec.h>
9763 #endif
9765 #define COLLECT_ON_EVERY_ALLOCATION 0
9766 @@ -707,6 +711,8 @@
9767 thread_info threadInfo;
9768 get_thread_info(find_thread(NULL), &threadInfo);
9769 return threadInfo.stack_end;
9770 +#elif PLATFORM(AROS)
9771 + return (void*)FindTask(NULL)->tc_SPUpper;
9772 #elif PLATFORM(UNIX)
9773 static void* stackBase = 0;
9774 static size_t stackSize = 0;
9775 diff -ruN OWB-r1097/JavaScriptCore/runtime/JSONObject.cpp OWB-r1097.aros/JavaScriptCore/runtime/JSONObject.cpp
9776 --- OWB-r1097/JavaScriptCore/runtime/JSONObject.cpp 2009-08-28 13:59:49.000000000 +0100
9777 +++ OWB-r1097.aros/JavaScriptCore/runtime/JSONObject.cpp 2018-06-13 07:27:37.570979727 +0100
9778 @@ -720,7 +720,7 @@
9780 case ArrayEndVisitMember: {
9781 JSArray* array = arrayStack.last();
9782 - JSValue filteredValue = callReviver(array, jsString(m_exec, UString::from(indexStack.last())), outValue);
9783 + JSValue filteredValue = callReviver(array, jsString(m_exec, UString::from((unsigned int)indexStack.last())), outValue);
9784 if (filteredValue.isUndefined())
9785 array->deleteProperty(m_exec, indexStack.last());
9786 else {
9787 diff -ruN OWB-r1097/JavaScriptCore/runtime/JSString.h OWB-r1097.aros/JavaScriptCore/runtime/JSString.h
9788 --- OWB-r1097/JavaScriptCore/runtime/JSString.h 2009-10-16 19:40:05.000000000 +0100
9789 +++ OWB-r1097.aros/JavaScriptCore/runtime/JSString.h 2018-06-13 07:27:37.570979727 +0100
9790 @@ -260,7 +260,7 @@
9791 if (isString())
9792 return static_cast<JSString*>(asCell())->value();
9793 if (isInt32())
9794 - return exec->globalData().numericStrings.add(asInt32());
9795 + return exec->globalData().numericStrings.add((int)asInt32());
9796 if (isDouble())
9797 return exec->globalData().numericStrings.add(asDouble());
9798 if (isTrue())
9799 diff -ruN OWB-r1097/JavaScriptCore/runtime/JSValue.h OWB-r1097.aros/JavaScriptCore/runtime/JSValue.h
9800 --- OWB-r1097/JavaScriptCore/runtime/JSValue.h 2009-10-05 11:36:03.000000000 +0100
9801 +++ OWB-r1097.aros/JavaScriptCore/runtime/JSValue.h 2018-06-13 07:27:37.570979727 +0100
9802 @@ -663,7 +663,7 @@
9803 u.asDouble = d;
9804 return;
9806 - *this = JSValue(globalData, static_cast<int32_t>(d));
9807 + *this = JSValue(globalData, static_cast<int>(d));
9810 inline JSValue::JSValue(JSGlobalData*, int i)
9811 @@ -678,7 +678,7 @@
9812 *this = JSValue(globalData, static_cast<double>(i));
9813 return;
9815 - *this = JSValue(globalData, static_cast<int32_t>(i));
9816 + *this = JSValue(globalData, static_cast<int>(i));
9819 inline bool JSValue::isNumber() const
9820 diff -ruN OWB-r1097/JavaScriptCore/runtime/MarkStackAROS.cpp OWB-r1097.aros/JavaScriptCore/runtime/MarkStackAROS.cpp
9821 --- OWB-r1097/JavaScriptCore/runtime/MarkStackAROS.cpp 1970-01-01 01:00:00.000000000 +0100
9822 +++ OWB-r1097.aros/JavaScriptCore/runtime/MarkStackAROS.cpp 2018-06-13 07:27:37.570979727 +0100
9823 @@ -0,0 +1,40 @@
9825 + Copyright (C) 2009 Stanislaw Szymczyk
9827 + This library is free software; you can redistribute it and/or
9828 + modify it under the terms of the GNU Library General Public
9829 + License as published by the Free Software Foundation; either
9830 + version 2 of the License, or (at your option) any later version.
9832 + This library is distributed in the hope that it will be useful,
9833 + but WITHOUT ANY WARRANTY; without even the implied warranty of
9834 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9835 + Library General Public License for more details.
9837 + You should have received a copy of the GNU Library General Public License
9838 + along with this library; see the file COPYING.LIB. If not, write to
9839 + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
9840 + Boston, MA 02110-1301, USA.
9843 +#include "config.h"
9844 +#include "MarkStack.h"
9846 +namespace JSC {
9848 +void MarkStack::initializePagesize()
9850 + MarkStack::s_pageSize = 4096;
9853 +void* MarkStack::allocateStack(size_t size)
9855 + return fastMalloc(size);
9858 +void MarkStack::releaseStack(void* addr, size_t size)
9860 + return fastFree(addr);
9864 diff -ruN OWB-r1097/JavaScriptCore/runtime/MarkStack.h OWB-r1097.aros/JavaScriptCore/runtime/MarkStack.h
9865 --- OWB-r1097/JavaScriptCore/runtime/MarkStack.h 2009-09-28 10:13:12.000000000 +0100
9866 +++ OWB-r1097.aros/JavaScriptCore/runtime/MarkStack.h 2018-06-13 07:27:37.570979727 +0100
9867 @@ -153,7 +153,7 @@
9868 ASSERT(0 == (size % MarkStack::pageSize()));
9869 if (size == m_allocated)
9870 return;
9871 -#if PLATFORM(WIN) || PLATFORM(SYMBIAN)
9872 +#if PLATFORM(WIN) || PLATFORM(SYMBIAN) || PLATFORM(AROS)
9873 // We cannot release a part of a region with VirtualFree. To get around this,
9874 // we'll release the entire region and reallocate the size that we want.
9875 releaseStack(m_data, m_allocated);
9876 diff -ruN OWB-r1097/JavaScriptCore/runtime/Operations.h OWB-r1097.aros/JavaScriptCore/runtime/Operations.h
9877 --- OWB-r1097/JavaScriptCore/runtime/Operations.h 2009-08-21 14:44:56.000000000 +0100
9878 +++ OWB-r1097.aros/JavaScriptCore/runtime/Operations.h 2018-06-13 07:27:37.570979727 +0100
9879 @@ -212,7 +212,7 @@
9881 if (rightIsNumber & leftIsString) {
9882 RefPtr<UString::Rep> value = v2.isInt32() ?
9883 - concatenate(asString(v1)->value().rep(), v2.asInt32()) :
9884 + concatenate(asString(v1)->value().rep(), (int)v2.asInt32()) :
9885 concatenate(asString(v1)->value().rep(), right);
9887 if (!value)
9888 diff -ruN OWB-r1097/JavaScriptCore/wtf/CMakeLists.txt OWB-r1097.aros/JavaScriptCore/wtf/CMakeLists.txt
9889 --- OWB-r1097/JavaScriptCore/wtf/CMakeLists.txt 2009-03-13 15:31:27.000000000 +0000
9890 +++ OWB-r1097.aros/JavaScriptCore/wtf/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
9891 @@ -20,3 +20,10 @@
9892 PROPERTIES COMPILE_FLAGS "-fno-rtti -fno-exceptions"
9894 add_library(wtf STATIC ${WTF_SRC})
9896 +IF(AROS)
9897 + install(TARGETS wtf
9898 + LIBRARY DESTINATION lib
9899 + ARCHIVE DESTINATION lib
9901 +ENDIF(AROS)
9902 \ No newline at end of file
9903 diff -ruN OWB-r1097/JavaScriptCore/wtf/TCSpinLock.h OWB-r1097.aros/JavaScriptCore/wtf/TCSpinLock.h
9904 --- OWB-r1097/JavaScriptCore/wtf/TCSpinLock.h 2009-09-25 16:25:08.000000000 +0100
9905 +++ OWB-r1097.aros/JavaScriptCore/wtf/TCSpinLock.h 2018-06-13 07:27:37.570979727 +0100
9906 @@ -189,6 +189,31 @@
9910 +#elif PLATFORM(AROS)
9912 +#include <libraries/thread.h>
9913 +#include <proto/thread.h>
9915 +// AROS version
9916 +struct TCMalloc_SpinLock {
9917 + void *private_lock_;
9919 + inline void Init() {
9920 + if ((private_lock_ = CreateMutex()) == NULL) abort();
9922 + inline void Finalize() {
9923 + DestroyMutex(private_lock_);
9925 + inline void Lock() {
9926 + LockMutex(private_lock_);
9928 + inline void Unlock() {
9929 + UnlockMutex(private_lock_);
9933 +#define SPINLOCK_INITIALIZER { NULL }
9935 #else
9937 #include <pthread.h>
9938 diff -ruN OWB-r1097/WebCore/bindings/js/CMakeLists.txt OWB-r1097.aros/WebCore/bindings/js/CMakeLists.txt
9939 --- OWB-r1097/WebCore/bindings/js/CMakeLists.txt 2009-10-14 14:25:22.000000000 +0100
9940 +++ OWB-r1097.aros/WebCore/bindings/js/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
9941 @@ -252,5 +252,11 @@
9943 endif(ENABLE_EVENTSOURCE)
9945 +if(USE_GRAPHICS_AROS)
9946 + list(APPEND WEBCORE_SRC
9947 + bindings/js/ScriptControllerBAL.cpp
9949 +endif(USE_GRAPHICS_AROS)
9951 include(bindings/js/Customer/CMakeLists.txt OPTIONAL)
9953 diff -ruN OWB-r1097/WebCore/CMakeLists.txt OWB-r1097.aros/WebCore/CMakeLists.txt
9954 --- OWB-r1097/WebCore/CMakeLists.txt 2009-10-07 16:28:50.000000000 +0100
9955 +++ OWB-r1097.aros/WebCore/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
9956 @@ -510,3 +510,17 @@
9958 add_library(webcore STATIC ${WEBCORE_SRC})
9959 add_dependencies(webcore jsc)
9961 +IF(AROS)
9962 + install(TARGETS webcore
9963 + LIBRARY DESTINATION lib
9964 + ARCHIVE DESTINATION lib
9966 +ENDIF(AROS)
9968 +install(DIRECTORY ${OWB_SOURCE_DIR}/WebCore/Resources/
9969 + DESTINATION share/webkit-owb/resources
9970 + PATTERN ".svn" EXCLUDE
9971 + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
9974 diff -ruN OWB-r1097/WebCore/css/CSSGrammar.y OWB-r1097.aros/WebCore/css/CSSGrammar.y
9975 --- OWB-r1097/WebCore/css/CSSGrammar.y 2009-08-07 12:39:58.000000000 +0100
9976 +++ OWB-r1097.aros/WebCore/css/CSSGrammar.y 2018-06-13 07:27:37.570979727 +0100
9977 @@ -51,13 +51,11 @@
9978 #define YYMAXDEPTH 10000
9979 #define YYDEBUG 0
9981 -// FIXME: Replace with %parse-param { CSSParser* parser } once we can depend on bison 2.x
9982 -#define YYPARSE_PARAM parser
9983 -#define YYLEX_PARAM parser
9987 -%pure_parser
9988 +%pure-parser
9989 +%parse-param { CSSParser* parser }
9990 +%lex-param { CSSParser* parser }
9992 %union {
9993 bool boolean;
9994 @@ -85,7 +83,7 @@
9998 -static inline int cssyyerror(const char*)
9999 +static inline int cssyyerror(void*, const char*)
10001 return 1;
10003 diff -ruN OWB-r1097/WebCore/css/CSSParser.cpp OWB-r1097.aros/WebCore/css/CSSParser.cpp
10004 --- OWB-r1097/WebCore/css/CSSParser.cpp 2009-10-16 19:40:05.000000000 +0100
10005 +++ OWB-r1097.aros/WebCore/css/CSSParser.cpp 2018-06-13 07:27:37.570979727 +0100
10006 @@ -81,7 +81,7 @@
10007 extern int cssyydebug;
10008 #endif
10010 -extern int cssyyparse(void* parser);
10011 +extern int cssyyparse(WebCore::CSSParser*);
10013 using namespace std;
10014 using namespace WTF;
10015 @@ -222,7 +222,7 @@
10016 m_defaultNamespace = starAtom; // Reset the default namespace.
10018 setupParser("", string, "");
10019 - cssyyparse(this);
10020 + ::cssyyparse(this);
10021 m_rule = 0;
10024 @@ -230,7 +230,7 @@
10026 m_styleSheet = sheet;
10027 setupParser("@-webkit-rule{", string, "} ");
10028 - cssyyparse(this);
10029 + ::cssyyparse(this);
10030 return m_rule.release();
10033 @@ -238,7 +238,7 @@
10035 m_styleSheet = sheet;
10036 setupParser("@-webkit-keyframe-rule{ ", string, "} ");
10037 - cssyyparse(this);
10038 + ::cssyyparse(this);
10039 return m_keyframe.release();
10042 @@ -252,7 +252,7 @@
10043 m_id = id;
10044 m_important = important;
10046 - cssyyparse(this);
10047 + ::cssyyparse(this);
10049 m_rule = 0;
10051 @@ -300,7 +300,7 @@
10052 m_styleSheet = static_cast<CSSStyleSheet*>(declaration->stylesheet());
10054 setupParser("@-webkit-decls{color:", string, "} ");
10055 - cssyyparse(this);
10056 + ::cssyyparse(this);
10057 m_rule = 0;
10059 return (m_numParsedProperties && m_parsedProperties[0]->m_id == CSSPropertyColor);
10060 @@ -315,7 +315,7 @@
10062 setupParser("@-webkit-selector{", string, "}");
10064 - cssyyparse(this);
10065 + ::cssyyparse(this);
10067 m_selectorListForParseSelector = 0;
10069 @@ -326,7 +326,7 @@
10070 m_styleSheet = static_cast<CSSStyleSheet*>(declaration->stylesheet());
10072 setupParser("@-webkit-decls{", string, "} ");
10073 - cssyyparse(this);
10074 + ::cssyyparse(this);
10075 m_rule = 0;
10077 bool ok = false;
10078 @@ -350,7 +350,7 @@
10079 // can't use { because tokenizer state switches from mediaquery to initial state when it sees { token.
10080 // instead insert one " " (which is WHITESPACE in CSSGrammar.y)
10081 setupParser("@-webkit-mediaquery ", string, "} ");
10082 - cssyyparse(this);
10083 + ::cssyyparse(this);
10085 bool ok = false;
10086 if (m_mediaQuery) {
10087 @@ -5066,7 +5066,7 @@
10088 nameValuePair += variableValue;
10090 setupParser("@-webkit-variables-decls{", nameValuePair, "} ");
10091 - cssyyparse(this);
10092 + ::cssyyparse(this);
10093 m_rule = 0;
10095 bool ok = false;
10096 diff -ruN OWB-r1097/WebCore/dom/make_names.pl OWB-r1097.aros/WebCore/dom/make_names.pl
10097 --- OWB-r1097/WebCore/dom/make_names.pl 2009-08-24 12:41:30.000000000 +0100
10098 +++ OWB-r1097.aros/WebCore/dom/make_names.pl 2018-06-13 07:27:37.570979727 +0100
10099 @@ -46,7 +46,7 @@
10100 my %attrs = ();
10101 my %parameters = ();
10102 my $extraDefines = 0;
10103 -my $preprocessor = "/usr/bin/gcc -E -P -x c++";
10104 +my $preprocessor = "/usr/bin/gcc -E -x c++";
10106 GetOptions(
10107 'tags=s' => \$tagsFile,
10108 diff -ruN OWB-r1097/WebCore/dom/XMLTokenizerLibxml2.cpp OWB-r1097.aros/WebCore/dom/XMLTokenizerLibxml2.cpp
10109 --- OWB-r1097/WebCore/dom/XMLTokenizerLibxml2.cpp 2009-10-09 15:58:16.000000000 +0100
10110 +++ OWB-r1097.aros/WebCore/dom/XMLTokenizerLibxml2.cpp 2018-06-13 07:27:37.570979727 +0100
10111 @@ -887,7 +887,7 @@
10112 if (m_parserStopped)
10113 return;
10115 -#if PLATFORM(WIN_OS)
10116 +#if PLATFORM(WIN_OS) || PLATFORM(AROS)
10117 char m[1024];
10118 vsnprintf(m, sizeof(m) - 1, message, args);
10119 #else
10120 @@ -901,7 +901,7 @@
10121 else
10122 handleError(type, m, lineNumber(), columnNumber());
10124 -#if !PLATFORM(WIN_OS)
10125 +#if !PLATFORM(WIN_OS) && !PLATFORM(AROS)
10126 free(m);
10127 #endif
10129 diff -ruN OWB-r1097/WebCore/loader/CachedImage.cpp OWB-r1097.aros/WebCore/loader/CachedImage.cpp
10130 --- OWB-r1097/WebCore/loader/CachedImage.cpp 2009-06-19 16:17:54.000000000 +0100
10131 +++ OWB-r1097.aros/WebCore/loader/CachedImage.cpp 2018-06-13 07:27:37.570979727 +0100
10132 @@ -113,7 +113,7 @@
10134 static Image* brokenImage()
10136 - DEFINE_STATIC_LOCAL(RefPtr<Image>, brokenImage, (Image::loadPlatformResource("missingImage")));
10137 + DEFINE_STATIC_LOCAL(RefPtr<Image>, brokenImage, (Image::loadPlatformResource("/missingImage")));
10138 return brokenImage.get();
10141 diff -ruN OWB-r1097/WebCore/loader/FrameLoader.cpp OWB-r1097.aros/WebCore/loader/FrameLoader.cpp
10142 --- OWB-r1097/WebCore/loader/FrameLoader.cpp 2009-10-16 19:40:05.000000000 +0100
10143 +++ OWB-r1097.aros/WebCore/loader/FrameLoader.cpp 2018-06-13 07:27:37.570979727 +0100
10144 @@ -47,6 +47,7 @@
10145 #include "EditorClient.h"
10146 #include "Element.h"
10147 #include "Event.h"
10148 +#include "MouseEvent.h"
10149 #include "EventNames.h"
10150 #include "FloatRect.h"
10151 #include "FormState.h"
10152 @@ -1863,6 +1864,13 @@
10153 return;
10156 + if (action.event() && action.event()->type() == eventNames().clickEvent && action.event()->isMouseEvent() && static_cast<const MouseEvent*>(action.event())->button() == MiddleButton)
10158 + policyChecker()->checkNewWindowPolicy(action, FrameLoader::callContinueLoadAfterNewWindowPolicy,
10159 + request, formState.release(), String("_blank"), this);
10160 + return;
10163 RefPtr<DocumentLoader> oldDocumentLoader = m_documentLoader;
10165 bool sameURL = shouldTreatURLAsSameAsCurrent(newURL);
10166 diff -ruN OWB-r1097/WebCore/loader/MainResourceLoader.cpp OWB-r1097.aros/WebCore/loader/MainResourceLoader.cpp
10167 --- OWB-r1097/WebCore/loader/MainResourceLoader.cpp 2009-10-16 19:40:05.000000000 +0100
10168 +++ OWB-r1097.aros/WebCore/loader/MainResourceLoader.cpp 2018-06-13 07:27:37.570979727 +0100
10169 @@ -77,7 +77,11 @@
10171 if (!cancelled()) {
10172 ASSERT(!reachedTerminalState());
10173 - frameLoader()->notifier()->didFailToLoad(this, error);
10175 + if(error == interruptionForPolicyChangeError())
10176 + frameLoader()->notifier()->didFinishLoad(this);
10177 + else
10178 + frameLoader()->notifier()->didFailToLoad(this, error);
10180 releaseResources();
10182 diff -ruN OWB-r1097/WebCore/page/ChromeClient.h OWB-r1097.aros/WebCore/page/ChromeClient.h
10183 --- OWB-r1097/WebCore/page/ChromeClient.h 2009-10-07 16:28:50.000000000 +0100
10184 +++ OWB-r1097.aros/WebCore/page/ChromeClient.h 2018-06-13 07:27:37.570979727 +0100
10185 @@ -88,6 +88,7 @@
10186 // should not be shown to the user until the ChromeClient of the newly
10187 // created Page has its show method called.
10188 virtual Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) = 0;
10189 + virtual Page* createTab(Frame*, const FrameLoadRequest&) = 0;
10190 virtual void show() = 0;
10192 virtual bool canRunModal() = 0;
10193 diff -ruN OWB-r1097/WebCore/page/Chrome.cpp OWB-r1097.aros/WebCore/page/Chrome.cpp
10194 --- OWB-r1097/WebCore/page/Chrome.cpp 2009-09-21 15:00:57.000000000 +0100
10195 +++ OWB-r1097.aros/WebCore/page/Chrome.cpp 2018-06-13 07:27:37.570979727 +0100
10196 @@ -167,6 +167,20 @@
10197 return newPage;
10200 +Page* Chrome::createTab(Frame* frame, const FrameLoadRequest& request) const
10202 + Page* newPage = m_client->createTab(frame, request);
10204 +#if ENABLE(DOM_STORAGE)
10205 + if (newPage) {
10206 + if (StorageNamespace* oldSessionStorage = m_page->sessionStorage(false))
10207 + newPage->setSessionStorage(oldSessionStorage->copy());
10209 +#endif
10211 + return newPage;
10214 void Chrome::show() const
10216 m_client->show();
10217 diff -ruN OWB-r1097/WebCore/page/Chrome.h OWB-r1097.aros/WebCore/page/Chrome.h
10218 --- OWB-r1097/WebCore/page/Chrome.h 2009-09-21 15:00:57.000000000 +0100
10219 +++ OWB-r1097.aros/WebCore/page/Chrome.h 2018-06-13 07:27:37.570979727 +0100
10220 @@ -83,6 +83,7 @@
10221 void takeFocus(FocusDirection) const;
10223 Page* createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures&) const;
10224 + Page* createTab(Frame*, const FrameLoadRequest&) const;
10225 void show() const;
10227 bool canRunModal() const;
10228 diff -ruN OWB-r1097/WebCore/page/ContextMenuController.cpp OWB-r1097.aros/WebCore/page/ContextMenuController.cpp
10229 --- OWB-r1097/WebCore/page/ContextMenuController.cpp 2009-10-05 11:36:03.000000000 +0100
10230 +++ OWB-r1097.aros/WebCore/page/ContextMenuController.cpp 2018-06-13 07:27:37.570979727 +0100
10231 @@ -120,6 +120,15 @@
10235 +static void openNewTab(const KURL& urlToLoad, Frame* frame)
10237 + if (Page* oldPage = frame->page()) {
10238 + WindowFeatures features;
10239 + if (Page* newPage = oldPage->chrome()->createTab(frame, FrameLoadRequest(ResourceRequest(urlToLoad, frame->loader()->outgoingReferrer()))))
10240 + newPage->chrome()->show();
10244 void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
10246 ASSERT(item->type() == ActionType || item->type() == CheckableActionType);
10247 @@ -138,6 +147,9 @@
10248 case ContextMenuItemTagOpenLinkInNewWindow:
10249 openNewWindow(result.absoluteLinkURL(), frame);
10250 break;
10251 + case ContextMenuItemTagOpenLinkInNewTab:
10252 + openNewTab(result.absoluteLinkURL(), frame);
10253 + break;
10254 case ContextMenuItemTagDownloadLinkToDisk:
10255 // FIXME: Some day we should be able to do this from within WebCore.
10256 m_client->downloadURL(result.absoluteLinkURL());
10257 @@ -148,6 +160,9 @@
10258 case ContextMenuItemTagOpenImageInNewWindow:
10259 openNewWindow(result.absoluteImageURL(), frame);
10260 break;
10261 + case ContextMenuItemTagOpenImageInNewTab:
10262 + openNewTab(result.absoluteImageURL(), frame);
10263 + break;
10264 case ContextMenuItemTagDownloadImageToDisk:
10265 // FIXME: Some day we should be able to do this from within WebCore.
10266 m_client->downloadURL(result.absoluteImageURL());
10267 @@ -165,6 +180,14 @@
10268 openNewWindow(loader->url(), frame);
10269 break;
10271 + case ContextMenuItemTagOpenFrameInNewTab: {
10272 + DocumentLoader* loader = frame->loader()->documentLoader();
10273 + if (!loader->unreachableURL().isEmpty())
10274 + openNewTab(loader->unreachableURL(), frame);
10275 + else
10276 + openNewTab(loader->url(), frame);
10277 + break;
10279 case ContextMenuItemTagCopy:
10280 frame->editor()->copy();
10281 break;
10282 diff -ruN OWB-r1097/WebCore/page/EventHandler.cpp OWB-r1097.aros/WebCore/page/EventHandler.cpp
10283 --- OWB-r1097/WebCore/page/EventHandler.cpp 2009-10-02 14:41:19.000000000 +0100
10284 +++ OWB-r1097.aros/WebCore/page/EventHandler.cpp 2018-06-13 07:27:37.570979727 +0100
10285 @@ -1876,7 +1876,7 @@
10286 // Context menu events shouldn't select text in GTK+ applications or in Chromium.
10287 // FIXME: This should probably be configurable by embedders. Consider making it a WebPreferences setting.
10288 // See: https://bugs.webkit.org/show_bug.cgi?id=15279
10289 -#if !PLATFORM(GTK) && !PLATFORM(CHROMIUM)
10290 +#if !PLATFORM(GTK) && !PLATFORM(CHROMIUM) && !PLATFORM(AROS)
10291 if (!m_frame->selection()->contains(viewportPos) &&
10292 // FIXME: In the editable case, word selection sometimes selects content that isn't underneath the mouse.
10293 // If the selection is non-editable, we do word selection to make it easier to use the contextual menu items
10294 diff -ruN OWB-r1097/WebCore/page/Settings.cpp OWB-r1097.aros/WebCore/page/Settings.cpp
10295 --- OWB-r1097/WebCore/page/Settings.cpp 2009-10-12 11:20:21.000000000 +0100
10296 +++ OWB-r1097.aros/WebCore/page/Settings.cpp 2018-06-13 07:27:37.570979727 +0100
10297 @@ -52,6 +52,13 @@
10298 bool Settings::gShouldUseHighResolutionTimers = true;
10299 #endif
10301 +#if PLATFORM(AROS)
10302 +bool Settings::gDecodesBMPWithDatatypes = false;
10303 +bool Settings::gDecodesGIFWithDatatypes = false;
10304 +bool Settings::gDecodesPNGWithDatatypes = false;
10305 +bool Settings::gDecodesJPGWithDatatypes = false;
10306 +#endif
10308 Settings::Settings(Page* page)
10309 : m_page(page)
10310 , m_editableLinkBehavior(EditableLinkDefaultBehavior)
10311 @@ -475,6 +482,28 @@
10313 #endif
10315 +#if PLATFORM(AROS)
10316 +void Settings::setDecodesBMPWithDatatypes(bool decodesBMPWithDatatypes)
10318 + gDecodesBMPWithDatatypes = decodesBMPWithDatatypes;
10321 +void Settings::setDecodesGIFWithDatatypes(bool decodesGIFWithDatatypes)
10323 + gDecodesGIFWithDatatypes = decodesGIFWithDatatypes;
10326 +void Settings::setDecodesPNGWithDatatypes(bool decodesPNGWithDatatypes)
10328 + gDecodesPNGWithDatatypes = decodesPNGWithDatatypes;
10331 +void Settings::setDecodesJPGWithDatatypes(bool decodesJPGWithDatatypes)
10333 + gDecodesJPGWithDatatypes = decodesJPGWithDatatypes;
10335 +#endif
10337 void Settings::setUsesEncodingDetector(bool usesEncodingDetector)
10339 m_usesEncodingDetector = usesEncodingDetector;
10340 diff -ruN OWB-r1097/WebCore/page/Settings.h OWB-r1097.aros/WebCore/page/Settings.h
10341 --- OWB-r1097/WebCore/page/Settings.h 2009-10-12 11:20:21.000000000 +0100
10342 +++ OWB-r1097.aros/WebCore/page/Settings.h 2018-06-13 07:27:37.570979727 +0100
10343 @@ -275,6 +275,19 @@
10344 bool experimentalWebSocketsEnabled() const { return m_experimentalWebSocketsEnabled; }
10345 #endif
10347 +#if PLATFORM(AROS)
10348 + static void setDecodesBMPWithDatatypes(bool);
10349 + static bool decodesBMPWithDatatypes() { return gDecodesBMPWithDatatypes; }
10351 + static void setDecodesGIFWithDatatypes(bool);
10352 + static bool decodesGIFWithDatatypes() { return gDecodesGIFWithDatatypes; }
10354 + static void setDecodesPNGWithDatatypes(bool);
10355 + static bool decodesPNGWithDatatypes() { return gDecodesPNGWithDatatypes; }
10357 + static void setDecodesJPGWithDatatypes(bool);
10358 + static bool decodesJPGWithDatatypes() { return gDecodesJPGWithDatatypes; }
10359 +#endif
10360 private:
10361 Page* m_page;
10363 @@ -354,6 +367,13 @@
10364 #if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
10365 static bool gShouldUseHighResolutionTimers;
10366 #endif
10368 +#if PLATFORM(AROS)
10369 + static bool gDecodesBMPWithDatatypes;
10370 + static bool gDecodesGIFWithDatatypes;
10371 + static bool gDecodesPNGWithDatatypes;
10372 + static bool gDecodesJPGWithDatatypes;
10373 +#endif
10376 } // namespace WebCore
10377 diff -ruN OWB-r1097/WebCore/plugins/CMakeLists.txt OWB-r1097.aros/WebCore/plugins/CMakeLists.txt
10378 --- OWB-r1097/WebCore/plugins/CMakeLists.txt 2009-07-20 16:37:14.000000000 +0100
10379 +++ OWB-r1097.aros/WebCore/plugins/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
10380 @@ -48,6 +48,14 @@
10381 plugins/SDL/PluginViewSDL.cpp
10383 endif(USE_GRAPHICS_SDL)
10385 + if(USE_GRAPHICS_AROS)
10386 + list(APPEND WEBCORE_SRC
10387 + plugins/SDL/PluginPackageSDL.cpp
10388 + plugins/SDL/PluginDataSDL.cpp
10389 + plugins/SDL/PluginViewSDL.cpp
10391 + endif(USE_GRAPHICS_AROS)
10392 else(ENABLE_NPAPI)
10393 list(APPEND WEBCORE_SRC
10394 plugins/PluginDataNone.cpp
10395 diff -ruN OWB-r1097/WebCore/plugins/PluginView.cpp OWB-r1097.aros/WebCore/plugins/PluginView.cpp
10396 --- OWB-r1097/WebCore/plugins/PluginView.cpp 2009-10-16 19:40:05.000000000 +0100
10397 +++ OWB-r1097.aros/WebCore/plugins/PluginView.cpp 2018-06-13 07:27:37.570979727 +0100
10398 @@ -1185,7 +1185,7 @@
10400 static RefPtr<Image> nullPluginImage;
10401 if (!nullPluginImage)
10402 - nullPluginImage = Image::loadPlatformResource("nullPlugin");
10403 + nullPluginImage = Image::loadPlatformResource("/nullPlugin");
10405 IntRect imageRect(frameRect().x(), frameRect().y(), nullPluginImage->width(), nullPluginImage->height());
10407 @@ -1197,8 +1197,10 @@
10408 if (!rect.intersects(imageRect))
10409 return;
10411 + FrameView* frameView = static_cast<FrameView*>(parent());
10413 context->save();
10414 - context->clip(windowClipRect());
10415 + context->clip(frameView->windowToContents(windowClipRect()));
10416 context->drawImage(nullPluginImage.get(), imageRect.location());
10417 context->restore();
10419 diff -ruN OWB-r1097/WebCore/plugins/PluginViewNone.cpp OWB-r1097.aros/WebCore/plugins/PluginViewNone.cpp
10420 --- OWB-r1097/WebCore/plugins/PluginViewNone.cpp 2009-10-05 11:36:03.000000000 +0100
10421 +++ OWB-r1097.aros/WebCore/plugins/PluginViewNone.cpp 2018-06-13 07:27:37.570979727 +0100
10422 @@ -25,6 +25,7 @@
10424 #include "config.h"
10425 #include "PluginView.h"
10426 +#include "FrameView.h"
10428 #include "NotImplemented.h"
10429 #include "PluginPackage.h"
10430 @@ -48,9 +49,9 @@
10431 notImplemented();
10434 -void PluginView::paint(GraphicsContext*, const IntRect&)
10435 +void PluginView::paint(GraphicsContext* context, const IntRect& rect)
10437 - notImplemented();
10438 + paintMissingPluginIcon(context, rect);
10441 void PluginView::handleKeyboardEvent(KeyboardEvent*)
10442 @@ -63,9 +64,9 @@
10443 notImplemented();
10446 -void PluginView::setParent(ScrollView*)
10447 +void PluginView::setParent(ScrollView* parent)
10449 - notImplemented();
10450 + Widget::setParent(parent);
10453 void PluginView::setNPWindowRect(const IntRect&)
10454 @@ -125,7 +126,13 @@
10456 void PluginView::updatePluginWidget()
10458 - notImplemented();
10459 + if (!parent() || !m_isWindowed)
10460 + return;
10462 + ASSERT(parent()->isFrameView());
10464 + FrameView* frameView = static_cast<FrameView*>(parent());
10465 + m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
10468 void PluginView::halt()
10469 diff -ruN OWB-r1097/WebCore/xml/XPathGrammar.y OWB-r1097.aros/WebCore/xml/XPathGrammar.y
10470 --- OWB-r1097/WebCore/xml/XPathGrammar.y 2009-07-17 16:00:45.000000000 +0100
10471 +++ OWB-r1097.aros/WebCore/xml/XPathGrammar.y 2018-06-13 07:27:37.570979727 +0100
10472 @@ -36,6 +36,7 @@
10473 #include "XPathParser.h"
10474 #include "XPathPath.h"
10475 #include "XPathPredicate.h"
10476 +#include "XPathStep.h"
10477 #include "XPathVariableReference.h"
10478 #include <wtf/FastMalloc.h>
10480 @@ -46,8 +47,6 @@
10481 #define YYLTYPE_IS_TRIVIAL 1
10482 #define YYDEBUG 0
10483 #define YYMAXDEPTH 10000
10484 -#define YYPARSE_PARAM parserParameter
10485 -#define PARSER static_cast<Parser*>(parserParameter)
10487 using namespace WebCore;
10488 using namespace XPath;
10489 @@ -55,6 +54,7 @@
10492 %pure_parser
10493 +%parse-param { WebCore::XPath::Parser* parser }
10495 %union
10497 @@ -73,7 +73,7 @@
10500 static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); }
10501 -static void xpathyyerror(const char*) { }
10502 +static void xpathyyerror(void*, const char*) { }
10506 @@ -120,7 +120,7 @@
10507 Expr:
10508 OrExpr
10510 - PARSER->m_topExpr = $1;
10511 + parser->m_topExpr = $1;
10515 @@ -140,7 +140,7 @@
10518 $$ = new LocationPath;
10519 - PARSER->registerParseNode($$);
10520 + parser->registerParseNode($$);
10523 '/' RelativeLocationPath
10524 @@ -152,7 +152,7 @@
10526 $$ = $2;
10527 $$->insertFirstStep($1);
10528 - PARSER->unregisterParseNode($1);
10529 + parser->unregisterParseNode($1);
10533 @@ -161,22 +161,22 @@
10535 $$ = new LocationPath;
10536 $$->appendStep($1);
10537 - PARSER->unregisterParseNode($1);
10538 - PARSER->registerParseNode($$);
10539 + parser->unregisterParseNode($1);
10540 + parser->registerParseNode($$);
10543 RelativeLocationPath '/' Step
10545 $$->appendStep($3);
10546 - PARSER->unregisterParseNode($3);
10547 + parser->unregisterParseNode($3);
10550 RelativeLocationPath DescendantOrSelf Step
10552 $$->appendStep($2);
10553 $$->appendStep($3);
10554 - PARSER->unregisterParseNode($2);
10555 - PARSER->unregisterParseNode($3);
10556 + parser->unregisterParseNode($2);
10557 + parser->unregisterParseNode($3);
10561 @@ -185,58 +185,58 @@
10563 if ($2) {
10564 $$ = new Step(Step::ChildAxis, *$1, *$2);
10565 - PARSER->deletePredicateVector($2);
10566 + parser->deletePredicateVector($2);
10567 } else
10568 $$ = new Step(Step::ChildAxis, *$1);
10569 - PARSER->deleteNodeTest($1);
10570 - PARSER->registerParseNode($$);
10571 + parser->deleteNodeTest($1);
10572 + parser->registerParseNode($$);
10575 NAMETEST OptionalPredicateList
10577 String localName;
10578 String namespaceURI;
10579 - if (!PARSER->expandQName(*$1, localName, namespaceURI)) {
10580 - PARSER->m_gotNamespaceError = true;
10581 + if (!parser->expandQName(*$1, localName, namespaceURI)) {
10582 + parser->m_gotNamespaceError = true;
10583 YYABORT;
10586 if ($2) {
10587 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$2);
10588 - PARSER->deletePredicateVector($2);
10589 + parser->deletePredicateVector($2);
10590 } else
10591 $$ = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI));
10592 - PARSER->deleteString($1);
10593 - PARSER->registerParseNode($$);
10594 + parser->deleteString($1);
10595 + parser->registerParseNode($$);
10598 AxisSpecifier NodeTest OptionalPredicateList
10600 if ($3) {
10601 $$ = new Step($1, *$2, *$3);
10602 - PARSER->deletePredicateVector($3);
10603 + parser->deletePredicateVector($3);
10604 } else
10605 $$ = new Step($1, *$2);
10606 - PARSER->deleteNodeTest($2);
10607 - PARSER->registerParseNode($$);
10608 + parser->deleteNodeTest($2);
10609 + parser->registerParseNode($$);
10612 AxisSpecifier NAMETEST OptionalPredicateList
10614 String localName;
10615 String namespaceURI;
10616 - if (!PARSER->expandQName(*$2, localName, namespaceURI)) {
10617 - PARSER->m_gotNamespaceError = true;
10618 + if (!parser->expandQName(*$2, localName, namespaceURI)) {
10619 + parser->m_gotNamespaceError = true;
10620 YYABORT;
10623 if ($3) {
10624 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI), *$3);
10625 - PARSER->deletePredicateVector($3);
10626 + parser->deletePredicateVector($3);
10627 } else
10628 $$ = new Step($1, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI));
10629 - PARSER->deleteString($2);
10630 - PARSER->registerParseNode($$);
10631 + parser->deleteString($2);
10632 + parser->registerParseNode($$);
10635 AbbreviatedStep
10636 @@ -261,23 +261,23 @@
10637 else if (*$1 == "comment")
10638 $$ = new Step::NodeTest(Step::NodeTest::CommentNodeTest);
10640 - PARSER->deleteString($1);
10641 - PARSER->registerNodeTest($$);
10642 + parser->deleteString($1);
10643 + parser->registerNodeTest($$);
10646 PI '(' ')'
10648 $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest);
10649 - PARSER->deleteString($1);
10650 - PARSER->registerNodeTest($$);
10651 + parser->deleteString($1);
10652 + parser->registerNodeTest($$);
10655 PI '(' LITERAL ')'
10657 $$ = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, $3->stripWhiteSpace());
10658 - PARSER->deleteString($1);
10659 - PARSER->deleteString($3);
10660 - PARSER->registerNodeTest($$);
10661 + parser->deleteString($1);
10662 + parser->deleteString($3);
10663 + parser->registerNodeTest($$);
10667 @@ -295,14 +295,14 @@
10669 $$ = new Vector<Predicate*>;
10670 $$->append(new Predicate($1));
10671 - PARSER->unregisterParseNode($1);
10672 - PARSER->registerPredicateVector($$);
10673 + parser->unregisterParseNode($1);
10674 + parser->registerPredicateVector($$);
10677 PredicateList Predicate
10679 $$->append(new Predicate($2));
10680 - PARSER->unregisterParseNode($2);
10681 + parser->unregisterParseNode($2);
10685 @@ -317,7 +317,7 @@
10686 SLASHSLASH
10688 $$ = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
10689 - PARSER->registerParseNode($$);
10690 + parser->registerParseNode($$);
10694 @@ -325,13 +325,13 @@
10697 $$ = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
10698 - PARSER->registerParseNode($$);
10699 + parser->registerParseNode($$);
10702 DOTDOT
10704 $$ = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest));
10705 - PARSER->registerParseNode($$);
10706 + parser->registerParseNode($$);
10710 @@ -339,8 +339,8 @@
10711 VARIABLEREFERENCE
10713 $$ = new VariableReference(*$1);
10714 - PARSER->deleteString($1);
10715 - PARSER->registerParseNode($$);
10716 + parser->deleteString($1);
10717 + parser->registerParseNode($$);
10720 '(' Expr ')'
10721 @@ -351,15 +351,15 @@
10722 LITERAL
10724 $$ = new StringExpression(*$1);
10725 - PARSER->deleteString($1);
10726 - PARSER->registerParseNode($$);
10727 + parser->deleteString($1);
10728 + parser->registerParseNode($$);
10731 NUMBER
10733 $$ = new Number($1->toDouble());
10734 - PARSER->deleteString($1);
10735 - PARSER->registerParseNode($$);
10736 + parser->deleteString($1);
10737 + parser->registerParseNode($$);
10740 FunctionCall
10741 @@ -371,8 +371,8 @@
10742 $$ = createFunction(*$1);
10743 if (!$$)
10744 YYABORT;
10745 - PARSER->deleteString($1);
10746 - PARSER->registerParseNode($$);
10747 + parser->deleteString($1);
10748 + parser->registerParseNode($$);
10751 FUNCTIONNAME '(' ArgumentList ')'
10752 @@ -380,9 +380,9 @@
10753 $$ = createFunction(*$1, *$3);
10754 if (!$$)
10755 YYABORT;
10756 - PARSER->deleteString($1);
10757 - PARSER->deleteExpressionVector($3);
10758 - PARSER->registerParseNode($$);
10759 + parser->deleteString($1);
10760 + parser->deleteExpressionVector($3);
10761 + parser->registerParseNode($$);
10765 @@ -391,14 +391,14 @@
10767 $$ = new Vector<Expression*>;
10768 $$->append($1);
10769 - PARSER->unregisterParseNode($1);
10770 - PARSER->registerExpressionVector($$);
10771 + parser->unregisterParseNode($1);
10772 + parser->registerExpressionVector($$);
10775 ArgumentList ',' Argument
10777 $$->append($3);
10778 - PARSER->unregisterParseNode($3);
10779 + parser->unregisterParseNode($3);
10783 @@ -414,9 +414,9 @@
10784 $$ = new Union;
10785 $$->addSubExpression($1);
10786 $$->addSubExpression($3);
10787 - PARSER->unregisterParseNode($1);
10788 - PARSER->unregisterParseNode($3);
10789 - PARSER->registerParseNode($$);
10790 + parser->unregisterParseNode($1);
10791 + parser->unregisterParseNode($3);
10792 + parser->registerParseNode($$);
10796 @@ -432,9 +432,9 @@
10798 $3->setAbsolute(true);
10799 $$ = new Path(static_cast<Filter*>($1), $3);
10800 - PARSER->unregisterParseNode($1);
10801 - PARSER->unregisterParseNode($3);
10802 - PARSER->registerParseNode($$);
10803 + parser->unregisterParseNode($1);
10804 + parser->unregisterParseNode($3);
10805 + parser->registerParseNode($$);
10808 FilterExpr DescendantOrSelf RelativeLocationPath
10809 @@ -442,10 +442,10 @@
10810 $3->insertFirstStep($2);
10811 $3->setAbsolute(true);
10812 $$ = new Path(static_cast<Filter*>($1), $3);
10813 - PARSER->unregisterParseNode($1);
10814 - PARSER->unregisterParseNode($2);
10815 - PARSER->unregisterParseNode($3);
10816 - PARSER->registerParseNode($$);
10817 + parser->unregisterParseNode($1);
10818 + parser->unregisterParseNode($2);
10819 + parser->unregisterParseNode($3);
10820 + parser->registerParseNode($$);
10824 @@ -455,9 +455,9 @@
10825 PrimaryExpr PredicateList
10827 $$ = new Filter($1, *$2);
10828 - PARSER->unregisterParseNode($1);
10829 - PARSER->deletePredicateVector($2);
10830 - PARSER->registerParseNode($$);
10831 + parser->unregisterParseNode($1);
10832 + parser->deletePredicateVector($2);
10833 + parser->registerParseNode($$);
10837 @@ -467,9 +467,9 @@
10838 OrExpr OR AndExpr
10840 $$ = new LogicalOp(LogicalOp::OP_Or, $1, $3);
10841 - PARSER->unregisterParseNode($1);
10842 - PARSER->unregisterParseNode($3);
10843 - PARSER->registerParseNode($$);
10844 + parser->unregisterParseNode($1);
10845 + parser->unregisterParseNode($3);
10846 + parser->registerParseNode($$);
10850 @@ -479,9 +479,9 @@
10851 AndExpr AND EqualityExpr
10853 $$ = new LogicalOp(LogicalOp::OP_And, $1, $3);
10854 - PARSER->unregisterParseNode($1);
10855 - PARSER->unregisterParseNode($3);
10856 - PARSER->registerParseNode($$);
10857 + parser->unregisterParseNode($1);
10858 + parser->unregisterParseNode($3);
10859 + parser->registerParseNode($$);
10863 @@ -491,9 +491,9 @@
10864 EqualityExpr EQOP RelationalExpr
10866 $$ = new EqTestOp($2, $1, $3);
10867 - PARSER->unregisterParseNode($1);
10868 - PARSER->unregisterParseNode($3);
10869 - PARSER->registerParseNode($$);
10870 + parser->unregisterParseNode($1);
10871 + parser->unregisterParseNode($3);
10872 + parser->registerParseNode($$);
10876 @@ -503,9 +503,9 @@
10877 RelationalExpr RELOP AdditiveExpr
10879 $$ = new EqTestOp($2, $1, $3);
10880 - PARSER->unregisterParseNode($1);
10881 - PARSER->unregisterParseNode($3);
10882 - PARSER->registerParseNode($$);
10883 + parser->unregisterParseNode($1);
10884 + parser->unregisterParseNode($3);
10885 + parser->registerParseNode($$);
10889 @@ -515,17 +515,17 @@
10890 AdditiveExpr PLUS MultiplicativeExpr
10892 $$ = new NumericOp(NumericOp::OP_Add, $1, $3);
10893 - PARSER->unregisterParseNode($1);
10894 - PARSER->unregisterParseNode($3);
10895 - PARSER->registerParseNode($$);
10896 + parser->unregisterParseNode($1);
10897 + parser->unregisterParseNode($3);
10898 + parser->registerParseNode($$);
10901 AdditiveExpr MINUS MultiplicativeExpr
10903 $$ = new NumericOp(NumericOp::OP_Sub, $1, $3);
10904 - PARSER->unregisterParseNode($1);
10905 - PARSER->unregisterParseNode($3);
10906 - PARSER->registerParseNode($$);
10907 + parser->unregisterParseNode($1);
10908 + parser->unregisterParseNode($3);
10909 + parser->registerParseNode($$);
10913 @@ -535,9 +535,9 @@
10914 MultiplicativeExpr MULOP UnaryExpr
10916 $$ = new NumericOp($2, $1, $3);
10917 - PARSER->unregisterParseNode($1);
10918 - PARSER->unregisterParseNode($3);
10919 - PARSER->registerParseNode($$);
10920 + parser->unregisterParseNode($1);
10921 + parser->unregisterParseNode($3);
10922 + parser->registerParseNode($$);
10926 @@ -548,8 +548,8 @@
10928 $$ = new Negative;
10929 $$->addSubExpression($2);
10930 - PARSER->unregisterParseNode($2);
10931 - PARSER->registerParseNode($$);
10932 + parser->unregisterParseNode($2);
10933 + parser->registerParseNode($$);
10937 diff -ruN OWB-r1097/WebCore/xml/XPathParser.cpp OWB-r1097.aros/WebCore/xml/XPathParser.cpp
10938 --- OWB-r1097/WebCore/xml/XPathParser.cpp 2008-12-10 09:32:50.000000000 +0000
10939 +++ OWB-r1097.aros/WebCore/xml/XPathParser.cpp 2018-06-13 07:27:37.570979727 +0100
10940 @@ -35,20 +35,17 @@
10941 #include "XPathEvaluator.h"
10942 #include "XPathException.h"
10943 #include "XPathNSResolver.h"
10944 +#include "XPathPath.h"
10945 #include "XPathStep.h"
10946 #include <wtf/StdLibExtras.h>
10948 -int xpathyyparse(void*);
10950 +using namespace WebCore;
10951 using namespace WTF;
10952 using namespace Unicode;
10953 +using namespace XPath;
10955 -namespace WebCore {
10956 -namespace XPath {
10958 -class LocationPath;
10960 -#include "XPathGrammar.h"
10961 +extern int xpathyyparse(WebCore::XPath::Parser*);
10962 +#include "XPathGrammar.h"
10964 Parser* Parser::currentParser = 0;
10966 @@ -476,6 +473,7 @@
10967 Parser* oldParser = currentParser;
10968 currentParser = this;
10969 int parseError = xpathyyparse(this);
10971 currentParser = oldParser;
10973 if (parseError) {
10974 @@ -630,7 +628,4 @@
10975 delete t;
10981 #endif // ENABLE(XPATH)
10982 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.cpp
10983 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.cpp 1970-01-01 01:00:00.000000000 +0100
10984 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.cpp 2018-06-13 07:27:37.570979727 +0100
10985 @@ -0,0 +1,106 @@
10986 +#include <wtf/OwnPtr.h>
10987 +#include "WebDownload.h"
10988 +#include "WebURLResponse.h"
10989 +#include "DownloadDelegateAROS.h"
10990 +#include "CString.h"
10992 +extern "C" {
10993 +#include <proto/intuition.h>
10994 +#include <proto/alib.h>
10997 +#include <aros/debug.h>
10999 +DownloadDelegateAROS::DownloadDelegateAROS()
11003 +DownloadDelegateAROS::~DownloadDelegateAROS()
11005 + D(bug("DownloadDelegateAROS::~DownloadDelegateAROS\n"));
11008 +void DownloadDelegateAROS::decideDestinationWithSuggestedFilename(WebDownload *download, const char* fileName)
11010 + D(bug("DownloadDelegateAROS::decideDestinationWithSuggestedFilename(%s)\n", fileName));
11012 + if(fileName)
11014 + if(delegate)
11015 + DoMethod(delegate, MUIM_DownloadDelegate_DecideDestinationWithSuggestedFilename, download, fileName);
11016 + else
11018 + char destination[1024];
11019 + snprintf(destination, sizeof(destination), "T:%s", fileName);
11020 + download->setDestination(destination, true);
11025 +void DownloadDelegateAROS::didCancelAuthenticationChallenge(WebDownload* download, WebURLAuthenticationChallenge* challenge)
11027 + D(bug("DownloadDelegateAROS %p - didCancelAuthenticationChallenge %p\n", download, challenge));
11030 +void DownloadDelegateAROS::didCreateDestination(WebDownload* download, const char *destination)
11032 + D(bug("DownloadDelegateAROS %p - didCreateDestination %s\n", download, destination));
11035 +void DownloadDelegateAROS::didReceiveAuthenticationChallenge(WebDownload* download, WebURLAuthenticationChallenge* challenge)
11037 + D(bug("DownloadDelegateAROS %p - didReceiveAuthenticationChallenge %p\n", download, challenge));
11040 +void DownloadDelegateAROS::didReceiveDataOfLength(WebDownload* download, unsigned length)
11042 + D(bug("DownloadDelegateAROS %p - didReceiveDataOfLength %p %d\n", download, length));
11043 + if(delegate)
11044 + DoMethod(delegate, MUIM_DownloadDelegate_DidReceiveDataOfLength, download, length);
11047 +void DownloadDelegateAROS::didReceiveResponse(WebDownload* download, WebURLResponse* response)
11049 + D(bug("DownloadDelegateAROS %p - didReceiveResponse %p\n", download, response));
11051 + if(delegate)
11052 + DoMethod(delegate, MUIM_DownloadDelegate_DidReceiveExpectedContentLength, download, response->expectedContentLength());
11055 +void DownloadDelegateAROS::willResumeWithResponse(WebDownload* download, WebURLResponse* response, long long fromByte)
11057 + D(bug("DownloadDelegateAROS %p - willResumeWithResponse %p, %q\n", download, response, fromByte));
11060 +WebMutableURLRequest* DownloadDelegateAROS::willSendRequest(WebDownload* download, WebMutableURLRequest* request, WebURLResponse* redirectResponse)
11062 + D(bug("DownloadDelegateAROS %p - willSendRequest %p %p\n", download, request, redirectResponse));
11063 + return request;
11066 +bool DownloadDelegateAROS::shouldDecodeSourceDataOfMIMEType(WebDownload*, const char*)
11068 + return false;
11071 +void DownloadDelegateAROS::didBegin(WebDownload* download)
11073 + D(bug("DownloadDelegateAROS %p - didBegin\n", download));
11074 + registerDownload(download);
11075 + if(delegate)
11076 + DoMethod(delegate, MUIM_DownloadDelegate_DidBeginDownload, download);
11079 +void DownloadDelegateAROS::didFinish(WebDownload* download)
11081 + if(delegate)
11082 + DoMethod(delegate, MUIM_DownloadDelegate_DidFinishDownload, download);
11083 + D(bug("DownloadDelegateAROS %p - didFinish\n", download));
11084 + unregisterDownload(download);
11087 +void DownloadDelegateAROS::didFailWithError(WebDownload* download, WebError* error)
11089 + if(delegate)
11090 + DoMethod(delegate, MUIM_DownloadDelegate_DidFailWithError, download);
11092 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.h
11093 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.h 1970-01-01 01:00:00.000000000 +0100
11094 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateAROS.h 2018-06-13 07:27:37.570979727 +0100
11095 @@ -0,0 +1,41 @@
11096 +#ifndef _DOWNLOADDELEGATEAROS_H
11097 +#define _DOWNLOADDELEGATEAROS_H
11099 +#include "WebDownloadDelegate.h"
11100 +#include "DownloadDelegateZune.h"
11102 +class DownloadDelegateAROS : public WebDownloadDelegate
11104 +public:
11105 + static DownloadDelegateAROS* createInstance()
11107 + static DownloadDelegateAROS *instance = NULL;
11108 + if(!instance)
11109 + instance = new DownloadDelegateAROS();
11110 + return instance;
11112 + void setDownloadDelegateZune(Object *delegate)
11114 + this->delegate = delegate;
11116 + ~DownloadDelegateAROS();
11117 +private:
11118 + DownloadDelegateAROS();
11119 + Object *delegate; /* Zune proxy object */
11120 + void decideDestinationWithSuggestedFilename(WebDownload *download, const char* filename);
11121 + void didCancelAuthenticationChallenge(WebDownload* download, WebURLAuthenticationChallenge* challenge);
11122 + void didCreateDestination(WebDownload* download, const char* destination);
11123 + void didReceiveAuthenticationChallenge(WebDownload* download, WebURLAuthenticationChallenge* challenge);
11124 + void didReceiveDataOfLength(WebDownload* download, unsigned length);
11125 + void didReceiveResponse(WebDownload* download, WebURLResponse* response);
11126 + void didReceiveExpectedContentLength(WebDownload* download, long long contentLength);
11127 + void willResumeWithResponse(WebDownload* download, WebURLResponse* response, long long fromByte);
11128 + WebMutableURLRequest* willSendRequest(WebDownload* download, WebMutableURLRequest* request, WebURLResponse* redirectResponse);
11129 + bool shouldDecodeSourceDataOfMIMEType(WebDownload*, const char*);
11130 + void didBegin(WebDownload* download);
11131 + void didFinish(WebDownload* download);
11132 + void didFailWithError(WebDownload* download, WebError* error);
11133 + void didCreateDownload(WebDownload* download);
11136 +#endif
11137 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.cpp
11138 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.cpp 1970-01-01 01:00:00.000000000 +0100
11139 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.cpp 2018-06-13 07:27:37.570979727 +0100
11140 @@ -0,0 +1,75 @@
11141 +#include "WebDownload.h"
11143 +#include "DownloadDelegateAROS.h"
11144 +#include "DownloadDelegateZune.h"
11145 +#include "DownloadDelegateZune_private.h"
11147 +extern "C" {
11148 +#include <proto/muimaster.h>
11149 +#include <libraries/mui.h>
11150 +#include <proto/intuition.h>
11151 +#include <proto/alib.h>
11152 +#include <aros/debug.h>
11153 +#include <aros/symbolsets.h>
11154 +#include <zune/customclasses.h>
11157 +#include <cstring>
11159 +/*** Methods ****************************************************************/
11160 +Object *DownloadDelegate__OM_NEW
11162 + Class *CLASS, Object *self, struct opSet *message
11165 + D(bug("DownloadDelegate__OM_NEW\n"));
11167 + self = (Object *) DoSuperNewTags
11169 + CLASS, self, NULL,
11170 + TAG_MORE, (IPTR) message->ops_AttrList
11171 + );
11173 + if (self == NULL)
11174 + return NULL;
11176 + DownloadDelegateAROS *delegate = DownloadDelegateAROS::createInstance();
11177 + delegate->setDownloadDelegateZune(self);
11179 + return self;
11182 +IPTR DownloadDelegate__OM_DISPOSE(struct IClass *cl, Object *obj, Msg msg)
11184 + D(bug("DownloadDelegate__OM_DISPOSE\n"));
11185 + DownloadDelegateAROS *delegate = DownloadDelegateAROS::createInstance();
11186 + delegate->setDownloadDelegateZune(NULL);
11187 + delete delegate;
11189 + return DoSuperMethodA(cl,obj,msg);
11192 +IPTR DownloadDelegate__MUIM_DownloadDelegate_CancelDownload(Class *CLASS, Object *obj, struct MUIP_DownloadDelegate_CancelDownload *msg)
11194 + WebDownload *download = (WebDownload*) msg->download;
11195 + download->cancel();
11196 + return 0;
11199 +IPTR DownloadDelegate__MUIM_DownloadDelegate_SetDestination(Class *CLASS, Object *obj, struct MUIP_DownloadDelegate_SetDestination *msg)
11201 + WebDownload *download = (WebDownload*) msg->download;
11202 + D(bug("MUIM_DownloadDelegate_SetDestination(%s)\n", msg->destination));
11203 + download->setDestination(msg->destination, true);
11204 + return 0;
11207 +/*** Setup ******************************************************************/
11208 +ZUNE_CUSTOMCLASS_4
11210 + DownloadDelegate, NULL, MUIC_Window, NULL,
11211 + OM_NEW, struct opSet*,
11212 + OM_DISPOSE, Msg,
11213 + MUIM_DownloadDelegate_CancelDownload, struct MUIP_DownloadDelegate_CancelDownload*,
11214 + MUIM_DownloadDelegate_SetDestination, struct MUIP_DownloadDelegate_SetDestination*
11216 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.h
11217 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.h 1970-01-01 01:00:00.000000000 +0100
11218 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune.h 2018-06-13 07:27:37.570979727 +0100
11219 @@ -0,0 +1,37 @@
11220 +#ifndef _DOWNLOADDELEGATEZUNE_H
11221 +#define _DOWNLOADDELEGATEZUNE_H
11223 +#include <libraries/mui.h>
11225 +/*** Identifier base ********************************************************/
11226 +#define MUIB_DownloadDelegate (TAG_USER | 0x10000000)
11228 +/*** Public Methods *********************************************************/
11229 +#define MUIM_DownloadDelegate_DidCreateDownload (MUIB_DownloadDelegate|0x00000000)
11230 +struct MUIP_DownloadDelegate_DidCreateDownload {STACKED ULONG MethodID; STACKED void *download;};
11231 +#define MUIM_DownloadDelegate_DidDestroyDownload (MUIB_DownloadDelegate|0x00000001)
11232 +struct MUIP_DownloadDelegate_DidDestroyDownload {STACKED ULONG MethodID; STACKED void *download;};
11233 +#define MUIM_DownloadDelegate_DidBeginDownload (MUIB_DownloadDelegate|0x00000002)
11234 +struct MUIP_DownloadDelegate_DidBeginDownload {STACKED ULONG MethodID; STACKED void *download;};
11235 +#define MUIM_DownloadDelegate_DidFinishDownload (MUIB_DownloadDelegate|0x00000003)
11236 +struct MUIP_DownloadDelegate_DidFinishDownload {STACKED ULONG MethodID; STACKED void *download;};
11237 +#define MUIM_DownloadDelegate_DidReceiveExpectedContentLength (MUIB_DownloadDelegate|0x00000004)
11238 +struct MUIP_DownloadDelegate_DidReceiveExpectedContentLength {STACKED ULONG MethodID; STACKED void *download; STACKED long long length;};
11239 +#define MUIM_DownloadDelegate_DidReceiveDataOfLength (MUIB_DownloadDelegate|0x00000005)
11240 +struct MUIP_DownloadDelegate_DidReceiveDataOfLength {STACKED ULONG MethodID; STACKED void *download; ; STACKED unsigned length;};
11241 +#define MUIM_DownloadDelegate_DecideDestinationWithSuggestedFilename (MUIB_DownloadDelegate|0x00000006)
11242 +struct MUIP_DownloadDelegate_DecideDestinationWithSuggestedFilename {STACKED ULONG MethodID; STACKED void *download; STACKED char *filename;};
11243 +#define MUIM_DownloadDelegate_CancelDownload (MUIB_DownloadDelegate|0x00000007)
11244 +struct MUIP_DownloadDelegate_CancelDownload {STACKED ULONG MethodID; STACKED void *download;};
11245 +#define MUIM_DownloadDelegate_SetDestination (MUIB_DownloadDelegate|0x00000008)
11246 +struct MUIP_DownloadDelegate_SetDestination {STACKED ULONG MethodID; STACKED void *download; STACKED char *destination;};
11247 +#define MUIM_DownloadDelegate_DidFailWithError (MUIB_DownloadDelegate|0x00000009)
11248 +struct MUIP_DownloadDelegate_DidFailWithError {STACKED ULONG MethodID; STACKED void *download;};
11250 +/*** Variables **************************************************************/
11251 +extern struct MUI_CustomClass *DownloadDelegate_CLASS;
11253 +/*** Macros *****************************************************************/
11254 +#define DownloadDelegateObject BOOPSIOBJMACRO_START(DownloadDelegate_CLASS->mcc_Class)
11256 +#endif
11257 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune_private.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune_private.h
11258 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune_private.h 1970-01-01 01:00:00.000000000 +0100
11259 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/DownloadDelegateZune_private.h 2018-06-13 07:27:37.570979727 +0100
11260 @@ -0,0 +1,6 @@
11261 +#ifndef _DOWNLOADDELEGATEZUNE_PRIVATE_H
11262 +#define _DOWNLOADDELEGATEZUNE_PRIVATE_H
11264 +struct DownloadDelegate_DATA {};
11266 +#endif
11267 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.cpp
11268 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.cpp 1970-01-01 01:00:00.000000000 +0100
11269 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.cpp 2018-06-13 07:27:37.570979727 +0100
11270 @@ -0,0 +1,139 @@
11272 + * Copyright (C) 2008 Pleyo. All rights reserved.
11273 + * Copyright (C) 2009 Stanislaw Szymczyk
11275 + * Redistribution and use in source and binary forms, with or without
11276 + * modification, are permitted provided that the following conditions
11277 + * are met:
11279 + * 1. Redistributions of source code must retain the above copyright
11280 + * notice, this list of conditions and the following disclaimer.
11281 + * 2. Redistributions in binary form must reproduce the above copyright
11282 + * notice, this list of conditions and the following disclaimer in the
11283 + * documentation and/or other materials provided with the distribution.
11284 + * 3. Neither the name of Pleyo nor the names of
11285 + * its contributors may be used to endorse or promote products derived
11286 + * from this software without specific prior written permission.
11288 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
11289 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
11290 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
11291 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
11292 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11293 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11294 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
11295 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11296 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
11297 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11298 + */
11300 +#include "config.h"
11301 +#include "PolicyDelegateAROS.h"
11302 +#include "WebActionPropertyBag.h"
11303 +#include "WebFramePolicyListener.h"
11304 +#include "WebError.h"
11305 +#include "WebFrame.h"
11306 +#include "WebView.h"
11307 +#include "WebMutableURLRequest.h"
11309 +#include <PlatformString.h>
11310 +#include "CString.h"
11311 +#include <sys/types.h>
11312 +#include <sys/stat.h>
11313 +#include <unistd.h>
11315 +#if PLATFORM(AROS)
11316 +extern "C" {
11317 +#include <proto/intuition.h>
11318 +#include <proto/alib.h>
11319 +#include "WebViewZune.h"
11320 +#include <aros/debug.h>
11322 +#endif
11324 +using namespace WebCore;
11326 +PolicyDelegateAROS* PolicyDelegateAROS::sharedInstance()
11328 + static PolicyDelegateAROS shared = *PolicyDelegateAROS::createInstance();
11329 + return &shared;
11332 +PolicyDelegateAROS* PolicyDelegateAROS::createInstance()
11334 + PolicyDelegateAROS* instance = new PolicyDelegateAROS();
11335 + return instance;
11338 +void PolicyDelegateAROS::decidePolicyForMIMEType(
11339 + /*[in]*/ WebView* webView,
11340 + /*[in]*/ const char* type,
11341 + /*[in]*/ WebMutableURLRequest* request,
11342 + /*[in]*/ WebFrame* /*frame*/,
11343 + /*[in]*/ WebFramePolicyListener* listener)
11345 + bool canShowMIMEType = webView->canShowMIMEType(type);
11347 + if (!canShowMIMEType && type && 0 == strlen(type))
11348 + canShowMIMEType = true;
11350 + String url = request->URL();
11352 + if (url.startsWith("file:")) {
11353 + bool isDirectory = false;
11354 + struct stat st;
11355 + String path = request->resourceRequest().url().path();
11356 + if (path.startsWith("/"))
11357 + path = path.substring(1);
11358 + if (stat(path.utf8().data(), &st))
11359 + isDirectory = S_ISDIR(st.st_mode);
11361 + if (isDirectory)
11362 + listener->ignore();
11363 + else if(canShowMIMEType)
11364 + listener->use();
11365 + else
11367 + BalWidget* viewWindow = webView->viewWindow();
11368 + if(viewWindow)
11370 + String fileName = request->URL().substring(request->resourceRequest().url().pathAfterLastSlash());
11371 + switch(DoMethod(viewWindow, MUIM_WebView_RequestPolicy, fileName.utf8().data(), type))
11373 + default:
11374 + case MUIV_WebView_Policy_Ignore:
11375 + listener->ignore();
11376 + break;
11377 + case MUIV_WebView_Policy_Use:
11378 + listener->use();
11379 + break;
11380 + case MUIV_WebView_Policy_Download:
11381 + listener->download();
11382 + break;
11386 + } else if (canShowMIMEType)
11387 + listener->use();
11388 + else
11390 + BalWidget* viewWindow = webView->viewWindow();
11391 + if(viewWindow)
11393 + String fileName = request->URL().substring(request->resourceRequest().url().pathAfterLastSlash());
11394 + switch(DoMethod(viewWindow, MUIM_WebView_RequestPolicy, fileName.utf8().data(), type))
11396 + default:
11397 + case MUIV_WebView_Policy_Ignore:
11398 + listener->ignore();
11399 + break;
11400 + case MUIV_WebView_Policy_Use:
11401 + listener->use();
11402 + break;
11403 + case MUIV_WebView_Policy_Download:
11404 + listener->download();
11405 + break;
11410 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.h
11411 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.h 1970-01-01 01:00:00.000000000 +0100
11412 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/PolicyDelegateAROS.h 2018-06-13 07:27:37.570979727 +0100
11413 @@ -0,0 +1,87 @@
11415 + * Copyright (C) 2008 Pleyo. All rights reserved.
11416 + * Copyright (C) 2009 Stanislaw Szymczyk
11418 + * Redistribution and use in source and binary forms, with or without
11419 + * modification, are permitted provided that the following conditions
11420 + * are met:
11422 + * 1. Redistributions of source code must retain the above copyright
11423 + * notice, this list of conditions and the following disclaimer.
11424 + * 2. Redistributions in binary form must reproduce the above copyright
11425 + * notice, this list of conditions and the following disclaimer in the
11426 + * documentation and/or other materials provided with the distribution.
11427 + * 3. Neither the name of Pleyo nor the names of
11428 + * its contributors may be used to endorse or promote products derived
11429 + * from this software without specific prior written permission.
11431 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
11432 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
11433 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
11434 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
11435 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11436 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11437 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
11438 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11439 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
11440 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11441 + */
11443 +#ifndef PolicyDelegateAROS_h
11444 +#define PolicyDelegateAROS_h
11446 +#include "DefaultPolicyDelegate.h"
11448 +class PolicyDelegateAROS : public DefaultPolicyDelegate {
11449 +public:
11451 + /**
11452 + * get shared instance
11453 + * @param[out]: PolicyDelegateAROS
11454 + * @code
11455 + * PolicyDelegateAROS *d = PolicyDelegateAROS::sharedInstance();
11456 + * @endcode
11457 + */
11458 + static PolicyDelegateAROS* sharedInstance();
11460 + /**
11461 + * create new instance of PolicyDelegateAROS
11462 + * @param[out]: PolicyDelegateAROS
11463 + * @code
11464 + * PolicyDelegateAROS *d = PolicyDelegateAROS::createInstance();
11465 + * @endcode
11466 + */
11467 + static PolicyDelegateAROS* createInstance();
11468 +private:
11470 + /**
11471 + * PolicyDelegateAROS default constructor
11472 + */
11473 + PolicyDelegateAROS() { };
11474 +public:
11476 + /**
11477 + * PolicyDelegateAROS destructor
11478 + */
11479 + virtual ~PolicyDelegateAROS() { };
11481 + /**
11482 + * decide policy for MIMEType
11483 + * @param[in]: WebView
11484 + * @param[in]: type
11485 + * @param[in]: WebMutableURLRequest
11486 + * @param[in]: WebFrame
11487 + * @param[in]: WebFramePolicyListener
11488 + * @code
11489 + * d->decidePolicyForMIMEType(webView, type, request, frame, listener);
11490 + * @endcode
11491 + */
11492 + virtual void decidePolicyForMIMEType(
11493 + /* [in] */ WebView *webView,
11494 + /* [in] */ const char* type,
11495 + /* [in] */ WebMutableURLRequest *request,
11496 + /* [in] */ WebFrame *frame,
11497 + /* [in] */ WebFramePolicyListener *listener);
11500 +#endif // PolicyDelegateAROS_h
11501 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.cpp
11502 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.cpp 1970-01-01 01:00:00.000000000 +0100
11503 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.cpp 2018-06-13 07:27:37.570979727 +0100
11504 @@ -0,0 +1,363 @@
11505 +#include "config.h"
11506 +#include "Settings.h"
11507 +#include "WebPreferences.h"
11508 +#include "ResourceHandleManager.h"
11510 +#include "WebPreferencesZune.h"
11511 +#include "WebPreferencesZune_private.h"
11513 +#include "PlatformString.h"
11514 +#include "CString.h"
11516 +extern "C" {
11517 +#include <proto/muimaster.h>
11518 +#include <libraries/mui.h>
11519 +#include <proto/intuition.h>
11520 +#include <proto/alib.h>
11521 +#include <proto/utility.h>
11522 +#include <aros/debug.h>
11523 +#include <aros/symbolsets.h>
11524 +#include <zune/customclasses.h>
11527 +#include <cstring>
11529 +/*** Methods ****************************************************************/
11530 +Object *WebPreferences__OM_NEW(Class *CLASS, Object *self, struct opSet *message)
11532 + struct WebPreferences_DATA *data;
11533 + D(bug("WebPreferences__OM_NEW\n"));
11535 + self = (Object *) DoSuperNewTags
11537 + CLASS, self, NULL,
11538 + TAG_MORE, (IPTR) message->ops_AttrList
11539 + );
11541 + if (self == NULL)
11542 + return NULL;
11544 + data = (struct WebPreferences_DATA *) INST_DATA(CLASS, self);
11545 + data->preferences = WebPreferences::sharedStandardPreferences();
11546 + data->cookieJarFileName = NULL;
11548 + /* Click Close window with close gadget */
11549 + DoMethod(self, MUIM_Notify, MUIA_Window_CloseRequest, (IPTR) TRUE,
11550 + (IPTR) self, (IPTR) 3,
11551 + MUIM_Set, MUIA_Window_Open, (IPTR) FALSE);
11553 + return self;
11556 +IPTR WebPreferences__OM_DISPOSE(struct IClass *cl, Object *obj, Msg msg)
11558 + struct WebPreferences_DATA *data = (struct WebPreferences_DATA *) INST_DATA(cl, obj);
11559 + if(data->cookieJarFileName)
11560 + FreeVec((APTR) data->cookieJarFileName);
11561 + return DoSuperMethodA(cl,obj,msg);
11564 +IPTR WebPreferences__OM_SET(Class *cl, Object *obj, struct opSet *msg)
11566 + struct WebPreferences_DATA *data = (struct WebPreferences_DATA *) INST_DATA(cl, obj);
11567 + struct TagItem *tags = msg->ops_AttrList;
11568 + struct TagItem *tag;
11570 + while ((tag = NextTagItem(&tags)) != NULL)
11572 + switch(tag->ti_Tag)
11574 + case MUIA_WebPreferences_StandardFontFamily:
11575 + data->preferences->setStandardFontFamily((const char *)tag->ti_Data);
11576 + break;
11577 + case MUIA_WebPreferences_FixedFontFamily:
11578 + data->preferences->setFixedFontFamily((const char *)tag->ti_Data);
11579 + break;
11580 + case MUIA_WebPreferences_SerifFontFamily:
11581 + data->preferences->setSerifFontFamily((const char *)tag->ti_Data);
11582 + break;
11583 + case MUIA_WebPreferences_SansSerifFontFamily:
11584 + data->preferences->setSansSerifFontFamily((const char *)tag->ti_Data);
11585 + break;
11586 + case MUIA_WebPreferences_CursiveFontFamily:
11587 + data->preferences->setCursiveFontFamily((const char *)tag->ti_Data);
11588 + break;
11589 + case MUIA_WebPreferences_FantasyFontFamily:
11590 + data->preferences->setFantasyFontFamily((const char *)tag->ti_Data);
11591 + break;
11592 + case MUIA_WebPreferences_DefaultFontSize:
11593 + data->preferences->setDefaultFontSize((int) tag->ti_Data);
11594 + break;
11595 + case MUIA_WebPreferences_DefaultFixedFontSize:
11596 + data->preferences->setDefaultFixedFontSize((int) tag->ti_Data);
11597 + break;
11598 + case MUIA_WebPreferences_MinimumFontSize:
11599 + data->preferences->setMinimumFontSize((int) tag->ti_Data);
11600 + break;
11601 + case MUIA_WebPreferences_MinimumLogicalFontSize:
11602 + data->preferences->setMinimumLogicalFontSize((int) tag->ti_Data);
11603 + break;
11604 + case MUIA_WebPreferences_DefaultTextEncodingName:
11605 + data->preferences->setDefaultTextEncodingName((const char *)tag->ti_Data);
11606 + break;
11607 + case MUIA_WebPreferences_UserStyleSheetEnabled:
11608 + data->preferences->setUserStyleSheetEnabled((bool) tag->ti_Data);
11609 + break;
11610 + case MUIA_WebPreferences_UserStyleSheetLocation:
11611 + data->preferences->setUserStyleSheetLocation((const char *)tag->ti_Data);
11612 + break;
11613 + case MUIA_WebPreferences_JavaEnabled:
11614 + data->preferences->setJavaEnabled((bool) tag->ti_Data);
11615 + break;
11616 + case MUIA_WebPreferences_JavaScriptEnabled:
11617 + data->preferences->setJavaScriptEnabled((bool) tag->ti_Data);
11618 + break;
11619 + case MUIA_WebPreferences_JavaScriptCanOpenWindowsAutomatically:
11620 + data->preferences->setJavaScriptCanOpenWindowsAutomatically((bool) tag->ti_Data);
11621 + break;
11622 + case MUIA_WebPreferences_PlugInsEnabled:
11623 + data->preferences->setPlugInsEnabled((bool) tag->ti_Data);
11624 + break;
11625 + case MUIA_WebPreferences_AllowsAnimatedImages:
11626 + data->preferences->setAllowsAnimatedImages((bool) tag->ti_Data);
11627 + break;
11628 + case MUIA_WebPreferences_AllowAnimatedImageLooping:
11629 + data->preferences->setAllowAnimatedImageLooping((bool) tag->ti_Data);
11630 + break;
11631 + case MUIA_WebPreferences_LoadsImagesAutomatically:
11632 + data->preferences->setLoadsImagesAutomatically((bool) tag->ti_Data);
11633 + break;
11634 + case MUIA_WebPreferences_Autosaves:
11635 + data->preferences->setAutosaves((bool) tag->ti_Data);
11636 + break;
11637 + case MUIA_WebPreferences_ShouldPrintBackgrounds:
11638 + data->preferences->setShouldPrintBackgrounds((bool) tag->ti_Data);
11639 + break;
11640 + case MUIA_WebPreferences_PrivateBrowsingEnabled:
11641 + data->preferences->setPrivateBrowsingEnabled((bool) tag->ti_Data);
11642 + break;
11643 + case MUIA_WebPreferences_TabsToLinks:
11644 + data->preferences->setTabsToLinks((bool) tag->ti_Data);
11645 + break;
11646 + case MUIA_WebPreferences_UsesPageCache:
11647 + data->preferences->setUsesPageCache((bool) tag->ti_Data);
11648 + break;
11649 + case MUIA_WebPreferences_TextAreasAreResizable:
11650 + data->preferences->setTextAreasAreResizable((bool) tag->ti_Data);
11651 + break;
11652 + case MUIA_WebPreferences_HistoryItemLimit:
11653 + data->preferences->setHistoryItemLimit((int) tag->ti_Data);
11654 + break;
11655 + case MUIA_WebPreferences_HistoryAgeInDaysLimit:
11656 + data->preferences->setHistoryAgeInDaysLimit((int) tag->ti_Data);
11657 + break;
11658 + case MUIA_WebPreferences_IconDatabaseLocation:
11659 + data->preferences->setIconDatabaseLocation((const char *)tag->ti_Data);
11660 + break;
11661 + case MUIA_WebPreferences_IconDatabaseEnabled:
11662 + data->preferences->setIconDatabaseEnabled((bool) tag->ti_Data);
11663 + break;
11664 + case MUIA_WebPreferences_FontSmoothing:
11665 + switch(tag->ti_Data)
11667 + case MUIV_WebPreferences_FontSmoothingTypeStandard:
11668 + data->preferences->setFontSmoothing(FontSmoothingTypeStandard);
11669 + break;
11670 + case MUIV_WebPreferences_FontSmoothingTypeLight:
11671 + data->preferences->setFontSmoothing(FontSmoothingTypeLight);
11672 + break;
11673 + case MUIV_WebPreferences_FontSmoothingTypeMedium:
11674 + data->preferences->setFontSmoothing(FontSmoothingTypeMedium);
11675 + break;
11676 + case MUIV_WebPreferences_FontSmoothingTypeStrong:
11677 + data->preferences->setFontSmoothing(FontSmoothingTypeStrong);
11678 + break;
11679 + case MUIV_WebPreferences_FontSmoothingTypeWindows:
11680 + data->preferences->setFontSmoothing(FontSmoothingTypeWindows);
11681 + break;
11683 + break;
11684 + case MUIA_WebPreferences_DecodesBMPWithDatatypes:
11685 + WebCore::Settings::setDecodesBMPWithDatatypes((bool) tag->ti_Data);
11686 + break;
11687 + case MUIA_WebPreferences_DecodesPNGWithDatatypes:
11688 + WebCore::Settings::setDecodesPNGWithDatatypes((bool) tag->ti_Data);
11689 + break;
11690 + case MUIA_WebPreferences_DecodesGIFWithDatatypes:
11691 + WebCore::Settings::setDecodesGIFWithDatatypes((bool) tag->ti_Data);
11692 + break;
11693 + case MUIA_WebPreferences_DecodesJPGWithDatatypes:
11694 + WebCore::Settings::setDecodesJPGWithDatatypes((bool) tag->ti_Data);
11695 + break;
11696 + case MUIA_WebPreferences_CookieJarFileName:
11697 + WebCore::ResourceHandleManager::sharedInstance()->setCookieJarFileName((const char *)tag->ti_Data);
11698 + if(data->cookieJarFileName)
11699 + FreeVec((APTR) data->cookieJarFileName);
11700 + data->cookieJarFileName = StrDup((CONST_STRPTR)tag->ti_Data);
11701 + break;
11702 + } /* switch(tag->ti_Tag) */
11704 + } /* while ((tag = NextTagItem(&tags)) != NULL) */
11706 + return DoSuperMethodA(cl, obj, (Msg)msg);
11709 +IPTR WebPreferences__OM_GET(Class *cl, Object *obj, struct opGet *msg)
11711 + struct WebPreferences_DATA *data = (struct WebPreferences_DATA *) INST_DATA(cl, obj);
11712 + IPTR retval = TRUE;
11713 + static WebCore::CString tmpString; /* Ugly static buffer */
11715 + switch(msg->opg_AttrID)
11717 + case MUIA_WebPreferences_StandardFontFamily:
11718 + tmpString = data->preferences->standardFontFamily().latin1();
11719 + *(const char **)msg->opg_Storage = tmpString.data();
11720 + break;
11721 + case MUIA_WebPreferences_FixedFontFamily:
11722 + tmpString = data->preferences->fixedFontFamily().latin1();
11723 + *(const char **)msg->opg_Storage = tmpString.data();
11724 + break;
11725 + case MUIA_WebPreferences_SerifFontFamily:
11726 + tmpString = data->preferences->serifFontFamily().latin1();
11727 + *(const char **)msg->opg_Storage = tmpString.data();
11728 + break;
11729 + case MUIA_WebPreferences_SansSerifFontFamily:
11730 + tmpString = data->preferences->sansSerifFontFamily().latin1();
11731 + *(const char **)msg->opg_Storage = tmpString.data();
11732 + break;
11733 + case MUIA_WebPreferences_CursiveFontFamily:
11734 + tmpString = data->preferences->cursiveFontFamily().latin1();
11735 + *(const char **)msg->opg_Storage = tmpString.data();
11736 + break;
11737 + case MUIA_WebPreferences_FantasyFontFamily:
11738 + tmpString = data->preferences->fantasyFontFamily().latin1();
11739 + *(const char **)msg->opg_Storage = tmpString.data();
11740 + break;
11741 + case MUIA_WebPreferences_DefaultFontSize:
11742 + *(int *)msg->opg_Storage = (int) data->preferences->defaultFontSize();
11743 + break;
11744 + case MUIA_WebPreferences_DefaultFixedFontSize:
11745 + *(int *)msg->opg_Storage = (int) data->preferences->defaultFixedFontSize();
11746 + break;
11747 + case MUIA_WebPreferences_MinimumFontSize:
11748 + *(int *)msg->opg_Storage = (int) data->preferences->minimumFontSize();
11749 + break;
11750 + case MUIA_WebPreferences_MinimumLogicalFontSize:
11751 + *(int *)msg->opg_Storage = (int) data->preferences->minimumLogicalFontSize();
11752 + break;
11753 + case MUIA_WebPreferences_DefaultTextEncodingName:
11754 + tmpString = data->preferences->defaultTextEncodingName().latin1();
11755 + *(const char **)msg->opg_Storage = tmpString.data();
11756 + break;
11757 + case MUIA_WebPreferences_UserStyleSheetEnabled:
11758 + *(int *)msg->opg_Storage = (int) data->preferences->userStyleSheetEnabled();
11759 + break;
11760 + case MUIA_WebPreferences_UserStyleSheetLocation:
11761 + tmpString = data->preferences->userStyleSheetLocation().latin1();
11762 + *(const char **)msg->opg_Storage = tmpString.data();
11763 + break;
11764 + case MUIA_WebPreferences_JavaEnabled:
11765 + *(int *)msg->opg_Storage = (int) data->preferences->isJavaEnabled();
11766 + break;
11767 + case MUIA_WebPreferences_JavaScriptEnabled:
11768 + *(int *)msg->opg_Storage = (int) data->preferences->isJavaScriptEnabled();
11769 + break;
11770 + case MUIA_WebPreferences_JavaScriptCanOpenWindowsAutomatically:
11771 + *(int *)msg->opg_Storage = (int) data->preferences->javaScriptCanOpenWindowsAutomatically();
11772 + break;
11773 + case MUIA_WebPreferences_PlugInsEnabled:
11774 + *(int *)msg->opg_Storage = (int) data->preferences->arePlugInsEnabled();
11775 + break;
11776 + case MUIA_WebPreferences_AllowsAnimatedImages:
11777 + *(int *)msg->opg_Storage = (int) data->preferences->allowsAnimatedImages();
11778 + break;
11779 + case MUIA_WebPreferences_AllowAnimatedImageLooping:
11780 + *(int *)msg->opg_Storage = (int) data->preferences->allowAnimatedImageLooping();
11781 + break;
11782 + case MUIA_WebPreferences_LoadsImagesAutomatically:
11783 + *(int *)msg->opg_Storage = (int) data->preferences->loadsImagesAutomatically();
11784 + break;
11785 + case MUIA_WebPreferences_Autosaves:
11786 + *(int *)msg->opg_Storage = (int) data->preferences->autosaves();
11787 + break;
11788 + case MUIA_WebPreferences_ShouldPrintBackgrounds:
11789 + *(int *)msg->opg_Storage = (int) data->preferences->shouldPrintBackgrounds();
11790 + break;
11791 + case MUIA_WebPreferences_PrivateBrowsingEnabled:
11792 + *(int *)msg->opg_Storage = (int) data->preferences->privateBrowsingEnabled();
11793 + break;
11794 + case MUIA_WebPreferences_TabsToLinks:
11795 + *(int *)msg->opg_Storage = (int) data->preferences->tabsToLinks();
11796 + break;
11797 + case MUIA_WebPreferences_UsesPageCache:
11798 + *(int *)msg->opg_Storage = (int) data->preferences->usesPageCache();
11799 + break;
11800 + case MUIA_WebPreferences_TextAreasAreResizable:
11801 + *(int *)msg->opg_Storage = (int) data->preferences->textAreasAreResizable();
11802 + break;
11803 + case MUIA_WebPreferences_HistoryItemLimit:
11804 + *(int *)msg->opg_Storage = (int) data->preferences->historyItemLimit();
11805 + break;
11806 + case MUIA_WebPreferences_HistoryAgeInDaysLimit:
11807 + *(int *)msg->opg_Storage = (int) data->preferences->historyAgeInDaysLimit();
11808 + break;
11809 + case MUIA_WebPreferences_IconDatabaseLocation:
11810 + tmpString = data->preferences->iconDatabaseLocation().latin1();
11811 + *(const char **)msg->opg_Storage = tmpString.data();
11812 + break;
11813 + case MUIA_WebPreferences_IconDatabaseEnabled:
11814 + *(int *)msg->opg_Storage = (int) data->preferences->iconDatabaseEnabled();
11815 + break;
11816 + case MUIA_WebPreferences_FontSmoothing:
11817 + switch(data->preferences->fontSmoothing())
11819 + case FontSmoothingTypeStandard:
11820 + *(int *)msg->opg_Storage = MUIV_WebPreferences_FontSmoothingTypeStandard;
11821 + break;
11822 + case FontSmoothingTypeLight:
11823 + *(int *)msg->opg_Storage = MUIV_WebPreferences_FontSmoothingTypeLight;
11824 + break;
11825 + case FontSmoothingTypeMedium:
11826 + *(int *)msg->opg_Storage = MUIV_WebPreferences_FontSmoothingTypeMedium;
11827 + break;
11828 + case FontSmoothingTypeStrong:
11829 + *(int *)msg->opg_Storage = MUIV_WebPreferences_FontSmoothingTypeStrong;
11830 + break;
11831 + case FontSmoothingTypeWindows:
11832 + *(int *)msg->opg_Storage = MUIV_WebPreferences_FontSmoothingTypeWindows;
11833 + break;
11835 + break;
11836 + case MUIA_WebPreferences_DecodesBMPWithDatatypes:
11837 + *(int *)msg->opg_Storage = (int) WebCore::Settings::decodesBMPWithDatatypes();
11838 + break;
11839 + case MUIA_WebPreferences_DecodesPNGWithDatatypes:
11840 + *(int *)msg->opg_Storage = (int) WebCore::Settings::decodesPNGWithDatatypes();
11841 + break;
11842 + case MUIA_WebPreferences_DecodesGIFWithDatatypes:
11843 + *(int *)msg->opg_Storage = (int) WebCore::Settings::decodesGIFWithDatatypes();
11844 + break;
11845 + case MUIA_WebPreferences_DecodesJPGWithDatatypes:
11846 + *(int *)msg->opg_Storage = (int) WebCore::Settings::decodesJPGWithDatatypes();
11847 + break;
11848 + case MUIA_WebPreferences_CookieJarFileName:
11849 + *(const char **)msg->opg_Storage = data->cookieJarFileName;
11850 + break;
11851 + default:
11852 + retval = DoSuperMethodA(cl, obj, (Msg)msg);
11853 + break;
11856 + return retval;
11859 +/*** Setup ******************************************************************/
11860 +ZUNE_CUSTOMCLASS_4
11862 + WebPreferences, NULL, MUIC_Window, NULL,
11863 + OM_NEW, struct opSet*,
11864 + OM_DISPOSE, Msg,
11865 + OM_GET, struct opGet*,
11866 + OM_SET, struct opSet*
11868 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.h
11869 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.h 1970-01-01 01:00:00.000000000 +0100
11870 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune.h 2018-06-13 07:27:37.570979727 +0100
11871 @@ -0,0 +1,60 @@
11872 +#ifndef _WEBPREFERENCESZUNE_H
11873 +#define _WEBPREFERENCESZUNE_H
11875 +#include <libraries/mui.h>
11877 +/*** Identifier base ********************************************************/
11878 +#define MUIB_WebPreferences (TAG_USER | 0x10000000)
11880 +/*** Attributes *************************************************************/
11881 +#define MUIA_WebPreferences_StandardFontFamily (MUIB_WebPreferences|0x00000000)
11882 +#define MUIA_WebPreferences_FixedFontFamily (MUIB_WebPreferences|0x00000001)
11883 +#define MUIA_WebPreferences_SerifFontFamily (MUIB_WebPreferences|0x00000002)
11884 +#define MUIA_WebPreferences_SansSerifFontFamily (MUIB_WebPreferences|0x00000003)
11885 +#define MUIA_WebPreferences_CursiveFontFamily (MUIB_WebPreferences|0x00000004)
11886 +#define MUIA_WebPreferences_FantasyFontFamily (MUIB_WebPreferences|0x00000005)
11887 +#define MUIA_WebPreferences_DefaultFontSize (MUIB_WebPreferences|0x00000006)
11888 +#define MUIA_WebPreferences_DefaultFixedFontSize (MUIB_WebPreferences|0x00000007)
11889 +#define MUIA_WebPreferences_MinimumFontSize (MUIB_WebPreferences|0x00000008)
11890 +#define MUIA_WebPreferences_MinimumLogicalFontSize (MUIB_WebPreferences|0x00000009)
11891 +#define MUIA_WebPreferences_DefaultTextEncodingName (MUIB_WebPreferences|0x0000000a)
11892 +#define MUIA_WebPreferences_UserStyleSheetEnabled (MUIB_WebPreferences|0x0000000b)
11893 +#define MUIA_WebPreferences_UserStyleSheetLocation (MUIB_WebPreferences|0x0000000c)
11894 +#define MUIA_WebPreferences_JavaEnabled (MUIB_WebPreferences|0x0000000d)
11895 +#define MUIA_WebPreferences_JavaScriptEnabled (MUIB_WebPreferences|0x0000000e)
11896 +#define MUIA_WebPreferences_JavaScriptCanOpenWindowsAutomatically (MUIB_WebPreferences|0x0000000f)
11897 +#define MUIA_WebPreferences_PlugInsEnabled (MUIB_WebPreferences|0x00000010)
11898 +#define MUIA_WebPreferences_AllowsAnimatedImages (MUIB_WebPreferences|0x00000011)
11899 +#define MUIA_WebPreferences_AllowAnimatedImageLooping (MUIB_WebPreferences|0x00000012)
11900 +#define MUIA_WebPreferences_LoadsImagesAutomatically (MUIB_WebPreferences|0x00000013)
11901 +#define MUIA_WebPreferences_Autosaves (MUIB_WebPreferences|0x00000014)
11902 +#define MUIA_WebPreferences_ShouldPrintBackgrounds (MUIB_WebPreferences|0x00000015)
11903 +#define MUIA_WebPreferences_PrivateBrowsingEnabled (MUIB_WebPreferences|0x00000016)
11904 +#define MUIA_WebPreferences_TabsToLinks (MUIB_WebPreferences|0x00000017)
11905 +#define MUIA_WebPreferences_UsesPageCache (MUIB_WebPreferences|0x00000018)
11906 +#define MUIA_WebPreferences_TextAreasAreResizable (MUIB_WebPreferences|0x00000019)
11907 +#define MUIA_WebPreferences_HistoryItemLimit (MUIB_WebPreferences|0x0000001a)
11908 +#define MUIA_WebPreferences_HistoryAgeInDaysLimit (MUIB_WebPreferences|0x0000001b)
11909 +#define MUIA_WebPreferences_IconDatabaseLocation (MUIB_WebPreferences|0x0000001c)
11910 +#define MUIA_WebPreferences_IconDatabaseEnabled (MUIB_WebPreferences|0x0000001d)
11911 +#define MUIA_WebPreferences_FontSmoothing (MUIB_WebPreferences|0x0000001e)
11912 +#define MUIA_WebPreferences_DecodesBMPWithDatatypes (MUIB_WebPreferences|0x0000001f)
11913 +#define MUIA_WebPreferences_DecodesPNGWithDatatypes (MUIB_WebPreferences|0x00000020)
11914 +#define MUIA_WebPreferences_DecodesGIFWithDatatypes (MUIB_WebPreferences|0x00000021)
11915 +#define MUIA_WebPreferences_DecodesJPGWithDatatypes (MUIB_WebPreferences|0x00000022)
11916 +#define MUIA_WebPreferences_CookieJarFileName (MUIB_WebPreferences|0x00000023)
11918 +/*** Variables **************************************************************/
11919 +extern struct MUI_CustomClass *WebPreferences_CLASS;
11921 +/*** Constants **************************************************************/
11922 +#define MUIV_WebPreferences_FontSmoothingTypeStandard (MUIB_WebPreferences|0x00000000)
11923 +#define MUIV_WebPreferences_FontSmoothingTypeLight (MUIB_WebPreferences|0x00000001)
11924 +#define MUIV_WebPreferences_FontSmoothingTypeMedium (MUIB_WebPreferences|0x00000002)
11925 +#define MUIV_WebPreferences_FontSmoothingTypeStrong (MUIB_WebPreferences|0x00000003)
11926 +#define MUIV_WebPreferences_FontSmoothingTypeWindows (MUIB_WebPreferences|0x00000004)
11928 +/*** Macros *****************************************************************/
11929 +#define WebPreferencesObject BOOPSIOBJMACRO_START(WebPreferences_CLASS->mcc_Class)
11931 +#endif
11932 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune_private.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune_private.h
11933 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune_private.h 1970-01-01 01:00:00.000000000 +0100
11934 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebPreferencesZune_private.h 2018-06-13 07:27:37.570979727 +0100
11935 @@ -0,0 +1,11 @@
11936 +#ifndef _WEBPREFERENCESZUNEZUNE_PRIVATE_H
11937 +#define _WEBPREFERENCESZUNEZUNE_PRIVATE_H
11939 +class WebPreferences;
11941 +struct WebPreferences_DATA {
11942 + WebPreferences *preferences;
11943 + const char *cookieJarFileName;
11946 +#endif
11947 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.cpp
11948 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.cpp 1970-01-01 01:00:00.000000000 +0100
11949 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.cpp 2018-06-13 07:27:37.570979727 +0100
11950 @@ -0,0 +1,482 @@
11952 + * Copyright (C) 2008 Pleyo. All rights reserved.
11954 + * Redistribution and use in source and binary forms, with or without
11955 + * modification, are permitted provided that the following conditions
11956 + * are met:
11958 + * 1. Redistributions of source code must retain the above copyright
11959 + * notice, this list of conditions and the following disclaimer.
11960 + * 2. Redistributions in binary form must reproduce the above copyright
11961 + * notice, this list of conditions and the following disclaimer in the
11962 + * documentation and/or other materials provided with the distribution.
11963 + * 3. Neither the name of Pleyo nor the names of
11964 + * its contributors may be used to endorse or promote products derived
11965 + * from this software without specific prior written permission.
11967 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
11968 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
11969 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
11970 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
11971 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
11972 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
11973 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
11974 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11975 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
11976 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11977 + */
11979 +#include "config.h"
11980 +#include "WebViewPrivate.h"
11981 +#include "IntRect.h"
11982 +#include "FrameView.h"
11983 +#include "Frame.h"
11984 +#include "SDL.h"
11985 +#include "GraphicsContext.h"
11986 +#include "Page.h"
11987 +#include "EventHandler.h"
11988 +#include "FocusController.h"
11989 +#include "HitTestResult.h"
11990 +#include "HitTestRequest.h"
11991 +#include <MainThread.h>
11992 +#include <PlatformKeyboardEvent.h>
11993 +#include <PlatformMouseEvent.h>
11994 +#include <PlatformWheelEvent.h>
11995 +#include "SelectionController.h"
11996 +#include <SharedTimer.h>
11997 +#include "Editor.h"
11998 +#include "owb-config.h"
11999 +#include "PopupMenu.h"
12000 +#include "CString.h"
12001 +#include "FileIO.h"
12002 +#include "WebFrame.h"
12003 +#include "WebView.h"
12005 +#include "CurrentTime.h"
12006 +#include "ContextMenu.h"
12008 +extern "C"
12010 +#include <unistd.h>
12011 +#include <intuition/intuition.h>
12012 +#include <devices/rawkeycodes.h>
12013 +#include <libraries/mui.h>
12014 +#include <proto/muimaster.h>
12015 +#include <proto/intuition.h>
12016 +#include <clib/alib_protos.h>
12017 +#include <aros/debug.h>
12020 +#include "WebViewZune.h"
12022 +using namespace WebCore;
12024 +WebViewPrivate::WebViewPrivate(WebView *webView)
12025 + : m_webView(webView)
12026 + , isInitialized(false)
12027 + , ignoreExposeRequests(false)
12031 +void WebViewPrivate::fireWebKitEvents()
12033 + WTF::dispatchFunctionsFromMainThread();
12034 + fireTimerIfNeeded();
12037 +void WebViewPrivate::onExpose(BalEventExpose event)
12039 + D(bug("onExpose started\n"));
12040 + Frame* frame = core(m_webView->mainFrame());
12041 + if (!frame)
12042 + return;
12044 + if(!isInitialized) {
12045 + isInitialized = true;
12046 + frame->view()->resize(m_rect.width(), m_rect.height());
12047 + frame->view()->forceLayout();
12048 + frame->view()->adjustViewSize();
12051 + BalWidget *window = m_webView->viewWindow();
12052 + SDL_Surface *surf;
12053 + GetAttr(MUIA_WebView_Surface, window, (IPTR*) &surf);
12055 + GraphicsContext ctx(surf);
12056 + ctx.setBalExposeEvent(&event);
12057 + std::vector<BalRectangle> dirtyRects(m_webView->dirtyRegion());
12058 + if (frame->contentRenderer() && frame->view() && dirtyRects.size() > 0) {
12059 + ignoreExposeRequests = true;
12060 + frame->view()->layoutIfNeededRecursive();
12061 + ignoreExposeRequests = false;
12063 + for (std::vector<BalRectangle>::iterator it = dirtyRects.begin(); it < dirtyRects.end(); it++) {
12064 + frame->view()->paint(&ctx, *it);
12066 + updateView(m_webView->viewWindow(), *it);
12068 + m_webView->clearDirtyRegion();
12070 + D(bug("onExpose finished\n"));
12073 +void WebViewPrivate::onKeyDown(BalEventKey event)
12075 + Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
12076 + if (!frame)
12077 + return;
12078 + PlatformKeyboardEvent keyboardEvent(&event);
12080 + if (frame->eventHandler()->keyEvent(keyboardEvent))
12081 + return;
12083 + if (IDCMP_RAWKEY == event.Class) {
12085 + FrameView* view = frame->view();
12086 + SelectionController::EAlteration alteration;
12087 + if (event.Qualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
12088 + alteration = SelectionController::EXTEND;
12089 + else
12090 + alteration = SelectionController::MOVE;
12092 + switch (event.Code) {
12093 + case RAWKEY_DOWN:
12094 + view->scrollBy(IntSize(0, (int)cScrollbarPixelsPerLineStep));
12095 + return;
12096 + case RAWKEY_UP:
12097 + view->scrollBy(IntSize(0, (int)-cScrollbarPixelsPerLineStep));
12098 + return;
12099 + case RAWKEY_RIGHT:
12100 + view->scrollBy(IntSize((int)cScrollbarPixelsPerLineStep, 0));
12101 + return;
12102 + case RAWKEY_LEFT:
12103 + view->scrollBy(IntSize((int)-cScrollbarPixelsPerLineStep, 0));
12104 + return;
12105 + case RAWKEY_PAGEDOWN:
12106 + view->scrollBy(IntSize(0, m_rect.height()));
12107 + return;
12108 + case RAWKEY_PAGEUP:
12109 + view->scrollBy(IntSize(0, -m_rect.height()));
12110 + return;
12111 + case RAWKEY_HOME:
12112 + frame->selection()->modify(alteration, SelectionController::BACKWARD, DocumentBoundary, true);
12113 + return;
12114 + case RAWKEY_END:
12115 + frame->selection()->modify(alteration, SelectionController::FORWARD, DocumentBoundary, true);
12116 + return;
12117 + case RAWKEY_ESCAPE:
12118 + SDL_Event ev;
12119 + ev.type = SDL_QUIT;
12120 + SDL_PushEvent(&ev);
12121 + return;
12122 + case RAWKEY_F1:
12124 + m_webView->goBack();
12126 + BalWidget *window = m_webView->viewWindow();
12127 + SDL_Surface *surf;
12128 + GetAttr(MUIA_WebView_Surface, window, (IPTR*) &surf);
12130 + GraphicsContext ctx(surf);
12131 + if (frame->contentRenderer() && frame->view()) {
12132 + frame->view()->layoutIfNeededRecursive();
12133 + IntRect dirty(0, 0, m_rect.width(), m_rect.height());
12134 + frame->view()->paint(&ctx, dirty);
12136 + return;
12138 + case RAWKEY_F2:
12140 + m_webView->goForward();
12142 + BalWidget *window = m_webView->viewWindow();
12143 + SDL_Surface *surf;
12144 + GetAttr(MUIA_WebView_Surface, window, (IPTR*) &surf);
12146 + GraphicsContext ctx(surf);
12147 + if (frame->contentRenderer() && frame->view()) {
12148 + frame->view()->layoutIfNeededRecursive();
12149 + IntRect dirty(0, 0, m_rect.width(), m_rect.height());
12150 + frame->view()->paint(&ctx, dirty);
12152 + return;
12154 + case RAWKEY_F3:
12155 + m_webView->zoomPageIn();
12156 + return;
12157 + case RAWKEY_F4:
12158 + m_webView->zoomPageOut();
12159 + return;
12160 + default:
12161 + break;
12166 +void WebViewPrivate::onKeyUp(BalEventKey event)
12168 + Frame* frame = m_webView->page()->focusController()->focusedOrMainFrame();
12169 + if (!frame)
12170 + return;
12171 + PlatformKeyboardEvent keyboardEvent(&event);
12173 + if (frame->eventHandler()->keyEvent(keyboardEvent))
12174 + return ;
12177 +void WebViewPrivate::onMouseMotion(BalEventMotion event)
12179 + Frame* frame = core(m_webView->mainFrame());
12180 + if (!frame)
12181 + return;
12182 + frame->eventHandler()->mouseMoved(PlatformMouseEvent(&event));
12185 +void WebViewPrivate::onMouseButtonDown(BalEventButton event)
12187 + Frame* frame = core(m_webView->mainFrame());
12188 + if (!frame)
12189 + return;
12191 + if (event.Code == IECODE_RBUTTON) {
12192 + onContextMenu(event);
12195 + frame->eventHandler()->handleMousePressEvent(PlatformMouseEvent(&event));
12198 +void WebViewPrivate::onContextMenu(BalEventButton event)
12200 + Page* page = core(m_webView);
12201 + page->contextMenuController()->clearContextMenu();
12202 + Frame* focusedFrame = page->focusController()->focusedOrMainFrame();
12204 + if (!focusedFrame->view())
12205 + return;
12207 + BalWidget* viewWindow = m_webView->viewWindow();
12209 + /* Remove previous context menu */
12210 + Object *contextMenu = NULL;
12211 + GetAttr(MUIA_ContextMenu, viewWindow, (IPTR*) &contextMenu);
12212 + SetAttrs(viewWindow, MUIA_ContextMenu, MenustripObject, End, TAG_DONE);
12213 + if(contextMenu)
12214 + MUI_DisposeObject(contextMenu);
12216 + bool handledEvent = focusedFrame->eventHandler()->sendContextMenuEvent(PlatformMouseEvent(&event));
12217 + if (!handledEvent)
12218 + return;
12220 + ContextMenu* coreMenu = page->contextMenuController()->contextMenu();
12221 + if (!coreMenu)
12222 + return;
12224 + Object* menu = coreMenu->platformDescription();
12225 + if (!menu)
12226 + return;
12228 + Object *menuStrip = MenustripObject, MUIA_Family_Child, menu, End;
12230 + /* Set new context menu */
12231 + GetAttr(MUIA_ContextMenu, viewWindow, (IPTR*) &contextMenu);
12232 + SetAttrs(viewWindow, MUIA_ContextMenu, menuStrip, TAG_DONE);
12233 + if(contextMenu)
12234 + MUI_DisposeObject(contextMenu);
12237 +void WebViewPrivate::onMouseButtonUp(BalEventButton event)
12239 + Frame* frame = core(m_webView->mainFrame());
12240 + if (!frame)
12241 + return;
12243 + frame->eventHandler()->handleMouseReleaseEvent(PlatformMouseEvent(&event));
12246 +void WebViewPrivate::onScroll(BalEventScroll event)
12248 + Frame* frame = core(m_webView->mainFrame());
12249 + if (!frame)
12250 + return;
12251 + PlatformWheelEvent wheelEvent(&event);
12252 + frame->eventHandler()->handleWheelEvent(wheelEvent);
12255 +void WebViewPrivate::onResize(BalResizeEvent event)
12257 + Frame* frame = core(m_webView->mainFrame());
12258 + if (!frame)
12259 + return;
12260 + m_rect.setWidth(event.w);
12261 + m_rect.setHeight(event.h);
12262 + frame->view()->resize(event.w, event.h);
12263 + frame->view()->forceLayout();
12264 + frame->view()->adjustViewSize();
12267 +void WebViewPrivate::onQuit(BalQuitEvent)
12271 +void WebViewPrivate::onUserEvent(BalUserEvent)
12275 +void WebViewPrivate::popupMenuHide()
12277 + //BOOKMARKLET_INSTALL_PATH
12281 +void WebViewPrivate::popupMenuShow(void *popupInfo)
12283 +#if 0
12284 + PopupMenu *pop = static_cast<PopupMenu *>(popupInfo);
12285 + if (!pop)
12286 + return;
12287 + //printf("pop %d %d %d %d\n", pop->windowRect().x(), pop->windowRect().y(), pop->windowRect().width(), pop->windowRect().height());
12288 + int itemCount = pop->client()->listSize();
12290 + String tabIndex = "var myTabId1 = new Array(";
12291 + String tabName = "var myTabName1 = new Array(";
12292 + for (int i = 0; i < itemCount; ++i) {
12293 + String text = pop->client()->itemText(i);
12294 + if (text.isEmpty())
12295 + continue;
12296 + if (i == 0) {
12297 + tabName += "\"";
12298 + tabIndex += "\"";
12299 + } else {
12300 + tabName += ", \"";
12301 + tabIndex += ", \"";
12304 + tabName += text;
12305 + tabName += "\"";
12306 + tabIndex += String::number(i+1);
12307 + tabIndex += "\"";
12309 + tabIndex += ");";
12310 + tabName += ");";
12311 + String path = BOOKMARKLET_INSTALL_PATH;
12312 + path += "popup.js";
12314 + File *f = new File(path);
12315 + if (!f)
12316 + return;
12317 + if (f->open('r') == -1)
12318 + return ;
12319 + String buffer(f->read(f->getSize()));
12320 + f->close();
12321 + delete f;
12323 + String callCreateTab = "createTabs(myTabId1 ,myTabName1 ,";
12324 + callCreateTab += String::number(pop->windowRect().x());
12325 + callCreateTab += ", ";
12326 + callCreateTab += String::number(pop->windowRect().y());
12327 + callCreateTab += ", ";
12328 + callCreateTab += String::number(pop->windowRect().width());
12329 + callCreateTab += ");";
12331 + buffer = buffer.replace("@TabIndexDefinition", tabIndex);
12332 + buffer = buffer.replace("@TabNameDefinition", tabName);
12333 + buffer = buffer.replace("@callCreateTab", callCreateTab);
12335 +// printf("popup = %s \n", buffer.utf8().data());
12337 + m_webView->stringByEvaluatingJavaScriptFromString(buffer);
12338 +#endif
12341 +void WebViewPrivate::updateView(BalWidget *surf, IntRect rect)
12343 + if (!surf || rect.isEmpty())
12344 + return;
12345 + rect.intersect(m_rect);
12346 + /* use SDL_Flip only if double buffering is available */
12347 + SDL_Rect sdlRect = {rect.x(), rect.y(), rect.width(), rect.height()};
12348 + //printf("updateView x=%d y=%d w=%d h=%d\n", sdlRect.x, sdlRect.y, sdlRect.w, sdlRect.h);
12349 + sdlRect.x = max(sdlRect.x, (Sint16)0);
12350 + sdlRect.y = max(sdlRect.y, (Sint16)0);
12351 + DoMethod(surf, MUIM_WebView_UpdateRect, (IPTR) sdlRect.x, (IPTR) sdlRect.y, (IPTR) sdlRect.w, (IPTR) sdlRect.h);
12354 +void WebViewPrivate::sendExposeEvent(IntRect)
12356 + D(bug("WebViewPrivate::sendExposeEvent()\n"));
12357 + if(ignoreExposeRequests)
12358 + return;
12359 + BalWidget *window = m_webView->viewWindow();
12360 + if(window)
12361 + DoMethod(window, MUIM_WebView_Expose);
12364 +void WebViewPrivate::repaint(const WebCore::IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly)
12366 + D(bug("repaint(%d, %d, %d\n", contentChanged, immediate, repaintContentOnly));
12367 + if (windowRect.isEmpty())
12368 + return;
12369 + IntRect rect = windowRect;
12370 + rect.intersect(m_rect);
12372 + if (rect.isEmpty())
12373 + return;
12375 + if (contentChanged) {
12376 + m_webView->addToDirtyRegion(rect);
12377 + /*Frame* focusedFrame = m_webView->page()->focusController()->focusedFrame();
12378 + if (focusedFrame) {
12379 + Scrollbar* hBar = focusedFrame->view()->horizontalScrollbar();
12380 + Scrollbar* vBar = focusedFrame->view()->verticalScrollbar();
12382 + // TODO : caculate the scroll delta and test this.
12383 + //if (dx && hBar)
12384 + if (hBar)
12385 + m_webView->addToDirtyRegion(IntRect(focusedFrame->view()->windowClipRect().x() + hBar->x(), focusedFrame->view()->windowClipRect().y() + hBar->y(), hBar->width(), hBar->height()));
12386 + //if (dy && vBar)
12387 + if (vBar)
12388 + m_webView->addToDirtyRegion(IntRect(focusedFrame->view()->windowClipRect().x() + vBar->x(), focusedFrame->view()->windowClipRect().y() + vBar->y(), vBar->width(), vBar->height()));
12389 + }*/
12391 + if (!repaintContentOnly)
12392 + sendExposeEvent(rect);
12393 + if (immediate) {
12394 + if (repaintContentOnly)
12395 + m_webView->updateBackingStore(core(m_webView->topLevelFrame())->view());
12396 + else
12397 + sendExposeEvent(rect);
12401 +void WebViewPrivate::scrollBackingStore(WebCore::FrameView* view, int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect)
12403 + IntRect updateRect = clipRect;
12404 + BalWidget *window = m_webView->viewWindow();
12406 + if((dx != 0 && dy != 0)
12407 + || abs(dx) >= scrollViewRect.width()
12408 + || abs(dy) >= scrollViewRect.height()) {
12409 + updateRect.intersect(scrollViewRect);
12410 + m_webView->addToDirtyRegion(updateRect);
12411 + DoMethod(window, MUIM_WebView_Expose);
12413 + else if(dx != 0) {
12414 + int revealedRectX = (dx > 0 ? scrollViewRect.x() : scrollViewRect.x() + scrollViewRect.width() + dx);
12415 + IntRect revealedRect(revealedRectX, scrollViewRect.y(), abs(dx), scrollViewRect.height());
12416 + IntRect scrollRect = scrollViewRect;
12417 + scrollRect.intersect(clipRect);
12418 + updateRect.intersect(revealedRect);
12419 + m_webView->addToDirtyRegion(updateRect);
12420 + DoMethod(window, MUIM_WebView_Scroll, scrollRect.x(), scrollRect.y(), scrollRect.width(), scrollRect.height(), -dx, -dy);
12422 + else if(dy != 0) {
12423 + int revealedRectY = (dy > 0 ? scrollViewRect.y() : scrollViewRect.y() + scrollViewRect.height() + dy);
12424 + IntRect revealedRect(scrollViewRect.x(), revealedRectY, scrollViewRect.width(), abs(dy));
12425 + IntRect scrollRect = scrollViewRect;
12426 + scrollRect.intersect(clipRect);
12427 + updateRect.intersect(revealedRect);
12428 + m_webView->addToDirtyRegion(updateRect);
12429 + DoMethod(window, MUIM_WebView_Scroll, scrollRect.x(), scrollRect.y(), scrollRect.width(), scrollRect.height(), -dx, -dy);
12433 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.h
12434 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.h 1970-01-01 01:00:00.000000000 +0100
12435 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewPrivate.h 2018-06-13 07:27:37.570979727 +0100
12436 @@ -0,0 +1,146 @@
12438 + * Copyright (C) 2008 Pleyo. All rights reserved.
12440 + * Redistribution and use in source and binary forms, with or without
12441 + * modification, are permitted provided that the following conditions
12442 + * are met:
12444 + * 1. Redistributions of source code must retain the above copyright
12445 + * notice, this list of conditions and the following disclaimer.
12446 + * 2. Redistributions in binary form must reproduce the above copyright
12447 + * notice, this list of conditions and the following disclaimer in the
12448 + * documentation and/or other materials provided with the distribution.
12449 + * 3. Neither the name of Pleyo nor the names of
12450 + * its contributors may be used to endorse or promote products derived
12451 + * from this software without specific prior written permission.
12453 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
12454 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
12455 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
12456 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
12457 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
12458 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
12459 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
12460 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12461 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
12462 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12463 + */
12464 +#ifndef WebViewPrivate_H
12465 +#define WebViewPrivate_H
12467 +#include "WebView.h"
12468 +#include "IntRect.h"
12469 +#include "FrameView.h"
12470 +#include "Frame.h"
12471 +#include "BALBase.h"
12472 +#include "SDL.h"
12473 +#include "PlatformMouseEvent.h"
12475 +class WebViewPrivate {
12476 +public:
12477 + WebViewPrivate(WebView *webView);
12478 + ~WebViewPrivate()
12482 + void show()
12486 + void hide()
12490 + void setFrameRect(WebCore::IntRect r)
12492 + m_rect = r;
12495 + BalRectangle frameRect()
12497 + SDL_Rect r = {m_rect.x(), m_rect.y(), m_rect.width(), m_rect.height()};
12498 + return r;
12501 + BalWidget *createWindow(BalRectangle r)
12503 + WebCore::IntRect rect(r);
12504 + if(rect != m_rect)
12505 + m_rect = rect;
12508 + return 0;
12511 + void initWithFrameView(WebCore::FrameView *frameView)
12515 + void clearDirtyRegion()
12517 + m_backingStoreDirtyRegion.clear();
12520 + std::vector<BalRectangle> dirtyRegion()
12522 + return m_backingStoreDirtyRegion;
12525 + void addToDirtyRegion(const BalRectangle& dirtyRect)
12527 + BalRectangle unitedDirtyRect = dirtyRect;
12528 + for(std::vector<BalRectangle>::iterator it = m_backingStoreDirtyRegion.begin(); it != m_backingStoreDirtyRegion.end();)
12530 + if(it->x < (unitedDirtyRect.x + unitedDirtyRect.w) && unitedDirtyRect.x < (it->x + it->w) && it->y < (unitedDirtyRect.y + unitedDirtyRect.h) && unitedDirtyRect.y < (it->y + it->h))
12532 + int l = min(it->x, unitedDirtyRect.x);
12533 + int t = min(it->y, unitedDirtyRect.y);
12534 + int r = max(it->x + it->w, unitedDirtyRect.x + unitedDirtyRect.w);
12535 + int b = max(it->y + it->h, unitedDirtyRect.y + unitedDirtyRect.h);
12536 + unitedDirtyRect.x = l;
12537 + unitedDirtyRect.y = t;
12538 + unitedDirtyRect.w = r - l;
12539 + unitedDirtyRect.h = b - t;
12540 + it = m_backingStoreDirtyRegion.erase(it);
12542 + else
12543 + it++;
12544 + }
12545 + m_backingStoreDirtyRegion.push_back(unitedDirtyRect);
12548 + void onExpose(BalEventExpose event);
12549 + void onKeyDown(BalEventKey event);
12550 + void onKeyUp(BalEventKey event);
12551 + void onMouseMotion(BalEventMotion event);
12552 + void onMouseButtonDown(BalEventButton event);
12553 + void onMouseButtonUp(BalEventButton event);
12554 + void onScroll(BalEventScroll event);
12555 + void onResize(BalResizeEvent event);
12556 + void onQuit(BalQuitEvent);
12557 + void onUserEvent(BalUserEvent);
12558 + void onContextMenu(BalEventButton event);
12559 + void popupMenuHide();
12560 + void popupMenuShow(void *popupInfo);
12562 + void sendExposeEvent(WebCore::IntRect);
12564 + void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
12566 + void scrollBackingStore(WebCore::FrameView*, int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect);
12568 + void fireWebKitEvents();
12570 +private:
12571 + void updateView(BalWidget* widget, WebCore::IntRect rect);
12572 + WebCore::IntRect m_rect;
12573 + WebView* m_webView;
12574 + bool isInitialized;
12575 + bool ignoreExposeRequests;
12577 + WebCore::IntPoint m_backingStoreSize;
12578 + std::vector<BalRectangle> m_backingStoreDirtyRegion;
12582 +#endif
12583 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.cpp
12584 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.cpp 1970-01-01 01:00:00.000000000 +0100
12585 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.cpp 2018-06-13 07:27:37.570979727 +0100
12586 @@ -0,0 +1,1089 @@
12587 +#define MUIMASTER_YES_INLINE_STDARG
12589 +#include "WebView.h"
12590 +#include "Page.h"
12591 +#include "WebFrame.h"
12592 +#include "WebNotificationDelegate.h"
12593 +#include "JSActionDelegate.h"
12594 +#include "WebFrameLoadDelegate.h"
12595 +#include "DownloadDelegateZune.h"
12596 +#include "DownloadDelegateAROS.h"
12597 +#include "PolicyDelegateAROS.h"
12598 +#include "WebDataSource.h"
12599 +#include "SharedBuffer.h"
12600 +#include "IntRect.h"
12602 +extern "C" {
12603 +#include <exec/memory.h>
12604 +#include <intuition/intuition.h>
12605 +#include <clib/alib_protos.h>
12606 +#include <proto/exec.h>
12607 +#include <proto/intuition.h>
12608 +#include <proto/utility.h>
12609 +#include <proto/muimaster.h>
12610 +#include <proto/alib.h>
12611 +#include <libraries/mui.h>
12612 +#include <aros/debug.h>
12613 +#include <proto/graphics.h>
12614 +#include <proto/cybergraphics.h>
12615 +#include <proto/codesets.h>
12616 +#include <proto/layers.h>
12617 +#include <libraries/codesets.h>
12618 +#include <libraries/cybergraphics.h>
12619 +#include <aros/symbolsets.h>
12620 +#include <devices/rawkeycodes.h>
12621 +#include <SDL.h>
12622 +#include <SDL_gfxPrimitives.h>
12623 +#include <zune/customclasses.h>
12624 +#include "strings.h"
12627 +/* #define MYDEBUG 1 */
12628 +#include "WebViewZune.h"
12629 +#include "WebViewZune_private.h"
12631 +class MyWebNotificationDelegate : public WebNotificationDelegate, public JSActionDelegate, public WebFrameLoadDelegate
12633 +public:
12634 + MyWebNotificationDelegate(Object *webView)
12636 + this->webView = webView;
12639 + ~MyWebNotificationDelegate()
12643 + void didStartProvisionalLoad(WebFrame* frame)
12645 + if(frame == frame->webView()->mainFrame())
12647 + D(bug("didStartLoad %s\n", frame->url()));
12648 + SetAttrs(webView, MUIA_WebView_State, MUIV_WebView_State_Connecting, TAG_END);
12649 + updateTitle(strdup(""));
12650 + updateURL((char*) frame->url());
12651 + updateBackForward();
12655 + void didReceiveServerRedirectForProvisionalLoadForFrame(WebFrame*)
12659 + void didCancelClientRedirectForFrame(WebFrame*)
12663 + void willPerformClientRedirectToURL(WebFrame*, const char*, double, double)
12667 + void didCommitLoad(WebFrame* frame)
12669 + if(frame == frame->webView()->mainFrame())
12671 + D(bug("didCommitLoad %s\n", frame->url()));
12672 + SetAttrs(webView, MUIA_WebView_State, MUIV_WebView_State_Loading, TAG_END);
12673 + updateURL((char*) frame->url());
12674 + updateBackForward();
12678 + void didFinishLoad(WebFrame* frame)
12680 + if(frame == frame->webView()->mainFrame())
12682 + D(bug("didFinishLoad %s\n", frame->url()));
12683 + SetAttrs(webView, MUIA_WebView_State, MUIV_WebView_State_Ready, TAG_END);
12684 + updateBackForward();
12688 + void didFailLoad(WebFrame* frame)
12690 + if(frame == frame->webView()->mainFrame())
12692 + D(bug("didFailLoad %s\n", frame->url()));
12693 + SetAttrs(webView, MUIA_WebView_State, MUIV_WebView_State_Error, TAG_END);
12694 + updateBackForward();
12698 + virtual void startLoadNotification(WebFrame* frame)
12702 + virtual void titleChange(WebFrame* frame, const char *title)
12704 + if(frame == frame->webView()->mainFrame())
12706 + D(bug("titleChange %s\n", frame->name()));
12707 + updateTitle((char*) frame->name());
12711 + virtual void progressNotification(WebFrame* frame)
12713 + if(frame == frame->webView()->mainFrame())
12715 + double progress = frame->webView()->estimatedProgress();
12716 + SetAttrs(webView, MUIA_WebView_EstimatedProgress, (int) 100*progress, TAG_END);
12720 + virtual void finishedLoadNotification(WebFrame* frame)
12724 + virtual bool jsConfirm(WebFrame* frame, const char* message)
12726 + BalWidget* viewWindow = frame->webView()->viewWindow();
12727 + if (viewWindow) {
12728 + return (bool) DoMethod(viewWindow, MUIM_WebView_Confirm, message);
12731 + return false;
12734 + virtual bool jsAlert(WebFrame* frame, const char* message)
12736 + BalWidget* viewWindow = frame->webView()->viewWindow();
12737 + if (viewWindow) {
12738 + DoMethod(viewWindow, MUIM_WebView_Alert, message);
12741 + return true;
12744 + virtual bool jsPrompt(WebFrame* frame, const char* message, const char* defaultAnswer, char** z)
12746 + BalWidget* viewWindow = frame->webView()->viewWindow();
12747 + STRPTR result = NULL;
12748 + bool res = false;
12749 + if(viewWindow)
12751 + result = (STRPTR) DoMethod(viewWindow, MUIM_WebView_Prompt, message, defaultAnswer);
12752 + if(result)
12754 + struct codeset *utfCodeset = CodesetsFindA("UTF-8", NULL);
12755 + if(utfCodeset)
12757 + char *resultConverted = CodesetsConvertStr(CSA_Source, (IPTR) result, CSA_DestCodeset, (IPTR) utfCodeset, TAG_END);
12758 + if(resultConverted)
12760 + *z = strdup(resultConverted);
12761 + CodesetsFreeA(resultConverted, NULL);
12762 + res = true;
12765 + FreeVec(result);
12768 + return res;
12771 + virtual void windowObjectClearNotification(WebFrame* frame, void* x, void* y)
12775 + virtual void consoleMessage(WebFrame* frame, int x, const char* message)
12779 +private:
12780 + Object *webView;
12781 + void updateURL(char *url)
12783 + updateBackForward();
12784 + SetAttrs(webView, MUIA_WebView_URL, url, TAG_END);
12785 + free((void*) url);
12788 + void updateTitle(char *title)
12790 + char *titleConverted = CodesetsUTF8ToStr(CSA_Source, (IPTR) title, TAG_END);
12791 + if(titleConverted)
12793 + SetAttrs(webView, MUIA_WebView_Title, titleConverted, TAG_END);
12794 + CodesetsFreeA(titleConverted, NULL);
12796 + else if(title == NULL || *title == '\0')
12798 + SetAttrs(webView, MUIA_WebView_Title, "", TAG_END);
12801 + free((void*) title);
12804 + void updateBackForward()
12806 + WebView *webViewPtr;
12807 + GetAttr(MUIA_WebView_WebView, webView, (IPTR*) &webViewPtr);
12808 + if(webView)
12810 + int canGoBack = core(webViewPtr)->backForwardList()->backItem() != NULL;
12811 + SetAttrs(webView, MUIA_WebView_CanGoBack, (IPTR) canGoBack, TAG_END);
12812 + int canGoForward = core(webViewPtr)->backForwardList()->forwardItem() != NULL;
12813 + SetAttrs(webView, MUIA_WebView_CanGoForward, (IPTR) canGoForward, TAG_END);
12818 +IPTR WebView__OM_NEW(struct IClass *cl, Object *obj, struct opSet *msg)
12820 + struct WebView_DATA *data;
12821 + WebView *webView;
12822 + SDL_Surface *surface;
12823 + int width = 640;
12824 + int height = 480;
12825 + struct Hook *createNewHook = NULL;
12826 + struct Hook *alertHook = NULL;
12827 + struct Hook *confirmHook = NULL;
12828 + struct Hook *promptHook = NULL;
12829 + struct Hook *policyHook = NULL;
12830 + struct Hook *credentialsHook = NULL;
12831 + struct Hook *closeHook = NULL;
12832 + struct TagItem *tag = NULL, *tstate = msg->ops_AttrList;
12834 + /* Parse initial attributes --------------------------------------------*/
12835 + while ((tag = NextTagItem(&tstate)) != NULL)
12837 + switch (tag->ti_Tag)
12839 + case MUIA_WebView_CreateNewHook:
12840 + createNewHook = (struct Hook*) tag->ti_Data;
12841 + break;
12842 + case MUIA_WebView_AlertHook:
12843 + alertHook = (struct Hook*) tag->ti_Data;
12844 + break;
12845 + case MUIA_WebView_ConfirmHook:
12846 + confirmHook = (struct Hook*) tag->ti_Data;
12847 + break;
12848 + case MUIA_WebView_PromptHook:
12849 + promptHook = (struct Hook*) tag->ti_Data;
12850 + break;
12851 + case MUIA_WebView_PolicyHook:
12852 + policyHook = (struct Hook*) tag->ti_Data;
12853 + break;
12854 + case MUIA_WebView_CredentialsHook:
12855 + credentialsHook = (struct Hook*) tag->ti_Data;
12856 + break;
12857 + case MUIA_WebView_CloseHook:
12858 + closeHook = (struct Hook*) tag->ti_Data;
12859 + break;
12860 + default:
12861 + continue; /* Don't supress non-processed tags */
12864 + tag->ti_Tag = TAG_IGNORE;
12867 + surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
12868 + if(!surface)
12870 + return 0;
12874 + webView = WebView::createInstance();
12875 + webView->setDownloadDelegate(DownloadDelegateAROS::createInstance());
12876 + webView->setPolicyDelegate(PolicyDelegateAROS::sharedInstance());
12878 + if(!webView)
12880 + SDL_FreeSurface(surface);
12881 + return 0;
12884 + obj = (Object *) DoSuperNewTags
12886 + cl, obj, NULL,
12888 + MUIA_InnerLeft, 0,
12889 + MUIA_InnerTop, 0,
12890 + MUIA_InnerRight, 0,
12891 + MUIA_InnerBottom, 0,
12892 + MUIA_ContextMenu, MenustripObject, End,
12893 + MUIA_CycleChain, 1,
12895 + TAG_MORE, (IPTR) msg->ops_AttrList
12896 + );
12898 + if(!obj)
12900 + delete webView;
12901 + SDL_FreeSurface(surface);
12902 + return 0;
12905 + webView->parseConfigFile(NULL);
12907 + MyWebNotificationDelegate* myWebDelegate = new MyWebNotificationDelegate(obj);
12908 + webView->setWebNotificationDelegate(myWebDelegate);
12909 + webView->setJSActionDelegate(myWebDelegate);
12910 + webView->setWebFrameLoadDelegate(myWebDelegate);
12912 + data = (struct WebView_DATA *) INST_DATA(cl, obj);
12914 + data->webView = webView;
12915 + data->surface = surface;
12916 + data->needsRedrawing = 0;
12917 + data->isActive = 0;
12918 + data->toolTip = StrDup("");
12919 + data->url = StrDup("");
12920 + data->title = StrDup("");
12921 + data->ehn.ehn_Events = IDCMP_MOUSEBUTTONS | IDCMP_MOUSEMOVE | IDCMP_RAWKEY;
12922 + data->ehn.ehn_Priority = 0;
12923 + data->ehn.ehn_Flags = 0;
12924 + data->ehn.ehn_Object = obj;
12925 + data->ehn.ehn_Class = cl;
12926 + data->createNewHook = createNewHook;
12927 + data->alertHook = alertHook;
12928 + data->confirmHook = confirmHook;
12929 + data->promptHook = promptHook;
12930 + data->policyHook = policyHook;
12931 + data->credentialsHook = credentialsHook;
12932 + data->closeHook = closeHook;
12933 + data->state = MUIV_WebView_State_Ready;
12934 + data->ignoreUpdateRequests = FALSE;
12935 + data->nesting = 0;
12937 + InitRastPort(&data->bufferRastPort);
12939 + D(bug("WebView_New(%lx)\n", obj));
12940 + return (IPTR)obj;
12943 +IPTR WebView__OM_DISPOSE(struct IClass *cl, Object *obj, Msg msg)
12945 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
12946 + Object *contextMenu;
12947 + GetAttr(MUIA_ContextMenu, obj, (IPTR*) &contextMenu);
12948 + SetAttrs(obj, MUIA_ContextMenu, NULL, TAG_END);
12949 + MUI_DisposeObject(contextMenu);
12951 + delete data->webView;
12952 + FreeVec(data->toolTip);
12953 + FreeVec(data->url);
12954 + FreeVec(data->title);
12955 + SDL_FreeSurface(data->surface);
12956 + FreeBitMap(data->bufferRastPort.BitMap);
12957 + return DoSuperMethodA(cl,obj,msg);
12960 +IPTR WebView__OM_SET(Class *cl, Object *obj, struct opSet *msg)
12962 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
12963 + struct TagItem *tags = msg->ops_AttrList;
12964 + struct TagItem *tag;
12966 + while ((tag = NextTagItem(&tags)) != NULL)
12968 + switch(tag->ti_Tag)
12970 + case MUIA_WebView_Surface:
12971 + data->surface = (SDL_Surface *)tag->ti_Data;
12972 + break;
12973 + case MUIA_WebView_ToolTip:
12974 + if(data->toolTip)
12975 + FreeVec(data->toolTip);
12976 + data->toolTip = StrDup((char*) tag->ti_Data);
12977 + break;
12978 + case MUIA_WebView_State:
12979 + data->state = (int) tag->ti_Data;
12980 + break;
12981 + case MUIA_WebView_EstimatedProgress:
12982 + data->estimatedProgress = (int) tag->ti_Data;
12983 + break;
12984 + case MUIA_WebView_Title:
12985 + if(data->title)
12986 + FreeVec(data->title);
12987 + data->title = StrDup((char*) tag->ti_Data);
12988 + break;
12989 + case MUIA_WebView_URL:
12990 + if(data->url)
12991 + FreeVec(data->url);
12992 + data->url = StrDup((char*) tag->ti_Data);
12993 + break;
12994 + case MUIA_WebView_CreateNewHook:
12995 + data->createNewHook = (struct Hook*) tag->ti_Data;
12996 + break;
12997 + case MUIA_WebView_Active:
12998 + data->isActive = (int) tag->ti_Data;
12999 + if(data->isActive)
13001 + Object *active;
13002 + GetAttr(MUIA_Window_ActiveObject, _win(obj), (IPTR*) &active);
13003 + if(active != obj && active != MUIV_Window_ActiveObject_None)
13005 + SetAttrs(_win(obj), MUIA_Window_ActiveObject, obj, TAG_END);
13006 + SetAttrs(_win(obj), MUIA_Window_ActiveObject, MUIV_Window_ActiveObject_None, TAG_END);
13009 + else
13011 + Object *active;
13012 + GetAttr(MUIA_Window_ActiveObject, _win(obj), (IPTR*) &active);
13013 + if(active == obj)
13014 + SetAttrs(_win(obj), MUIA_Window_ActiveObject, MUIV_Window_ActiveObject_None, TAG_END);
13016 + data->webView->updateFocusedAndActiveState();
13017 + break;
13018 + case MUIA_WebView_CanGoBack:
13019 + data->canGoBack = (int) tag->ti_Data;
13020 + break;
13021 + case MUIA_WebView_CanGoForward:
13022 + data->canGoForward = (int) tag->ti_Data;
13023 + break;
13024 + case MUIA_WebView_SourceMode:
13025 + data->webView->setInViewSourceMode((bool) tag->ti_Data);
13026 + break;
13027 + } /* switch(tag->ti_Tag) */
13029 + } /* while ((tag = NextTagItem(&tags)) != NULL) */
13031 + return DoSuperMethodA(cl, obj, (Msg)msg);
13035 +IPTR WebView__OM_GET(Class *cl, Object *obj, struct opGet *msg)
13037 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13038 + IPTR retval = TRUE;
13040 + switch(msg->opg_AttrID)
13042 + case MUIA_WebView_Surface:
13043 + *(SDL_Surface **)msg->opg_Storage = data->surface;
13044 + break;
13045 + case MUIA_WebView_ToolTip:
13046 + *(char **)msg->opg_Storage = data->toolTip;
13047 + break;
13048 + case MUIA_WebView_State:
13049 + *(int *)msg->opg_Storage = data->state;
13050 + break;
13051 + case MUIA_WebView_EstimatedProgress:
13052 + *(int *)msg->opg_Storage = data->estimatedProgress;
13053 + break;
13054 + case MUIA_WebView_Title:
13055 + *(char **)msg->opg_Storage = data->title;
13056 + break;
13057 + case MUIA_WebView_URL:
13058 + *(char **)msg->opg_Storage = data->url;
13059 + break;
13060 + case MUIA_WebView_WebView:
13061 + *(WebView**)msg->opg_Storage = data->webView;
13062 + break;
13063 + case MUIA_WebView_CanGoBack:
13064 + *(int *)msg->opg_Storage = data->canGoBack;
13065 + break;
13066 + case MUIA_WebView_CanGoForward:
13067 + *(int *)msg->opg_Storage = data->canGoForward;
13068 + break;
13069 + case MUIA_WebView_Active:
13070 + *(int *)msg->opg_Storage = data->isActive;
13071 + break;
13072 + case MUIA_WebView_Data:
13074 + if(data->webView->mainFrame()->canProvideDocumentSource())
13076 + WTF::RefPtr<WebCore::SharedBuffer> sourceDataBuffer = data->webView->mainFrame()->dataSource()->data();
13077 + if(sourceDataBuffer != NULL)
13079 + ULONG sourceDataLength = sourceDataBuffer->size();
13080 + STRPTR sourceData = (STRPTR) AllocVec(sourceDataLength + 1, MEMF_ANY);
13081 + sourceData[sourceDataLength] = 0;
13082 + CopyMem(sourceDataBuffer->data(), sourceData, sourceDataLength);
13083 + *(STRPTR*)msg->opg_Storage = sourceData;
13085 + else
13087 + *(STRPTR*)msg->opg_Storage = StrDup("");
13090 + else
13092 + *(STRPTR*)msg->opg_Storage = StrDup("");
13094 + break;
13096 + default:
13097 + retval = DoSuperMethodA(cl, obj, (Msg)msg);
13098 + break;
13101 + return retval;
13104 +IPTR WebView__MUIM_Setup(struct IClass *cl, Object *obj, struct MUIP_Setup *msg)
13106 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13107 + SDL_Rect clientRect = {0, 0, 640, 480};
13109 + if (0 == DoSuperMethodA(cl, obj, (Msg) msg))
13110 + return FALSE;
13112 + data->webView->initWithFrame(clientRect, NULL, NULL);
13113 + data->webView->setViewWindow(obj);
13114 +// WebView_loadHTMLString(data->webView, "hello, world", "http://janus");
13115 +// data->webView->mainFrame()->loadURL("http://janus/~phm/test.html");
13117 + DoMethod(_win(obj), MUIM_Window_AddEventHandler, (IPTR)&data->ehn);
13119 + data->timer.ihn_Flags = MUIIHNF_TIMER;
13120 + data->timer.ihn_Method = MUIM_WebView_FireWebKitEvents;
13121 + data->timer.ihn_Object = obj;
13122 + data->timer.ihn_Millis = 1;
13124 + DoMethod(_app(obj), MUIM_Application_AddInputHandler, (IPTR)&data->timer);
13126 + return TRUE;
13129 +IPTR WebView__MUIM_Cleanup(struct IClass *cl, Object *obj, struct MUIP_Cleanup *msg)
13131 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13133 + DoMethod(_app(obj), MUIM_Application_RemInputHandler, (IPTR)&data->timer);
13134 + DoMethod(_win(obj), MUIM_Window_RemEventHandler, (IPTR)&data->ehn);
13136 + return (DoSuperMethodA(cl, obj, (Msg) msg));
13139 +IPTR WebView__MUIM_AskMinMax(Class *cl, Object *obj, struct MUIP_AskMinMax *msg)
13141 + DoSuperMethodA(cl, obj, (Msg)msg);
13143 + msg->MinMaxInfo->DefWidth = 640;
13144 + msg->MinMaxInfo->DefHeight = 480;
13145 + msg->MinMaxInfo->MaxWidth = MUI_MAXMAX;
13146 + msg->MinMaxInfo->MaxHeight = MUI_MAXMAX;
13148 + return TRUE;
13151 +IPTR WebView__MUIM_Draw(struct IClass *cl, Object *obj, struct MUIP_Draw *msg)
13153 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13154 + struct List *children;
13155 + APTR cstate;
13156 + Object *child;
13157 + int width = _mwidth(obj);
13158 + int height = _mheight(obj);
13159 + int top = _mtop(obj);
13160 + int left = _mleft(obj);
13162 + DoSuperMethodA(cl, obj, (Msg)msg);
13164 + if (_mwidth(obj) < 1 || _mheight(obj) < 1)
13165 + return TRUE;
13167 + D(bug("WebView__MUIM_Draw start\n"));
13169 + if (!data->bufferRastPort.BitMap)
13171 + data->bufferRastPort.BitMap = AllocBitMap(data->surface->w, data->surface->h, 32, BMF_DISPLAYABLE | BMF_CLEAR, _rp(obj)->BitMap);
13172 + // no point in drawing if we don't have enough memory to show it
13173 + if (!data->bufferRastPort.BitMap)
13174 + return TRUE;
13177 + if(data->surface->w != width || data->surface->h != height)
13179 + D(bug("Resize!\n"));
13180 + struct BitMap *bufferBitMap = AllocBitMap(width, height, 32, BMF_DISPLAYABLE | BMF_CLEAR, _rp(obj)->BitMap);
13181 + SDL_Surface *surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
13182 + if(surface != NULL && bufferBitMap != NULL)
13184 + SDL_FreeSurface(data->surface);
13185 + data->surface = surface;
13186 + data->webView->setViewWindow(obj);
13188 + FreeBitMap(data->bufferRastPort.BitMap);
13189 + data->bufferRastPort.BitMap = bufferBitMap;
13191 + SDL_ResizeEvent ev = { SDL_VIDEORESIZE, width, height };
13192 + data->webView->onResize(ev);
13194 + else
13196 + if(surface)
13197 + SDL_FreeSurface(surface);
13198 + if(bufferBitMap)
13199 + FreeBitMap(bufferBitMap);
13200 + return 0;
13204 + if (msg->flags & MADF_DRAWOBJECT)
13206 + std::vector<BalRectangle> dirtyRegion = data->webView->dirtyRegion();
13207 + if(dirtyRegion.size() > 0)
13209 + SDL_ExposeEvent ev;
13210 + data->ignoreUpdateRequests = TRUE;
13211 + data->webView->onExpose(ev);
13212 + data->ignoreUpdateRequests = FALSE;
13213 + }
13215 + BltBitMapRastPort(data->bufferRastPort.BitMap, 0, 0, _rp(obj), _mleft(obj), _mtop(obj), data->surface->w, data->surface->h, 0xC0);
13217 + else
13219 + if(data->scrollData)
13221 + Layer *Layer = _rp(obj)->Layer;
13223 + ScrollRaster(&data->bufferRastPort, data->scrollData->dx, data->scrollData->dy,
13224 + data->scrollData->x,
13225 + data->scrollData->y,
13226 + data->scrollData->width + data->scrollData->x - 1,
13227 + data->scrollData->height + data->scrollData->y - 1);
13229 + std::vector<BalRectangle> dirtyRegion = data->webView->dirtyRegion();
13230 + if(dirtyRegion.size() > 0)
13232 + SDL_ExposeEvent ev;
13233 + data->ignoreUpdateRequests = TRUE;
13234 + data->webView->onExpose(ev);
13235 + data->ignoreUpdateRequests = FALSE;
13236 + }
13238 + BltBitMapRastPort(data->bufferRastPort.BitMap, 0, 0, _rp(obj), _mleft(obj), _mtop(obj), data->surface->w, data->surface->h, 0xC0);
13240 + else
13242 + SDL_ExposeEvent ev;
13243 + data->webView->onExpose(ev);
13248 + get(obj, MUIA_Group_ChildList, &children);
13249 + cstate = children->lh_Head;
13250 + while(child && (child = NextObject(&cstate)))
13252 + MUI_Redraw(child, MADF_DRAWOBJECT);
13255 + D(bug("WebView__MUIM_Draw end\n"));
13256 + return TRUE;
13259 +#define _between(a,x,b) ((x)>=(a) && (x)<=(b))
13260 +#define _isinobject(x,y) (_between(_mleft(obj),(x),_mright (obj)) && _between(_mtop(obj) ,(y),_mbottom(obj)))
13262 +IPTR WebView__MUIM_HandleEvent(struct IClass *cl, Object *obj, struct MUIP_HandleEvent *msg)
13264 + ULONG retval = 0;
13265 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13267 + if (msg->imsg)
13269 + struct IntuiMessage im = *msg->imsg;
13270 + im.MouseX -= _mleft(obj);
13271 + im.MouseY -= _mtop(obj);
13272 + switch (im.Class)
13274 + case IDCMP_MOUSEBUTTONS:
13276 + if (_isinobject(msg->imsg->MouseX,msg->imsg->MouseY))
13278 + switch (im.Code & ~IECODE_UP_PREFIX)
13280 + case IECODE_LBUTTON:
13281 + if (im.Code & ~IECODE_UP_PREFIX)
13283 + SetAttrs(obj, MUIA_WebView_Active, TRUE, TAG_END);
13284 + /* Fake mouse move event when taking focus is necessary to fill some EventHandler fields */
13285 + data->webView->onMouseMotion(im);
13287 + case IECODE_MBUTTON:
13288 + if (im.Code & IECODE_UP_PREFIX)
13289 + data->webView->onMouseButtonUp(im);
13290 + else
13291 + data->webView->onMouseButtonDown(im);
13292 + break;
13295 + else
13297 + if(data->isActive)
13299 + if(im.Code & IECODE_UP_PREFIX)
13301 + data->webView->onMouseButtonUp(im);
13303 + SetAttrs(obj, MUIA_WebView_Active, FALSE, TAG_END);
13307 + break;
13308 + case IDCMP_MOUSEMOVE:
13310 + if (_isinobject(msg->imsg->MouseX,msg->imsg->MouseY) || data->isActive)
13312 + data->webView->onMouseMotion(im);
13314 + data->mouseX = msg->imsg->MouseX;
13315 + data->mouseY = msg->imsg->MouseY;
13317 + break;
13318 + case IDCMP_RAWKEY:
13320 + if(im.Code == RAWKEY_TAB)
13322 + Object *active;
13323 + GetAttr(MUIA_Window_ActiveObject, _win(obj), (IPTR*) &active);
13324 + if(active == obj && data->isActive == 0)
13326 + /* WebView Object got activated in the event chain */
13327 + data->webView->clearFocusNode();
13328 + retval = MUI_EventHandlerRC_Eat;
13329 + data->isActive = 1;
13330 + data->webView->updateFocusedAndActiveState();
13331 + break;
13333 + else if(active != obj && data->isActive == 0)
13335 + /* Ignore tab events if object is not active */
13336 + break;
13340 + if(data->isActive)
13341 + retval = MUI_EventHandlerRC_Eat;
13343 + if(
13344 + _isinobject(msg->imsg->MouseX,msg->imsg->MouseY) &&
13345 + (im.Code == RAWKEY_NM_WHEEL_UP ||
13346 + im.Code == RAWKEY_NM_WHEEL_DOWN ||
13347 + im.Code == RAWKEY_NM_WHEEL_LEFT ||
13348 + im.Code == RAWKEY_NM_WHEEL_DOWN)
13351 + data->webView->onScroll(im);
13353 + else
13355 + if (im.Code & IECODE_UP_PREFIX)
13356 + data->webView->onKeyUp(im);
13357 + else
13358 + data->webView->onKeyDown(im);
13361 + /* Override active object if needed, so toggling between page
13362 + * elements won't interfere with Zune object cycle */
13363 + if(im.Code == RAWKEY_TAB && data->isActive)
13365 + SetAttrs(_win(obj), MUIA_Window_ActiveObject, MUIV_Window_ActiveObject_None, TAG_END);
13368 + break;
13372 + return retval;
13375 +IPTR WebView__MUIM_ContextMenuBuild(struct IClass *cl, Object *obj, struct MUIP_ContextMenuBuild *msg)
13377 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13379 + /* Create fake mouse event */
13380 + struct IntuiMessage im;
13381 + im.MouseX = data->mouseX - _mleft(obj);
13382 + im.MouseY = data->mouseY - _mtop(obj);
13383 + im.Class = IDCMP_MOUSEBUTTONS;
13384 + im.Code = IECODE_RBUTTON;
13385 + im.Qualifier = 0;
13387 + data->webView->onMouseButtonDown(im);
13389 + return DoSuperMethodA(cl, obj, (Msg) msg);
13392 +IPTR WebView__MUIM_ContextMenuChoice(struct IClass *cl, Object *obj, struct MUIP_ContextMenuChoice *msg)
13394 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13396 + /* Create fake mouse event */
13397 + struct IntuiMessage im;
13398 + im.MouseX = data->mouseX - _mleft(obj);
13399 + im.MouseY = data->mouseY - _mtop(obj);
13400 + im.Class = IDCMP_MOUSEBUTTONS;
13401 + im.Code = IECODE_RBUTTON | IECODE_UP_PREFIX;
13402 + im.Qualifier = 0;
13404 + data->webView->onMouseButtonUp(im);
13406 + return DoSuperMethodA(cl, obj, (Msg) msg);
13409 +IPTR WebView__MUIM_WebView_UpdateRect(struct IClass *cl, Object *obj, struct MUIP_WebView_UpdateRect *msg)
13411 + D(bug("WebView__MUIM_WebView_UpdateRect start\n"));
13412 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13414 + // source format depends on the endianess
13415 + UBYTE srcformat;
13416 +#if SDL_BYTEORDER == SDL_BIG_ENDIAN
13417 + srcformat = RECTFMT_ARGB32;
13418 +#else
13419 + srcformat = RECTFMT_BGRA32;
13420 +#endif
13422 + if( SDL_MUSTLOCK(data->surface) )
13423 + { SDL_LockSurface(data->surface); }
13425 + WritePixelArray(data->surface->pixels, msg->x, msg->y, data->surface->pitch, &data->bufferRastPort, msg->x, msg->y, msg->width, msg->height, srcformat);
13427 + if(!data->ignoreUpdateRequests)
13429 + BltBitMapRastPort(data->bufferRastPort.BitMap, msg->x, msg->y, _rp(obj), _mleft(obj) + msg->x, _mtop(obj) + msg->y, msg->width, msg->height, 0xC0);
13432 + if( SDL_MUSTLOCK(data->surface) )
13433 + { SDL_UnlockSurface(data->surface); }
13435 + D(bug("WebView__MUIM_WebView_UpdateRect end\n"));
13436 + return TRUE;
13439 +IPTR WebView__MUIM_WebView_Expose(struct IClass *cl, Object *obj, Msg msg)
13441 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13442 + D(bug("WebView__MUIM_WebView_Expose start nesting %d\n", data->nesting++));
13443 + data->expose = TRUE;
13444 + D(bug("WebView__MUIM_WebView_Expose end %d\n", data->nesting--));
13445 + return TRUE;
13448 +IPTR WebView__MUIM_WebView_LoadURL(struct IClass *cl, Object *obj, struct MUIP_WebView_LoadURL *msg)
13450 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13451 + data->webView->clearMainFrameName();
13452 + data->webView->mainFrame()->loadURL(msg->url);
13453 + return TRUE;
13456 +IPTR WebView__MUIM_WebView_GoBack(struct IClass *cl, Object *obj, Msg msg)
13458 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13459 + data->webView->clearMainFrameName();
13460 + data->webView->goBack();
13461 + return TRUE;
13464 +IPTR WebView__MUIM_WebView_GoForward(struct IClass *cl, Object *obj, Msg msg)
13466 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13467 + data->webView->clearMainFrameName();
13468 + data->webView->goForward();
13469 + return TRUE;
13472 +IPTR WebView__MUIM_WebView_StopLoading(struct IClass *cl, Object *obj, Msg msg)
13474 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13475 + data->webView->mainFrame()->stopLoading();
13476 + return TRUE;
13479 +IPTR WebView__MUIM_WebView_Reload(struct IClass *cl, Object *obj, Msg msg)
13481 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13482 + data->webView->clearMainFrameName();
13483 + data->webView->mainFrame()->reload();
13484 + return TRUE;
13487 +IPTR WebView__MUIM_WebView_CreateNew(struct IClass *cl, Object *obj, MUIP_WebView_CreateNew *msg)
13489 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13490 + if(data->createNewHook)
13492 + return DoMethod(obj, MUIM_CallHook, data->createNewHook, msg->specification);
13494 + else
13495 + return NULL;
13498 +IPTR WebView__MUIM_WebView_Alert(struct IClass *cl, Object *obj, struct MUIP_WebView_Alert *msg)
13500 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13501 + if(data->alertHook)
13503 + return DoMethod(obj, MUIM_CallHook, data->alertHook, msg->message);
13505 + else
13506 + return NULL;
13509 +IPTR WebView__MUIM_WebView_Confirm(struct IClass *cl, Object *obj, struct MUIP_WebView_Confirm *msg)
13511 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13512 + if(data->confirmHook)
13514 + return DoMethod(obj, MUIM_CallHook, data->confirmHook, msg->message);
13516 + else
13517 + return NULL;
13520 +IPTR WebView__MUIM_WebView_Prompt(struct IClass *cl, Object *obj, struct MUIP_WebView_Prompt *msg)
13522 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13523 + if(data->promptHook)
13525 + STRPTR args[] = { msg->message, msg->defaultAnswer };
13526 + return DoMethod(obj, MUIM_CallHook, data->promptHook, args);
13528 + else
13529 + return NULL;
13532 +IPTR WebView__MUIM_WebView_RequestPolicy(struct IClass *cl, Object *obj, struct MUIP_WebView_RequestPolicy *msg)
13534 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13535 + if(data->policyHook)
13537 + CONST_STRPTR args[] = { msg->fileName, msg->mimeType };
13538 + return DoMethod(obj, MUIM_CallHook, data->policyHook, args);
13540 + else
13541 + return NULL;
13544 +IPTR WebView__MUIM_WebView_RequestCredentials(struct IClass *cl, Object *obj, struct MUIP_WebView_RequestCredentials *msg)
13546 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13547 + if(data->credentialsHook)
13549 + IPTR args[] = { (IPTR) msg->host, (IPTR) msg->realm, (IPTR) msg->username, (IPTR) msg->password };
13550 + return DoMethod(obj, MUIM_CallHook, data->credentialsHook, args);
13552 + else
13553 + return (IPTR) FALSE;
13556 +IPTR WebView__MUIM_WebView_ReturnFocus(struct IClass *cl, Object *obj, Msg msg)
13558 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13559 + DoMethod(_win(obj), MUIA_Window_ActiveObject, MUIV_Window_ActiveObject_Next);
13560 + data->isActive = 0;
13561 + data->webView->updateFocusedAndActiveState();
13562 + return TRUE;
13565 +IPTR WebView__MUIM_WebView_FireWebKitEvents(struct IClass *cl, Object *obj, Msg msg)
13567 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13568 + if(data->expose)
13570 + data->expose = FALSE;
13571 + MUI_Redraw(obj, MADF_DRAWUPDATE);
13573 + data->webView->fireWebKitEvents();
13574 + return TRUE;
13577 +IPTR WebView__MUIM_WebView_SearchFor(struct IClass *cl, Object *obj, struct MUIP_WebView_SearchFor *msg)
13579 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13580 + data->webView->searchFor(msg->criteria, msg->forward, msg->caseSensitive, true);
13581 + return TRUE;
13584 +IPTR WebView__MUIM_WebView_Close(struct IClass *cl, Object *obj, Msg msg)
13586 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13587 + return DoMethod(obj, MUIM_CallHook, data->closeHook, NULL);
13590 +IPTR WebView__MUIM_WebView_Zoom(struct IClass *cl, Object *obj, struct MUIP_WebView_Zoom *msg)
13592 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13593 + switch(msg->mode)
13595 + case MUIV_WebView_ZoomIn:
13596 + return data->webView->zoomPageIn();
13597 + break;
13598 + case MUIV_WebView_ZoomOut:
13599 + return data->webView->zoomPageOut();
13600 + break;
13601 + case MUIV_WebView_ZoomReset:
13602 + if(!data->webView->canResetPageZoom())
13603 + return FALSE;
13604 + else
13605 + data->webView->resetPageZoom();
13606 + break;
13610 +IPTR WebView__MUIM_WebView_LoadHTMLString(struct IClass *cl, Object *obj, struct MUIP_WebView_LoadHTMLString *msg)
13612 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13613 + data->webView->mainFrame()->loadHTMLString(msg->data, msg->url);
13614 + return TRUE;
13617 +IPTR WebView__MUIM_WebView_Scroll(struct IClass *cl, Object *obj, struct MUIP_WebView_Scroll *msg)
13619 + struct WebView_DATA *data = (struct WebView_DATA *) INST_DATA(cl, obj);
13620 + data->scrollData = msg;
13621 + MUI_Redraw(obj, MADF_DRAWUPDATE);
13622 + data->scrollData = NULL;
13625 +/*** Class startup and shutdown *******************************************/
13626 +int SDL_Startup()
13628 + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
13629 + return FALSE;
13631 + return TRUE;
13634 +void SDL_Shutdown()
13636 + SDL_QuitSubSystem(SDL_INIT_VIDEO);
13637 + SDL_Quit();
13640 +__ZUNE_CUSTOMCLASS_START(WebView)
13641 +__ZUNE_CUSTOMCLASS_METHOD(WebView__OM_DISPOSE, OM_DISPOSE, Msg);
13642 +__ZUNE_CUSTOMCLASS_METHOD(WebView__OM_NEW, OM_NEW, struct opSet*);
13643 +__ZUNE_CUSTOMCLASS_METHOD(WebView__OM_GET, OM_GET, struct opGet*);
13644 +__ZUNE_CUSTOMCLASS_METHOD(WebView__OM_SET, OM_SET, struct opSet*);
13645 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_Setup, MUIM_Setup, struct MUIP_Setup*);
13646 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_Cleanup, MUIM_Cleanup, struct MUIP_Cleanup*);
13647 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_Draw, MUIM_Draw, struct MUIP_Draw*);
13648 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_AskMinMax, MUIM_AskMinMax, struct MUIP_AskMinMax*);
13649 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_HandleEvent, MUIM_HandleEvent, struct MUIP_HandleEvent*);
13650 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_ContextMenuBuild, MUIM_ContextMenuBuild, struct MUIP_ContextMenuBuild*);
13651 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_ContextMenuChoice, MUIM_ContextMenuChoice, struct MUIP_ContextMenuChoice*);
13652 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_UpdateRect, MUIM_WebView_UpdateRect, struct MUIP_WebView_UpdateRect*);
13653 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Expose, MUIM_WebView_Expose, Msg);
13654 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_LoadURL, MUIM_WebView_LoadURL, struct MUIP_WebView_LoadURL*);
13655 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_GoBack, MUIM_WebView_GoBack, Msg);
13656 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_GoForward, MUIM_WebView_GoForward, Msg);
13657 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_StopLoading, MUIM_WebView_StopLoading, Msg);
13658 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Reload, MUIM_WebView_Reload, Msg);
13659 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_CreateNew, MUIM_WebView_CreateNew, struct MUIP_WebView_CreateNew*);
13660 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_ReturnFocus, MUIM_WebView_ReturnFocus, Msg);
13661 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_FireWebKitEvents, MUIM_WebView_FireWebKitEvents, Msg);
13662 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_SearchFor, MUIM_WebView_SearchFor, struct MUIP_WebView_SearchFor*);
13663 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Alert, MUIM_WebView_Alert, struct MUIP_WebView_Alert*);
13664 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Confirm, MUIM_WebView_Confirm, struct MUIP_WebView_Confirm*);
13665 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Prompt, MUIM_WebView_Prompt, struct MUIP_WebView_Prompt*);
13666 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_RequestPolicy, MUIM_WebView_RequestPolicy, struct MUIP_WebView_RequestPolicy*);
13667 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_RequestCredentials, MUIM_WebView_RequestCredentials, struct MUIP_WebView_RequestCredentials*);
13668 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Close, MUIM_WebView_Close, Msg);
13669 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Zoom, MUIM_WebView_Zoom, struct MUIP_WebView_Zoom*);
13670 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_LoadHTMLString, MUIM_WebView_LoadHTMLString, struct MUIP_WebView_LoadHTMLString*);
13671 +__ZUNE_CUSTOMCLASS_METHOD(WebView__MUIM_WebView_Scroll, MUIM_WebView_Scroll, struct MUIP_WebView_Scroll*);
13672 +__ZUNE_CUSTOMCLASS_END(WebView, NULL, MUIC_Area, NULL)
13674 +ADD2INIT(SDL_Startup, -1);
13675 +ADD2EXIT(SDL_Shutdown, -1);
13676 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.h
13677 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.h 1970-01-01 01:00:00.000000000 +0100
13678 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune.h 2018-06-13 07:27:37.570979727 +0100
13679 @@ -0,0 +1,106 @@
13680 +#ifndef _BROWSER_H
13681 +#define _BROWSER_H
13684 + Copyright � 2008, The AROS Development Team. All rights reserved.
13685 + $Id$
13688 +#include <exec/types.h>
13689 +#include <libraries/mui.h>
13691 +/*** Identifier base ********************************************************/
13692 +#define MUIB_WebView (TAG_USER | 0x10000000)
13694 +/*** Public Methods *********************************************************/
13695 +#define MUIM_WebView_UpdateRect (MUIB_WebView|0x00000000)
13696 +struct MUIP_WebView_UpdateRect {STACKED ULONG MethodID; STACKED int x, y, width, height;};
13697 +#define MUIM_WebView_Expose (MUIB_WebView|0x00000001)
13698 +#define MUIM_WebView_LoadURL (MUIB_WebView|0x00000002)
13699 +struct MUIP_WebView_LoadURL {STACKED ULONG MethodID; STACKED char *url;};
13700 +#define MUIM_WebView_GoBack (MUIB_WebView|0x00000003)
13701 +#define MUIM_WebView_GoForward (MUIB_WebView|0x00000004)
13702 +#define MUIM_WebView_StopLoading (MUIB_WebView|0x00000005)
13703 +#define MUIM_WebView_Reload (MUIB_WebView|0x00000006)
13704 +#define MUIM_WebView_CanGoBack (MUIB_WebView|0x00000007)
13705 +#define MUIM_WebView_CanGoForward (MUIB_WebView|0x00000008)
13706 +#define MUIM_WebView_CreateNew (MUIB_WebView|0x00000009)
13707 +struct WindowSpecification
13709 + LONG left;
13710 + LONG top;
13711 + LONG width;
13712 + LONG height;
13713 + BOOL menubar;
13714 + BOOL statusbar;
13715 + BOOL toolbar;
13716 + BOOL locationbar;
13717 + BOOL scrollbars;
13718 + BOOL resizable;
13719 + BOOL fullscreen;
13721 +struct MUIP_WebView_CreateNew {STACKED ULONG MethodID; STACKED struct WindowSpecification* specification; };
13722 +#define MUIM_WebView_ReturnFocus (MUIB_WebView|0x0000000a)
13723 +#define MUIM_WebView_FireWebKitEvents (MUIB_WebView|0x0000000b)
13724 +#define MUIM_WebView_SearchFor (MUIB_WebView|0x0000000c)
13725 +struct MUIP_WebView_SearchFor {STACKED ULONG MethodID; STACKED char *criteria; STACKED BYTE forward; STACKED BYTE caseSensitive;};
13726 +#define MUIM_WebView_Alert (MUIB_WebView|0x0000000d)
13727 +struct MUIP_WebView_Alert {STACKED ULONG MethodID; STACKED char *message;};
13728 +#define MUIM_WebView_Confirm (MUIB_WebView|0x0000000e)
13729 +struct MUIP_WebView_Confirm {STACKED ULONG MethodID; STACKED char *message;};
13730 +#define MUIM_WebView_Prompt (MUIB_WebView|0x0000000f)
13731 +struct MUIP_WebView_Prompt {STACKED ULONG MethodID; STACKED char *message; STACKED char *defaultAnswer;};
13732 +#define MUIM_WebView_RequestPolicy (MUIB_WebView|0x00000010)
13733 +struct MUIP_WebView_RequestPolicy {STACKED ULONG MethodID; STACKED const char *fileName; STACKED const char *mimeType;};
13734 +#define MUIM_WebView_RequestCredentials (MUIB_WebView|0x00000011)
13735 +struct MUIP_WebView_RequestCredentials {STACKED ULONG MethodID; STACKED const char *host; STACKED const char *realm; STACKED char **username; STACKED char **password; };
13736 +#define MUIM_WebView_Close (MUIB_WebView|0x00000012)
13737 +#define MUIM_WebView_Zoom (MUIB_WebView|0x00000013)
13738 +struct MUIP_WebView_Zoom {STACKED ULONG MethodID; STACKED ULONG mode;};
13739 +#define MUIM_WebView_LoadHTMLString (MUIB_WebView|0x00000014)
13740 +struct MUIP_WebView_LoadHTMLString {STACKED ULONG MethodID; STACKED char *url; STACKED char *data; STACKED ULONG length; STACKED char *mime; STACKED char* encoding;};
13741 +#define MUIM_WebView_Scroll (MUIB_WebView|0x00000015)
13742 +struct MUIP_WebView_Scroll {STACKED ULONG MethodID; STACKED int x, y, width, height, dx, dy;};
13744 +/*** Attributes *************************************************************/
13745 +#define MUIA_WebView_UseWinBorder (MUIB_WebView|0x00000000)
13746 +#define MUIA_WebView_Surface (MUIB_WebView|0x00000001)
13747 +#define MUIA_WebView_ToolTip (MUIB_WebView|0x00000002)
13748 +#define MUIA_WebView_State (MUIB_WebView|0x00000003)
13749 +#define MUIA_WebView_EstimatedProgress (MUIB_WebView|0x00000004)
13750 +#define MUIA_WebView_URL (MUIB_WebView|0x00000005)
13751 +#define MUIA_WebView_Title (MUIB_WebView|0x00000006)
13752 +#define MUIA_WebView_CreateNewHook (MUIB_WebView|0x00000007)
13753 +#define MUIA_WebView_WebView (MUIB_WebView|0x00000008)
13754 +#define MUIA_WebView_Active (MUIB_WebView|0x00000009)
13755 +#define MUIA_WebView_CanGoBack (MUIB_WebView|0x0000000a)
13756 +#define MUIA_WebView_CanGoForward (MUIB_WebView|0x0000000b)
13757 +#define MUIA_WebView_AlertHook (MUIB_WebView|0x0000000c)
13758 +#define MUIA_WebView_ConfirmHook (MUIB_WebView|0x0000000d)
13759 +#define MUIA_WebView_PromptHook (MUIB_WebView|0x0000000e)
13760 +#define MUIA_WebView_PolicyHook (MUIB_WebView|0x0000000f)
13761 +#define MUIA_WebView_CredentialsHook (MUIB_WebView|0x00000010)
13762 +#define MUIA_WebView_CloseHook (MUIB_WebView|0x00000011)
13763 +#define MUIA_WebView_Data (MUIB_WebView|0x00000012)
13764 +#define MUIA_WebView_SourceMode (MUIB_WebView|0x00000013)
13765 +#define MUIA_WebView_Expose (MUIB_WebView|0x00000014)
13767 +/*** Constants **************************************************************/
13768 +#define MUIV_WebView_State_Ready (MUIB_WebView|0x00000000)
13769 +#define MUIV_WebView_State_Connecting (MUIB_WebView|0x00000001)
13770 +#define MUIV_WebView_State_Loading (MUIB_WebView|0x00000002)
13771 +#define MUIV_WebView_State_Error (MUIB_WebView|0x00000003)
13772 +#define MUIV_WebView_Policy_Ignore (MUIB_WebView|0x00000004)
13773 +#define MUIV_WebView_Policy_Use (MUIB_WebView|0x00000005)
13774 +#define MUIV_WebView_Policy_Download (MUIB_WebView|0x00000006)
13775 +#define MUIV_WebView_ZoomIn (MUIB_WebView|0x00000007)
13776 +#define MUIV_WebView_ZoomOut (MUIB_WebView|0x00000008)
13777 +#define MUIV_WebView_ZoomReset (MUIB_WebView|0x00000009)
13779 +/*** Variables **************************************************************/
13780 +extern struct MUI_CustomClass *WebView_CLASS;
13782 +/*** Macros *****************************************************************/
13783 +#define WebViewObject BOOPSIOBJMACRO_START(WebView_CLASS->mcc_Class)
13785 +#endif /* _BROWSER_H */
13786 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune_private.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune_private.h
13787 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune_private.h 1970-01-01 01:00:00.000000000 +0100
13788 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/AROS/WebViewZune_private.h 2018-06-13 07:27:37.570979727 +0100
13789 @@ -0,0 +1,41 @@
13790 +#ifndef _WEBVIEW_PRIVATE_H_
13791 +#define _WEBVIEW_PRIVATE_H_
13794 + Copyright � 2008, The AROS Development Team. All rights reserved.
13795 + $Id$
13798 +/*** Instance data **********************************************************/
13799 +struct WebView_DATA
13801 + struct MUI_EventHandlerNode ehn;
13802 + SDL_Surface *surface;
13803 + WebView *webView;
13804 + int needsRedrawing;
13805 + char *toolTip;
13806 + int state;
13807 + int estimatedProgress;
13808 + char *title;
13809 + char *url;
13810 + struct Hook *createNewHook;
13811 + int isActive;
13812 + Object *oldActive;
13813 + int canGoBack;
13814 + int canGoForward;
13815 + struct MUI_InputHandlerNode timer;
13816 + int mouseX, mouseY;
13817 + struct Hook *alertHook;
13818 + struct Hook *confirmHook;
13819 + struct Hook *promptHook;
13820 + struct Hook *policyHook;
13821 + struct Hook *credentialsHook;
13822 + struct Hook *closeHook;
13823 + BOOL ignoreUpdateRequests;
13824 + int nesting;
13825 + struct MUIP_WebView_Scroll *scrollData;
13826 + BOOL expose;
13827 + struct RastPort bufferRastPort;
13830 +#endif /* _WEBVIEW_PRIVATE_H_ */
13831 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/DefaultPolicyDelegate.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/DefaultPolicyDelegate.h
13832 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/DefaultPolicyDelegate.h 2008-12-12 09:10:48.000000000 +0000
13833 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/DefaultPolicyDelegate.h 2018-06-13 07:27:37.570979727 +0100
13834 @@ -78,7 +78,7 @@
13835 * @endcode
13837 static DefaultPolicyDelegate* createInstance();
13838 -private:
13839 +protected:
13842 * DefaultPolicyDelegate default constructor
13843 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/WebDownload.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebDownload.cpp
13844 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/WebDownload.cpp 2009-08-10 16:04:47.000000000 +0100
13845 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebDownload.cpp 2018-06-13 07:27:37.570979727 +0100
13846 @@ -100,7 +100,7 @@
13847 WebCore::String suggestedFilename = webResponse->suggestedFilename();
13848 if(suggestedFilename.length() == 0)
13850 - suggestedFilename = response.url().string().substring(response.url().pathAfterLastSlash());
13851 + suggestedFilename = response.url().string().substring(response.url().pathAfterLastSlash(), response.url().pathEnd() - response.url().pathAfterLastSlash());
13854 m_download->downloadDelegate()->decideDestinationWithSuggestedFilename(m_download, suggestedFilename.utf8().data());
13855 @@ -211,6 +211,7 @@
13856 m_delegate = delegate;
13858 m_request = WebMutableURLRequest::createInstance(ResourceRequest(url));
13859 + m_response = NULL;
13861 m_priv->downloadClient = new DownloadClient(this);
13862 m_priv->currentSize = 0;
13863 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/WebFrame.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebFrame.cpp
13864 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/WebFrame.cpp 2009-10-07 16:28:50.000000000 +0100
13865 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebFrame.cpp 2018-06-13 07:27:37.570979727 +0100
13866 @@ -31,6 +31,7 @@
13868 #include "DefaultPolicyDelegate.h"
13869 #include "DOMCoreClasses.h"
13870 +#include "DOMImplementation.h"
13871 #include "FormValuesPropertyBag.h"
13872 #include "WebActionPropertyBag.h"
13873 #include "WebChromeClient.h"
13874 @@ -227,8 +228,8 @@
13875 delete (*it);
13877 delete d;
13878 - if (m_loadClient)
13879 - delete m_loadClient;
13880 + /*if (m_loadClient)
13881 + delete m_loadClient;*/
13884 WebFrame* WebFrame::createInstance()
13885 @@ -427,7 +428,22 @@
13886 if (!coreFrame)
13887 return strdup("");
13889 - return strdup(coreFrame->loader()->url().string().utf8().data());
13890 + String url("");
13891 + switch(coreFrame->loader()->state())
13893 + case FrameStateProvisional:
13894 + if(coreFrame->loader()->provisionalDocumentLoader())
13895 + url = coreFrame->loader()->provisionalDocumentLoader()->originalRequest().url().string();
13896 + break;
13897 + case FrameStateCommittedPage:
13898 + if(coreFrame->loader()->documentLoader())
13899 + url = coreFrame->loader()->documentLoader()->request().url().string();
13900 + break;
13901 + case FrameStateComplete:
13902 + url = coreFrame->loader()->url().string();
13903 + break;
13905 + return strdup(url.utf8().data());
13908 void WebFrame::stopLoading()
13909 @@ -789,30 +805,20 @@
13910 if (label.length() && !*result)
13911 return E_OUTOFMEMORY;
13912 return S_OK;
13914 +} */
13916 -HRESULT WebFrame::canProvideDocumentSource(bool* result)
13917 +bool WebFrame::canProvideDocumentSource()
13919 - HRESULT hr = S_OK;
13920 - *result = false;
13921 + WebDataSource* source = dataSource();
13922 + if (!source)
13923 + return false;
13925 - COMPtr<IWebDataSource> dataSource;
13926 - hr = WebFrame::dataSource(&dataSource);
13927 - if (FAILED(hr))
13928 - return hr;
13930 - COMPtr<IWebURLResponse> urlResponse;
13931 - hr = dataSource->response(&urlResponse);
13932 - if (SUCCEEDED(hr) && urlResponse) {
13933 - BSTR mimeTypeBStr;
13934 - if (SUCCEEDED(urlResponse->MIMEType(&mimeTypeBStr))) {
13935 - String mimeType(mimeTypeBStr, SysStringLen(mimeTypeBStr));
13936 - *result = mimeType == "text/html" || WebCore::DOMImplementation::isXMLMIMEType(mimeType);
13937 - SysFreeString(mimeTypeBStr);
13940 - return hr;
13941 -}*/
13942 + WebURLResponse* response = source->response();
13943 + if (!response)
13944 + return false;
13946 + return response->MIMEType() == "text/html" || WebCore::DOMImplementation::isXMLMIMEType(response->MIMEType());
13949 /*static IntRect printerRect(HDC printDC)
13951 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/WebFrame.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebFrame.h
13952 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/WebFrame.h 2009-10-02 14:41:19.000000000 +0100
13953 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebFrame.h 2018-06-13 07:27:37.570979727 +0100
13954 @@ -494,10 +494,8 @@
13957 * canProvideDocumentSource
13958 - * Not Implemented
13960 - //HRESULT canProvideDocumentSource(bool* result);
13962 + bool canProvideDocumentSource();
13965 * Get the frame url
13966 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/WebURLAuthenticationChallenge.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebURLAuthenticationChallenge.cpp
13967 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/WebURLAuthenticationChallenge.cpp 2009-02-27 17:11:08.000000000 +0000
13968 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebURLAuthenticationChallenge.cpp 2018-06-13 07:27:37.570979727 +0100
13969 @@ -65,12 +65,7 @@
13971 void WebURLAuthenticationChallenge::initWithProtectionSpace(WebURLProtectionSpace* space, WebURLCredential* proposedCredential, int previousFailureCount, WebURLResponse* failureResponse, WebError* error, WebURLAuthenticationChallengeSender* sender)
13973 - //LOG_ERROR("Calling the ala carte init for WebURLAuthenticationChallenge - is this really what you want to do?");
13975 - // FIXME: After we change AuthenticationChallenge to use "ResourceHandle" as the abstract "Sender" or "Source of this Auth Challenge", then we'll
13976 - // construct the AuthenticationChallenge with that as obtained from the webSender
13978 - m_authenticationChallenge = AuthenticationChallenge(space->protectionSpace(), proposedCredential->credential(), previousFailureCount, failureResponse->resourceResponse(), error->resourceError());
13979 + m_authenticationChallenge = AuthenticationChallenge(space->protectionSpace(), proposedCredential->credential(), previousFailureCount, failureResponse->resourceResponse(), error->resourceError(), sender->resourceHandle());
13982 void WebURLAuthenticationChallenge::initWithAuthenticationChallenge(WebURLAuthenticationChallenge* challenge, WebURLAuthenticationChallengeSender* sender)
13983 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/WebView.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebView.cpp
13984 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/WebView.cpp 2009-10-16 19:40:05.000000000 +0100
13985 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebView.cpp 2018-06-13 07:27:37.570979727 +0100
13986 @@ -128,6 +128,18 @@
13987 #include <proto/intuition.h>
13988 #include <proto/layout.h>
13989 #include <intuition/gadgetclass.h>
13990 +#elif PLATFORM(AROS)
13991 +extern "C" {
13992 +#include <proto/exec.h>
13993 +#include <intuition/intuition.h>
13994 +#include <proto/intuition.h>
13995 +#include <proto/muimaster.h>
13996 +#include <libraries/mui.h>
13997 +#include <WebViewZune.h>
13998 +#include <aros/debug.h>
13999 +#include <proto/alib.h>
14000 +#undef PageGroup
14002 #else
14003 #include <sys/sysinfo.h>
14004 #endif
14005 @@ -399,6 +411,8 @@
14006 memSize=physmem / (1024*1024);
14007 #elif PLATFORM(AMIGAOS4)
14008 memSize = IExec->AvailMem(MEMF_TOTAL) / (1024 * 1024);
14009 +#elif PLATFORM(AROS)
14010 + memSize = AvailMem(MEMF_TOTAL) / (1024 * 1024);
14011 #else
14012 struct sysinfo info;
14013 memset(&info, 0, sizeof(info));
14014 @@ -645,7 +659,7 @@
14015 d->addToDirtyRegion(dirtyRect);
14018 -BalRectangle WebView::dirtyRegion()
14019 +std::vector<BalRectangle> WebView::dirtyRegion()
14021 return d->dirtyRegion();
14023 @@ -749,7 +763,7 @@
14024 void WebView::closeWindowSoon()
14026 // m_closeWindowTimer.startOneShot(0);
14027 -#if PLATFORM(AMIGAOS4)
14028 +#if PLATFORM(AMIGAOS4) || PLATFORM(AROS)
14029 closeWindow();
14030 #endif
14032 @@ -765,6 +779,10 @@
14033 extern void closeAmigaWindow(BalWidget *owbwindow);
14035 closeAmigaWindow(viewWindow());
14036 +#elif PLATFORM(AROS)
14037 + BalWidget *widget = m_viewWindow;
14038 + if (widget)
14039 + DoMethod(widget, MUIM_WebView_Close);
14040 #endif
14043 @@ -795,6 +813,16 @@
14044 return "Mozilla/5.0 (compatible; Origyn Web Browser; AmigaOS 4.0; ppc; U; en) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+)";
14045 else
14046 return "Mozilla/5.0 (compatible; Origyn Web Browser; AmigaOS 4.1; ppc; U; en) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+)";
14047 +#elif PLATFORM(AROS)
14048 +#ifdef __x86_64__
14049 + return "Mozilla/5.0 (compatible; Origyn Web Browser; AROS; x86_64; U) AppleWebKit/525.1+ (KHTML, like Gecko, Safari/525.1+)";
14050 +#elif __i386__
14051 + return "Mozilla/5.0 (compatible; Origyn Web Browser; AROS; i686; U) AppleWebKit/525.1+ (KHTML, like Gecko, Safari/525.1+)";
14052 +#elif defined(__powerpc__) || defined(__ppc__)
14053 + return "Mozilla/5.0 (compatible; Origyn Web Browser; AROS; ppc; U) AppleWebKit/525.1+ (KHTML, like Gecko, Safari/525.1+)";
14054 +#elif __arm__
14055 + return "Mozilla/5.0 (compatible; Origyn Web Browser; AROS; arm; U) AppleWebKit/525.1+ (KHTML, like Gecko, Safari/525.1+)";
14056 +#endif
14057 #else
14058 // NOTE: some pages don't render with this UA.
14059 // m_userAgentStandard = "Mozilla/5.0 (iPod; U; CPU like Mac OS X; fr) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3B48b Safari/419.3";
14060 @@ -827,7 +855,7 @@
14061 static const unsigned CtrlKey = 1 << 0;
14062 static const unsigned AltKey = 1 << 1;
14063 static const unsigned ShiftKey = 1 << 2;
14064 -#if PLATFORM(AMIGAOS4)
14065 +#if PLATFORM(AMIGAOS4) || PLATFORM(AROS)
14066 static const unsigned AmigaKey = 1 << 4;
14067 #endif
14069 @@ -896,7 +924,7 @@
14070 { 'V', CtrlKey, "Paste" },
14071 { 'X', CtrlKey, "Cut" },
14072 { 'A', CtrlKey, "SelectAll" },
14073 -#if PLATFORM(AMIGAOS4)
14074 +#if PLATFORM(AMIGAOS4) || PLATFORM(AROS)
14075 { 'C', AmigaKey, "Copy" },
14076 { 'V', AmigaKey, "Paste" },
14077 { 'X', AmigaKey, "Cut" },
14078 @@ -952,7 +980,7 @@
14079 modifiers |= AltKey;
14080 if (evt->ctrlKey())
14081 modifiers |= CtrlKey;
14082 -#if PLATFORM (AMIGAOS4)
14083 +#if PLATFORM (AMIGAOS4) || PLATFORM (AROS)
14084 if (evt->metaKey())
14085 modifiers |= AmigaKey;
14086 #endif
14087 @@ -1143,6 +1171,15 @@
14088 TAG_DONE))
14089 ILayout->RefreshPageGadget(widget->gad_status, widget->page, widget->window, NULL);
14091 +#elif PLATFORM(AROS)
14092 + if (toolTip == m_toolTip)
14093 + return;
14095 + m_toolTip = toolTip;
14097 + BalWidget *widget = m_viewWindow;
14098 + if (widget)
14099 + SetAttrs(widget, MUIA_WebView_ToolTip,(IPTR) toolTip, TAG_DONE);
14100 #endif
14101 /*if (!m_toolTipHwnd)
14102 return;
14103 @@ -1611,9 +1648,15 @@
14105 bool WebView::active()
14107 +#if PLATFORM(AROS)
14108 + IPTR isActive = 0;
14109 + GetAttr(MUIA_WebView_Active, m_viewWindow, &isActive);
14110 + return (bool) isActive;
14111 +#else
14112 /*HWND activeWindow = GetActiveWindow();
14113 return (activeWindow && m_topLevelParent == findTopLevelParent(activeWindow));*/
14114 return true;
14115 +#endif
14118 static PassOwnPtr<Vector<String> > toStringVector(unsigned patternsCount, const char** patterns)
14119 @@ -1749,12 +1792,34 @@
14121 void WebView::updateFocusedAndActiveState()
14123 +#if PLATFORM(AROS)
14124 + m_page->focusController()->setActive(active());
14126 + bool active = m_page->focusController()->isActive();
14128 + if(active)
14130 + FocusController *focusController = m_page->focusController();
14131 + Frame *frame = focusController->focusedFrame();
14132 + Frame* mainFrame = m_page->mainFrame();
14133 + if (frame)
14134 + focusController->setFocused(true);
14135 + else if(mainFrame)
14136 + focusController->setFocusedFrame(mainFrame);
14138 + else
14140 + FocusController *focusController = m_page->focusController();
14141 + focusController->setFocused(false);
14143 +#else
14144 updateActiveState();
14146 bool active = m_page->focusController()->isActive();
14147 Frame* mainFrame = m_page->mainFrame();
14148 Frame* focusedFrame = m_page->focusController()->focusedOrMainFrame();
14149 mainFrame->selection()->setFocused(mainFrame);
14150 +#endif
14153 String buffer(const char* url)
14154 @@ -2355,7 +2420,7 @@
14155 enabled = preferences->zoomsTextOnly();
14156 settings->setZoomsTextOnly(!!enabled);
14158 -#if PLATFORM(AMIGAOS4)
14159 +#if PLATFORM(AMIGAOS4) || PLATFORM(AROS)
14160 settings->setShowsURLsInToolTips(true);
14161 #else
14162 settings->setShowsURLsInToolTips(false);
14163 @@ -2775,7 +2840,7 @@
14164 if (!domNode)
14165 return false;
14167 - Node* node = domNode->node();
14168 + WebCore::Node* node = domNode->node();
14169 if (!node)
14170 return false;
14172 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/Api/WebView.h OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebView.h
14173 --- OWB-r1097/WebKit/OrigynWebBrowser/Api/WebView.h 2009-10-16 19:40:05.000000000 +0100
14174 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/Api/WebView.h 2018-06-13 07:27:37.570979727 +0100
14175 @@ -40,6 +40,7 @@
14177 #include "WebKitTypes.h"
14178 #include <string>
14179 +#include <vector>
14181 class DefaultPolicyDelegate;
14182 class DOMDocument;
14183 @@ -1140,7 +1141,7 @@
14185 * dirtyRegion
14187 - BalRectangle dirtyRegion();
14188 + std::vector<BalRectangle> dirtyRegion();
14191 * clearDirtyRegion
14192 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/CMakeLists.txt OWB-r1097.aros/WebKit/OrigynWebBrowser/CMakeLists.txt
14193 --- OWB-r1097/WebKit/OrigynWebBrowser/CMakeLists.txt 2009-09-15 09:59:14.000000000 +0100
14194 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
14195 @@ -39,6 +39,20 @@
14197 endif(USE_GRAPHICS_SDL)
14199 +if(USE_GRAPHICS_AROS)
14200 + list(APPEND WEBKIT_SRC
14201 + Api/AROS/WebViewPrivate.cpp
14202 + Api/AROS/WebViewZune.cpp
14203 + Api/AROS/DownloadDelegateAROS.cpp
14204 + Api/AROS/DownloadDelegateZune.cpp
14205 + Api/AROS/WebPreferencesZune.cpp
14206 + Api/AROS/PolicyDelegateAROS.cpp
14208 + include_directories(
14209 + Api/AROS
14211 +endif(USE_GRAPHICS_AROS)
14213 aux_source_directory(Api WEBKIT_SRC)
14214 aux_source_directory(WebCoreSupport WEBKIT_SRC)
14216 @@ -75,7 +89,7 @@
14217 set_source_files_properties(${WEBKIT_SRC}
14218 PROPERTIES COMPILE_FLAGS "-fno-rtti -fno-exceptions"
14220 -add_library(webkit-owb SHARED ${WEBKIT_SRC})
14221 +add_library(webkit-owb ${WEBKIT_SRC})
14222 add_dependencies(webkit-owb webcore)
14224 target_link_libraries(webkit-owb
14225 @@ -102,6 +116,7 @@
14226 ## LIBRARY DESTINATION is useless with vcproj
14227 install(TARGETS webkit-owb
14228 LIBRARY DESTINATION lib
14229 + ARCHIVE DESTINATION lib
14231 ENDIF(NOT WIN32)
14233 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.cpp
14234 --- OWB-r1097/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.cpp 2009-10-16 19:40:05.000000000 +0100
14235 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.cpp 2018-06-13 07:27:37.570979727 +0100
14236 @@ -61,9 +61,21 @@
14237 #include <intuition/gadgetclass.h>
14238 #include <reaction/reaction_macros.h>
14239 #undef String
14240 +#elif PLATFORM(AROS)
14241 +extern "C" {
14242 +#include <proto/intuition.h>
14243 +#include <proto/alib.h>
14244 +#include <proto/muimaster.h>
14245 +#include <WebViewZune.h>
14246 +#include <aros/debug.h>
14247 +#include <libraries/asl.h>
14248 +#include <proto/asl.h>
14250 +#include <FileSystem.h>
14251 #endif
14253 #include <cstdio>
14254 +#include <cstring>
14256 using namespace WebCore;
14258 @@ -115,11 +127,20 @@
14260 bool WebChromeClient::canTakeFocus(FocusDirection direction)
14262 +#if PLATFORM(AROS)
14263 + return true;
14264 +#else
14265 return false;
14266 +#endif
14269 void WebChromeClient::takeFocus(FocusDirection direction)
14271 +#if PLATFORM(AROS)
14272 + BalWidget* viewWindow = m_webView->viewWindow();
14273 + D(bug("takeFocus\n"));
14274 + DoMethod(viewWindow, MUIM_WebView_ReturnFocus);
14275 +#endif
14278 Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& features)
14279 @@ -156,6 +177,39 @@
14282 return 0;
14283 +#elif PLATFORM(AROS)
14284 + D(bug("createWindow\n"));
14285 + if (features.dialog) {
14286 + fprintf(stderr, "%s: features.dialog not implemented on AROS.\n", __PRETTY_FUNCTION__);
14287 + return 0;
14290 + BalWidget* viewWindow = m_webView->viewWindow();
14291 + if (viewWindow) {
14292 + struct WindowSpecification spec;
14293 + spec.left = static_cast<LONG>(features.xSet ? features.x : -1);
14294 + spec.top = static_cast<LONG>(features.ySet ? features.y : -1);
14295 + spec.width = static_cast<LONG>(features.widthSet ? features.width : -1);
14296 + spec.height = static_cast<LONG>(features.heightSet ? features.height : -1);
14297 + spec.menubar = static_cast<BOOL>(features.menuBarVisible);
14298 + spec.statusbar= static_cast<BOOL>(features.statusBarVisible);
14299 + spec.toolbar = static_cast<BOOL>(features.toolBarVisible);
14300 + spec.locationbar = static_cast<BOOL>(features.locationBarVisible);
14301 + spec.scrollbars = static_cast<BOOL>(features.scrollbarsVisible);
14302 + spec.resizable = static_cast<BOOL>(features.resizable);
14303 + spec.fullscreen = static_cast<BOOL>(features.fullscreen);
14304 + BalWidget *newWindow = (BalWidget*) DoMethod(viewWindow, MUIM_WebView_CreateNew, &spec);
14305 + if(newWindow) {
14306 + WebView *newWebView = NULL;
14307 + GetAttr(MUIA_WebView_WebView, newWindow, (IPTR*) &newWebView);
14308 + if(newWebView)
14310 + newWebView->mainFrame()->loadURL(frameLoadRequest.resourceRequest().url().prettyURL().utf8().data());
14311 + return core(newWebView);
14315 + return 0;
14316 #else
14317 if (features.dialog) {
14318 /*COMPtr<IWebUIDelegate3> delegate = uiDelegate3();
14319 @@ -188,6 +242,26 @@
14320 #endif
14323 +Page* WebChromeClient::createTab(Frame*, const FrameLoadRequest& frameLoadRequest)
14325 + D(bug("createTab\n"));
14327 + BalWidget* viewWindow = m_webView->viewWindow();
14328 + if (viewWindow) {
14329 + BalWidget *newWindow = (BalWidget*) DoMethod(viewWindow, MUIM_WebView_CreateNew, NULL);
14330 + if(newWindow) {
14331 + WebView *newWebView = NULL;
14332 + GetAttr(MUIA_WebView_WebView, newWindow, (IPTR*) &newWebView);
14333 + if(newWebView)
14335 + newWebView->mainFrame()->loadURL(frameLoadRequest.resourceRequest().url().prettyURL().utf8().data());
14336 + return core(newWebView);
14340 + return 0;
14343 void WebChromeClient::show()
14346 @@ -406,7 +480,15 @@
14347 char* value = 0;
14348 JSActionDelegate* jsActionDelegate = m_webView->jsActionDelegate();
14349 if (jsActionDelegate)
14350 - return jsActionDelegate->jsPrompt(m_webView->mainFrame(), message.utf8().data(), defaultValue.utf8().data(), &value);
14352 + bool res = jsActionDelegate->jsPrompt(m_webView->mainFrame(), message.utf8().data(), defaultValue.utf8().data(), &value);
14353 + if(value)
14355 + result = value;
14356 + free(value);
14358 + return res;
14360 #endif
14361 return false;
14363 @@ -432,6 +514,14 @@
14364 TAG_DONE))
14365 ILayout->RefreshPageGadget(widget->gad_status, widget->page, widget->window, NULL);
14367 +#elif PLATFORM(AROS)
14368 + BalWidget *widget = m_webView ? m_webView->viewWindow() : 0;
14369 + if (widget)
14371 + char *text = strdup(statusText.utf8().data());
14372 + SetAttrs(widget, MUIA_WebView_ToolTip,(IPTR) text,TAG_DONE);
14373 + free(text);
14375 #endif
14378 @@ -551,9 +641,44 @@
14379 //FIXME: implement me!
14380 return false;
14382 -void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser)
14384 +void WebChromeClient::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
14386 +#if PLATFORM(AROS)
14387 + D(bug("choose files\n"));
14388 + RefPtr<FileChooser> chooser = prpFileChooser;
14389 + BalWidget* viewWindow = m_webView->viewWindow();
14391 + struct Window *win;
14392 + GetAttr(MUIA_Window, viewWindow, (IPTR*) &win);
14394 + struct FileRequester *req = AllocFileRequest();
14395 + if(req)
14397 + BOOL res = AslRequestTags(req,
14398 + ASLFR_TitleText, "Choose file",
14399 + ASLFR_DoMultiSelect, (IPTR) chooser->allowsMultipleFiles(),
14400 + ASLFR_Window, win,
14401 + ASLFR_SleepWindow, (IPTR) TRUE,
14402 + TAG_END);
14404 + if(res)
14406 + if(chooser->allowsMultipleFiles())
14408 + Vector<String> names;
14409 + struct WBArg *frargs = req->rf_ArgList;
14410 + for (int i = 0; i < req->rf_NumArgs; i++)
14411 + names.append(pathByAppendingComponent(String((char*) req->fr_Drawer), String((char*) frargs[i].wa_Name)));
14413 + chooser->chooseFiles(names);
14415 + else
14416 + chooser->chooseFile(pathByAppendingComponent(String((char*) req->fr_Drawer), String((char*) req->fr_File)));
14418 + FreeFileRequest(req);
14420 +#endif
14423 bool WebChromeClient::setCursor(WebCore::PlatformCursorHandle cursor)
14424 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.h OWB-r1097.aros/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.h
14425 --- OWB-r1097/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.h 2009-10-14 14:25:22.000000000 +0100
14426 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/WebCoreSupport/WebChromeClient.h 2018-06-13 07:27:37.570979727 +0100
14427 @@ -62,6 +62,7 @@
14428 virtual void takeFocus(WebCore::FocusDirection);
14430 virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&);
14431 + virtual WebCore::Page* createTab(WebCore::Frame*, const WebCore::FrameLoadRequest&);
14432 virtual void show();
14434 virtual bool canRunModal();
14435 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/WebCoreSupport/WebFrameLoaderClient.cpp OWB-r1097.aros/WebKit/OrigynWebBrowser/WebCoreSupport/WebFrameLoaderClient.cpp
14436 --- OWB-r1097/WebKit/OrigynWebBrowser/WebCoreSupport/WebFrameLoaderClient.cpp 2009-10-16 19:40:05.000000000 +0100
14437 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/WebCoreSupport/WebFrameLoaderClient.cpp 2018-06-13 07:27:37.570979727 +0100
14438 @@ -90,6 +90,13 @@
14439 #include <proto/layout.h>
14440 #include <gadgets/clicktab.h>
14441 #include <intuition/gadgetclass.h>
14442 +#elif PLATFORM(AROS)
14443 +extern "C" {
14444 +#include <proto/intuition.h>
14445 +#include <proto/alib.h>
14446 +#include <WebViewZune.h>
14447 +#include <aros/debug.h>
14449 #endif
14451 #include <cstdio>
14452 @@ -157,19 +164,25 @@
14454 void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge)
14456 - //ASSERT(challenge.sourceHandle());
14458 - /*WebView* webView = m_webFrame->webView();
14459 - COMPtr<IWebResourceLoadDelegate> resourceLoadDelegate;
14460 - if (SUCCEEDED(webView->resourceLoadDelegate(&resourceLoadDelegate))) {
14461 - COMPtr<WebURLAuthenticationChallenge> webChallenge(AdoptCOM, WebURLAuthenticationChallenge::createInstance(challenge));
14462 - if (SUCCEEDED(resourceLoadDelegate->didReceiveAuthenticationChallenge(webView, identifier, webChallenge.get(), getWebDataSource(loader))))
14463 - return;
14464 - }*/
14465 + ASSERT(challenge.sourceHandle());
14467 - // If the ResourceLoadDelegate doesn't exist or fails to handle the call, we tell the ResourceHandle
14468 - // to continue without credential - this is the best approximation of Mac behavior
14469 - //challenge.sourceHandle()->receivedRequestToContinueWithoutCredential(challenge);
14470 + BalWidget* viewWindow = m_webFrame->webView()->viewWindow();
14471 + if (viewWindow) {
14472 + char *username = NULL, *password = NULL;
14473 + String host = challenge.protectionSpace().host();
14474 + String realm = challenge.protectionSpace().realm();
14475 + if(DoMethod(viewWindow, MUIM_WebView_RequestCredentials, host.utf8().data(), realm.utf8().data(), &username, &password))
14477 + Credential credential = Credential(username, password, CredentialPersistenceForSession);
14478 + free(username);
14479 + free(password);
14480 + challenge.sourceHandle()->receivedCredential(challenge, credential);
14482 + else
14483 + challenge.sourceHandle()->receivedRequestToContinueWithoutCredential(challenge);
14485 + else
14486 + challenge.sourceHandle()->receivedRequestToContinueWithoutCredential(challenge);
14489 void WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout()
14490 @@ -434,6 +447,22 @@
14493 return 0;
14494 +#elif PLATFORM(AROS)
14495 + WebFrame *frame = m_webFrame;
14496 + while(frame->parentFrame())
14497 + frame = frame->parentFrame();
14499 + BalWidget* viewWindow = frame->webView()->viewWindow();
14500 + if (viewWindow) {
14501 + BalWidget *newWindow = (BalWidget*) DoMethod(viewWindow, MUIM_WebView_CreateNew, NULL);
14502 + if(newWindow)
14504 + WebView *newWebView;
14505 + GetAttr(MUIA_WebView_WebView, newWindow, (IPTR*) &newWebView);
14506 + return newWebView->mainFrame()->impl();
14509 + return 0;
14510 #else
14511 /*WebView* webView = m_webFrame->webView();
14513 diff -ruN OWB-r1097/WebKit/OrigynWebBrowser/webkit-owb.pc OWB-r1097.aros/WebKit/OrigynWebBrowser/webkit-owb.pc
14514 --- OWB-r1097/WebKit/OrigynWebBrowser/webkit-owb.pc 1970-01-01 01:00:00.000000000 +0100
14515 +++ OWB-r1097.aros/WebKit/OrigynWebBrowser/webkit-owb.pc 2018-06-13 07:27:56.145978823 +0100
14516 @@ -0,0 +1,11 @@
14517 +prefix=/home/nick/Developer/AROS/local_builds/trunk/pc-i386-gcc6/bin/pc-i386/AROS/Developer
14518 +exec_prefix=${prefix}
14519 +libdir=${prefix}/lib
14520 +includedir=${prefix}/include
14522 +Name: libwebkit-owb
14523 +Description: Web rendering library based on webkit.
14524 +Version: 1.0
14525 +Requires: sdl >= 1.2.10
14526 +Libs: -L${libdir} -lwebkit-owb
14527 +Cflags: -DWTF_PLATFORM_AROS -I${includedir}/webkit-owb
14528 diff -ruN OWB-r1097/WebKitTools/OWBLauncher/AROS/main.cpp OWB-r1097.aros/WebKitTools/OWBLauncher/AROS/main.cpp
14529 --- OWB-r1097/WebKitTools/OWBLauncher/AROS/main.cpp 1970-01-01 01:00:00.000000000 +0100
14530 +++ OWB-r1097.aros/WebKitTools/OWBLauncher/AROS/main.cpp 2018-06-13 07:27:37.570979727 +0100
14531 @@ -0,0 +1,116 @@
14533 + * Copyright (C) 2008 Pleyo. All rights reserved.
14535 + * Redistribution and use in source and binary forms, with or without
14536 + * modification, are permitted provided that the following conditions
14537 + * are met:
14539 + * 1. Redistributions of source code must retain the above copyright
14540 + * notice, this list of conditions and the following disclaimer.
14541 + * 2. Redistributions in binary form must reproduce the above copyright
14542 + * notice, this list of conditions and the following disclaimer in the
14543 + * documentation and/or other materials provided with the distribution.
14544 + * 3. Neither the name of Pleyo nor the names of
14545 + * its contributors may be used to endorse or promote products derived
14546 + * from this software without specific prior written permission.
14548 + * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
14549 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14550 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
14551 + * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
14552 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
14553 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
14554 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
14555 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14556 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
14557 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14558 + */
14560 +#include <exec/types.h>
14562 +extern "C" {
14563 +#include <proto/exec.h>
14564 +#include <proto/intuition.h>
14565 +#include <proto/muimaster.h>
14566 +#include <proto/dos.h>
14567 +#include <libraries/mui.h>
14568 +#include <dos/dos.h>
14569 +#include <aros/debug.h>
14570 +#include <proto/alib.h>
14573 +#include <WebViewZune.h>
14576 +int main()
14578 + Object *webView, *wnd;
14579 + IPTR argArray[] = { 0 };
14580 + struct RDArgs *args = NULL;
14581 + const char *url = NULL;
14583 + if((args = ReadArgs("URL", argArray, NULL)) != NULL)
14585 + if(argArray[0])
14587 + url = StrDup((const char*) argArray[0]);
14588 + if(!url)
14590 + FreeArgs(args);
14591 + return 1;
14594 + FreeArgs(args);
14597 + Object *app = ApplicationObject,
14598 + SubWindow, wnd = WindowObject,
14599 + MUIA_Window_Title, "OWB",
14600 + MUIA_Window_NoMenus, TRUE,
14601 + WindowContents, VGroup,
14602 + Child, webView = (Object*) NewObject(WebView_CLASS->mcc_Class, NULL, TAG_END),
14603 + End,
14604 + End,
14605 + End;
14607 + if (app != NULL)
14609 + ULONG sigs = 0;
14611 + /* Click Close gadget or hit Escape to quit */
14612 + DoMethod(wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
14613 + (IPTR)app, 2,
14614 + MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
14616 + /* Open the window */
14617 + SetAttrs(wnd, MUIA_Window_Open, TRUE, TAG_END);
14619 + int opened = FALSE;
14620 + GetAttr(MUIA_Window_Open, wnd, (IPTR*) &opened);
14621 + bug("opened: %d, webView: %p\n", opened, webView);
14622 + /* Check that the window opened */
14623 + if (opened)
14625 + DoMethod(webView, MUIM_WebView_LoadURL, (url ? url : "http://google.com"));
14627 + /* Main loop */
14628 + while((LONG)DoMethod(app, MUIM_Application_NewInput, (IPTR)&sigs)
14629 + != MUIV_Application_ReturnID_Quit)
14631 + if (sigs)
14633 + sigs = Wait(sigs | SIGBREAKF_CTRL_C);
14634 + if (sigs & SIGBREAKF_CTRL_C)
14635 + break;
14640 + MUI_DisposeObject(app);
14643 + if(url)
14644 + FreeVec((APTR) url);
14646 + return 0;
14648 diff -ruN OWB-r1097/WebKitTools/OWBLauncher/CMakeLists.txt OWB-r1097.aros/WebKitTools/OWBLauncher/CMakeLists.txt
14649 --- OWB-r1097/WebKitTools/OWBLauncher/CMakeLists.txt 2009-10-06 09:13:04.000000000 +0100
14650 +++ OWB-r1097.aros/WebKitTools/OWBLauncher/CMakeLists.txt 2018-06-13 07:27:37.570979727 +0100
14651 @@ -43,13 +43,20 @@
14652 add_executable(owb EXCLUDE_FROM_ALL SDL/main.cpp)
14653 endif(USE_GRAPHICS_SDL)
14655 +if(USE_GRAPHICS_AROS)
14656 + add_executable(owb EXCLUDE_FROM_ALL AROS/main.cpp)
14657 +endif(USE_GRAPHICS_AROS)
14659 include(Customer/CMakeLists.txt OPTIONAL)
14661 target_link_libraries(owb
14662 - webkit-owb
14663 + "-Wl,-whole-archive"
14664 + webkit-owb
14665 + "-Wl,-no-whole-archive"
14666 ${GRAPHICS_LIBRARIES}
14670 if (ENABLE_ORIGYNSUITE)
14671 target_link_libraries(owb
14672 origynsuite