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