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