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