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