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