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