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