bcd9621a33e36c60efdb6ed4b6d9b7452103083c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-23  Jeongeun Kim  <je_julie.kim@samsung.com>
2
3         Make it clear to get m_svgExtensions using svgExtensions().
4         https://bugs.webkit.org/show_bug.cgi?id=134186.
5
6         Reviewed by Dirk Schulze.
7
8         This patch makes sure that the purpose of code is to get m_svgExtensions 
9         as changing accessSVGExtensions() to svgExtensions(). 
10         svgExtensions() is a getter API and accessSVGExtensions() checks 
11         the presence of m_svgExtensions and create m_svgExtensions if it does not exist. 
12
13         No new tests, no behavior change.
14
15         * dom/ContainerNode.cpp:
16         (WebCore::ContainerNode::removeChild):
17         (WebCore::ContainerNode::removeChildren):
18         * dom/Document.cpp:
19         (WebCore::Document::commonTeardown):
20         (WebCore::Document::implicitClose):
21         * history/CachedFrame.cpp:
22         (WebCore::CachedFrameBase::restore):
23         * svg/SVGDocumentExtensions.cpp:
24         (WebCore::SVGDocumentExtensions::startAnimations):
25         (WebCore::SVGDocumentExtensions::pauseAnimations):
26         (WebCore::SVGDocumentExtensions::unpauseAnimations):
27         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
28         (WebCore::SVGDocumentExtensions::rebuildElements):
29         * svg/SVGDocumentExtensions.h:
30
31 2014-06-23  Dean Jackson  <dino@apple.com>
32
33         [iOS] Use WebGLLayer rather than PlatformLayer in GraphicsContext3D
34         https://bugs.webkit.org/show_bug.cgi?id=134183
35
36         Reviewed by Sam Weinig.
37
38         GraphicsContext3D has a reference to a WebGLLayer that was
39         hidden behind a PlatformLayer. This meant we had to cast it
40         to use a WebGLLayer method.
41
42         * platform/graphics/GraphicsContext3D.h: Replace RefPtr<PlatformLayer>
43         with RefPtr<WebGLLayer>.
44         * platform/graphics/mac/GraphicsContext3DMac.mm:
45         (WebCore::GraphicsContext3D::~GraphicsContext3D): No need to cast.
46
47 2014-06-22  Zalan Bujtas  <zalan@apple.com>
48
49         Make offset from ancestor computation explicit by moving it to the callers.
50         https://bugs.webkit.org/show_bug.cgi?id=134168.
51
52         Reviewed by Simon Fraser.
53         
54         Explicit offset computation helps code reading and less error-prone than passing
55         the offset pointer and compute it locally when it is null.
56
57         No change in functionality.
58
59         * rendering/RenderLayer.cpp:
60         (WebCore::transparencyClipBox):
61         (WebCore::performOverlapTests):
62         (WebCore::RenderLayer::setupClipPath):
63         (WebCore::RenderLayer::setupFilters):
64         (WebCore::RenderLayer::paintLayerContents):
65         (WebCore::RenderLayer::collectFragments):
66         (WebCore::RenderLayer::updatePaintingInfoForFragments):
67         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
68         (WebCore::RenderLayer::hitTestLayer):
69         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
70         (WebCore::RenderLayer::calculateClipRects):
71         * rendering/RenderLayer.h:
72         * rendering/RenderLayerCompositor.cpp:
73         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
74         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
75         * rendering/RenderTreeAsText.cpp:
76         (WebCore::writeLayers):
77
78 2014-06-22  Zalan Bujtas  <zalan@apple.com>
79
80         Transition layer offsets from LayoutPoint to LayoutSize.
81         https://bugs.webkit.org/show_bug.cgi?id=134156
82
83         Reviewed by Simon Fraser.
84
85         Use better representation for offset values.
86
87         No change in functionality.
88
89         * platform/graphics/LayoutSize.h:
90         (WebCore::roundedForPainting):
91         * rendering/RenderFlowThread.cpp:
92         (WebCore::RenderFlowThread::fragmentsBoundingBox):
93         * rendering/RenderLayer.cpp:
94         (WebCore::expandClipRectForDescendantsAndReflection):
95         (WebCore::RenderLayer::convertToLayerCoords):
96         (WebCore::computeReferenceBox):
97         (WebCore::RenderLayer::setupClipPath):
98         (WebCore::RenderLayer::setupFilters):
99         (WebCore::RenderLayer::paintLayerContents):
100         (WebCore::RenderLayer::paintLayerByApplyingTransform):
101         (WebCore::RenderLayer::collectFragments):
102         (WebCore::RenderLayer::updatePaintingInfoForFragments):
103         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
104         (WebCore::RenderLayer::createLocalTransformState):
105         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
106         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
107         (WebCore::RenderLayer::calculateClipRects):
108         * rendering/RenderLayer.h:
109         * rendering/RenderMultiColumnSet.cpp:
110         (WebCore::RenderMultiColumnSet::collectLayerFragments):
111
112 2014-06-22  Dean Jackson  <dino@apple.com>
113
114         Attempted iOS build fix.
115
116         * platform/graphics/mac/GraphicsContext3DMac.mm:
117         (WebCore::GraphicsContext3D::~GraphicsContext3D): Cast to WebGLLayer.
118
119 2014-06-22  Dean Jackson  <dino@apple.com>
120
121         [Apple] WebGL layer may use GC3D after free with remote layer hosting
122         https://bugs.webkit.org/show_bug.cgi?id=134179
123         <rdar://problem/17412931>
124
125         Reviewed by Tim Horton.
126
127         With remote layer hosting, a WebGLLayer may attempt to draw after
128         the GraphicsContext3D has been destroyed. We need to make sure
129         the GC3D tells the WebGLLayer that it is no longer valid.
130
131         While here, I changed some return 0 to return nullptr, the
132         name of the ObjC property member from m_context to _context,
133         and removed some unnecessary .get() calls.
134
135         This is tested by run-webkit-tests with the --remote-layer-tree
136         option.
137
138         * platform/graphics/mac/GraphicsContext3DMac.mm:
139         (WebCore::GraphicsContext3D::GraphicsContext3D): No need for .get().
140         (WebCore::GraphicsContext3D::~GraphicsContext3D): Set the context reference on WebGLLayer
141         to be null.
142         (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): No need for .get().
143         * platform/graphics/mac/WebGLLayer.h: Set the context reference on WebGLLayer
144         to be null.
145         * platform/graphics/mac/WebGLLayer.mm:
146         (-[WebGLLayer initWithGraphicsContext3D:]): Rename m_context to _context.
147         (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]): Check for null.
148         (-[WebGLLayer copyCGLContextForPixelFormat:]): Rename to _context.
149         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Check for null.
150         (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Ditto.
151         (-[WebGLLayer display]): Ditto.
152
153 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
154
155         [WK2] Frameset frames are not scrollable after loading (and should be)
156         https://bugs.webkit.org/show_bug.cgi?id=134151
157         <rdar://problem/17403365>
158
159         Reviewed by Dan Bates.
160         
161         When loading a <frameset>, we could end up with an empty non-fast-scrollable
162         region for the main frame, because after the initial frameset document layout,
163         nothing updated the non-fast scrollable region as the subframes added their
164         scrollable areas to the the main frame's scrollable area set.
165         
166         Fix by having addScrollableArea() and removeScrollableArea() trigger an update
167         of the non-fast scrollable region.
168
169         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html
170
171         * page/FrameView.cpp:
172         (WebCore::FrameView::addScrollableArea):
173         (WebCore::FrameView::removeScrollableArea):
174         (WebCore::FrameView::scrollableAreaSetChanged):
175         * page/FrameView.h:
176
177 2014-06-22  Commit Queue  <commit-queue@webkit.org>
178
179         Unreviewed, rolling out r170265.
180         https://bugs.webkit.org/show_bug.cgi?id=134174
181
182         Broke editing tests (Requested by litherum on #webkit).
183
184         Reverted changeset:
185
186         "Use unsigneds instead of ints for indexes into a string in
187         text layout code"
188         https://bugs.webkit.org/show_bug.cgi?id=133592
189         http://trac.webkit.org/changeset/170265
190
191 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
192
193         Have scrollingTreeAsText() dump the non-fast-scrollable region
194         https://bugs.webkit.org/show_bug.cgi?id=134149
195
196         Reviewed by Sam Weinig.
197
198         Dump the non-fast-scrollable region (as an array of rects).
199
200         * WebCore.exp.in:
201         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
202         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
203
204 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
205
206         Use unsigneds instead of ints for indexes into a string in text layout code
207         https://bugs.webkit.org/show_bug.cgi?id=133592
208
209         Reviewed by Zalan Bujtas.
210
211         Migrate much of the text-handling code to use unsigneds for indexes into a string.
212
213         No new tests because there is no behavior change.
214
215         * WebCore.exp.in:
216         * platform/graphics/Font.cpp:
217         (WebCore::Font::drawText):
218         (WebCore::Font::drawEmphasisMarks):
219         (WebCore::Font::adjustSelectionRectForText):
220         (WebCore::computeUnderlineType):
221         * platform/graphics/Font.h:
222         * platform/graphics/FontFastPath.cpp:
223         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
224         (WebCore::Font::drawSimpleText):
225         (WebCore::Font::drawEmphasisMarksForSimpleText):
226         (WebCore::Font::drawGlyphBuffer):
227         (WebCore::Font::drawEmphasisMarks):
228         (WebCore::Font::adjustSelectionRectForSimpleText):
229         * platform/graphics/GlyphBuffer.h:
230         (WebCore::GlyphBuffer::size):
231         (WebCore::GlyphBuffer::glyphs):
232         (WebCore::GlyphBuffer::advances):
233         (WebCore::GlyphBuffer::fontDataAt):
234         (WebCore::GlyphBuffer::advanceAt):
235         (WebCore::GlyphBuffer::offsetAt):
236         (WebCore::GlyphBuffer::reverse):
237         (WebCore::GlyphBuffer::offsetInString):
238         (WebCore::GlyphBuffer::swap):
239         * platform/graphics/GraphicsContext.cpp:
240         (WebCore::TextRunIterator::atEnd):
241         * platform/graphics/Latin1TextIterator.h:
242         (WebCore::Latin1TextIterator::Latin1TextIterator):
243         (WebCore::Latin1TextIterator::currentCharacter):
244         * platform/graphics/SimpleFontData.h:
245         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
246         (WebCore::SurrogatePairAwareTextIterator::SurrogatePairAwareTextIterator):
247         * platform/graphics/SurrogatePairAwareTextIterator.h:
248         (WebCore::SurrogatePairAwareTextIterator::currentCharacter):
249         * platform/graphics/TextRun.h:
250         (WebCore::TextRun::length):
251         (WebCore::TextRun::charactersLength):
252         * platform/graphics/WidthIterator.cpp:
253         (WebCore::WidthIterator::glyphDataForCharacter):
254         (WebCore::applyFontTransforms):
255         (WebCore::WidthIterator::advanceInternal):
256         (WebCore::WidthIterator::advance):
257         (WebCore::WidthIterator::advanceOneCharacter):
258         * platform/graphics/WidthIterator.h:
259         * platform/graphics/cairo/FontCairo.cpp:
260         (WebCore::Font::drawGlyphs):
261         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
262         (WebCore::Font::drawComplexText):
263         (WebCore::Font::drawEmphasisMarksForComplexText):
264         (WebCore::Font::adjustSelectionRectForComplexText):
265         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
266         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
267         * platform/graphics/mac/FontComplexTextMac.cpp:
268         (WebCore::Font::adjustSelectionRectForComplexText):
269         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
270         (WebCore::Font::drawComplexText):
271         (WebCore::Font::drawEmphasisMarksForComplexText):
272         * platform/graphics/mac/FontMac.mm:
273         (WebCore::Font::drawGlyphs):
274         * platform/graphics/win/FontCGWin.cpp:
275         (WebCore::Font::drawGlyphs):
276         * platform/graphics/win/FontWin.cpp:
277         (WebCore::Font::adjustSelectionRectForComplexText):
278         (WebCore::Font::getGlyphsAndAdvancesForComplexText):
279         (WebCore::Font::drawComplexText):
280         (WebCore::Font::drawEmphasisMarksForComplexText):
281         * platform/graphics/wince/FontWinCE.cpp:
282         (WebCore::Font::drawGlyphs):
283         (WebCore::Font::drawComplexText):
284         (WebCore::Font::drawEmphasisMarksForComplexText):
285         (WebCore::Font::selectionRectForComplexText):
286         * rendering/InlineTextBox.cpp:
287         (WebCore::InlineTextBox::isSelected):
288         (WebCore::InlineTextBox::selectionState):
289         (WebCore::adjustCharactersAndLengthForHyphen):
290         (WebCore::InlineTextBox::localSelectionRect):
291         (WebCore::InlineTextBox::paint):
292         (WebCore::InlineTextBox::selectionStartEnd):
293         (WebCore::InlineTextBox::paintSelection):
294         (WebCore::InlineTextBox::paintCompositionBackground):
295         (WebCore::InlineTextBox::paintDocumentMarker):
296         (WebCore::InlineTextBox::paintTextMatchMarker):
297         (WebCore::InlineTextBox::computeRectForReplacementMarker):
298         (WebCore::InlineTextBox::paintCompositionUnderline):
299         (WebCore::InlineTextBox::positionForOffset):
300         (WebCore::InlineTextBox::constructTextRun):
301         * rendering/InlineTextBox.h:
302         * rendering/RenderCombineText.cpp:
303         (WebCore::RenderCombineText::getStringToRender):
304         * rendering/RenderCombineText.h:
305         * rendering/svg/SVGInlineFlowBox.cpp:
306         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
307         * rendering/svg/SVGInlineTextBox.cpp:
308         (WebCore::SVGInlineTextBox::positionForOffset):
309         (WebCore::SVGInlineTextBox::localSelectionRect):
310         (WebCore::SVGInlineTextBox::paintSelectionBackground):
311         (WebCore::SVGInlineTextBox::mapStartEndPositionsIntoFragmentCoordinates):
312         (WebCore::SVGInlineTextBox::paintText):
313         * rendering/svg/SVGInlineTextBox.h:
314         * rendering/svg/SVGTextMetricsBuilder.cpp:
315         (WebCore::SVGTextMetricsBuilder::currentCharacterStartsSurrogatePair):
316         (WebCore::SVGTextMetricsBuilder::advance):
317         * rendering/svg/SVGTextQuery.cpp:
318         (WebCore::SVGTextQuery::mapStartEndPositionsIntoFragmentCoordinates):
319         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
320         (WebCore::SVGTextQuery::subStringLengthCallback):
321         (WebCore::SVGTextQuery::startPositionOfCharacterCallback):
322         (WebCore::SVGTextQuery::endPositionOfCharacterCallback):
323         (WebCore::SVGTextQuery::rotationOfCharacterCallback):
324         (WebCore::SVGTextQuery::extentOfCharacterCallback):
325         (WebCore::SVGTextQuery::characterNumberAtPositionCallback):
326         * rendering/svg/SVGTextQuery.h:
327         * rendering/svg/SVGTextRunRenderingContext.cpp:
328         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
329         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
330         * rendering/svg/SVGTextRunRenderingContext.h:
331         * svg/SVGFontData.cpp:
332         (WebCore::SVGFontData::applySVGGlyphSelection):
333         * svg/SVGFontData.h:
334
335 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
336
337         createCairoGLSurface should take in a FloatSize reference as its first parameter
338         https://bugs.webkit.org/show_bug.cgi?id=134159
339
340         Reviewed by Martin Robinson.
341
342         The ImageBuffer constructor operates with a FloatSize reference, which is also
343         passed to createCairoGLSurface when accelerated 2D canvas support is enabled.
344         That function should take in a reference to the same type.
345
346         * platform/graphics/cairo/ImageBufferCairo.cpp:
347         (WebCore::createCairoGLSurface):
348
349 2014-06-21  Dean Jackson  <dino@apple.com>
350
351         [Mac] Margins for new form controls need tweaking
352         https://bugs.webkit.org/show_bug.cgi?id=134135
353         <rdar://problem/17262164>
354
355         Reviewed by Sam Weinig.
356
357         Take 2 of this patch. Only the mac-mountainlion LayoutTest
358         results are different from the first attempt.
359
360         With the newer animated controls in OS X Yosemite, we need
361         to tweak the fudge-factor margins for positioning. In a recent
362         patch I added another fudge, which I'm removing with this. I'm
363         not sure where the older values came from, but I've checked with
364         the latest AppKit sources and am using the sizes they implement
365         for the controls.
366
367         This will rebaseline a lot of tests, since I've made small tweaks
368         to the form layout.
369
370         * platform/mac/ThemeMac.mm:
371         (WebCore::checkboxMargins): New margin amounts.
372         (WebCore::radioSizes): New sizes.
373         (WebCore::radioMargins): New margin amounts.
374         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
375         (WebCore::checkboxOffsets): Deleted.
376         (WebCore::radioOffsets): Deleted.
377
378 2014-06-20  Sam Weinig  <sam@webkit.org>
379
380         Remove static tables for bindings that use eager reification
381         https://bugs.webkit.org/show_bug.cgi?id=134126
382
383         Reviewed by Oliver Hunt.
384
385         This shaves about 1MB off of WebCore's .o files.
386
387         * bindings/scripts/CodeGeneratorJS.pm:
388         (GenerateHeader):
389         (GenerateImplementation):
390         (GenerateConstructorHelperMethods):
391         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
392         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
393         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
394         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
395         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
396         * bindings/scripts/test/JS/JSTestEventConstructor.h:
397         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
398         * bindings/scripts/test/JS/JSTestEventTarget.h:
399         * bindings/scripts/test/JS/JSTestException.cpp:
400         * bindings/scripts/test/JS/JSTestException.h:
401         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
402         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
403         * bindings/scripts/test/JS/JSTestInterface.cpp:
404         * bindings/scripts/test/JS/JSTestInterface.h:
405         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
406         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
407         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
408         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
409         * bindings/scripts/test/JS/JSTestNode.cpp:
410         * bindings/scripts/test/JS/JSTestNode.h:
411         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
412         * bindings/scripts/test/JS/JSTestNondeterministic.h:
413         * bindings/scripts/test/JS/JSTestObj.cpp:
414         * bindings/scripts/test/JS/JSTestObj.h:
415         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
416         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
417         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
418         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
419         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
420         * bindings/scripts/test/JS/JSTestTypedefs.h:
421         * bindings/scripts/test/JS/JSattribute.cpp:
422         * bindings/scripts/test/JS/JSattribute.h:
423         * bindings/scripts/test/JS/JSreadonly.cpp:
424         * bindings/scripts/test/JS/JSreadonly.h:
425
426 2014-06-21  Brady Eidson  <beidson@apple.com>
427
428         Gamepad API - Deprecate the existing implementation
429         https://bugs.webkit.org/show_bug.cgi?id=134108
430
431         Reviewed by Timothy Hatcher.
432
433         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
434         -Move some implementation files into a "deprecated" subdirectory.
435
436         * CMakeLists.txt:
437         * Configurations/FeatureDefines.xcconfig:
438         * PlatformGTK.cmake:
439
440         * Modules/gamepad/deprecated/Gamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
441         * Modules/gamepad/deprecated/Gamepad.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
442         * Modules/gamepad/deprecated/Gamepad.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
443         * Modules/gamepad/deprecated/GamepadList.cpp: Renamed from Source/WebCore/Modules/gamepad/GamepadList.cpp.
444         * Modules/gamepad/deprecated/GamepadList.h: Renamed from Source/WebCore/Modules/gamepad/GamepadList.h.
445         * Modules/gamepad/deprecated/GamepadList.idl: Renamed from Source/WebCore/Modules/gamepad/GamepadList.idl.
446         * Modules/gamepad/deprecated/NavigatorGamepad.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
447         * Modules/gamepad/deprecated/NavigatorGamepad.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
448         * Modules/gamepad/deprecated/NavigatorGamepad.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
449
450         * platform/Gamepads.h:
451         * platform/efl/GamepadsEfl.cpp:
452         * platform/gtk/GamepadsGtk.cpp:
453         * platform/linux/GamepadDeviceLinux.cpp:
454         * platform/linux/GamepadDeviceLinux.h:
455
456 2014-06-21  Myles C. Maxfield  <mmaxfield@apple.com>
457
458         Mark TextRun's constructors as explicit
459         https://bugs.webkit.org/show_bug.cgi?id=134124
460
461         Reviewed by Sam Weinig.
462
463         After r170072, nobody is implicitly converting a string to a TextRun. Therefore,
464         we can make the constructors explicit.
465
466         No new tests because there is no behavior change.
467
468         * platform/graphics/TextRun.h:
469         (WebCore::TextRun::TextRun):
470
471 2014-06-21  Commit Queue  <commit-queue@webkit.org>
472
473         Unreviewed, rolling out r170244.
474         https://bugs.webkit.org/show_bug.cgi?id=134157
475
476         GTK/EFL bindings generator works differently, making this
477         patch not work there.  Will fix entire patch after a rollout.
478         (Requested by bradee-oh on #webkit).
479
480         Reverted changeset:
481
482         "Gamepad API - Deprecate the existing implementation"
483         https://bugs.webkit.org/show_bug.cgi?id=134108
484         http://trac.webkit.org/changeset/170244
485
486 2014-06-21  Zan Dobersek  <zdobersek@igalia.com>
487
488         Fix the mismatched header build guards in WebKitDOMNodeFilterPrivate.h
489         which are throwing compilation warnings when building with Clang.
490
491         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
492
493 2014-06-21  Brady Eidson  <beidson@apple.com>
494
495         Gamepad API - Deprecate the existing implementation
496         https://bugs.webkit.org/show_bug.cgi?id=134108
497
498         Reviewed by Timothy Hatcher.
499
500         -Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
501         -Add the "Deprecated" suffix to some implementation files
502
503         * CMakeLists.txt:
504         * PlatformGTK.cmake:
505         * Configurations/FeatureDefines.xcconfig:
506         
507         * Modules/gamepad/GamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/Gamepad.cpp.
508         * Modules/gamepad/GamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/Gamepad.h.
509         * Modules/gamepad/GamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/Gamepad.idl.
510
511         * Modules/gamepad/GamepadList.cpp:
512         * Modules/gamepad/GamepadList.h:
513         * Modules/gamepad/GamepadList.idl:
514
515         * Modules/gamepad/NavigatorGamepadDeprecated.cpp: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
516         * Modules/gamepad/NavigatorGamepadDeprecated.h: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.h.
517         * Modules/gamepad/NavigatorGamepadDeprecated.idl: Renamed from Source/WebCore/Modules/gamepad/NavigatorGamepad.idl.
518
519         * platform/Gamepads.h:
520         * platform/efl/GamepadsEfl.cpp:
521         * platform/gtk/GamepadsGtk.cpp:
522         * platform/linux/GamepadDeviceLinux.cpp:
523         * platform/linux/GamepadDeviceLinux.h:
524
525 2014-06-21  Commit Queue  <commit-queue@webkit.org>
526
527         Unreviewed, rolling out r170228.
528         https://bugs.webkit.org/show_bug.cgi?id=134155
529
530         Caused 9 layout test failures on Mountain Lion
531         http://build.webkit.org/builders/Apple%20MountainLion%20Release%20WK2%20(Tests)/builds/19216
532         (Requested by bradee-oh on #webkit).
533
534         Reverted changeset:
535
536         "[Mac] Margins for new form controls need tweaking"
537         https://bugs.webkit.org/show_bug.cgi?id=134135
538         http://trac.webkit.org/changeset/170228
539
540 2014-06-21  Jer Noble  <jer.noble@apple.com>
541
542         [Mac] Create and attach the AVPlayerLayer to the AVPlayer immediately if the media element is <video>.
543         https://bugs.webkit.org/show_bug.cgi?id=134131
544
545         Reviewed by Eric Carlson.
546
547         The AVPlayer uses the presence of an AVPlayerLayer to decide which alternate to display in the case of
548         HLS streams with audio-only alternates. To give the AVPlayer the most information with which to make its
549         decision, always create and attach an AVPlayerLayer before attaching an AVPlayerItem to the AVPlayerLayer.
550         In addition, retrieve the <video> element bounds and create an AVPlayerLayer with a matching size, so that
551         the AVPlayer can choose an alternate with the correct dimensions.
552
553         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
554         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
555         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
556         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLayerRenderer):
557         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
558         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
559         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
560         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
561
562 2014-06-21  Jeremy Jones  <jeremyj@apple.com>
563
564         Implement ios -[WAKWindow convertBaseToScreen:]
565         https://bugs.webkit.org/show_bug.cgi?id=134053
566
567         Reviewed by Eric Carlson.
568
569         * platform/ios/wak/WAKWindow.mm:
570         (-[WAKWindow convertBaseToScreen:]):
571         Traverse layer hierarchy and convert point.
572
573         (-[WAKWindow convertScreenToBase:]):
574         Traverse layer hierarchy and convert point.
575
576 2014-06-21  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
577
578         Removing PAGE_VISIBILITY_API compile guard.
579         https://bugs.webkit.org/show_bug.cgi?id=133844
580
581         Reviewed by Gavin Barraclough.
582
583         No new tests because no functional changes.
584
585         * Configurations/FeatureDefines.xcconfig:
586         * Modules/vibration/NavigatorVibration.cpp:
587         (WebCore::NavigatorVibration::vibrate):
588         * dom/Document.cpp:
589         (WebCore::Document::hidden):
590         * dom/Document.h:
591         * dom/Document.idl:
592         * dom/Element.h:
593         * html/HTMLMediaElement.cpp:
594         (WebCore::HTMLMediaElement::HTMLMediaElement):
595         (WebCore::HTMLMediaElement::registerWithDocument):
596         (WebCore::HTMLMediaElement::unregisterWithDocument):
597         (WebCore::HTMLMediaElement::parseAttribute):
598         * html/HTMLMediaElement.h:
599         * page/Page.cpp:
600         (WebCore::Page::setIsVisibleInternal):
601         (WebCore::Page::visibilityState):
602         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
603         * page/Page.h:
604         * page/PageVisibilityState.cpp:
605         * page/PageVisibilityState.h:
606         * page/Settings.cpp:
607         (WebCore::Settings::Settings):
608         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
609         * page/Settings.h:
610         * platform/audio/MediaSession.cpp:
611         (WebCore::MediaSession::updateClientDataBuffering):
612         * platform/audio/MediaSession.h:
613
614 2014-06-21  Frédéric Wang  <fred.wang@free.fr>
615
616         [GTK][EFL] Use OpenType MATH fonts by default.
617         https://bugs.webkit.org/show_bug.cgi?id=133604
618
619         Reviewed by Chris Fleizach.
620
621         In order to support stretching of horizontal operators and large
622         operators in display mode as well as to improve the drawing of radicals,
623         we need to use an OpenType MATH table. This commit makes the MathML code
624         try "Latin Modern Math" first, which is an OpenType version of Knuth's
625         popular Computer Modern font and is packaged with most TeX
626         distributions (e.g. TeX Live on Linux). This should work well on the
627         EFL & GTK ports for which the initial OpenType MATH support has been
628         tested. Other ports will be handled later.
629
630         No new tests. This is already tested in LayoutTests/mathml/opentype/.
631
632         * css/mathml.css:
633         (math): Add "Latin Modern Math" as the first font-family of the <math> element.
634
635 2014-06-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
636
637         Unreviewed EFL build fix since r170224.
638
639         Add retainPlatformLayer() and releasePlatformLayer() in ScrollingStateNodeCoordinatedGraphics.cpp
640         as well. Thouse functions were missed in r170224.
641
642         * page/scrolling/ScrollingStateNode.h:
643         * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp:
644         (WebCore::LayerRepresentation::retainPlatformLayer):
645         (WebCore::LayerRepresentation::releasePlatformLayer):
646
647 2014-06-20  Dean Jackson  <dino@apple.com>
648
649         [Mac] Margins for new form controls need tweaking
650         https://bugs.webkit.org/show_bug.cgi?id=134135
651         <rdar://problem/17262164>
652
653         Reviewed by Sam Weinig.
654
655         With the newer animated controls in OS X Yosemite, we need
656         to tweak the fudge-factor margins for positioning. In a recent
657         patch I added another fudge, which I'm removing with this. I'm
658         not sure where the older values came from, but I've checked with
659         the latest AppKit sources and am using the sizes they implement
660         for the controls.
661
662         This will rebaseline a lot of tests, since I've made small tweaks
663         to the form layout.
664
665         * platform/mac/ThemeMac.mm:
666         (WebCore::checkboxMargins): New margin amounts.
667         (WebCore::radioSizes): New sizes.
668         (WebCore::radioMargins): New margin amounts.
669         (WebCore::paintToggleButton): No need to call the positioning fudge any more.
670         (WebCore::checkboxOffsets): Deleted.
671         (WebCore::radioOffsets): Deleted.
672
673 2014-06-20  Alex Christensen  <achristensen@webkit.org>
674
675         Fix css jit on armv7.
676         https://bugs.webkit.org/show_bug.cgi?id=134143
677         <rdar://problem/17348060>
678
679         Reviewed by Benjamin Poulain.
680
681         This fixes the acid3 test.
682
683         * cssjit/SelectorCompiler.cpp:
684         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
685         Correct high and low bits.
686
687 2014-06-20  Beth Dakin  <bdakin@apple.com>
688
689         https://bugs.webkit.org/show_bug.cgi?id=134117
690         Unreproducible crashes under WebCore::ScrollingTree::updateTreeFromStateNode() 
691         from messaging a deleted Obj-C object
692         -and corresponding-
693         <rdar://problem/17149252>
694
695         Reviewed by Simon Fraser.
696
697         This is a speculative fix. It makes LayerRepresentation retain m_platformLayer.
698
699         * WebCore.exp.in:
700         * page/scrolling/ScrollingStateNode.h:
701         (WebCore::LayerRepresentation::LayerRepresentation):
702         (WebCore::LayerRepresentation::~LayerRepresentation):
703         (WebCore::LayerRepresentation::operator=):
704         (WebCore::LayerRepresentation::operator==):
705         (WebCore::LayerRepresentation::operator ==): Deleted.
706
707         Make this ASSERT an ASSERT_WITH_SECURITY_IMPLICATION
708         * page/scrolling/ScrollingTree.cpp:
709         (WebCore::ScrollingTree::updateTreeFromStateNode):
710
711         Moved ScrollingStateNodeMac.mm, which was empty anyway, to cocoa/
712         ScrollingStateNode.mm so that iOS can use it too.
713         * page/scrolling/cocoa: Added.
714         * page/scrolling/cocoa/ScrollingStateNode.mm: Copied from page/scrolling/mac/ScrollingStateNodeMac.mm.
715
716         Actual implementation for retain and release.
717         (WebCore::LayerRepresentation::retainPlatformLayer):
718         (WebCore::LayerRepresentation::releasePlatformLayer):
719
720         Deleted.
721         * page/scrolling/mac/ScrollingStateNodeMac.mm: Removed.
722
723 2014-06-19  Zalan Bujtas  <zalan@apple.com>
724
725         Introduce RenderLayer::offsetFromAncestorLayer() to make convertToLayerCoords() calls with
726         LayoutPoint(0, 0) as parameter more explicit.
727         https://bugs.webkit.org/show_bug.cgi?id=134092
728
729         Reviewed by Simon Fraser.
730
731         Most of the RenderLayer::convertToLayerCoords() callers are only interested in
732         the offset from the ancestor layer by passing LayoutPoint(0, 0) as the coordinate to convert.
733         Introducing offsetFromAncestorLayer() makes those calls more explicit/self-explanatory.
734         It helps simplifying the callsite's code.
735
736         No change in functionality.
737
738         * rendering/RenderGeometryMap.cpp:
739         (WebCore::RenderGeometryMap::mapToContainer):
740         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
741         (WebCore::RenderGeometryMap::push):
742         * rendering/RenderLayer.cpp:
743         (WebCore::RenderLayer::computeOffsetFromRoot):
744         (WebCore::RenderLayer::updateLayerPositions):
745         (WebCore::expandClipRectForRegionAndReflection):
746         (WebCore::expandClipRectForDescendantsAndReflection):
747         (WebCore::transparencyClipBox):
748         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
749         (WebCore::accumulateOffsetTowardsAncestor):
750         (WebCore::RenderLayer::convertToLayerCoords):
751         (WebCore::RenderLayer::offsetFromAncestorLayer):
752         (WebCore::RenderLayer::clipToRect):
753         (WebCore::RenderLayer::paintLayerContents):
754         (WebCore::RenderLayer::paintLayerByApplyingTransform):
755         (WebCore::RenderLayer::collectFragments):
756         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
757         (WebCore::RenderLayer::createLocalTransformState):
758         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
759         (WebCore::RenderLayer::calculateClipRects):
760         * rendering/RenderLayer.h:
761         * rendering/RenderLayerBacking.cpp:
762         (WebCore::RenderLayerBacking::updateCompositedBounds):
763         (WebCore::RenderLayerBacking::updateGeometry):
764         * rendering/RenderLayerCompositor.cpp:
765         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
766
767 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
768
769         Removing dead code in platform/graphics/gpu
770         https://bugs.webkit.org/show_bug.cgi?id=134065
771
772         Reviewed by Simon Fraser.
773
774         No new tests because there is no behavior change.
775
776         * WebCore.vcxproj/WebCore.vcxproj:
777         * WebCore.vcxproj/WebCore.vcxproj.filters:
778         * WebCore.xcodeproj/project.pbxproj:
779         * platform/graphics/gpu/LoopBlinnClassifier.cpp: Removed.
780         * platform/graphics/gpu/LoopBlinnClassifier.h: Removed.
781         * platform/graphics/gpu/LoopBlinnConstants.h: Removed.
782         * platform/graphics/gpu/LoopBlinnLocalTriangulator.cpp: Removed.
783         * platform/graphics/gpu/LoopBlinnLocalTriangulator.h: Removed.
784         * platform/graphics/gpu/LoopBlinnMathUtils.cpp: Removed.
785         * platform/graphics/gpu/LoopBlinnMathUtils.h: Removed.
786         * platform/graphics/gpu/LoopBlinnPathCache.cpp: Removed.
787         * platform/graphics/gpu/LoopBlinnPathCache.h: Removed.
788         * platform/graphics/gpu/LoopBlinnPathProcessor.h: Removed.
789         * platform/graphics/gpu/LoopBlinnShader.cpp: Removed.
790         * platform/graphics/gpu/LoopBlinnShader.h: Removed.
791         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Removed.
792         * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Removed.
793         * platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Removed.
794         * platform/graphics/gpu/LoopBlinnTextureCoords.h: Removed.
795         * platform/graphics/gpu/Shader.cpp: Removed.
796         * platform/graphics/gpu/Shader.h: Removed.
797         * platform/graphics/gpu/SharedGraphicsContext3D.cpp: Removed.
798         * platform/graphics/gpu/SharedGraphicsContext3D.h: Removed.
799         * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
800         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Removed.
801         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Removed.
802         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: Removed.
803         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Removed.
804         * platform/graphics/gpu/opencl/OpenCLFEImage.cpp: Removed.
805         * platform/graphics/gpu/opencl/OpenCLFEMerge.cpp: Removed.
806         * platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Removed.
807         * platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Removed.
808         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Removed.
809         * platform/graphics/gpu/opencl/OpenCLHandle.h: Removed.
810
811 2014-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
812
813         [iOS] Support Khmer and Lao fallback fonts
814         https://bugs.webkit.org/show_bug.cgi?id=134114
815
816         Reviewed by Enrica Casucci.
817
818         iOS has fonts which have glyphs for the Khmer and Lao languages.
819
820         This patch also does a little refactoring of the language-specific fallback
821         font path to increase readability.
822
823         Test: fast/text/khmer-lao-font.html
824
825         * platform/graphics/ios/FontCacheIOS.mm:
826         (WebCore::languageSpecificFallbackFont):
827         (WebCore::FontCache::systemFallbackForCharacters):
828
829 2014-06-20  Anders Carlsson  <andersca@apple.com>
830
831         Give NPAPI post requests a default content type
832         https://bugs.webkit.org/show_bug.cgi?id=134120
833
834         Reviewed by Andreas Kling.
835
836         * WebCore.exp.in:
837
838 2014-06-20  Simon Fraser  <simon.fraser@apple.com>
839
840         REGRESSION (r169972): fix issue when removing masks from compositing layers
841         https://bugs.webkit.org/show_bug.cgi?id=134118
842         <rdar://problem/17366654>
843
844         Reviewed by Dean Jackson.
845         
846         After r169972 when removing the mask, we could destroy the mask
847         layer before the call into m_graphicsLayer->setMaskLayer(), which would
848         try to call functions on the old mask. Fix by clearing the mask layer
849         on the GraphicsLayer before the mask layer gets destroyed.
850
851         Test: compositing/masks/toggle-mask.html
852
853         * rendering/RenderLayerBacking.cpp:
854         (WebCore::RenderLayerBacking::updateConfiguration):
855         (WebCore::RenderLayerBacking::updateMaskLayer):
856         * rendering/RenderLayerBacking.h:
857
858 2014-06-20  Andreas Kling  <akling@apple.com>
859
860         [Cocoa] Release freed up blocks from the JS heap after simulated memory pressure.
861         <https://webkit.org/b/134112>
862
863         Reviewed by Mark Hahnenberg.
864
865         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
866         (WebCore::MemoryPressureHandler::install):
867
868 2014-06-20  Zalan Bujtas  <zalan@apple.com>
869
870         Remove redundant RenderLayer::computeOffsetFromRoot() function.
871         https://bugs.webkit.org/show_bug.cgi?id=134088
872
873         Reviewed by Benjamin Poulain.
874
875         No change in functionality.
876
877         * rendering/RenderLayer.cpp:
878         (WebCore::RenderLayer::calculateClipRects):
879         (WebCore::RenderLayer::computeOffsetFromRoot): Deleted.
880         * rendering/RenderLayer.h:
881
882 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
883
884         [iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
885         https://bugs.webkit.org/show_bug.cgi?id=134085
886         <rdar://problem/16440586>
887
888         Reviewed by Tim Horton.
889         
890         When nodes were detached from the scrolling tree, we would previously throw away
891         all descendant nodes, expecting that they would be re-attached as we walk the compositing
892         layer tree in RenderLayerCompositor.
893         
894         However, this doesn't work across frame boundaries; the subframe may never update
895         its compositing layers again, so would lose all its scrolling nodes.
896         
897         Fix by having ScrollingStateTree::detachNode() by default set aside subframe nodes
898         into a hash map. On reattach, we'll look in the hash map and pull out an existing node
899         (with its children intact) if possible.
900
901         Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html
902                platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html
903                platform/mac-wk2/tiled-drawing/scrolling/frames/remove-coordinated-frame.html
904
905         * page/scrolling/ScrollingStateNode.cpp:
906         (WebCore::ScrollingStateNode::ScrollingStateNode):
907         * page/scrolling/ScrollingStateTree.cpp:
908         (WebCore::ScrollingStateTree::attachNode):
909         (WebCore::ScrollingStateTree::detachNode):
910         (WebCore::ScrollingStateTree::clear):
911         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
912         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
913         * page/scrolling/ScrollingStateTree.h:
914         * page/scrolling/ScrollingTree.cpp:
915         (WebCore::ScrollingTree::commitNewTreeState): Go back to removing the deleted
916         nodes from m_nodeMap first.
917         (WebCore::ScrollingTree::removeDestroyedNodes): There is no need for this to
918         actually make use of ScrollingTreeNode* any more; the ASSERT(!node->parent())
919         is bogus because it can fire when whole subtrees are removed, and to clear the
920         latched node we just need the ID.
921
922 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
923
924         Handle scrolling tree modifications which remove intermediate nodes
925         https://bugs.webkit.org/show_bug.cgi?id=134082
926
927         Reviewed by Tim Horton.
928
929         When updating the scrolling tree from the state tree, we failed to maintain
930         the children arrays correctly. Fix by removing all children on scrolling nodes,
931         and allowing the calls on children to add them back. A temporary hash map
932         keeps the nodes alive.
933         
934         The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
935         to make it easier to handle removal followed by re-insertion.
936
937         * WebCore.exp.in:
938         * page/scrolling/ScrollingStateTree.cpp:
939         (WebCore::ScrollingStateTree::attachNode): If a node is (possibly re-)added,
940         remove it from m_nodesRemovedSinceLastCommit.remove.
941         (WebCore::ScrollingStateTree::willRemoveNode):
942         (WebCore::ScrollingStateTree::setRemovedNodes):
943         * page/scrolling/ScrollingStateTree.h:
944         (WebCore::ScrollingStateTree::removedNodes):
945         * page/scrolling/ScrollingTree.cpp:
946         (WebCore::ScrollingTree::commitNewTreeState):
947         (WebCore::ScrollingTree::updateTreeFromStateNode): Clean up to have only one call
948         to updateBeforeChildren(), and remove all children from the scrolling node
949         before visiting state children.
950         (WebCore::ScrollingTree::removeDestroyedNodes): It was very wrong to assume
951         that all non-root nodes were parented in the root! Now we don't need to
952         remove from the parent anyway.
953         * page/scrolling/ScrollingTree.h:
954         * page/scrolling/ScrollingTreeNode.h:
955         (WebCore::ScrollingTreeNode::children):
956
957 2014-06-19  Simon Fraser  <simon.fraser@apple.com>
958
959         Make ScrollingTreeNodes refounted, for easier tree reconfiguration
960         https://bugs.webkit.org/show_bug.cgi?id=134075
961
962         Reviewed by Tim Horton.
963
964         Make ScrollingTreeNode be ref-counted.
965
966         * page/scrolling/AsyncScrollingCoordinator.h:
967         * page/scrolling/ScrollingTree.cpp:
968         (WebCore::ScrollingTree::handleWheelEvent):
969         (WebCore::ScrollingTree::updateTreeFromStateNode):
970         * page/scrolling/ScrollingTree.h:
971         (WebCore::ScrollingTree::rootNode):
972         * page/scrolling/ScrollingTreeNode.cpp:
973         (WebCore::ScrollingTreeNode::appendChild):
974         * page/scrolling/ScrollingTreeNode.h:
975         * page/scrolling/ThreadedScrollingTree.cpp:
976         (WebCore::ThreadedScrollingTree::createNode):
977         * page/scrolling/ThreadedScrollingTree.h:
978         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
979         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
980         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
981         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
982         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
983         (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
984         * page/scrolling/ios/ScrollingTreeIOS.cpp:
985         (WebCore::ScrollingTreeIOS::createNode):
986         * page/scrolling/ios/ScrollingTreeIOS.h:
987         * page/scrolling/mac/ScrollingCoordinatorMac.h:
988         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
989         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
990         * page/scrolling/mac/ScrollingTreeFixedNode.h:
991         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
992         (WebCore::ScrollingTreeFixedNode::create):
993         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
994         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
995         (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
996         * page/scrolling/mac/ScrollingTreeStickyNode.h:
997         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
998         (WebCore::ScrollingTreeStickyNode::create):
999
1000 2014-06-20  Enrica Casucci  <enrica@apple.com>
1001
1002         iOS build fix after http://trac.webkit.org/changeset/170167.
1003
1004         Reviewed by Geoff Garen.
1005
1006         * bindings/js/JSDeviceMotionEventCustom.cpp:
1007         * bindings/js/JSDeviceOrientationEventCustom.cpp:
1008
1009 2014-06-19  Pratik Solanki  <psolanki@apple.com>
1010
1011         Enable synchronous willSendRequest on iOS
1012         https://bugs.webkit.org/show_bug.cgi?id=134081
1013         <rdar://problem/17350927>
1014
1015         Reviewed by Andreas Kling.
1016
1017         We lost the call to make willSendrequest callbacks be synchronous if possible during code
1018         refactoring. The call is present in ResourceHandleMac.mm but that code is not called when
1019         we use the CFNetwork based loader. Call the SPI in setupRequest().
1020
1021         No new tests because existing tests should cover this functionality.
1022
1023         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1024         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
1025         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1026
1027 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1028
1029         [GTK] Do not build quota files when QUOTA is disabled
1030         https://bugs.webkit.org/show_bug.cgi?id=134101
1031
1032         Reviewed by Philippe Normand.
1033
1034         * CMakeLists.txt: Remove exception for GTK+ that is no longer
1035         required since r170173.
1036         * PlatformGTK.cmake: Generate GObject DOM bindings for Quota when enabled.
1037
1038 2014-06-20  Manuel Rego Casasnovas  <rego@igalia.com>
1039
1040         [CSS Grid Layout] Add GridSpan::iterator
1041         https://bugs.webkit.org/show_bug.cgi?id=134058
1042
1043         Reviewed by Bem Jones-Bey.
1044
1045         Once that GridResolvedPosition has been introduced in r169934, this
1046         patch adds a GridSpan::iterator which allows to simplify the loops over
1047         GridResolvedPositions.
1048         From now on we could use range-based for loops.
1049
1050         No new tests as it is already covered by current tests
1051         (fast/css-grid-layout/).
1052
1053         * rendering/RenderGrid.cpp:
1054         (WebCore::RenderGrid::computeNormalizedFractionBreadth): Change loop to
1055         ranged-based for.
1056         (WebCore::RenderGrid::insertItemIntoGrid): Ditto.
1057         (WebCore::RenderGrid::gridAreaBreadthForChild): Ditto.
1058         * rendering/style/GridCoordinate.h: Define GridSpan::iterator.
1059         (WebCore::GridSpan::begin): Return resolved initial position.
1060         (WebCore::GridSpan::end): Return next to resolved final position.
1061         * rendering/style/GridResolvedPosition.h:
1062         (WebCore::GridResolvedPosition::operator*): Add operator required by
1063         range-based for loops.
1064         (WebCore::GridResolvedPosition::operator!=): Add not equal operator.
1065
1066 2014-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1067
1068         Unreviewed. Fix GTK+ debug build after r170174.
1069
1070         * bindings/gobject/WebKitDOMNodeFilter.cpp:
1071         (WebKit::nodeFilterObjectDestroyedCallback):
1072
1073 2014-06-20  Tim Horton  <timothy_horton@apple.com>
1074
1075         LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
1076         https://bugs.webkit.org/show_bug.cgi?id=134050
1077         <rdar://problem/17315114>
1078
1079         Reviewed by Simon Fraser.
1080
1081         * WebCore.exp.in:
1082         * WebCore.xcodeproj/project.pbxproj:
1083         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1084         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1085         Drain all LayerPools upon memory pressure.
1086
1087         * platform/graphics/ca/LayerPool.cpp:
1088         (WebCore::LayerPool::LayerPool):
1089         (WebCore::LayerPool::~LayerPool):
1090         (WebCore::LayerPool::allLayerPools):
1091         (WebCore::LayerPool::sharedPool): Deleted.
1092         * platform/graphics/ca/LayerPool.h:
1093         * platform/graphics/ca/PlatformCALayer.cpp:
1094         (WebCore::PlatformCALayer::createCompatibleLayerWithSize):
1095         Add createCompatibleLayerWithSize, which optionally tries to take said layer from the LayerPool.
1096
1097         (WebCore::PlatformCALayer::moveToLayerPool):
1098         Add moveToLayerPool, which moves the layer to the LayerPool.
1099
1100         (WebCore::PlatformCALayer::layerPool):
1101         The LayerPool for each layer is obtained via PlatformCALayer::layerPool(), which subclasses can override for special behaviors.
1102         The base class uses a global LayerPool.
1103
1104         * platform/graphics/ca/PlatformCALayer.h:
1105         * platform/graphics/ca/TileController.cpp:
1106         (WebCore::TileController::createTileLayer):
1107         * platform/graphics/ca/TileGrid.cpp:
1108         (WebCore::TileGrid::removeTiles):
1109
1110 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1111
1112         [GTK] webkit_dom_document_create_tree_walker impossible to use due to WebKitDOMNodeFilter
1113         https://bugs.webkit.org/show_bug.cgi?id=93002
1114
1115         Reviewed by Gustavo Noronha Silva.
1116
1117         Add custom implementation of WebKitDOMNodeFilter to expose it as
1118         an interface instead of a class.
1119
1120         * PlatformGTK.cmake: Add new files to compilation.
1121         * bindings/gobject/GObjectNodeFilterCondition.cpp: Added.
1122         (WebCore::GObjectNodeFilterCondition::~GObjectNodeFilterCondition):
1123         Reset the NodeFilter WebCore object associated to the
1124         WebKitDOMNodeFilter object.
1125         (WebCore::GObjectNodeFilterCondition::acceptNode): Call webkit_dom_node_filter_accept_node().
1126         * bindings/gobject/GObjectNodeFilterCondition.h: Added.
1127         (WebCore::GObjectNodeFilterCondition::create): Create a new
1128         GObjectNodeFilterCondition for the given WebKitDOMNodeFilter.
1129         (WebCore::GObjectNodeFilterCondition::GObjectNodeFilterCondition):
1130         * bindings/gobject/WebKitDOMNodeFilter.cpp: Added.
1131         (webkit_dom_node_filter_default_init):
1132         (webkit_dom_node_filter_accept_node):
1133         (WebKit::nodeFilterMap): Map NodeFilter WebCore objects to
1134         WebKitDOMNodeFilter objects.
1135         (WebKit::nodeFilterObjectDestroyedCallback): Remove the node
1136         filter form the map when the WebKitDOMNodeFilter objecrt is destroyed.
1137         (WebKit::kit): Return the WebKitDOMNodeFilter object for the given
1138         NodeFilter WebCore object.
1139         (WebKit::core): Get or create a NodeFilter WebCore object
1140         associated to the given WebKitDOMNodeFilter.
1141         * bindings/gobject/WebKitDOMNodeFilter.h: Added.
1142         * bindings/gobject/WebKitDOMNodeFilter.symbols: Added.
1143         * bindings/gobject/WebKitDOMNodeFilterPrivate.h: Added.
1144         * bindings/scripts/CodeGeneratorGObject.pm:
1145         (GenerateFunction): Add exceptions for NodeFilter parameters since
1146         the core method returns a PassRefPtr.
1147
1148 2014-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1149
1150         [GTK] Limit the amount of API exposed to GObject DOM bindings API
1151         https://bugs.webkit.org/show_bug.cgi?id=133726
1152
1153         Reviewed by Gustavo Noronha Silva.
1154
1155         Split the GObject DOM bindings API into stable and unstable. The
1156         unstable API is not included in the main webkitdom.h file, so that
1157         to use it users have to include the headers individually and
1158         define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
1159         of stable classes we generate a {ClassName}Unstable.h header file
1160         containing the unstable API. From now on we only keep backwards
1161         compatibility for the stable API.
1162
1163         * PlatformGTK.cmake: Split GObject DOM bindings related variables
1164         into Stable and Unstable. Add also
1165         * bindings/gobject/WebKitDOMCustom.cpp:
1166         (webkit_dom_html_media_element_set_current_time): Deleted.
1167         (webkit_dom_text_track_get_kind): Deleted.
1168         (webkit_dom_text_track_get_mode): Deleted.
1169         (webkit_dom_text_track_set_mode): Deleted.
1170         * bindings/gobject/WebKitDOMCustom.h:
1171         * bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
1172         added due to API changes.
1173         * bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
1174         * bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
1175         * bindings/scripts/CodeGeneratorGObject.pm:
1176         (SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
1177         (GenerateHeader): Only force single header include for stable
1178         headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
1179         (GenerateFunction): Only add stable symbols to the symbols
1180         array. Add function prototypes to main header or unstable header
1181         depending on whether it's an unstable symbol for a stable class or
1182         not. Also add Stability gtk-doc tag to unstable methods.
1183         (GenerateEndHeader): Add required #endifs
1184         (WriteData): Write also an Unstable.h header when appropriate and
1185         only generate a symbols file for stable classes.
1186         (ReadStableSymbols): Read the stable symbols for the current class.
1187         (GenerateInterface): Call ReadStableSymbols.
1188         * bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
1189         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
1190         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1191         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
1192         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
1193         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1194         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
1195         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
1196         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1197         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
1198         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
1199         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
1200         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
1201         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1202         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
1203         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1204         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1205         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
1206         * bindings/scripts/test/GObject/WebKitDOMreadonly.h:
1207
1208 2014-06-19  Andreas Kling  <akling@apple.com>
1209
1210         When simulating memory pressure, GC *after* releasing WebCore resources.
1211
1212         Since clearing the page cache is likely to create lots of garbage, defer the
1213         synchronous GC until after the WebCore pressure relief, so we can see the
1214         effect of clearing out all those pages.
1215
1216         Rubber-stamped by Gavin Barraclough.
1217
1218         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1219         (WebCore::MemoryPressureHandler::install):
1220
1221 2014-06-18  Sam Weinig  <sam@webkit.org>
1222
1223         Move generate prototype and constructor classes into the generated implementation files
1224         https://bugs.webkit.org/show_bug.cgi?id=134054
1225
1226         Reviewed by Oliver Hunt.
1227
1228         In an effort to reduce the size of the generated bindings headers, which is important
1229         as the generated headers get included in a lot of places, this patch moves the prototype
1230         and constructor declarations from the header to implementation file. This works because,
1231         for the most part, no code cares about the prototype or constructors except the instance.
1232
1233         There are a few exceptions which had to be accounted for:
1234         - The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
1235           available during initialization, so they remain in the header.
1236         - JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
1237           and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
1238           remains in the header.
1239         - A few classes had custom constructor functions. Instead of keeping the entire constructor
1240           in the header, I opted for pulling just the static constructor function into the header, and
1241           modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
1242           more specific type was unnecessary.
1243
1244         As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
1245         all the headers, which brought in quite a bit.
1246
1247         * bindings/js/JSAudioContextCustom.cpp:
1248         (WebCore::constructJSAudioContext):
1249         (WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
1250         * bindings/js/JSBlobCustom.cpp:
1251         (WebCore::constructJSBlob):
1252         (WebCore::JSBlobConstructor::constructJSBlob): Deleted.
1253         * bindings/js/JSCryptoCustom.cpp:
1254         * bindings/js/JSDOMFormDataCustom.cpp:
1255         (WebCore::constructJSDOMFormData):
1256         (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
1257         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
1258         * bindings/js/JSDOMPluginArrayCustom.cpp:
1259         * bindings/js/JSDOMPluginCustom.cpp:
1260         * bindings/js/JSDataCueCustom.cpp:
1261         (WebCore::constructJSDataCue):
1262         (WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
1263         * bindings/js/JSDataTransferCustom.cpp:
1264         * bindings/js/JSEventCustom.cpp:
1265         * bindings/js/JSFileReaderCustom.cpp:
1266         * bindings/js/JSHistoryCustom.cpp:
1267         * bindings/js/JSIDBAnyCustom.cpp:
1268         * bindings/js/JSIDBDatabaseCustom.cpp:
1269         * bindings/js/JSIDBObjectStoreCustom.cpp:
1270         * bindings/js/JSImageConstructor.cpp:
1271         (WebCore::JSImageConstructor::finishCreation):
1272         * bindings/js/JSImageDataCustom.cpp:
1273         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1274         * bindings/js/JSLocationCustom.cpp:
1275         * bindings/js/JSMessagePortCustom.cpp:
1276         * bindings/js/JSMutationObserverCustom.cpp:
1277         (WebCore::constructJSMutationObserver):
1278         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
1279         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1280         * bindings/js/JSSQLTransactionSyncCustom.cpp:
1281         * bindings/js/JSSVGLengthCustom.cpp:
1282         * bindings/js/JSSharedWorkerCustom.cpp:
1283         (WebCore::constructJSSharedWorker):
1284         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
1285         * bindings/js/JSStorageCustom.cpp:
1286         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
1287         * bindings/js/JSWebKitPointCustom.cpp:
1288         (WebCore::constructJSWebKitPoint):
1289         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
1290         * bindings/js/JSWorkerCustom.cpp:
1291         (WebCore::constructJSWorker):
1292         (WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
1293         * bindings/js/SerializedScriptValue.cpp:
1294         * bindings/scripts/CodeGeneratorJS.pm:
1295         (GenerateHeader):
1296         (GenerateImplementation):
1297         (GeneratePrototypeDeclaration):
1298         (GenerateConstructorDeclaration):
1299         (GenerateConstructorHelperMethods):
1300         (HeaderNeedsPrototypeDeclaration):
1301         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1302         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1303         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1304         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1305         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1306         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1307         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1308         * bindings/scripts/test/JS/JSTestEventTarget.h:
1309         * bindings/scripts/test/JS/JSTestException.cpp:
1310         * bindings/scripts/test/JS/JSTestException.h:
1311         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1312         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1313         * bindings/scripts/test/JS/JSTestInterface.cpp:
1314         * bindings/scripts/test/JS/JSTestInterface.h:
1315         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1316         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1317         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1318         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1319         * bindings/scripts/test/JS/JSTestNode.cpp:
1320         * bindings/scripts/test/JS/JSTestNode.h:
1321         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1322         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1323         * bindings/scripts/test/JS/JSTestObj.cpp:
1324         * bindings/scripts/test/JS/JSTestObj.h:
1325         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1326         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1327         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1328         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1329         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1330         * bindings/scripts/test/JS/JSTestTypedefs.h:
1331         * bindings/scripts/test/JS/JSattribute.cpp:
1332         * bindings/scripts/test/JS/JSattribute.h:
1333         * bindings/scripts/test/JS/JSreadonly.cpp:
1334         * bindings/scripts/test/JS/JSreadonly.h:
1335
1336
1337 2014-06-19  peavo@outlook.com  <peavo@outlook.com>
1338
1339         [Curl] Compile errors related to http header field names.
1340         https://bugs.webkit.org/show_bug.cgi?id=134029
1341
1342         Reviewed by Brent Fulgham.
1343
1344         Http header field names should now be specified with an enum, not a string.
1345
1346         * platform/network/curl/MultipartHandle.cpp:
1347         (WebCore::MultipartHandle::didReceiveResponse):
1348         * platform/network/curl/ResourceHandleManager.cpp:
1349         (WebCore::getProtectionSpace):
1350
1351 2014-06-19  Anders Carlsson  <andersca@apple.com>
1352
1353         Put the divider in the right place.
1354
1355         * DerivedSources.make:
1356
1357 2014-06-19  Anders Carlsson  <andersca@apple.com>
1358
1359         Address a review comment from Darin.
1360
1361         * inspector/InspectorResourceAgent.cpp:
1362         (WebCore::InspectorResourceAgent::willLoadXHR):
1363
1364 2014-06-19  Anders Carlsson  <andersca@apple.com>
1365
1366         Simplify two HistoryController member functions
1367         https://bugs.webkit.org/show_bug.cgi?id=134064
1368
1369         Reviewed by Dan Bernstein.
1370
1371         Remove the FrameLoadType parameter from recursiveSetProvisionalItem,
1372         use early returns and modern loops.
1373
1374         * loader/HistoryController.cpp:
1375         (WebCore::HistoryController::goToItem):
1376         (WebCore::HistoryController::recursiveSetProvisionalItem):
1377         (WebCore::HistoryController::recursiveGoToItem):
1378         * loader/HistoryController.h:
1379
1380 2014-06-19  David Kilzer  <ddkilzer@apple.com>
1381
1382         MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL() leaks an NSMutableArray
1383         <http://webkit.org/b/134052>
1384
1385         Reviewed by Eric Carlson.
1386
1387         Fixes the following static analyzer warning:
1388
1389             WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:688:43: warning: Potential leak of an object stored into 'outOfBandTracks'
1390                     NSMutableArray* outOfBandTracks = [[NSMutableArray alloc] init];
1391                                                       ^
1392
1393         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1394         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
1395         Use RetainPtr<NSMutableArray> to prevent a leak.  Use
1396         Objective-C literals to clean up the code.
1397
1398 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
1399
1400         ScriptExecutionContext::Task, FileThread::Task parameters should be values
1401         https://bugs.webkit.org/show_bug.cgi?id=134035
1402
1403         Reviewed by Anders Carlsson.
1404
1405         r170106 and similar previous changesets enforced ScriptExecutionContext::Task and
1406         FileThread::Task parameters as rvalue references. There's technically nothing wrong
1407         with that, but since both classes are move-only it is also not strictly required.
1408         Accepting these parameters as values is more common in C++ value semantics as well.
1409
1410         * dom/Document.cpp:
1411         (WebCore::Document::postTask):
1412         * dom/Document.h:
1413         * dom/ScriptExecutionContext.h:
1414         * fileapi/FileThread.cpp:
1415         (WebCore::FileThread::postTask):
1416         * fileapi/FileThread.h:
1417         * workers/DefaultSharedWorkerRepository.cpp:
1418         (WebCore::SharedWorkerProxy::postTaskToLoader):
1419         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1420         * workers/WorkerGlobalScope.cpp:
1421         (WebCore::WorkerGlobalScope::postTask):
1422         * workers/WorkerGlobalScope.h:
1423         * workers/WorkerLoaderProxy.h:
1424         * workers/WorkerMessagingProxy.cpp:
1425         (WebCore::WorkerMessagingProxy::postTaskToLoader):
1426         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1427         * workers/WorkerMessagingProxy.h:
1428         * workers/WorkerRunLoop.cpp:
1429         (WebCore::WorkerRunLoop::postTask):
1430         (WebCore::WorkerRunLoop::postTaskAndTerminate):
1431         (WebCore::WorkerRunLoop::postTaskForMode):
1432         (WebCore::WorkerRunLoop::Task::create):
1433         (WebCore::WorkerRunLoop::Task::Task):
1434         * workers/WorkerRunLoop.h:
1435
1436 2014-06-18  James Craig  <jcraig@apple.com>
1437
1438         Web Inspector: AXI: expose aria-relevant
1439         https://bugs.webkit.org/show_bug.cgi?id=130913
1440
1441         Reviewed by Joseph Pecoraro.
1442
1443         Expose ARIA live region relevance in Web Inspector.
1444         E.g. "Live: Assertive (Additions, Text)"
1445
1446         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
1447
1448         * inspector/InspectorDOMAgent.cpp:
1449         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): Support for liveRegionRelevant.
1450         * inspector/protocol/DOM.json: Defined enum values and array passed to client.
1451
1452 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
1453
1454         Add rebeccapurple to CSS named color list
1455         https://bugs.webkit.org/show_bug.cgi?id=133804
1456
1457         Reviewed by Jer Noble.
1458
1459         Add the named color "rebeccapurple" (#639).
1460
1461         * css/SVGCSSValueKeywords.in:
1462         * platform/ColorData.gperf:
1463
1464 2014-06-11  Jeffrey Pfau  <jpfau@apple.com>
1465
1466         Fix flaky beforeload tests
1467         https://bugs.webkit.org/show_bug.cgi?id=133685
1468
1469         Reviewed by David Kilzer.
1470
1471         * loader/FrameLoader.cpp:
1472         (WebCore::FrameLoader::loadURL):
1473
1474 2014-06-18  Anders Carlsson  <andersca@apple.com>
1475
1476         Make FrameLoadType a strongly typed enum
1477         https://bugs.webkit.org/show_bug.cgi?id=134047
1478
1479         Reviewed by Andreas Kling.
1480
1481         * history/BackForwardController.cpp:
1482         (WebCore::BackForwardController::goBackOrForward):
1483         (WebCore::BackForwardController::goBack):
1484         (WebCore::BackForwardController::goForward):
1485         * history/PageCache.cpp:
1486         (WebCore::logCanCachePageDecision):
1487         (WebCore::PageCache::canCache):
1488         * loader/FrameLoader.cpp:
1489         (WebCore::isBackForwardLoadType):
1490         (WebCore::FrameLoader::FrameLoader):
1491         (WebCore::FrameLoader::loadURLIntoChildFrame):
1492         (WebCore::FrameLoader::prepareForLoadStart):
1493         (WebCore::FrameLoader::loadFrameRequest):
1494         (WebCore::FrameLoader::loadURL):
1495         (WebCore::FrameLoader::load):
1496         (WebCore::FrameLoader::reloadWithOverrideEncoding):
1497         (WebCore::FrameLoader::reload):
1498         (WebCore::FrameLoader::commitProvisionalLoad):
1499         (WebCore::FrameLoader::transitionToCommitted):
1500         (WebCore::FrameLoader::isReplacing):
1501         (WebCore::FrameLoader::setReplacing):
1502         (WebCore::FrameLoader::subresourceCachePolicy):
1503         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1504         (WebCore::FrameLoader::addExtraFieldsToRequest):
1505         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1506         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
1507         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1508         (WebCore::FrameLoader::loadDifferentDocumentItem):
1509         * loader/FrameLoaderTypes.h:
1510         * loader/HistoryController.cpp:
1511         (WebCore::HistoryController::restoreDocumentState):
1512         (WebCore::HistoryController::updateForReload):
1513         (WebCore::HistoryController::isReplaceLoadTypeWithProvisionalItem):
1514         (WebCore::HistoryController::isReloadTypeWithProvisionalItem):
1515         * loader/NavigationAction.cpp:
1516         (WebCore::navigationType):
1517         * loader/PolicyChecker.cpp:
1518         (WebCore::PolicyChecker::PolicyChecker):
1519         (WebCore::PolicyChecker::checkNavigationPolicy):
1520         * loader/cache/CachedResourceLoader.cpp:
1521         (WebCore::CachedResourceLoader::cachePolicy):
1522         * loader/icon/IconController.cpp:
1523         (WebCore::IconController::startLoader):
1524
1525 2014-06-18  Alex Christensen  <achristensen@webkit.org>
1526
1527         [curl] Unreviewed speculative build fix after r170021.
1528
1529         * platform/network/curl/CurlCacheEntry.cpp:
1530         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
1531         (WebCore::CurlCacheEntry::parseResponseHeaders):
1532         * platform/network/curl/CurlDownload.cpp:
1533         (WebCore::CurlDownload::didReceiveHeader):
1534         * platform/network/curl/ResourceHandleManager.cpp:
1535         (WebCore::getProtectionSpace):
1536         (WebCore::headerCallback):
1537         Use HTTPHeaderName constants.
1538
1539 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
1540
1541         Move the removeNode() tree walking from ScrollingStateNote into ScrollingStateTree
1542         https://bugs.webkit.org/show_bug.cgi?id=134043
1543
1544         Reviewed by Beth Dakin.
1545
1546         It's cleaner if ScrollingStateTree does the descendant walk when removing nodes.
1547         We can simply start the "willBeRemoved" walk at the node in question.
1548         
1549         Have willRemoveNode() just remove the node from the m_stateNodeMap directly, rather
1550         than this happening in a separate walk of m_nodesRemovedSinceLastCommit.
1551
1552         * page/scrolling/ScrollingStateNode.cpp:
1553         (WebCore::ScrollingStateNode::removeDescendant): Deleted.
1554         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree): Deleted.
1555         * page/scrolling/ScrollingStateNode.h:
1556         * page/scrolling/ScrollingStateTree.cpp:
1557         (WebCore::ScrollingStateTree::attachNode):
1558         (WebCore::ScrollingStateTree::detachNode):
1559         (WebCore::ScrollingStateTree::clear):
1560         (WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
1561         (WebCore::ScrollingStateTree::recursiveNodeWillBeRemoved):
1562         (WebCore::ScrollingStateTree::willRemoveNode):
1563         (WebCore::ScrollingStateTree::removeNode): Deleted.
1564         * page/scrolling/ScrollingStateTree.h:
1565
1566 2014-06-18  Alex Christensen  <achristensen@webkit.org>
1567
1568         [iOS WebGL] Fixed WEBGL_compressed_texture_pvrtc.
1569         https://bugs.webkit.org/show_bug.cgi?id=133561
1570         
1571         Based on Blink r153971 by bajones@chromium.org.
1572
1573         Reviewed by Dean Jackson.
1574
1575         No new tests, but this should fix webgl-compressed-texture-pvrtc.html.
1576
1577         * html/canvas/WebGLRenderingContext.cpp:
1578         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
1579         (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions):
1580         Added checks for pvrtc.
1581
1582 2014-06-18  Anders Carlsson  <andersca@apple.com>
1583
1584         Work around a Windows compiler crash.
1585
1586         * loader/archive/cf/LegacyWebArchive.cpp:
1587         (WebCore::LegacyWebArchive::createFromSelection):
1588
1589 2014-06-18  Benjamin Poulain  <benjamin@webkit.org>
1590
1591         Subtrees with :first-child and :last-child are not invalidated when siblings are added/removed
1592         https://bugs.webkit.org/show_bug.cgi?id=133934
1593
1594         Reviewed by Antti Koivisto.
1595
1596         When adding/removing nodes on an element, we try to invalidate only the elements that are
1597         affected. In the case of :first-child and :last-child, that optimizations is implemented
1598         through two types of flags that are updated during style resolution.
1599
1600         The first flag is childrenAffectedByFirstChildRules (childrenAffectedByLastChildRules),
1601         set on the parent of any element that could be affected by :first-child (:last-child).
1602
1603         The other part of the optimization is marking the style itself with firstChildState (lastChildState)
1604         to further reduce invalidations.
1605
1606         The problem in this case happen with a subtree of element is detached. Since there is no renderer,
1607         the computed style is resolved ad-hoc and stored directly on the element. When the element is moved,
1608         the computed style was never cleared because the invalidation optimizations were not handling
1609         elements without style.
1610
1611         Credit to Yusuke Suzuki for discovering the issue and creating test cases.
1612
1613         Tests: fast/css/getComputedStyle/empty-update-without-renderer.html
1614                fast/css/getComputedStyle/first-child-update-without-renderer.html
1615                fast/css/getComputedStyle/last-child-update-without-renderer.html
1616
1617         * dom/Element.cpp:
1618         (WebCore::checkForEmptyStyleChange):
1619         Clean up: pull the style directly from the function instead of expection the call sites to do that.
1620         Refine the checks to avoid invalidation.
1621
1622         (WebCore::checkForSiblingStyleChanges):
1623         Do not early return if the parent is detached, the children may still need invalidation.
1624
1625         When there is no renderer, assume the worst first-child/last-child and force the invalidation.
1626
1627         (WebCore::Element::childrenChanged):
1628
1629 2014-06-18  Daniel Bates  <dabates@apple.com>
1630
1631         REGRESSION (r167856): Unable to log into HSBC app
1632         https://bugs.webkit.org/show_bug.cgi?id=133991
1633         <rdar://problem/17044839>
1634
1635         Reviewed by David Kilzer.
1636
1637         Following <http://trac.webkit.org/changeset/167856> we disallow "navigation to any URL that is
1638         invalid, except for JavaScript URLs, which need not be valid." A byproduct of this policy
1639         decision is that we no longer notify the WebKit client to about a navigation if the destination
1640         URL is invalid. And some apps, including the HSBC app for iOS, have logic to intercept URLs
1641         as a means to pass data from their WebView-embedded web app to the WebView. We should expose a
1642         setting called allowNavigationToInvalidURL (disabled by default on all ports and conditionally
1643         enabled on iOS) to toggle whether WebCore allows navigation to any URL, even if its invalid,
1644         so as to not break clients that intercept URLs and have custom logic to handle them.
1645
1646         Tests: fast/loader/allow-redirect-to-invalid-url-using-javascript.html
1647                fast/loader/allow-redirect-to-invalid-url-using-meta-refresh.html
1648                fast/loader/disallow-redirect-to-invalid-url-using-javascript.html
1649                fast/loader/disallow-redirect-to-invalid-url-using-meta-refresh.html
1650
1651         * loader/NavigationScheduler.cpp:
1652         (WebCore::NavigationScheduler::shouldScheduleNavigation): Modified to only validate
1653         the URL when the setting allowNavigationToInvalidURL is disabled.
1654         * page/Settings.in: Added setting allowNavigationToInvalidURL (disabled by default).
1655
1656 2014-06-18  Simon Fraser  <simon.fraser@apple.com>
1657
1658         Make ScrollingStateNodes refcounted, and other minor cleanup
1659         https://bugs.webkit.org/show_bug.cgi?id=134040
1660
1661         Reviewed by Beth Dakin.
1662
1663         Prepare for future scrolling frame gyrations by making
1664         ScrollingStateNodes refcounted.
1665         
1666         Rename ScrollingStateNode::removeChild() to removeDescendant()
1667         since that's what it does. Also rename didRemoveNode() to willRemoveNode()
1668         to better match the behavior.
1669         
1670         Use 'auto' in more places.
1671
1672         * page/scrolling/AsyncScrollingCoordinator.cpp:
1673         (WebCore::AsyncScrollingCoordinator::syncChildPositions):
1674         * page/scrolling/ScrollingStateFixedNode.cpp:
1675         (WebCore::ScrollingStateFixedNode::create):
1676         (WebCore::ScrollingStateFixedNode::clone):
1677         * page/scrolling/ScrollingStateFixedNode.h:
1678         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1679         (WebCore::ScrollingStateFrameScrollingNode::create):
1680         (WebCore::ScrollingStateFrameScrollingNode::clone):
1681         * page/scrolling/ScrollingStateFrameScrollingNode.h:
1682         * page/scrolling/ScrollingStateNode.cpp:
1683         (WebCore::ScrollingStateNode::cloneAndReset):
1684         (WebCore::ScrollingStateNode::appendChild):
1685         (WebCore::ScrollingStateNode::removeDescendant):
1686         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
1687         (WebCore::ScrollingStateNode::removeChild): Deleted.
1688         * page/scrolling/ScrollingStateNode.h:
1689         (WebCore::ScrollingStateNode::children):
1690         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1691         (WebCore::ScrollingStateOverflowScrollingNode::create):
1692         (WebCore::ScrollingStateOverflowScrollingNode::clone):
1693         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
1694         * page/scrolling/ScrollingStateStickyNode.cpp:
1695         (WebCore::ScrollingStateStickyNode::create):
1696         (WebCore::ScrollingStateStickyNode::clone):
1697         * page/scrolling/ScrollingStateStickyNode.h:
1698         * page/scrolling/ScrollingStateTree.cpp:
1699         (WebCore::ScrollingStateTree::attachNode):
1700         (WebCore::ScrollingStateTree::removeNode):
1701         (WebCore::ScrollingStateTree::willRemoveNode):
1702         (WebCore::ScrollingStateTree::didRemoveNode): Deleted.
1703         * page/scrolling/ScrollingStateTree.h:
1704         (WebCore::ScrollingStateTree::setRootStateNode):
1705         * page/scrolling/ScrollingTree.cpp:
1706         (WebCore::ScrollingTree::updateTreeFromStateNode):
1707
1708 2014-06-18  Anders Carlsson  <andersca@apple.com>
1709
1710         Adopt modern C++11 loops and fix WebArchive creation functions
1711         https://bugs.webkit.org/show_bug.cgi?id=134032
1712
1713         Reviewed by Andreas Kling.
1714
1715         Use modern loops in a couple of places, fix DocumentLoader::subresources() to return a Vector,
1716         and stop using Vectors of PassRefPtrs.
1717
1718         * WebCore.exp.in:
1719         * dom/Document.cpp:
1720         (WebCore::Document::textInserted):
1721         (WebCore::Document::textRemoved):
1722         (WebCore::Document::textNodesMerged):
1723         * loader/DocumentLoader.cpp:
1724         (WebCore::DocumentLoader::subresources):
1725         (WebCore::DocumentLoader::getSubresources): Deleted.
1726         * loader/DocumentLoader.h:
1727         * loader/appcache/ApplicationCache.cpp:
1728         (WebCore::ApplicationCache::dump):
1729         * loader/appcache/ApplicationCache.h:
1730         (WebCore::ApplicationCache::resources):
1731         (WebCore::ApplicationCache::begin): Deleted.
1732         (WebCore::ApplicationCache::end): Deleted.
1733         * loader/appcache/ApplicationCacheGroup.cpp:
1734         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
1735         * loader/appcache/ApplicationCacheHost.cpp:
1736         (WebCore::ApplicationCacheHost::fillResourceList):
1737         * loader/appcache/ApplicationCacheStorage.cpp:
1738         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
1739         (WebCore::ApplicationCacheStorage::store):
1740         (WebCore::ApplicationCacheStorage::empty):
1741         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
1742         * loader/archive/cf/LegacyWebArchive.cpp:
1743         (WebCore::LegacyWebArchive::create):
1744         (WebCore::LegacyWebArchive::createFromSelection):
1745         * loader/archive/cf/LegacyWebArchive.h:
1746         * xml/XMLHttpRequestProgressEventThrottle.cpp:
1747         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
1748
1749 2014-06-18  Alex Christensen  <achristensen@webkit.org>
1750
1751         Remove duplicate code using sdiv.
1752         https://bugs.webkit.org/show_bug.cgi?id=133764
1753
1754         Reviewed by Daniel Bates.
1755
1756         * cssjit/SelectorCompiler.cpp:
1757         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
1758         Use template sdiv for apple armv7s and arm64.
1759
1760 2014-06-18  Zan Dobersek  <zdobersek@igalia.com>
1761
1762         ScriptExecutionContext::Task parameters should always be rvalue references
1763         https://bugs.webkit.org/show_bug.cgi?id=133615
1764
1765         Reviewed by Darin Adler.
1766
1767         ScriptExecutionContext::Task parameters should be rvalue references as the
1768         passed-in objects are always ScriptExecutionContext::Task rvalues that were
1769         implicitly constructed from a lambda function or rvalues of objects that
1770         derive from ScriptExecutionContext::Task.
1771
1772         This isn't really necessary since ScriptExecutionContext::Task is non-copyable
1773         and we have to use move semantics anyway, but it makes it clear that these
1774         objects are expiring rvalues that must be properly dealt with.
1775
1776         * dom/Document.cpp:
1777         (WebCore::Document::postTask):
1778         * dom/Document.h:
1779         * dom/ScriptExecutionContext.h:
1780         * workers/DefaultSharedWorkerRepository.cpp:
1781         (WebCore::SharedWorkerProxy::postTaskToLoader):
1782         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1783         * workers/WorkerGlobalScope.cpp:
1784         (WebCore::WorkerGlobalScope::postTask):
1785         * workers/WorkerGlobalScope.h:
1786         * workers/WorkerLoaderProxy.h:
1787         * workers/WorkerMessagingProxy.cpp:
1788         (WebCore::WorkerMessagingProxy::postTaskToLoader):
1789         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1790         * workers/WorkerMessagingProxy.h:
1791         * workers/WorkerRunLoop.cpp:
1792         (WebCore::WorkerRunLoop::postTask):
1793         (WebCore::WorkerRunLoop::postTaskAndTerminate):
1794         (WebCore::WorkerRunLoop::postTaskForMode):
1795         (WebCore::WorkerRunLoop::Task::create):
1796         (WebCore::WorkerRunLoop::Task::Task):
1797         * workers/WorkerRunLoop.h:
1798
1799 2014-06-18  peavo@outlook.com  <peavo@outlook.com>
1800
1801         [WinCairo] Compile errors when trying to compile CA code.
1802         https://bugs.webkit.org/show_bug.cgi?id=134030
1803
1804         Reviewed by Simon Fraser.
1805
1806         WinCairo does not USE(CA).
1807
1808         * WebCore.vcxproj/WebCore.vcxproj:
1809         * platform/graphics/ca/TileController.h:
1810
1811 2014-06-17  Tim Horton  <timothy_horton@apple.com>
1812
1813         [iOS][wk2] Use ImageDocument to display subframe PDFs
1814         https://bugs.webkit.org/show_bug.cgi?id=133944
1815         <rdar://problem/17205983>
1816
1817         Reviewed by Dan Bates.
1818
1819         * dom/DOMImplementation.cpp:
1820         (WebCore::DOMImplementation::createDocument):
1821         Make a ImageDocument to show our subframe PDF, if the setting is enabled.
1822
1823         * html/ImageDocument.cpp:
1824         (WebCore::ImageDocument::finishedParsing):
1825         (WebCore::ImageDocument::createDocumentStructure):
1826         Set the ResourceResponse on the ImageElement upon creation, instead of
1827         when the load finishes. This way, when the internal CachedImage creates
1828         its Image, it can have the correct MIME type for the response, and can
1829         make a PDFDocumentImage if necessary.
1830
1831         We never noticed this before because CachedImage falls back to making a
1832         BitmapImage, and that was the only case that was normally used.
1833
1834         Throw an explicit white background behind PDF ImageDocuments; PDFDocumentImage
1835         paints with a transparent background, but when used as an ImageDocument
1836         it seems reasonable to assume that there should be a white page background
1837         (similar to what PDFPlugin and friends do).
1838
1839         * loader/DocumentWriter.cpp:
1840         (WebCore::DocumentWriter::createDocument):
1841         Don't make a PDFDocument if we want to use an ImageDocument for this subframe PDF.
1842
1843         * page/Settings.in:
1844
1845         * platform/MIMETypeRegistry.cpp:
1846         (WebCore::MIMETypeRegistry::isPDFMIMEType):
1847         * platform/MIMETypeRegistry.h:
1848         Expose the already implemented pdfMIMETypes table just like all the rest.
1849
1850 2014-06-17  Ryuan Choi  <ryuan.choi@samsung.com>
1851
1852         Unreviewed build fix with ENABLE_NOSNIFF after r170021
1853
1854         * loader/cache/CachedScript.cpp:
1855         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
1856
1857 2014-06-17  Jeremy Jones  <jeremyj@apple.com>
1858
1859         Improve enter and exit fullscreen transition by using two step transition.
1860         https://bugs.webkit.org/show_bug.cgi?id=133706
1861
1862         Reviewed by Simon Fraser.
1863
1864         setupFullscreen, creates the fullscreen views ready to receive the video layer.
1865         Once they are in place, didSetupFullscreen will move the video layer into the 
1866         new view hierarchy and initiate enterFullscreen to animate.
1867
1868         Reverse process for exit fullscreen.
1869
1870         * WebCore.exp.in: Add exports.
1871         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1872         (-[WebVideoFullscreenController enterFullscreen:]):
1873         Refactor into didSetupFullscreen.
1874         (-[WebVideoFullscreenController didSetupFullscreen]):
1875         Move the video layer once fullscreen is ready to receive it.
1876         (-[WebVideoFullscreenController didExitFullscreen]):
1877         Move the video layer back into we the web page, and initiate cleanup.
1878         (-[WebVideoFullscreenController didCleanupFullscreen]):
1879         Refactord cleanup from didExitFullscreen.
1880         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add delcarations.
1881         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1882         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
1883         Refactored from enterFullscreen. Builds views ready to receive video layer.
1884         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
1885         Animates into fullscreen.
1886         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
1887         Animates from fullscreen. Cleanup is refactored into cleanupFullscreen()
1888         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
1889         Refactored from exitFullscreen(), removes views.
1890
1891 2014-06-17  Sam Weinig  <sam@webkit.org>
1892
1893         Remove unnecessary Structure flags from generated bindings
1894         https://bugs.webkit.org/show_bug.cgi?id=133992
1895
1896         Reviewed by Daniel Bates.
1897
1898         - Remove OverridesVisitChildren flag from DOM prototype objects. They never
1899           implement visitChildren.
1900         - Remove OverridesGetOwnPropertySlot and ImplementsHasInstance from DOM constructor
1901           objects. getOwnPropertySlot is never implemented and ImplementsHasInstance is inherited
1902           automatically from DOMConstructorObject.
1903         - If we are not changing any flags, we now don't emit StructureFlags at all for the class.
1904
1905         * bindings/scripts/CodeGeneratorJS.pm:
1906         (GenerateHeader):
1907         (GeneratePrototypeDeclaration):
1908         (GenerateConstructorDeclaration):
1909         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1910         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
1911         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
1912         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1913         (WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype):
1914         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
1915         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1916         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
1917         * bindings/scripts/test/JS/JSTestEventTarget.h:
1918         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
1919         (WebCore::JSTestEventTargetConstructor::createStructure):
1920         * bindings/scripts/test/JS/JSTestException.h:
1921         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
1922         (WebCore::JSTestExceptionConstructor::createStructure):
1923         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1924         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
1925         (WebCore::JSTestGenerateIsReachableConstructor::createStructure):
1926         * bindings/scripts/test/JS/JSTestInterface.h:
1927         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
1928         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1929         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
1930         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
1931         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1932         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
1933         (WebCore::JSTestNamedConstructorConstructor::createStructure):
1934         * bindings/scripts/test/JS/JSTestNode.h:
1935         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
1936         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1937         (WebCore::JSTestNondeterministicPrototype::JSTestNondeterministicPrototype):
1938         (WebCore::JSTestNondeterministicConstructor::createStructure):
1939         * bindings/scripts/test/JS/JSTestObj.h:
1940         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
1941         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1942         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
1943         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1944         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
1945         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
1946         * bindings/scripts/test/JS/JSTestTypedefs.h:
1947         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
1948         * bindings/scripts/test/JS/JSattribute.h:
1949         (WebCore::JSattributePrototype::JSattributePrototype):
1950         (WebCore::JSattributeConstructor::createStructure):
1951         * bindings/scripts/test/JS/JSreadonly.h:
1952         (WebCore::JSreadonlyPrototype::JSreadonlyPrototype):
1953         (WebCore::JSreadonlyConstructor::createStructure):
1954
1955 2014-06-17  Myles C. Maxfield  <mmaxfield@apple.com>
1956
1957         [iOS] Input type=time elements styled with SVG fonts have 0 width
1958         https://bugs.webkit.org/show_bug.cgi?id=133524
1959
1960         Reviewed by Simon Fraser.
1961
1962         Refactor how the LocalizedDateCache returns maximum widths for input elements. Currently,
1963         measuring the width of an SVG font requires a RenderObject for context, which the
1964         LocalizedDateCache can't know about (it would be a platform violation). Instead, the
1965         LocalizedDateCache can return the strings that it would use to measure the width, and the
1966         caller can actually run the width computation.
1967
1968         Test: fast/forms/time-input-svg-font.html
1969
1970         * platform/text/PlatformLocale.h:
1971         * platform/text/ios/LocalizedDateCache.h:
1972         * platform/text/ios/LocalizedDateCache.mm:
1973         (WebCore::LocalizedDateCache::maximumWidthForDateType): Take a delegate which can
1974         measure text
1975         (WebCore::LocalizedDateCache::calculateMaximumWidth): Perform maximum width
1976         computation using delegate.
1977         * platform/text/mac/LocaleMac.h:
1978         * platform/text/mac/LocaleMac.mm:
1979         (WebCore::LocaleMac::formatDateTime):
1980         (WebCore::LocaleMac::maximumWidthForDateType): Deleted. Short-circuit this and go
1981         directly to the LocalizedDateCache. This makes sense because we have to explicitly
1982         insert computed values back into the cache in this new model.
1983         * rendering/RenderThemeIOS.mm:
1984         (WebCore::adjustInputElementButtonStyle): Create a delegate and pass it to the
1985         LocalizedDateCache
1986
1987 2014-06-17  Simon Fraser  <simon.fraser@apple.com>
1988
1989         [UI-side compositing] fix reflections on composited layers
1990         https://bugs.webkit.org/show_bug.cgi?id=133942
1991
1992         Reviewed by Tim Horton.
1993
1994         Fix reflections on composited layers. There are two main set of changes.
1995         
1996         First, a PlatformCALayerRemote which is a clone has to track the layer
1997         it is a clone of, so it knows where to grab the contents from in the UI process.
1998         This layer may be told that its contents need updating out of order during
1999         recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
2000         to allow a layer to add itself to the set of layers requiring commit.
2001         
2002         In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
2003         to go through clones, and copy their contents from the origin layer.
2004         
2005         The second set of changes makes platformCALayerLayerDidDisplay() work for
2006         UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
2007         PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
2008         what the origin layer is.
2009
2010         Test: compositing/reflections/repaint-with-reflection.html
2011
2012         * WebCore.exp.in:
2013         * platform/graphics/GraphicsLayer.h:
2014         (WebCore::GraphicsLayer::layerDidDisplay): Deleted.
2015         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2016         (WebCore::LayerClient::platformCALayerLayerDidDisplay): Deleted.
2017         * platform/graphics/ca/GraphicsLayerCA.cpp:
2018         (WebCore::GraphicsLayerCA::layerDidDisplay):
2019         (WebCore::GraphicsLayerCA::findOrMakeClone):
2020         * platform/graphics/ca/GraphicsLayerCA.h:
2021         * platform/graphics/ca/PlatformCALayer.h:
2022         * platform/graphics/ca/PlatformCALayerClient.h:
2023         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
2024         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2025         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2026         (PlatformCALayerMac::copyContentsFromLayer):
2027         (PlatformCALayerMac::superlayer):
2028         (PlatformCALayerMac::setContentsChanged): Deleted.
2029         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2030         (PlatformCALayerWinInternal::displayCallback):
2031         * platform/graphics/mac/WebLayer.mm:
2032         (-[WebSimpleLayer display]):
2033
2034 2014-06-17  Anders Carlsson  <andersca@apple.com>
2035
2036         Use strongly typed enums for AnimationState and AnimationInputState
2037         https://bugs.webkit.org/show_bug.cgi?id=133988
2038
2039         Reviewed by Tim Horton.
2040
2041         * page/animation/AnimationBase.cpp:
2042         (WebCore::AnimationBase::AnimationBase):
2043         (WebCore::nameForState):
2044         (WebCore::AnimationBase::updateStateMachine):
2045         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2046         (WebCore::AnimationBase::updatePlayState):
2047         (WebCore::AnimationBase::timeToNextService):
2048         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
2049         (WebCore::AnimationBase::freezeAtTime):
2050         (WebCore::AnimationBase::beginAnimationUpdateTime):
2051         * page/animation/AnimationBase.h:
2052         (WebCore::AnimationBase::clear):
2053         (WebCore::AnimationBase::onAnimationStartResponse):
2054         (WebCore::AnimationBase::waitingToStart):
2055         (WebCore::AnimationBase::preActive):
2056         (WebCore::AnimationBase::postActive):
2057         (WebCore::AnimationBase::fillingForwards):
2058         (WebCore::AnimationBase::paused):
2059         (WebCore::AnimationBase::inPausedState):
2060         (WebCore::AnimationBase::isNew):
2061         (WebCore::AnimationBase::waitingForStartTime):
2062         (WebCore::AnimationBase::waitingForStyleAvailable):
2063         (WebCore::AnimationBase::isAnimatingProperty):
2064         (WebCore::AnimationBase::styleAvailable):
2065         (WebCore::AnimationBase::compositeAnimation):
2066         * page/animation/ImplicitAnimation.cpp:
2067         (WebCore::ImplicitAnimation::onAnimationEnd):
2068         (WebCore::ImplicitAnimation::sendTransitionEvent):
2069         (WebCore::ImplicitAnimation::reset):
2070         (WebCore::ImplicitAnimation::setOverridden):
2071         * page/animation/KeyframeAnimation.cpp:
2072         (WebCore::KeyframeAnimation::KeyframeAnimation):
2073         (WebCore::KeyframeAnimation::animate):
2074         (WebCore::KeyframeAnimation::sendAnimationEvent):
2075
2076 2014-06-17  Andreas Kling  <akling@apple.com>
2077
2078         Avoid synchronous layout in window.scrollTo(0,0) when already at (0,0)
2079         <https://webkit.org/b/133893>
2080
2081         Going from 0,0 to 0,0 is a no-op since there is no way a layout will
2082         affect the current scroll position.
2083
2084         We don't send scroll events when moving to the previous position,
2085         so this change is not observable.
2086
2087         Reviewed by Anders Carlsson.
2088
2089         * page/DOMWindow.cpp:
2090         (WebCore::DOMWindow::scrollTo):
2091
2092 2014-06-17  Alex Christensen  <achristensen@webkit.org>
2093
2094         Fix css jit register usage on armv7.
2095         https://bugs.webkit.org/show_bug.cgi?id=133952
2096
2097         Reviewed by Benjamin Poulain.
2098
2099         * cssjit/RegisterAllocator.h:
2100         List r7 as a callee saved register, which it is.
2101         * cssjit/SelectorCompiler.cpp:
2102         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2103         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2104         Save r6, which is used as a temporary register and must be preserved.
2105
2106 2014-06-17  Miyoung Shin  <myid.shin@samsung.com>
2107
2108         Use references instead of pointers to RenderBlock in enclosingBoxModelObject()
2109         https://bugs.webkit.org/show_bug.cgi?id=133978
2110
2111         Reviewed by Andreas Kling.
2112
2113         Just a straightforward conversion from pointers to references.
2114
2115         No new tests, no behavior change.
2116
2117         * rendering/InlineFlowBox.cpp:
2118         (WebCore::InlineFlowBox::paint):
2119         * rendering/RenderBlock.cpp:
2120         (WebCore::RenderBlock::paintObject):
2121         * rendering/RenderObject.cpp:
2122         (WebCore::RenderObject::enclosingBoxModelObject):
2123         * rendering/RenderObject.h:
2124
2125 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
2126
2127         Cache the gst_query_get_n_buffering_ranges() return value for the for-loop conditional
2128         https://bugs.webkit.org/show_bug.cgi?id=133953
2129
2130         Reviewed by Philippe Normand.
2131
2132         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2133         (WebCore::MediaPlayerPrivateGStreamer::buffered): Avoid the extra call in the for-loop
2134         conditional expression by caching the return value of gst_query_get_n_buffering_ranges().
2135
2136 2014-06-17  Zan Dobersek  <zdobersek@igalia.com>
2137
2138         Avoid Vector<char> copies in the OffsetBuffer constructor
2139         https://bugs.webkit.org/show_bug.cgi?id=133956
2140
2141         Reviewed by Andreas Kling.
2142
2143         * xml/parser/XMLDocumentParserLibxml2.cpp:
2144         (WebCore::OffsetBuffer::OffsetBuffer): Take the Vector parameter by value and
2145         move it into the member variable.
2146         (WebCore::openFunc): Move the Vector object into the OffsetBuffer constructor.
2147
2148 2014-06-17  Jer Noble  <jer.noble@apple.com>
2149
2150         [MSE] Overwritten samples are removed from buffered ranges using decode times; added samples using presentation times
2151         https://bugs.webkit.org/show_bug.cgi?id=133959
2152
2153         Reviewed by Eric Carlson.
2154
2155         Test: media/media-source/media-source-overlapping-append-buffered.html
2156
2157         Explicitly call presentationTime() on removed samples, rather than implicitly asking for the iterator's "first"
2158         member. When iterating over samples, "first" can either be presentation time, or decode time, depending on which
2159         iteration method is called. In the case of removing samples, this was using the decode time incorrectly.
2160
2161         * Modules/mediasource/SourceBuffer.cpp:
2162         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2163
2164 2014-06-16  Mihnea Ovidenie  <mihnea@adobe.com>
2165
2166         [CSSRegions] Region with border radius and overflow:hidden does not clip content
2167         https://bugs.webkit.org/show_bug.cgi?id=133476
2168
2169         Reviewed by Andrei Bucur.
2170
2171         When setting the clip before painting the named flow content,
2172         use the region's foreground rect to take the region's border radius
2173         into account if needed.
2174
2175         Test: fast/regions/region-border-radius-overflow-clip.html
2176
2177         * rendering/RenderLayer.cpp:
2178         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
2179
2180 2014-06-16  Sam Weinig  <sam@webkit.org>
2181
2182         Extract prototype declaration generation into a helper function
2183         https://bugs.webkit.org/show_bug.cgi?id=133969
2184
2185         Reviewed by Dan Bernstein.
2186
2187         * bindings/scripts/CodeGeneratorJS.pm:
2188         (GenerateHeader):
2189         (GeneratePrototypeDeclaration):
2190
2191 2014-06-16  Sam Weinig  <sam@webkit.org>
2192
2193         Move forward declaration of bindings static functions into their implementation files
2194         https://bugs.webkit.org/show_bug.cgi?id=133943
2195
2196         Reviewed by Geoffrey Garen.
2197
2198         - Moves the forward declaration of static functions for generated files to the implementation.
2199         - Adds a new extended attribute, ForwardDeclareInHeader, for functions that still need a 
2200           forward declaration in the header.
2201
2202         * bindings/js/JSDOMBinding.h:
2203         (WebCore::nonCachingStaticFunctionGetter):
2204         Move this helper here from JSDOMWindowCustom.cpp.
2205
2206         * bindings/js/JSDOMWindowCustom.cpp:
2207         (WebCore::JSDOMWindow::getOwnPropertySlot):
2208         Switch to comparing the property name directly rather than looking up in the static table and
2209         comparing function pointers.
2210
2211         * bindings/js/JSHistoryCustom.cpp:
2212         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2213         Switch to comparing the property name directly rather than looking up in the static table and
2214         comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.
2215
2216         * bindings/js/JSLocationCustom.cpp:
2217         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2218         (WebCore::JSLocation::putDelegate):
2219         Switch to comparing the property name directly rather than looking up in the static table and
2220         comparing function pointers and start using the nonCachingStaticFunctionGetter<> helper.
2221
2222         * bindings/scripts/CodeGeneratorJS.pm:
2223         (GenerateHeader):
2224         (GenerateImplementation):
2225         Move forward declaration creation to the implementation file where possible.
2226
2227         * bindings/scripts/IDLAttributes.txt:
2228         Add ForwardDeclareInHeader.
2229
2230         * page/DOMWindow.idl:
2231         * page/History.idl:
2232         * page/Location.idl:
2233         Add ForwardDeclareInHeader where necessary.
2234
2235 2014-06-16  Jaehun Lim  <ljaehun.lim@samsung.com>
2236
2237         Unreviewed build fix after r170029
2238
2239         Use String() instead of AtomicString().
2240
2241         * platform/network/HTTPParsers.cpp:
2242         (WebCore::parseHTTPHeader):
2243         * platform/network/soup/ResourceRequestSoup.cpp:
2244         (WebCore::ResourceRequest::updateSoupMessageHeaders):
2245         * platform/network/soup/ResourceResponseSoup.cpp:
2246         (WebCore::ResourceResponse::toSoupMessage):
2247
2248 2014-06-16  Brent Fulgham  <bfulgham@apple.com>
2249
2250         [Win] Use TileController on Windows
2251         https://bugs.webkit.org/show_bug.cgi?id=133895
2252
2253         Reviewed by Tim Horton.
2254
2255         * WebCore.vcxproj/WebCore.vcxproj: Add Tiled Drawing files.
2256         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2257         * platform/graphics/TiledBacking.h: No longer Cocoa-only.
2258         * platform/graphics/ca/GraphicsLayerCA.cpp:
2259         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Windows
2260         now uses the same layer type as Mac.
2261         * platform/graphics/ca/LayerPool.cpp:
2262         (WebCore::LayerPool::takeLayerWithSize): Use nullptr
2263         rather than nil for C++ code.
2264         * platform/graphics/ca/PlatformCALayer.cpp:
2265         * platform/graphics/ca/PlatformCALayer.h: Expose necessary
2266         drawing functions for Windows port.
2267         * platform/graphics/ca/TileController.cpp: Remove unneeded
2268         header include for WebLayer.
2269         * platform/graphics/ca/TileCoverageMap.cpp: Correct #includes.
2270         * platform/graphics/ca/TileGrid.h: Not just for Cococa.
2271         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove
2272         extra whitespace.
2273         * platform/graphics/ca/mac/PlatformCALayerMac.h: Remove
2274         unneeded overload.
2275         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2276         (PlatformCALayer::collectRectsToPaint): Added stub.
2277         (PlatformCALayer::drawLayerContents): Added.
2278         (PlatformCALayer::frameForLayer): Added.
2279         (PlatformCALayerWin::PlatformCALayerWin): Remove unneeded
2280         assert now that we support these types. Add TileController
2281         support.
2282         (PlatformCALayerWin::setEdgeAntialiasingMask): Added.
2283         (printLayer): Add newly-supported tile types.
2284         (PlatformCALayerWin::tiledBacking): Added.
2285         * platform/graphics/ca/win/PlatformCALayerWin.h: Update to
2286         support Tiled Drawing.
2287         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2288         (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Update to
2289         recognize newly-supported layer types.
2290         (PlatformCALayerWinInternal::setNeedsDisplay): Ditto.
2291         (PlatformCALayerWinInternal::setSublayers): Ditto.
2292         (PlatformCALayerWinInternal::getSublayers): Ditto.
2293         (PlatformCALayerWinInternal::removeAllSublayers): Ditto.
2294         (PlatformCALayerWinInternal::insertSublayer): Ditto.
2295         (PlatformCALayerWinInternal::sublayerCount): Ditto.
2296         (PlatformCALayerWinInternal::indexOfSublayer): Ditto.
2297         (PlatformCALayerWinInternal::sublayerAtIndex): Ditto.
2298         (PlatformCALayerWinInternal::setBounds): Ditto.
2299         (PlatformCALayerWinInternal::setFrame): Ditto.
2300         (PlatformCALayerWinInternal::drawTile): Ditto.
2301         (PlatformCALayerWinInternal::createTileController): Ditto.
2302         (PlatformCALayerWinInternal::tiledBacking): Ditto.
2303         * platform/graphics/ca/win/PlatformCALayerWinInternal.h: Update to use
2304         TileController.
2305
2306 2014-06-16  Andreas Kling  <akling@apple.com>
2307
2308         Remove unnecessary style invalidation in RenderTextControl::styleDidChange().
2309         <https://webkit.org/b/133949>
2310
2311         This explicit invalidation of the text control's inner text element
2312         was hacked in to fix an editing test back in 2011, long before lazy
2313         render tree construction.
2314
2315         It should be safe to remove, since doing so doesn't affect any tests.
2316
2317         Reviewed by Antti Koivisto.
2318
2319         * rendering/RenderTextControl.cpp:
2320         (WebCore::RenderTextControl::styleDidChange):
2321
2322 2014-06-16  Anders Carlsson  <andersca@apple.com>
2323
2324         Fix iOS build.
2325
2326         * platform/network/cf/ResourceRequestCFNet.cpp:
2327         (WebCore::setHeaderFields):
2328
2329 2014-06-16  Anders Carlsson  <andersca@apple.com>
2330
2331         Accept-Ranges is not specific to GStreamer.
2332
2333         * platform/network/HTTPHeaderNames.in:
2334
2335 2014-06-16  Anders Carlsson  <andersca@apple.com>
2336
2337         Don't use AtomicString in HTTPHeaderMap
2338         https://bugs.webkit.org/show_bug.cgi?id=133957
2339         <rdar://problem/15256572>
2340
2341         Reviewed by Andreas Kling.
2342
2343         Use the string data that comes from the generated HTTPHeaderNames.cpp file
2344         for sharing header name data instead. In the future we can do something more fancy where
2345         we'll hash the HTTPHeaderName enum directly, but this is good enough for now.
2346
2347         * Modules/websockets/WebSocketHandshake.cpp:
2348         (WebCore::WebSocketHandshake::readHTTPHeaders):
2349         * WebCore.exp.in:
2350         * inspector/InspectorResourceAgent.cpp:
2351         (WebCore::buildObjectForHeaders):
2352         * loader/CrossOriginPreflightResultCache.cpp:
2353         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
2354         * loader/appcache/ApplicationCacheStorage.cpp:
2355         (WebCore::parseHeader):
2356         * loader/cache/CachedResource.cpp:
2357         (WebCore::shouldUpdateHeaderAfterRevalidation):
2358         * platform/network/HTTPHeaderMap.cpp:
2359         (WebCore::HTTPHeaderMap::copyData):
2360         (WebCore::internHTTPHeaderNameString):
2361         (WebCore::HTTPHeaderMap::get):
2362         (WebCore::HTTPHeaderMap::set):
2363         (WebCore::HTTPHeaderMap::add):
2364         (WebCore::CaseFoldingCStringTranslator::hash): Deleted.
2365         (WebCore::CaseFoldingCStringTranslator::equal): Deleted.
2366         (WebCore::CaseFoldingCStringTranslator::translate): Deleted.
2367         * platform/network/HTTPHeaderMap.h:
2368         * platform/network/HTTPHeaderNames.in:
2369         * platform/network/HTTPParsers.cpp:
2370         (WebCore::parseHTTPHeader):
2371         * platform/network/HTTPParsers.h:
2372         * platform/network/ResourceRequestBase.cpp:
2373         (WebCore::ResourceRequestBase::httpHeaderField):
2374         (WebCore::ResourceRequestBase::setHTTPHeaderField):
2375         (WebCore::ResourceRequestBase::addHTTPHeaderField):
2376         * platform/network/ResourceRequestBase.h:
2377         * platform/network/ResourceResponseBase.cpp:
2378         (WebCore::ResourceResponseBase::httpHeaderField):
2379         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2380         (WebCore::ResourceResponseBase::addHTTPHeaderField):
2381         * platform/network/ResourceResponseBase.h:
2382         * platform/network/mac/ResourceRequestMac.mm:
2383         (WebCore::ResourceRequest::doUpdateResourceRequest):
2384         * platform/network/mac/ResourceResponseMac.mm:
2385         (WebCore::ResourceResponse::platformLazyInit):
2386         * xml/XMLHttpRequest.cpp:
2387         (WebCore::XMLHttpRequest::setRequestHeader):
2388         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2389         (WebCore::XMLHttpRequest::getRequestHeader):
2390         (WebCore::XMLHttpRequest::getResponseHeader):
2391         * xml/XMLHttpRequest.h:
2392
2393 2014-06-16  Chris Fleizach  <cfleizach@apple.com>
2394
2395         AX: Safari crashed once in WebCore::AccessibilityObject::ariaIsHidden
2396         https://bugs.webkit.org/show_bug.cgi?id=133825
2397
2398         Reviewed by Enrica Casucci.
2399
2400         Sometimes asking accessibilityIsIgnored() will cause a newObject to be detached immediately after its created. 
2401         The creation function holds a reference with RefPtr as long as it lives, but when that method returns, the object goes away.
2402
2403         With that out of the way, I saw the same backtrace lead to updateLayoutIgnorePendingStylesheets being called while still inLayout.
2404
2405         I tried my best but could not create a reproducible layout test.
2406
2407         * accessibility/AXObjectCache.cpp:
2408         (WebCore::AXObjectCache::getOrCreate):
2409         * accessibility/AccessibilityObject.cpp:
2410         (WebCore::AccessibilityObject::updateBackingStore):
2411
2412 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
2413
2414         Unreviewed. Add more GStreamer-specific header names that are required
2415         after changes in r170021, fixing the build for ports using GStreamer.
2416
2417         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2418         (StreamingClient::handleResponseReceived):
2419         * platform/network/HTTPHeaderNames.in:
2420
2421 2014-06-16  Chris Fleizach  <cfleizach@apple.com>
2422
2423         AX: Crash at WebCore::AXObjectCache::textChanged
2424         https://bugs.webkit.org/show_bug.cgi?id=133873
2425
2426         Reviewed by Enrica Casucci.
2427
2428         This looks like a very similar problem to 
2429         https://bugs.webkit.org/show_bug.cgi?id=133825
2430
2431         The object is being created and deallocated almost right away because calling accessibilityIsIgnored triggers
2432         a deferred layout that invalidates the associated render element.
2433
2434         Despite my best efforts, I could not come up with a way to reproduce this in a layout test.
2435
2436         * accessibility/AXObjectCache.cpp:
2437         (WebCore::AXObjectCache::getOrCreate):
2438
2439 2014-06-15  Anders Carlsson  <andersca@apple.com>
2440
2441         Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
2442         https://bugs.webkit.org/show_bug.cgi?id=133925
2443
2444         Reviewed by Sam Weinig.
2445
2446         * WebCore.exp.in:
2447         * platform/network/ResourceRequestBase.cpp:
2448         (WebCore::ResourceRequestBase::setHTTPHeaderFields):
2449         (WebCore::ResourceRequestBase::addHTTPHeaderFields): Deleted.
2450         * platform/network/ResourceRequestBase.h:
2451         * plugins/PluginView.cpp:
2452         (WebCore::PluginView::handlePost):
2453         * xml/XMLHttpRequest.cpp:
2454         (WebCore::XMLHttpRequest::createRequest):
2455
2456 2014-06-16  Jeongeun Kim  <je_julie.kim@samsung.com>
2457
2458         Use references instead of pointers to RenderBlock in RenderObject::enclosingBox().
2459         https://bugs.webkit.org/show_bug.cgi?id=133902
2460
2461         Reviewed by Andreas Kling.
2462
2463         Just a straightforward conversion from pointers to references.
2464
2465         No new tests, no behavior change.
2466
2467         * bindings/objc/DOMUIKitExtensions.mm:
2468         (-[DOMHTMLElement structuralComplexityContribution]):
2469         * html/HTMLMediaElement.cpp:
2470         (WebCore::HTMLMediaElement::parseAttribute):
2471         * inspector/InspectorOverlay.cpp:
2472         (WebCore::buildObjectForRendererFragments):
2473         * page/EventHandler.cpp:
2474         (WebCore::scrollNode):
2475         (WebCore::EventHandler::scrollOverflow):
2476         (WebCore::EventHandler::logicalScrollOverflow):
2477         * page/FrameView.cpp:
2478         (WebCore::FrameView::layout):
2479         * rendering/RenderBox.cpp:
2480         (WebCore::computeInlineStaticDistance):
2481         * rendering/RenderFlowThread.cpp:
2482         (WebCore::RenderFlowThread::computedRegionRangeForBox):
2483         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion):
2484         (WebCore::RenderFlowThread::objectInFlowRegion):
2485         * rendering/RenderLayer.cpp:
2486         (WebCore::RenderLayer::calculateClipRects):
2487         * rendering/RenderObject.cpp:
2488         (WebCore::RenderObject::enclosingBox): Removed FIXME comment
2489         * rendering/RenderObject.h:
2490         * rendering/RenderScrollbar.cpp:
2491         (WebCore::RenderScrollbar::owningRenderer):
2492
2493 2014-06-16  Anders Carlsson  <andersca@apple.com>
2494
2495         Use HTTPHeaderName in more places
2496         https://bugs.webkit.org/show_bug.cgi?id=133948
2497
2498         Reviewed by Andreas Kling.
2499
2500         * loader/cache/CachedRawResource.cpp:
2501         (WebCore::shouldIgnoreHeaderForCacheReuse):
2502         * platform/network/HTTPHeaderNames.in:
2503         * xml/XMLHttpRequest.cpp:
2504         (WebCore::isSetCookieHeader):
2505         (WebCore::isForbiddenRequestHeader):
2506         (WebCore::XMLHttpRequest::isAllowedHTTPHeader):
2507         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Deleted.
2508         (WebCore::staticData): Deleted.
2509
2510 2014-06-16  Anders Carlsson  <andersca@apple.com>
2511
2512         Add HTTPHeaderName overloads on ResourceResponseBase
2513         https://bugs.webkit.org/show_bug.cgi?id=133946
2514
2515         Reviewed by Andreas Kling.
2516
2517         * WebCore.exp.in:
2518         * dom/Document.cpp:
2519         (WebCore::Document::lastModified):
2520         * loader/CrossOriginAccessControl.cpp:
2521         (WebCore::passesAccessControlCheck):
2522         * loader/CrossOriginPreflightResultCache.cpp:
2523         (WebCore::CrossOriginPreflightResultCacheItem::parse):
2524         * loader/FrameLoader.cpp:
2525         (WebCore::FrameLoader::receivedFirstData):
2526         (WebCore::FrameLoader::didBeginDocument):
2527         * loader/appcache/ApplicationCacheGroup.cpp:
2528         (WebCore::ApplicationCacheGroup::createResourceHandle):
2529         * loader/cache/CachedCSSStyleSheet.cpp:
2530         (WebCore::CachedCSSStyleSheet::canUseSheet):
2531         * loader/cache/CachedResource.cpp:
2532         (WebCore::CachedResource::load):
2533         * loader/cache/CachedScript.cpp:
2534         (WebCore::CachedScript::mimeType):
2535         * platform/network/HTTPHeaderNames.in:
2536         * platform/network/ResourceResponseBase.cpp:
2537         (WebCore::ResourceResponseBase::httpHeaderField):
2538         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2539         * platform/network/ResourceResponseBase.h:
2540         * xml/XMLHttpRequest.cpp:
2541         (WebCore::XMLHttpRequest::getAllResponseHeaders):
2542         (WebCore::XMLHttpRequest::getResponseHeader):
2543         (WebCore::XMLHttpRequest::responseMIMEType):
2544         (WebCore::XMLHttpRequest::didReceiveResponse):
2545
2546 2014-04-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2547
2548         [Bindings] "nullable" sequence support is incomplete (i.e. sequence<NativeType>?)
2549         https://bugs.webkit.org/show_bug.cgi?id=131240
2550
2551         Reviewed by Darin Adler.
2552
2553         Nullable sequences are not fully supported in WebKit's
2554         code generator machinery. Although the generated code
2555         does add "is nullable" check to the evaluation condition
2556         (i.e. if (arg.isNull() || ...)), when the JSValue
2557         that holds a "null" JSObject is actually to be "converted"
2558         to a native Vector<T>, it fails.
2559
2560         The reason for the failure is in JSDOMBindings::toNativeArray.
2561         This method verifies that JSValue does not hold a "non-null"
2562         object, and it bails out.
2563         Analogly, the "ref ptr" variant of this method (toRefPtrNativeArray)
2564         does support nullables.
2565
2566         Patch fixes it be checking for a "null" JSValue check before hand.
2567
2568         Tests: Binding tests updated.
2569
2570         * bindings/js/JSDOMBinding.h:
2571         (WebCore::toNativeArray):
2572         * bindings/scripts/CodeGeneratorJS.pm:
2573         (JSValueToNative):
2574         * Modules/websocket/WebSocket.idl:
2575         Removed one overload ctor now that
2576         we can use nullable sequences.
2577
2578 2014-06-16  Jer Noble  <jer.noble@apple.com>
2579
2580         [MSE][Mac] Occasional image corruption after seeking
2581         https://bugs.webkit.org/show_bug.cgi?id=133879
2582
2583         Reviewed by Eric Carlson.
2584
2585         Change the order of operations for seeks: change the current time of the AVSampleBufferRenderSynchronizer
2586         before flushing and appending non-displaying samples.
2587
2588         Rather than having a single function which retrieves the fast seek time and then seeks, split this out
2589         into two functions: one which gets the fast seek time, and one which seeks. (The later of course already
2590         exists: seekToTime()).
2591
2592         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2593         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2594         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2595         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
2596         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2597         (WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Renamed from seekToTime()
2598         (WebCore::MediaSourcePrivateAVFObjC::seekToTime): Deleted.
2599
2600 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
2601
2602         Have ScriptExecutionContext::Task functions take in a ScriptExecutionContext reference
2603         https://bugs.webkit.org/show_bug.cgi?id=133795
2604
2605         Reviewed by Andreas Kling.
2606
2607         The pointer to the ScriptExecutionContext object that is passed to the C++11 lambdas or
2608         helper functions wrapped in ScriptExecutionContext::Task is never null, so that parameter
2609         should be a reference instead.
2610
2611         * Modules/webdatabase/Database.cpp:
2612         (WebCore::Database::~Database):
2613         (WebCore::Database::runTransaction):
2614         (WebCore::Database::scheduleTransactionCallback):
2615         * Modules/webdatabase/DatabaseManager.cpp:
2616         (WebCore::DatabaseManager::openDatabase):
2617         * Modules/webdatabase/SQLCallbackWrapper.h:
2618         (WebCore::SQLCallbackWrapper::clear):
2619         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2620         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
2621         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks): Dereference the
2622         member variable that holds a never-null pointer to the ScriptExecutionContext. This should
2623         similarly be a reference.
2624         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
2625         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
2626         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
2627         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback):
2628         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
2629         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
2630         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback):
2631         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2632         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2633         (WebCore::workerGlobalScopeDidSend):
2634         (WebCore::workerGlobalScopeDidGetBufferedAmount):
2635         (WebCore::workerGlobalScopeDidConnect):
2636         (WebCore::workerGlobalScopeDidReceiveMessage):
2637         (WebCore::workerGlobalScopeDidReceiveBinaryData):
2638         (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
2639         (WebCore::workerGlobalScopeDidStartClosingHandshake):
2640         (WebCore::workerGlobalScopeDidClose):
2641         (WebCore::workerGlobalScopeDidReceiveMessageError):
2642         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2643         (WebCore::WorkerThreadableWebSocketChannel::mainThreadConnect):
2644         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSend):
2645         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer):
2646         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
2647         (WebCore::WorkerThreadableWebSocketChannel::mainThreadBufferedAmount):
2648         (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose):
2649         (WebCore::WorkerThreadableWebSocketChannel::mainThreadFail):
2650         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
2651         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend):
2652         (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume):
2653         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2654         * bindings/js/JSCallbackData.h:
2655         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
2656         * bindings/js/JSDOMGlobalObjectTask.cpp:
2657         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
2658         * dom/Document.cpp:
2659         (WebCore::Document::postTask):
2660         (WebCore::Document::pendingTasksTimerFired):
2661         * dom/ScriptExecutionContext.cpp:
2662         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
2663         * dom/ScriptExecutionContext.h:
2664         (WebCore::ScriptExecutionContext::Task::performTask):
2665         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2666         * dom/StringCallback.cpp:
2667         (WebCore::StringCallback::scheduleCallback):
2668         * fileapi/FileReader.cpp:
2669         (WebCore::delayedAbort):
2670         (WebCore::FileReader::abort):
2671         (WebCore::FileReader::doAbort): Deleted.
2672         * loader/WorkerThreadableLoader.cpp:
2673         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
2674         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy):
2675         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel):
2676         (WebCore::workerGlobalScopeDidSendData):
2677         (WebCore::workerGlobalScopeDidReceiveResponse):
2678         (WebCore::workerGlobalScopeDidReceiveData):
2679         (WebCore::workerGlobalScopeDidFinishLoading):
2680         (WebCore::workerGlobalScopeDidFail):
2681         (WebCore::workerGlobalScopeDidFailAccessControlCheck):
2682         (WebCore::workerGlobalScopeDidFailRedirectCheck):
2683         * loader/WorkerThreadableLoader.h:
2684         * loader/appcache/ApplicationCacheGroup.cpp:
2685         (WebCore::ApplicationCacheGroup::postListenerTask):
2686         * loader/cache/MemoryCache.cpp:
2687         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
2688         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches):
2689         * loader/cache/MemoryCache.h:
2690         * workers/DefaultSharedWorkerRepository.cpp:
2691         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
2692         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
2693         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
2694         * workers/WorkerEventQueue.cpp:
2695         (WebCore::WorkerEventQueue::enqueueEvent):
2696         * workers/WorkerGlobalScope.cpp:
2697         (WebCore::WorkerGlobalScope::close):
2698         * workers/WorkerMessagingProxy.cpp:
2699         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
2700         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
2701         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
2702         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
2703         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
2704         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2705         (WebCore::WorkerMessagingProxy::connectToInspector):
2706         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2707         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2708         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
2709         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
2710         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2711         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2712         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2713         * workers/WorkerRunLoop.cpp:
2714         (WebCore::WorkerRunLoop::Task::performTask):
2715         * workers/WorkerScriptLoader.cpp:
2716         * workers/WorkerThread.cpp:
2717         (WebCore::WorkerThread::stop):
2718         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2719
2720 2014-06-16  Zan Dobersek  <zdobersek@igalia.com>
2721
2722         Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
2723         https://bugs.webkit.org/show_bug.cgi?id=133677
2724
2725         Reviewed by Anders Carlsson.
2726
2727         * WebCore.exp.in: Update the changed symbol.
2728         * page/Page.cpp:
2729         (WebCore::Page::findStringMatchingRanges): The method expects the matchRanges parameter to be non-null,
2730         so it should take in that parameter by reference instead of pointer.
2731         * page/Page.h:
2732
2733 2014-06-16  Radu Stavila  <stavila@adobe.com>
2734
2735         REGRESSION (r168046): Incorrect layout for multicol spanners when moving from one thread to another
2736         https://bugs.webkit.org/show_bug.cgi?id=133589
2737
2738         Reviewed by Antti Koivisto.
2739
2740         When a spanner is moved from a multicol thread to another, its placeholder
2741         must be properly repositioned.
2742
2743         Test: fast/multicol/newmulticol/spanner-crash.html
2744
2745         * rendering/RenderMultiColumnFlowThread.cpp:
2746         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2747
2748 2014-06-16  Mario Sanchez Prada  <mario.prada@samsung.com>
2749
2750         [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
2751         https://bugs.webkit.org/show_bug.cgi?id=133512
2752
2753         Reviewed by Chris Fleizach.
2754
2755         Make sure that AccessibilityMenuList objects update their active
2756         option when it changes, which will send a platform-dependent
2757         accessibility-related notification when needed.
2758
2759         Test: accessibility/combo-box-collapsed-selection-changed.html
2760
2761         * rendering/RenderMenuList.cpp:
2762         (RenderMenuList::didUpdateActiveOption): Keep the out-of-bounds
2763         check for the index passed but don't avoid updating the option for
2764         the associated AccessibilityMenuList object if the selected list
2765         item does not have a renderer, because that could be the case for
2766         cases where the popup (and its elements) would be rendered in the
2767         UI Process (e.g. GTK+ port uses GtkMenu and GtkMenuItem for that).
2768
2769         * accessibility/AccessibilityMenuList.cpp:
2770         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Ensure
2771         that the AccessibilityMenuListPopup object for a given menu list
2772         has accessibility children before updating its active option.
2773
2774 2014-06-16  Commit Queue  <commit-queue@webkit.org>
2775
2776         Unreviewed, rolling out r170003.
2777         https://bugs.webkit.org/show_bug.cgi?id=133938
2778
2779         This patch broke GTK build (Requested by kczech on #webkit).
2780
2781         Reverted changeset:
2782
2783         "[EFL] Platform support for WebSpeech feature."
2784         https://bugs.webkit.org/show_bug.cgi?id=116438
2785         http://trac.webkit.org/changeset/170003
2786
2787 2014-06-16  Frédéric Wang  <fred.wang@free.fr>
2788
2789         Draw radicals with glyphs for better rendering.
2790         https://bugs.webkit.org/show_bug.cgi?id=119038
2791
2792         Unreviewed ASSERT fix.
2793
2794         * rendering/mathml/RenderMathMLRoot.h:
2795
2796 2014-06-16  Frédéric Wang  <fred.wang@free.fr>
2797
2798         Draw radicals with glyphs for better rendering
2799         https://bugs.webkit.org/show_bug.cgi?id=119038
2800
2801         Reviewed by Chris Fleizach.
2802
2803         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
2804         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
2805         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
2806
2807         Tests: mathml/opentype/roots-LatinModern.html
2808                mathml/presentation/mroot-transform.html
2809
2810         * CMakeLists.txt: add files to build system.
2811         * WebCore.vcxproj/WebCore.vcxproj: ditto.
2812         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
2813         * WebCore.xcodeproj/project.pbxproj: ditto
2814         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
2815         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
2816         (mroot > *:last-child):
2817         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
2818         (msqrt > *): Deleted.
2819         (mroot): Deleted. This rule was causing bug 126516.
2820         (mroot > * + *): Deleted.
2821         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
2822         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
2823         (WebCore::RenderObject::isRenderMathMLRootWrapper):
2824         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
2825         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
2826         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2827         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
2828         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
2829         (WebCore::RenderMathMLOperator::SetOperatorProperties):
2830         (WebCore::RenderMathMLOperator::updateTokenContent):
2831         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
2832         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
2833         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
2834         (WebCore::RenderMathMLRadicalOperator::stretchTo):
2835         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
2836         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
2837         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
2838         (WebCore::RenderMathMLRadicalOperator::paint):
2839         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
2840         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
2841         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
2842         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
2843         (WebCore::RenderMathMLRoot::baseWrapper):
2844         (WebCore::RenderMathMLRoot::radicalWrapper):
2845         (WebCore::RenderMathMLRoot::indexWrapper):
2846         (WebCore::RenderMathMLRoot::radicalOperator):
2847         (WebCore::RenderMathMLRoot::restructureWrappers):
2848         (WebCore::RenderMathMLRoot::addChild):
2849         (WebCore::RenderMathMLRoot::styleDidChange):
2850         (WebCore::RenderMathMLRoot::updateFromElement):
2851         (WebCore::RenderMathMLRoot::updateStyle):
2852         (WebCore::RenderMathMLRoot::firstLineBaseline):
2853         (WebCore::RenderMathMLRoot::layout):
2854         (WebCore::RenderMathMLRoot::paint):
2855         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
2856         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
2857         (WebCore::RenderMathMLRootWrapper::removeChild):
2858         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
2859         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
2860         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
2861         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
2862         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
2863         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
2864         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
2865         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
2866         (WebCore::RenderMathMLRoot::index): Deleted.
2867         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
2868         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
2869
2870 2014-06-16  Krzysztof Czech  <k.czech@samsung.com>
2871
2872         [EFL] Platform support for WebSpeech feature.
2873         https://bugs.webkit.org/show_bug.cgi?id=116438
2874
2875         Reviewed by Gyuyoung Kim.
2876
2877         It's a first step of adding support for Speech Synthesis in EFL port.
2878         Just stub out required API and support for compilation.
2879
2880         * CMakeLists.txt:
2881         * PlatformEfl.cmake:
2882         * platform/PlatformSpeechSynthesizer.h:
2883         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: Added.
2884         (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
2885         (WebCore::PlatformSpeechSynthesisProviderEfl::~PlatformSpeechSynthesisProviderEfl):
2886         (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
2887         (WebCore::PlatformSpeechSynthesisProviderEfl::pause):
2888         (WebCore::PlatformSpeechSynthesisProviderEfl::resume):
2889         (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
2890         (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
2891         * platform/efl/PlatformSpeechSynthesisProviderEfl.h: Added.
2892         * platform/efl/PlatformSpeechSynthesizerEfl.cpp: Added.
2893         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
2894         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2895         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2896         (WebCore::PlatformSpeechSynthesizer::pause):
2897         (WebCore::PlatformSpeechSynthesizer::resume):
2898         (WebCore::PlatformSpeechSynthesizer::speak):
2899         (WebCore::PlatformSpeechSynthesizer::cancel):
2900
2901 2014-06-15  Benjamin Poulain  <benjamin@webkit.org>
2902
2903         CSS JIT: add support for the :lang() pseudo class
2904         https://bugs.webkit.org/show_bug.cgi?id=133913
2905
2906         Reviewed by Andreas Kling.
2907
2908         The selector is already very expensive to begin with, just implement it with
2909         a function call.
2910
2911         It is also done after every other filter since it is so inefficient.
2912
2913         Tests: fast/selectors/lang-conflict.html
2914                fast/selectors/lang-empty.html
2915                fast/selectors/lang-specificity-xml.xhtml
2916                fast/selectors/lang-specificity.html
2917
2918         * css/SelectorChecker.cpp:
2919         (WebCore::SelectorChecker::checkOne):
2920         * css/SelectorCheckerTestFunctions.h:
2921         (WebCore::matchesLangPseudoClass):
2922         * cssjit/SelectorCompiler.cpp:
2923         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2924         (WebCore::SelectorCompiler::addPseudoClassType):
2925         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2926         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
2927         * dom/Element.cpp:
2928         (WebCore::Element::computeInheritedLanguage):
2929         * dom/ElementData.cpp:
2930         (WebCore::ElementData::findLanguageAttribute):
2931         * dom/ElementData.h:
2932
2933 2014-06-15  Anders Carlsson  <andersca@apple.com>
2934
2935         Add an autorelease() member function to RetainPtr
2936         https://bugs.webkit.org/show_bug.cgi?id=133929
2937
2938         Reviewed by Dan Bernstein.
2939
2940         * bindings/objc/DOM.mm:
2941         (-[DOMNode renderedImage]):
2942         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
2943         * bindings/objc/DOMUIKitExtensions.mm:
2944         (-[DOMHTMLImageElement dataRepresentation:]):
2945         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2946         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
2947         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
2948
2949 2014-06-14  Anders Carlsson  <andersca@apple.com>
2950
2951         Adopt HTTPHeaderName in ResourceResponseBase
2952         https://bugs.webkit.org/show_bug.cgi?id=133919
2953
2954         Reviewed by Sam Weinig.
2955
2956         * platform/network/HTTPHeaderNames.in:
2957         * platform/network/ResourceResponseBase.cpp:
2958         (WebCore::ResourceResponseBase::updateHeaderParsedState):
2959         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2960         (WebCore::ResourceResponseBase::addHTTPHeaderField):
2961         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2962         (WebCore::ResourceResponseBase::hasCacheValidatorFields):
2963         (WebCore::parseDateValueInHeader):
2964         (WebCore::ResourceResponseBase::date):
2965         (WebCore::ResourceResponseBase::age):
2966         (WebCore::ResourceResponseBase::expires):
2967         (WebCore::ResourceResponseBase::lastModified):
2968         (WebCore::ResourceResponseBase::isAttachment):
2969         * platform/network/ResourceResponseBase.h:
2970
2971 2014-06-14  Anders Carlsson  <andersca@apple.com>
2972
2973         Simplify ResourceRequest constructors
2974         https://bugs.webkit.org/show_bug.cgi?id=133911
2975
2976         Reviewed by Sam Weinig.
2977
2978         * platform/network/cf/ResourceRequest.h:
2979         (WebCore::ResourceRequest::ResourceRequest):
2980
2981 2014-06-14  Benjamin Poulain  <benjamin@webkit.org>
2982
2983         Fix the ARM64 build
2984
2985         * cssjit/SelectorCompiler.cpp:
2986         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
2987
2988 2014-06-13  Sam Weinig  <sam@webkit.org>
2989
2990         Store DOM constants directly in the JS object rather than jumping through a custom accessor
2991         https://bugs.webkit.org/show_bug.cgi?id=133898
2992
2993         Reviewed by Oliver Hunt.
2994
2995         Instead of implementing constants as custom accessors that just happen to return a value,
2996         we now store the constant directly in the HashTableValue array (where the GetValueFunc used
2997         to be). 
2998         
2999         - For the case where the constant is accessed via the static table (still in use for instances 
3000           and some prototypes), the static lookup function will set the value on the property slot,
3001           instead of passing a function pointer.
3002         - For the case where the constant is eagerly reified (most prototypes and all constructors) the
3003           constant is put directly in the object.
3004
3005         In micro benchmarks this looks to be around a 4x speedup on the use of DOM constants.
3006
3007         This also removes support for constant strings in IDL, which we had no uses of.
3008
3009         * bindings/scripts/CodeGeneratorJS.pm:
3010         (GenerateHeader):
3011         Remove code to generate forward declaration of constant accessor functions.
3012
3013         (GenerateImplementation):
3014         Remove code to generate implementation of constant accessor functions.
3015
3016         (GenerateHashTableValueArray):
3017         Plant the constant directly in the value array.
3018
3019         * bindings/scripts/IDLParser.pm:
3020         (parseConstValue):
3021         Remove support for constant strings.
3022
3023         * bindings/scripts/test/JS/JSTestInterface.cpp:
3024         * bindings/scripts/test/JS/JSTestInterface.h:
3025         * bindings/scripts/test/JS/JSTestObj.cpp:
3026         * bindings/scripts/test/JS/JSTestObj.h:
3027         * bindings/scripts/test/ObjC/DOMTestObj.h:
3028         * bindings/scripts/test/TestObj.idl:
3029         Update test results.
3030
3031 2014-06-14  Anders Carlsson  <andersca@apple.com>
3032
3033         Simplify Document::processHttpEquiv
3034         https://bugs.webkit.org/show_bug.cgi?id=133910
3035
3036         Reviewed by Andreas Kling.
3037
3038         * dom/Document.cpp:
3039         (WebCore::Document::processHttpEquiv):
3040         * platform/network/HTTPHeaderNames.in:
3041
3042 2014-06-14  Andreas Kling  <akling@apple.com>
3043
3044         GCController should return FastMalloc memory to the system.
3045         <https://webkit.org/b/133884>
3046
3047         Reviewed by Anders Carlsson.
3048
3049         Speculative test fix; I'm kinda suspecting that some tests are reporting
3050         more memory used because we did a GC but didn't get around to returning
3051         free pages to the system yet.
3052
3053         * bindings/js/GCController.cpp:
3054         (WebCore::GCController::garbageCollectNow):
3055
3056 2014-06-14  Zan Dobersek  <zdobersek@igalia.com>
3057
3058         Generate HTTP header names that are required by WebKitWebSrc
3059         https://bugs.webkit.org/show_bug.cgi?id=133906
3060
3061         Reviewed by Anders Carlsson.
3062
3063         WebKitWebSrc implementation sets icy-metadata and transferMode.dlna HTTP headers
3064         on ResourceRequest objects. The two headers are added to HTTPHeaderNames.in, and
3065         a small tweak is added to the generator script to avoid the dot in the second
3066         header's name (which would otherwise generate invalid C++).
3067
3068         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3069         (webKitWebSrcStart):
3070         * platform/network/HTTPHeaderNames.in:
3071         * platform/network/create-http-header-name-table:
3072
3073 2014-06-14  Anders Carlsson  <andersca@apple.com>
3074
3075         Replace some uses of ResourceRequestBase::addHTTPHeaderField with setHTTPHeaderField
3076         https://bugs.webkit.org/show_bug.cgi?id=133907
3077
3078         Reviewed by Andreas Kling.
3079
3080         * Modules/websockets/WebSocketHandshake.cpp:
3081         (WebCore::WebSocketHandshake::clientHandshakeRequest):
3082         * platform/network/HTTPHeaderNames.in:
3083         * platform/network/cf/ResourceHandleCFNet.cpp:
3084         (WebCore::applyBasicAuthorizationHeader):
3085         * platform/network/mac/ResourceHandleMac.mm:
3086         (WebCore::applyBasicAuthorizationHeader):
3087
3088 2014-06-13  Anders Carlsson  <andersca@apple.com>
3089
3090         Add a ResourceRequestBase::setHTTPHeaderField overload that takes a HTTPHeaderName
3091         https://bugs.webkit.org/show_bug.cgi?id=133881
3092
3093         Reviewed by Sam Weinig.
3094
3095         * WebCore.exp.in:
3096         * fileapi/FileReaderLoader.cpp:
3097         (WebCore::FileReaderLoader::start):
3098         * inspector/InspectorResourceAgent.cpp:
3099         (WebCore::InspectorResourceAgent::willSendRequest):
3100         * loader/CrossOriginAccessControl.cpp:
3101         (WebCore::createAccessControlPreflightRequest):
3102         * loader/FrameLoader.cpp:
3103         (WebCore::FrameLoader::addExtraFieldsToRequest):
3104         * loader/PingLoader.cpp:
3105         (WebCore::PingLoader::loadImage):
3106         (WebCore::PingLoader::sendPing):
3107         * loader/appcache/ApplicationCacheGroup.cpp:
3108         (WebCore::ApplicationCacheGroup::createResourceHandle):
3109         * loader/cache/CachedResource.cpp:
3110         (WebCore::CachedResource::load):
3111         * page/EventSource.cpp:
3112         (WebCore::EventSource::connect):
3113         * platform/network/BlobResourceHandle.cpp:
3114         (WebCore::BlobResourceHandle::doStart):
3115         * platform/network/HTTPHeaderNames.in:
3116         * platform/network/ResourceRequestBase.cpp:
3117         (WebCore::ResourceRequestBase::httpHeaderField):
3118         (WebCore::ResourceRequestBase::setHTTPHeaderField):
3119         (WebCore::ResourceRequestBase::httpContentType):
3120         (WebCore::ResourceRequestBase::setHTTPContentType):
3121         (WebCore::ResourceRequestBase::httpReferrer):
3122         (WebCore::ResourceRequestBase::setHTTPReferrer):
3123         (WebCore::ResourceRequestBase::httpOrigin):
3124         (WebCore::ResourceRequestBase::setHTTPOrigin):
3125         (WebCore::ResourceRequestBase::httpUserAgent):
3126         (WebCore::ResourceRequestBase::setHTTPUserAgent):
3127         (WebCore::ResourceRequestBase::httpAccept):
3128         (WebCore::ResourceRequestBase::setHTTPAccept):
3129         * platform/network/ResourceRequestBase.h:
3130         * platform/network/mac/ResourceHandleMac.mm:
3131         (WebCore::ResourceHandle::willSendRequest):
3132
3133 2014-06-14  Simon Fraser  <simon.fraser@apple.com>
3134
3135         Masks disappear when layers become tiled
3136         https://bugs.webkit.org/show_bug.cgi?id=133892
3137         <rdar://problem/17309793>
3138
3139         Reviewed by Tim Horton.
3140         
3141         There were several problems with tiled mask layers.
3142         
3143         First, when a layer became tiled it failed to re-apply the platform layer
3144         for its mask; fixed by adding MaskLayerChanged to the set of flags in
3145         swapFromOrToTiledLayer().
3146         
3147         Secondly, in CA, a mask layer's superlayer is the layer which is it masking,
3148         so the if (oldLayer->superlayer())... code in swapFromOrToTiledLayer() would
3149         erroneously try to swap out a sublayer on the superlayer with the mask.
3150         
3151         Thirdly, the mask layer is updated after its host layer, but when the mask layer
3152         become tiled, there was no code that updated the mask platform layer on its
3153         host layer. Fix by:
3154             1. setting a bit on a layer to note that it's being used as a mask.
3155             2. setting the parent of such a layer to its host layer (mimicking CA)
3156             3. when the mask becomes tiled, dirtying the MaskLayerChanged bit on
3157                its parent and adding a clause to commitLayerChangesAfterSublayers()
3158                to update the mask layer.
3159         
3160         Finally, ASSERTION FAILED: owningGraphicsLayer()->isCommittingChanges() would
3161         fire because we failed to set the m_isCommittingChanges flag while committing
3162         the mask layer. Fix by moving the TemporaryChange<bool> that sets this flag
3163         into commitLayerChangesBeforeSublayers() and commitLayerChangesAfterSublayers().
3164         
3165         Also used safe casts in more places in GraphicsLayerCA.
3166
3167         Tests: compositing/masks/become-tiled-mask.html
3168                compositing/masks/cease-tiled-mask.html
3169                compositing/masks/tiled-mask.html
3170
3171         * platform/graphics/GraphicsLayer.cpp:
3172         (WebCore::GraphicsLayer::GraphicsLayer):
3173         (WebCore::GraphicsLayer::removeFromParent):
3174         (WebCore::GraphicsLayer::setMaskLayer):
3175         * platform/graphics/GraphicsLayer.h:
3176         (WebCore::GraphicsLayer::setIsMaskLayer):
3177         (WebCore::GraphicsLayer::isMaskLayer):
3178         (WebCore::GraphicsLayer::setMaskLayer): Deleted.
3179         * platform/graphics/ca/GraphicsLayerCA.cpp:
3180         (WebCore::GraphicsLayerCA::removeFromParent):
3181         (WebCore::GraphicsLayerCA::setMaskLayer):
3182         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
3183         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3184         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3185         (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
3186         (WebCore::GraphicsLayerCA::updateSublayerList):
3187         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3188         (WebCore::GraphicsLayerCA::updateMaskLayer):
3189         (WebCore::GraphicsLayerCA::replicatedLayerRoot):
3190         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
3191         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3192         (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
3193         (WebCore::GraphicsLayerCA::fetchCloneLayers):
3194
3195 2014-06-14  peavo@outlook.com  <peavo@outlook.com>
3196
3197         [Curl] Compile errors related to http headers.
3198         https://bugs.webkit.org/show_bug.cgi?id=133901
3199
3200         Reviewed by Brent Fulgham.
3201
3202         Http headers should now be specified with an enum, not a string.
3203
3204         * platform/network/curl/CurlCacheEntry.cpp:
3205         (WebCore::CurlCacheEntry::parseResponseHeaders):
3206         * platform/network/curl/MultipartHandle.cpp:
3207         (WebCore::MultipartHandle::didReceiveResponse):
3208
3209 2014-06-14  Brent Fulgham  <bfulgham@apple.com>
3210
3211         Unreviewed build fix after r169960.
3212
3213         * platform/graphics/ca/PlatformCALayer.cpp: Add missing include
3214         for snprintf on Windows.
3215
3216 2014-06-14  Csaba Osztrogonác  <ossy@webkit.org>
3217
3218         URTBF after r169943 and r169946.
3219
3220         * platform/network/HTTPHeaderMap.h: Removed maybe accidental deletion of the only one add function.
3221         * platform/network/HTTPHeaderNames.in: Added Sec-WebSocket-Key.
3222
3223 2014-06-14  Commit Queue  <commit-queue@webkit.org>
3224
3225         Unreviewed, rolling out r169963.
3226         https://bugs.webkit.org/show_bug.cgi?id=133899
3227
3228         Assertion in mathml/roots-removeChild.html (Requested by fredw
3229         on #webkit).
3230
3231         Reverted changeset:
3232
3233         "Draw radicals with glyphs for better rendering"
3234         https://bugs.webkit.org/show_bug.cgi?id=119038
3235         http://trac.webkit.org/changeset/169963
3236
3237 2014-06-14  Frédéric Wang  <fred.wang@free.fr>
3238
3239         Draw radicals with glyphs for better rendering
3240         https://bugs.webkit.org/show_bug.cgi?id=119038
3241
3242         Reviewed by Chris Fleizach.
3243
3244         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
3245         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
3246         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
3247
3248         Tests: mathml/opentype/roots-LatinModern.html
3249                mathml/presentation/mroot-transform.html
3250
3251         * CMakeLists.txt: add files to build system.
3252         * WebCore.vcxproj/WebCore.vcxproj: ditto.
3253         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
3254         * WebCore.xcodeproj/project.pbxproj: ditto
3255         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
3256         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
3257         (mroot > *:last-child):
3258         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
3259         (msqrt > *): Deleted.
3260         (mroot): Deleted. This rule was causing bug 126516.
3261         (mroot > * + *): Deleted.
3262         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
3263         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
3264         (WebCore::RenderObject::isRenderMathMLRootWrapper):
3265         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
3266         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
3267         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3268         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
3269         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
3270         (WebCore::RenderMathMLOperator::SetOperatorProperties):
3271         (WebCore::RenderMathMLOperator::updateTokenContent):
3272         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
3273         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
3274         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
3275         (WebCore::RenderMathMLRadicalOperator::stretchTo):
3276         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
3277         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
3278         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
3279         (WebCore::RenderMathMLRadicalOperator::paint):
3280         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
3281         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
3282         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
3283         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
3284         (WebCore::RenderMathMLRoot::baseWrapper):
3285         (WebCore::RenderMathMLRoot::radicalWrapper):
3286         (WebCore::RenderMathMLRoot::indexWrapper):
3287         (WebCore::RenderMathMLRoot::radicalOperator):
3288         (WebCore::RenderMathMLRoot::restructureWrappers):
3289         (WebCore::RenderMathMLRoot::addChild):
3290         (WebCore::RenderMathMLRoot::styleDidChange):
3291         (WebCore::RenderMathMLRoot::updateFromElement):
3292         (WebCore::RenderMathMLRoot::updateStyle):
3293         (WebCore::RenderMathMLRoot::firstLineBaseline):
3294         (WebCore::RenderMathMLRoot::layout):
3295         (WebCore::RenderMathMLRoot::paint):
3296         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
3297         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
3298         (WebCore::RenderMathMLRootWrapper::removeChild):
3299         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
3300         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
3301         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
3302         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
3303         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
3304         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
3305         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
3306         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
3307         (WebCore::RenderMathMLRoot::index): Deleted.
3308         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
3309         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
3310
3311 2014-06-13  Brent Fulgham  <bfulgham@apple.com>
3312
3313         Move utility functions from WebLayer to PlatformCALayer
3314         https://bugs.webkit.org/show_bug.cgi?id=133887
3315         <rdar://problem/17309622>
3316
3317         Reviewed by Simon Fraser.
3318
3319         Move some utility functions from WebLayer.h/.mm to PlatformCALayer.
3320         Provide ObjC implementation in PlatformCALayerMac. A future patch will
3321         provide corresponding Windows versions.
3322
3323         * WebCore.exp.in:
3324         * platform/graphics/ca/PlatformCALayer.cpp:
3325         (WebCore::PlatformCALayer::drawRepaintIndicator):
3326         * platform/graphics/ca/PlatformCALayer.h:
3327         * platform/graphics/ca/TileController.cpp:
3328         (WebCore::TileController::blankPixelCountForTiles):
3329         * platform/graphics/ca/TileGrid.cpp:
3330         (WebCore::TileGrid::platformCALayerPaintContents):
3331         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3332         (PlatformCALayer::collectRectsToPaint):
3333         (PlatformCALayer::drawLayerContents):
3334         (PlatformCALayer::frameForLayer):
3335         * platform/graphics/mac/WebLayer.h:
3336         * platform/graphics/mac/WebLayer.mm:
3337         (-[WebLayer drawInContext:]):
3338         (WebCore::collectRectsToPaint): Deleted.
3339         (WebCore::drawLayerContents): Deleted.
3340         (WebCore::drawRepaintIndicator): Deleted.
3341         (WebCore::frameForLayer): Deleted.
3342
3343 2014-06-13  Alex Christensen  <achristensen@webkit.org>
3344
3345         Unreviewed disabling css jit on armv7.  It's not quite ready yet.
3346
3347         * cssjit/SelectorCompiler.cpp:
3348         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
3349         Removed extra comma.
3350
3351 2014-06-13  Alex Christensen  <achristensen@webkit.org>
3352
3353         Make css jit compile on armv7.
3354         https://bugs.webkit.org/show_bug.cgi?id=133889
3355
3356         Reviewed by Benjamin Poulain.
3357
3358         * cssjit/SelectorCompiler.cpp:
3359         (WebCore::SelectorCompiler::moduloHelper):
3360         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
3361         Implement modulo using a function call for now.
3362
3363 2014-06-13  Anders Carlsson  <andersca@apple.com>
3364
3365         Use the callOnMainThread version that takes an std::function in BlobResourceHandle::start()
3366         https://bugs.webkit.org/show_bug.cgi?id=133886
3367
3368         Reviewed by Andreas Kling.
3369
3370         Also replace a couple of NSAutoreleasePools with @autoreleasepool and an OwnPtr with an std::unique_ptr.
3371
3372         * page/scrolling/mac/ScrollingThreadMac.mm:
3373         (WebCore::ScrollingThread::threadRunLoopSourceCallback):
3374         * platform/mac/SharedTimerMac.mm:
3375         (WebCore::PowerObserver::PowerObserver):
3376         (WebCore::timerFired):
3377         (WebCore::setSharedTimerFireInterval):
3378         (WebCore::PowerObserver::create): Deleted.
3379         (WebCore::PowerObserver::didReceiveSystemPowerNotification): Deleted.
3380         * platform/network/BlobResourceHandle.cpp:
3381         (WebCore::BlobResourceHandle::start):
3382         (WebCore::delayedStartBlobResourceHandle): Deleted.
3383         * platform/network/BlobResourceHandle.h:
3384
3385 2014-06-12  Sam Weinig  <sam@webkit.org>
3386
3387         Constructors should eagerly reify their properties too
3388         https://bugs.webkit.org/show_bug.cgi?id=133822
3389
3390         Reviewed by Andreas Kling.
3391
3392         * bindings/scripts/CodeGeneratorJS.pm:
3393         (GenerateConstructorDeclaration):
3394         Constructors should never need to use the lazy property HashTable, so we can just
3395         remove its getOwnPropertySlot completely.
3396
3397         (ConstructorHasProperties):
3398         Add helper to determine if we need to reify any properties.
3399
3400         (GenerateConstructorHelperMethods):
3401         Reify if needed, and remove the implementation of getOwnPropertySlot.
3402
3403         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3404         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3405         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3406         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3407         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3408         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3409         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3410         * bindings/scripts/test/JS/JSTestEventTarget.h:
3411         * bindings/scripts/test/JS/JSTestException.cpp:
3412         * bindings/scripts/test/JS/JSTestException.h:
3413         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3414         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3415         * bindings/scripts/test/JS/JSTestInterface.cpp:
3416         * bindings/scripts/test/JS/JSTestInterface.h:
3417         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3418         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3419         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3420         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3421         * bindings/scripts/test/JS/JSTestNode.cpp:
3422         * bindings/scripts/test/JS/JSTestNode.h:
3423         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3424         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3425         * bindings/scripts/test/JS/JSTestObj.cpp:
3426         * bindings/scripts/test/JS/JSTestObj.h:
3427         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3428         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3429         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3430         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3431         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3432         * bindings/scripts/test/JS/JSTestTypedefs.h:
3433         * bindings/scripts/test/JS/JSattribute.cpp:
3434         * bindings/scripts/test/JS/JSattribute.h:
3435         * bindings/scripts/test/JS/JSreadonly.cpp:
3436         * bindings/scripts/test/JS/JSreadonly.h:
3437         Update tests.
3438
3439 2014-06-13  Alex Christensen  <achristensen@webkit.org>
3440
3441         Make css jit allocator smarter.
3442         https://bugs.webkit.org/show_bug.cgi?id=133834
3443
3444         Reviewed by Benjamin Poulain.
3445
3446         * cssjit/RegisterAllocator.h:
3447         (WebCore::RegisterAllocator::allocateRegister):
3448         (WebCore::RegisterAllocator::deallocateRegister):
3449         (WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
3450         (WebCore::LocalRegister::LocalRegister):
3451         (WebCore::RegisterAllocator::RegisterAllocator):
3452         Use a Deque for the registers.  Allocate from the front and deallocate to the back to cycle the register usage.
3453         (WebCore::RegisterAllocator::allocateRegisterWithPreference):
3454         (WebCore::LocalRegisterWithPreference::LocalRegisterWithPreference):
3455         Added the ability to specify that we prefer a certain register if it is available while allocating.
3456         These functions always return a register.  It is just a different register than preferred if the preferred register is not available.
3457         * cssjit/SelectorCompiler.cpp:
3458         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3459         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
3460         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
3461         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
3462         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
3463         Whenever we are allocating a register for the second argument, we should specify that we 
3464         prefer to have argumentGPR1 to reduce register swapping when preparing for a function call.
3465         This cannot be done for argumentGPR0 because elementAddressRegister is argumentGPR0 and it is always allocated.
3466
3467 2014-06-13  Jeremy Jones  <jeremyj@apple.com>
3468
3469         set setUsesExternalPlaybackWhileExternalScreenIsActive based on fullscreen mode
3470         https://bugs.webkit.org/show_bug.cgi?id=133829
3471
3472         Reviewed by Eric Carlson.
3473
3474         When playing inline and external screen is active, don't use external playback.
3475
3476         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3477         declare updateDisableExternalPlayback()
3478         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3479         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3480         call updateDisableExternalPlayback when player is created
3481         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
3482         call updateDisableExternalPlayback when fullscreen mode changes
3483         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
3484         update setUsesExternalPlaybackWhileExternalScreenIsActive based on fullscreen mode
3485
3486 2014-06-13  Brent Fulgham  <bfulgham@apple.com>
3487
3488         Convert LayerPool and TileCoverageMap from ObjC to C++
3489         https://bugs.webkit.org/show_bug.cgi?id=133862
3490         <rdar://problem/17302883>
3491
3492         Reviewed by Simon Fraser.
3493
3494         This just moves two ObjC files from the mac subdirectory to the parent and
3495         revises the project to build them as C++.
3496
3497         * WebCore.xcodeproj/project.pbxproj:
3498         * platform/graphics/ca/LayerPool.cpp: Copied from platform/graphics/ca/mac/LayerPool.mm.
3499         * platform/graphics/ca/LayerPool.h: Copied from platform/graphics/ca/mac/LayerPool.h.
3500         * platform/graphics/ca/TileCoverageMap.cpp: Copied from platform/graphics/ca/mac/TileCoverageMap.mm.
3501         * platform/graphics/ca/TileCoverageMap.h: Copied from platform/graphics/ca/mac/TileCoverageMap.h.
3502         * platform/graphics/ca/mac/LayerPool.h: Removed.
3503         * platform/graphics/ca/mac/LayerPool.mm: Removed.
3504         * platform/graphics/ca/mac/TileCoverageMap.h: Removed.
3505         * platform/graphics/ca/mac/TileCoverageMap.mm: Removed.
3506
3507 2014-06-13  Alex Christensen  <achristensen@webkit.org>
3508
3509         Make css jit compile for armv7.
3510         https://bugs.webkit.org/show_bug.cgi?id=133596
3511
3512         Reviewed by Benjamin Poulain.
3513
3514         * cssjit/FunctionCall.h:
3515         (WebCore::FunctionCall::swapArguments):
3516         Implemented for ARM_THUMB2 and removed allocator hack.
3517         * cssjit/RegisterAllocator.h:
3518         Added list of ARM_THUMB2 general purpose registers.
3519         (WebCore::RegisterAllocator::isValidRegister):
3520         Added ARM register range and corrected ARM64 register range now that r15 is tempRegister.
3521         * cssjit/SelectorCompiler.cpp:
3522         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
3523         Return CannotCompile if compiling fails because of lack of registers.
3524         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
3525         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
3526         Implemented for ARM_THUMB2.
3527         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3528         Return false if the selector cannot be compiled because of lack of registers.
3529         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
3530         Added code using 32-bit operations and used macro assembler for 64-bit operations.
3531         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
3532         Implemented for APPLE_ARMV7S, where sdiv is not a template in the assembler.
3533         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributesMatching):
3534         Use addPtr instead of add64.
3535
3536 2014-06-13  Anders Carlsson  <andersca@apple.com>
3537
3538         Add a HTTPHeaderMap::get overload that takes an HTTPHeaderName
3539         https://bugs.webkit.org/show_bug.cgi?id=133877
3540
3541         Reviewed by Andreas Kling.
3542
3543         * Modules/websockets/WebSocketHandshake.cpp:
3544         (WebCore::WebSocketHandshake::serverWebSocketProtocol):
3545         (WebCore::WebSocketHandshake::serverSetCookie):
3546         (WebCore::WebSocketHandshake::serverSetCookie2):
3547         (WebCore::WebSocketHandshake::serverUpgrade):
3548         (WebCore::WebSocketHandshake::serverConnection):
3549         (WebCore::WebSocketHandshake::serverWebSocketAccept):
3550         * WebCore.exp.in:
3551         * platform/network/HTTPHeaderMap.cpp:
3552         (WebCore::HTTPHeaderMap::get):
3553         * platform/network/HTTPHeaderMap.h:
3554         * platform/network/HTTPHeaderNames.in:
3555         * plugins/PluginView.cpp:
3556         (WebCore::PluginView::handlePost):
3557
3558 2014-06-13  Commit Queue  <commit-queue@webkit.org>
3559
3560         Unreviewed, rolling out r169939.
3561         https://bugs.webkit.org/show_bug.cgi?id=133878
3562
3563         This patch raises assertions on mac (Requested by fredw on
3564         #webkit).
3565
3566         Reverted changeset:
3567
3568         "Draw radicals with glyphs for better rendering"
3569         https://bugs.webkit.org/show_bug.cgi?id=119038
3570         http://trac.webkit.org/changeset/169939
3571
3572 2014-06-13  Anders Carlsson  <andersca@apple.com>
3573
3574         Add a HTTPHeaderMap::set overload that takes a HTTPHeaderName
3575         https://bugs.webkit.org/show_bug.cgi?id=133874
3576
3577         Reviewed by Tim Horton.
3578
3579         * platform/network/HTTPHeaderMap.cpp:
3580         (WebCore::HTTPHeaderMap::set):
3581         * platform/network/HTTPHeaderMap.h:
3582         * platform/network/cf/ResourceRequestCFNet.cpp:
3583         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3584         * platform/network/mac/ResourceRequestMac.mm:
3585         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3586         * xml/XMLHttpRequest.cpp:
3587         (WebCore::XMLHttpRequest::send):
3588
3589 2014-06-13  Anders Carlsson  <andersca@apple.com>
3590
3591         Add a HTTPHeaderMap::find overload that takes a HTTPHeaderName
3592         https://bugs.webkit.org/show_bug.cgi?id=133872
3593
3594         Reviewed by Andreas Kling.
3595
3596         * loader/DocumentLoader.cpp:
3597         (WebCore::DocumentLoader::responseReceived):
3598         * platform/network/HTTPHeaderMap.cpp:
3599         (WebCore::HTTPHeaderMap::get):
3600         (WebCore::HTTPHeaderMap::find):
3601         * platform/network/HTTPHeaderMap.h:
3602         * platform/network/HTTPHeaderNames.in:
3603
3604 2014-06-13  Frédéric Wang  <fred.wang@free.fr>
3605
3606         Draw radicals with glyphs for better rendering
3607         https://bugs.webkit.org/show_bug.cgi?id=119038
3608
3609         Reviewed by Chris Fleizach.
3610
3611         We rewrite RenderMathMLRoot in order to fix bugs with SVG transforms and dynamic modification of children and allow drawing with an OpenType MATH table.
3612         The drawing of the radical sign (without the top bar) is now moved to a RenderMathMLRadicalOperator class inheriting from RenderMathMLOperator.
3613         This class fallbacks to the original drawing with graphic primitives if an OpenType MATH table is not available.
3614
3615         Tests: mathml/opentype/roots-LatinModern.html
3616                mathml/presentation/mroot-transform.html
3617
3618         * CMakeLists.txt: add files to build system.
3619         * WebCore.vcxproj/WebCore.vcxproj: ditto.
3620         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
3621         * WebCore.xcodeproj/project.pbxproj: ditto
3622         * css/mathml.css: remove rules for msqrt/mroot. The "script level" in mroot is not incremented by 2 as specified in the spec.
3623         (math, mrow, mfenced, merror, mphantom, mstyle, menclose):
3624         (mroot > *:last-child):
3625         (math, mrow, mfenced, msqrt, mroot, merror, mphantom, mstyle, menclose): Deleted.
3626         (msqrt > *): Deleted.
3627         (mroot): Deleted. This rule was causing bug 126516.
3628         (mroot > * + *): Deleted.
3629         * rendering/RenderObject.h: Add two new isRenderMathML* functions for dynamic casting.
3630         (WebCore::RenderObject::isRenderMathMLRadicalOperator):
3631         (WebCore::RenderObject::isRenderMathMLRootWrapper):
3632         * rendering/mathml/RenderMathMLOperator.cpp: Accept a set of operator dictionary flags, all disabled by default. This is to allow anonymous radicas, which don't have any flag.
3633         isFencedOperator() is now replaced with the more general isAnonymous() since we allow anonymous radical operator fors msqrt/mroot.
3634         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3635         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
3636         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
3637         (WebCore::RenderMathMLOperator::SetOperatorProperties):
3638         (WebCore::RenderMathMLOperator::updateTokenContent):
3639         * rendering/mathml/RenderMathMLOperator.h: Allow class to be overriden, redefine the anonymous constructor, remove isFencedOperator().
3640         * rendering/mathml/RenderMathMLRadicalOperator.cpp: Added.
3641         (WebCore::RenderMathMLRadicalOperator::RenderMathMLRadicalOperator):
3642         (WebCore::RenderMathMLRadicalOperator::stretchTo):
3643         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties):
3644         (WebCore::RenderMathMLRadicalOperator::computePreferredLogicalWidths):
3645         (WebCore::RenderMathMLRadicalOperator::computeLogicalHeight):
3646         (WebCore::RenderMathMLRadicalOperator::paint):
3647         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError):
3648         * rendering/mathml/RenderMathMLRadicalOperator.h: Added.
3649         * rendering/mathml/RenderMathMLRoot.cpp: Rewritten. Some parts to use graphic primitives are moved to RenderMathMLRadicalOperator.cpp.
3650         (WebCore::RenderMathMLRoot::RenderMathMLRoot):
3651         (WebCore::RenderMathMLRoot::baseWrapper):
3652         (WebCore::RenderMathMLRoot::radicalWrapper):
3653         (WebCore::RenderMathMLRoot::indexWrapper):
3654         (WebCore::RenderMathMLRoot::radicalOperator):
3655         (WebCore::RenderMathMLRoot::restructureWrappers):
3656         (WebCore::RenderMathMLRoot::addChild):
3657         (WebCore::RenderMathMLRoot::styleDidChange):
3658         (WebCore::RenderMathMLRoot::updateFromElement):
3659         (WebCore::RenderMathMLRoot::updateStyle):
3660         (WebCore::RenderMathMLRoot::firstLineBaseline):
3661         (WebCore::RenderMathMLRoot::layout):
3662         (WebCore::RenderMathMLRoot::paint):
3663         (WebCore::RenderMathMLRootWrapper::createAnonymousWrapper):
3664         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
3665         (WebCore::RenderMathMLRootWrapper::removeChild):
3666         (WebCore::RenderMathMLRoot::paddingTop): Deleted.
3667         (WebCore::RenderMathMLRoot::paddingBottom): Deleted.
3668         (WebCore::RenderMathMLRoot::paddingLeft): Deleted.
3669         (WebCore::RenderMathMLRoot::paddingRight): Deleted.
3670         (WebCore::RenderMathMLRoot::paddingBefore): Deleted.
3671         (WebCore::RenderMathMLRoot::paddingAfter): Deleted.
3672         (WebCore::RenderMathMLRoot::paddingStart): Deleted.
3673         (WebCore::RenderMathMLRoot::paddingEnd): Deleted.
3674         (WebCore::RenderMathMLRoot::index): Deleted.
3675         * rendering/mathml/RenderMathMLRoot.h: Rewritten.
3676         (WebCore::RenderMathMLRootWrapper::RenderMathMLRootWrapper):
3677
3678 2014-06-12  Anders Carlsson  <andersca@apple.com>
3679
3680         Add overloads of HTTPHeaderMap::find and remove that take enums
3681         https://bugs.webkit.org/show_bug.cgi?id=133823
3682
3683         Reviewed by Sam Weinig.
3684
3685         * WebCore.exp.in:
3686         Update symbols.
3687
3688         * WebCore.xcodeproj/project.pbxproj:
3689         Make HTTPHeaderNames.h private.
3690
3691         * platform/network/HTTPHeaderMap.cpp:
3692         (WebCore::HTTPHeaderMap::contains):
3693         Convert the enum value to a string and call the contains overload that takes a string.
3694
3695         (WebCore::HTTPHeaderMap::remove):
3696         Convert the enum value to a string and call the remove overload that takes a string.
3697
3698         * platform/network/HTTPHeaderMap.h:
3699         Add new overloads taking HTTPHeaderName and mark the versions taking string literals as deleted.
3700
3701         * platform/network/HTTPHeaderNames.in:
3702         Add new header names.
3703
3704         * platform/network/ResourceRequestBase.cpp:
3705         (WebCore::ResourceRequestBase::clearHTTPAuthorization):
3706         (WebCore::ResourceRequestBase::clearHTTPContentType):
3707         (WebCore::ResourceRequestBase::clearHTTPReferrer):
3708         (WebCore::ResourceRequestBase::clearHTTPOrigin):
3709         (WebCore::ResourceRequestBase::clearHTTPUserAgent):
3710         (WebCore::ResourceRequestBase::clearHTTPAccept):
3711         Update functions to use HTTPHeaderName enums.
3712
3713         (WebCore::ResourceRequestBase::isConditional):
3714         (WebCore::ResourceRequestBase::makeUnconditional):
3715         Simplify these.
3716
3717 2014-06-13  Jarek Czekalski  <jarekczek@poczta.onet.pl>
3718
3719         [ATK] Fix text inside "span" block in "a" block was not accessible.
3720         https://bugs.webkit.org/show_bug.cgi?id=132349
3721
3722         Reviewed by Mario Sanchez Prada.
3723
3724         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: Add link role
3725           to the list of roles whose objects always expose atk_text interface.
3726
3727 2014-06-13  Alberto Garcia  <berto@igalia.com>
3728
3729         [GTK] GLContextEGL.cpp: conflicting declaration 'typedef ptrdiff_t GLintptr'
3730         https://bugs.webkit.org/show_bug.cgi?id=133550
3731
3732         Reviewed by Gustavo Noronha Silva.
3733
3734         Cairo includes some definitions from GLX that conflict with the
3735         ones provided by our GLES2 headers (GLintptr, GLsizeiptr).
3736
3737         Since GLContextEGL doesn't use any GLX functions we can safely
3738         disable the inclusion of those functions in that source file.
3739
3740         * platform/graphics/egl/GLContextEGL.cpp:
3741
3742 2014-06-13  Manuel Rego Casasnovas  <rego@igalia.com>
3743
3744         [CSS Grid Layout] Introduce an explicit type for resolved grid positions
3745         https://bugs.webkit.org/show_bug.cgi?id=131732
3746
3747         Reviewed by Sergio Villar Senin.
3748
3749         We were using simple size_t integers to represent resolved grid
3750         positions in our internal data structures. This change allows us to
3751         clarify the code, avoid potential off by one mistakes, and move the
3752         resolving code to a central place.
3753
3754         A new class GridResolvedPosition has been created and the related
3755         methods have been moved there from RenderGrid.
3756         GridSpan is now defined by two GridResolvedPosition, so all the code
3757         using it has been modified to adapt it to GridResolvedPosition.
3758
3759         No new tests as it is already covered by current tests
3760         (fast/css-grid-layout/).
3761
3762         * CMakeLists.txt:
3763         * WebCore.vcxproj/WebCore.vcxproj:
3764         * WebCore.vcxproj/WebCore.vcxproj.filters:
3765         * WebCore.xcodeproj/project.pbxproj:
3766         * css/CSSGridTemplateAreasValue.cpp:
3767         (WebCore::stringForPosition):
3768         * css/CSSParser.cpp:
3769         (WebCore::CSSParser::parseGridTemplateAreasRow):
3770         * css/StyleResolver.cpp:
3771         (WebCore::createImplicitNamedGridLinesFromGridArea):
3772         * rendering/RenderGrid.cpp:
3773         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
3774         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
3775         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3776         (WebCore::RenderGrid::insertItemIntoGrid):
3777         (WebCore::RenderGrid::placeItemsOnGrid):
3778         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
3779         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
3780         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
3781         (WebCore::RenderGrid::autoPlacementMajorAxisDirection):
3782         (WebCore::RenderGrid::autoPlacementMinorAxisDirection):
3783         (WebCore::RenderGrid::gridAreaBreadthForChild):
3784         (WebCore::RenderGrid::findChildLogicalPosition):
3785         (WebCore::RenderGrid::explicitGridColumnCount): Deleted.
3786         (WebCore::RenderGrid::explicitGridRowCount): Deleted.
3787         (WebCore::isColumnSide): Deleted.
3788         (WebCore::isStartSide): Deleted.
3789         (WebCore::RenderGrid::explicitGridSizeForSide): Deleted.
3790         (WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Deleted.
3791         (WebCore::gridLinesForSide): Deleted.
3792         (WebCore::implicitNamedGridLineForSide): Deleted.
3793         (WebCore::isNonExistentNamedLineOrArea): Deleted.
3794         (WebCore::RenderGrid::adjustGridPositionsFromStyle): Deleted.
3795         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Deleted.
3796         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Deleted.
3797         (WebCore::RenderGrid::resolveGridPositionFromStyle): Deleted.
3798         (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition): Deleted.
3799         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
3800         (WebCore::firstNamedGridLineBeforePosition): Deleted.
3801         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
3802         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
3803         * rendering/RenderGrid.h:
3804         * rendering/style/GridCoordinate.h:
3805         (WebCore::GridSpan::GridSpan):
3806         (WebCore::GridSpan::operator==):
3807         * rendering/style/GridPosition.h:
3808         (WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
3809         (WebCore::GridPosition::adjustGridPositionForSide): Deleted.
3810         * rendering/style/GridResolvedPosition.cpp: Added.
3811         (WebCore::isColumnSide):
3812         (WebCore::isStartSide):
3813         (WebCore::explicitGridSizeForSide):
3814         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
3815         (WebCore::gridLinesForSide):
3816         (WebCore::implicitNamedGridLineForSide):
3817         (WebCore::isNonExistentNamedLineOrArea):
3818         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle):
3819         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
3820         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
3821         (WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
3822         (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
3823         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition):
3824         (WebCore::firstNamedGridLineBeforePosition):
3825         (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
3826         (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
3827         * rendering/style/GridResolvedPosition.h: Added.
3828         (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
3829         (WebCore::GridResolvedPosition::adjustGridPositionForSide):
3830         (WebCore::GridResolvedPosition::GridResolvedPosition):
3831         (WebCore::GridResolvedPosition::operator++):
3832         (WebCore::GridResolvedPosition::operator==):
3833         (WebCore::GridResolvedPosition::operator<):
3834         (WebCore::GridResolvedPosition::operator>):
3835         (WebCore::GridResolvedPosition::operator<=):
3836         (WebCore::GridResolvedPosition::operator>=):
3837         (WebCore::GridResolvedPosition::toInt):
3838         (WebCore::GridResolvedPosition::next):
3839
3840 2014-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3841
3842         [GTK] Remove all deprecated API from GObject DOM bindings
3843         https://bugs.webkit.org/show_bug.cgi?id=133728
3844
3845         Reviewed by Martin Robinson.
3846
3847         Remove all deprecated symbols from the GObject DOM bindings,
3848         keeping the deprecation infraestructure for future API breaks.
3849
3850         * PlatformGTK.cmake: Remove WebKitDOMDeprecated files from the
3851         build.
3852         * bindings/gobject/WebKitDOMDeprecated.cpp: Removed.
3853         * bindings/gobject/WebKitDOMDeprecated.h: Removed.
3854         * bindings/gobject/WebKitDOMDeprecated.symbols: Removed.
3855         * bindings/gobject/webkitdom.symbols: Updated to the current API.
3856         * bindings/scripts/CodeGeneratorGObject.pm:
3857         (SkipFunction): Remove exceptions for deprecated API.
3858         (GetFunctionDeprecationInformation): Ditto.
3859         (GetEffectiveFunctionName): Ditto.
3860         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
3861         (webkit_dom_test_event_target_dispatch_event): Deleted.
3862         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
3863         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols:
3864         * dom/Element.idl: Remove GObject exception.
3865
3866 2014-06-12  Zalan Bujtas  <zalan@apple.com>
3867
3868         Subpixel rendering: Make <input type=> and <button> elements' decoration subpixel aware.
3869         https://bugs.webkit.org/show_bug.cgi?id=133812
3870         <rdar://problem/17286309>
3871
3872         Reviewed by Simon Fraser.
3873
3874         Enable <input type=> and <button> decoration painting on subpixel positions.
3875         The theme size is still integral, but its position is snapped to device pixels.
3876         Theme's label, the InlineTextBox is already subpixel position aware.
3877         webkit.org/b/132005 tracks the rest of the themes.
3878
3879         Not testable.
3880
3881         * accessibility/AccessibilityObject.cpp:
3882         (WebCore::AccessibilityObject::boundingBoxForQuads): Keep integral snapping for now.
3883         * platform/Theme.h:
3884         (WebCore::Theme::paint):
3885         (WebCore::Theme::inflateControlPaintRect):
3886         * platform/mac/ThemeMac.h:
3887         * platform/mac/ThemeMac.mm:
3888         (WebCore::inflateRect):
3889         (WebCore::configureToggleButton):
3890         (WebCore::sharedRadioCell):
3891         (WebCore::sharedCheckboxCell):
3892         (WebCore::paintToggleButton):
3893         (WebCore::setUpButtonCell):
3894         (WebCore::button):
3895         (WebCore::paintButton):
3896         (WebCore::paintStepper):
3897         (WebCore::ThemeMac::inflateControlPaintRect):
3898         (WebCore::ThemeMac::paint):
3899         * rendering/RenderBlock.cpp:
3900         (WebCore::RenderBlock::addVisualOverflowFromTheme): Keep integral snapping for now.
3901         * rendering/RenderFlowThread.cpp:
3902         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme): Keep integral snapping for now.
3903         * rendering/RenderTheme.cpp:
3904         (WebCore::RenderTheme::paint):
3905         (WebCore::RenderTheme::adjustRepaintRect):
3906         * rendering/RenderTheme.h:
3907         * rendering/RenderThemeMac.h:
3908         * rendering/RenderThemeMac.mm:
3909         (WebCore::RenderThemeMac::adjustRepaintRect):
3910
3911 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3912
3913         [Win] Avoid fork bomb during build
3914         https://bugs.webkit.org/show_bug.cgi?id=133837
3915         <rdar://problem/17296034>
3916
3917         Reviewed by Tim Horton.
3918
3919         * WebCore.vcxproj/build-generated-files.sh: Use a reasonable
3920         default value when the 'num-cpus' script is not available.
3921
3922 2014-06-12  Gavin Barraclough  <barraclough@apple.com>
3923
3924         Add support for thread/WorkQueue QoS
3925         https://bugs.webkit.org/show_bug.cgi?id=130688
3926
3927         Reviewed by Anders Carlson & Simon Fraser.
3928
3929         WebCore's ScrollingThread should be UserInteractive.
3930
3931         * page/scrolling/ScrollingThread.cpp:
3932         (WebCore::ScrollingThread::threadCallback):
3933             - ScrollingThread should be UserInteractive
3934
3935 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3936
3937         [Mac] Build fix after r169919.
3938
3939         * WebCore.xcodeproj/project.pbxproj: The 'TileController.h' file must be a private header.
3940
3941 2014-06-12  Andy Estes  <aestes@apple.com>
3942
3943         [Mac] Speculative build fix after r169921.
3944
3945         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3946         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
3947
3948 2014-06-12  Jer Noble  <jer.noble@apple.com>
3949
3950         [MSE][Mac] Stop observing the sample buffer renderers when destroying them.
3951         https://bugs.webkit.org/show_bug.cgi?id=133831
3952
3953         Reviewed by Beth Dakin.
3954
3955         Release our retain on our AVSampleBufferDisplayLayer and AVSampleBufferAudioRenderer by stopping
3956         our observation of its properties when removing them from the SourceBufferPrivateAVFObjC object.
3957
3958         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3959         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers):
3960
3961 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
3962
3963         Correct file locations after r169914. These should have been
3964         in platform/graphics/ca.
3965
3966         Rubberstamped by Tim Horton.
3967
3968         * WebCore.xcodeproj/project.pbxproj:
3969         * platform/graphics/ca/TileController.cpp: Copied from platform/graphics/ca/mac/TileController.cpp.
3970         * platform/graphics/ca/TileController.h: Copied from platform/graphics/ca/mac/TileController.h.
3971         * platform/graphics/ca/TileGrid.cpp: Copied from platform/graphics/ca/mac/TileGrid.cpp.
3972         * platform/graphics/ca/TileGrid.h: Copied from platform/graphics/ca/mac/TileGrid.h.
3973         * platform/graphics/ca/mac/TileController.cpp: Removed.
3974         * platform/graphics/ca/mac/TileController.h: Removed.
3975         * platform/graphics/ca/mac/TileGrid.cpp: Removed.
3976         * platform/graphics/ca/mac/TileGrid.h: Removed.
3977
3978 2014-06-12  Andy Estes  <aestes@apple.com>
3979
3980         Fix the build after r169913.
3981
3982         * loader/HistoryController.cpp:
3983         (WebCore::HistoryController::restoreScrollPositionAndViewState):
3984
3985 2014-06-12  Alex Christensen  <achristensen@webkit.org>
3986
3987         Collect correct web timing data from CFNetwork.
3988         https://bugs.webkit.org/show_bug.cgi?id=133824
3989         <rdar://problem/17273654>
3990
3991         Reviewed by Simon Fraser.
3992
3993         Covered by existing web timing tests.
3994
3995         * platform/network/mac/ResourceHandleMac.mm:
3996         (WebCore::ResourceHandle::getConnectionTimingData):
3997         Use _kCFNTimingDataFetchStart as the reference start time key.
3998
3999 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
4000
4001         Convert TileController and TileGrid from ObjC to C++
4002         https://bugs.webkit.org/show_bug.cgi?id=133819
4003         <rdar://problem/17291841>
4004
4005         Reviewed by Tim Horton.
4006
4007         Convert TileGrid.mm and TileController.mm into C++ implementations. This required creating a 'frameForLayer'
4008         wrapper to call the 'frame' method of the CALayer object.
4009
4010         * WebCore.xcodeproj/project.pbxproj:
4011         * platform/graphics/ca/mac/TileController.cpp: Copied from platform/graphics/ca/mac/TileController.mm.
4012         (WebCore::TileController::blankPixelCountForTiles):
4013         * platform/graphics/ca/mac/TileController.mm: Removed.