93e79b6a49c98c98950079f743fca03d737c3c63
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-25  Dean Jackson  <dino@apple.com>
2
3         [Mac] Radio buttons and checkboxes vanish when redrawn
4         https://bugs.webkit.org/show_bug.cgi?id=134335
5
6         Reviewed by Dan Bernstein.
7
8         I screwed up when landing r170343 by moving some code around
9         which broke the logic. We need to query the animation
10         state for controls after we draw (both statically and animated).
11
12         * platform/mac/ThemeMac.mm:
13         (WebCore::paintToggleButton): We need to check the state of animation again, after
14         we draw.
15
16 2014-06-25  Brady Eidson  <beidson@apple.com>
17
18         Add HID-based gamepad implementation for Mac
19         https://bugs.webkit.org/show_bug.cgi?id=134324
20
21         Reviewed by Dean Jackson.
22
23         No new tests (Not yet a tested config)
24
25         * Modules/gamepad/Gamepad.cpp:
26         (WebCore::Gamepad::Gamepad):
27         (WebCore::Gamepad::updateFromPlatformGamepad): Update the Gamepad’s data from the passed-in PlatformGamepad.
28         * Modules/gamepad/Gamepad.h:
29
30         * Modules/gamepad/GamepadButton.h:
31         (WebCore::GamepadButton::create): Change to use Ref instead of RefPtr.
32
33         GamepadManager is a GamepadStrategyClient that receives notifications from the platform gamepad implementation
34         and forwards them to NavigatorGamepad objects. In the future it will also handle event dispatch and exposing
35         gamepads to the API layer when a button is pressed:
36         * Modules/gamepad/GamepadManager.cpp: Added.
37         (WebCore::GamepadManager::shared):
38         (WebCore::GamepadManager::GamepadManager):
39         (WebCore::GamepadManager::platformGamepadConnected):
40         (WebCore::GamepadManager::platformGamepadDisconnected):
41         (WebCore::GamepadManager::registerNavigator):
42         (WebCore::GamepadManager::unregisterNavigator):
43         * Modules/gamepad/GamepadManager.h:
44
45         The NavigatorGamepad supplement actually manages visibility of Gamepads on a per-DOMWindow basis:
46         * Modules/gamepad/NavigatorGamepad.cpp:
47         (WebCore::NavigatorGamepad::NavigatorGamepad):
48         (WebCore::NavigatorGamepad::~NavigatorGamepad):
49         (WebCore::NavigatorGamepad::from):
50         (WebCore::NavigatorGamepad::gamepads):
51         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
52         (WebCore::NavigatorGamepad::gamepadConnected):
53         (WebCore::NavigatorGamepad::gamepadDisconnected):
54         * Modules/gamepad/NavigatorGamepad.h:
55         (WebCore::NavigatorGamepad::navigationStart):
56
57         HIDGamepad is a PlatformGamepad that wraps an IOHIDDeviceRef and keeps input values updated:
58         * platform/mac/HIDGamepad.cpp: Added.
59         (WebCore::HIDGamepad::HIDGamepad):
60         (WebCore::HIDGamepad::initElements):
61         (WebCore::HIDGamepad::initElementsFromArray):
62         (WebCore::HIDGamepad::maybeAddButton):
63         (WebCore::HIDGamepad::maybeAddAxis):
64         (WebCore::HIDGamepad::valueChanged):
65         * platform/mac/HIDGamepad.h: Added.
66         (WebCore::HIDGamepadElement::HIDGamepadElement):
67         (WebCore::HIDGamepadElement::~HIDGamepadElement):
68         (WebCore::HIDGamepadElement::isButton):
69         (WebCore::HIDGamepadElement::isAxis):
70         (WebCore::HIDGamepadButton::HIDGamepadButton):
71         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
72         (WebCore::HIDGamepad::hidDevice):
73
74         HIDGamepadListener wraps an IOHIDManagerRef and continuously listens for changes to Gamepad-type
75         devices plugged in to the system:
76         * platform/mac/HIDGamepadListener.cpp: Added.
77         (WebCore::deviceMatchingDictionary):
78         (WebCore::deviceAddedCallback):
79         (WebCore::deviceRemovedCallback):
80         (WebCore::deviceValuesChangedCallback):
81         (WebCore::HIDGamepadListener::shared):
82         (WebCore::HIDGamepadListener::HIDGamepadListener):
83         (WebCore::HIDGamepadListener::indexForNewlyConnectedDevice):
84         (WebCore::HIDGamepadListener::deviceAdded):
85         (WebCore::HIDGamepadListener::deviceRemoved):
86         (WebCore::HIDGamepadListener::valuesChanged):
87         (WebCore::HIDGamepadListener::removeGamepadForDevice):
88         * platform/mac/HIDGamepadListener.h: Copied from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
89         (WebCore::HIDGamepadListenerClient::~HIDGamepadListenerClient):
90         (WebCore::HIDGamepadListener::setClient):
91         (WebCore::HIDGamepadListener::platformGamepads):
92         (WebCore::HIDGamepadListener::setShouldDispatchCallbacks):
93
94         * WebCore.exp.in:
95         * WebCore.xcodeproj/project.pbxproj:
96
97 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
98
99         WebProgressTracker updates progress too frequently
100         https://bugs.webkit.org/show_bug.cgi?id=134185
101
102         Reviewed by Tim Horton.
103
104         The old code throttled the progress update to when either 100ms has passed or the delta is at least 2%
105         but this was still not enough in pages that loaded in sub-seconds. The new code always throttles it at 200ms.
106
107         * loader/ProgressTracker.cpp:
108         (WebCore::ProgressTracker::ProgressTracker):
109         (WebCore::ProgressTracker::incrementProgress):
110         * loader/ProgressTracker.h:
111
112 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
113
114         [iOS WK2] Fixed position elements jump around when zooming
115         https://bugs.webkit.org/show_bug.cgi?id=134328
116         <rdar://problem/17447048>
117
118         Reviewed by Zalan Bujtas.
119
120         If a given remote layer tree commit contains changes of layers for viewport-constrained
121         objects, then the associated scrolling tree also needs to show that the layers changed,
122         since we need to re-run the "viewport changed" logic in the UI process to get the
123         layers correctly positioned for the current zoom level.
124         
125         The bug was that page scale changes resulted in small "pixel alignment" position
126         changes which touched layers, but we didn't commit any scrolling tree changes. So
127         the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
128         update to adjust them for the current transient zoom.
129
130         Fix by making use of the existing "alignment offset" field in the ViewportConstraints
131         data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
132         fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
133         nodes were updated.
134
135         * page/scrolling/ScrollingConstraints.h:
136         (WebCore::StickyPositionViewportConstraints::operator==):
137         * platform/graphics/GraphicsLayer.h:
138         (WebCore::GraphicsLayer::pixelAlignmentOffset):
139         * platform/graphics/ca/GraphicsLayerCA.cpp:
140         (WebCore::GraphicsLayerCA::updateGeometry):
141         * platform/graphics/ca/GraphicsLayerCA.h:
142         * rendering/RenderLayerCompositor.cpp:
143         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
144         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
145
146 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
147
148         [iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view
149         https://bugs.webkit.org/show_bug.cgi?id=134323
150
151         Reviewed by Benjamin Poulain.
152
153         Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements
154         out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale
155         relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width.
156         The width is clamped to get reasonable behavior on wide pages.
157
158         * page/FrameView.cpp:
159         (WebCore::FrameView::rectForViewportConstrainedObjects):
160
161 2014-06-25  Brady Eidson  <beidson@apple.com>
162
163         Add new platform gamepad abstractions
164         https://bugs.webkit.org/show_bug.cgi?id=134325
165
166         Reviewed by Dean Jackson.
167
168         No new tests (Not yet a tested config)
169
170         - GamepadStrategy lets ports customize the 3 basic behaviors needed for a gamepad
171           implementation to feed the API in WebCore.
172         - GamepadStrategyClient gives arbitrary objects in WebCore the ability to register
173           for callbacks with the GamepadStrategy.
174         - PlatformGamepad is a platform-agnostic object that represents the data that
175           feeds into the Gamepad object that is exposed to web content.
176
177         The code in this patch is dead as-is, but https://bugs.webkit.org/show_bug.cgi?id=134324
178         will contain an immediate follow-up patch that uses it.
179
180         Makes sense to review them separately.
181
182         * WebCore.xcodeproj/project.pbxproj:
183
184         * platform/GamepadStrategy.h: Added.
185         (WebCore::GamepadStrategy::~GamepadStrategy):
186
187         * platform/GamepadStrategyClient.h: Added.
188         (WebCore::GamepadStrategyClient::~GamepadStrategyClient):
189
190         * platform/PlatformGamepad.h: Added.
191         (WebCore::PlatformGamepad::~PlatformGamepad):
192         (WebCore::PlatformGamepad::id):
193         (WebCore::PlatformGamepad::lastUpdateTime):
194         (WebCore::PlatformGamepad::connectTime):
195         (WebCore::PlatformGamepad::PlatformGamepad):
196
197         * platform/PlatformStrategies.h:
198         (WebCore::PlatformStrategies::gamepadStrategy):
199         (WebCore::PlatformStrategies::PlatformStrategies):
200
201 2014-06-25  Zalan Bujtas  <zalan@apple.com>
202
203         Assertion failed: CGPathAddRoundedRect asserts on non-renderable rounded rectangle.
204         https://bugs.webkit.org/show_bug.cgi?id=134288
205
206         Reviewed by Simon Fraser.
207
208         Speculative fix. This changeset attempts to address a possible mantissa overflow of radius
209         when checking whether the rounded rectangle is renderable.
210         We convert both the radius and the rectangle values to CGFloat(float/double) to perform
211         this renderable check, instead of always using float.
212
213         * platform/graphics/FloatRoundedRect.cpp:
214         (WebCore::FloatRoundedRect::Radii::scale): Move scale(float, float) from RoundedRect to FloatRoundedRect.
215         (WebCore::FloatRoundedRect::isRenderable): Add check if radius is >= 0.
216         * platform/graphics/FloatRoundedRect.h:
217         * platform/graphics/RoundedRect.cpp:
218         (WebCore::RoundedRect::Radii::scale):
219         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): use FloatRoundeRect::Radii.
220         * platform/graphics/RoundedRect.h:
221         * platform/graphics/cg/PathCG.cpp:
222         (WebCore::Path::platformAddPathForRoundedRect): use epsilon() to ensure width/height is always >= even with mantissa overflow. 
223
224 2014-06-25  Jer Noble  <jer.noble@apple.com>
225
226         [MSE] removeCodedFrames() can remove more than it should
227         https://bugs.webkit.org/show_bug.cgi?id=134320
228
229         Reviewed by Geoff Garen.
230
231         removeCodedFrames() can remove more samples than it should because it compares an iterator
232         in presentation timespace to one in decode timespace. Clean up this code by removing frames
233         in decode order. Rename variables and add comments to make explicit which timespace defines
234         the iterators being used.
235
236         * Modules/mediasource/SourceBuffer.cpp:
237         (WebCore::SourceBuffer::removeCodedFrames):
238
239 2014-06-25  Beth Dakin  <bdakin@apple.com>
240
241         Crash in ScrollingTree::isRubberBandInProgress()
242         https://bugs.webkit.org/show_bug.cgi?id=134316
243         -and corresponding-
244         <rdar://problem/16247911>
245
246         Reviewed by Geoffrey Garen.
247
248         This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
249         which moved the ScrollingNode creation code from ScrollingTree over to 
250         ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
251         believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
252         even though the ScrollingTree was kept alive by the bind call to propagate 
253         commitNewTreeState() over to the scrolling thread. The fix is to move node 
254         creation back to the ScrollingTree and to use the this pointer to create new
255         nodes rather than the ScrollingCoordinator's ScrollingTree pointer.
256
257         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
258         * page/scrolling/AsyncScrollingCoordinator.h:
259
260         Re-name createNode to createScrollingTreeNode(). 
261         * page/scrolling/ScrollingTree.cpp:
262         (WebCore::ScrollingTree::updateTreeFromStateNode):
263         * page/scrolling/ScrollingTree.h:
264
265         Remove this implementation of createNode that called into the 
266         ScrollingCoordinator.
267         * page/scrolling/ThreadedScrollingTree.cpp:
268         (WebCore::ThreadedScrollingTree::createNode): Deleted.
269         * page/scrolling/ThreadedScrollingTree.h:
270
271         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
272         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
273         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
274         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.
275
276         Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
277         * page/scrolling/ios/ScrollingTreeIOS.cpp:
278         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
279         (WebCore::ScrollingTreeIOS::createNode): Deleted.
280         * page/scrolling/ios/ScrollingTreeIOS.h:
281
282         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
283         * page/scrolling/mac/ScrollingCoordinatorMac.h:
284         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
285         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.
286
287         Add the implementation of createScrollingTreeNode() for the Mac to 
288         ScrollingTreeMac since it can create Mac-specific nodes.
289         * page/scrolling/mac/ScrollingTreeMac.cpp:
290         (ScrollingTreeMac::createScrollingTreeNode):
291         * page/scrolling/mac/ScrollingTreeMac.h:
292
293 2014-06-25  Enrica Casucci  <enrica@apple.com>
294
295         iOS build fix after http://trac.webkit.org/changeset/170447.
296         Unreviewed.
297
298         * editing/mac/TextUndoInsertionMarkup.h:
299
300 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
301
302         Add an undo group for each dictated utterance in WebKit
303         https://bugs.webkit.org/show_bug.cgi?id=134086
304
305         Reviewed by Enrica Casucci.
306
307         Provide a mechanism for ending the current undo group on a text insertion.
308         This allows a stream of text, that is normally part of one undo group, to be
309         broken up so that subsequent undo commands will only undo portions of the text stream.
310
311         * WebCore.exp.in:
312         * WebCore.xcodeproj/project.pbxproj:
313         * editing/mac/TextUndoInsertionMarkup.h: Added.
314         * editing/mac/TextUndoInsertionMarkup.mm: Added.
315         (WebCore::shouldRegisterInsertionUndoGroup):
316         (WebCore::registerInsertionUndoGrouping):
317
318 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
319
320         [iOS]: WK2 Inspector Node Search
321         https://bugs.webkit.org/show_bug.cgi?id=134279
322
323         Reviewed by Benjamin Poulain.
324
325         * WebCore.exp.in:
326         Export Node::inspect for WebKit2.
327
328 2014-06-25  Dana Burkart  <dburkart@apple.com>
329
330         Add support for 5-tuple versioning.
331
332         Reviewed by David Farler.
333
334         * Configurations/Version.xcconfig:
335
336 2014-06-25  Jer Noble  <jer.noble@apple.com>
337
338         [MSE][Mac] REGRESSION(r170336) - zero tolerance seeks are ignored.
339         https://bugs.webkit.org/show_bug.cgi?id=134310
340
341         Reviewed by Brent Fulgham.
342
343         Tests for zero tolerance seeks were inadvertantly reversed in r170336.
344
345         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
346         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
347
348 2014-06-25  Jer Noble  <jer.noble@apple.com>
349
350         [MSE][Mac] Pause playback when readyState drops below HAVE_FUTURE_DATA, and do not complete seek until it rises above HAVE_METADATA.
351         https://bugs.webkit.org/show_bug.cgi?id=134306
352
353         Reviewed by Eric Carlson.
354
355         Pause the synchronizer before seeking, and do not resume the synchronizer until it both reports that the seek completed,
356         and that the readyState rises above HAVE_METADATA. In every other location where we change the rate of the synchronizer,
357         gate that rate change on the above.
358
359         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
360         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
361         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Check shouldBePlaying().
362         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Ditto.
363         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Unset m_seekCompleted.
364         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Pause the synchronizer.
365         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Check shouldBePlaying().
366         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying): Test m_seeking, !m_seekCompleted, and the readyState.
367         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): Set m_seekCompleted; check shouldBePlaying() and play if appropriate.
368
369 2014-06-25  Jer Noble  <jer.noble@apple.com>
370
371         [MSE] Update monitorSourceBuffers to match recent spec changes
372         https://bugs.webkit.org/show_bug.cgi?id=134305
373
374         Reviewed by Eric Carlson.
375
376         In W3C bug #24347, the text for the third clause of Source Buffer Monitoring was updated. Update our
377         implementation to match the new text.
378
379         * Modules/mediasource/MediaSource.cpp:
380         (WebCore::MediaSource::monitorSourceBuffers):
381
382 2014-06-25  Alex Christensen  <achristensen@webkit.org>
383             And peavo@outlook.com  <peavo@outlook.com>
384
385         Use references instead of pointers in RenderTheme.
386         https://bugs.webkit.org/show_bug.cgi?id=134261
387
388         Reviewed by Zalan Bujtas.
389
390         * css/StyleResolver.cpp:
391         (WebCore::StyleResolver::adjustRenderStyle):
392         * html/TextFieldInputType.cpp:
393         (WebCore::TextFieldInputType::shouldHaveSpinButton):
394         * html/shadow/SliderThumbElement.cpp:
395         (WebCore::RenderSliderThumb::updateAppearance):
396         * platform/efl/RenderThemeEfl.cpp:
397         (WebCore::RenderThemeEfl::adjustSizeConstraints):
398         (WebCore::RenderThemeEfl::applyEdjeRTLState):
399         (WebCore::RenderThemeEfl::isControlStyled):
400         (WebCore::RenderThemeEfl::paintThemePart):
401         (WebCore::RenderThemeEfl::supportsFocusRing):
402         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
403         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
404         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
405         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
406         (WebCore::RenderThemeEfl::adjustRadioStyle):
407         (WebCore::RenderThemeEfl::adjustButtonStyle):
408         (WebCore::RenderThemeEfl::adjustMenuListStyle):
409         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
410         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
411         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
412         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
413         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
414         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
415         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
416         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
417         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
418         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
419         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
420         * platform/efl/RenderThemeEfl.h:
421         * platform/gtk/RenderThemeGtk.cpp:
422         (WebCore::RenderThemeGtk::supportsFocusRing):
423         (WebCore::RenderThemeGtk::adjustButtonStyle):
424         (WebCore::RenderThemeGtk::adjustMenuListStyle):
425         (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
426         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
427         (WebCore::adjustSearchFieldIconStyle):
428         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
429         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
430         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
431         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
432         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
433         (WebCore::borderRadiiFromStyle):
434         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
435         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
436         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
437         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
438         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
439         (WebCore::RenderThemeGtk::animationDurationForProgressBar):
440         (WebCore::RenderThemeGtk::calculateProgressRect):
441         * platform/gtk/RenderThemeGtk.h:
442         * platform/gtk/RenderThemeGtk2.cpp:
443         (WebCore::setToggleSize):
444         (WebCore::RenderThemeGtk::setCheckboxSize):
445         (WebCore::RenderThemeGtk::setRadioSize):
446         (WebCore::RenderThemeGtk::comboBoxArrowSize):
447         (WebCore::RenderThemeGtk::getComboBoxPadding):
448         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
449         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
450         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
451         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
452         (WebCore::RenderThemeGtk::paintMenuList):
453         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
454         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
455         * platform/gtk/RenderThemeGtk3.cpp:
456         (WebCore::setToggleSize):
457         (WebCore::RenderThemeGtk::setCheckboxSize):
458         (WebCore::RenderThemeGtk::setRadioSize):
459         (WebCore::getComboBoxMetrics):
460         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
461         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
462         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
463         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
464         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
465         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
466         * rendering/RenderButton.cpp:
467         (WebCore::RenderButton::layout):
468         * rendering/RenderInline.cpp:
469         (WebCore::RenderInline::paintOutline):
470         * rendering/RenderMediaControls.cpp:
471         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
472         * rendering/RenderMediaControls.h:
473         * rendering/RenderMenuList.cpp:
474         (WebCore::RenderMenuList::adjustInnerStyle):
475         (RenderMenuList::computeIntrinsicLogicalWidths):
476         (RenderMenuList::menuStyle):
477         * rendering/RenderMeter.cpp:
478         (WebCore::RenderMeter::updateLogicalWidth):
479         (WebCore::RenderMeter::computeLogicalHeight):
480         * rendering/RenderObject.cpp:
481         (WebCore::RenderObject::paintOutline):
482         * rendering/RenderProgress.cpp:
483         (WebCore::RenderProgress::updateAnimationState):
484         * rendering/RenderTextControlSingleLine.cpp:
485         (WebCore::RenderTextControlSingleLine::layout):
486         * rendering/RenderTheme.cpp:
487         (WebCore::RenderTheme::adjustStyle):
488         (WebCore::RenderTheme::isControlStyled):
489         (WebCore::RenderTheme::supportsFocusRing):
490         (WebCore::RenderTheme::stateChanged):
491         (WebCore::RenderTheme::adjustCheckboxStyle):
492         (WebCore::RenderTheme::adjustRadioStyle):
493         (WebCore::RenderTheme::adjustButtonStyle):
494         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
495         (WebCore::RenderTheme::adjustTextFieldStyle):
496         (WebCore::RenderTheme::adjustTextAreaStyle):
497         (WebCore::RenderTheme::adjustMenuListStyle):
498         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
499         (WebCore::RenderTheme::adjustMeterStyle):
500         (WebCore::RenderTheme::meterSizeForBounds):
501         (WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
502         (WebCore::RenderTheme::animationDurationForProgressBar):
503         (WebCore::RenderTheme::adjustProgressBarStyle):
504         (WebCore::RenderTheme::shouldHaveSpinButton):
505         (WebCore::RenderTheme::adjustMediaControlStyle):
506         (WebCore::RenderTheme::adjustSliderTrackStyle):
507         (WebCore::RenderTheme::adjustSliderThumbStyle):
508         (WebCore::RenderTheme::adjustSliderThumbSize):
509         (WebCore::RenderTheme::adjustSearchFieldStyle):
510         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
511         (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
512         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
513         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
514         * rendering/RenderTheme.h:
515         (WebCore::RenderTheme::supportsHover):
516         (WebCore::RenderTheme::minimumMenuListSize):
517         (WebCore::RenderTheme::popupInternalPaddingLeft):
518         (WebCore::RenderTheme::popupInternalPaddingRight):
519         (WebCore::RenderTheme::popupInternalPaddingTop):
520         (WebCore::RenderTheme::popupInternalPaddingBottom):
521         (WebCore::RenderTheme::popupMenuSize):
522         (WebCore::RenderTheme::setCheckboxSize):
523         (WebCore::RenderTheme::setRadioSize):
524         (WebCore::RenderTheme::setButtonSize):
525         * rendering/RenderThemeIOS.h:
526         * rendering/RenderThemeIOS.mm:
527         (WebCore::RenderThemeIOS::adjustCheckboxStyle):
528         (WebCore::RenderThemeIOS::isControlStyled):
529         (WebCore::RenderThemeIOS::adjustRadioStyle):
530         (WebCore::RenderThemeIOS::popupInternalPaddingRight):
531         (WebCore::RenderThemeIOS::adjustRoundBorderRadius):
532         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
533         (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
534         (WebCore::RenderThemeIOS::adjustSliderThumbSize):
535         (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
536         (WebCore::RenderThemeIOS::animationDurationForProgressBar):
537         (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
538         (WebCore::RenderThemeIOS::adjustButtonStyle):
539         (WebCore::RenderThemeIOS::setButtonSize):
540         (WebCore::RenderThemeIOS::shouldHaveSpinButton):
541         * rendering/RenderThemeMac.h:
542         * rendering/RenderThemeMac.mm:
543         (WebCore::RenderThemeMac::isControlStyled):
544         (WebCore::RenderThemeMac::controlSizeForFont):
545         (WebCore::RenderThemeMac::sizeForFont):
546         (WebCore::RenderThemeMac::sizeForSystemFont):
547         (WebCore::RenderThemeMac::setSizeFromFont):
548         (WebCore::RenderThemeMac::setFontFromControlSize):
549         (WebCore::RenderThemeMac::controlSizeForSystemFont):
550         (WebCore::RenderThemeMac::adjustTextFieldStyle):
551         (WebCore::RenderThemeMac::adjustTextAreaStyle):
552         (WebCore::RenderThemeMac::paintMenuList):
553         (WebCore::RenderThemeMac::meterSizeForBounds):
554         (WebCore::RenderThemeMac::paintMeter):
555         (WebCore::RenderThemeMac::levelIndicatorFor):
556         (WebCore::RenderThemeMac::progressBarRectForBounds):
557         (WebCore::RenderThemeMac::minimumProgressBarHeight):
558         (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
559         (WebCore::RenderThemeMac::animationDurationForProgressBar):
560         (WebCore::RenderThemeMac::adjustProgressBarStyle):
561         (WebCore::RenderThemeMac::paintProgressBar):
562         (WebCore::RenderThemeMac::adjustMenuListStyle):
563         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
564         (WebCore::RenderThemeMac::popupInternalPaddingRight):
565         (WebCore::RenderThemeMac::popupInternalPaddingTop):
566         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
567         (WebCore::RenderThemeMac::popupMenuSize):
568         (WebCore::RenderThemeMac::minimumMenuListSize):
569         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
570         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
571         (WebCore::RenderThemeMac::setSearchCellState):
572         (WebCore::RenderThemeMac::setSearchFieldSize):
573         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
574         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
575         (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
576         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
577         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
578         (WebCore::RenderThemeMac::adjustSliderThumbSize):
579         * rendering/RenderThemeSafari.cpp:
580         (WebCore::RenderThemeSafari::isControlStyled):
581         (WebCore::RenderThemeSafari::adjustRepaintRect):
582         (WebCore::RenderThemeSafari::baselinePosition):
583         (WebCore::RenderThemeSafari::controlSizeForFont):
584         (WebCore::RenderThemeSafari::sizeForFont):
585         (WebCore::RenderThemeSafari::sizeForSystemFont):
586         (WebCore::RenderThemeSafari::setSizeFromFont):
587         (WebCore::RenderThemeSafari::setFontFromControlSize):
588         (WebCore::RenderThemeSafari::controlSizeForSystemFont):
589         (WebCore::RenderThemeSafari::paintCheckbox):
590         (WebCore::RenderThemeSafari::setCheckboxSize):
591         (WebCore::RenderThemeSafari::paintRadio):
592         (WebCore::RenderThemeSafari::setRadioSize):
593         (WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
594         (WebCore::RenderThemeSafari::adjustButtonStyle):
595         (WebCore::RenderThemeSafari::setButtonSize):
596         (WebCore::RenderThemeSafari::adjustTextFieldStyle):
597         (WebCore::RenderThemeSafari::adjustTextAreaStyle):
598         (WebCore::RenderThemeSafari::paintMenuList):
599         (WebCore::RenderThemeSafari::adjustMenuListStyle):
600         (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
601         (WebCore::RenderThemeSafari::popupInternalPaddingRight):
602         (WebCore::RenderThemeSafari::popupInternalPaddingTop):
603         (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
604         (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
605         (WebCore::RenderThemeSafari::minimumMenuListSize):
606         (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
607         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
608         (WebCore::RenderThemeSafari::setSearchFieldSize):
609         (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
610         (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
611         (WebCore::RenderThemeSafari::adjustSearchFieldDecorationPartStyle):
612         (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationPartStyle):
613         (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
614         (WebCore::RenderThemeSafari::adjustMeterStyle):
615         (WebCore::RenderThemeSafari::meterSizeForBounds):
616         (WebCore::RenderThemeSafari::paintMeter):
617         * rendering/RenderThemeSafari.h:
618         * rendering/RenderThemeWin.cpp:
619         (WebCore::RenderThemeWin::supportsHover):
620         (WebCore::RenderThemeWin::supportsFocusRing):
621         (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
622         (WebCore::RenderThemeWin::setCheckboxSize):
623         (WebCore::RenderThemeWin::paintTextField):
624         (WebCore::RenderThemeWin::paintMenuList):
625         (WebCore::RenderThemeWin::adjustMenuListStyle):
626         (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
627         (WebCore::RenderThemeWin::adjustSliderThumbSize):
628         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
629         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
630         (WebCore::RenderThemeWin::adjustSearchFieldDecorationPartStyle):
631         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
632         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
633         (WebCore::RenderThemeWin::adjustMeterStyle):
634         (WebCore::RenderThemeWin::meterSizeForBounds):
635         (WebCore::RenderThemeWin::paintMeter):
636         * rendering/RenderThemeWin.h:
637         (WebCore::RenderThemeWin::paintCheckbox):
638         (WebCore::RenderThemeWin::paintRadio):
639         (WebCore::RenderThemeWin::setRadioSize):
640         (WebCore::RenderThemeWin::paintTextArea):
641         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent):
642         (WebCore::RenderThemeWin::paintSearchFieldDecorationPart):
643         (WebCore::RenderThemeWin::adjustButtonStyle):
644         (WebCore::RenderThemeWin::adjustTextFieldStyle):
645         (WebCore::RenderThemeWin::adjustTextAreaStyle):
646         (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused):
647
648 2014-06-25  Benjamin Poulain  <benjamin@webkit.org>
649
650         [Mac] Update the time base of event's timestamp when the system time changes
651         https://bugs.webkit.org/show_bug.cgi?id=134293
652
653         Reviewed by Anders Carlsson.
654
655         * platform/mac/PlatformEventFactoryMac.mm:
656         (WebCore::cachedStartupTimeIntervalSince1970): Since events timestamps are absolute time, they also
657         need to be updated if the system clock changes.
658
659 2014-06-25  Dirk Schulze  <krit@webkit.org>
660
661         Add all blend modes to feBlend
662
663         feBlend should support all blend modes from CSS and Canvas
664         https://bugs.webkit.org/show_bug.cgi?id=134296
665
666         Reviewed by Dean Jackson.
667
668         Add all blend modes to <feBlend> (the SVG filter primitive) that are also
669         supported by HTML Canvas and CSS.
670
671         In addition, add "normal" blend mode to HTML Canvas as requested by the
672         CSS Compositing and Blending specification. (Referenced from HTML Canvas.)
673         With this change, SVG, CSS and Canvas truly share the same blend modes and
674         even the same keywords. This is much easier to for web authors.
675
676         http://www.w3.org/TR/2014/CR-compositing-1-20140220/#ltblendmodegt
677
678         Test: svg/filters/feBlend-all-blendmodes.svg
679
680         * platform/graphics/GraphicsTypes.cpp: Reorder blend mode text streams to match
681             enumeration order. Add a new function to parse blend modes independent of
682             compositing modes. Add a string "normal" that is supported by CSS, feBlend and
683             HTML Canvas now.
684         (WebCore::parseBlendMode):
685         (WebCore::parseCompositeAndBlendOperator):
686         * platform/graphics/GraphicsTypes.h: Reorder BlendMode enumeration values to match
687          the SVG JS enumeration for blend modes.
688         * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Move all software code that is no
689             longer required by the software path but still used by NEON here.
690         (WebCore::FEBlend::platformApplySoftware):
691         (WebCore::FEBlend::platformApplyNEON):
692         * platform/graphics/filters/FEBlend.cpp:
693             Use drawImageBuffer() to blend the results of previous filter primitives. This
694             allows removing more than 60% of the code.
695         (WebCore::FEBlend::FEBlend):
696         (WebCore::FEBlend::create):
697         (WebCore::FEBlend::blendMode):
698         (WebCore::FEBlend::setBlendMode):
699         (WebCore::FEBlend::platformApplySoftware):
700         (WebCore::FEBlend::dump):
701         (WebCore::FEBlend::externalRepresentation):
702         (WebCore::feBlendNormal): Deleted.
703         (WebCore::feBlendMultiply): Deleted.
704         (WebCore::feBlendScreen): Deleted.
705         (WebCore::feBlendDarken): Deleted.
706         (WebCore::feBlendLighten): Deleted.
707         (WebCore::feBlendUnknown): Deleted.
708         (WebCore::platformApply): Deleted.
709         (WebCore::FEBlend::platformApplyGeneric): Deleted.
710         (WebCore::operator<<): Deleted.
711         * platform/graphics/filters/FEBlend.h:
712         * svg/SVGAnimatedEnumeration.cpp: Use the global BlendMode enumeration.
713         (WebCore::enumerationValueForTargetAttribute):
714         * svg/SVGFEBlendElement.cpp:
715         (WebCore::SVGFEBlendElement::SVGFEBlendElement): Use the global BlendMode enumeration.
716             No new enumeration values added or exposed to SVG DOM as requested by SVG WG.
717         (WebCore::SVGFEBlendElement::parseAttribute):
718         * svg/SVGFEBlendElement.h: Replace BlendModeType with global BlendMode enumeration. Remove
719             blend mode parsing code and use the code in GraphicsTypes instead.
720         (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
721         (WebCore::SVGPropertyTraits<BlendMode>::toString):
722         (WebCore::SVGPropertyTraits<BlendModeType>::highestEnumValue): Deleted.
723         (WebCore::SVGPropertyTraits<BlendModeType>::toString): Deleted.
724         (WebCore::SVGPropertyTraits<BlendModeType>::fromString): Deleted.
725
726 2014-06-25  Zalan Bujtas  <zalan@apple.com>
727
728         Unreviewed iOS build fix after r170425.
729
730         * accessibility/AccessibilityProgressIndicator.cpp:
731         * accessibility/AccessibilityProgressIndicator.h:
732
733 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
734
735         AX: Crash at com.apple.WebCore: WebCore::AlternativeTextController::removeDictationAlternativesForMarker + 43
736         https://bugs.webkit.org/show_bug.cgi?id=134226
737
738         Reviewed by Enrica Casucci.
739
740         Unchecked access of details pointer in the Document marker led to the crash.
741         It seems erroneous to allow creation of a DocumentMarker without details when one is expected, because it
742         carries the dictation context (not just the description).
743         Also, add in ASSERTs to catch scenarios where a nullptr might be passed in.
744
745         Test: platform/mac/editing/input/crash-for-empty-text-alternative.html
746
747         * dom/DocumentMarker.cpp:
748         (WebCore::DocumentMarker::DocumentMarker):
749         * editing/AlternativeTextController.cpp:
750         (WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
751
752 2014-06-25  Laszlo Gombos  <l.gombos@samsung.com>
753
754         Remove build guard for progress element
755         https://bugs.webkit.org/show_bug.cgi?id=134292
756
757         Reviewed by Benjamin Poulain.
758
759         The build flag is no longer needed as it is always on.
760
761         No new tests as there is no new behaviour.
762
763         * Configurations/FeatureDefines.xcconfig:
764         * DerivedSources.make:
765         * accessibility/AXObjectCache.cpp:
766         (WebCore::createFromRenderer):
767         * accessibility/AccessibilityProgressIndicator.cpp:
768         (WebCore::AccessibilityProgressIndicator::create):
769         (WebCore::AccessibilityProgressIndicator::valueForRange):
770         (WebCore::AccessibilityProgressIndicator::maxValueForRange):
771         (WebCore::AccessibilityProgressIndicator::minValueForRange):
772         (WebCore::AccessibilityProgressIndicator::progressElement):
773         * accessibility/AccessibilityProgressIndicator.h:
774         * css/CSSPrimitiveValueMappings.h:
775         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
776         * css/StyleResolver.cpp:
777         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
778         * css/html.css:
779         (progress::-webkit-progress-value):
780         * html/HTMLProgressElement.cpp:
781         * html/HTMLProgressElement.h:
782         * html/HTMLProgressElement.idl:
783         * html/HTMLTagNames.in:
784         * html/shadow/ProgressShadowElement.cpp:
785         * html/shadow/ProgressShadowElement.h:
786         * platform/efl/DefaultTheme/CMakeLists.txt:
787         * platform/efl/DefaultTheme/default.edc:
788         * platform/efl/RenderThemeEfl.cpp:
789         (WebCore::toEdjeGroup):
790         (WebCore::RenderThemeEfl::applyEdjeRTLState):
791         (WebCore::RenderThemeEfl::paintProgressBar):
792         * platform/efl/RenderThemeEfl.h:
793         * platform/gtk/RenderThemeGtk.cpp:
794         (WebCore::RenderThemeGtk::calculateProgressRect):
795         * platform/gtk/RenderThemeGtk.h:
796         * platform/gtk/RenderThemeGtk2.cpp:
797         (WebCore::RenderThemeGtk::paintProgressBar):
798         * platform/gtk/RenderThemeGtk3.cpp:
799         (WebCore::RenderThemeGtk::paintProgressBar):
800         * rendering/RenderObject.h:
801         (WebCore::RenderObject::isSnapshottedPlugIn):
802         (WebCore::RenderObject::isProgress):
803         * rendering/RenderProgress.cpp:
804         * rendering/RenderProgress.h:
805         * rendering/RenderTheme.cpp:
806         (WebCore::RenderTheme::adjustStyle):
807         (WebCore::RenderTheme::paint):
808         (WebCore::RenderTheme::paintBorderOnly):
809         (WebCore::RenderTheme::paintDecorations):
810         (WebCore::RenderTheme::progressBarRectForBounds):
811         * rendering/RenderTheme.h:
812         (WebCore::RenderTheme::paintProgressBar):
813         * rendering/RenderThemeIOS.h:
814         * rendering/RenderThemeIOS.mm:
815         (WebCore::RenderThemeIOS::paintProgressBar):
816         * rendering/RenderThemeMac.h:
817         * rendering/RenderThemeMac.mm:
818         (WebCore::RenderThemeMac::paintProgressBar):
819
820 2014-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
821
822         Unreviewed. Update GObject DOM bindings test results after r170422.
823
824         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
825         (WebKit::wrapTestActiveDOMObject):
826         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
827         (WebKit::wrapTestCallback):
828         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
829         (WebKit::wrapTestCustomNamedGetter):
830         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
831         (WebKit::wrapTestEventConstructor):
832         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
833         (WebKit::wrapTestEventTarget):
834         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
835         (WebKit::wrapTestException):
836         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
837         (WebKit::wrapTestGenerateIsReachable):
838         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
839         (WebKit::wrapTestInterface):
840         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
841         (WebKit::wrapTestMediaQueryListListener):
842         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
843         (WebKit::wrapTestNamedConstructor):
844         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
845         (WebKit::wrapTestNode):
846         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
847         (WebKit::wrapTestNondeterministic):
848         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
849         (WebKit::wrapTestObj):
850         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
851         (WebKit::wrapTestOverloadedConstructors):
852         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
853         (WebKit::wrapTestSerializedScriptValueInterface):
854         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
855         (WebKit::wrapTestTypedefs):
856         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
857         (WebKit::wrapattribute):
858         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
859         (WebKit::wrapreadonly):
860
861 2014-06-24  Tomas Popela  <tpopela@redhat.com>
862
863         [GTK] Some of DOM bindings macros are misnamed
864         https://bugs.webkit.org/show_bug.cgi?id=121543
865
866         Reviewed by Carlos Garcia Campos.
867
868         As we are using WebKitDOM as a namespace we should unify all type macros
869         to have WEBKIT_DOM_TYPE prefix instead of WEBKIT_TYPE_DOM. Also add
870         more exceptions to decamelize function in GObject bindings generator
871         to fix the names of bindings for BR, HR, UL, OL, DL and LI elements.
872
873         * bindings/gobject/GObjectEventListener.cpp:
874         (WebCore::GObjectEventListener::handleEvent):
875         * bindings/gobject/WebKitDOMEventTarget.h:
876         * bindings/gobject/WebKitDOMNodeFilter.h:
877         * bindings/gobject/WebKitDOMObject.h:
878         * bindings/gobject/webkitdom.symbols:
879         * bindings/scripts/CodeGeneratorGObject.pm:
880         (decamelize):
881         (GetParentGObjType):
882         (GenerateProperty):
883         (GenerateHeader):
884         (GenerateCFile):
885         (GenerateEventTargetIface):
886         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
887         (WebKit::wrapFloat64Array):
888         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
889         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
890         (WebKit::wrapTestActiveDOMObject):
891         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
892         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
893         (WebKit::wrapTestCallback):
894         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
895         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
896         (WebKit::wrapTestCustomNamedGetter):
897         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
898         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
899         (WebKit::wrapTestEventConstructor):
900         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
901         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
902         (WebKit::wrapTestEventTarget):
903         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
904         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
905         (WebKit::wrapTestException):
906         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
907         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp:
908         (WebKit::wrapTestGenerateIsReachable):
909         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
910         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
911         (WebKit::wrapTestInterface):
912         (webkit_dom_test_interface_class_init):
913         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
914         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
915         (WebKit::wrapTestMediaQueryListListener):
916         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
917         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
918         (WebKit::wrapTestNamedConstructor):
919         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
920         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
921         (WebKit::wrapTestNode):
922         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
923         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
924         (WebKit::wrapTestNondeterministic):
925         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
926         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
927         (WebKit::wrapTestObj):
928         (webkit_dom_test_obj_class_init):
929         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
930         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
931         (WebKit::wrapTestOverloadedConstructors):
932         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
933         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
934         (WebKit::wrapTestSerializedScriptValueInterface):
935         (webkit_dom_test_serialized_script_value_interface_class_init):
936         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
937         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
938         (WebKit::wrapTestTypedefs):
939         (webkit_dom_test_typedefs_class_init):
940         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
941         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
942         (WebKit::wrapattribute):
943         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
944         * bindings/scripts/test/GObject/WebKitDOMreadonly.cpp:
945         (WebKit::wrapreadonly):
946         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
947
948 2014-06-24  Commit Queue  <commit-queue@webkit.org>
949
950         Unreviewed, rolling out r170414.
951         https://bugs.webkit.org/show_bug.cgi?id=134291
952
953         the patch added a test that fails on almost every Mac tester
954         (Requested by rniwa on #webkit).
955
956         Reverted changeset:
957
958         "Tiles on bottom of screen are not always allocated when
959         necessary"
960         https://bugs.webkit.org/show_bug.cgi?id=134272
961         http://trac.webkit.org/changeset/170414
962
963 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
964
965         Tiles on bottom of screen are not always allocated when necessary
966         https://bugs.webkit.org/show_bug.cgi?id=134272
967
968         Reviewed by Simon Fraser.
969
970         The initial visibleRect is in the coordinate of the root layer, so its origin
971         is at the top left of the view. The initial rect we were using doesn't
972         include the contents inset, so it was too short, which was causing tiles near
973         the bottom of the screen to not always be allocated if the tile threshold was
974         close to the bottom of the view. Instead, we want to include the contents
975         inset size so the visible rect includes the entire view.
976         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
977         the visible rect into the tiled layer's coordinate system, at which point it
978         is used for visible tile logic.
979
980         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
981
982         * platform/graphics/ca/TileCoverageMap.cpp:
983         (WebCore::TileCoverageMap::update):
984         * rendering/RenderLayerCompositor.cpp:
985         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
986
987 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
988
989         InlineTextBox's m_len can be an unsigned (rather than an unsigned short)
990         https://bugs.webkit.org/show_bug.cgi?id=134173
991
992         Reviewed by Daniel Bates.
993
994         After Zalan's talks with Kling, it seems that the simple line layout code
995         might alleviate the need for the space savings in InlineTextBox. Given this,
996         it would be beneficial to be a little more safe by using unsigneds throughout.
997
998         For example, we have code like "void setLen(unsigned len) { m_len = len; }"
999         which might silently break if given particular inputs.
1000
1001         No new tests because there is no behavior change.
1002
1003         * rendering/InlineTextBox.cpp:
1004         (WebCore::InlineTextBox::isSelected):
1005         (WebCore::InlineTextBox::localSelectionRect):
1006         (WebCore::InlineTextBox::paint):
1007         (WebCore::InlineTextBox::selectionStartEnd):
1008         (WebCore::InlineTextBox::paintSelection):
1009         (WebCore::InlineTextBox::paintCompositionBackground):
1010         (WebCore::InlineTextBox::paintDocumentMarker):
1011         (WebCore::InlineTextBox::paintTextMatchMarker):
1012         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1013         * rendering/InlineTextBox.h:
1014         (WebCore::InlineTextBox::truncation):
1015         * rendering/RenderTextLineBoxes.cpp:
1016         (WebCore::ellipsisRectForBox):
1017
1018 2014-06-24  Ryosuke Niwa  <rniwa@webkit.org>
1019
1020         Speculative 32-bit Mac build fix after r170402.
1021
1022         * platform/graphics/mac/ComplexTextController.cpp:
1023         (WebCore::advanceByCombiningCharacterSequence):
1024
1025 2014-06-24  Joseph Pecoraro  <pecoraro@apple.com>
1026
1027         [iOS]: WK2 Inspector Node Highlighting
1028         https://bugs.webkit.org/show_bug.cgi?id=134257
1029
1030         Reviewed by Timothy Hatcher.
1031
1032         Some clients want to get highlights with the scroll applied,
1033         others do not. Provide a CoordinateSpace param to be used for
1034         getting a highlight (only used on iOS).
1035
1036         * WebCore.exp.in:
1037         * inspector/InspectorController.cpp:
1038         (WebCore::InspectorController::getHighlight):
1039         * inspector/InspectorController.h:
1040         * inspector/InspectorOverlay.cpp:
1041         (WebCore::InspectorOverlay::getHighlight):
1042         (WebCore::buildObjectForRendererFragments):
1043         * inspector/InspectorOverlay.h:
1044         (WebCore::Highlight::Highlight):
1045         * testing/Internals.cpp:
1046         (WebCore::Internals::inspectorHighlightRects):
1047
1048 2014-06-24  Jer Noble  <jer.noble@apple.com>
1049
1050         [MSE][Mac] Uncaught exception when deallocating AVSampleBufferDisplayLayer
1051         https://bugs.webkit.org/show_bug.cgi?id=134281
1052
1053         Reviewed by Brent Fulgham.
1054
1055         AVSampleBufferDisplayLayer is throwing an exception from its -dealloc method because KVO observers exist
1056         at the time of dealloc. Remove the observer for outputObscuredDueToInsufficientExternalProtection inside
1057         -stopObservingLayer.
1058
1059         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1060         (-[WebAVSampleBufferErrorListener stopObservingLayer:]):
1061
1062 2014-06-24  Mark Rowe  <mrowe@apple.com>
1063
1064         WKContextHistoryClient::didNavigateWithNavigationData is passed incorrect URL when history.pushState is used
1065         <https://webkit.org/b/134271> / <rdar://problem/16270167>
1066
1067         Reviewed by Brady Eidson.
1068
1069         Tests: http/tests/globalhistory/history-delegate-pushstate.html
1070                http/tests/globalhistory/history-delegate-replacestate.html
1071
1072         * page/History.cpp:
1073         (WebCore::History::stateObjectAdded): Call HistoryController after updating the document's URL so that the
1074         URL will reflect the destination of the navigation when FrameLoaderClient::updateGlobalHistory is called.
1075
1076 2014-06-24  Myles C. Maxfield  <mmaxfield@apple.com>
1077
1078         advanceByCombiningCharacterSequence() can be simplified
1079         https://bugs.webkit.org/show_bug.cgi?id=133591
1080
1081         Reviewed by Dean Jackson.
1082
1083         Use U16_NEXT() because it already does what we're trying to do.
1084
1085         No new tests because there is no behavior change.
1086
1087         * platform/graphics/mac/ComplexTextController.cpp:
1088         (WebCore::advanceByCombiningCharacterSequence):
1089
1090 2014-06-24  Brady Eidson  <beidson@apple.com>
1091
1092         Enable GAMEPAD in the Mac build, but disabled at runtime.
1093         https://bugs.webkit.org/show_bug.cgi?id=134255
1094
1095         Reviewed by Dean Jackson.
1096
1097         No new tests (No changes to a tested config).
1098
1099         * bindings/scripts/CodeGeneratorJS.pm:
1100         (GenerateImplementation): Add the ability to have a function be EnabledAtRuntime by
1101           removing such functions from the prototype if they are disabled.
1102
1103         Change the three new objects and the one new function to be EnabledAtRuntime
1104         * Modules/gamepad/Gamepad.idl:
1105         * Modules/gamepad/GamepadButton.idl:
1106         * Modules/gamepad/GamepadEvent.idl:
1107         * Modules/gamepad/NavigatorGamepad.idl:
1108
1109         Add a RuntimeEnabledFeature for Gamepads:
1110         * bindings/generic/RuntimeEnabledFeatures.cpp:
1111         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1112         * bindings/generic/RuntimeEnabledFeatures.h:
1113         (WebCore::RuntimeEnabledFeatures::setGamepadsEnabled):
1114         (WebCore::RuntimeEnabledFeatures::gamepadsEnabled):
1115
1116         * Configurations/FeatureDefines.xcconfig:
1117
1118 2014-06-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1119
1120         CSS JIT: Add positionInRootFragments to SelectorFragment
1121         https://bugs.webkit.org/show_bug.cgi?id=133609
1122
1123         Reviewed by Benjamin Poulain.
1124
1125         Some non-backtrack-related predicates use relationToRightFragment information
1126         to decide whether checkingContext->elementStyle should be refered.
1127         To make it works correctly, add the positionInRootFragments field to SelectorFragment.
1128         When positionInRootFragments == Rightmost and relationToRightFragment == Rightmost,
1129         we should see checkingContext->elementStyle.
1130
1131         Test: fast/selectors/first-child-update-with-renderer.html
1132
1133         * cssjit/SelectorCompiler.cpp:
1134         (WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
1135         (WebCore::SelectorCompiler::addPseudoClassType):
1136         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1137         (WebCore::SelectorCompiler::constructFragments):
1138         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1139         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
1140         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1141         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
1142         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
1143         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1144
1145 2014-06-24  Jer Noble  <jer.noble@apple.com>
1146
1147         [Fullscreen][Mac] WKView is not firstResponder after entering fullscreen mode
1148         https://bugs.webkit.org/show_bug.cgi?id=134270
1149
1150         Reviewed by Jon Honeycutt.
1151
1152         The WebCoreFullScreenWindow's firstResponder is reset when the full screen animation completes and
1153         the window's style is changed to a fullscreen style. Save the firstResponder, and if it's still in
1154         the window's view hierarchy after the style changes, reset it to the firstResponder.
1155
1156         * platform/mac/WebCoreFullScreenWindow.mm:
1157         (-[WebCoreFullScreenWindow setStyleMask:]):
1158
1159 2014-06-24  Jer Noble  <jer.noble@apple.com>
1160
1161         [MSE][Mac] Pass AVSampleBufferDisplayLayer HDCP status through to EME
1162         https://bugs.webkit.org/show_bug.cgi?id=134221
1163
1164         Reviewed by Eric Carlson.
1165
1166         Pass the outputObscuredDueToInsufficientExternalProtection property of AVSampleBufferDisplayLayer
1167         as an error to the associated MediaKeySession object.
1168
1169         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1170         (-[WebAVSampleBufferErrorListener invalidate]):
1171         (-[WebAVSampleBufferErrorListener beginObservingLayer:]):
1172         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1173
1174 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
1175
1176         Use unsigneds instead of ints for indexes into a string in text layout code
1177         https://bugs.webkit.org/show_bug.cgi?id=133592
1178
1179         Reviewed by Zalan Bujtas.
1180
1181         Migrate much of the text-handling code to use unsigneds for indexes into a string.
1182
1183         No new tests because there is no behavior change.
1184
1185         * WebCore.exp.in:
1186         * platform/graphics/Font.cpp:
1187         (WebCore::Font::drawText):
1188         (WebCore::Font::drawEmphasisMarks):
1189         (WebCore::Font::adjustSelectionRectForText):
1190         (WebCore::computeUnderlineType):
1191         * platform/graphics/Font.h:
1192         * platform/graphics/FontFastPath.cpp:
1193         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1194         (WebCore::Font::drawSimpleText):
1195         (WebCore::Font::drawEmphasisMarksForSimpleText):
1196         (WebCore::Font::drawGlyphBuffer):
1197         (WebCore::Font::drawEmphasisMarks):
1198         (WebCore::Font::adjustSelectionRectForSimpleText):
1199         * platform/graphics/GlyphBuffer.h:
1200         (WebCore::GlyphBuffer::size):
1201         (WebCore::GlyphBuffer::glyphs):
1202         (WebCore::GlyphBuffer::advances):
1203         (WebCore::GlyphBuffer::fontDataAt):
1204         (WebCore::GlyphBuffer::advanceAt):
1205         (WebCore::GlyphBuffer::offsetAt):
1206         (WebCore::GlyphBuffer::reverse):
1207         (WebCore::GlyphBuffer::offsetInString):
1208         (WebCore::GlyphBuffer::swap):
1209         * platform/graphics/GraphicsContext.cpp:
1210         (WebCore::TextRunIterator::atEnd):
1211         * platform/graphics/Latin1TextIterator.h:
1212         (WebCore::Latin1TextIterator::Latin1TextIterator):
1213         (WebCore::Latin1TextIterator::currentCharacter):
1214         * platform/graphics/SimpleFontData.h:
1215         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
1216         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
1217         * platform/graphics/SurrogatePairAwareTextIterator.h:
1218         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
1219         * platform/graphics/TextRun.h:
1220         (WebCore::TextRun::length):
1221         (WebCore::TextRun::charactersLength):
1222         * platform/graphics/WidthIterator.cpp:
1223         (WebCore::WidthIterator::glyphDataForCharacter):
1224         (WebCore::applyFontTransforms):
1225         (WebCore::WidthIterator::advanceInternal):
1226         (WebCore::WidthIterator::advance):
1227         (WebCore::WidthIterator::advanceOneCharacter):
1228         * platform/graphics/WidthIterator.h:
1229         * platform/graphics/cairo/FontCairo.cpp:
1230         (WebCore::Font::drawGlyphs):
1231         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
1232         (WebCore::Font::drawComplexText):
1233         (WebCore::Font::drawEmphasisMarksForComplexText):
1234         (WebCore::Font::adjustSelectionRectForComplexText):
1235         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1236         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
1237         * platform/graphics/mac/FontComplexTextMac.cpp:
1238         (WebCore::Font::adjustSelectionRectForComplexText):
1239         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1240         (WebCore::Font::drawComplexText):
1241         (WebCore::Font::drawEmphasisMarksForComplexText):
1242         * platform/graphics/mac/FontMac.mm:
1243         (WebCore::Font::drawGlyphs):
1244         * platform/graphics/win/FontCGWin.cpp:
1245         (WebCore::Font::drawGlyphs):
1246         * platform/graphics/win/FontWin.cpp:
1247         (WebCore::Font::adjustSelectionRectForComplexText):
1248         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1249         (WebCore::Font::drawComplexText):
1250         (WebCore::Font::drawEmphasisMarksForComplexText):
1251         * platform/graphics/wince/FontWinCE.cpp:
1252         (WebCore::Font::drawGlyphs):
1253         (WebCore::Font::drawComplexText):
1254         (WebCore::Font::drawEmphasisMarksForComplexText):
1255         (WebCore::Font::selectionRectForComplexText):
1256         * rendering/InlineTextBox.cpp:
1257         (WebCore::InlineTextBox::isSelected):
1258         (WebCore::InlineTextBox::selectionState):
1259         (WebCore::adjustCharactersAndLengthForHyphen):
1260         (WebCore::InlineTextBox::localSelectionRect):
1261         (WebCore::InlineTextBox::paint):
1262         (WebCore::InlineTextBox::selectionStartEnd):
1263         (WebCore::InlineTextBox::paintSelection):
1264         (WebCore::InlineTextBox::paintCompositionBackground):
1265         (WebCore::InlineTextBox::paintDocumentMarker):
1266         (WebCore::InlineTextBox::paintTextMatchMarker):
1267         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1268         (WebCore::InlineTextBox::paintCompositionUnderline):
1269         (WebCore::InlineTextBox::positionForOffset):
1270         (WebCore::InlineTextBox::constructTextRun):
1271         * rendering/InlineTextBox.h:
1272         * rendering/RenderCombineText.cpp:
1273         (WebCore::RenderCombineText::getStringToRender):
1274         * rendering/RenderCombineText.h:
1275         * rendering/svg/SVGInlineFlowBox.cpp:
1276         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1277         * rendering/svg/SVGInlineTextBox.cpp:
1278         (WebCore::SVGInlineTextBox::positionForOffset):
1279         (WebCore::SVGInlineTextBox::localSelectionRect):
1280         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1281         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
1282         (WebCore::SVGInlineTextBox::paintText):
1283         * rendering/svg/SVGInlineTextBox.h:
1284         * rendering/svg/SVGTextMetricsBuilder.cpp:
1285         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
1286         (WebCore::SVGTextMetricsBuilder::advance):
1287         * rendering/svg/SVGTextQuery.cpp:
1288         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
1289         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
1290         (WebCore::SVGTextQuery::subStringLengthCallback):
1291         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
1292         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
1293         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
1294         (WebCore::SVGTextQuery::extentOfCharacterCallback):
1295         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
1296         * rendering/svg/SVGTextQuery.h:
1297         * rendering/svg/SVGTextRunRenderingContext.cpp:
1298         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
1299         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1300         * rendering/svg/SVGTextRunRenderingContext.h:
1301         * svg/SVGFontData.cpp:
1302         (WebCore::SVGFontData::applySVGGlyphSelection):
1303         * svg/SVGFontData.h:
1304
1305 2014-06-24  Eric Carlson  <eric.carlson@apple.com>
1306
1307         Unreviewed build fix.
1308
1309         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1310         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Cast variadic argument to int.
1311
1312 2014-06-24  Brent Fulgham  <bfulgham@apple.com>
1313
1314         [Win] MSVC mishandles enums in bitfields
1315         https://bugs.webkit.org/show_bug.cgi?id=134237
1316
1317         Reviewed by Michael Saboff.
1318
1319         Replace uses of enum types in bit fields with unsigned to
1320         avoid losing a bit to hold the sign value. This can result
1321         in Windows interpreting the value of the field improperly.
1322
1323         * loader/ResourceLoaderOptions.h:
1324         * platform/network/ResourceRequestBase.h:
1325         * platform/network/cf/ResourceResponse.h:
1326         * rendering/RenderLayer.h:
1327         * rendering/RenderMarquee.h:
1328
1329 2014-06-24  Antti Koivisto  <antti@apple.com>
1330
1331         Try to fix build.
1332
1333         * WebCore.exp.in: Remove duplicate export, this should be in the iOS section only.
1334
1335 2014-06-24  Eric Carlson  <eric.carlson@apple.com>
1336
1337         [Mac] process raw VTT in-band captions
1338         https://bugs.webkit.org/show_bug.cgi?id=134178
1339
1340         Reviewed by Jer Noble.
1341
1342         * CMakeLists.txt: Add ISOVTTCue.cpp|h.
1343         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1344         * WebCore.xcodeproj/project.pbxproj: Ditto.
1345
1346         * html/track/BufferedLineReader.h:
1347         (WebCore::BufferedLineReader::reset): New, empty the input buffer.
1348
1349         Make it possible to process WebVTT captions. 
1350         * html/track/InbandGenericTextTrack.cpp:
1351         (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
1352         (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
1353         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
1354         (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
1355         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
1356         (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
1357         * html/track/InbandGenericTextTrack.h:
1358
1359         * html/track/InbandTextTrack.h:
1360
1361         * html/track/InbandWebVTTTextTrack.cpp:
1362         (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
1363         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
1364             object.
1365         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
1366         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
1367         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
1368         * html/track/InbandWebVTTTextTrack.h:
1369
1370         * html/track/TextTrackCueGeneric.cpp:
1371         (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
1372             from a pointer to a reference.
1373         (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.
1374
1375         * html/track/VTTCue.cpp:
1376         (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
1377         (WebCore::VTTCueBox::VTTCueBox): Ditto.
1378         (WebCore::VTTCueBox::getCue): Return a reference.
1379         (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
1380         (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
1381         (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
1382         (WebCore::VTTCue::initialize): New, shared constructor initialization.
1383         (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
1384         (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
1385         (WebCore::VTTCue::setCueSettings): Ditto.
1386         * html/track/VTTCue.h:
1387         (WebCore::VTTCueBox::create): Deleted.
1388         (WebCore::VTTCue::create): Deleted.
1389
1390         * html/track/WebVTTParser.cpp:
1391         (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
1392             call the parser.
1393         (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
1394         (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
1395         (WebCore::WebVTTParser::collectTimeStamp): Ditto.
1396         * html/track/WebVTTParser.h:
1397         (WebCore::WebVTTCueData::originalStartTime): New.
1398         (WebCore::WebVTTCueData::setOriginalStartTime): New.
1399         (WebCore::WebVTTCueData::WebVTTCueData):
1400
1401         * loader/TextTrackLoader.cpp:
1402         (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.
1403
1404         Parse ISO WebVTT cue boxes.
1405         * platform/graphics/ISOVTTCue.cpp: Added.
1406         (WebCore::ISOBox::ISOBox):
1407         (WebCore::ISOBox::peekType):
1408         (WebCore::ISOBox::peekLength):
1409         (WebCore::ISOBox::peekString):
1410         (WebCore::vttCueBoxType):
1411         (WebCore::vttIdBoxType):
1412         (WebCore::vttSettingsBoxType):
1413         (WebCore::vttPayloadBoxType):
1414         (WebCore::vttCurrentTimeBoxType):
1415         (WebCore::vttCueSourceIDBoxType):
1416         (WebCore::ISOWebVTTCue::boxType):
1417         (WebCore::ISOWebVTTCue::ISOWebVTTCue):
1418         * platform/graphics/ISOVTTCue.h: Added.
1419         (WebCore::ISOBox::boxHeaderSize):
1420         (WebCore::ISOBox::length):
1421         (WebCore::ISOBox::type):
1422         (WebCore::ISOWebVTTCue::presentationTime):
1423         (WebCore::ISOWebVTTCue::duration):
1424         (WebCore::ISOWebVTTCue::sourceID):
1425         (WebCore::ISOWebVTTCue::id):
1426         (WebCore::ISOWebVTTCue::originalStartTime):
1427         (WebCore::ISOWebVTTCue::settings):
1428         (WebCore::ISOWebVTTCue::cueText):
1429
1430         * platform/graphics/InbandTextTrackPrivateClient.h:
1431         (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.
1432
1433         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1434         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
1435         (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
1436         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
1437         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
1438             CMSampleBuffers, create ISOWebVTTCue from the sample data.
1439         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1440
1441         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
1442         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
1443         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
1444         (WebCore::InbandTextTrackPrivateAVCF::create):
1445         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1446         (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
1447         (WebCore::LegibleOutputData::LegibleOutputData):
1448         (WebCore::AVFWrapper::processCue):
1449         (WebCore::AVFWrapper::legibleOutputCallback):
1450
1451         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
1452         (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
1453         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1454         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
1455
1456         * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
1457         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
1458             format to base class.
1459
1460         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1461         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1462         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
1463         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
1464         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
1465             options until we have tracks.
1466         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
1467         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
1468             attributed strings to track.
1469         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
1470         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
1471         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
1472
1473         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
1474         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
1475
1476 2014-06-24  Antti Koivisto  <antti@apple.com>
1477
1478         Only flush layers when the exposed rect actually changes
1479         https://bugs.webkit.org/show_bug.cgi?id=134248
1480
1481         Reviewed by Anders Carlsson.
1482
1483         * WebCore.exp.in:
1484
1485 2014-06-24  Brady Eidson  <beidson@apple.com>
1486
1487         Remove references to "Shader.h" which doesn't currently exist in the project.
1488
1489         Rubberstamped by Andreas Kling.
1490
1491         * WebCore.xcodeproj/project.pbxproj:
1492
1493 2014-06-24  Martin Hock  <mhock@apple.com>
1494
1495         [iOS] DOMWindow::outerWidth and outerHeight don't return useful values, so return 0.
1496         Also, revert r169281.
1497         https://bugs.webkit.org/show_bug.cgi?id=134233
1498         <rdar://problem/17060183>
1499
1500         Reviewed by Benjamin Poulain.
1501
1502         * page/DOMWindow.cpp:
1503         (WebCore::DOMWindow::outerHeight):
1504         (WebCore::DOMWindow::outerWidth):
1505
1506 2014-06-24  Jeremy Jones  <jeremyj@apple.com>
1507
1508         Don't set AudioSession active while interrupted.
1509         https://bugs.webkit.org/show_bug.cgi?id=134239
1510
1511         Reviewed by Eric Carlson.
1512
1513         To activate the AudioSession there must be a session with audio or video
1514         and being playing or paused.
1515
1516         * platform/audio/MediaSessionManager.cpp:
1517         (WebCore::MediaSessionManager::hasActive): added
1518         (WebCore::MediaSessionManager::beginInterruption): updateSessionState
1519         (WebCore::MediaSessionManager::sessionWillBeginPlayback): updateSessionState
1520         * platform/audio/MediaSessionManager.h: declare hasActive()
1521         * platform/audio/mac/MediaSessionManagerMac.cpp:
1522         (MediaSessionManager::updateSessionState): use hasActive()
1523
1524 2014-06-24  Jer Noble  <jer.noble@apple.com>
1525
1526         REGRESSION(r170336): Crash in HTMLMediaElement::seekTimerFired()
1527         https://bugs.webkit.org/show_bug.cgi?id=134253
1528
1529         Rubber-stamped by Eric Carlson.
1530
1531         Now that seekWithTolerance() has been split up into an asyncronous section, the null-checks in seekWithTolerance()
1532         need to be re-performed in seekTimerFired(), in case the m_player has been cleared between when the seek was initiated
1533         and when the asynchronous section is performed.
1534
1535         * html/HTMLMediaElement.cpp:
1536         (WebCore::HTMLMediaElement::seekTimerFired):
1537
1538 2014-06-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1539
1540         Fix unused parameter warnings if inspector is disabled
1541         https://bugs.webkit.org/show_bug.cgi?id=134244
1542
1543         Reviewed by Zalan Bujtas.
1544
1545         No new tests, no behavior change.
1546
1547         * inspector/InspectorConsoleInstrumentation.h:
1548         (WebCore::InspectorInstrumentation::startProfiling):
1549         (WebCore::InspectorInstrumentation::stopProfiling):
1550         * inspector/InspectorInstrumentation.h:
1551         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
1552         * loader/cache/CachedResourceLoader.cpp:
1553         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
1554
1555 2014-06-24  Jer Noble  <jer.noble@apple.com>
1556
1557         [MSE] Add null-check in sourceBufferPrivateAppendComplete().
1558         https://bugs.webkit.org/show_bug.cgi?id=133230
1559
1560         Reviewed by Eric Carlson.
1561
1562         * Modules/mediasource/SourceBuffer.cpp:
1563         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Bail early if the 
1564             SourceBuffer has been removed from the MediaSource.
1565
1566 2014-06-24  Commit Queue  <commit-queue@webkit.org>
1567
1568         Unreviewed, rolling out r170337.
1569         https://bugs.webkit.org/show_bug.cgi?id=134250
1570
1571         caused 3 layout tests to crash on debug. (Requested by zalan
1572         on #webkit).
1573
1574         Reverted changeset:
1575
1576         "Use unsigneds instead of ints for indexes into a string in
1577         text layout code"
1578         https://bugs.webkit.org/show_bug.cgi?id=133592
1579         http://trac.webkit.org/changeset/170337
1580
1581 2014-06-24  Jarek Czekalski  <jarekczek@poczta.onet.pl>
1582
1583         [ATK] Don't ignore links rendered as blocks.
1584         https://bugs.webkit.org/show_bug.cgi?id=130941
1585
1586         Reviewed by Mario Sanchez Prada.
1587
1588         * /m/usr/src/webkit-trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1589         (WebCore::AccessibilityObject::objectFocusedAndCaretOffsetUnignored): Don't ignore links
1590         when they are renderered with display:block.
1591
1592 2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1593
1594         Unreviewed. Update GObject DOM bindings test results after r170351.
1595
1596         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1597         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1598
1599 2014-06-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1600
1601         Unreviewed. Fix GTK+ build after r170309.
1602
1603         Skip functions returning arrays in GObject DOM bindings.
1604
1605         * bindings/scripts/CodeGeneratorGObject.pm:
1606         (SkipFunction):
1607
1608 2014-06-23  Ryuan Choi  <ryuan.choi@samsung.com>
1609
1610         [EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
1611         https://bugs.webkit.org/show_bug.cgi?id=134236
1612
1613         Reviewed by Gyuyoung Kim.
1614
1615         * platform/efl/RenderThemeEfl.cpp:
1616         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
1617         (WebCore::RenderThemeEfl::loadTheme):
1618         (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
1619         * platform/efl/RenderThemeEfl.h:
1620         * platform/graphics/efl/CairoUtilitiesEfl.cpp:
1621         (WebCore::evasObjectFromCairoImageSurface):
1622         * platform/graphics/efl/CairoUtilitiesEfl.h:
1623         * platform/graphics/efl/ImageEfl.cpp:
1624         (WebCore::BitmapImage::getEvasObject):
1625
1626 2014-06-23  Jeremy Jones  <jeremyj@apple.com>
1627
1628         Chapter forward/backward should seek to beginning/end.
1629         https://bugs.webkit.org/show_bug.cgi?id=134225
1630
1631         Reviewed by Eric Carlson.
1632
1633         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1634         (-[WebAVPlayerController seekChapterBackward:]): forwards to -seekToBeginning
1635         (-[WebAVPlayerController seekChapterForward:]): forwards to -seekToEnd
1636
1637 2014-06-23  Dean Jackson  <dino@apple.com>
1638
1639         [Mac] Don't draw focus rings if we are animating controls
1640         https://bugs.webkit.org/show_bug.cgi?id=134232
1641         <rdar://problem/17381121>
1642
1643         Reviewed by Tim Horton.
1644
1645         Controls in native apps do not draw their focus rings as they
1646         animate (in Yosemite). Turn this off for WebKit too. It turns
1647         out that when we were drawing them, they were in the wrong
1648         place anyway.
1649
1650         Since we don't animate controls when testing, we can't really test this.
1651
1652         * platform/mac/ThemeMac.mm:
1653         (WebCore::paintToggleButton): Only draw the focus ring if the
1654         NSButtonCell is not animating.
1655
1656 2014-06-23  Krzysztof Czech  <k.czech@samsung.com>
1657
1658         [ATK] Remove some unnecessary code from WebKitAccessibleWrapperAtk
1659         https://bugs.webkit.org/show_bug.cgi?id=134193
1660
1661         Reviewed by Gyuyoung Kim.
1662
1663         It was used along with DRT. Since we have stopped support WK1/DRT, it won't be needed.
1664
1665         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1666         (webkitAccessibleGetFocusedElement): Deleted.
1667         * accessibility/atk/WebKitAccessibleWrapperAtk.h:
1668
1669 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
1670
1671         Use unsigneds instead of ints for indexes into a string in text layout code
1672         https://bugs.webkit.org/show_bug.cgi?id=133592
1673
1674         Reviewed by Zalan Bujtas.
1675
1676         Migrate much of the text-handling code to use unsigneds for indexes into a string.
1677
1678         No new tests because there is no behavior change.
1679
1680         * WebCore.exp.in:
1681         * platform/graphics/Font.cpp:
1682         (WebCore::Font::drawText):
1683         (WebCore::Font::drawEmphasisMarks):
1684         (WebCore::Font::adjustSelectionRectForText):
1685         (WebCore::computeUnderlineType):
1686         * platform/graphics/Font.h:
1687         * platform/graphics/FontFastPath.cpp:
1688         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1689         (WebCore::Font::drawSimpleText):
1690         (WebCore::Font::drawEmphasisMarksForSimpleText):
1691         (WebCore::Font::drawGlyphBuffer):
1692         (WebCore::Font::drawEmphasisMarks):
1693         (WebCore::Font::adjustSelectionRectForSimpleText):
1694         * platform/graphics/GlyphBuffer.h:
1695         (WebCore::GlyphBuffer::size):
1696         (WebCore::GlyphBuffer::glyphs):
1697         (WebCore::GlyphBuffer::advances):
1698         (WebCore::GlyphBuffer::fontDataAt):
1699         (WebCore::GlyphBuffer::advanceAt):
1700         (WebCore::GlyphBuffer::offsetAt):
1701         (WebCore::GlyphBuffer::reverse):
1702         (WebCore::GlyphBuffer::offsetInString):
1703         (WebCore::GlyphBuffer::swap):
1704         * platform/graphics/GraphicsContext.cpp:
1705         (WebCore::TextRunIterator::atEnd):
1706         * platform/graphics/Latin1TextIterator.h:
1707         (WebCore::Latin1TextIterator::Latin1TextIterator):
1708         (WebCore::Latin1TextIterator::currentCharacter):
1709         * platform/graphics/SimpleFontData.h:
1710         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
1711         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
1712         * platform/graphics/SurrogatePairAwareTextIterator.h:
1713         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
1714         * platform/graphics/TextRun.h:
1715         (WebCore::TextRun::length):
1716         (WebCore::TextRun::charactersLength):
1717         * platform/graphics/WidthIterator.cpp:
1718         (WebCore::WidthIterator::glyphDataForCharacter):
1719         (WebCore::applyFontTransforms):
1720         (WebCore::WidthIterator::advanceInternal):
1721         (WebCore::WidthIterator::advance):
1722         (WebCore::WidthIterator::advanceOneCharacter):
1723         * platform/graphics/WidthIterator.h:
1724         * platform/graphics/cairo/FontCairo.cpp:
1725         (WebCore::Font::drawGlyphs):
1726         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
1727         (WebCore::Font::drawComplexText):
1728         (WebCore::Font::drawEmphasisMarksForComplexText):
1729         (WebCore::Font::adjustSelectionRectForComplexText):
1730         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1731         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
1732         * platform/graphics/mac/FontComplexTextMac.cpp:
1733         (WebCore::Font::adjustSelectionRectForComplexText):
1734         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1735         (WebCore::Font::drawComplexText):
1736         (WebCore::Font::drawEmphasisMarksForComplexText):
1737         * platform/graphics/mac/FontMac.mm:
1738         (WebCore::Font::drawGlyphs):
1739         * platform/graphics/win/FontCGWin.cpp:
1740         (WebCore::Font::drawGlyphs):
1741         * platform/graphics/win/FontWin.cpp:
1742         (WebCore::Font::adjustSelectionRectForComplexText):
1743         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
1744         (WebCore::Font::drawComplexText):
1745         (WebCore::Font::drawEmphasisMarksForComplexText):
1746         * platform/graphics/wince/FontWinCE.cpp:
1747         (WebCore::Font::drawGlyphs):
1748         (WebCore::Font::drawComplexText):
1749         (WebCore::Font::drawEmphasisMarksForComplexText):
1750         (WebCore::Font::selectionRectForComplexText):
1751         * rendering/InlineTextBox.cpp:
1752         (WebCore::InlineTextBox::isSelected):
1753         (WebCore::InlineTextBox::selectionState):
1754         (WebCore::adjustCharactersAndLengthForHyphen):
1755         (WebCore::InlineTextBox::localSelectionRect):
1756         (WebCore::InlineTextBox::paint):
1757         (WebCore::InlineTextBox::selectionStartEnd):
1758         (WebCore::InlineTextBox::paintSelection):
1759         (WebCore::InlineTextBox::paintCompositionBackground):
1760         (WebCore::InlineTextBox::paintDocumentMarker):
1761         (WebCore::InlineTextBox::paintTextMatchMarker):
1762         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1763         (WebCore::InlineTextBox::paintCompositionUnderline):
1764         (WebCore::InlineTextBox::positionForOffset):
1765         (WebCore::InlineTextBox::constructTextRun):
1766         * rendering/InlineTextBox.h:
1767         * rendering/RenderCombineText.cpp:
1768         (WebCore::RenderCombineText::getStringToRender):
1769         * rendering/RenderCombineText.h:
1770         * rendering/svg/SVGInlineFlowBox.cpp:
1771         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1772         * rendering/svg/SVGInlineTextBox.cpp:
1773         (WebCore::SVGInlineTextBox::positionForOffset):
1774         (WebCore::SVGInlineTextBox::localSelectionRect):
1775         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1776         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
1777         (WebCore::SVGInlineTextBox::paintText):
1778         * rendering/svg/SVGInlineTextBox.h:
1779         * rendering/svg/SVGTextMetricsBuilder.cpp:
1780         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
1781         (WebCore::SVGTextMetricsBuilder::advance):
1782         * rendering/svg/SVGTextQuery.cpp:
1783         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
1784         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
1785         (WebCore::SVGTextQuery::subStringLengthCallback):
1786         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
1787         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
1788         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
1789         (WebCore::SVGTextQuery::extentOfCharacterCallback):
1790         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
1791         * rendering/svg/SVGTextQuery.h:
1792         * rendering/svg/SVGTextRunRenderingContext.cpp:
1793         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
1794         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1795         * rendering/svg/SVGTextRunRenderingContext.h:
1796         * svg/SVGFontData.cpp:
1797         (WebCore::SVGFontData::applySVGGlyphSelection):
1798         * svg/SVGFontData.h:
1799
1800 2014-06-20  Jer Noble  <jer.noble@apple.com>
1801
1802         HTMLMediaElement seek algorithm should allow cancelling previous seeks.
1803         https://bugs.webkit.org/show_bug.cgi?id=134116
1804
1805         Reviewed by Eric Carlson.
1806
1807         Test: media/video-seek-double.html
1808
1809         Fulfill the requirement of the §4.7.14.9 seeking algorithm to do steps 5+ asynchronously and cancel
1810         previous instances of the algorithm.
1811
1812         For the html/ parts of the algorithm, implement this by adding a seek timer, which when fired will
1813         issue steps 5-12. MediaPlayerPrivateAVFoundation will already coalesce multiple seek operations, so nothing
1814         additional needs be done there.  However, MediaPlayerPrivateMediaSourceAVFObjC needs to implement the same
1815         pending seek logic in case additional seeks were issued after the html/ algorithm reached step 12.
1816
1817         * html/HTMLMediaElement.cpp:
1818         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the new m_seekTimer.
1819         (WebCore::HTMLMediaElement::parseAttribute): Clear the seek timer.
1820         (WebCore::HTMLMediaElement::seekInternal): Differentiate between DOM seeks and internal seeks.
1821         (WebCore::HTMLMediaElement::seekWithTolerance:) Split into the seekTimerFired() method.
1822         (WebCore::HTMLMediaElement::seekTimerFired:) Added, split from seekWithTolerance().
1823         * html/HTMLMediaElement.h:
1824         * html/MediaController.cpp:
1825         (MediaController::bringElementUpToSpeed): Call seekInternal().
1826         (WebCore::HTMLMediaElement::PendingSeek::PendingSeek): Added convenience struct for storing seek requests.
1827         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1828         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::PendingSeek::PendingSeek): Ditto.
1829         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1830         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Modify the time jumped
1831             handler to not clear the m_seeking flag if another seek request is pending.
1832         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
1833         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
1834
1835 2014-06-23  Timothy Horton  <timothy_horton@apple.com>
1836
1837         [WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
1838         https://bugs.webkit.org/show_bug.cgi?id=134218
1839         <rdar://problem/17426454>
1840
1841         Reviewed by Benjamin Poulain.
1842
1843         * WebCore.exp.in:
1844
1845 2014-06-23  Eric Carlson  <eric.carlson@apple.com>
1846
1847         [iOS] remove InbandTextTrackPrivateAVFIOS
1848         https://bugs.webkit.org/show_bug.cgi?id=134220
1849
1850         Reviewed by Benjamin Poulain.
1851
1852         * WebCore.xcodeproj/project.pbxproj: Remove references to InbandTextTrackPrivateAVFIOS.
1853
1854         * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Removed.
1855         * platform/graphics/ios/InbandTextTrackPrivateAVFIOS.mm: Removed.
1856
1857 2014-06-23  Commit Queue  <commit-queue@webkit.org>
1858
1859         Unreviewed, rolling out r170323.
1860         https://bugs.webkit.org/show_bug.cgi?id=134224
1861
1862         lots of build breakage (Requested by bradeeoh on #webkit).
1863
1864         Reverted changeset:
1865
1866         "[Mac] process raw VTT in-band captions"
1867         https://bugs.webkit.org/show_bug.cgi?id=134178
1868         http://trac.webkit.org/changeset/170323
1869
1870 2014-06-23  Jeffrey Pfau  <jpfau@apple.com>
1871
1872         Fix release build
1873
1874         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1875         (WebCore::IDBTransactionCoordinator::canRunTransaction):
1876
1877 2014-06-19  Jeffrey Pfau  <jpfau@apple.com>
1878
1879         Database process crashes when multiple transactions attempt to run at once
1880         https://bugs.webkit.org/show_bug.cgi?id=134139
1881
1882         Reviewed by David Kilzer.
1883
1884         Ensure that only one transaction can be running at a time.
1885
1886         Test: storage/indexeddb/transaction-overlapping.html
1887
1888         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1889         (WebCore::IDBTransactionCoordinator::canRunTransaction):
1890
1891 2014-06-23  Benjamin Poulain  <bpoulain@apple.com>
1892
1893         [iOS][WK2] Make the state restore from HistoryItem more precise and reliable
1894         https://bugs.webkit.org/show_bug.cgi?id=134150
1895
1896         Reviewed by Tim Horton.
1897
1898         The two biggest changes for WebCore are:
1899         -Store everything we need to handle changes of ViewportConfiguration on HistoryItem.
1900         -Store the exposedRect with floating point coordinates.
1901
1902         * WebCore.exp.in:
1903         * history/CachedPage.cpp:
1904         (WebCore::CachedPage::restore):
1905         We cannot determine a good scroll position from the WebProcess because the obscured insets can change
1906         arbitrarily in the UIProcess. When we scroll here from the WebProcess, we would force an invalid position
1907         to the UIProcess with the next layer tree update.
1908
1909         To avoid any problem, we prohibit scrolling when restoring the focus appearance.
1910
1911         * history/HistoryItem.cpp:
1912         (WebCore::encodeRect):
1913         (WebCore::encodeSize):
1914         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1915         (WebCore::decodeRect):
1916         (WebCore::decodeSize):
1917         (WebCore::HistoryItem::decodeBackForwardTree):
1918         * history/HistoryItem.h:
1919         (WebCore::HistoryItem::exposedContentRect):
1920         (WebCore::HistoryItem::setExposedContentRect):
1921         (WebCore::HistoryItem::unobscuredContentRect):
1922         (WebCore::HistoryItem::setUnobscuredContentRect):
1923         (WebCore::HistoryItem::minimumLayoutSizeInScrollViewCoordinates):
1924         (WebCore::HistoryItem::setMinimumLayoutSizeInScrollViewCoordinates):
1925         (WebCore::HistoryItem::contentSize):
1926         (WebCore::HistoryItem::setContentSize):
1927         (WebCore::HistoryItem::exposedContentPosition): Deleted.
1928         (WebCore::HistoryItem::setExposedContentPosition): Deleted.
1929         * loader/HistoryController.cpp:
1930         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1931         * page/FrameView.h:
1932         * platform/ScrollView.h:
1933         * platform/ios/ScrollViewIOS.mm:
1934         (WebCore::ScrollView::exposedContentRect):
1935         (WebCore::ScrollView::setExposedContentRect):
1936         * rendering/RenderLayerCompositor.cpp:
1937         (WebCore::RenderLayerCompositor::didChangeVisibleRect):
1938
1939 2014-06-23  Eric Carlson  <eric.carlson@apple.com>
1940
1941         [Mac] process raw VTT in-band captions
1942         https://bugs.webkit.org/show_bug.cgi?id=134178
1943
1944         Reviewed by Jer Noble.
1945
1946         * CMakeLists.txt: Add ISOVTTCue.cpp|h.
1947         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1948         * WebCore.xcodeproj/project.pbxproj: Ditto.
1949
1950         * html/track/BufferedLineReader.h:
1951         (WebCore::BufferedLineReader::reset): New, empty the input buffer.
1952
1953         Make it possible to process WebVTT captions. 
1954         * html/track/InbandGenericTextTrack.cpp:
1955         (WebCore::InbandGenericTextTrack::parser): Allocate, if necessary, and return a WebVTT parser.
1956         (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Pass a cue to the parser.
1957         (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Pass a VTT file header to the parser.
1958         (WebCore::InbandGenericTextTrack::newCuesParsed): Parser callback.
1959         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
1960         (WebCore::InbandGenericTextTrack::fileFailedToParse): Ditto.
1961         * html/track/InbandGenericTextTrack.h:
1962
1963         * html/track/InbandTextTrack.h:
1964
1965         * html/track/InbandWebVTTTextTrack.cpp:
1966         (WebCore::InbandWebVTTTextTrack::parser): New, parser accessor.
1967         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): New, parse VTT data in an ISOWebVTTCue
1968             object.
1969         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Cleanup.
1970         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Implement.
1971         (WebCore::InbandWebVTTTextTrack::fileFailedToParse): Change the error message.
1972         * html/track/InbandWebVTTTextTrack.h:
1973
1974         * html/track/TextTrackCueGeneric.cpp:
1975         (WebCore::TextTrackCueGenericBoxElement::TextTrackCueGenericBoxElement): Change cue parameter
1976             from a pointer to a reference.
1977         (WebCore::TextTrackCueGeneric::createDisplayTree): Ditto.
1978
1979         * html/track/VTTCue.cpp:
1980         (WebCore::VTTCueBox::create): Change cue parameter from a pointer to a reference.
1981         (WebCore::VTTCueBox::VTTCueBox): Ditto.
1982         (WebCore::VTTCueBox::getCue): Return a reference.
1983         (WebCore::VTTCueBox::applyCSSProperties): m_cue is a reference, not a pointer.
1984         (WebCore::VTTCue::create): New, create a VTTCue from WebVTTCueData.
1985         (WebCore::VTTCue::VTTCue): New, internal constructor that takes a WebVTTCueData.
1986         (WebCore::VTTCue::initialize): New, shared constructor initialization.
1987         (WebCore::VTTCue::createDisplayTree): m_cue is a reference, not a pointer.
1988         (WebCore::VTTCue::markFutureAndPastNodes): Ditto.
1989         (WebCore::VTTCue::setCueSettings): Ditto.
1990         * html/track/VTTCue.h:
1991         (WebCore::VTTCueBox::create): Deleted.
1992         (WebCore::VTTCue::create): Deleted.
1993
1994         * html/track/WebVTTParser.cpp:
1995         (WebCore::WebVTTParser::parseFileHeader): New. Reset the line reader buffer and parser state, 
1996             call the parser.
1997         (WebCore::WebVTTParser::parseCueData): Create a cue from ISOWebVTTCue.
1998         (WebCore::WebVTTParser::collectTimingsAndSettings): Return immediately if the string is empty.
1999         (WebCore::WebVTTParser::collectTimeStamp): Ditto.
2000         * html/track/WebVTTParser.h:
2001         (WebCore::WebVTTCueData::originalStartTime): New.
2002         (WebCore::WebVTTCueData::setOriginalStartTime): New.
2003         (WebCore::WebVTTCueData::WebVTTCueData):
2004
2005         * loader/TextTrackLoader.cpp:
2006         (WebCore::TextTrackLoader::getNewCues): Cleanup, use the new VTTCue::create.
2007
2008         * platform/graphics/InbandTextTrackPrivateClient.h:
2009         (WebCore::InbandTextTrackPrivateClient::parseWebVTTFileHeader): New.
2010
2011         Parse ISO WebVTT cue boxes.
2012         * platform/graphics/ISOVTTCue.cpp: Added.
2013         (WebCore::ISOBox::ISOBox):
2014         (WebCore::ISOBox::peekType):
2015         (WebCore::ISOBox::peekLength):
2016         (WebCore::ISOBox::peekString):
2017         (WebCore::vttCueBoxType):
2018         (WebCore::vttIdBoxType):
2019         (WebCore::vttSettingsBoxType):
2020         (WebCore::vttPayloadBoxType):
2021         (WebCore::vttCurrentTimeBoxType):
2022         (WebCore::vttCueSourceIDBoxType):
2023         (WebCore::ISOWebVTTCue::boxType):
2024         (WebCore::ISOWebVTTCue::ISOWebVTTCue):
2025         * platform/graphics/ISOVTTCue.h: Added.
2026         (WebCore::ISOBox::boxHeaderSize):
2027         (WebCore::ISOBox::length):
2028         (WebCore::ISOBox::type):
2029         (WebCore::ISOWebVTTCue::presentationTime):
2030         (WebCore::ISOWebVTTCue::duration):
2031         (WebCore::ISOWebVTTCue::sourceID):
2032         (WebCore::ISOWebVTTCue::id):
2033         (WebCore::ISOWebVTTCue::originalStartTime):
2034         (WebCore::ISOWebVTTCue::settings):
2035         (WebCore::ISOWebVTTCue::cueText):
2036
2037         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2038         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Add a cue format parameter.
2039         (WebCore::InbandTextTrackPrivateAVF::processCue): Call processNativeSamples.
2040         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Add logging. Minor cleanup.
2041         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): New, process an array of 
2042             CMSampleBuffers, create ISOWebVTTCue from the sample data.
2043         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2044
2045         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
2046         (WebCore::InbandTextTrackPrivateAVFObjC::create): Add a cue format parameter.
2047         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2048         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
2049
2050         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2051         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2052         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Improve logging.
2053         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't leak an NSDictionary.
2054         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't process media selection
2055             options until we have tracks.
2056         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): 
2057         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass native samples as well as 
2058             attributed strings to track.
2059         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
2060         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
2061         (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF):
2062
2063         * platform/graphics/avfoundation/InbandTextTrackPrivateLegacyAVFObjC.cpp:
2064         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::InbandTextTrackPrivateLegacyAVFObjC): Pass cue
2065             format to base class.
2066
2067         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2068         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF): Ditto.
2069         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
2070
2071 2014-06-23  Jer Noble  <jer.noble@apple.com>
2072
2073         [MSE][Mac] Crash in SourceBuffer::sourceBufferPrivateDidReceiveRenderingError()
2074         https://bugs.webkit.org/show_bug.cgi?id=134211
2075
2076         Reviewed by Eric Carlson.
2077
2078         Null-check m_source before dereferencing, as the SourceBuffer may have been removed
2079         from its MediaSource before this error was received.
2080
2081         * Modules/mediasource/SourceBuffer.cpp:
2082         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
2083
2084 2014-06-23  Joseph Pecoraro  <pecoraro@apple.com>
2085
2086         Reduce synchronous layout triggered by JavaScript-based media controls
2087         https://bugs.webkit.org/show_bug.cgi?id=134208
2088
2089         Reviewed by Eric Carlson.
2090
2091         Avoid always querying the offsetWidth and offsetHeight of the timeline
2092         by only calculating these values when the timeline may change size.
2093         Also avoid doing work in a few cases where properties did not
2094         actually change.
2095
2096         * Modules/mediacontrols/mediaControlsApple.js:
2097         (Controller):
2098
2099         (Controller.prototype.setNeedsTimelineMetricsUpdate):
2100         (Controller.prototype.updateTimelineMetricsIfNeeded):
2101         Only update the timeline metrics when they may have changed.
2102
2103         (Controller.prototype.updateControls):
2104         (Controller.prototype.handleTimelineMouseMove):
2105         (Controller.prototype.progressFillStyle):
2106         (Controller.prototype.showControls):
2107         (Controller.prototype.addControls):
2108         Mark timeline metrics need update based on various UI changes.
2109
2110         (Controller.prototype.setStatusHidden):
2111         Only do work if the hidden status changed.
2112         Mark timeline metrics need update if the timeline is changed.
2113
2114         (Controller.prototype.updateProgress):
2115         Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.
2116
2117         * Modules/mediacontrols/mediaControlsiOS.js:
2118         (ControllerIOS):
2119         (ControllerIOS.prototype.updateControls):
2120
2121         (ControllerIOS.prototype.updateProgress):
2122         Use cached timeline metrics instead of always querying offsetWidth/offsetHeight.
2123
2124         (ControllerIOS.prototype.handleWirelessPlaybackChange):
2125         Mark timeline metrics need update as button may have changed.
2126
2127         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
2128         Only do work if the availability changed.
2129         Mark timeline metrics need update as a new button may have appeared.
2130
2131         (ControllerIOS.prototype.set pageScaleFactor):
2132         Only do work if the page scale factor changed.
2133
2134 2014-06-23  Brady Eidson  <beidson@apple.com>
2135
2136         Add skeleton code for updated Gamepad API
2137         https://bugs.webkit.org/show_bug.cgi?id=134165
2138
2139         Unreviewed - Forgotten review feedback from http://trac.webkit.org/changeset/170309
2140
2141         * Modules/gamepad/GamepadButton.idl: Forgot to commit the removal of NoInterfaceObject here.
2142
2143 2014-06-23  Brady Eidson  <beidson@apple.com>
2144
2145         Add skeleton code for updated Gamepad API
2146         https://bugs.webkit.org/show_bug.cgi?id=134165
2147
2148         Reviewed by Dean Jackson.
2149
2150         No new tests (No change in behavior for any tested configuration)
2151
2152         Interface and dummy implementation for the Gamepad object:
2153         * Modules/gamepad/Gamepad.cpp: Added.
2154         (WebCore::Gamepad::Gamepad):
2155         (WebCore::Gamepad::~Gamepad):
2156         (WebCore::Gamepad::axes):
2157         (WebCore::Gamepad::buttons):
2158         * Modules/gamepad/Gamepad.h: Added.
2159         * Modules/gamepad/Gamepad.idl: Added.
2160
2161         Interface and dummy implementation for the GamepadButton object:
2162         * Modules/gamepad/GamepadButton.cpp: Added.
2163         (WebCore::GamepadButton::GamepadButton):
2164         (WebCore::GamepadButton::pressed):
2165         * Modules/gamepad/GamepadButton.h: Added.
2166         (WebCore::GamepadButton::create):
2167         (WebCore::GamepadButton::value):
2168         (WebCore::GamepadButton::setValue):
2169         * Modules/gamepad/GamepadButton.idl: Added.
2170
2171         Interface and dummy implementation for the GamepadEvent object:
2172         * Modules/gamepad/GamepadEvent.cpp: Added.
2173         (WebCore::GamepadEvent::GamepadEvent):
2174         * Modules/gamepad/GamepadEvent.h: Added.
2175         (WebCore::GamepadEventInit::GamepadEventInit):
2176         (WebCore::GamepadEvent::~GamepadEvent):
2177         (WebCore::GamepadEvent::create):
2178         (WebCore::GamepadEvent::gamepad):
2179         * Modules/gamepad/GamepadEvent.idl: Added.
2180         * dom/EventNames.in:
2181
2182         Interface and dummy implementation for additions to the Navigator object:
2183         * Modules/gamepad/NavigatorGamepad.cpp: Added.
2184         (WebCore::NavigatorGamepad::NavigatorGamepad):
2185         (WebCore::NavigatorGamepad::supplementName):
2186         (WebCore::NavigatorGamepad::from):
2187         (WebCore::NavigatorGamepad::getGamepads):
2188         (WebCore::NavigatorGamepad::gamepads):
2189         * Modules/gamepad/NavigatorGamepad.h: Added.
2190         * Modules/gamepad/NavigatorGamepad.idl: Added.
2191
2192         Bindings additions necessary for these new interfaces:
2193         * bindings/js/JSDOMBinding.h:
2194         (WebCore::JSValueTraits<double>::arrayJSValue):
2195         * bindings/js/JSDictionary.cpp:
2196         (WebCore::JSDictionary::convertValue):
2197         * bindings/js/JSDictionary.h:
2198
2199         Project file stuff:
2200         * CMakeLists.txt:
2201         * WebCore.vcxproj/WebCore.vcxproj:
2202         * WebCore.vcxproj/WebCoreCommon.props:
2203         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2204         * WebCore.xcodeproj/project.pbxproj:
2205         * DerivedSources.make:
2206
2207 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
2208
2209         Catch Obj-C exceptions thrown by _linenPatternImage
2210         https://bugs.webkit.org/show_bug.cgi?id=134202
2211
2212         Reviewed by Geoffrey Garen.
2213
2214         Catch Objective-C exceptions thrown by _linenPatternImage and
2215         -[NSImage CGImageForProposedRect:context:hints:].
2216
2217         * platform/mac/ScrollbarThemeMac.mm:
2218         (WebCore::linenBackgroundColor):
2219
2220 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
2221
2222         CSS clip property should make layers non-opaque
2223         https://bugs.webkit.org/show_bug.cgi?id=134147
2224         <rdar://problem/17324579>
2225
2226         Reviewed by Tim Horton.
2227         
2228         https://www.fairphone.com has position:fixed elements with clip: rect(...)
2229         but we were making those layers opaque, resulting in garbage pixels
2230         in areas outside the clip rect.
2231         
2232         Fix by checking for the clip property in RenderBox::backgroundIsKnownToBeOpaqueInRect().
2233
2234         Test: compositing/contents-opaque/opaque-with-clip.html
2235
2236         * rendering/RenderBox.cpp:
2237         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
2238
2239 2014-06-23  Simon Fraser  <simon.fraser@apple.com>
2240
2241         Adding a mask on a simple color compositing layer removes the content
2242         https://bugs.webkit.org/show_bug.cgi?id=134127
2243
2244         Reviewed by Dean Jackson.
2245         
2246         In r169053 I moved some updateDrawsContent() into updateAfterDescendents(),
2247         but this isn't called when a composited layer gains or loses a mask (which
2248         doesn't cause a layout). This caused us to fail to allocate backing store
2249         when gaining a mask, resulting in missing content.
2250         
2251         Fix by calling updateAfterDescendents() from RenderLayer::styleChange()
2252         when the layer config isn't changing.
2253         
2254         Also remove a condition in isSimpleContainerCompositingLayer() that caused us
2255         to fall off the simple layer path for masked layers, since this works just
2256         fine.
2257
2258         Test: compositing/masks/solid-color-masked.html
2259
2260         * rendering/RenderLayer.cpp:
2261         (WebCore::RenderLayer::calculateClipRects):
2262         * rendering/RenderLayerBacking.cpp:
2263         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2264
2265 2014-06-23  David Hyatt  <hyatt@apple.com>
2266
2267         [New Multicolumn] Writing mode changes on the <html> and RenderView need to
2268         be propagated to column sets and flow thread children of those renderers.
2269         https://bugs.webkit.org/show_bug.cgi?id=134121
2270         <rdar://problem/16884527>
2271
2272         Reviewed by Dean Jackson.
2273
2274         Added fast/multicol/pagination/RightToLeft-rl-dynamic.html
2275
2276         * rendering/RenderBlockFlow.cpp:
2277         (WebCore::RenderBlockFlow::styleDidChange):
2278         Refactor the propagation code for column sets and flow thread styles into a helper
2279         function that is called here.
2280
2281         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
2282         * rendering/RenderBlockFlow.h:
2283         Add a new helper function for recalculating the styles of the column sets and
2284         flow thread in response to changes.
2285
2286         * rendering/RenderBox.cpp:
2287         (WebCore::RenderBox::styleDidChange):
2288         When the style is changed for a root element or the RenderView in response to
2289         writing mode and direction changes, make sure that style gets propagated to
2290         the column children by calling the new helper function.
2291
2292 2014-06-23  Jer Noble  <jer.noble@apple.com>
2293
2294         [Mac] Uncaught exception crash when destroying MediaPlayerPrivateAVFoundationObjC
2295         https://bugs.webkit.org/show_bug.cgi?id=134198
2296
2297         Reviewed by Eric Carlson.
2298
2299         Now that we always create an AVPlayerLayer when creating an AVPlayer, but we don't
2300         return that layer from platformLayer() unless we've been asked to, we no longer are
2301         asked to destroy our video layer from MediaPlayerPrivateAVFoundation::tearDownVideoRendering().
2302
2303         Instead, explicitly destroy our video layer (and remove the KVO-observer which is
2304         causing this exception) in the MediaPlayerPrivateAVFoundationObjC destructor.
2305
2306         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2307         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
2308
2309 2014-06-23  Andreas Kling  <akling@apple.com>
2310
2311         Remove unused FrameView::setUseCustomFixedPositionLayoutRect().
2312         <https://webkit.org/b/134194>
2313
2314         Reviewed by Anders Carlsson.
2315
2316         * WebCore.exp.in:
2317         * page/FrameView.cpp:
2318         (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Deleted.
2319         * page/FrameView.h:
2320
2321 2014-06-23  Antti Koivisto  <antti@apple.com>
2322
2323         REGRESSION (r160908): Unable to unset bold while entering text
2324         https://bugs.webkit.org/show_bug.cgi?id=134196
2325         <rdar://problem/17051653>
2326
2327         Reviewed by Andreas Kling.
2328         
2329         No test, this code path is used by some WK1 API clients only.
2330
2331         * editing/Editor.cpp:
2332         (WebCore::Editor::styleForSelectionStart):
2333         
2334             This needs to update the style before requesting the renderer.
2335
2336         * editing/Editor.h:
2337         * editing/ios/EditorIOS.mm:
2338         (WebCore::styleForSelectionStart): Deleted.
2339         * editing/mac/EditorMac.mm:
2340         (WebCore::styleForSelectionStart): Deleted.
2341         
2342             Removed the duplicated functions, moved to Editor.cpp.
2343
2344 2014-06-23  Alex Christensen  <achristensen@webkit.org>
2345
2346         [iOS] Fix video in WebGL.
2347         https://bugs.webkit.org/show_bug.cgi?id=133511
2348
2349         Reviewed by Jer Noble.
2350
2351         * WebCore.exp.in:
2352         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2353         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
2354         (WebCore::wkAVAssetResolvedURL): Deleted.
2355         * platform/mac/WebCoreSystemInterface.h:
2356         * platform/mac/WebCoreSystemInterface.mm:
2357         Declare and use resolvedURL on AVURLAsset instead of using wkAVAssetResolvedURL through WebKitSystemInterface.
2358
2359 2014-06-23  Radu Stavila  <stavila@adobe.com>
2360
2361         REGRESSION (r168046): Incorrect handling of object information in WebCore::RenderFlowThread::removeLineRegionInfo
2362         https://bugs.webkit.org/show_bug.cgi?id=133587
2363
2364         Reviewed by Antti Koivisto.
2365
2366         When an object flowed in multicol is moved from in-flow positioning to out-of-flow positioning,
2367         its information must be removed from the flowthread prior to the change being made. 
2368         Otherwise, the flow thread will no longer be its containing block and a reference to it
2369         will not be possible to obtain.
2370
2371         No new tests can be added because the code still hits in an unrelated assertion followed by a null dereference.
2372         The issue was discussed with Antti Koivisto and we decided its better to fix this problem first and
2373         handle the following issue in a separate bug.
2374
2375         * rendering/RenderBlockFlow.cpp:
2376         (WebCore::RenderBlockFlow::styleWillChange):
2377         * rendering/RenderObject.h:
2378         (WebCore::RenderObject::flowThreadContainingBlock):
2379
2380 2014-06-23  Krzysztof Czech  <k.czech@samsung.com>
2381
2382         [EFL] Platform support for WebSpeech feature.
2383         https://bugs.webkit.org/show_bug.cgi?id=116438
2384
2385         Reviewed by Csaba Osztrogonác.
2386
2387         It's a first step of adding support for Speech Synthesis in EFL port.
2388         Just stub out required API and support for compilation.
2389
2390         * CMakeLists.txt:
2391         * PlatformEfl.cmake:
2392         * PlatformGTK.cmake: Added some idls to not break GTK build.
2393         * platform/PlatformSpeechSynthesizer.h:
2394         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
2395         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
2396         (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
2397         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
2398         (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
2399         (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
2400         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
2401         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
2402         * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
2403         * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
2404         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2405         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2406         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2407         (WebCore::PlatformSpeechSynthesizer::pause):
2408         (WebCore::PlatformSpeechSynthesizer::resume):
2409         (WebCore::PlatformSpeechSynthesizer::speak):
2410         (WebCore::PlatformSpeechSynthesizer::cancel):
2411
2412 2014-06-23  Jeongeun Kim  <je_julie.kim@samsung.com>
2413
2414         Make it clear to get m_svgExtensions using svgExtensions().
2415         https://bugs.webkit.org/show_bug.cgi?id=134186.
2416
2417         Reviewed by Dirk Schulze.
2418
2419         This patch makes sure that the purpose of code is to get m_svgExtensions 
2420         as changing accessSVGExtensions() to svgExtensions(). 
2421         svgExtensions() is a getter API and accessSVGExtensions() checks 
2422         the presence of m_svgExtensions and create m_svgExtensions if it does not exist. 
2423
2424         No new tests, no behavior change.
2425
2426         * dom/ContainerNode.cpp:
2427         (WebCore::ContainerNode::removeChild):
2428         (WebCore::ContainerNode::removeChildren):
2429         * dom/Document.cpp:
2430         (WebCore::Document::commonTeardown):
2431         (WebCore::Document::implicitClose):
2432         * history/CachedFrame.cpp:
2433         (WebCore::CachedFrameBase::restore):
2434         * svg/SVGDocumentExtensions.cpp:
2435         (WebCore::SVGDocumentExtensions::startAnimations):
2436         (WebCore::SVGDocumentExtensions::pauseAnimations):
2437         (WebCore::SVGDocumentExtensions::unpauseAnimations):
2438         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
2439         (WebCore::SVGDocumentExtensions::rebuildElements):
2440         * svg/SVGDocumentExtensions.h:
2441
2442 2014-06-23  Dean Jackson  <dino@apple.com>
2443
2444         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
2445         https://bugs.webkit.org/show_bug.cgi?id=134183
2446
2447         Follow-up review from Sam Weinig.
2448
2449         * platform/graphics/GraphicsContext3D.h: Merge another bit of MAC and IOS
2450         code.
2451         * ChangeLog: Actually read his review comments this time.
2452
2453 2014-06-23  Dean Jackson  <dino@apple.com>
2454
2455         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
2456         https://bugs.webkit.org/show_bug.cgi?id=134183
2457
2458         Reviewed by Sam Weinig.
2459
2460         GraphicsContext3D has a reference to a WebGLLayer that was
2461         hidden behind a PlatformLayer. This meant we had to cast it
2462         to use a WebGLLayer method.
2463
2464         * platform/graphics/GraphicsContext3D.h: Replace RetainPtr<PlatformLayer>
2465         with RetainPtr<WebGLLayer>.
2466         * platform/graphics/mac/GraphicsContext3DMac.mm:
2467         (WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.
2468
2469 2014-06-22  Zalan Bujtas  <zalan@apple.com>
2470
2471         Make offset from ancestor computation explicit by moving it to the callers.
2472         https://bugs.webkit.org/show_bug.cgi?id=134168.
2473
2474         Reviewed by Simon Fraser.
2475         
2476         Explicit offset computation helps code reading and less error-prone than passing
2477         the offset pointer and compute it locally when it is null.
2478
2479         No change in functionality.
2480
2481         * rendering/RenderLayer.cpp:
2482         (WebCore::transparencyClipBox):
2483         (WebCore::performOverlapTests):
2484         (WebCore::RenderLayer::setupClipPath):
2485         (WebCore::RenderLayer::setupFilters):
2486         (WebCore::RenderLayer::paintLayerContents):
2487         (WebCore::RenderLayer::collectFragments):
2488         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2489         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2490         (WebCore::RenderLayer::hitTestLayer):
2491         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2492         (WebCore::RenderLayer::calculateClipRects):
2493         * rendering/RenderLayer.h:
2494         * rendering/RenderLayerCompositor.cpp:
2495         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2496         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2497         * rendering/RenderTreeAsText.cpp:
2498         (WebCore::writeLayers):
2499
2500 2014-06-22  Zalan Bujtas  <zalan@apple.com>
2501
2502         Transition layer offsets from LayoutPoint to LayoutSize.
2503         https://bugs.webkit.org/show_bug.cgi?id=134156
2504
2505         Reviewed by Simon Fraser.
2506
2507         Use better representation for offset values.
2508
2509         No change in functionality.
2510
2511         * platform/graphics/LayoutSize.h:
2512         (WebCore::roundedForPainting):
2513         * rendering/RenderFlowThread.cpp:
2514         (WebCore::RenderFlowThread::fragmentsBoundingBox):
2515         * rendering/RenderLayer.cpp:
2516         (WebCore::expandClipRectForDescendantsAndReflection):
2517         (WebCore::RenderLayer::convertToLayerCoords):
2518         (WebCore::computeReferenceBox):
2519         (WebCore::RenderLayer::setupClipPath):
2520         (WebCore::RenderLayer::setupFilters):
2521         (WebCore::RenderLayer::paintLayerContents):
2522         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2523         (WebCore::RenderLayer::collectFragments):
2524         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2525         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2526         (WebCore::RenderLayer::createLocalTransformState):
2527         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2528         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
2529         (WebCore::RenderLayer::calculateClipRects):
2530         * rendering/RenderLayer.h:
2531         * rendering/RenderMultiColumnSet.cpp:
2532         (WebCore::RenderMultiColumnSet::collectLayerFragments):
2533
2534 2014-06-22  Dean Jackson  <dino@apple.com>
2535
2536         Attempted iOS build fix.
2537
2538         * platform/graphics/mac/GraphicsContext3DMac.mm:
2539         (WebCore::GraphicsContext3D::~GraphicsContext3D): Cast to WebGLLayer.
2540
2541 2014-06-22  Dean Jackson  <dino@apple.com>
2542
2543         [Apple] WebGL layer may use GC3D after free with remote layer hosting
2544         https://bugs.webkit.org/show_bug.cgi?id=134179
2545         <rdar://problem/17412931>
2546
2547         Reviewed by Tim Horton.
2548
2549         With remote layer hosting, a WebGLLayer may attempt to draw after
2550         the GraphicsContext3D has been destroyed. We need to make sure
2551         the GC3D tells the WebGLLayer that it is no longer valid.
2552
2553         While here, I changed some return 0 to return nullptr, the
2554         name of the ObjC property member from m_context to _context,
2555         and removed some unnecessary .get() calls.
2556
2557         This is tested by run-webkit-tests with the --remote-layer-tree
2558         option.
2559
2560         * platform/graphics/mac/GraphicsContext3DMac.mm:
2561         (WebCore::GraphicsContext3D::GraphicsContext3D): No need for .get().
2562         (WebCore::GraphicsContext3D::~GraphicsContext3D): Set the context reference on WebGLLayer
2563         to be null.
2564         (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): No need for .get().
2565         * platform/graphics/mac/WebGLLayer.h: Set the context reference on WebGLLayer
2566         to be null.
2567         * platform/graphics/mac/WebGLLayer.mm:
2568         (-[WebGLLayer initWithGraphicsContext3D:]): Rename m_context to _context.
2569         (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Check for null.
2570         (-[WebGLLayer copyCGLContextForPixelFormat:]): Rename to _context.
2571         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Check for null.
2572         (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Ditto.
2573         (-[WebGLLayer display]): Ditto.
2574
2575 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
2576
2577         [WK2] Frameset frames are not scrollable after loading (and should be)
2578         https://bugs.webkit.org/show_bug.cgi?id=134151
2579         <rdar://problem/17403365>
2580
2581         Reviewed by Dan Bates.
2582         
2583         When loading a <frameset>, we could end up with an empty non-fast-scrollable
2584         region for the main frame, because after the initial frameset document layout,
2585         nothing updated the non-fast scrollable region as the subframes added their
2586         scrollable areas to the the main frame's scrollable area set.
2587         
2588         Fix by having addScrollableArea() and removeScrollableArea() trigger an update
2589         of the non-fast scrollable region.
2590
2591         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html
2592
2593         * page/FrameView.cpp:
2594         (WebCore::FrameView::addScrollableArea):
2595         (WebCore::FrameView::removeScrollableArea):
2596         (WebCore::FrameView::scrollableAreaSetChanged):
2597         * page/FrameView.h:
2598
2599 2014-06-22  Commit Queue  <commit-queue@webkit.org>
2600
2601         Unreviewed, rolling out r170265.
2602         https://bugs.webkit.org/show_bug.cgi?id=134174
2603
2604         Broke editing tests (Requested by litherum on #webkit).
2605
2606         Reverted changeset:
2607
2608         "Use unsigneds instead of ints for indexes into a string in
2609         text layout code"
2610         https://bugs.webkit.org/show_bug.cgi?id=133592
2611         http://trac.webkit.org/changeset/170265
2612
2613 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
2614
2615         Have scrollingTreeAsText() dump the non-fast-scrollable region
2616         https://bugs.webkit.org/show_bug.cgi?id=134149
2617
2618         Reviewed by Sam Weinig.
2619
2620         Dump the non-fast-scrollable region (as an array of rects).
2621
2622         * WebCore.exp.in:
2623         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2624         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
2625
2626 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
2627
2628         Use unsigneds instead of ints for indexes into a string in text layout code
2629         https://bugs.webkit.org/show_bug.cgi?id=133592
2630
2631         Reviewed by Zalan Bujtas.
2632
2633         Migrate much of the text-handling code to use unsigneds for indexes into a string.
2634
2635         No new tests because there is no behavior change.
2636
2637         * WebCore.exp.in:
2638         * platform/graphics/Font.cpp:
2639         (WebCore::Font::drawText):
2640         (WebCore::Font::drawEmphasisMarks):
2641         (WebCore::Font::adjustSelectionRectForText):
2642         (WebCore::computeUnderlineType):
2643         * platform/graphics/Font.h:
2644         * platform/graphics/FontFastPath.cpp:
2645         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2646         (WebCore::Font::drawSimpleText):
2647         (WebCore::Font::drawEmphasisMarksForSimpleText):
2648         (WebCore::Font::drawGlyphBuffer):
2649         (WebCore::Font::drawEmphasisMarks):
2650         (WebCore::Font::adjustSelectionRectForSimpleText):
2651         * platform/graphics/GlyphBuffer.h:
2652         (WebCore::GlyphBuffer::size):
2653         (WebCore::GlyphBuffer::glyphs):
2654         (WebCore::GlyphBuffer::advances):
2655         (WebCore::GlyphBuffer::fontDataAt):
2656         (WebCore::GlyphBuffer::advanceAt):
2657         (WebCore::GlyphBuffer::offsetAt):
2658         (WebCore::GlyphBuffer::reverse):
2659         (WebCore::GlyphBuffer::offsetInString):
2660         (WebCore::GlyphBuffer::swap):
2661         * platform/graphics/GraphicsContext.cpp:
2662         (WebCore::TextRunIterator::atEnd):
2663         * platform/graphics/Latin1TextIterator.h:
2664         (WebCore::Latin1TextIterator::Latin1TextIterator):
2665         (WebCore::Latin1TextIterator::currentCharacter):
2666         * platform/graphics/SimpleFontData.h:
2667         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
2668         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
2669         * platform/graphics/SurrogatePairAwareTextIterator.h:
2670         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
2671         * platform/graphics/TextRun.h:
2672         (WebCore::TextRun::length):
2673         (WebCore::TextRun::charactersLength):
2674         * platform/graphics/WidthIterator.cpp:
2675         (WebCore::WidthIterator::glyphDataForCharacter):
2676         (WebCore::applyFontTransforms):
2677         (WebCore::WidthIterator::advanceInternal):
2678         (WebCore::WidthIterator::advance):
2679         (WebCore::WidthIterator::advanceOneCharacter):
2680         * platform/graphics/WidthIterator.h:
2681         * platform/graphics/cairo/FontCairo.cpp:
2682         (WebCore::Font::drawGlyphs):
2683         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2684         (WebCore::Font::drawComplexText):
2685         (WebCore::Font::drawEmphasisMarksForComplexText):
2686         (WebCore::Font::adjustSelectionRectForComplexText):
2687         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2688         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
2689         * platform/graphics/mac/FontComplexTextMac.cpp:
2690         (WebCore::Font::adjustSelectionRectForComplexText):
2691         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2692         (WebCore::Font::drawComplexText):
2693         (WebCore::Font::drawEmphasisMarksForComplexText):
2694         * platform/graphics/mac/FontMac.mm:
2695         (WebCore::Font::drawGlyphs):
2696         * platform/graphics/win/FontCGWin.cpp:
2697         (WebCore::Font::drawGlyphs):
2698         * platform/graphics/win/FontWin.cpp:
2699         (WebCore::Font::adjustSelectionRectForComplexText):
2700         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
2701         (WebCore::Font::drawComplexText):
2702         (WebCore::Font::drawEmphasisMarksForComplexText):
2703         * platform/graphics/wince/FontWinCE.cpp:
2704         (WebCore::Font::drawGlyphs):
2705         (WebCore::Font::drawComplexText):
2706         (WebCore::Font::drawEmphasisMarksForComplexText):
2707         (WebCore::Font::selectionRectForComplexText):
2708         * rendering/InlineTextBox.cpp:
2709         (WebCore::InlineTextBox::isSelected):
2710         (WebCore::InlineTextBox::selectionState):
2711         (WebCore::adjustCharactersAndLengthForHyphen):
2712         (WebCore::InlineTextBox::localSelectionRect):
2713         (WebCore::InlineTextBox::paint):
2714         (WebCore::InlineTextBox::selectionStartEnd):
2715         (WebCore::InlineTextBox::paintSelection):
2716         (WebCore::InlineTextBox::paintCompositionBackground):
2717         (WebCore::InlineTextBox::paintDocumentMarker):
2718         (WebCore::InlineTextBox::paintTextMatchMarker):
2719         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2720         (WebCore::InlineTextBox::paintCompositionUnderline):
2721         (WebCore::InlineTextBox::positionForOffset):
2722         (WebCore::InlineTextBox::constructTextRun):
2723         * rendering/InlineTextBox.h:
2724         * rendering/RenderCombineText.cpp:
2725         (WebCore::RenderCombineText::getStringToRender):
2726         * rendering/RenderCombineText.h:
2727         * rendering/svg/SVGInlineFlowBox.cpp:
2728         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2729         * rendering/svg/SVGInlineTextBox.cpp:
2730         (WebCore::SVGInlineTextBox::positionForOffset):
2731         (WebCore::SVGInlineTextBox::localSelectionRect):
2732         (WebCore::SVGInlineTextBox::paintSelectionBackground):
2733         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
2734         (WebCore::SVGInlineTextBox::paintText):
2735         * rendering/svg/SVGInlineTextBox.h:
2736         * rendering/svg/SVGTextMetricsBuilder.cpp:
2737         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
2738         (WebCore::SVGTextMetricsBuilder::advance):
2739         * rendering/svg/SVGTextQuery.cpp:
2740         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
2741         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
2742         (WebCore::SVGTextQuery::subStringLengthCallback):
2743         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
2744         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
2745         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
2746         (WebCore::SVGTextQuery::extentOfCharacterCallback):
2747         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
2748         * rendering/svg/SVGTextQuery.h:
2749         * rendering/svg/SVGTextRunRenderingContext.cpp:
2750         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
2751         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2752         * rendering/svg/SVGTextRunRenderingContext.h:
2753         * svg/SVGFontData.cpp:
2754         (WebCore::SVGFontData::applySVGGlyphSelection):
2755         * svg/SVGFontData.h:
2756
2757 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
2758
2759         createCairoGLSurface should take in a FloatSize reference as its first parameter
2760         https://bugs.webkit.org/show_bug.cgi?id=134159
2761
2762         Reviewed by Martin Robinson.
2763
2764         The ImageBuffer constructor operates with a FloatSize reference, which is also
2765         passed to createCairoGLSurface when accelerated 2D canvas support is enabled.
2766         That function should take in a reference to the same type.
2767
2768         * platform/graphics/cairo/ImageBufferCairo.cpp:
2769         (WebCore::createCairoGLSurface):
2770
2771 2014-06-21  Dean Jackson  <dino@apple.com>
2772
2773         [Mac] Margins for new form controls need tweaking
2774         https://bugs.webkit.org/show_bug.cgi?id=134135
2775         <rdar://problem/17262164>
2776
2777         Reviewed by Sam Weinig.
2778
2779         Take 2 of this patch. Only the mac-mountainlion LayoutTest
2780         results are different from the first attempt.
2781
2782         With the newer animated controls in OS X Yosemite, we need
2783         to tweak the fudge-factor margins for positioning. In a recent
2784         patch I added another fudge, which I'm removing with this. I'm
2785         not sure where the older values came from, but I've checked with
2786         the latest AppKit sources and am using the sizes they implement
2787         for the controls.
2788
2789         This will rebaseline a lot of tests, since I've made small tweaks
2790         to the form layout.
2791
2792         * platform/mac/ThemeMac.mm:
2793         (WebCore::checkboxMargins): New margin amounts.
2794         (WebCore::radioSizes): New sizes.
2795         (WebCore::radioMargins): New margin amounts.
2796         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
2797         (WebCore::checkboxOffsets): Deleted.
2798         (WebCore::radioOffsets): Deleted.
2799
2800 2014-06-20  Sam Weinig  <sam@webkit.org>
2801
2802         Remove static tables for bindings that use eager reification
2803         https://bugs.webkit.org/show_bug.cgi?id=134126
2804
2805         Reviewed by Oliver Hunt.
2806
2807         This shaves about 1MB off of WebCore's .o files.
2808
2809         * bindings/scripts/CodeGeneratorJS.pm:
2810         (GenerateHeader):
2811         (GenerateImplementation):
2812         (GenerateConstructorHelperMethods):
2813         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2814         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2815         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2816         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2817         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2818         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2819         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2820         * bindings/scripts/test/JS/JSTestEventTarget.h:
2821         * bindings/scripts/test/JS/JSTestException.cpp:
2822         * bindings/scripts/test/JS/JSTestException.h:
2823         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2824         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2825         * bindings/scripts/test/JS/JSTestInterface.cpp:
2826         * bindings/scripts/test/JS/JSTestInterface.h:
2827         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2828         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2829         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2830         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2831         * bindings/scripts/test/JS/JSTestNode.cpp:
2832         * bindings/scripts/test/JS/JSTestNode.h:
2833         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2834         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2835         * bindings/scripts/test/JS/JSTestObj.cpp:
2836         * bindings/scripts/test/JS/JSTestObj.h:
2837         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2838         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2839         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2840         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2841         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2842         * bindings/scripts/test/JS/JSTestTypedefs.h:
2843         * bindings/scripts/test/JS/JSattribute.cpp:
2844         * bindings/scripts/test/JS/JSattribute.h:
2845         * bindings/scripts/test/JS/JSreadonly.cpp:
2846         * bindings/scripts/test/JS/JSreadonly.h:
2847
2848 2014-06-21  Brady Eidson  <beidson@apple.com>
2849
2850         Gamepad API - Deprecate the existing implementation
2851         https://bugs.webkit.org/show_bug.cgi?id=134108
2852
2853         Reviewed by Timothy Hatcher.
2854
2855         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
2856         -Move some implementation files into a "deprecated" subdirectory.
2857
2858         * CMakeLists.txt:
2859         * Configurations/FeatureDefines.xcconfig:
2860         * PlatformGTK.cmake:
2861
2862         * Modules/gamepad/deprecated/Gamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
2863         * Modules/gamepad/deprecated/Gamepad.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
2864         * Modules/gamepad/deprecated/Gamepad.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
2865         * Modules/gamepad/deprecated/GamepadList.cpp: Renamed from Source/WebCore/Modules/gamepad/GamepadList.cpp.
2866         * Modules/gamepad/deprecated/GamepadList.h: Renamed from Source/WebCore/Modules/gamepad/GamepadList.h.
2867         * Modules/gamepad/deprecated/GamepadList.idl: Renamed from Source/WebCore/Modules/gamepad/GamepadList.idl.
2868         * Modules/gamepad/deprecated/NavigatorGamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
2869         * Modules/gamepad/deprecated/NavigatorGamepad.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
2870         * Modules/gamepad/deprecated/NavigatorGamepad.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
2871
2872         * platform/Gamepads.h:
2873         * platform/efl/GamepadsEfl.cpp:
2874         * platform/gtk/GamepadsGtk.cpp:
2875         * platform/linux/GamepadDeviceLinux.cpp:
2876         * platform/linux/GamepadDeviceLinux.h:
2877
2878 2014-06-21  Myles C. Maxfield  <mmaxfield@apple.com>
2879
2880         Mark TextRun's constructors as explicit
2881         https://bugs.webkit.org/show_bug.cgi?id=134124
2882
2883         Reviewed by Sam Weinig.
2884
2885         After r170072, nobody is implicitly converting a string to a TextRun. Therefore,
2886         we can make the constructors explicit.
2887
2888         No new tests because there is no behavior change.
2889
2890         * platform/graphics/TextRun.h:
2891         (WebCore::TextRun::TextRun):
2892
2893 2014-06-21  Commit Queue  <commit-queue@webkit.org>
2894
2895         Unreviewed, rolling out r170244.
2896         https://bugs.webkit.org/show_bug.cgi?id=134157
2897
2898         GTK/EFL bindings generator works differently, making this
2899         patch not work there.  Will fix entire patch after a rollout.
2900         (Requested by bradee-oh on #webkit).
2901
2902         Reverted changeset:
2903
2904         "Gamepad API - Deprecate the existing implementation"
2905         https://bugs.webkit.org/show_bug.cgi?id=134108
2906         http://trac.webkit.org/changeset/170244
2907
2908 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
2909
2910         Fix the mismatched header build guards in WebKitDOMNodeFilterPrivate.h
2911         which are throwing compilation warnings when building with Clang.
2912
2913         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
2914
2915 2014-06-21  Brady Eidson  <beidson@apple.com>
2916
2917         Gamepad API - Deprecate the existing implementation
2918         https://bugs.webkit.org/show_bug.cgi?id=134108
2919
2920         Reviewed by Timothy Hatcher.
2921
2922         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
2923         -Add the "Deprecated" suffix to some implementation files
2924
2925         * CMakeLists.txt:
2926         * PlatformGTK.cmake:
2927         * Configurations/FeatureDefines.xcconfig:
2928         
2929         * Modules/gamepad/GamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
2930         * Modules/gamepad/GamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
2931         * Modules/gamepad/GamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
2932
2933         * Modules/gamepad/GamepadList.cpp:
2934         * Modules/gamepad/GamepadList.h:
2935         * Modules/gamepad/GamepadList.idl:
2936
2937         * Modules/gamepad/NavigatorGamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
2938         * Modules/gamepad/NavigatorGamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
2939         * Modules/gamepad/NavigatorGamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
2940
2941         * platform/Gamepads.h:
2942         * platform/efl/GamepadsEfl.cpp:
2943         * platform/gtk/GamepadsGtk.cpp:
2944         * platform/linux/GamepadDeviceLinux.cpp:
2945         * platform/linux/GamepadDeviceLinux.h:
2946
2947 2014-06-21  Commit Queue  <commit-queue@webkit.org>
2948
2949         Unreviewed, rolling out r170228.
2950         https://bugs.webkit.org/show_bug.cgi?id=134155
2951
2952         Caused 9 layout test failures on Mountain Lion
2953         http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK2%20(Tests)/builds/19216
2954         (Requested by bradee-oh on #webkit).
2955
2956         Reverted changeset:
2957
2958         "[Mac] Margins for new form controls need tweaking"
2959         https://bugs.webkit.org/show_bug.cgi?id=134135
2960         http://trac.webkit.org/changeset/170228
2961
2962 2014-06-21  Jer Noble  <jer.noble@apple.com>
2963
2964         [Mac] Create and attach the AVPlayerLayer to the AVPlayer immediately if the media element is <video>.
2965         https://bugs.webkit.org/show_bug.cgi?id=134131
2966
2967         Reviewed by Eric Carlson.
2968
2969         The AVPlayer uses the presence of an AVPlayerLayer to decide which alternate to display in the case of
2970         HLS streams with audio-only alternates. To give the AVPlayer the most information with which to make its
2971         decision, always create and attach an AVPlayerLayer before attaching an AVPlayerItem to the AVPlayerLayer.
2972         In addition, retrieve the <video> element bounds and create an AVPlayerLayer with a matching size, so that
2973         the AVPlayer can choose an alternate with the correct dimensions.
2974
2975         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2976         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2977         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2978         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLayerRenderer):
2979         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2980         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
2981         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2982         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
2983
2984 2014-06-21  Jeremy Jones  <jeremyj@apple.com>
2985
2986         Implement ios -[WAKWindow convertBaseToScreen:]
2987         https://bugs.webkit.org/show_bug.cgi?id=134053
2988
2989         Reviewed by Eric Carlson.
2990
2991         * platform/ios/wak/WAKWindow.mm:
2992         (-[WAKWindow convertBaseToScreen:]):
2993         Traverse layer hierarchy and convert point.
2994
2995         (-[WAKWindow convertScreenToBase:]):
2996         Traverse layer hierarchy and convert point.
2997
2998 2014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2999
3000         Removing PAGE_VISIBILITY_API compile guard.
3001         https://bugs.webkit.org/show_bug.cgi?id=133844
3002
3003         Reviewed by Gavin Barraclough.
3004
3005         No new tests because no functional changes.
3006
3007         * Configurations/FeatureDefines.xcconfig:
3008         * Modules/vibration/NavigatorVibration.cpp:
3009         (WebCore::NavigatorVibration::vibrate):
3010         * dom/Document.cpp:
3011         (WebCore::Document::hidden):
3012         * dom/Document.h:
3013         * dom/Document.idl:
3014         * dom/Element.h:
3015         * html/HTMLMediaElement.cpp:
3016         (WebCore::HTMLMediaElement::HTMLMediaElement):
3017         (WebCore::HTMLMediaElement::registerWithDocument):
3018         (WebCore::HTMLMediaElement::unregisterWithDocument):
3019         (WebCore::HTMLMediaElement::parseAttribute):
3020         * html/HTMLMediaElement.h:
3021         * page/Page.cpp:
3022         (WebCore::Page::setIsVisibleInternal):
3023         (WebCore::Page::visibilityState):
3024         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
3025         * page/Page.h:
3026         * page/PageVisibilityState.cpp:
3027         * page/PageVisibilityState.h:
3028         * page/Settings.cpp:
3029         (WebCore::Settings::Settings):
3030         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
3031         * page/Settings.h:
3032         * platform/audio/MediaSession.cpp:
3033         (WebCore::MediaSession::updateClientDataBuffering):
3034         * platform/audio/MediaSession.h:
3035
3036 2014-06-21  Frédéric Wang  <fred.wang@free.fr>
3037
3038         [GTK][EFL] Use OpenType MATH fonts by default.
3039         https://bugs.webkit.org/show_bug.cgi?id=133604
3040
3041         Reviewed by Chris Fleizach.
3042
3043         In order to support stretching of horizontal operators and large
3044         operators in display mode as well as to improve the drawing of radicals,
3045         we need to use an OpenType MATH table. This commit makes the MathML code
3046         try "Latin Modern Math" first, which is an OpenType version of Knuth's
3047         popular Computer Modern font and is packaged with most TeX
3048         distributions (e.g. TeX Live on Linux). This should work well on the
3049         EFL & GTK ports for which the initial OpenType MATH support has been
3050         tested. Other ports will be handled later.
3051
3052         No new tests. This is already tested in LayoutTests/mathml/opentype/.
3053
3054         * css/mathml.css:
3055         (math): Add "Latin Modern Math" as the first font-family of the <math> element.
3056
3057 2014-06-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3058
3059         Unreviewed EFL build fix since r170224.
3060
3061         Add retainPlatformLayer() and releasePlatformLayer() in ScrollingStateNodeCoordinatedGraphics.cpp
3062         as well. Thouse functions were missed in r170224.
3063
3064         * page/scrolling/ScrollingStateNode.h:
3065         * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp:
3066         (WebCore::LayerRepresentation::retainPlatformLayer):
3067         (WebCore::LayerRepresentation::releasePlatformLayer):
3068
3069 2014-06-20  Dean Jackson  <dino@apple.com>
3070
3071         [Mac] Margins for new form controls need tweaking
3072         https://bugs.webkit.org/show_bug.cgi?id=134135
3073         <rdar://problem/17262164>
3074
3075         Reviewed by Sam Weinig.
3076
3077         With the newer animated controls in OS X Yosemite, we need
3078         to tweak the fudge-factor margins for positioning. In a recent
3079         patch I added another fudge, which I'm removing with this. I'm
3080         not sure where the older values came from, but I've checked with
3081         the latest AppKit sources and am using the sizes they implement
3082         for the controls.
3083
3084         This will rebaseline a lot of tests, since I've made small tweaks
3085         to the form layout.
3086
3087         * platform/mac/ThemeMac.mm:
3088         (WebCore::checkboxMargins): New margin amounts.
3089         (WebCore::radioSizes): New sizes.
3090         (WebCore::radioMargins): New margin amounts.
3091         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
3092         (WebCore::checkboxOffsets): Deleted.
3093         (WebCore::radioOffsets): Deleted.
3094
3095 2014-06-20  Alex Christensen  <achristensen@webkit.org>
3096
3097         Fix css jit on armv7.
3098         https://bugs.webkit.org/show_bug.cgi?id=134143
3099         <rdar://problem/17348060>
3100
3101         Reviewed by Benjamin Poulain.
3102
3103         This fixes the acid3 test.
3104
3105         * cssjit/SelectorCompiler.cpp:
3106         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
3107         Correct high and low bits.
3108
3109 2014-06-20  Beth Dakin  <bdakin@apple.com>
3110
3111         https://bugs.webkit.org/show_bug.cgi?id=134117
3112         Unreproducible crashes under WebCore::ScrollingTree::updateTreeFromStateNode() 
3113         from messaging a deleted Obj-C object
3114         -and corresponding-
3115         <rdar://problem/17149252>
3116
3117         Reviewed by Simon Fraser.
3118
3119         This is a speculative fix. It makes LayerRepresentation retain m_platformLayer.
3120
3121         * WebCore.exp.in:
3122         * page/scrolling/ScrollingStateNode.h:
3123         (WebCore::LayerRepresentation::LayerRepresentation):
3124         (WebCore::LayerRepresentation::~LayerRepresentation):
3125         (WebCore::LayerRepresentation::operator=):
3126         (WebCore::LayerRepresentation::operator==):
3127         (WebCore::LayerRepresentation::operator ==): Deleted.
3128
3129         Make this ASSERT an ASSERT_WITH_SECURITY_IMPLICATION
3130         * page/scrolling/ScrollingTree.cpp:
3131         (WebCore::ScrollingTree::updateTreeFromStateNode):
3132
3133         Moved ScrollingStateNodeMac.mm, which was empty anyway, to cocoa/
3134         ScrollingStateNode.mm so that iOS can use it too.
3135         * page/scrolling/cocoa: Added.
3136         * page/scrolling/cocoa/ScrollingStateNode.mm: Copied from page/scrolling/mac/ScrollingStateNodeMac.mm.
3137
3138         Actual implementation for retain and release.
3139         (WebCore::LayerRepresentation::retainPlatformLayer):
3140         (WebCore::LayerRepresentation::releasePlatformLayer):
3141
3142         Deleted.
3143         * page/scrolling/mac/ScrollingStateNodeMac.mm: Removed.
3144
3145 2014-06-19  Zalan Bujtas  <zalan@apple.com>
3146
3147         Introduce RenderLayer::offsetFromAncestorLayer() to make convertToLayerCoords() calls with
3148         LayoutPoint(0, 0) as parameter more explicit.
3149         https://bugs.webkit.org/show_bug.cgi?id=134092
3150
3151         Reviewed by Simon Fraser.
3152
3153         Most of the RenderLayer::convertToLayerCoords() callers are only interested in
3154         the offset from the ancestor layer by passing LayoutPoint(0, 0) as the coordinate to convert.
3155         Introducing offsetFromAncestorLayer() makes those calls more explicit/self-explanatory.
3156         It helps simplifying the callsite's code.
3157
3158         No change in functionality.
3159
3160         * rendering/RenderGeometryMap.cpp:
3161         (WebCore::RenderGeometryMap::mapToContainer):
3162         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
3163         (WebCore::RenderGeometryMap::push):
3164         * rendering/RenderLayer.cpp:
3165         (WebCore::RenderLayer::computeOffsetFromRoot):
3166         (WebCore::RenderLayer::updateLayerPositions):
3167         (WebCore::expandClipRectForRegionAndReflection):
3168         (WebCore::expandClipRectForDescendantsAndReflection):
3169         (WebCore::transparencyClipBox):
3170         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
3171         (WebCore::accumulateOffsetTowardsAncestor):
3172         (WebCore::RenderLayer::convertToLayerCoords):
3173         (WebCore::RenderLayer::offsetFromAncestorLayer):
3174         (WebCore::RenderLayer::clipToRect):
3175         (WebCore::RenderLayer::paintLayerContents):
3176         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3177         (WebCore::RenderLayer::collectFragments):
3178         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
3179         (WebCore::RenderLayer::createLocalTransformState):
3180         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
3181         (WebCore::RenderLayer::calculateClipRects):
3182         * rendering/RenderLayer.h:
3183         * rendering/RenderLayerBacking.cpp:
3184         (WebCore::RenderLayerBacking::updateCompositedBounds):
3185         (WebCore::RenderLayerBacking::updateGeometry):
3186         * rendering/RenderLayerCompositor.cpp:
3187         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
3188
3189 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
3190
3191         Removing dead code in platform/graphics/gpu
3192         https://bugs.webkit.org/show_bug.cgi?id=134065
3193
3194         Reviewed by Simon Fraser.
3195
3196         No new tests because there is no behavior change.
3197
3198         * WebCore.vcxproj/WebCore.vcxproj:
3199         * WebCore.vcxproj/WebCore.vcxproj.filters:
3200         * WebCore.xcodeproj/project.pbxproj:
3201         * platform/graphics/gpu/LoopBlinnClassifier.cpp: Removed.
3202         * platform/graphics/gpu/LoopBlinnClassifier.h: Removed.
3203         * platform/graphics/gpu/LoopBlinnConstants.h: Removed.
3204         * platform/graphics/gpu/LoopBlinnLocalTriangulator.cpp: Removed.
3205         * platform/graphics/gpu/LoopBlinnLocalTriangulator.h: Removed.
3206         * platform/graphics/gpu/LoopBlinnMathUtils.cpp: Removed.
3207         * platform/graphics/gpu/LoopBlinnMathUtils.h: Removed.
3208         * platform/graphics/gpu/LoopBlinnPathCache.cpp: Removed.
3209         * platform/graphics/gpu/LoopBlinnPathCache.h: Removed.
3210         * platform/graphics/gpu/LoopBlinnPathProcessor.h: Removed.
3211         * platform/graphics/gpu/LoopBlinnShader.cpp: Removed.
3212         * platform/graphics/gpu/LoopBlinnShader.h: Removed.
3213         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Removed.
3214         * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Removed.
3215         * platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Removed.
3216         * platform/graphics/gpu/LoopBlinnTextureCoords.h: Removed.
3217         * platform/graphics/gpu/Shader.cpp: Removed.
3218         * platform/graphics/gpu/Shader.h: Removed.
3219         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
3220         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
3221         * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
3222         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Removed.
3223         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Removed.
3224         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: Removed.
3225         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Removed.
3226         * platform/graphics/gpu/opencl/OpenCLFEImage.cpp: Removed.
3227         * platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Removed.
3228         * platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Removed.
3229         * platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Removed.
3230         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Removed.
3231         * platform/graphics/gpu/opencl/OpenCLHandle.h: Removed.
3232
3233 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
3234
3235         [iOS] Support Khmer and Lao fallback fonts
3236         https://bugs.webkit.org/show_bug.cgi?id=134114
3237
3238         Reviewed by Enrica Casucci.
3239
3240         iOS has fonts which have glyphs for the Khmer and Lao languages.
3241
3242         This patch also does a little refactoring of the language-specific fallback
3243         font path to increase readability.
3244
3245         Test: fast/text/khmer-lao-font.html
3246
3247         * platform/graphics/ios/FontCacheIOS.mm:
3248         (WebCore::languageSpecificFallbackFont):
3249         (WebCore::FontCache::systemFallbackForCharacters):
3250
3251 2014-06-20  Anders Carlsson  <andersca@apple.com>
3252
3253         Give NPAPI post requests a default content type
3254         https://bugs.webkit.org/show_bug.cgi?id=134120
3255
3256         Reviewed by Andreas Kling.
3257
3258         * WebCore.exp.in:
3259
3260 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
3261
3262         REGRESSION (r169972): fix issue when removing masks from compositing layers
3263         https://bugs.webkit.org/show_bug.cgi?id=134118
3264         <rdar://problem/17366654>
3265
3266         Reviewed by Dean Jackson.
3267         
3268         After r169972 when removing the mask, we could destroy the mask
3269         layer before the call into m_graphicsLayer->setMaskLayer(), which would
3270         try to call functions on the old mask. Fix by clearing the mask layer
3271         on the GraphicsLayer before the mask layer gets destroyed.
3272
3273         Test: compositing/masks/toggle-mask.html
3274
3275         * rendering/RenderLayerBacking.cpp:
3276         (WebCore::RenderLayerBacking::updateConfiguration):
3277         (WebCore::RenderLayerBacking::updateMaskLayer):
3278         * rendering/RenderLayerBacking.h:
3279
3280 2014-06-20  Andreas Kling  <akling@apple.com>
3281
3282         [Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
3283         <https://webkit.org/b/134112>
3284
3285         Reviewed by Mark Hahnenberg.
3286
3287         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3288         (WebCore::MemoryPressureHandler::install):
3289
3290 2014-06-20  Zalan Bujtas  <zalan@apple.com>
3291
3292         Remove redundant RenderLayer::computeOffsetFromRoot() function.
3293         https://bugs.webkit.org/show_bug.cgi?id=134088
3294
3295         Reviewed by Benjamin Poulain.
3296
3297         No change in functionality.
3298
3299         * rendering/RenderLayer.cpp:
3300         (WebCore::RenderLayer::calculateClipRects):
3301         (WebCore::RenderLayer::computeOffsetFromRoot): Deleted.
3302         * rendering/RenderLayer.h:
3303
3304 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
3305
3306         [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
3307         https://bugs.webkit.org/show_bug.cgi?id=134085
3308         <rdar://problem/16440586>
3309
3310         Reviewed by Tim Horton.
3311         
3312         When nodes were detached from the scrolling tree, we would previously throw away
3313         all descendant nodes, expecting that they would be re-attached as we walk the compositing
3314         layer tree in RenderLayerCompositor.
3315         
3316         However, this doesn't work across frame boundaries; the subframe may never update
3317         its compositing layers again, so would lose all its scrolling nodes.
3318         
3319         Fix by having ScrollingStateTree::detachNode() by default set aside subframe nodes
3320         into a hash map. On reattach, we'll look in the hash map and pull out an existing node
3321         (with its children intact) if possible.
3322
3323         Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html
3324                platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html
3325                platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html
3326
3327         * page/scrolling/ScrollingStateNode.cpp:
3328         (WebCore::ScrollingStateNode::ScrollingStateNode):
3329         * page/scrolling/ScrollingStateTree.cpp:
3330         (WebCore::ScrollingStateTree::attachNode):
3331         (WebCore::ScrollingStateTree::detachNode):
3332         (WebCore::ScrollingStateTree::clear):
3333         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
3334         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
3335         * page/scrolling/ScrollingStateTree.h:
3336         * page/scrolling/ScrollingTree.cpp:
3337         (WebCore::ScrollingTree::commitNewTreeState): Go back to removing the deleted
3338         nodes from m_nodeMap first.
3339         (WebCore::ScrollingTree::removeDestroyedNodes): There is no need for this to
3340         actually make use of ScrollingTreeNode* any more; the ASSERT(!node->parent())
3341         is bogus because it can fire when whole subtrees are removed, and to clear the
3342         latched node we just need the ID.
3343
3344 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
3345
3346         Handle scrolling tree modifications which remove intermediate nodes
3347         https://bugs.webkit.org/show_bug.cgi?id=134082
3348
3349         Reviewed by Tim Horton.
3350
3351         When updating the scrolling tree from the state tree, we failed to maintain
3352         the children arrays correctly. Fix by removing all children on scrolling nodes,
3353         and allowing the calls on children to add them back. A temporary hash map
3354         keeps the nodes alive.
3355         
3356         The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
3357         to make it easier to handle removal followed by re-insertion.
3358
3359         * WebCore.exp.in:
3360         * page/scrolling/ScrollingStateTree.cpp:
3361         (WebCore::ScrollingStateTree::attachNode): If a node is (possibly re-)added,
3362         remove it from m_nodesRemovedSinceLastCommit.remove.
3363         (WebCore::ScrollingStateTree::willRemoveNode):
3364         (WebCore::ScrollingStateTree::setRemovedNodes):
3365         * page/scrolling/ScrollingStateTree.h:
3366         (WebCore::ScrollingStateTree::removedNodes):
3367         * page/scrolling/ScrollingTree.cpp:
3368         (WebCore::ScrollingTree::commitNewTreeState):
3369         (WebCore::ScrollingTree::updateTreeFromStateNode): Clean up to have only one call
3370         to updateBeforeChildren(), and remove all children from the scrolling node
3371         before visiting state children.
3372         (WebCore::ScrollingTree::removeDestroyedNodes): It was very wrong to assume
3373         that all non-root nodes were parented in the root! Now we don't need to
3374         remove from the parent anyway.
3375         * page/scrolling/ScrollingTree.h:
3376         * page/scrolling/ScrollingTreeNode.h:
3377         (WebCore::ScrollingTreeNode::children):
3378
3379 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
3380
3381         Make ScrollingTreeNodes refounted, for easier tree reconfiguration
3382         https://bugs.webkit.org/show_bug.cgi?id=134075
3383
3384         Reviewed by Tim Horton.
3385
3386         Make ScrollingTreeNode be ref-counted.
3387
3388         * page/scrolling/AsyncScrollingCoordinator.h:
3389         * page/scrolling/ScrollingTree.cpp:
3390         (WebCore::ScrollingTree::handleWheelEvent):
3391         (WebCore::ScrollingTree::updateTreeFromStateNode):
3392         * page/scrolling/ScrollingTree.h:
3393         (WebCore::ScrollingTree::rootNode):
3394         * page/scrolling/ScrollingTreeNode.cpp:
3395         (WebCore::ScrollingTreeNode::appendChild):
3396         * page/scrolling/ScrollingTreeNode.h:
3397         * page/scrolling/ThreadedScrollingTree.cpp:
3398         (WebCore::ThreadedScrollingTree::createNode):
3399         * page/scrolling/ThreadedScrollingTree.h:
3400         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
3401         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
3402         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
3403         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
3404         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
3405         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
3406         * page/scrolling/ios/ScrollingTreeIOS.cpp:
3407         (WebCore::ScrollingTreeIOS::createNode):
3408         * page/scrolling/ios/ScrollingTreeIOS.h:
3409         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3410         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3411         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
3412         * page/scrolling/mac/ScrollingTreeFixedNode.h:
3413         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3414         (WebCore::ScrollingTreeFixedNode::create):
3415         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3416         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3417         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
3418         * page/scrolling/mac/ScrollingTreeStickyNode.h:
3419         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3420         (WebCore::ScrollingTreeStickyNode::create):
3421
3422 2014-06-20  Enrica Casucci  <enrica@apple.com>
3423
3424         iOS build fix after http://trac.webkit.org/changeset/170167.
3425
3426         Reviewed by Geoff Garen.
3427
3428         * bindings/js/JSDeviceMotionEventCustom.cpp:
3429         * bindings/js/JSDeviceOrientationEventCustom.cpp:
3430
3431 2014-06-19  Pratik Solanki  <psolanki@apple.com>
3432
3433         Enable synchronous willSendRequest on iOS
3434         https://bugs.webkit.org/show_bug.cgi?id=134081
3435         <rdar://problem/17350927>
3436
3437         Reviewed by Andreas Kling.
3438
3439         We lost the call to make willSendrequest callbacks be synchronous if possible during code
3440         refactoring. The call is present in ResourceHandleMac.mm but that code is not called when
3441         we use the CFNetwork based loader. Call the SPI in setupRequest().
3442
3443         No new tests because existing tests should cover this functionality.
3444
3445         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3446         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
3447         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
3448
3449 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3450
3451         [GTK] Do not build quota files when QUOTA is disabled
3452         https://bugs.webkit.org/show_bug.cgi?id=134101
3453
3454         Reviewed by Philippe Normand.
3455
3456         * CMakeLists.txt: Remove exception for GTK+ that is no longer
3457         required since r170173.
3458         * PlatformGTK.cmake: Generate GObject DOM bindings for Quota when enabled.
3459
3460 2014-06-20  Manuel Rego Casasnovas  <rego@igalia.com>
3461
3462         [CSS Grid Layout] Add GridSpan::iterator
3463         https://bugs.webkit.org/show_bug.cgi?id=134058
3464
3465         Reviewed by Bem Jones-Bey.
3466
3467         Once that GridResolvedPosition has been introduced in r169934, this
3468         patch adds a GridSpan::iterator which allows to simplify the loops over
3469         GridResolvedPositions.
3470         From now on we could use range-based for loops.
3471
3472         No new tests as it is already covered by current tests
3473         (fast/css-grid-layout/).
3474
3475         * rendering/RenderGrid.cpp:
3476         (WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
3477         ranged-based for.
3478         (WebCore::RenderGrid::insertItemIntoGrid): Ditto.
3479         (WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
3480         * rendering/style/GridCoordinate.h: Define GridSpan::iterator.
3481         (WebCore::GridSpan::begin): Return resolved initial position.
3482         (WebCore::GridSpan::end): Return next to resolved final position.
3483         * rendering/style/GridResolvedPosition.h:
3484         (WebCore::GridResolvedPosition::operator*): Add operator required by
3485         range-based for loops.
3486         (WebCore::GridResolvedPosition::operator!=): Add not equal operator.
3487
3488 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3489
3490         Unreviewed. Fix GTK+ debug build after r170174.
3491
3492         * bindings/gobject/WebKitDOMNodeFilter.cpp:
3493         (WebKit::nodeFilterObjectDestroyedCallback):
3494
3495 2014-06-20  Tim Horton  <timothy_horton@apple.com>
3496
3497         LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
3498         https://bugs.webkit.org/show_bug.cgi?id=134050
3499         <rdar://problem/17315114>
3500
3501         Reviewed by Simon Fraser.
3502
3503         * WebCore.exp.in:
3504         * WebCore.xcodeproj/project.pbxproj:
3505         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3506         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3507         Drain all LayerPools upon memory pressure.
3508
3509         * platform/graphics/ca/LayerPool.cpp:
3510         (WebCore::LayerPool::LayerPool):
3511         (WebCore::LayerPool::~LayerPool):
3512         (WebCore::LayerPool::allLayerPools):
3513         (WebCore::LayerPool::sharedPool): Deleted.
3514         * platform/graphics/ca/LayerPool.h:
3515         * platform/graphics/ca/PlatformCALayer.cpp:
3516         (WebCore::PlatformCALayer::createCompatibleLayerWithSize):
3517         Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.
3518
3519         (WebCore::PlatformCALayer::moveToLayerPool):
3520         Add moveToLayerPool, which moves the layer to the LayerPool.
3521
3522         (WebCore::PlatformCALayer::layerPool):
3523         The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
3524         The base class uses a global LayerPool.
3525
3526         * platform/graphics/ca/PlatformCALayer.h:
3527         * platform/graphics/ca/TileController.cpp:
3528         (WebCore::TileController::createTileLayer):
3529         * platform/graphics/ca/TileGrid.cpp:
3530         (WebCore::TileGrid::removeTiles):
3531
3532 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3533
3534         [GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
3535         https://bugs.webkit.org/show_bug.cgi?id=93002
3536
3537         Reviewed by Gustavo Noronha Silva.
3538
3539         Add custom implementation of WebKitDOMNodeFilter to expose it as
3540         an interface instead of a class.
3541
3542         * PlatformGTK.cmake: Add new files to compilation.
3543         * bindings/gobject/GObjectNodeFilterCondition.cpp: Added.
3544         (WebCore::GObjectNodeFilterCondition::~GObjectNodeFilterCondition):
3545         Reset the NodeFilter WebCore object associated to the
3546         WebKitDOMNodeFilter object.
3547         (WebCore::GObjectNodeFilterCondition::acceptNode): Call webkit_dom_node_filter_accept_node().
3548         * bindings/gobject/GObjectNodeFilterCondition.h: Added.
3549         (WebCore::GObjectNodeFilterCondition::create): Create a new
3550         GObjectNodeFilterCondition for the given WebKitDOMNodeFilter.
3551         (WebCore::GObjectNodeFilterCondition::GObjectNodeFilterCondition):
3552         * bindings/gobject/WebKitDOMNodeFilter.cpp: Added.
3553         (webkit_dom_node_filter_default_init):
3554         (webkit_dom_node_filter_accept_node):
3555         (WebKit::nodeFilterMap): Map NodeFilter WebCore objects to
3556         WebKitDOMNodeFilter objects.
3557         (WebKit::nodeFilterObjectDestroyedCallback): Remove the node
3558         filter form the map when the WebKitDOMNodeFilter objecrt is destroyed.
3559         (WebKit::kit): Return the WebKitDOMNodeFilter object for the given
3560         NodeFilter WebCore object.
3561         (WebKit::core): Get or create a NodeFilter WebCore object
3562         associated to the given WebKitDOMNodeFilter.
3563         * bindings/gobject/WebKitDOMNodeFilter.h: Added.
3564         * bindings/gobject/WebKitDOMNodeFilter.symbols: Added.
3565         * bindings/gobject/WebKitDOMNodeFilterPrivate.h: Added.
3566         * bindings/scripts/CodeGeneratorGObject.pm:
3567         (GenerateFunction): Add exceptions for NodeFilter parameters since
3568         the core method returns a PassRefPtr.
3569
3570 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3571
3572         [GTK] Limit the amount of API exposed to GObject DOM bindings API
3573         https://bugs.webkit.org/show_bug.cgi?id=133726
3574
3575         Reviewed by Gustavo Noronha Silva.
3576
3577         Split the GObject DOM bindings API into stable and unstable. The
3578         unstable API is not included in the main webkitdom.h file, so that
3579         to use it users have to include the headers individually and
3580         define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
3581         of stable classes we generate a {ClassName}Unstable.h header file
3582         containing the unstable API. From now on we only keep backwards
3583         compatibility for the stable API.
3584
3585         * PlatformGTK.cmake: Split GObject DOM bindings related variables
3586         into Stable and Unstable. Add also
3587         * bindings/gobject/WebKitDOMCustom.cpp:
3588         (webkit_dom_html_media_element_set_current_time): Deleted.
3589         (webkit_dom_text_track_get_kind): Deleted.
3590         (webkit_dom_text_track_get_mode): Deleted.
3591         (webkit_dom_text_track_set_mode): Deleted.
3592         * bindings/gobject/WebKitDOMCustom.h:
3593         * bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
3594         added due to API changes.
3595         * bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
3596         * bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
3597         * bindings/scripts/CodeGeneratorGObject.pm:
3598         (SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
3599         (GenerateHeader): Only force single header include for stable
3600         headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
3601         (GenerateFunction): Only add stable symbols to the symbols
3602         array. Add function prototypes to main header or unstable header
3603         depending on whether it's an unstable symbol for a stable class or
3604         not. Also add Stability gtk-doc tag to unstable methods.
3605         (GenerateEndHeader): Add required #endifs
3606         (WriteData): Write also an Unstable.h header when appropriate and
3607         only generate a symbols file for stable classes.
3608         (ReadStableSymbols): Read the stable symbols for the current class.
3609         (GenerateInterface): Call ReadStableSymbols.
3610         * bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
3611         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
3612         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
3613         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
3614         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
3615         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
3616         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
3617         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
3618         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
3619         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
3620         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
3621         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
3622         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
3623         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3624         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
3625         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
3626         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
3627         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
3628         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
3629
3630 2014-06-19  Andreas Kling  <akling@apple.com>
3631
3632         When simulating memory pressure, GC *after* releasing WebCore resources.
3633
3634         Since clearing the page cache is likely to create lots of garbage, defer the
3635         synchronous GC until after the WebCore pressure relief, so we can see the
3636         effect of clearing out all those pages.
3637
3638         Rubber-stamped by Gavin Barraclough.
3639
3640         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3641         (WebCore::MemoryPressureHandler::install):
3642
3643 2014-06-18  Sam Weinig  <sam@webkit.org>
3644
3645         Move generate prototype and constructor classes into the generated implementation files
3646         https://bugs.webkit.org/show_bug.cgi?id=134054
3647
3648         Reviewed by Oliver Hunt.
3649
3650         In an effort to reduce the size of the generated bindings headers, which is important
3651         as the generated headers get included in a lot of places, this patch moves the prototype
3652         and constructor declarations from the header to implementation file. This works because,
3653         for the most part, no code cares about the prototype or constructors except the instance.
3654
3655         There are a few exceptions which had to be accounted for:
3656         - The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
3657           available during initialization, so they remain in the header.
3658         - JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
3659           and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
3660           remains in the header.
3661         - A few classes had custom constructor functions. Instead of keeping the entire constructor
3662           in the header, I opted for pulling just the static constructor function into the header, and
3663           modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
3664           more specific type was unnecessary.
3665
3666         As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
3667         all the headers, which brought in quite a bit.
3668
3669         * bindings/js/JSAudioContextCustom.cpp:
3670         (WebCore::constructJSAudioContext):
3671         (WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
3672         * bindings/js/JSBlobCustom.cpp:
3673         (WebCore::constructJSBlob):
3674         (WebCore::JSBlobConstructor::constructJSBlob): Deleted.
3675         * bindings/js/JSCryptoCustom.cpp:
3676         * bindings/js/JSDOMFormDataCustom.cpp:
3677         (WebCore::constructJSDOMFormData):
3678         (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
3679         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
3680         * bindings/js/JSDOMPluginArrayCustom.cpp:
3681         * bindings/js/JSDOMPluginCustom.cpp:
3682         * bindings/js/JSDataCueCustom.cpp:
3683         (WebCore::constructJSDataCue):
3684         (WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
3685         * bindings/js/JSDataTransferCustom.cpp:
3686         * bindings/js/JSEventCustom.cpp:
3687         * bindings/js/JSFileReaderCustom.cpp:
3688         * bindings/js/JSHistoryCustom.cpp:
3689         * bindings/js/JSIDBAnyCustom.cpp:
3690         * bindings/js/JSIDBDatabaseCustom.cpp:
3691         * bindings/js/JSIDBObjectStoreCustom.cpp:
3692         * bindings/js/JSImageConstructor.cpp:
3693         (WebCore::JSImageConstructor::finishCreation):
3694         * bindings/js/JSImageDataCustom.cpp:
3695         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3696         * bindings/js/JSLocationCustom.cpp:
3697         * bindings/js/JSMessagePortCustom.cpp:
3698         * bindings/js/JSMutationObserverCustom.cpp:
3699         (WebCore::constructJSMutationObserver):
3700         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
3701         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3702         * bindings/js/JSSQLTransactionSyncCustom.cpp:
3703         * bindings/js/JSSVGLengthCustom.cpp:
3704         * bindings/js/JSSharedWorkerCustom.cpp:
3705         (WebCore::constructJSSharedWorker):
3706         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
3707         * bindings/js/JSStorageCustom.cpp:
3708         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
3709         * bindings/js/JSWebKitPointCustom.cpp:
3710         (WebCore::constructJSWebKitPoint):
3711         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
3712         * bindings/js/JSWorkerCustom.cpp:
3713         (WebCore::constructJSWorker):
3714         (WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
3715         * bindings/js/SerializedScriptValue.cpp:
3716         * bindings/scripts/CodeGeneratorJS.pm:
3717         (GenerateHeader):
3718         (GenerateImplementation):
3719         (GeneratePrototypeDeclaration):
3720         (GenerateConstructorDeclaration):
3721         (GenerateConstructorHelperMethods):
3722         (HeaderNeedsPrototypeDeclaration):
3723         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3724         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3725         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3726         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3727         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3728         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3729         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3730         * bindings/scripts/test/JS/JSTestEventTarget.h:
3731         * bindings/scripts/test/JS/JSTestException.cpp:
3732         * bindings/scripts/test/JS/JSTestException.h:
3733         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3734         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3735         * bindings/scripts/test/JS/JSTestInterface.cpp:
3736         * bindings/scripts/test/JS/JSTestInterface.h:
3737         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3738         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3739         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3740         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3741         * bindings/scripts/test/JS/JSTestNode.cpp:
3742         * bindings/scripts/test/JS/JSTestNode.h:
3743         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3744         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3745         * bindings/scripts/test/JS/JSTestObj.cpp:
3746         * bindings/scripts/test/JS/JSTestObj.h:
3747         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3748         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3749         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3750         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3751         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3752         * bindings/scripts/test/JS/JSTestTypedefs.h:
3753         * bindings/scripts/test/JS/JSattribute.cpp:
3754         * bindings/scripts/test/JS/JSattribute.h:
3755         * bindings/scripts/test/JS/JSreadonly.cpp:
3756         * bindings/scripts/test/JS/JSreadonly.h:
3757
3758
3759 2014-06-19  peavo@outlook.com  <peavo@outlook.com>
3760
3761         [Curl] Compile errors related to http header field names.
3762         https://bugs.webkit.org/show_bug.cgi?id=134029
3763
3764         Reviewed by Brent Fulgham.
3765
3766         Http header field names should now be specified with an enum, not a string.
3767
3768         * platform/network/curl/MultipartHandle.cpp:
3769         (WebCore::MultipartHandle::didReceiveResponse):
3770         * platform/network/curl/ResourceHandleManager.cpp:
3771         (WebCore::getProtectionSpace):
3772
3773 2014-06-19  Anders Carlsson  <andersca@apple.com>
3774
3775         Put the divider in the right place.
3776
3777         * DerivedSources.make:
3778
3779 2014-06-19  Anders Carlsson  <andersca@apple.com>
3780
3781         Address a review comment from Darin.
3782
3783         * inspector/InspectorResourceAgent.cpp:
3784         (WebCore::InspectorResourceAgent::willLoadXHR):
3785
3786 2014-06-19  Anders Carlsson  <andersca@apple.com>
3787
3788         Simplify two HistoryController member functions
3789         https://bugs.webkit.org/show_bug.cgi?id=134064
3790
3791         Reviewed by Dan Bernstein.
3792
3793         Remove the FrameLoadType parameter from recursiveSetProvisionalItem,
3794         use early returns and modern loops.
3795
3796         * loader/HistoryController.cpp:
3797         (WebCore::HistoryController::goToItem):
3798         (WebCore::HistoryController::recursiveSetProvisionalItem):
3799         (WebCore::HistoryController::recursiveGoToItem):
3800         * loader/HistoryController.h:
3801
3802 2014-06-19  David Kilzer  <ddkilzer@apple.com>
3803
3804         MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
3805         <http://webkit.org/b/134052>
3806
3807         Reviewed by Eric Carlson.
3808
3809         Fixes the following static analyzer warning:
3810
3811             WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
3812                     NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
3813                                                       ^
3814
3815         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3816         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
3817         Use RetainPtr<NSMutableArray> to prevent a leak.  Use
3818         Objective-C literals to clean up the code.
3819
3820 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
3821
3822         ScriptExecutionContext::Task, FileThread::Task parameters should be values
3823         https://bugs.webkit.org/show_bug.cgi?id=134035
3824
3825         Reviewed by Anders Carlsson.
3826
3827         r170106 and similar previous changesets enforced ScriptExecutionContext::Task and
3828         FileThread::Task parameters as rvalue references. There's technically nothing wrong
3829         with that, but since both classes are move-only it is also not strictly required.
3830         Accepting these parameters as values is more common in C++ value semantics as well.
3831
3832         * dom/Document.cpp:
3833         (WebCore::Document::postTask):
3834         * dom/Document.h:
3835         * dom/ScriptExecutionContext.h:
3836         * fileapi/FileThread.cpp:
3837         (WebCore::FileThread::postTask):
3838         * fileapi/FileThread.h:
3839         * workers/DefaultSharedWorkerRepository.cpp:
3840         (WebCore::SharedWorkerProxy::postTaskToLoader):
3841         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
3842         * workers/WorkerGlobalScope.cpp:
3843         (WebCore::WorkerGlobalScope::postTask):
3844         * workers/WorkerGlobalScope.h:
3845         * workers/WorkerLoaderProxy.h:
3846         * workers/WorkerMessagingProxy.cpp:
3847         (WebCore::WorkerMessagingProxy::postTaskToLoader):
3848         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
3849         * workers/WorkerMessagingProxy.h:
3850         * workers/WorkerRunLoop.cpp:
3851         (WebCore::WorkerRunLoop::postTask):
3852         (WebCore::WorkerRunLoop::postTaskAndTerminate):
3853         (WebCore::WorkerRunLoop::postTaskForMode):
3854         (WebCore::WorkerRunLoop::Task::create):
3855         (WebCore::WorkerRunLoop::Task::Task):
3856         * workers/WorkerRunLoop.h:
3857
3858 2014-06-18  James Craig  <jcraig@apple.com>
3859
3860         Web Inspector: AXI: expose aria-relevant
3861         https://bugs.webkit.org/show_bug.cgi?id=130913
3862
3863         Reviewed by Joseph Pecoraro.
3864
3865         Expose ARIA live region relevance in Web Inspector.
3866         E.g. "Live: Assertive (Additions, Text)"
3867
3868         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
3869
3870         * inspector/InspectorDOMAgent.cpp:
3871         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
3872         * inspector/protocol/DOM.json: Defined enum values and array passed to client.
3873
3874 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
3875
3876         Add rebeccapurple to CSS named color list
3877         https://bugs.webkit.org/show_bug.cgi?id=133804
3878
3879         Reviewed by Jer Noble.
3880
3881         Add the named color "rebeccapurple" (#639).
3882
3883         * css/SVGCSSValueKeywords.in:
3884         * platform/ColorData.gperf:
3885
3886 2014-06-11  Jeffrey Pfau  <jpfau@apple.com>
3887
3888         Fix flaky beforeload tests
3889         https://bugs.webkit.org/show_bug.cgi?id=133685
3890
3891         Reviewed by David Kilzer.
3892
3893         * loader/FrameLoader.cpp:
3894         (WebCore::FrameLoader::loadURL):
3895
3896 2014-06-18  Anders Carlsson  <andersca@apple.com>
3897
3898         Make FrameLoadType a strongly typed enum
3899         https://bugs.webkit.org/show_bug.cgi?id=134047
3900
3901         Reviewed by Andreas Kling.
3902
3903         * history/BackForwardController.cpp:
3904         (WebCore::BackForwardController::goBackOrForward):
3905         (WebCore::BackForwardController::goBack):
3906         (WebCore::BackForwardController::goForward):
3907         * history/PageCache.cpp:
3908         (WebCore::logCanCachePageDecision):
3909         (WebCore::PageCache::canCache):
3910         * loader/FrameLoader.cpp:
3911         (WebCore::isBackForwardLoadType):
3912         (WebCore::FrameLoader::FrameLoader):
3913         (WebCore::FrameLoader::loadURLIntoChildFrame):
3914         (WebCore::FrameLoader::prepareForLoadStart):
3915         (WebCore::FrameLoader::loadFrameRequest):
3916         (WebCore::FrameLoader::loadURL):
3917         (WebCore::FrameLoader::load):
3918         (WebCore::FrameLoader::reloadWithOverrideEncoding):
3919         (WebCore::FrameLoader::reload):
3920         (WebCore::FrameLoader::commitProvisionalLoad):
3921         (WebCore::FrameLoader::transitionToCommitted):
3922         (WebCore::FrameLoader::isReplacing):
3923         (WebCore::FrameLoader::setReplacing):
3924         (WebCore::FrameLoader::subresourceCachePolicy):
3925         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3926         (WebCore::FrameLoader::addExtraFieldsToRequest):
3927         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
3928         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
3929         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3930         (WebCore::FrameLoader::loadDifferentDocumentItem):
3931         * loader/FrameLoaderTypes.h:
3932         * loader/HistoryController.cpp:
3933         (WebCore::HistoryController::restoreDocumentState):
3934         (WebCore::HistoryController::updateForReload):
3935         (WebCore::HistoryController::isReplaceLoadTypeWithProvisionalItem):
3936         (WebCore::HistoryController::isReloadTypeWithProvisionalItem):
3937         * loader/NavigationAction.cpp:
3938         (WebCore::navigationType):
3939         * loader/PolicyChecker.cpp:
3940         (WebCore::PolicyChecker::PolicyChecker):
3941         (WebCore::PolicyChecker::checkNavigationPolicy):
3942         * loader/cache/CachedResourceLoader.cpp:
3943         (WebCore::CachedResourceLoader::cachePolicy):
3944         * loader/icon/IconController.cpp:
3945         (WebCore::IconController::startLoader):
3946
3947 2014-06-18  Alex Christensen  <achristensen@webkit.org>
3948
3949         [curl] Unreviewed speculative build fix after r170021.
3950
3951         * platform/network/curl/CurlCacheEntry.cpp:
3952         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
3953         (WebCore::CurlCacheEntry::parseResponseHeaders):
3954         * platform/network/curl/CurlDownload.cpp:
3955         (WebCore::CurlDownload::didReceiveHeader):
3956         * platform/network/curl/ResourceHandleManager.cpp:
3957         (WebCore::getProtectionSpace):
3958         (WebCore::headerCallback):
3959         Use HTTPHeaderName constants.
3960
3961 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
3962
3963         Move the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
3964         https://bugs.webkit.org/show_bug.cgi?id=134043
3965
3966         Reviewed by Beth Dakin.
3967
3968         It's cleaner if ScrollingStateTree does the descendant walk when removing nodes.
3969         We can simply start the "willBeRemoved" walk at the node in question.
3970         
3971         Have willRemoveNode() just remove the node from the m_stateNodeMap directly, rather
3972         than this happening in a separate walk of m_nodesRemovedSinceLastCommit.
3973
3974         * page/scrolling/ScrollingStateNode.cpp:
3975         (WebCore::ScrollingStateNode::removeDescendant): Deleted.
3976         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree): Deleted.
3977         * page/scrolling/ScrollingStateNode.h:
3978         * page/scrolling/ScrollingStateTree.cpp:
3979         (WebCore::ScrollingStateTree::attachNode):
3980         (WebCore::ScrollingStateTree::detachNode):
3981         (WebCore::ScrollingStateTree::clear):
3982         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
3983         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
3984         (WebCore::ScrollingStateTree::willRemoveNode):
3985         (WebCore::ScrollingStateTree::removeNode): Deleted.
3986         * page/scrolling/ScrollingStateTree.h:
3987
3988 2014-06-18  Alex Christensen  <achristensen@webkit.org>
3989
3990         [iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
3991         https://bugs.webkit.org/show_bug.cgi?id=133561
3992         
3993         Based on Blink r153971 by bajones@chromium.org.
3994
3995         Reviewed by Dean Jackson.
3996
3997         No new tests, but this should fix webgl-compressed-texture-pvrtc.html.
3998
3999         * html/canvas/WebGLRenderingContext.cpp:
4000         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
4001         (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions):
4002         Added checks for pvrtc.
4003
4004 2014-06-18  Anders Carlsson  <andersca@apple.com>
4005
4006         Work around a Windows compiler crash.
4007
4008         * loader/archive/cf/LegacyWebArchive.cpp:
4009         (WebCore::LegacyWebArchive::createFromSelection):
4010
4011 2014-06-18  Benjamin Poulain  <benjamin@webkit.org>
4012
4013         Subtrees with :first-child and :last-child are not invalidated when siblings are added/removed
4014         https://bugs.webkit.org/show_bug.cgi?id=133934
4015
4016         Reviewed by Antti Koivisto.
4017
4018         When adding/removing nodes on an element, we try to invalidate only the elements that are
4019         affected. In the case of :first-child and :last-child, that optimizations is implemented
4020         through two types of flags that are updated during style resolution.
4021
4022         The first flag is childrenAffectedByFirstChildRules (childrenAffectedByLastChildRules),
4023         set on the parent of any element that could be affected by :first-child (:last-child).
4024
4025         The other part of the optimization is marking the style itself with firstChildState (lastChildState)
4026         to further reduce invalidations.