Adjust naming of action menu SPI
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-01-19  Timothy Horton  <timothy_horton@apple.com>
2
3         Adjust naming of action menu SPI
4         https://bugs.webkit.org/show_bug.cgi?id=140644
5         <rdar://problem/19448129>
6
7         Reviewed by Brian Weinstein.
8
9         * platform/spi/mac/NSViewSPI.h:
10         Add an underscore.
11
12 2015-01-19  Dhi Aurrahman  <diorahman@rockybars.com>
13
14         Canonicalization of :lang() should preserve the :lang()'s arguments representations
15         https://bugs.webkit.org/show_bug.cgi?id=139928
16
17         Reviewed by Benjamin Poulain.
18
19         Preserve the representation of IDENT and STRING when serializing the
20         :lang(). For example, :lang(foo,"bar", baz) should be serialize as
21         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
22     
23         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
24         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
25         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
26         respectively, since those methods are being exclusively used in respect
27         with :lang().
28
29         Update the test of serializing :lang() with IDENT and STRING arguments.
30
31         * css/CSSGrammar.y.in:
32         * css/CSSParserValues.cpp:
33         (WebCore::CSSParserSelector::setLangArgumentList):
34         (WebCore::CSSParserSelector::setArgumentList): Deleted.
35         * css/CSSParserValues.h:
36         (WebCore::CSSParserString::tokenType):
37         (WebCore::CSSParserString::setTokenType):
38         * css/CSSSelector.cpp:
39         (WebCore::appendLangArgumentList):
40         (WebCore::CSSSelector::selectorText):
41         (WebCore::CSSSelector::setLangArgumentList):
42         (WebCore::appendArgumentList): Deleted.
43         (WebCore::CSSSelector::setArgumentList): Deleted.
44         * css/CSSSelector.h:
45         (WebCore::CSSSelector::langArgumentList):
46         (WebCore::CSSSelector::argumentList): Deleted.
47         * css/SelectorChecker.cpp:
48         (WebCore::SelectorChecker::checkOne):
49         * css/SelectorCheckerTestFunctions.h:
50         (WebCore::matchesLangPseudoClass):
51
52 2015-01-16  Roger Fong  <roger_fong@apple.com>
53
54         WebGL2: Support webgl2 context creation.
55         https://bugs.webkit.org/show_bug.cgi?id=126408
56         <rdar://problem/15002170>
57
58         Reviewed by Dean Jackson.
59
60         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
61
62         Create a WebGLRenderingContextBase class that extends to a WebGLRenderingContext and WebGL2RenderingContext.
63         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
64         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
65
66         * CMakeLists.txt:
67         * DerivedSources.cpp:
68         * DerivedSources.make:
69         * WebCore.vcxproj/WebCore.vcxproj:
70         * WebCore.vcxproj/WebCore.vcxproj.filters:
71         * WebCore.xcodeproj/project.pbxproj:
72         * bindings/js/JSBindingsAllInOne.cpp:
73         * bindings/js/JSCanvasRenderingContextCustom.cpp:
74         (WebCore::toJS):
75         * bindings/js/JSDocumentCustom.cpp:
76         * bindings/js/JSHTMLCanvasElementCustom.cpp:
77         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
78         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
79         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
80         * bindings/js/JSWebGLRenderingContextCustom.cpp: Move code to JSWebGLRenderingContextBaseCustom.cpp.
81         * bindings/scripts/CodeGeneratorJS.pm:
82         (GenerateImplementation):
83         * html/HTMLCanvasElement.cpp:
84         (WebCore::HTMLCanvasElement::getContext):
85         (WebCore::HTMLCanvasElement::reset):
86         (WebCore::HTMLCanvasElement::paint):
87         (WebCore::HTMLCanvasElement::getImageData):
88         * html/canvas/ANGLEInstancedArrays.cpp:
89         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
90         (WebCore::ANGLEInstancedArrays::supported):
91         * html/canvas/ANGLEInstancedArrays.h:
92         * html/canvas/CanvasRenderingContext.h:
93         (WebCore::CanvasRenderingContext::isWebGL1):
94         (WebCore::CanvasRenderingContext::isWebGL2):
95         (WebCore::CanvasRenderingContext::is3d):
96         * html/canvas/EXTBlendMinMax.cpp:
97         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
98         * html/canvas/EXTBlendMinMax.h:
99         * html/canvas/EXTFragDepth.cpp:
100         (WebCore::EXTFragDepth::EXTFragDepth):
101         * html/canvas/EXTFragDepth.h:
102         * html/canvas/EXTShaderTextureLOD.cpp:
103         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
104         * html/canvas/EXTShaderTextureLOD.h:
105         * html/canvas/EXTTextureFilterAnisotropic.cpp:
106         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
107         * html/canvas/EXTTextureFilterAnisotropic.h:
108         * html/canvas/EXTsRGB.cpp:
109         (WebCore::EXTsRGB::EXTsRGB):
110         * html/canvas/EXTsRGB.h:
111         * html/canvas/OESElementIndexUint.cpp:
112         (WebCore::OESElementIndexUint::OESElementIndexUint):
113         * html/canvas/OESElementIndexUint.h:
114         * html/canvas/OESStandardDerivatives.cpp:
115         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
116         * html/canvas/OESStandardDerivatives.h:
117         * html/canvas/OESTextureFloat.cpp:
118         (WebCore::OESTextureFloat::OESTextureFloat):
119         * html/canvas/OESTextureFloat.h:
120         * html/canvas/OESTextureFloatLinear.cpp:
121         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
122         * html/canvas/OESTextureFloatLinear.h:
123         * html/canvas/OESTextureHalfFloat.cpp:
124         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
125         * html/canvas/OESTextureHalfFloat.h:
126         * html/canvas/OESTextureHalfFloatLinear.cpp:
127         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
128         * html/canvas/OESTextureHalfFloatLinear.h:
129         * html/canvas/OESVertexArrayObject.cpp:
130         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
131         * html/canvas/OESVertexArrayObject.h:
132         * html/canvas/WebGL2RenderingContext.cpp: Added.
133         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
134         * html/canvas/WebGL2RenderingContext.h: Added.
135         * html/canvas/WebGL2RenderingContext.idl: Added.
136         * html/canvas/WebGLBuffer.cpp:
137         (WebCore::WebGLBuffer::create):
138         (WebCore::WebGLBuffer::WebGLBuffer):
139         * html/canvas/WebGLBuffer.h:
140         * html/canvas/WebGLCompressedTextureATC.cpp:
141         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
142         (WebCore::WebGLCompressedTextureATC::supported):
143         * html/canvas/WebGLCompressedTextureATC.h:
144         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
145         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
146         (WebCore::WebGLCompressedTexturePVRTC::supported):
147         * html/canvas/WebGLCompressedTexturePVRTC.h:
148         * html/canvas/WebGLCompressedTextureS3TC.cpp:
149         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
150         (WebCore::WebGLCompressedTextureS3TC::supported):
151         * html/canvas/WebGLCompressedTextureS3TC.h:
152         * html/canvas/WebGLContextGroup.cpp:
153         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
154         (WebCore::WebGLContextGroup::addContext):
155         (WebCore::WebGLContextGroup::removeContext):
156         (WebCore::WebGLContextGroup::loseContextGroup):
157         * html/canvas/WebGLContextGroup.h:
158         * html/canvas/WebGLContextObject.cpp:
159         (WebCore::WebGLContextObject::WebGLContextObject):
160         * html/canvas/WebGLContextObject.h:
161         (WebCore::WebGLContextObject::context):
162         * html/canvas/WebGLDebugRendererInfo.cpp:
163         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
164         * html/canvas/WebGLDebugRendererInfo.h:
165         * html/canvas/WebGLDebugShaders.cpp:
166         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
167         * html/canvas/WebGLDebugShaders.h:
168         * html/canvas/WebGLDepthTexture.cpp:
169         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
170         * html/canvas/WebGLDepthTexture.h:
171         * html/canvas/WebGLDrawBuffers.cpp:
172         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
173         (WebCore::WebGLDrawBuffers::supported):
174         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
175         * html/canvas/WebGLDrawBuffers.h:
176         * html/canvas/WebGLExtension.cpp:
177         (WebCore::WebGLExtension::WebGLExtension):
178         * html/canvas/WebGLExtension.h:
179         (WebCore::WebGLExtension::context):
180         * html/canvas/WebGLFramebuffer.cpp:
181         (WebCore::WebGLFramebuffer::create):
182         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
183         * html/canvas/WebGLFramebuffer.h:
184         * html/canvas/WebGLLoseContext.cpp:
185         (WebCore::WebGLLoseContext::WebGLLoseContext):
186         (WebCore::WebGLLoseContext::loseContext):
187         * html/canvas/WebGLLoseContext.h:
188         * html/canvas/WebGLObject.cpp:
189         (WebCore::WebGLObject::WebGLObject):
190         * html/canvas/WebGLObject.h:
191         * html/canvas/WebGLProgram.cpp:
192         (WebCore::WebGLProgram::create):
193         (WebCore::WebGLProgram::WebGLProgram):
194         * html/canvas/WebGLProgram.h:
195         * html/canvas/WebGLRenderbuffer.cpp:
196         (WebCore::WebGLRenderbuffer::create):
197         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
198         * html/canvas/WebGLRenderbuffer.h:
199         * html/canvas/WebGLRenderingContext.cpp: Move implementation to WebGLRenderingContextBase.cpp.
200         * html/canvas/WebGLRenderingContext.h:  Move implementation to WebGLRenderingContextBase.h.
201         * html/canvas/WebGLRenderingContext.idl:  Move implementation to WebGLRenderingContextBase.idl.
202         * html/canvas/WebGLRenderingContextBase.cpp: Added.
203         * html/canvas/WebGLRenderingContextBase.h: Added.
204         * html/canvas/WebGLRenderingContextBase.idl: Added.
205         * html/canvas/WebGLShader.cpp:
206         (WebCore::WebGLShader::create):
207         (WebCore::WebGLShader::WebGLShader):
208         * html/canvas/WebGLShader.h:
209         * html/canvas/WebGLSharedObject.cpp:
210         (WebCore::WebGLSharedObject::WebGLSharedObject):
211         * html/canvas/WebGLSharedObject.h:
212         * html/canvas/WebGLTexture.cpp:
213         (WebCore::WebGLTexture::create):
214         (WebCore::WebGLTexture::WebGLTexture):
215         * html/canvas/WebGLTexture.h:
216         * html/canvas/WebGLVertexArrayObjectOES.cpp:
217         (WebCore::WebGLVertexArrayObjectOES::create):
218         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
219         * html/canvas/WebGLVertexArrayObjectOES.h:
220
221 2015-01-19  Antti Koivisto  <antti@apple.com>
222
223         REGRESSION(r178250): ~2% PLT regression
224         https://bugs.webkit.org/show_bug.cgi?id=140640
225
226         Reviewed by Andreas Kling.
227
228         * platform/graphics/FontCache.cpp:
229
230         The patch accidentally contained a change to reduce the size of the cache (to verify that purgin works).
231         Restore it back to the original value.
232
233 2015-01-19  peavo@outlook.com  <peavo@outlook.com>
234
235         [WinCairo][Video] Windows Media Foundation implementation is not completed.
236         https://bugs.webkit.org/show_bug.cgi?id=140337
237
238         Reviewed by Alex Christensen.
239
240         This patch aims to complete some of the methods which are not implemented.
241         Currently, only MP4 is supported.
242         Video is rendered in a child window of the main window.
243         We should eventually render the video directly in the main window,
244         by reading and painting individual video frames from the stream.
245
246         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
247         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
248         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
249         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
250         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
251         (WebCore::MediaPlayerPrivateMediaFoundation::load):
252         (WebCore::MediaPlayerPrivateMediaFoundation::play):
253         (WebCore::MediaPlayerPrivateMediaFoundation::pause):
254         (WebCore::MediaPlayerPrivateMediaFoundation::naturalSize):
255         (WebCore::MediaPlayerPrivateMediaFoundation::hasVideo):
256         (WebCore::MediaPlayerPrivateMediaFoundation::hasAudio):
257         (WebCore::MediaPlayerPrivateMediaFoundation::setVisible):
258         (WebCore::MediaPlayerPrivateMediaFoundation::paused):
259         (WebCore::MediaPlayerPrivateMediaFoundation::readyState):
260         (WebCore::MediaPlayerPrivateMediaFoundation::didLoadingProgress):
261         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
262         (WebCore::MediaPlayerPrivateMediaFoundation::paint):
263         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
264         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
265         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
266         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
267         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
268         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
269         (WebCore::MediaPlayerPrivateMediaFoundation::addBranchToPartialTopology):
270         (WebCore::MediaPlayerPrivateMediaFoundation::VideoViewWndProc):
271         (WebCore::MediaPlayerPrivateMediaFoundation::registerVideoWindowClass):
272         (WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
273         (WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
274         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
275         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
276         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource):
277         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
278         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
279         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
280         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::QueryInterface):
281         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AddRef):
282         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Release):
283         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::GetParameters):
284         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
285         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
286
287 2015-01-19  Brian J. Burg  <burg@cs.washington.edu>
288
289         Web Replay: convert to is<T> and downcast<T> for decoding replay inputs
290         https://bugs.webkit.org/show_bug.cgi?id=140512
291
292         Reviewed by Chris Dumez.
293
294         No new tests, no behavior changed.
295
296         * replay/EventLoopInput.h: Make overridden methods public.
297         * replay/MemoizedDOMResult.h: Add type trait specialization here. It is
298         special-cased because the input type parameter doesn't work with macros.
299         * replay/SerializationMethods.cpp:
300         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
301         Use is() and downcast() when dispatching to encoders based on type.
302
303 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
304
305         Replace use of WTF::bind() in MemoryPressureHandlerLinux.cpp with a C++ lambda
306         https://bugs.webkit.org/show_bug.cgi?id=140614
307
308         Reviewed by Carlos Garcia Campos.
309
310         Use a C++ lambda instead of WTF::bind() in the MemoryPressureHandler
311         implementation for Linux.
312
313         * platform/linux/MemoryPressureHandlerLinux.cpp:
314         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
315
316 2015-01-19  Zan Dobersek  <zdobersek@igalia.com>
317
318         Replace uses of WTF::bind() in MockMediaPlayerMediaSource with C++ lambdas
319         https://bugs.webkit.org/show_bug.cgi?id=140612
320
321         Reviewed by Philippe Normand.
322
323         Use C++ lambdas in place of WTF::bind() in the MockMediaPlayerMediaSource class.
324
325         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
326         (WebCore::MockMediaPlayerMediaSource::play):
327         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
328         (WebCore::MockMediaPlayerMediaSource::seekCompleted):
329
330 2015-01-19  Commit Queue  <commit-queue@webkit.org>
331
332         Unreviewed, rolling out r178653.
333         https://bugs.webkit.org/show_bug.cgi?id=140634
334
335         Broke multiple SVG tests on Mountain Lion (Requested by ap on
336         #webkit).
337
338         Reverted changeset:
339
340         "[SVG -> OTF Converter] Flip the switch on"
341         https://bugs.webkit.org/show_bug.cgi?id=140592
342         http://trac.webkit.org/changeset/178653
343
344 2015-01-19  Brent Fulgham  <bfulgham@apple.com>
345
346         Layers need to be already updated before we call adjustViewSize
347         https://bugs.webkit.org/show_bug.cgi?id=135514
348
349         Reviewed by Simon Fraser.
350
351         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
352
353         Defer painting operations until we have finished layout. This
354         has a couple of benefits:
355         (1) We do not attempt to modify render layers during layout.
356         (2) In WK1 we do not attempt to paint during layout.
357
358         Add a new virtual predicate to ScrollView indicating when we are in
359         layout so that calls to setContentsSize do not attempt
360         to adjust scrollbars.
361
362         Modify FrameView to set its ScrollView state to block paint
363         operations during layout. Also add a post-layout handler to
364         complete the scrollbar updates after layout is finished.
365
366         * WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
367         * page/FrameView.cpp:
368         (WebCore::FrameView::layout):
369         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
370         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed).
371         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed)
372         (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
373         * page/FrameView.h:
374         * platform/ScrollView.cpp:
375         (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer
376         painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not.
377         (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added.
378         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
379         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
380         the scroll delta and apply it after the layout is complete.
381         (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method
382         so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
383         * platform/ScrollView.h:
384         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
385
386 2015-01-16  Ada Chan  <adachan@apple.com>
387
388         HTMLMediaElement::isPlayingAudio() should return false if the element is explicitly muted by script.
389         https://bugs.webkit.org/show_bug.cgi?id=140524
390
391         Reviewed by Andreas Kling.
392
393         Test: media/muted-video-is-playing-audio.html
394
395         * html/HTMLMediaElement.cpp:
396         (WebCore::HTMLMediaElement::setMuted):
397         Call Document::updateIsPlayingAudio() to recalculate the overall audio playing state.
398         (WebCore::HTMLMediaElement::isPlayingAudio):
399         HTMLMediaElement::isPlayingAudio() should return false if the media element is explicitly muted.
400
401 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
402
403         [SVG -> OTF Converter] Flip the switch on
404         https://bugs.webkit.org/show_bug.cgi?id=140592
405
406         Reviewed by Antti Koivisto.
407
408         * Configurations/FeatureDefines.xcconfig:
409
410 2015-01-16  Alexey Proskuryakov  <ap@apple.com>
411
412         Console log sometimes prefixed with line number
413         https://bugs.webkit.org/show_bug.cgi?id=105280
414
415         Reviewed by Darin Adler.
416
417         Improve the logic for determining whether a console message should be associated
418         with a source code location.
419
420         * dom/ScriptableDocumentParser.h:
421         * html/parser/HTMLDocumentParser.cpp:
422         (WebCore::HTMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
423         * html/parser/HTMLDocumentParser.h:
424         * page/PageConsoleClient.cpp:
425         (WebCore::getParserLocationForConsoleMessage):
426         (WebCore::PageConsoleClient::addMessage):
427         * xml/parser/XMLDocumentParser.cpp:
428         (WebCore::XMLDocumentParser::pauseParsing):
429         * xml/parser/XMLDocumentParser.h:
430         * xml/parser/XMLDocumentParserLibxml2.cpp:
431         (WebCore::XMLDocumentParser::shouldAssociateConsoleMessagesWithTextPosition):
432
433 2015-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
434
435         [SVG -> OTF Converter] Glyphs get clipped weirdly
436         https://bugs.webkit.org/show_bug.cgi?id=137095
437
438         Reviewed by Antti Koivisto.
439
440         The Adobe CFF spec doesn't actually tell you how to serialize a
441         "FontBBox." After trial and error, it seems to be (x, y, width,
442         height).
443
444         Test: svg/text/kerning.svg
445               svg/W3C-SVG-1.1/fonts-kern-01-t.svg
446
447         * svg/SVGToOTFFontConversion.cpp:
448         (WebCore::SVGToOTFFontConverter::appendHEADTable):
449         (WebCore::SVGToOTFFontConverter::appendCFFTable):
450         (WebCore::SVGToOTFFontConverter::appendVHEATable):
451         (WebCore::CFFBuilder::CFFBuilder):
452         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
453         (WebCore::SVGToOTFFontConverter::processGlyphElement):
454
455 2015-01-19  Csaba Osztrogonác  <ossy@webkit.org>
456
457         REGRESSION(r178486): It broke the !ENABLE(VIDEO) build
458         https://bugs.webkit.org/show_bug.cgi?id=140611
459
460         Reviewed by Eric Carlson.
461
462         * testing/Internals.cpp:
463         (WebCore::Internals::elementIsBlockingDisplaySleep):
464         * testing/Internals.h:
465
466 2015-01-19  Sergio Villar Senin  <svillar@igalia.com>
467
468         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
469         https://bugs.webkit.org/show_bug.cgi?id=139059
470
471         Reviewed by David Hyatt.
472
473         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
474
475         * rendering/RenderGrid.cpp:
476         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
477
478 2015-01-18  Alexey Proskuryakov  <ap@apple.com>
479
480         Update bindings generation test results after <https://trac.webkit.org/changeset/178633>.
481
482         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
483         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
484         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
485         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
486         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
487         * bindings/scripts/test/JS/JSTestObj.cpp:
488         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
489         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
490
491 2015-01-18  Chris Dumez  <cdumez@apple.com>
492
493         Generate matchingShorthandsForLonghand() implementation from CSSPropertyNames.in
494         https://bugs.webkit.org/show_bug.cgi?id=140599
495
496         Reviewed by Antti Koivisto.
497
498         Generate matchingShorthandsForLonghand() implementation from
499         CSSPropertyNames.in. We already have all the information we need in
500         CSSPropertyNames.in to generate the big switch() in
501         matchingShorthandsForLonghand().
502
503         A few shorthands still aren't generated. I will look into getting rid
504         of the custom code in a follow-up patch.
505
506         * css/StylePropertyShorthand.cpp:
507         (WebCore::makeVector): Deleted.
508         (WebCore::matchingShorthandsForLonghand): Deleted.
509         * css/StylePropertyShorthand.h:
510         (WebCore::matchingCustomShorthandsForLonghand):
511         * css/makeprop.pl:
512         (constructShorthandsVector):
513
514 2015-01-18  Dean Jackson  <dino@apple.com>
515
516         Out of bounds write in canvas.toDataURL
517         https://bugs.webkit.org/show_bug.cgi?id=140594
518         <rdar://problem/19449135>
519
520         Reviewed by Alexey Proskuryakov.
521
522         In the case where we have a canvas object that does
523         not have premultiplied alpha (an option you can select
524         when using WebGL) we have to multiply out the alpha when
525         converting to JPEG via toDataURL.
526
527         For this we created a buffer, but were not accurately
528         resizing it before flattening the alpha.
529
530         Test: fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html
531
532         * platform/graphics/cg/ImageBufferCG.cpp:
533         (WebCore::ImageDataToDataURL): Call resize once we've
534         determined we have enough space.
535
536 2015-01-17  Sam Weinig  <sam@webkit.org>
537
538         Add initial experimental user content filtering API
539         https://bugs.webkit.org/show_bug.cgi?id=140584
540
541         Reviewed by Benjamin Poulain.
542
543         Change content extensions to be managed through the UserContentController.
544
545         * WebCore.exp.in:
546         Update exports.
547
548         * WebCore.xcodeproj/project.pbxproj:
549         Update for removed files.
550
551         * contentextensions/ContentExtensionsBackend.cpp:
552         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists):
553         (WebCore::ContentExtensions::ContentExtensionsBackend::sharedInstance): Deleted.
554         * contentextensions/ContentExtensionsBackend.h:
555         Remove concept of a shared instance and add a removeAllRuleLists() function.
556         
557         * contentextensions/ContentExtensionsInterface.cpp: Removed.
558         * contentextensions/ContentExtensionsInterface.h: Removed.
559         Since there is no shared instance anymore, checking if a URL should be blocked
560         now has to go directly to the backend.
561         
562         * contentextensions/ContentExtensionsManager.cpp:
563         (WebCore::ContentExtensions::ExtensionsManager::createRuleList):
564         (WebCore::ContentExtensions::ExtensionsManager::loadExtension): Deleted.
565         * contentextensions/ContentExtensionsManager.h:
566         Update interface to accommodate the lack of a shared instance. Now, all this
567         file does is take a serialized rule list and outputs the Vector of ContentExtensionRules
568
569         * loader/cache/CachedResourceLoader.cpp:
570         (WebCore::CachedResourceLoader::requestResource):
571         Check with the UserContentController to see if the URL should be blocked.
572
573         * page/UserContentController.cpp:
574         (WebCore::UserContentController::addUserContentFilter):
575         (WebCore::UserContentController::removeAllUserContentFilters):
576         (WebCore::UserContentController::contentFilterBlocksURL):
577         * page/UserContentController.h:
578         Add single point of interaction for both the WebKit level to add and remove
579         content filters and WebCore to check to see if URLs should be blocked.
580
581 2015-01-18  Darin Adler  <darin@apple.com>
582
583         REGRESSION (r125251): wrapper lifetimes of SVGElementInstance are incorrect
584         https://bugs.webkit.org/show_bug.cgi?id=132148
585
586         Reviewed by Anders Carlsson.
587
588         Test: svg/custom/use-instanceRoot-event-listeners.xhtml
589
590         * bindings/js/JSDOMWindowCustom.cpp:
591         (WebCore::JSDOMWindow::addEventListener): Updated for the new return type
592         of JSListener::create. For the event type, use JSString::toAtomicString instead of
593         calling JSString::value and then converting to an AtomicString.
594         (WebCore::JSDOMWindow::removeEventListener): Same changes as for addEventListener.
595
596         * bindings/js/JSEventListener.cpp:
597         (WebCore::forwardsEventListeners): Added. Helper to detect the special case needed
598         for SVGElementInstance. In the future, for better encapsulation, we could use virtual
599         functions, but for now hard coding this single class seems fine.
600         (WebCore::correspondingElementWrapper): Added. For use if forwardsEventListeners
601         returns true, to find out where event listeners will be forwarded.
602         (WebCore::createJSEventListenerForAttribute): Added. Replaces the old function
603         createJSAttributeEventListener, for SVGElementInstance attributes only.
604         (WebCore::createJSEventListenerForAdd): Added. Helper function to avoid repeated
605         generated code in the addElementListener bindings other than the DOMWindow one.
606
607         * bindings/js/JSEventListener.h:
608         (WebCore::JSEventListener::create): Changed to return a Ref instead of a PassRefPtr.
609         (WebCore::createJSEventListenerForAttribute): Renamed from createJSAttributeEventListener,
610         changed to return a RefPtr instead of a PassRefPtr and to take references rather than
611         pointers for non-null things.
612         (WebCore::createJSEventListenerForRemove): Added. Small wrapper that calls
613         createJSEventListenerForAdd since they are currently identical.
614
615         * bindings/scripts/CodeGeneratorJS.pm:
616         (GenerateAttributeEventListenerCall): Removed the special case for JSSVGElementInstance
617         and updated to call the new createJSEventListenerForAttribute. The special case for
618         SVGElementInstance is now in JSEventListener.h/cpp, which is nicer since we prefer to
619         keep the generated code simpler if possible.
620         (GenerateEventListenerCall): Removed the special case for JSSVGElementInstance. This
621         has been dead code since the explicit definition of add/removeEventListener was removed
622         from SVGElementInstance.idl, and was also a problem if someone were to use the
623         addEventListener function from EventTarget on an SVGElementInstance object. The function
624         needs to be generic at runtime. Use toAtomicString as in JSDOMWindow::addEventListener above.
625         Call the two new functions, createJSEventListenerForAdd and createJSEventListenerForRemove.
626         Those new functions properly handle SVGElementInstance.
627         (GenerateImplementation): Don't pass the class name to GenerateAttributeEventListenerCall
628         or GenerateEventListenerCall any more.
629         (GenerateConstructorDefinition): Use JSString::toAtomicString instead of calling
630         JSString::value and then converting to AtomicString.
631
632 2015-01-17  Brian J. Burg  <burg@cs.washington.edu>
633
634         Web Inspector: highlight data for overlay should use protocol type builders
635         https://bugs.webkit.org/show_bug.cgi?id=129441
636
637         Reviewed by Timothy Hatcher.
638
639         As a first step towards cleaning up the inspector overlay, convert highlight
640         data construction to use protocol type builders. It's now really obvious what
641         data is being sent to the inspector overlay page.
642
643         This change paves the way towards using inspector protocol commands and events
644         if we want to support more interactive functionality in the inspector overlay.
645
646         This patch makes a few style cleanups, such as standardizing variable names,
647         using default member initializers, passing by reference, and fixing casts.
648
649         No new tests, no behavior changed.
650
651         * WebCore.exp.in:
652         * inspector/InspectorController.cpp:
653         (WebCore::InspectorController::getHighlight):
654         (WebCore::InspectorController::buildObjectForHighlightedNode):
655         (WebCore::InspectorController::inspect): Deleted.
656         * inspector/InspectorController.h:
657         * inspector/InspectorOverlay.cpp:
658         (WebCore::buildRendererHighlight):
659         (WebCore::buildNodeHighlight):
660         (WebCore::buildQuadHighlight):
661         (WebCore::InspectorOverlay::InspectorOverlay):
662         (WebCore::InspectorOverlay::getHighlight):
663         (WebCore::buildObjectForPoint):
664         (WebCore::buildObjectForRect):
665         (WebCore::buildArrayForQuad):
666         (WebCore::buildObjectForHighlight):
667         (WebCore::buildObjectForRegion):
668         (WebCore::buildObjectForFlowRegions):
669         (WebCore::buildObjectForSize):
670         (WebCore::buildQuadObjectForCSSRegionContentClip):
671         Simplify how the clipping area is encoded. It's now 'regionClippingArea'
672         stored on a FragmentHighlightData instance.
673
674         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
675         (WebCore::InspectorOverlay::drawPaintRects):
676         (WebCore::buildArrayForRendererFragments):
677         (WebCore::appendPathCommandAndPoints):
678         (WebCore::appendPathSegment):
679         (WebCore::buildObjectForShapeOutside):
680         (WebCore::buildObjectForElementData):
681         (WebCore::InspectorOverlay::buildObjectForHighlightedNode):
682         (WebCore::InspectorOverlay::drawNodeHighlight):
683         (WebCore::InspectorOverlay::drawQuadHighlight):
684         (WebCore::InspectorOverlay::reset):
685         (WebCore::buildObjectForRegionHighlight): Deleted.
686         (WebCore::buildObjectForCSSRegionsHighlight): Deleted.
687         (WebCore::buildObjectForCSSRegionContentClip): Deleted.
688         (WebCore::buildObjectForRendererFragments): Deleted.
689         (WebCore::buildObjectForElementInfo): Deleted.
690         * inspector/InspectorOverlay.h:
691         (WebCore::Highlight::Highlight):
692         * inspector/InspectorOverlayPage.js:
693         (_createElementTitle):
694         (_drawElementTitle):
695         (_drawFragmentHighlight):
696         (drawNodeHighlight):
697         * testing/Internals.cpp:
698         (WebCore::Internals::inspectorHighlightRects):
699         (WebCore::Internals::inspectorHighlightObject):
700
701 2015-01-17  Myles C. Maxfield  <mmaxfield@apple.com>
702
703         [SVG -> OTF Converter] Crashes when SVG font is invalid
704         https://bugs.webkit.org/show_bug.cgi?id=140378
705
706         Reviewed by Antti Koivisto.
707
708         Because CachedSVGFonts are cached, they have to be able to be used
709         in subsequent documents regardless how the first document left it.
710
711         Tests: fast/css/font-face-svg-decoding-error.html
712                svg/custom/svg-fonts-in-html.html
713                svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
714
715         * loader/cache/CachedFont.cpp:
716         (WebCore::CachedFont::ensureCustomFontData):
717         * loader/cache/CachedFont.h:
718         * loader/cache/CachedSVGFont.cpp:
719         (WebCore::CachedSVGFont::getFontData):
720         (WebCore::CachedSVGFont::ensureCustomFontData):
721         (WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
722         * loader/cache/CachedSVGFont.h:
723
724 2015-01-17  Chris Dumez  <cdumez@apple.com>
725
726         Converting time, angle and frequency units in CSS calc() function
727         https://bugs.webkit.org/show_bug.cgi?id=138356
728
729         Reviewed by Darin Adler.
730
731         Update CSSPrimitiveValue::primitiveType() to actually query the
732         primitiveType of the CSSCalcValue instead of assuming a given
733         type based on its category (e.g. If category is CalcTime, then
734         assume type is CSS_MS, even though it would be CSS_S as well).
735
736         This would like to calculation errors such as:
737         calc(4s + 1s) -> 5ms
738
739         Because we would assume the unit is CSS_MS without actually
740         checking.
741
742         This patch is inspired by the following Blink revision
743         by <rhodovan.u-szeged@partner.samsung.com> and initial WebKit
744         patch from <tmeszaros.u-szeged@partner.samsung.com>:
745         https://src.chromium.org/viewvc/blink?view=rev&revision=179101
746
747         Test: fast/css/calc-with-angle-time-frequency.html
748
749         * css/CSSCalculationValue.h:
750         (WebCore::CSSCalcValue::primitiveType):
751         * css/CSSPrimitiveValue.cpp:
752         (WebCore::CSSPrimitiveValue::primitiveType):
753
754 2015-01-17  Chris Dumez  <cdumez@apple.com>
755
756         Generate shorthandForProperty() implementation from CSSPropertyNames.in
757         https://bugs.webkit.org/show_bug.cgi?id=140556
758
759         Reviewed by Darin Adler.
760
761         Generate shorthandForProperty() implementation from CSSPropertyNames.in.
762         This is just a big switch() statement calling the right
763         StylePropertyShorthand factory function for a given CSSPropertyID.
764
765         * css/StylePropertyShorthand.cpp:
766         (WebCore::shorthandForProperty): Deleted.
767         * css/StylePropertyShorthand.h:
768         * css/makeprop.pl:
769
770 2015-01-16  Brent Fulgham  <bfulgham@apple.com>
771
772         [Mac] Correct infinite loop in Wheel Handler code in EventHandlerMac
773         https://bugs.webkit.org/show_bug.cgi?id=140564
774         <rdar://problem/19386426.
775
776         Reviewed by Dean Jackson.
777
778         * page/mac/EventHandlerMac.mm:
779         (WebCore::latchingIsLockedToAncestorOfThisFrame): Put missing assignment
780         back into the loop!
781
782 2015-01-16  Zalan Bujtas  <zalan@apple.com>
783
784         When border-radius is present, inset/outset/groove/ridge border color changes.
785         https://bugs.webkit.org/show_bug.cgi?id=140551
786
787         Reviewed by Simon Fraser.
788
789         This patch applies the same color lighten/darken adjustment on the radius borders
790         that we use for non-radius border.
791
792         Test: fast/borders/wrong-border-color-when-radius-is-present.html
793
794         * rendering/RenderBoxModelObject.cpp:
795         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
796         * rendering/RenderObject.cpp:
797         (WebCore::RenderObject::calculateBorderStyleColor):
798         * rendering/RenderObject.h:
799
800 2015-01-16  Pratik Solanki  <psolanki@apple.com>
801
802         Web pages fail to load using public iOS WebKit; ASSERT(!isMainThread()) in
803         -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
804         https://bugs.webkit.org/show_bug.cgi?id=140470
805
806         Reviewed by Alexey Proskuryakov.
807
808         Fixes an issue where a web page would fail to load in iOS WebKit2 built with the public iOS SDK
809         because NSURLConnection callbacks were always being scheduled on the main thread.
810
811         Currently we always schedule NSURLConnection callbacks to occur on the WebThread or the main
812         thread depending on whether the WebThread was started. In iOS WebKit2, the callbacks were
813         always being scheduled on the main thread regardless of whether we were using the NetworkProcess
814         (since the WebThread is only started when using WebKit1). This led to an assertion failure.
815         Instead we want to schedule callbacks to an NSOperationsQueue queue when using WebKit2 with the
816         NetworkProcess (i.e. ResourceHandleClient::usesAsyncCallbacks() is true), on the main thread when
817         using WebKit2 without the NetworkProcess and on the WebThread when using WebKit1.
818
819         * platform/network/mac/ResourceHandleMac.mm:
820         (WebCore::operationQueueForAsyncClients): Remove PLATFORM(IOS)-guards as we want to make use
821         of this code for iOS WebKit2 with the NetworkProcess.
822         (WebCore::ResourceHandle::start): Modified to use the existing Mac code path to conditionally
823         schedule NSURLConnection callbacks to an operation queue when ResourceHandleClient::usesAsyncCallbacks()
824         is true. Otherwise, schedule the callbacks on the run loop returned by WebThreadNSRunLoop(),
825         which is either the WebThread or the main thread run loop when using WebKit1 and WebKit2 without
826         the NetworkProcess, respectively.
827
828 2015-01-16  Brian J. Burg  <burg@cs.washington.edu>
829
830         Web Replay: purge remaining PassRefPtr uses and minor cleanup
831         https://bugs.webkit.org/show_bug.cgi?id=140456
832
833         Reviewed by Andreas Kling.
834
835         Get rid of PassRefPtr. Introduce default initializers where it makes sense. Change
836         uses of ASSERT to ASSERT_ARG when the assert is a precondition on an argument.
837
838         Remove mistaken uses of AtomicString that were not removed as part of r174113.
839
840         No new tests, no behavior changed.
841
842         * inspector/InspectorReplayAgent.cpp:
843         (WebCore::SerializeInputToJSONFunctor::operator()):
844         (WebCore::SerializeInputToJSONFunctor::returnValue):
845         (WebCore::InspectorReplayAgent::sessionCreated):
846         (WebCore::InspectorReplayAgent::sessionModified):
847         (WebCore::InspectorReplayAgent::sessionLoaded):
848         (WebCore::InspectorReplayAgent::segmentCreated):
849         (WebCore::InspectorReplayAgent::segmentCompleted):
850         (WebCore::InspectorReplayAgent::segmentLoaded):
851         (WebCore::InspectorReplayAgent::switchSession):
852         (WebCore::InspectorReplayAgent::insertSessionSegment):
853         (WebCore::InspectorReplayAgent::removeSessionSegment):
854         (WebCore::InspectorReplayAgent::findSession):
855         (WebCore::InspectorReplayAgent::findSegment):
856         * inspector/InspectorReplayAgent.h:
857         * replay/CapturingInputCursor.cpp:
858         (WebCore::CapturingInputCursor::CapturingInputCursor):
859         (WebCore::CapturingInputCursor::create):
860         (WebCore::CapturingInputCursor::loadInput):
861         * replay/CapturingInputCursor.h:
862         * replay/EventLoopInputDispatcher.cpp:
863         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
864         * replay/EventLoopInputDispatcher.h:
865         * replay/FunctorInputCursor.h:
866         (WebCore::FunctorInputCursor::FunctorInputCursor):
867         (WebCore::FunctorInputCursor::loadInput):
868         * replay/ReplayController.cpp:
869         (WebCore::ReplayController::ReplayController):
870         (WebCore::ReplayController::setForceDeterministicSettings):
871         (WebCore::ReplayController::setSessionState):
872         (WebCore::ReplayController::setSegmentState):
873         (WebCore::ReplayController::switchSession):
874         (WebCore::ReplayController::createSegment):
875         (WebCore::ReplayController::completeSegment):
876         (WebCore::ReplayController::loadSegmentAtIndex):
877         (WebCore::ReplayController::unloadSegment):
878         (WebCore::ReplayController::frameNavigated):
879         (WebCore::ReplayController::loadedSession):
880         (WebCore::ReplayController::loadedSegment):
881         (WebCore::ReplayController::activeInputCursor):
882         (WebCore::ReplayController::dispatcher):
883         * replay/ReplayController.h:
884         * replay/ReplaySession.cpp:
885         (WebCore::ReplaySession::create):
886         (WebCore::ReplaySession::at):
887         (WebCore::ReplaySession::appendSegment):
888         (WebCore::ReplaySession::insertSegment):
889         (WebCore::ReplaySession::removeSegment):
890         * replay/ReplaySession.h:
891         * replay/ReplaySessionSegment.cpp:
892         (WebCore::ReplaySessionSegment::create):
893         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
894         * replay/ReplaySessionSegment.h:
895         * replay/ReplayingInputCursor.cpp:
896         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
897         (WebCore::ReplayingInputCursor::create):
898         (WebCore::ReplayingInputCursor::loadInput):
899         * replay/ReplayingInputCursor.h:
900         * replay/SegmentedInputStorage.cpp:
901         (WebCore::SegmentedInputStorage::store):
902         (WebCore::SegmentedInputStorage::queue):
903         (WebCore::SegmentedInputStorage::SegmentedInputStorage): Deleted.
904         * replay/SegmentedInputStorage.h:
905
906 2015-01-16  Andreas Kling  <akling@apple.com>
907
908         Remove assertion that Page::m_editorClient is non-null.
909
910         Unreviewed debug build fix. (It's a reference, it won't be null.)
911
912         * page/Page.cpp:
913         (WebCore::Page::Page):
914
915 2015-01-16  Andreas Kling  <akling@apple.com>
916
917         Page::editorClient() should return a reference.
918         <https://webkit.org/b/140552>
919
920         Reviewed by Chris Dumez.
921
922         Page always has an EditorClient, so make editorClient() return a reference.
923
924         * editing/AlternativeTextController.cpp:
925         (WebCore::AlternativeTextController::editorClient):
926         (WebCore::AlternativeTextController::textChecker):
927         * editing/Editor.cpp:
928         (WebCore::Editor::client):
929         * editing/SpellChecker.cpp:
930         (WebCore::SpellChecker::client):
931         * page/FocusController.cpp:
932         (WebCore::FocusController::setFocusedElement):
933         * page/Page.cpp:
934         (WebCore::Page::Page):
935         (WebCore::Page::~Page):
936         (WebCore::Page::clearUndoRedoOperations):
937         * page/Page.h:
938         (WebCore::Page::editorClient):
939         * page/scrolling/AsyncScrollingCoordinator.cpp:
940         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
941
942 2015-01-16  Benjamin Poulain  <benjamin@webkit.org>
943
944         Make URL filters case-insensitive by default
945         https://bugs.webkit.org/show_bug.cgi?id=140531
946
947         Reviewed by Andreas Kling.
948
949         Safari's filters were case-insensitive. Adopt that convention in the engine,
950         and add a flag in case someone ever need a case-sensitive filter.
951
952         * contentextensions/ContentExtensionRule.h:
953         * contentextensions/ContentExtensionsBackend.cpp:
954         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
955         * contentextensions/ContentExtensionsManager.cpp:
956         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
957         * contentextensions/URLFilterParser.cpp:
958         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter):
959         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
960         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
961         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
962         (WebCore::ContentExtensions::URLFilterParser::addPattern):
963         * contentextensions/URLFilterParser.h:
964
965 2015-01-16  Benjamin Poulain  <bpoulain@apple.com>
966
967         Add the alternative syntax for CSS Selector's descendant combinator (">>")
968         https://bugs.webkit.org/show_bug.cgi?id=140525
969
970         Reviewed by Antti Koivisto.
971
972         The latest Selector spec introduces the combinator ">>" as an alias for the descendant
973         relation: http://dev.w3.org/csswg/selectors-4/#descendant-combinators
974
975         This patch implements that combinator as an alias of the existing one. For CSSOM's selector
976         serialization, I use one bit of CSSSelector to store if that alternative syntax was used.
977
978         Tests: fast/css/descendant-combinator-doubled-child-syntax-styling.html
979                fast/css/parsing-css-descendant-combinator-doubled-child-syntax.html
980                fast/selectors/element-closest-descendant-combinator-doubled-child-syntax.html
981                fast/selectors/element-matches-descendant-combinator-doubled-child-syntax.html
982                fast/selectors/querySelector-descendant-combinator-doubled-child-syntax.html
983
984         * css/CSSGrammar.y.in:
985         * css/CSSParserValues.cpp:
986         (WebCore::CSSParserSelector::appendTagHistory):
987         * css/CSSParserValues.h:
988         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax):
989         * css/CSSSelector.cpp:
990         (WebCore::CSSSelector::selectorText):
991         * css/CSSSelector.h:
992         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax):
993         (WebCore::CSSSelector::CSSSelector):
994
995 2015-01-16  Chris Dumez  <cdumez@apple.com>
996
997         Generate StylePropertyShorthand.* from CSSPropertyNames.in
998         https://bugs.webkit.org/show_bug.cgi?id=140501
999
1000         Reviewed by Darin Adler.
1001
1002         Add initial support for having makeprop.pl generate most of
1003         StylePropertyShorthand.* from CSSPropertyNames.in.
1004
1005         This patch replaces [Shorthand] parameter in CSSPropertyNames.in by a
1006         more descriptive [Longhands=property1|property2|...] parameter. With
1007         this information, makeprop.pl is now able to generate the
1008         StylePropertyShorthand factories for all CSS shorthand properties
1009         in a new StylePropertyShorthandFunctions.h header.
1010
1011         The switches in StylePropertyShorthand.cpp could also be generated
1012         but this will be taken care of in follow-up patches to reduce patch
1013         size.
1014
1015         * CMakeLists.txt:
1016         * DerivedSources.make:
1017         * WebCore.vcxproj/WebCore.vcxproj:
1018         * WebCore.vcxproj/WebCore.vcxproj.filters:
1019         * WebCore.xcodeproj/project.pbxproj:
1020         * css/CSSComputedStyleDeclaration.cpp:
1021         (WebCore::ComputedStyleExtractor::propertyValue):
1022         * css/CSSParser.cpp:
1023         (WebCore::CSSParser::parseValue):
1024         * css/CSSPropertyNames.in:
1025         * css/StyleProperties.cpp:
1026         (WebCore::StyleProperties::getPropertyValue):
1027         * css/StylePropertyShorthand.cpp:
1028         (WebCore::shorthandForProperty):
1029         (WebCore::matchingShorthandsForLonghand):
1030         (WebCore::backgroundShorthand): Deleted.
1031         (WebCore::backgroundPositionShorthand): Deleted.
1032         (WebCore::backgroundRepeatShorthand): Deleted.
1033         (WebCore::borderShorthand): Deleted.
1034         (WebCore::borderBottomShorthand): Deleted.
1035         (WebCore::borderColorShorthand): Deleted.
1036         (WebCore::borderImageShorthand): Deleted.
1037         (WebCore::borderLeftShorthand): Deleted.
1038         (WebCore::borderRadiusShorthand): Deleted.
1039         (WebCore::webkitBorderRadiusShorthand): Deleted.
1040         (WebCore::borderRightShorthand): Deleted.
1041         (WebCore::borderSpacingShorthand): Deleted.
1042         (WebCore::borderStyleShorthand): Deleted.
1043         (WebCore::borderTopShorthand): Deleted.
1044         (WebCore::borderWidthShorthand): Deleted.
1045         (WebCore::listStyleShorthand): Deleted.
1046         (WebCore::marginShorthand): Deleted.
1047         (WebCore::markerShorthand): Deleted.
1048         (WebCore::outlineShorthand): Deleted.
1049         (WebCore::overflowShorthand): Deleted.
1050         (WebCore::paddingShorthand): Deleted.
1051         (WebCore::transitionShorthand): Deleted.
1052         (WebCore::animationShorthand): Deleted.
1053         (WebCore::webkitAnimationShorthand): Deleted.
1054         (WebCore::webkitBorderAfterShorthand): Deleted.
1055         (WebCore::webkitBorderBeforeShorthand): Deleted.
1056         (WebCore::webkitBorderEndShorthand): Deleted.
1057         (WebCore::webkitBorderStartShorthand): Deleted.
1058         (WebCore::webkitColumnsShorthand): Deleted.
1059         (WebCore::webkitColumnRuleShorthand): Deleted.
1060         (WebCore::flexFlowShorthand): Deleted.
1061         (WebCore::flexShorthand): Deleted.
1062         (WebCore::webkitMarginCollapseShorthand): Deleted.
1063         (WebCore::webkitGridShorthand): Deleted.
1064         (WebCore::webkitGridTemplateShorthand): Deleted.
1065         (WebCore::webkitGridAreaShorthand): Deleted.
1066         (WebCore::webkitGridColumnShorthand): Deleted.
1067         (WebCore::webkitGridRowShorthand): Deleted.
1068         (WebCore::webkitMarqueeShorthand): Deleted.
1069         (WebCore::webkitMaskShorthand): Deleted.
1070         (WebCore::webkitMaskPositionShorthand): Deleted.
1071         (WebCore::webkitMaskRepeatShorthand): Deleted.
1072         (WebCore::webkitTextDecorationShorthand): Deleted.
1073         (WebCore::webkitTextEmphasisShorthand): Deleted.
1074         (WebCore::webkitTextStrokeShorthand): Deleted.
1075         (WebCore::webkitTransitionShorthand): Deleted.
1076         (WebCore::webkitPerspectiveOriginShorthand): Deleted.
1077         (WebCore::webkitTransformOriginShorthand): Deleted.
1078         * css/StylePropertyShorthand.h:
1079         * css/makeprop.pl:
1080
1081 2015-01-16  Commit Queue  <commit-queue@webkit.org>
1082
1083         Unreviewed, rolling out r178532.
1084         https://bugs.webkit.org/show_bug.cgi?id=140548
1085
1086         Broke fast/css/parsing-css-lang.html on some bots (Requested
1087         by ap on #webkit).
1088
1089         Reverted changeset:
1090
1091         "Canonicalization of :lang() should preserve the :lang()'s
1092         arguments representations"
1093         https://bugs.webkit.org/show_bug.cgi?id=139928
1094         http://trac.webkit.org/changeset/178532
1095
1096 2015-01-16  Commit Queue  <commit-queue@webkit.org>
1097
1098         Unreviewed, rolling out r178577.
1099         https://bugs.webkit.org/show_bug.cgi?id=140546
1100
1101         Broke fast/css-grid-layout/grid-content-sized-columns-
1102         resolution.html (Requested by ap on #webkit).
1103
1104         Reverted changeset:
1105
1106         "[CSS Grid Layout] Tracks shrink sometimes with indefinite
1107         remaining space"
1108         https://bugs.webkit.org/show_bug.cgi?id=139059
1109         http://trac.webkit.org/changeset/178577
1110
1111 2015-01-16  Andreas Kling  <akling@apple.com>
1112
1113         Some improvements to RuleSet shrinking.
1114         <https://webkit.org/b/140534>
1115
1116         Reviewed by Antti Koivisto.
1117
1118         Give an inline capacity (1) to the RuleData Vectors in RuleSet.
1119         The vast majority of Vectors have only a single entry, and this
1120         avoids having to allocate a separate Vector backing store for them.
1121
1122         Also make sure to shrink some Vectors that we weren't already,
1123         like those in RuleFeatureSet.
1124
1125         * css/ElementRuleCollector.cpp:
1126         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1127         * css/ElementRuleCollector.h:
1128         * css/RuleFeature.cpp:
1129         (WebCore::RuleFeatureSet::shrinkToFit):
1130         * css/RuleFeature.h:
1131         * css/RuleSet.cpp:
1132         (WebCore::RuleSet::addToRuleSet):
1133         (WebCore::rulesCountForName):
1134         (WebCore::shrinkMapVectorsToFit):
1135         (WebCore::RuleSet::shrinkToFit):
1136         * css/RuleSet.h:
1137         (WebCore::RuleSet::idRules):
1138         (WebCore::RuleSet::classRules):
1139         (WebCore::RuleSet::tagRules):
1140         (WebCore::RuleSet::shadowPseudoElementRules):
1141         (WebCore::RuleSet::linkPseudoClassRules):
1142         (WebCore::RuleSet::cuePseudoRules):
1143         (WebCore::RuleSet::focusPseudoClassRules):
1144         (WebCore::RuleSet::universalRules):
1145
1146 2015-01-16  Antti Koivisto  <antti@apple.com>
1147
1148         Correct naming for FontCascade implementation files
1149         https://bugs.webkit.org/show_bug.cgi?id=140544
1150
1151         Reviewed by Zalan Bujtas.
1152
1153         Also reduce their number.
1154
1155         Merge FontFastPath.cpp into FontCascade.cpp
1156         Merge FontMac.mm and FontComplexTextMac.cpp into FontCascadeCocoa.mm
1157
1158         * CMakeLists.txt:
1159         * WebCore.vcxproj/WebCore.vcxproj:
1160         * WebCore.xcodeproj/project.pbxproj:
1161         * platform/graphics/FontCascade.cpp:
1162         (WebCore::FontCascade::getEmphasisMarkGlyphData):
1163         (WebCore::FontCascade::emphasisMarkAscent):
1164         (WebCore::FontCascade::emphasisMarkDescent):
1165         (WebCore::FontCascade::emphasisMarkHeight):
1166         (WebCore::FontCascade::getGlyphsAndAdvancesForSimpleText):
1167         (WebCore::FontCascade::drawSimpleText):
1168         (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
1169         (WebCore::FontCascade::drawGlyphBuffer):
1170         (WebCore::offsetToMiddleOfGlyph):
1171         (WebCore::offsetToMiddleOfGlyphAtIndex):
1172         (WebCore::FontCascade::drawEmphasisMarks):
1173         (WebCore::FontCascade::floatWidthForSimpleText):
1174         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
1175         (WebCore::FontCascade::offsetForPositionForSimpleText):
1176         * platform/graphics/FontFastPath.cpp: Removed.
1177         * platform/graphics/cocoa/FontCascadeCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
1178         (WebCore::FontCascade::drawGlyphs):
1179         (WebCore::FontCascade::adjustSelectionRectForComplexText):
1180         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
1181         (WebCore::FontCascade::drawComplexText):
1182         (WebCore::FontCascade::drawEmphasisMarksForComplexText):
1183         (WebCore::FontCascade::floatWidthForComplexText):
1184         (WebCore::FontCascade::offsetForPositionForComplexText):
1185         (WebCore::FontCascade::fontDataForCombiningCharacterSequence):
1186         * platform/graphics/mac/FontComplexTextMac.cpp: Removed.
1187         * platform/graphics/mac/FontMac.mm: Removed.
1188
1189 2014-11-26  Sergio Villar Senin  <svillar@igalia.com>
1190
1191         [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space
1192         https://bugs.webkit.org/show_bug.cgi?id=139059
1193
1194         Reviewed by David Hyatt.
1195
1196         Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html
1197
1198         * rendering/RenderGrid.cpp:
1199         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1200
1201 2015-01-15  Csaba Osztrogonác  <ossy@webkit.org>
1202
1203         Remove ENABLE(SQL_DATABASE) guards
1204         https://bugs.webkit.org/show_bug.cgi?id=140434
1205
1206         Reviewed by Darin Adler.
1207
1208         * Configurations/FeatureDefines.xcconfig:
1209         * Modules/webdatabase/AbstractDatabaseServer.h:
1210         * Modules/webdatabase/ChangeVersionData.h:
1211         * Modules/webdatabase/ChangeVersionWrapper.cpp:
1212         * Modules/webdatabase/ChangeVersionWrapper.h:
1213         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1214         * Modules/webdatabase/DOMWindowWebDatabase.h:
1215         * Modules/webdatabase/DOMWindowWebDatabase.idl:
1216         * Modules/webdatabase/Database.cpp:
1217         * Modules/webdatabase/Database.h:
1218         * Modules/webdatabase/Database.idl:
1219         * Modules/webdatabase/DatabaseBackend.cpp:
1220         * Modules/webdatabase/DatabaseBackend.h:
1221         * Modules/webdatabase/DatabaseBackendBase.cpp:
1222         * Modules/webdatabase/DatabaseBackendBase.h:
1223         * Modules/webdatabase/DatabaseBasicTypes.h:
1224         * Modules/webdatabase/DatabaseCallback.h:
1225         * Modules/webdatabase/DatabaseCallback.idl:
1226         * Modules/webdatabase/DatabaseContext.cpp:
1227         * Modules/webdatabase/DatabaseContext.h:
1228         * Modules/webdatabase/DatabaseDetails.h:
1229         * Modules/webdatabase/DatabaseError.h:
1230         * Modules/webdatabase/DatabaseManager.cpp:
1231         * Modules/webdatabase/DatabaseManager.h:
1232         * Modules/webdatabase/DatabaseManagerClient.h:
1233         * Modules/webdatabase/DatabaseServer.cpp:
1234         * Modules/webdatabase/DatabaseServer.h:
1235         * Modules/webdatabase/DatabaseTask.cpp:
1236         * Modules/webdatabase/DatabaseTask.h:
1237         * Modules/webdatabase/DatabaseThread.cpp:
1238         * Modules/webdatabase/DatabaseThread.h:
1239         * Modules/webdatabase/DatabaseTracker.cpp:
1240         * Modules/webdatabase/DatabaseTracker.h:
1241         * Modules/webdatabase/OriginLock.cpp:
1242         * Modules/webdatabase/OriginLock.h:
1243         * Modules/webdatabase/SQLCallbackWrapper.h:
1244         * Modules/webdatabase/SQLError.h:
1245         * Modules/webdatabase/SQLError.idl:
1246         * Modules/webdatabase/SQLException.cpp:
1247         * Modules/webdatabase/SQLException.h:
1248         * Modules/webdatabase/SQLException.idl:
1249         * Modules/webdatabase/SQLResultSet.cpp:
1250         * Modules/webdatabase/SQLResultSet.h:
1251         * Modules/webdatabase/SQLResultSet.idl:
1252         * Modules/webdatabase/SQLResultSetRowList.cpp:
1253         * Modules/webdatabase/SQLResultSetRowList.h:
1254         * Modules/webdatabase/SQLResultSetRowList.idl:
1255         * Modules/webdatabase/SQLStatement.cpp:
1256         * Modules/webdatabase/SQLStatement.h:
1257         * Modules/webdatabase/SQLStatementBackend.cpp:
1258         * Modules/webdatabase/SQLStatementBackend.h:
1259         * Modules/webdatabase/SQLStatementCallback.h:
1260         * Modules/webdatabase/SQLStatementCallback.idl:
1261         * Modules/webdatabase/SQLStatementErrorCallback.h:
1262         * Modules/webdatabase/SQLStatementErrorCallback.idl:
1263         * Modules/webdatabase/SQLTransaction.cpp:
1264         * Modules/webdatabase/SQLTransaction.h:
1265         * Modules/webdatabase/SQLTransaction.idl:
1266         * Modules/webdatabase/SQLTransactionBackend.cpp:
1267         * Modules/webdatabase/SQLTransactionBackend.h:
1268         * Modules/webdatabase/SQLTransactionCallback.h:
1269         * Modules/webdatabase/SQLTransactionCallback.idl:
1270         * Modules/webdatabase/SQLTransactionClient.cpp:
1271         * Modules/webdatabase/SQLTransactionClient.h:
1272         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1273         * Modules/webdatabase/SQLTransactionCoordinator.h:
1274         * Modules/webdatabase/SQLTransactionErrorCallback.h:
1275         * Modules/webdatabase/SQLTransactionErrorCallback.idl:
1276         * Modules/webdatabase/SQLTransactionState.h:
1277         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
1278         * Modules/webdatabase/SQLTransactionStateMachine.h:
1279         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1280         (WebCore::JSCommandLineAPIHost::databaseId):
1281         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1282         * bindings/js/JSExceptionBase.cpp:
1283         (WebCore::toExceptionBase):
1284         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1285         * bindings/js/JSSQLTransactionCustom.cpp:
1286         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1287         (webkit_dom_test_callback_finalize):
1288         (webkit_dom_test_callback_constructor):
1289         (webkit_dom_test_callback_callback_with_no_param):
1290         (webkit_dom_test_callback_callback_with_array_param):
1291         (webkit_dom_test_callback_callback_with_serialized_script_value_param):
1292         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1293         (webkit_dom_test_callback_callback_with_string_list):
1294         (webkit_dom_test_callback_callback_with_boolean):
1295         (webkit_dom_test_callback_callback_requires_this_to_pass):
1296         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
1297         * bindings/scripts/test/JS/JSTestCallback.cpp:
1298         * bindings/scripts/test/JS/JSTestCallback.h:
1299         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1300         * bindings/scripts/test/TestCallback.idl:
1301         * dom/DOMExceptions.in:
1302         * dom/ScriptExecutionContext.cpp:
1303         (WebCore::ScriptExecutionContext::setDatabaseContext):
1304         * dom/ScriptExecutionContext.h:
1305         * history/PageCache.cpp:
1306         (WebCore::logCanCacheFrameDecision):
1307         (WebCore::PageCache::canCachePageContainingThisFrame):
1308         * inspector/CommandLineAPIHost.cpp:
1309         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
1310         (WebCore::CommandLineAPIHost::disconnect):
1311         (WebCore::CommandLineAPIHost::databaseIdImpl):
1312         * inspector/CommandLineAPIHost.h:
1313         (WebCore::CommandLineAPIHost::init):
1314         * inspector/InspectorController.cpp:
1315         (WebCore::InspectorController::InspectorController):
1316         * inspector/InspectorDatabaseAgent.cpp:
1317         * inspector/InspectorDatabaseAgent.h:
1318         * inspector/InspectorDatabaseInstrumentation.h:
1319         (WebCore::InspectorInstrumentation::didOpenDatabase):
1320         * inspector/InspectorDatabaseResource.cpp:
1321         * inspector/InspectorDatabaseResource.h:
1322         * inspector/InspectorInstrumentation.cpp:
1323         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1324         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
1325         * inspector/InspectorInstrumentation.h:
1326         * inspector/InstrumentingAgents.cpp:
1327         (WebCore::InstrumentingAgents::InstrumentingAgents):
1328         (WebCore::InstrumentingAgents::reset):
1329         * inspector/InstrumentingAgents.h:
1330         * inspector/WorkerInspectorController.cpp:
1331         (WebCore::WorkerInspectorController::WorkerInspectorController):
1332         * loader/EmptyClients.h:
1333         * loader/FrameLoader.cpp:
1334         (WebCore::FrameLoader::stopLoading):
1335         * page/ChromeClient.h:
1336         * platform/FeatureCounterKeys.h:
1337
1338 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1339
1340         Element appears correctly but does not receive event with a large translation.
1341         https://bugs.webkit.org/show_bug.cgi?id=139815
1342
1343         Reviewed by Simon Fraser.
1344
1345         When the hit point gets translated beyond the min/max value of LayoutRect (infiniteRect()),
1346         we fail to find the corresponding layer.
1347         When there's no clipping on a layer, we use min/max values to represent infiniteness.
1348         However it does not work well across types. With IntPoint(hittest) we can address a point that's outside
1349         of LayoutRect's boundary(clipping).
1350         This patch addresses the immediate issue of not being able to hittest transformed layers properly. 
1351         Fixing the representation of infiniteness is tracked here: webkit.org/b/140533
1352
1353         Test: transforms/hittest-translated-content-off-to-infinity-and-back.html
1354
1355         * rendering/ClipRect.cpp:
1356         (WebCore::ClipRect::intersects):
1357
1358 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
1359
1360         tables/mozilla/bugs/bug10633.html is flakey on Yosemite
1361         https://bugs.webkit.org/show_bug.cgi?id=140487
1362
1363         Reviewed by Simon Fraser.
1364
1365         The workaround in https://bugs.webkit.org/show_bug.cgi?id=140253 works
1366         on both OSes.
1367
1368         * platform/graphics/mac/SimpleFontDataMac.mm:
1369         (WebCore::SimpleFontData::platformInit):
1370
1371 2015-01-15  Ryosuke Niwa  <rniwa@webkit.org>
1372
1373         Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
1374         https://bugs.webkit.org/show_bug.cgi?id=140523
1375         <rdar://problem/19464329>
1376
1377         Reviewed by Chris Dumez.
1378
1379         The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
1380         unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.
1381
1382         Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
1383         we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".
1384
1385         See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.
1386
1387         * html/HTMLElement.cpp:
1388         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
1389
1390 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1391
1392         RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
1393         https://bugs.webkit.org/show_bug.cgi?id=140477.
1394
1395         Reviewed by Simon Fraser.
1396
1397         * rendering/RenderLayerCompositor.cpp:
1398         (WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
1399         code clearer.
1400
1401 2015-01-15  Joseph Pecoraro  <pecoraro@apple.com>
1402
1403         Unreviewed, rolling out r178531.
1404
1405         Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.
1406
1407         Reverted changeset:
1408
1409         "Layers need to be already updated before we call adjustViewSize."
1410         https://bugs.webkit.org/show_bug.cgi?id=135514
1411         http://trac.webkit.org/changeset/178531
1412
1413         * page/FrameView.cpp:
1414         (WebCore::FrameView::layout):
1415         (WebCore::FrameView::updateCompositingLayersAfterScrolling):
1416         (WebCore::FrameView::paintContents):
1417         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
1418         * page/FrameView.h:
1419         * platform/ScrollView.cpp:
1420         (WebCore::ScrollView::scrollTo):
1421         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
1422         * platform/ScrollView.h:
1423         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
1424
1425 2015-01-15  Chris Dumez  <cdumez@apple.com>
1426
1427         [WK2] Wire diagnostic logging messages through the UIProcess
1428         https://bugs.webkit.org/show_bug.cgi?id=140486
1429
1430         Reviewed by Sam Weinig.
1431
1432         Wire diagnostic logging messages through the UIProcess.
1433         Eventually, the corresponding bundle API should go away.
1434
1435         * WebCore.vcxproj/WebCore.vcxproj:
1436         * WebCore.vcxproj/WebCore.vcxproj.filters:
1437         Add page/DiagnosticLoggingResultType.h to Windows project.
1438
1439         * WebCore.xcodeproj/project.pbxproj:
1440         Add page/DiagnosticLoggingResultType.h to XCode project.
1441
1442         * html/HTMLMediaElement.cpp:
1443         * loader/EmptyClients.h:
1444         * loader/FrameLoader.cpp:
1445         * page/DiagnosticLoggingClient.h:
1446         * page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
1447         Use new DiagnosticLoggingResultType enum instead of old
1448         DiagnosticLoggingClient::LogType one.
1449
1450 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1451
1452         Reduce LayoutRect::infiniteRect() usage.
1453         https://bugs.webkit.org/show_bug.cgi?id=140511
1454
1455         Reviewed by Simon Fraser.
1456
1457         This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().
1458
1459         No change in functionality.
1460
1461         * platform/graphics/LayoutRect.h:
1462         (WebCore::LayoutRect::isInfinite):
1463         * rendering/ClipRect.h:
1464         (WebCore::ClipRect::reset):
1465         (WebCore::ClipRect::isEmpty):
1466         (WebCore::ClipRect::isInfinite):
1467         (WebCore::ClipRect::setRect): Deleted.
1468         * rendering/PaintInfo.h:
1469         (WebCore::PaintInfo::applyTransform):
1470         * rendering/RenderLayer.cpp:
1471         (WebCore::RenderLayer::calculateClipRects):
1472         * rendering/RenderLayer.h:
1473         (WebCore::ClipRects::reset):
1474         * rendering/RenderLayerBacking.cpp:
1475         (WebCore::RenderLayerBacking::updateGeometry):
1476         * rendering/RenderLayerCompositor.cpp:
1477         (WebCore::RenderLayerCompositor::clippedByAncestor):
1478
1479 2015-01-15  Chris Dumez  <cdumez@apple.com>
1480
1481         Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
1482         https://bugs.webkit.org/show_bug.cgi?id=140521
1483
1484         Reviewed by Alexey Proskuryakov.
1485
1486         Close the CSSPropertyNames.gperf file before calling gperf on it
1487         to make sure the content we wrote was flushed. This was causing
1488         intermittent build failures.
1489
1490         * css/makeprop.pl:
1491
1492 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1493
1494         LayerFragment should be able to intersect with ClipRect.
1495         https://bugs.webkit.org/show_bug.cgi?id=140498
1496
1497         Reviewed by Simon Fraser.
1498
1499         No change in functionality.
1500
1501         * rendering/LayerFragment.h:
1502         (WebCore::LayerFragment::intersect):
1503         * rendering/RenderLayer.cpp:
1504         (WebCore::RenderLayer::collectFragments):
1505
1506 2015-01-15  Zalan Bujtas  <zalan@apple.com>
1507
1508         Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
1509         https://bugs.webkit.org/show_bug.cgi?id=140461
1510
1511         Reviewed by Simon Fraser.
1512
1513         Move classes only used by RenderLayer to RenderLayer.cpp.
1514
1515         No change in functionality.
1516
1517         * rendering/RenderLayer.cpp:
1518         (WebCore::ClipRects::create):
1519         (WebCore::ClipRects::reset):
1520         (WebCore::ClipRects::overflowClipRect):
1521         (WebCore::ClipRects::setOverflowClipRect):
1522         (WebCore::ClipRects::fixedClipRect):
1523         (WebCore::ClipRects::setFixedClipRect):
1524         (WebCore::ClipRects::posClipRect):
1525         (WebCore::ClipRects::setPosClipRect):
1526         (WebCore::ClipRects::fixed):
1527         (WebCore::ClipRects::setFixed):
1528         (WebCore::ClipRects::ref):
1529         (WebCore::ClipRects::deref):
1530         (WebCore::ClipRects::operator==):
1531         (WebCore::ClipRects::operator=):
1532         (WebCore::ClipRects::ClipRects):
1533         (WebCore::ClipRectsCache::ClipRectsCache):
1534         (WebCore::ClipRectsCache::getClipRects):
1535         (WebCore::ClipRectsCache::setClipRects):
1536         (WebCore::ClipRectsCache::getIndex):
1537         (WebCore::RenderLayer::clipRects):
1538         (WebCore::RenderLayer::calculateClipRects):
1539         * rendering/RenderLayer.h:
1540         (WebCore::ClipRects::create): Deleted.
1541         (WebCore::ClipRects::ClipRects): Deleted.
1542         (WebCore::ClipRects::reset): Deleted.
1543         (WebCore::ClipRects::overflowClipRect): Deleted.
1544         (WebCore::ClipRects::setOverflowClipRect): Deleted.
1545         (WebCore::ClipRects::fixedClipRect): Deleted.
1546         (WebCore::ClipRects::setFixedClipRect): Deleted.
1547         (WebCore::ClipRects::posClipRect): Deleted.
1548         (WebCore::ClipRects::setPosClipRect): Deleted.
1549         (WebCore::ClipRects::fixed): Deleted.
1550         (WebCore::ClipRects::setFixed): Deleted.
1551         (WebCore::ClipRects::ref): Deleted.
1552         (WebCore::ClipRects::deref): Deleted.
1553         (WebCore::ClipRects::operator==): Deleted.
1554         (WebCore::ClipRects::operator=): Deleted.
1555         (WebCore::ClipRectsCache::ClipRectsCache): Deleted.
1556         (WebCore::ClipRectsCache::getClipRects): Deleted.
1557         (WebCore::ClipRectsCache::setClipRects): Deleted.
1558         (WebCore::ClipRectsCache::getIndex): Deleted.
1559
1560 2015-01-15  Dhi Aurrahman  <diorahman@rockybars.com>
1561
1562         Canonicalization of :lang() should preserve the :lang()'s arguments representations
1563         https://bugs.webkit.org/show_bug.cgi?id=139928
1564
1565         Reviewed by Benjamin Poulain.
1566
1567         Preserve the representation of IDENT and STRING when serializing the 
1568         :lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as 
1569         :lang(foo, "bar", baz) instead of :lang(foo, bar, baz).
1570
1571         Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
1572         and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
1573         CSSSelector::setLangArgumentList and CSSSelector::langArgumentList 
1574         respectively, since those methods are being exclusively used in respect
1575         with :lang().
1576
1577         Update the test of serializing :lang() with IDENT and STRING arguments.
1578
1579         * css/CSSGrammar.y.in:
1580         * css/CSSParserValues.cpp:
1581         (WebCore::CSSParserSelector::setLangArgumentList):
1582         (WebCore::CSSParserSelector::setArgumentList): Deleted.
1583         * css/CSSParserValues.h:
1584         (WebCore::CSSParserString::init):
1585         (WebCore::CSSParserString::clear):
1586         (WebCore::CSSParserString::isParsedFromString):
1587         (WebCore::CSSParserString::setParsedFromString):
1588         * css/CSSSelector.cpp:
1589         (WebCore::appendLangArgumentList):
1590         (WebCore::CSSSelector::selectorText):
1591         (WebCore::CSSSelector::setLangArgumentList):
1592         (WebCore::appendArgumentList): Deleted.
1593         (WebCore::CSSSelector::setArgumentList): Deleted.
1594         * css/CSSSelector.h:
1595         (WebCore::CSSSelector::langArgumentList):
1596         (WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
1597         (WebCore::CSSSelector::argumentList): Deleted.
1598         * css/SelectorChecker.cpp:
1599         (WebCore::SelectorChecker::checkOne):
1600
1601 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1602
1603         Layers need to be already updated before we call adjustViewSize
1604         https://bugs.webkit.org/show_bug.cgi?id=135514
1605
1606         Reviewed by Simon Fraser.
1607
1608         Tested by 'fast/dynamic/layer-no-longer-paginated.html'
1609
1610         Defer updating scrollbars until we have finished layout. This
1611         has a couple of benefits:
1612         (1) We do not attempt to modify render layers during layout.
1613         (2) In WK1 we do not attempt to paint during layout.
1614
1615         Add a new virtual predicate to ScrollView indicating when we are in
1616         layout so that calls to setContentsSize do not attempt
1617         to adjust scrollbars.
1618
1619         Modify FrameView to set its ScrollView state to block drawing
1620         scrollbar updates during layout. Also add a post-layout
1621         handler to complete the scrollbar updates after layout is
1622         finished.
1623
1624         * page/FrameView.cpp:
1625         (WebCore::FrameView::layout):
1626         (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
1627         * page/FrameView.h:
1628         * platform/ScrollView.cpp:
1629         (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
1630         (WebCore::ScrollView::scrollTo): If we should defer painting, cache the
1631         the scroll delta and apply it after the layout is complete.
1632         * platform/ScrollView.h:
1633         (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
1634
1635 2015-01-15  Benjamin Poulain  <benjamin@webkit.org>
1636
1637         When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
1638         https://bugs.webkit.org/show_bug.cgi?id=140465
1639
1640         Reviewed by Andreas Kling.
1641
1642         This patch updates the parser to produce smaller graphs when multiple patterns
1643         of the rule list share a common prefix.
1644
1645         Previously, GraphBuilder would generate subgraph in place of each parsed
1646         atom. We now only create subgraph if an atom does not appear in the prefix tree.
1647
1648         We accumulate the parsing information into small uint16_t named TrivialAtom.
1649         When generating the subgraph for an new atom, we first check if the prefix tree already
1650         has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
1651         graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.
1652
1653         Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
1654         simpler for many kind of inputs.
1655
1656         * WebCore.xcodeproj/project.pbxproj:
1657         * contentextensions/ContentExtensionsBackend.cpp:
1658         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1659         The URLFilterParser now maintains states (the prefix tree) between patterns.
1660
1661         * contentextensions/DFA.cpp:
1662         (WebCore::ContentExtensions::DFA::debugPrintDot):
1663         * contentextensions/DFANode.h:
1664         Fix a typo :)
1665
1666         * contentextensions/NFA.cpp:
1667         (WebCore::ContentExtensions::NFA::createNode):
1668         (WebCore::ContentExtensions::NFA::setFinal):
1669         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
1670         (WebCore::ContentExtensions::NFA::addRuleId):
1671         (WebCore::ContentExtensions::NFA::debugPrintDot):
1672         * contentextensions/NFA.h:
1673         (WebCore::ContentExtensions::NFA::addRuleId):
1674         * contentextensions/NFANode.cpp: Removed.
1675         * contentextensions/NFANode.h:
1676         NFA nodes from two patterns are now "merged" by construction, thus we need
1677         to keep track of multiple rules per node.
1678
1679         * contentextensions/NFAToDFA.cpp:
1680         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
1681         * contentextensions/URLFilterParser.cpp:
1682         (WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
1683         (WebCore::ContentExtensions::quantifyTrivialAtom):
1684         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
1685         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
1686         (WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
1687         (WebCore::ContentExtensions::GraphBuilder::finalize):
1688         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
1689         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1690         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1691         (WebCore::ContentExtensions::GraphBuilder::fail):
1692         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
1693         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
1694         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
1695         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
1696         (WebCore::ContentExtensions::URLFilterParser::addPattern):
1697         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
1698         (WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
1699         * contentextensions/URLFilterParser.h:
1700         (WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
1701         (WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.
1702
1703 2015-01-14  Alexey Proskuryakov  <ap@apple.com>
1704
1705         Web Inspector and regular console use different source code locations for messages
1706         https://bugs.webkit.org/show_bug.cgi?id=140478
1707
1708         Reviewed by Brian Burg.
1709
1710         We now create a ConsoleMessage object in a place where we can look at it and use
1711         the source location it computed in a client call.
1712
1713         * inspector/InspectorConsoleInstrumentation.h:
1714         (WebCore::InspectorInstrumentation::addMessageToConsole):
1715         * inspector/InspectorInstrumentation.cpp:
1716         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1717         * inspector/InspectorInstrumentation.h:
1718         * inspector/WebConsoleAgent.cpp:
1719         (WebCore::WebConsoleAgent::didFinishXHRLoading):
1720         (WebCore::WebConsoleAgent::didReceiveResponse):
1721         (WebCore::WebConsoleAgent::didFailLoading):
1722         * page/PageConsoleClient.cpp:
1723         (WebCore::PageConsoleClient::addMessage):
1724         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
1725         * workers/WorkerGlobalScope.cpp:
1726         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
1727
1728 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1729
1730         [Win] Unreviewed Windows build fix.
1731
1732         More missing Font->FontCascade changes.
1733
1734         * platform/win/WebCoreTextRenderer.cpp:
1735         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1736         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1737
1738 2015-01-15  Antti Koivisto  <antti@apple.com>
1739
1740         REGRESSION(r178133): Membuster regressed ~4%
1741         https://bugs.webkit.org/show_bug.cgi?id=140495
1742
1743         Reviewed by Andreas Kling.
1744
1745         * platform/graphics/FontCache.cpp:
1746         (WebCore::FontCache::purgeInactiveFontData):
1747
1748             Fonts may ref other fonts. Keep clearing until there are no changes.
1749
1750 2015-01-15  Brent Fulgham  <bfulgham@apple.com>
1751
1752         [Win] Unreviewed build fix.
1753
1754         * platform/graphics/win/FontCacheWin.cpp:
1755         * platform/win/DragImageWin.cpp:
1756         * platform/win/WebCoreTextRenderer.h:
1757
1758 2015-01-15  Antti Koivisto  <antti@apple.com>
1759
1760         Try to fix windows build.
1761
1762         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1763         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1764         (PlatformCALayerWinInternal::displayCallback):
1765         * platform/win/DragImageWin.cpp:
1766         (WebCore::dragLabelFont):
1767         (WebCore::createDragImageForLink):
1768         * platform/win/PopupMenuWin.cpp:
1769         (WebCore::PopupMenuWin::calculatePositionAndSize):
1770         (WebCore::PopupMenuWin::paint):
1771         * platform/win/WebCoreTextRenderer.cpp:
1772         (WebCore::doDrawTextAtPoint):
1773         (WebCore::WebCoreDrawDoubledTextAtPoint):
1774         (WebCore::WebCoreTextFloatWidth):
1775         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1776         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1777         * rendering/RenderThemeSafari.cpp:
1778         (WebCore::RenderThemeSafari::setFontFromControlSize):
1779
1780 2015-01-15  Antti Koivisto  <antti@apple.com>
1781
1782         Unreviewed, rolling out r178518.
1783
1784         Didn't mean to commit some of this
1785
1786         Reverted changeset:
1787
1788         "Try to fix windows build."
1789         http://trac.webkit.org/changeset/178518
1790
1791 2015-01-15  Antti Koivisto  <antti@apple.com>
1792
1793         Try to fix windows build.
1794
1795         * platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
1796         * platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
1797         * platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
1798         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1799         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1800         (PlatformCALayerWinInternal::displayCallback):
1801         * platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
1802         * platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
1803         * platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
1804         * platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
1805         * platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
1806         * platform/win/DragImageWin.cpp:
1807         (WebCore::dragLabelFont):
1808         (WebCore::createDragImageForLink):
1809         * platform/win/PopupMenuWin.cpp:
1810         (WebCore::PopupMenuWin::calculatePositionAndSize):
1811         (WebCore::PopupMenuWin::paint):
1812         * platform/win/WebCoreTextRenderer.cpp:
1813         (WebCore::doDrawTextAtPoint):
1814         (WebCore::WebCoreDrawDoubledTextAtPoint):
1815         (WebCore::WebCoreTextFloatWidth):
1816         (WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
1817         (WebCore::WebCoreAlwaysUsesComplexTextCodePath):
1818         * rendering/RenderThemeSafari.cpp:
1819         (WebCore::RenderThemeSafari::setFontFromControlSize):
1820
1821 2015-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
1822
1823         http/tests/misc/acid3.html is flakey on Mavericks
1824         https://bugs.webkit.org/show_bug.cgi?id=140253
1825
1826         Reviewed by Alexey Proskuryakov.
1827
1828         CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
1829         if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
1830         often create typesetters in the complex code path, so it's not obvious when this bug
1831         might present itself. This patch simply makes a dummy invocation of
1832         CTFontTransformGlyphs() when creating a SimpleFontData.
1833
1834         No new tests because this is covered by http/tests/misc/acid3.html.
1835
1836         * platform/graphics/mac/SimpleFontDataMac.mm:
1837         (WebCore::SimpleFontData::platformInit):
1838
1839 2015-01-15  Chris Dumez  <cdumez@apple.com>
1840
1841         Get rid of custom StyleBuilder code for 'line-height' CSS property
1842         https://bugs.webkit.org/show_bug.cgi?id=140462
1843
1844         Reviewed by Antti Koivisto.
1845
1846         Get rid of custom StyleBuilder code for 'line-height' CSS property by
1847         using a conditional converter.
1848
1849         * css/CSSPropertyNames.in:
1850         * css/StyleBuilderConverter.h:
1851         (WebCore::StyleBuilderConverter::convertLineHeight):
1852         * css/StyleBuilderCustom.h:
1853         (WebCore::StyleBuilderCustom::applyValueLineHeight):
1854         (WebCore::StyleBuilderCustom::convertLineHeight): Deleted.
1855
1856 2015-01-15  Antti Koivisto  <antti@apple.com>
1857
1858         Rename Font to FontCascade
1859         https://bugs.webkit.org/show_bug.cgi?id=140442
1860
1861         Reviewed by Darin Adler.
1862
1863         We can then rename SimpleFontData to Font. This will match the usual definition of a "font".
1864
1865 2015-01-15  Mihnea Ovidenie  <mihnea@adobe.com>
1866
1867         [CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
1868         https://bugs.webkit.org/show_bug.cgi?id=140441
1869
1870         Reviewed by Andrei Bucur.
1871
1872         When showing the render tree debug information for an element inside a flow thread,
1873         we will display the region range information for all the render boxes. To avoid
1874         computation of flow thread containing block in these situations, we will use
1875         only the cached flow thread containing block information.
1876
1877         No new tests as this code path is only touched when using showRenderTree* methods.
1878
1879         * rendering/RenderObject.cpp:
1880         (WebCore::flowThreadContainingBlockFromRenderer):
1881         (WebCore::RenderObject::showRegionsInformation):
1882
1883 2015-01-14  Simon Fraser  <simon.fraser@apple.com>
1884
1885         Graphics corruption after Find on some pages
1886         https://bugs.webkit.org/show_bug.cgi?id=140489
1887
1888         Reviewed by Zalan Bujtas.
1889         
1890         After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
1891         garbage could appear on some parts of the page. This is caused by creating
1892         a compositing layer which is marked as opaque, yet failing to paint the entire
1893         layer contents.
1894         
1895         This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
1896         logic. On the page in question, doing a Find could cause overflow:hidden sections
1897         to get scrolled (since Find can reveal the selection by scrolling overflow).
1898         However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
1899         fails to take overflow scrolling into account, so gives the wrong answer
1900         in some content configurations. As a result, we'd think that the background
1901         is obscured, and never paint it.
1902         
1903         Conservative fix is to have isCandidateForOpaquenessTest() return false
1904         when the content has any non-zero scroll offset.
1905
1906         Tests: compositing/contents-opaque/opaque-with-scrolled.html
1907                fast/backgrounds/opaque-scrolled-paint-background.html
1908
1909         * rendering/RenderBox.cpp:
1910         (WebCore::isCandidateForOpaquenessTest):
1911
1912 2015-01-14  Jer Noble  <jer.noble@apple.com>
1913
1914         [Mac][MSE] Stalled YouTube playback does not allow display to sleep.
1915         https://bugs.webkit.org/show_bug.cgi?id=140468
1916         rdar://problem/19171162
1917
1918         Reviewed by Eric Carlson.
1919
1920         Test: media/media-source/media-source-stalled-holds-sleep-assertion.html
1921
1922         The unstated convention of MediaPlayerPrivate::paused() is that implementations should 
1923         return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
1924         was returning 'false' if it was supposed to be playing, regardless of the actual rate.
1925         This caused a check in HTMLMediaElement of whether to release the sleep assertion token
1926         to fail, thinking the media engine was still playing.
1927
1928         Add some testing infrastructure to allow us to test whether the media element is disabling
1929         display sleep from within layout tests.
1930
1931         * html/HTMLMediaElement.h:
1932         (WebCore::HTMLMediaElement::isDisablingSleep):
1933         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1934         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
1935         * testing/Internals.cpp:
1936         (WebCore::Internals::elementIsBlockingDisplaySleep):
1937         * testing/Internals.h:
1938         * testing/Internals.idl:
1939
1940 2015-01-14  Zalan Bujtas  <zalan@apple.com>
1941
1942         Move LayoutFragment and ClipRect to their own files.
1943         https://bugs.webkit.org/show_bug.cgi?id=140457
1944
1945         Reviewed by Simon Fraser.
1946
1947         Move these classes to their own files to to make RenderLayer.h less heavy.
1948
1949         No change in functionality.
1950
1951         * WebCore.xcodeproj/project.pbxproj:
1952         * rendering/ClipRect.cpp: Added.
1953         (WebCore::ClipRect::intersects):
1954         * rendering/ClipRect.h: Added.
1955         (WebCore::ClipRect::ClipRect):
1956         (WebCore::ClipRect::rect):
1957         (WebCore::ClipRect::setRect):
1958         (WebCore::ClipRect::affectedByRadius):
1959         (WebCore::ClipRect::setAffectedByRadius):
1960         (WebCore::ClipRect::operator==):
1961         (WebCore::ClipRect::operator!=):
1962         (WebCore::ClipRect::intersect):
1963         (WebCore::ClipRect::move):
1964         (WebCore::ClipRect::moveBy):
1965         (WebCore::ClipRect::isEmpty):
1966         (WebCore::ClipRect::intersects):
1967         (WebCore::ClipRect::inflateX):
1968         (WebCore::ClipRect::inflateY):
1969         (WebCore::ClipRect::inflate):
1970         (WebCore::intersection):
1971         * rendering/LayerFragment.h: Added.
1972         (WebCore::LayerFragment::setRects):
1973         (WebCore::LayerFragment::moveBy):
1974         (WebCore::LayerFragment::intersect):
1975         * rendering/RenderFlowThread.h:
1976         * rendering/RenderLayer.cpp:
1977         (WebCore::ClipRect::intersects): Deleted.
1978         * rendering/RenderLayer.h:
1979         (WebCore::ClipRect::ClipRect): Deleted.
1980         (WebCore::ClipRect::rect): Deleted.
1981         (WebCore::ClipRect::setRect): Deleted.
1982         (WebCore::ClipRect::affectedByRadius): Deleted.
1983         (WebCore::ClipRect::setAffectedByRadius): Deleted.
1984         (WebCore::ClipRect::operator==): Deleted.
1985         (WebCore::ClipRect::operator!=): Deleted.
1986         (WebCore::ClipRect::intersect): Deleted.
1987         (WebCore::ClipRect::move): Deleted.
1988         (WebCore::ClipRect::moveBy): Deleted.
1989         (WebCore::ClipRect::isEmpty): Deleted.
1990         (WebCore::ClipRect::intersects): Deleted.
1991         (WebCore::ClipRect::inflateX): Deleted.
1992         (WebCore::ClipRect::inflateY): Deleted.
1993         (WebCore::ClipRect::inflate): Deleted.
1994         (WebCore::intersection): Deleted.
1995         (WebCore::LayerFragment::LayerFragment): Deleted.
1996         (WebCore::LayerFragment::setRects): Deleted.
1997         (WebCore::LayerFragment::moveBy): Deleted.
1998         (WebCore::LayerFragment::intersect): Deleted.
1999         * rendering/RenderMultiColumnSet.h:
2000         * rendering/RenderRegion.h:
2001         * rendering/RenderTreeAsText.cpp:
2002
2003 2015-01-14  Commit Queue  <commit-queue@webkit.org>
2004
2005         Unreviewed, rolling out r178438.
2006         https://bugs.webkit.org/show_bug.cgi?id=140484
2007
2008         Broke a few MediaSource tests (Requested by JoePeck on
2009         #webkit).
2010
2011         Reverted changeset:
2012
2013         "[MSE] Implement per TrackBuffer buffered."
2014         https://bugs.webkit.org/show_bug.cgi?id=139813
2015         http://trac.webkit.org/changeset/178438
2016
2017 2015-01-14  Enrica Casucci  <enrica@apple.com>
2018
2019         REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
2020         https://bugs.webkit.org/show_bug.cgi?id=137902
2021         rdar://problem/18568864
2022
2023         Reviewed by Darin Adler.
2024
2025         Test: editing/text-iterator/invalid-subrange.html
2026
2027         characterSubrange should check the iterator position after each advance.
2028         This changed adds a new method to the Internals object to be able to test this.
2029
2030         * editing/TextIterator.cpp:
2031         (WebCore::characterSubrange):
2032         (WebCore::TextIterator::subrange):
2033         (WebCore::findPlainText):
2034         * testing/Internals.cpp:
2035         (WebCore::Internals::subrange):
2036         * testing/Internals.h:
2037         * testing/Internals.idl:
2038
2039 2015-01-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
2040
2041         REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
2042         https://bugs.webkit.org/show_bug.cgi?id=139690.
2043
2044         Reviewed by Daniel Bates.
2045
2046         Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
2047         the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
2048         was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
2049         Then we were returning the first element of these descendants, which may not be an immediate
2050         child of the element, as the title of the SVGElement. This was the reason of this bug. The
2051         fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
2052         children of an SVGElement.
2053
2054         Also we were not following exactly the specs for the rootmost SVG element's title value.
2055         According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
2056         should not return a title. But we were not returning a title for the rootmost SVG element
2057         always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
2058         of the element isSVGDocument().
2059         
2060         NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
2061         16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
2062         Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
2063         the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
2064         Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
2065         and the stand-alone SVG cases. And it seems this what we should rely on.
2066
2067         Test: svg/hittest/svg-standalone-tooltip.svg
2068               svg/hittest/svg-embedded-tooltip.html
2069
2070         * WebCore.exp.in:
2071         * rendering/HitTestResult.h:
2072         Make HitTestResult::setInnerNode be WEBCORE_EXPORT
2073         
2074         * svg/SVGElement.cpp:
2075         (WebCore::SVGElement::title):
2076         Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
2077         Fix the title value of the rootmost SVG element.
2078         
2079         * testing/Internals.cpp:
2080         (WebCore::Internals::toolTipFromElement):
2081         * testing/Internals.h:
2082         * testing/Internals.idl:
2083         Add a new internal function toolTipFromElement() which returns the tooltip text for a
2084         given element.
2085
2086 2015-01-14  Csaba Osztrogonác  <ossy@webkit.org>
2087
2088         Buildfix after r178434
2089         https://bugs.webkit.org/show_bug.cgi?id=140467
2090
2091         Reviewed by Chris Dumez.
2092
2093         * css/StyleBuilderConverter.h:
2094         (WebCore::StyleBuilderConverter::convertPerspective):
2095
2096 2015-01-14  Benjamin Poulain  <bpoulain@apple.com>
2097
2098         Build fix for NFAToDFA on ARM
2099
2100         * contentextensions/NFAToDFA.cpp:
2101         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
2102         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
2103
2104 2015-01-14  Bartlomiej Gajda  <b.gajda@samsung.com>
2105
2106         [MSE] Implement per TrackBuffer buffered.
2107         https://bugs.webkit.org/show_bug.cgi?id=139813.
2108
2109         Reviewed by Jer Noble.
2110
2111         Added implementation of SourceBuffer buffered() algorithm as per specification,
2112         and caching mechanism called when samples are added, removed, or MediaSource
2113         readyState is changed.
2114
2115         Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
2116                media/media-source/media-source-multiple-trackBuffers-buffered.html
2117
2118         * Modules/mediasource/MediaSource.cpp:
2119         (WebCore::MediaSource::setReadyState):
2120         * Modules/mediasource/SourceBuffer.cpp:
2121         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
2122         (WebCore::SourceBuffer::SourceBuffer):
2123         (WebCore::SourceBuffer::buffered):
2124         (WebCore::SourceBuffer::invalidateBuffered):
2125         (WebCore::SourceBuffer::recalculateBuffered):
2126         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2127         (WebCore::SourceBuffer::removeCodedFrames):
2128         (WebCore::SourceBuffer::evictCodedFrames):
2129         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2130         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
2131         (WebCore::SourceBuffer::hasCurrentTime):
2132         * Modules/mediasource/SourceBuffer.h:
2133
2134 2015-01-14  Benjamin Poulain  <benjamin@webkit.org>
2135
2136         Do not create new set for every sub-operation when converting a NFA to DFA
2137         https://bugs.webkit.org/show_bug.cgi?id=140380
2138
2139         Reviewed by Andreas Kling.
2140
2141         This is the first step toward making the NFA-to-DFA conversion more scalable: instead
2142         of creating new sets for each step of the algorithm, we use two kinds of sets
2143         and never do any copy.
2144
2145         The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
2146         state. It is unique per DFA state.
2147
2148         HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.
2149
2150         The creation of new sets now goes like this:
2151         1) Get a NodeIdSet for each possible transition.
2152         2) For each transition:
2153            2a) Extend the NodeIdSet in place with its epsilon closure.
2154            2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
2155            2c) If the UniqueNodeIdSetImpl is new, queue it for processing.
2156
2157         * WebCore.xcodeproj/project.pbxproj:
2158         * contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
2159         * contentextensions/ContentExtensionsBackend.cpp:
2160         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2161         * contentextensions/ContentExtensionsManager.cpp:
2162         (WebCore::ContentExtensions::ExtensionsManager::loadExtension):
2163         Added some logging to inspect more easily what the clients are sending.
2164
2165         * contentextensions/DFA.cpp:
2166         * contentextensions/DFA.h:
2167         * contentextensions/DFANode.h:
2168         * contentextensions/NFA.cpp:
2169         * contentextensions/NFA.h:
2170         * contentextensions/NFAToDFA.cpp:
2171
2172         (WebCore::ContentExtensions::epsilonClosure):
2173         Instead of returning a new HashSet, extend the input HashSet.
2174
2175         (WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
2176         (WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
2177         (WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
2178         (WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
2179         (WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
2180         (WebCore::ContentExtensions::UniqueNodeIdSet::impl):
2181         (WebCore::ContentExtensions::UniqueNodeIdSet::hash):
2182         (WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
2183         (WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
2184         (WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
2185         (WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
2186         UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.
2187
2188         It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
2189         from a NodeIdSet.
2190
2191         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
2192         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
2193         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
2194         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
2195         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
2196         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
2197         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
2198         (WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
2199         (WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
2200         (WebCore::ContentExtensions::NFAToDFA::convert):
2201         (WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
2202         (WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
2203         (WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
2204         (WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
2205         (WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
2206         (WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
2207         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
2208         (WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
2209         (WebCore::ContentExtensions::addDFAState): Deleted.
2210
2211 2015-01-14  Chris Dumez  <cdumez@apple.com>
2212
2213         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
2214         https://bugs.webkit.org/show_bug.cgi?id=140347
2215
2216         Reviewed by Darin Adler.
2217
2218         Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
2219         - Removing the static_cast to the destination type in the generated
2220           StyleBuilder code and let compiler implicitly convert the
2221           CSSPrimitiveValue to the setter's argument type.
2222         - Updating conditional converters to return a WTF::Optional<>
2223           instead of returning a boolean and having an output argument
2224           passed by reference. This way, we can use "auto" in the generated
2225           StyleBuilder code to deduce the return type.
2226
2227         * css/CSSPropertyNames.in:
2228         Drop TypeName parameter from all properties as it is no longer needed.
2229
2230         * css/StyleBuilderConverter.h:
2231         (WebCore::StyleBuilderConverter::convertGridTrackSize):
2232         (WebCore::StyleBuilderConverter::convertGridPosition):
2233         (WebCore::StyleBuilderConverter::convertWordSpacing):
2234         (WebCore::StyleBuilderConverter::convertPerspective):
2235         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
2236         (WebCore::StyleBuilderConverter::convertFilterOperations):
2237         (WebCore::StyleBuilderConverter::convertMaskImageOperations):
2238         Update conditional converters to return an Optional<>.
2239
2240         * css/makeprop.pl:
2241         (generateValueSetter):
2242         Drop support for TypeName, stop using static_cast to destination
2243         type and update the generated code now that the conditional
2244         converters return an Optional.
2245
2246         * platform/efl/RenderThemeEfl.cpp:
2247         (WebCore::RenderThemeEfl::systemFont):
2248         * platform/graphics/Font.cpp:
2249         (WebCore::Font::Font):
2250         * platform/graphics/FontDescription.h:
2251         (WebCore::FontDescription::setIsItalic):
2252         (WebCore::FontDescription::setIsSmallCaps):
2253         (WebCore::FontDescription::setItalic): Deleted.
2254         (WebCore::FontDescription::setSmallCaps): Deleted.
2255         * rendering/RenderThemeGtk.cpp:
2256         (WebCore::RenderThemeGtk::systemFont):
2257         * rendering/RenderThemeIOS.mm:
2258         (WebCore::RenderThemeIOS::systemFont):
2259         * rendering/RenderThemeMac.mm:
2260         (WebCore::RenderThemeMac::systemFont):
2261         * rendering/RenderThemeSafari.cpp:
2262         (WebCore::RenderThemeSafari::systemFont):
2263         * rendering/RenderThemeWin.cpp:
2264         (WebCore::fillFontDescription):
2265         * rendering/mathml/RenderMathMLToken.cpp:
2266         (WebCore::RenderMathMLToken::updateStyle):
2267         Now that we call the RenderStyle setters with a CSSPrimitiveValue
2268         and let it be implicitly converted to the right type, instead of
2269         doing an explicit static_cast, two setters on FontDescription
2270         were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
2271         taking a boolean in argument to setIsItalic() / setIsSmallCaps()
2272         to resolve the ambiguity.
2273
2274 2015-01-14  Jer Noble  <jer.noble@apple.com>
2275
2276         Null-deref crash when seeking immediately before looping.
2277         https://bugs.webkit.org/show_bug.cgi?id=140394
2278
2279         Reviewed by Eric Carlson.
2280
2281         It is possible for finishSeek() to be called when a seek() has caused a pending seek task
2282         to be scheduled, but before that pending seek task is run. In this case, if a seek request
2283         is issued, the existing pending seek task will not be cancelled, which will cause a crash
2284         when the pending seek task is run.
2285
2286         When checking whether an existing seek task needs to be cancelled, check the actual timer,
2287         rather than the m_seeking boolean, so that this case is covered.
2288
2289         Test: media/video-ended-seek-crash.html
2290
2291         * html/HTMLMediaElement.cpp:
2292         (WebCore::HTMLMediaElement::seekWithTolerance):
2293
2294 2015-01-14  Brent Fulgham  <bfulgham@apple.com>
2295
2296         [Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
2297         https://bugs.webkit.org/show_bug.cgi?id=140425
2298
2299         Reviewed by Anders Carlsson.
2300
2301         * platform/win/CursorWin.cpp:
2302         (WebCore::createSharedCursor): Return nullptr when operating system
2303         cannot support the requested icon specification.
2304         (WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
2305         returning nullptr, and fall back to the default icon construction.
2306
2307 2015-01-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2308
2309         REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
2310         https://bugs.webkit.org/show_bug.cgi?id=140437
2311
2312         Reviewed by Philippe Normand.
2313
2314         Add implementation for MediaPlayerPrivate::rate() to GStreamer
2315         media backend.
2316
2317         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2318         (WebCore::MediaPlayerPrivateGStreamer::rate):
2319         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2320
2321 2015-01-13  Commit Queue  <commit-queue@webkit.org>
2322
2323         Unreviewed, rolling out r178390, r178392, r178398, r178400,
2324         r178402, and r178410.
2325         https://bugs.webkit.org/show_bug.cgi?id=140431
2326
2327         Way too many failures to skip (Requested by ap_ on #webkit).
2328
2329         Reverted changesets:
2330
2331         "WebGL2: Support webgl2 context creation."
2332         https://bugs.webkit.org/show_bug.cgi?id=126408
2333         http://trac.webkit.org/changeset/178390
2334
2335         "Unreviewed iOS build fix after r178390."
2336         http://trac.webkit.org/changeset/178392
2337
2338         "[Unreviewed] Windows build fix after r178390."
2339         http://trac.webkit.org/changeset/178398
2340
2341         "[Unreviewed] Speculative test fix after r178390."
2342         http://trac.webkit.org/changeset/178400
2343
2344         "[Unreviewed] Skip webgl tests for temporarily."
2345         https://bugs.webkit.org/show_bug.cgi?id=140423
2346         http://trac.webkit.org/changeset/178402
2347
2348         "[EFL] Fix build after r178390"
2349         https://bugs.webkit.org/show_bug.cgi?id=140424
2350         http://trac.webkit.org/changeset/178410
2351
2352 2015-01-13  Hunseop Jeong  <hs85.jeong@samsung.com>
2353
2354         [EFL] Fix build after r178390 
2355         https://bugs.webkit.org/show_bug.cgi?id=140424
2356
2357         Reviewed by Csaba Osztrogonác.
2358
2359         * CMakeLists.txt: 
2360
2361 2015-01-13  Zalan Bujtas  <zalan@apple.com>
2362
2363         Simple line layout: Refactor TextFragment class.
2364         https://bugs.webkit.org/show_bug.cgi?id=140417
2365
2366         Reviewed by Andreas Kling.
2367
2368         Introduce text fragment type and use class member initializers.
2369
2370         No change in functionality.
2371
2372         * rendering/SimpleLineLayout.cpp:
2373         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
2374         (WebCore::SimpleLineLayout::LineState::addUncommitted):
2375         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
2376         (WebCore::SimpleLineLayout::nextFragment):
2377         (WebCore::SimpleLineLayout::createLineRuns):
2378
2379 2015-01-13  Commit Queue  <commit-queue@webkit.org>
2380
2381         Unreviewed, rolling out r178400.
2382         https://bugs.webkit.org/show_bug.cgi?id=140422
2383
2384         Test fix breaks build (Requested by rfong on #webkit).
2385
2386         Reverted changeset:
2387
2388         "[Unreviewed] Speculative test fix after r178390."
2389         http://trac.webkit.org/changeset/178400
2390
2391 2015-01-13  Roger Fong  <roger_fong@apple.com>
2392
2393         [Unreviewed] Speculative test fix after r178390.
2394
2395         * html/canvas/WebGL1RenderingContext.idl:
2396
2397 2015-01-13  Roger Fong  <roger_fong@apple.com>
2398
2399         [Unreviewed] Windows build fix after r178390.
2400
2401         * DerivedSources.cpp:
2402         * WebCore.vcxproj/WebCore.vcxproj:
2403         * WebCore.vcxproj/WebCore.vcxproj.filters:
2404         * bindings/js/JSBindingsAllInOne.cpp:
2405         * html/canvas/WebGLRenderingContextBase.cpp:
2406         (WebCore::WebGLRenderingContextBase::create):
2407
2408 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
2409
2410         NSButtonCell leak allocated under WebCore::paintToggleButton
2411         https://bugs.webkit.org/show_bug.cgi?id=137014
2412
2413         Reviewed by Alexey Proskuryakov.
2414
2415         * platform/mac/ThemeMac.mm:
2416         (WebCore::createToggleButtonCell):
2417         Immediately adopt the NSButtonCell allocation.
2418
2419         (WebCore::sharedRadioCell):
2420         (WebCore::sharedCheckboxCell):
2421         Move from the RetainPtr into the static variable.
2422
2423         (WebCore::paintToggleButton):
2424         Use RetainPtr logic to better manage lifetimes.
2425
2426 2015-01-13  Zalan Bujtas  <zalan@apple.com>
2427
2428         Simple line layout: Refactor SimpleLineLayout::nextFragment().
2429         https://bugs.webkit.org/show_bug.cgi?id=140407
2430
2431         Reviewed by Andreas Kling.
2432
2433         Simplify the code by using content specific branches with early returns.
2434
2435         No change in functionality.
2436
2437         * rendering/SimpleLineLayout.cpp:
2438         (WebCore::SimpleLineLayout::nextFragment):
2439
2440 2015-01-13  Chris Dumez  <cdumez@apple.com>
2441
2442         Unreviewed iOS build fix after r178390.
2443
2444         * html/canvas/CanvasRenderingContext2D.cpp:
2445         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2446         m_type is undeclared.
2447
2448         * html/canvas/WebGLContextGroup.h:
2449         Fix bad include.
2450
2451 2015-01-13  Roger Fong  <roger_fong@apple.com>
2452
2453         WebGL2: Support webgl2 context creation.
2454         https://bugs.webkit.org/show_bug.cgi?id=126408
2455         <rdar://problem/15002170>
2456
2457         Reviewed by Dean Jackson.
2458
2459         Tests covered by existing Khronos tests for WebGL 1.0 conformance.
2460
2461         Create a WebGLRenderingContextBase class that extends to a WebGL1RenderingContext and WebGL2RenderingContext.
2462         Replace all previous instances of WebGLRenderingContext usages with WebGLRenderingContextBase usages for now.
2463         As the first step, the WebGL1 and WebGL2 contexts will have the exact same functionality.
2464
2465         * CMakeLists.txt:
2466         * DerivedSources.make:
2467         * WebCore.xcodeproj/project.pbxproj:
2468         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2469         (WebCore::toJS):
2470         * bindings/js/JSDocumentCustom.cpp:
2471         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2472         * bindings/js/JSWebGL1RenderingContextCustom.cpp: Copied from Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp.
2473         * bindings/js/JSWebGL2RenderingContextCustom.cpp: Added.
2474         (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren):
2475         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Added.
2476         * bindings/js/JSWebGLRenderingContextCustom.cpp: Removed.
2477         * bindings/scripts/CodeGeneratorJS.pm:
2478         (GenerateImplementation):
2479         * html/HTMLCanvasElement.cpp:
2480         (WebCore::HTMLCanvasElement::getContext):
2481         (WebCore::HTMLCanvasElement::is3dType):
2482         (WebCore::HTMLCanvasElement::reset):
2483         (WebCore::HTMLCanvasElement::paint):
2484         (WebCore::HTMLCanvasElement::getImageData):
2485         * html/canvas/ANGLEInstancedArrays.cpp:
2486         (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
2487         (WebCore::ANGLEInstancedArrays::supported):
2488         * html/canvas/ANGLEInstancedArrays.h:
2489         * html/canvas/CanvasRenderingContext.h:
2490         (WebCore::CanvasRenderingContext::type):
2491         * html/canvas/CanvasRenderingContext2D.cpp:
2492         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2493         * html/canvas/EXTBlendMinMax.cpp:
2494         (WebCore::EXTBlendMinMax::EXTBlendMinMax):
2495         * html/canvas/EXTBlendMinMax.h:
2496         * html/canvas/EXTFragDepth.cpp:
2497         (WebCore::EXTFragDepth::EXTFragDepth):
2498         * html/canvas/EXTFragDepth.h:
2499         * html/canvas/EXTShaderTextureLOD.cpp:
2500         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
2501         * html/canvas/EXTShaderTextureLOD.h:
2502         * html/canvas/EXTTextureFilterAnisotropic.cpp:
2503         (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):
2504         * html/canvas/EXTTextureFilterAnisotropic.h:
2505         * html/canvas/EXTsRGB.cpp:
2506         (WebCore::EXTsRGB::EXTsRGB):
2507         * html/canvas/EXTsRGB.h:
2508         * html/canvas/OESElementIndexUint.cpp:
2509         (WebCore::OESElementIndexUint::OESElementIndexUint):
2510         * html/canvas/OESElementIndexUint.h:
2511         * html/canvas/OESStandardDerivatives.cpp:
2512         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
2513         * html/canvas/OESStandardDerivatives.h:
2514         * html/canvas/OESTextureFloat.cpp:
2515         (WebCore::OESTextureFloat::OESTextureFloat):
2516         * html/canvas/OESTextureFloat.h:
2517         * html/canvas/OESTextureFloatLinear.cpp:
2518         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
2519         * html/canvas/OESTextureFloatLinear.h:
2520         * html/canvas/OESTextureHalfFloat.cpp:
2521         (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
2522         * html/canvas/OESTextureHalfFloat.h:
2523         * html/canvas/OESTextureHalfFloatLinear.cpp:
2524         (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):
2525         * html/canvas/OESTextureHalfFloatLinear.h:
2526         * html/canvas/OESVertexArrayObject.cpp:
2527         (WebCore::OESVertexArrayObject::OESVertexArrayObject):
2528         * html/canvas/OESVertexArrayObject.h:
2529         * html/canvas/WebGL1RenderingContext.cpp: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.cpp.
2530         * html/canvas/WebGL1RenderingContext.h: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.h.
2531         * html/canvas/WebGL1RenderingContext.idl: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.idl.
2532         * html/canvas/WebGL2RenderingContext.cpp: Added.
2533         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
2534         * html/canvas/WebGL2RenderingContext.h: Added.
2535         * html/canvas/WebGL2RenderingContext.idl: Added.
2536         * html/canvas/WebGLBuffer.cpp:
2537         (WebCore::WebGLBuffer::create):
2538         (WebCore::WebGLBuffer::WebGLBuffer):
2539         * html/canvas/WebGLBuffer.h:
2540         * html/canvas/WebGLCompressedTextureATC.cpp:
2541         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
2542         (WebCore::WebGLCompressedTextureATC::supported):
2543         * html/canvas/WebGLCompressedTextureATC.h:
2544         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
2545         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
2546         (WebCore::WebGLCompressedTexturePVRTC::supported):
2547         * html/canvas/WebGLCompressedTexturePVRTC.h:
2548         * html/canvas/WebGLCompressedTextureS3TC.cpp:
2549         (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
2550         (WebCore::WebGLCompressedTextureS3TC::supported):
2551         * html/canvas/WebGLCompressedTextureS3TC.h:
2552         * html/canvas/WebGLContextGroup.cpp:
2553         (WebCore::WebGLContextGroup::getAGraphicsContext3D):
2554         (WebCore::WebGLContextGroup::addContext):
2555         (WebCore::WebGLContextGroup::removeContext):
2556         (WebCore::WebGLContextGroup::loseContextGroup):
2557         * html/canvas/WebGLContextGroup.h:
2558         * html/canvas/WebGLContextObject.cpp:
2559         (WebCore::WebGLContextObject::WebGLContextObject):
2560         * html/canvas/WebGLContextObject.h:
2561         (WebCore::WebGLContextObject::context):
2562         * html/canvas/WebGLDebugRendererInfo.cpp:
2563         (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):
2564         * html/canvas/WebGLDebugRendererInfo.h:
2565         * html/canvas/WebGLDebugShaders.cpp:
2566         (WebCore::WebGLDebugShaders::WebGLDebugShaders):
2567         * html/canvas/WebGLDebugShaders.h:
2568         * html/canvas/WebGLDepthTexture.cpp:
2569         (WebCore::WebGLDepthTexture::WebGLDepthTexture):
2570         * html/canvas/WebGLDepthTexture.h:
2571         * html/canvas/WebGLDrawBuffers.cpp:
2572         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
2573         (WebCore::WebGLDrawBuffers::supported):
2574         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
2575         * html/canvas/WebGLDrawBuffers.h:
2576         * html/canvas/WebGLExtension.cpp:
2577         (WebCore::WebGLExtension::WebGLExtension):
2578         * html/canvas/WebGLExtension.h:
2579         (WebCore::WebGLExtension::context):
2580         * html/canvas/WebGLFramebuffer.cpp:
2581         (WebCore::WebGLFramebuffer::create):
2582         (WebCore::WebGLFramebuffer::WebGLFramebuffer):
2583         * html/canvas/WebGLFramebuffer.h:
2584         * html/canvas/WebGLLoseContext.cpp:
2585         (WebCore::WebGLLoseContext::WebGLLoseContext):
2586         (WebCore::WebGLLoseContext::loseContext):
2587         * html/canvas/WebGLLoseContext.h:
2588         * html/canvas/WebGLObject.cpp:
2589         (WebCore::WebGLObject::WebGLObject):
2590         * html/canvas/WebGLObject.h:
2591         * html/canvas/WebGLProgram.cpp:
2592         (WebCore::WebGLProgram::create):
2593         (WebCore::WebGLProgram::WebGLProgram):
2594         * html/canvas/WebGLProgram.h:
2595         * html/canvas/WebGLRenderbuffer.cpp:
2596         (WebCore::WebGLRenderbuffer::create):
2597         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
2598         * html/canvas/WebGLRenderbuffer.h:
2599         * html/canvas/WebGLRenderingContext.cpp: Removed.
2600         * html/canvas/WebGLRenderingContext.h: Removed.
2601         * html/canvas/WebGLRenderingContext.idl: Removed.
2602         * html/canvas/WebGLRenderingContextBase.cpp: Added.
2603         * html/canvas/WebGLRenderingContextBase.h: Added.
2604         * html/canvas/WebGLRenderingContextBase.idl: Added.
2605         * html/canvas/WebGLShader.cpp:
2606         (WebCore::WebGLShader::create):
2607         (WebCore::WebGLShader::WebGLShader):
2608         * html/canvas/WebGLShader.h:
2609         * html/canvas/WebGLSharedObject.cpp:
2610         (WebCore::WebGLSharedObject::WebGLSharedObject):
2611         * html/canvas/WebGLSharedObject.h:
2612         * html/canvas/WebGLTexture.cpp:
2613         (WebCore::WebGLTexture::create):
2614         (WebCore::WebGLTexture::WebGLTexture):
2615         * html/canvas/WebGLTexture.h:
2616         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2617         (WebCore::WebGLVertexArrayObjectOES::create):
2618         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
2619         * html/canvas/WebGLVertexArrayObjectOES.h:
2620
2621 2015-01-13  Chris Dumez  <cdumez@apple.com>
2622
2623         Unreviewed, fix Mac build after r178388
2624
2625         FontRanges::isEmpty() -> FontRanges::isNull().
2626
2627         * platform/graphics/mac/FontComplexTextMac.cpp:
2628         (WebCore::Font::fontDataForCombiningCharacterSequence):
2629
2630 2015-01-13  Antti Koivisto  <antti@apple.com>
2631
2632         Devirtualize FontData
2633         https://bugs.webkit.org/show_bug.cgi?id=140390
2634
2635         Reviewed by Andreas Kling.
2636
2637         This patch removes the FontData base class and turns SegmentedFontData into a non-virtual FontRanges type.
2638
2639         SimpleFontData remains as is (without the base) and it can be renamed later to something more sensible.
2640
2641         * WebCore.exp.in:
2642         * WebCore.xcodeproj/project.pbxproj:
2643         * css/CSSFontSelector.cpp:
2644         (WebCore::CSSFontSelector::fontRangesForFamily):
2645         (WebCore::CSSFontSelector::fallbackFontDataAt):
2646         (WebCore::CSSFontSelector::getFontData): Deleted.
2647         (WebCore::CSSFontSelector::getFallbackFontData): Deleted.
2648         * css/CSSFontSelector.h:
2649         * css/CSSSegmentedFontFace.cpp:
2650         (WebCore::CSSSegmentedFontFace::pruneTable):
2651         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading):
2652         (WebCore::CSSSegmentedFontFace::fontRanges):
2653         (WebCore::CSSSegmentedFontFace::loadFont):
2654         (WebCore::CSSSegmentedFontFace::getFontData): Deleted.
2655         * css/CSSSegmentedFontFace.h:
2656         * platform/graphics/Font.h:
2657         (WebCore::Font::fallbackRangesAt):
2658         (WebCore::Font::fontDataAt): Deleted.
2659         * platform/graphics/FontData.cpp: Removed.
2660         * platform/graphics/FontData.h: Removed.
2661         * platform/graphics/FontGlyphs.cpp:
2662         (WebCore::FontGlyphs::FontGlyphs):
2663         (WebCore::FontGlyphs::determinePitch):
2664         (WebCore::FontGlyphs::isLoadingCustomFonts):
2665         (WebCore::realizeNextFallback):
2666         (WebCore::FontGlyphs::realizeFallbackRangesAt):
2667         (WebCore::FontGlyphs::glyphDataForSystemFallback):
2668         (WebCore::FontGlyphs::glyphDataForVariant):
2669         (WebCore::FontGlyphs::glyphDataForNormalVariant):
2670         (WebCore::glyphPageFromFontRanges):
2671         (WebCore::FontGlyphs::glyphDataForCharacter):
2672         (WebCore::realizeNextFamily): Deleted.
2673         (WebCore::FontGlyphs::realizeFontDataAt): Deleted.
2674         (WebCore::glyphPageFromFontData): Deleted.
2675         * platform/graphics/FontGlyphs.h:
2676         (WebCore::FontGlyphs::primarySimpleFontData):
2677         * platform/graphics/FontRanges.cpp: Copied from Source/WebCore/platform/graphics/SegmentedFontData.cpp.
2678         (WebCore::FontRanges::FontRanges):
2679         (WebCore::FontRanges::~FontRanges):
2680         (WebCore::FontRanges::fontDataForCharacter):
2681         (WebCore::FontRanges::fontDataForFirstRange):
2682         (WebCore::FontRanges::isLoading):
2683         (WebCore::SegmentedFontData::SegmentedFontData): Deleted.
2684         (WebCore::SegmentedFontData::~SegmentedFontData): Deleted.
2685         (WebCore::SegmentedFontData::simpleFontDataForCharacter): Deleted.
2686         (WebCore::SegmentedFontData::simpleFontDataForFirstRange): Deleted.
2687         (WebCore::SegmentedFontData::isCustomFont): Deleted.
2688         (WebCore::SegmentedFontData::isLoading): Deleted.
2689         (WebCore::SegmentedFontData::isSegmented): Deleted.
2690         (WebCore::SegmentedFontData::description): Deleted.
2691         * platform/graphics/FontRanges.h: Copied from Source/WebCore/platform/graphics/SegmentedFontData.h.
2692         (WebCore::FontRanges::Range::Range):
2693         (WebCore::FontRanges::Range::from):
2694         (WebCore::FontRanges::Range::to):
2695         (WebCore::FontRanges::Range::fontData):
2696         (WebCore::FontRanges::isEmpty):
2697         (WebCore::FontRanges::appendRange):
2698         (WebCore::FontRanges::size):
2699         (WebCore::FontRanges::rangeAt):
2700         (WebCore::FontDataRange::FontDataRange): Deleted.
2701         (WebCore::FontDataRange::from): Deleted.
2702         (WebCore::FontDataRange::to): Deleted.
2703         (WebCore::FontDataRange::fontData): Deleted.
2704         (WebCore::SegmentedFontData::create): Deleted.
2705         (WebCore::SegmentedFontData::appendRange): Deleted.
2706         (WebCore::SegmentedFontData::numRanges): Deleted.
2707         (WebCore::SegmentedFontData::rangeAt): Deleted.
2708         (isType): Deleted.
2709         * platform/graphics/FontSelector.h:
2710         * platform/graphics/SegmentedFontData.cpp: Removed.
2711         * platform/graphics/SegmentedFontData.h: Removed.
2712         * platform/graphics/SimpleFontData.cpp:
2713         (WebCore::SimpleFontData::simpleFontDataForCharacter): Deleted.
2714         (WebCore::SimpleFontData::simpleFontDataForFirstRange): Deleted.
2715         (WebCore::SimpleFontData::isSegmented): Deleted.
2716         * platform/graphics/SimpleFontData.h:
2717         (WebCore::SimpleFontData::isCustomFont):
2718         (WebCore::SimpleFontData::isLoading):
2719         (isType): Deleted.
2720         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2721         (-[WebCascadeList initWithFont:character:]):
2722         (-[WebCascadeList objectAtIndex:]):
2723         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2724         * platform/graphics/mac/FontComplexTextMac.cpp:
2725         (WebCore::Font::fontDataForCombiningCharacterSequence):
2726
2727 2015-01-13  Dean Jackson  <dino@apple.com>
2728
2729         Filters aren't applied to elements in columns after the first
2730         https://bugs.webkit.org/show_bug.cgi?id=140331
2731
2732         Reviewed by Simon Fraser.
2733
2734         The important bits of this change came from Simon.
2735
2736         Filters and clipping were not taking columns into
2737         account when using their offset rectangles. The fix
2738         is to recalculate the rects if you're in such a
2739         situation.
2740
2741         Tests: fast/multicol/clip-in-columns.html
2742                fast/multicol/filter-in-columns.html
2743
2744         * rendering/RenderLayer.cpp:
2745         (WebCore::RenderLayer::hasFilterThatIsPainting): New method used
2746         to check if we're about to paint a filter.
2747         (WebCore::RenderLayer::setupFilters): Use the new helper if possible.
2748         (WebCore::RenderLayer::paintLayerContents): If we're in columns,
2749         and we either have a clip or a filter, recalculate the offset rectangles.
2750         * rendering/RenderLayer.h:
2751
2752 2015-01-13  Beth Dakin  <bdakin@apple.com>
2753
2754         Should disable immediate actions for iTunes
2755         https://bugs.webkit.org/show_bug.cgi?id=140405
2756         -and corresponding-
2757         rdar://problem/19461358
2758
2759         Reviewed by Tim Horton.
2760
2761         * WebCore.exp.in:
2762
2763 2015-01-13  Anders Carlsson  <andersca@apple.com>
2764
2765         Remove pure virtual functions from DatabaseBackendBase
2766         https://bugs.webkit.org/show_bug.cgi?id=140402
2767
2768         Reviewed by Sam Weinig.
2769
2770         Also change DatabaseBackendBase to Database in a couple of places.
2771
2772         * Modules/webdatabase/DatabaseBackendBase.cpp:
2773         (WebCore::DatabaseBackendBase::closeDatabase):
2774         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
2775         (WebCore::DatabaseBackendBase::performOpenAndVerify):
2776         (WebCore::DatabaseBackendBase::maximumSize):
2777         * Modules/webdatabase/DatabaseBackendBase.h:
2778         * Modules/webdatabase/DatabaseServer.cpp:
2779         (WebCore::DatabaseServer::createDatabase):
2780         * Modules/webdatabase/DatabaseTracker.cpp:
2781         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2782         (WebCore::DatabaseTracker::doneCreatingDatabase):
2783         (WebCore::DatabaseTracker::addOpenDatabase):
2784         (WebCore::DatabaseTracker::removeOpenDatabase):
2785         (WebCore::DatabaseTracker::getOpenDatabases):
2786         (WebCore::DatabaseTracker::deleteDatabaseFile):
2787         * Modules/webdatabase/DatabaseTracker.h:
2788
2789 2015-01-13  Joseph Pecoraro  <pecoraro@apple.com>
2790
2791         Web Inspector: Remove unused ResizeImage and DecodeImageData timeline events
2792         https://bugs.webkit.org/show_bug.cgi?id=140404
2793
2794         Reviewed by Timothy Hatcher.
2795
2796         * inspector/InspectorTimelineAgent.cpp:
2797         (WebCore::toProtocol):
2798         * inspector/InspectorTimelineAgent.h:
2799         * inspector/TimelineRecordFactory.cpp:
2800         (WebCore::TimelineRecordFactory::createDecodeImageData): Deleted.
2801         (WebCore::TimelineRecordFactory::createResizeImageData): Deleted.
2802         * inspector/TimelineRecordFactory.h:
2803
2804 2015-01-13  Jer Noble  <jer.noble@apple.com>
2805
2806         defaultPlaybackRate not respected when set before source is loaded
2807         https://bugs.webkit.org/show_bug.cgi?id=140282
2808
2809         Reviewed by Eric Carlson.
2810
2811         Test: media/video-defaultplaybackrate-before-load.html
2812
2813         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
2814         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
2815         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
2816         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
2817         value. So the end result is that the value from defaultPlaybackRate is overwritten by
2818         the default value of 1 in MediaPlayer.
2819
2820         Rather than caching the requested rate in MediaPlayer, cache the value reported by
2821         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
2822         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
2823         value is still used for estimating the current time during playback.
2824
2825         Add MediaPlayerPrivate interface method to return the current playback rate.
2826
2827         * html/HTMLMediaElement.cpp:
2828         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
2829         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
2830         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
2831         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
2832             of effectivePlaybackRate();
2833         (WebCore::HTMLMediaElement::ended): Ditto.
2834         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
2835         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
2836         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
2837         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
2838         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
2839         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
2840             requestedPlaybackRate() if playing and 0 if not.
2841         * html/HTMLMediaElement.h:
2842         * platform/graphics/MediaPlayer.cpp:
2843         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
2844         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
2845         (WebCore::MediaPlayer::setRate): Do not cache the rate.
2846         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
2847         * platform/graphics/MediaPlayer.h:
2848         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
2849         * platform/graphics/MediaPlayerPrivate.h:
2850         (WebCore::MediaPlayerPrivateInterface::rate): Added.
2851         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2852         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2853             Do not cache the requested rate.
2854         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
2855         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
2856         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2857         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
2858         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2859         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
2860         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
2861         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2862         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2863         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2864         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
2865         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
2866         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2867         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2868         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
2869
2870 2015-01-13  Andreas Kling  <akling@apple.com>
2871
2872         Element::normalizeAttributes() needs to handle arbitrary JS executing between loop iterations.
2873         <https://webkit.org/b/140379>
2874         <rdar://problem/19446901>
2875
2876         Reviewed by Benjamin Poulain.
2877
2878         Since DOM mutation events may arise below the call to Node::normalize(),
2879         have the loop in Element::normalizeAttributes() make a copy of the Attr nodes
2880         beforehand, to guard against mutations.
2881
2882         Based on a patch by Chris "Chris Dumez" Dumez.
2883
2884         Test: fast/dom/Element/normalize-crash2.html
2885
2886         * dom/Element.cpp:
2887         (WebCore::Element::normalizeAttributes):
2888
2889 2015-01-13  Shivakumar JM  <shiva.jm@samsung.com>
2890
2891         Fix Debug Build Error in Webcore module.
2892         https://bugs.webkit.org/show_bug.cgi?id=140383
2893
2894         Reviewed by Csaba Osztrogonác.
2895
2896         No new tests because there is no visible behavior change.
2897
2898         * platform/linux/MemoryPressureHandlerLinux.cpp:
2899         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
2900
2901 2015-01-12  Benjamin Poulain  <benjamin@webkit.org>
2902
2903         Fix a typo in r178313
2904
2905         * contentextensions/URLFilterParser.cpp:
2906         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2907
2908 2015-01-12  Benjamin Poulain  <benjamin@webkit.org>
2909
2910         Add basic pattern matching support to the url filters
2911         https://bugs.webkit.org/show_bug.cgi?id=140283
2912
2913         Reviewed by Andreas Kling.
2914
2915         This patch adds some basic generic pattern support for the url filters
2916         of ContentExtensions.
2917
2918         Instead of writting a new parser, I re-used Gavin's parser for JavaScript
2919         RegExp.
2920
2921         This patch only implements the very basic stuffs: transition on any character
2922         and repetition.
2923
2924         * WebCore.xcodeproj/project.pbxproj:
2925         * contentextensions/ContentExtensionsBackend.cpp:
2926         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2927         Use the new parser.
2928
2929         * contentextensions/DFA.cpp:
2930         (WebCore::ContentExtensions::DFA::DFA):
2931         (WebCore::ContentExtensions::printRange):
2932         (WebCore::ContentExtensions::printTransition):
2933         (WebCore::ContentExtensions::DFA::debugPrintDot):
2934         * contentextensions/NFA.cpp:
2935         (WebCore::ContentExtensions::printRange):
2936         (WebCore::ContentExtensions::printTransition):
2937         (WebCore::ContentExtensions::NFA::debugPrintDot):
2938         The graphs generated with the extended patterns are vastly more complicated
2939         than the old prefix matcher.
2940         I changed the debug output to have a single link between any two nodes
2941         instead of one per transition. This makes the graph a little more manageable.
2942
2943         * contentextensions/NFA.cpp:
2944         (WebCore::ContentExtensions::NFA::addTransition):
2945         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
2946         (WebCore::ContentExtensions::NFA::graphSize):
2947         (WebCore::ContentExtensions::NFA::restoreToGraphSize):
2948         * contentextensions/NFA.h:
2949         * contentextensions/NFANode.h:
2950         (WebCore::ContentExtensions::epsilonClosure):
2951         The new parser can generate transitions back to the root node of index zero.
2952         All the hash structures had to be updated to support this kind of key.
2953
2954         * contentextensions/NFAToDFA.cpp:
2955         (WebCore::ContentExtensions::HashableNodeIdSetHash::hash):
2956         Two tiny improvements:
2957         -Don't hash zero to zero, it causes more conflicts that needed.
2958         -The hash operation must use a commutative operation, otherwise the order
2959          of elements can affect the hash, which is undesired for a set.
2960         I'll improve this further later.
2961
2962         (WebCore::ContentExtensions::NFAToDFA::convert):
2963
2964         * contentextensions/URLFilterParser.cpp: Added.
2965         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2966         (WebCore::ContentExtensions::GraphBuilder::m_lastAtom):
2967         (WebCore::ContentExtensions::GraphBuilder::finalize):
2968         (WebCore::ContentExtensions::GraphBuilder::errorMessage):
2969         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2970         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2971         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2972         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
2973         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
2974         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2975         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
2976         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
2977         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
2978         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
2979         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
2980         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
2981         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
2982         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
2983         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
2984         (WebCore::ContentExtensions::GraphBuilder::disjunction):
2985         (WebCore::ContentExtensions::GraphBuilder::hasError):
2986         (WebCore::ContentExtensions::GraphBuilder::fail):
2987         (WebCore::ContentExtensions::URLFilterParser::parse):
2988         * contentextensions/URLFilterParser.h:
2989         (WebCore::ContentExtensions::URLFilterParser::hasError):
2990         (WebCore::ContentExtensions::URLFilterParser::errorMessage):
2991
2992 2015-01-11  Sam Weinig  <sam@webkit.org>
2993
2994         Remove support for SharedWorkers
2995         https://bugs.webkit.org/show_bug.cgi?id=140344
2996
2997         Reviewed by Anders Carlsson.
2998
2999         * CMakeLists.txt:
3000         * Configurations/FeatureDefines.xcconfig:
3001         * DerivedSources.cpp:
3002         * DerivedSources.make:
3003         * PlatformGTK.cmake:
3004         * PlatformMac.cmake:
3005         * WebCore.vcxproj/WebCore.vcxproj:
3006         * WebCore.vcxproj/WebCore.vcxproj.filters:
3007         * WebCore.xcodeproj/project.pbxproj:
3008         * bindings/generic/RuntimeEnabledFeatures.cpp:
3009         (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled): Deleted.
3010         * bindings/generic/RuntimeEnabledFeatures.h:
3011         * bindings/js/JSBindingsAllInOne.cpp:
3012         * bindings/js/JSDOMWindowCustom.cpp:
3013         * bindings/js/JSSharedWorkerCustom.cpp: Removed.
3014         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3015         (WebCore::toJSWorkerGlobalScope):
3016         (WebCore::toJSSharedWorkerGlobalScope): Deleted.
3017         * bindings/js/JSWorkerGlobalScopeBase.h:
3018         * bindings/js/WorkerScriptController.cpp:
3019         (WebCore::WorkerScriptController::initScript):
3020         * bindings/scripts/IDLAttributes.txt:
3021         * bindings/scripts/preprocess-idls.pl:
3022         * dom/Document.cpp:
3023         (WebCore::Document::prepareForDestruction):
3024         * dom/EventTarget.h:
3025         * dom/EventTargetFactory.in:
3026         * history/PageCache.cpp:
3027         (WebCore::logCanCacheFrameDecision):
3028         (WebCore::PageCache::canCachePageContainingThisFrame):
3029         * loader/FrameLoader.cpp:
3030         * page/SecurityOrigin.h:
3031         (WebCore::SecurityOrigin::canAccessLocalStorage):
3032         (WebCore::SecurityOrigin::canAccessSharedWorkers): Deleted.
3033         * platform/FeatureCounterKeys.h:
3034         * platform/PlatformStrategies.h:
3035         (WebCore::PlatformStrategies::PlatformStrategies):
3036         (WebCore::PlatformStrategies::sharedWorkerStrategy): Deleted.
3037         * workers/DefaultSharedWorkerRepository.cpp: Removed.
3038         * workers/DefaultSharedWorkerRepository.h: Removed.
3039         * workers/SharedWorker.cpp: Removed.
3040         * workers/SharedWorker.h: Removed.
3041         * workers/SharedWorker.idl: Removed.
3042         * workers/SharedWorkerGlobalScope.cpp: Removed.
3043         * workers/SharedWorkerGlobalScope.h: Removed.
3044         * workers/SharedWorkerGlobalScope.idl: Removed.
3045         * workers/SharedWorkerRepository.cpp: Removed.
3046         * workers/SharedWorkerRepository.h: Removed.
3047         * workers/SharedWorkerStrategy.h: Removed.
3048         * workers/SharedWorkerThread.cpp: Removed.
3049         * workers/SharedWorkerThread.h: Removed.
3050         * workers/WorkerGlobalScope.h:
3051         (WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope): Deleted.
3052
3053 2015-01-12  Byungseon Shin  <sun.shin@lge.com>
3054
3055         REGRESSION(r178029): [GTK][EFL] Caused no-backing-for-clip-overlap test failures
3056         https://bugs.webkit.org/show_bug.cgi?id=140336
3057
3058         Reviewed by Simon Fraser.
3059
3060         Avoid creating childClippingMaskLayer when renderer has not border radius nor clip path.
3061
3062         * rendering/RenderLayerBacking.cpp:
3063         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
3064
3065 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
3066
3067         [Apple] Squelch stderr log regarding negative stroke thickness
3068         https://bugs.webkit.org/show_bug.cgi?id=140372
3069         <rdar://problem/19426485>
3070
3071         Reviewed by Eric Carlson.
3072
3073         No new tests because there is no visible behavior change.
3074
3075         * platform/graphics/cg/GraphicsContextCG.cpp:
3076         (WebCore::GraphicsContext::setPlatformStrokeThickness):
3077
3078 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
3079
3080         Get rid of unnecessary reimplementations of CGFloor/Ceiling
3081         https://bugs.webkit.org/show_bug.cgi?id=140375
3082
3083         Reviewed by Simon Fraser.
3084
3085         * platform/mac/DragImageMac.mm:
3086         (WebCore::widthWithFont):
3087         (WebCore::drawAtPoint):
3088         (WebCore::webkit_CGCeiling): Deleted.
3089         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
3090         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
3091         (webkit_CGFloor): Deleted.
3092         Delete unnecessary code, use the real CGFloor/Ceiling instead.
3093
3094 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
3095
3096         REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
3097         https://bugs.webkit.org/show_bug.cgi?id=140373
3098         <rdar://problem/19447156>
3099
3100         Reviewed by Simon Fraser.
3101
3102         * page/mac/TextIndicatorWindow.mm:
3103         (WebCore::TextIndicatorWindow::setTextIndicator):
3104         Expand the window margin to the nearest integer.
3105         The window was already being pixel-snapped, but then we'd translate by
3106         the non-integral margin when building up the layer tree.
3107         It's OK to do this on 2x because it's fine to have the margin be bigger
3108         than needed.
3109
3110         * platform/spi/cg/CoreGraphicsSPI.h:
3111         Add a CGCeiling to match CGFloor.
3112
3113 2015-01-12  Andreas Kling  <akling@apple.com>
3114
3115         Guard web thread stuff with USE(WEB_THREAD) instead of PLATFORM(IOS).
3116
3117         Dan pointed out that we should guard WebThreadIsLockedOrDisabled() with
3118         USE(WEB_THREAD) to communicate our ambitions to someday have an iOS
3119         build of WebKit that doesn't need any of that.
3120
3121         * Modules/geolocation/Geolocation.cpp:
3122         (WebCore::Geolocation::resume):
3123
3124 2015-01-12  Andreas Kling  <akling@apple.com>
3125
3126         Fix build for non-iOS platforms. :|
3127
3128         * Modules/geolocation/Geolocation.cpp:
3129         (WebCore::Geolocation::resume):
3130
3131 2015-01-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3132
3133         [Freetype] Don't use non-scalable fonts.
3134         https://bugs.webkit.org/show_bug.cgi?id=31931
3135
3136         Reviewed by Martin Robinson.
3137
3138         No new tests needed.
3139
3140         * platform/graphics/freetype/FontCacheFreeType.cpp:
3141         (WebCore::FontCache::createFontPlatformData): Prefer scalable fonts.
3142
3143 2015-01-12  Andreas Kling  <akling@apple.com>
3144
3145         Geolocation objects shouldn't prevent page caching.
3146         <https://webkit.org/b/140369>
3147
3148         Reviewed by Joseph Pecoraro.
3149
3150         Enable the code for suspend/resume of Geolocation objects on all platforms
3151         instead of just iOS. This allows pages using geolocation to use page cache
3152         instead of reloading on back/forward navigation.
3153
3154         Test: fast/history/page-cache-geolocation.html
3155
3156         * Modules/geolocation/Geolocation.cpp:
3157         (WebCore::Geolocation::Geolocation):
3158         (WebCore::Geolocation::resetAllGeolocationPermission):
3159         (WebCore::Geolocation::stop):
3160         (WebCore::Geolocation::setIsAllowed):
3161         (WebCore::Geolocation::positionChanged):
3162         (WebCore::Geolocation::setError):
3163         * Modules/geolocation/Geolocation.h:
3164
3165 2015-01-12  Chris Dumez  <cdumez@apple.com>
3166
3167         Log navigation types using DiagnosticLoggingClient
3168         https://bugs.webkit.org/show_bug.cgi?id=140323
3169
3170         Reviewed by Darin Adler.
3171
3172         Log navigation types using DiagnosticLoggingClient to help us understand
3173         what types of navigations are common and give us an estimate on the
3174         total number of navigations.
3175
3176         * loader/FrameLoader.cpp:
3177         (WebCore::logNavigation):
3178         (WebCore::FrameLoader::loadWithDocumentLoader):
3179         (WebCore::logNavigationWithFeatureCounter): Deleted.
3180         * page/DiagnosticLoggingKeys.cpp:
3181         (WebCore::DiagnosticLoggingKeys::navigationKey):
3182         * page/DiagnosticLoggingKeys.h:
3183
3184 2015-01-12  Brian J. Burg  <burg@cs.washington.edu>
3185
3186         Web Inspector: ASSERT under WebCore::InspectorResourceAgent::loadResource
3187         https://bugs.webkit.org/show_bug.cgi?id=140367
3188
3189         Reviewed by Andreas Kling.
3190
3191         * inspector/InspectorResourceAgent.cpp:
3192         (WebCore::InspectorResourceAgent::loadResource): use copyRef() instead of move(),
3193         since we check the callback after giving it to the loader client.
3194
3195 2015-01-12  Anders Carlsson  <andersca@apple.com>
3196
3197         Move DatabaseBackend functions back to Database
3198         https://bugs.webkit.org/show_bug.cgi?id=140368
3199
3200         Reviewed by Sam Weinig.
3201
3202         * Modules/webdatabase/Database.cpp:
3203         (WebCore::Database::openAndVerifyVersion):
3204         (WebCore::Database::close):
3205         (WebCore::Database::performOpenAndVerify):
3206         (WebCore::Database::scheduleTransaction):
3207         (WebCore::Database::runTransaction):
3208         (WebCore::Database::scheduleTransactionStep):
3209         (WebCore::Database::inProgressTransactionCompleted):
3210         (WebCore::Database::transactionClient):
3211         (WebCore::Database::transactionCoordinator):
3212         * Modules/webdatabase/Database.h:
3213         * Modules/webdatabase/DatabaseBackend.cpp:
3214         (WebCore::DatabaseBackend::openAndVerifyVersion): Deleted.
3215         (WebCore::DatabaseBackend::performOpenAndVerify): Deleted.
3216         (WebCore::DatabaseBackend::close): Deleted.
3217         (WebCore::DatabaseBackend::runTransaction): Deleted.
3218         (WebCore::DatabaseBackend::inProgressTransactionCompleted): Deleted.
3219         (WebCore::DatabaseBackend::scheduleTransaction): Deleted.
3220         (WebCore::DatabaseBackend::scheduleTransactionStep): Deleted.
3221         (WebCore::DatabaseBackend::transactionClient): Deleted.
3222         (WebCore::DatabaseBackend::transactionCoordinator): Deleted.
3223         * Modules/webdatabase/DatabaseBackend.h:
3224         * Modules/webdatabase/DatabaseThread.cpp:
3225         (WebCore::DatabaseThread::recordDatabaseOpen):
3226         (WebCore::DatabaseThread::recordDatabaseClosed):
3227         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
3228         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
3229         * Modules/webdatabase/DatabaseThread.h:
3230         * Modules/webdatabase/SQLTransactionBackend.cpp:
3231         (WebCore::SQLTransactionBackend::create):
3232         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
3233         * Modules/webdatabase/SQLTransactionBackend.h:
3234         (WebCore::SQLTransactionBackend::database):
3235
3236 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
3237
3238         Addressing post-review comment after r178292
3239         https://bugs.webkit.org/show_bug.cgi?id=136769
3240
3241         Unreviewed.
3242
3243         * loader/cache/CachedFont.cpp:
3244         (WebCore::CachedFont::ensureCustomFontData):
3245
3246 2015-01-12  Myles C. Maxfield  <mmaxfield@apple.com>
3247
3248         Allow targetting the SVG->OTF font converter with ENABLE(SVG_OTF_CONVERTER)
3249         https://bugs.webkit.org/show_bug.cgi?id=136769
3250
3251         Reviewed by Antti Koivisto.
3252
3253         If ENABLE(SVG_OTF_CONVERTER) is defined, use the converter. It can be defined at the same
3254         time as ENABLE(SVG_FONTS) but, if so, the SVG font code will be dead code.
3255
3256         No new tests because the define is off by default. Tests will come soon, I promise.
3257
3258         * Configurations/FeatureDefines.xcconfig:
3259         * css/CSSFontFaceSource.cpp:
3260         (WebCore::CSSFontFaceSource::getFontData): When creating a font, if the ENABLE is on,
3261         do the transcode and take the non-SVG path.
3262         (WebCore::CSSFontFaceSource::ensureFontData): Pass extra arguments to
3263         CachedFont::ensureCustomFontData()
3264         * css/CSSFontFaceSource.h: For the case of in-document SVG fonts, keep the transcoded
3265         bytes around.
3266         * loader/cache/CachedFont.cpp:
3267         (WebCore::CachedFont::ensureCustomFontData): For out-of-document SVG fonts, do the
3268         transcode if the ENABLE is on, then treat as if the font is any old webfont.
3269         (WebCore::CachedFont::getSVGFontById): This function looks up the relevant <font>
3270         element. Modify it to take a pointer to a (possibly external) document within which
3271         to search.
3272         * loader/cache/CachedFont.h: Extra arguments to CachedFont::ensureCustomFontData()
3273         and CachedFont::getSVGFontById()
3274
3275 2015-01-12  Zan Dobersek  <zdobersek@igalia.com>
3276
3277         Clean up FrameTree::traverseNext() traversals of main frames
3278         https://bugs.webkit.org/show_bug.cgi?id=140338
3279
3280         Reviewed by Andreas Kling.
3281
3282         There's no reason to pass the main frame as the stayWithin parameter
3283         to FrameTree::traverseNext() when traversing over that same main frame.
3284
3285         * inspector/InspectorApplicationCacheAgent.cpp:
3286         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3287         * inspector/InspectorPageAgent.cpp:
3288         (WebCore::InspectorPageAgent::getCookies):
3289         (WebCore::InspectorPageAgent::deleteCookie):
3290         (WebCore::InspectorPageAgent::searchInResources):
3291         * replay/SerializationMethods.cpp:
3292         (WebCore::frameIndexFromFrame):
3293         (WebCore::frameFromFrameIndex):
3294
3295 2015-01-12  Timothy Horton  <timothy_horton@apple.com>
3296
3297         Multi-rect TextIndicators are vertically flipped in WebKit1
3298         https://bugs.webkit.org/show_bug.cgi?id=140350
3299         <rdar://problem/19441243>
3300
3301         Reviewed by Beth Dakin.
3302
3303         * page/TextIndicator.cpp:
3304         (WebCore::TextIndicator::createWithSelectionInFrame):
3305         (WebCore::TextIndicator::TextIndicator):
3306         * page/TextIndicator.h:
3307         (WebCore::TextIndicator::selectionRectInRootViewCoordinates):
3308         (WebCore::TextIndicator::textBoundingRectInRootViewCoordinates):
3309         (WebCore::TextIndicator::selectionRectInWindowCoordinates): Deleted.
3310         (WebCore::TextIndicator::textBoundingRectInWindowCoordinates): Deleted.
3311         * page/mac/TextIndicatorWindow.mm:
3312         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
3313         (WebCore::TextIndicatorWindow::setTextIndicator):
3314         Compute, store, and use TextIndicator's selectionRect and textBoundingRect
3315         in root view coordinates instead of window coordinates; this way, each
3316         WebKit can do the conversion itself, and the rootView vs. window flipping
3317         isn't wrongly factored into textRectsInBoundingRectCoordinates.
3318
3319 2015-01-12  Commit Queue  <commit-queue@webkit.org>
3320
3321         Unreviewed, rolling out r178281.
3322         https://bugs.webkit.org/show_bug.cgi?id=140366
3323
3324         Broke many media tests (Requested by ap on #webkit).
3325
3326         Reverted changeset:
3327
3328         "defaultPlaybackRate not respected when set before source is
3329         loaded"
3330         https://bugs.webkit.org/show_bug.cgi?id=140282
3331         http://trac.webkit.org/changeset/178281
3332
3333 2015-01-12  Anders Carlsson  <andersca@apple.com>
3334
3335         Merge DatabaseBackendContext into DatabaseContext
3336         https://bugs.webkit.org/show_bug.cgi?id=140365
3337
3338         Reviewed by Antti Koivisto.
3339
3340         * CMakeLists.txt:
3341         * Modules/webdatabase/AbstractDatabaseServer.h:
3342         * Modules/webdatabase/Database.cpp:
3343         (WebCore::Database::Database):
3344         * Modules/webdatabase/Database.h:
3345         * Modules/webdatabase/DatabaseBackend.cpp:
3346         (WebCore::DatabaseBackend::DatabaseBackend):
3347         * Modules/webdatabase/DatabaseBackend.h:
3348         * Modules/webdatabase/DatabaseBackendBase.cpp:
3349         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
3350         * Modules/webdatabase/DatabaseBackendBase.h:
3351         (WebCore::DatabaseBackendBase::databaseContext):
3352         * Modules/webdatabase/DatabaseBackendContext.cpp: Removed.
3353         * Modules/webdatabase/DatabaseBackendContext.h: Removed.
3354         * Modules/webdatabase/DatabaseContext.cpp:
3355         (WebCore::DatabaseContext::securityOrigin):
3356         (WebCore::DatabaseContext::isContextThread):
3357         (WebCore::DatabaseContext::backend): Deleted.
3358         * Modules/webdatabase/DatabaseContext.h:
3359         * Modules/webdatabase/DatabaseManager.cpp:
3360         (WebCore::DatabaseManager::openDatabaseBackend):
3361         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
3362         * Modules/webdatabase/DatabaseServer.cpp:
3363         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
3364         (WebCore::DatabaseServer::openDatabase):
3365         (WebCore::DatabaseServer::createDatabase):
3366         * Modules/webdatabase/DatabaseServer.h:
3367         * Modules/webdatabase/DatabaseTracker.cpp:
3368         (WebCore::DatabaseTracker::canEstablishDatabase):
3369         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
3370         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3371         * Modules/webdatabase/DatabaseTracker.h:
3372         * Modules/webdatabase/SQLTransactionBackend.cpp:
3373         * Modules/webdatabase/SQLTransactionClient.cpp:
3374         * WebCore.vcxproj/WebCore.vcxproj:
3375         * WebCore.vcxproj/WebCore.vcxproj.filters:
3376         * WebCore.xcodeproj/project.pbxproj:
3377
3378 2015-01-12  Jer Noble  <jer.noble@apple.com>
3379
3380         defaultPlaybackRate not respected when set before source is loaded
3381         https://bugs.webkit.org/show_bug.cgi?id=140282
3382
3383         Reviewed by Eric Carlson.
3384
3385         Test: media/video-defaultplaybackrate-before-load.html
3386
3387         When the HTMLMediaElement is notified that the media player's rate has changed, it asks
3388         for the rate from MediaPlayer. However, MediaPlayer never requests the playback rate
3389         from the underlying MediaPlayerPrivate; it just returns the last rate which was set, or
3390         1 if no rate was set. HTMLMediaElement then sets its playbackRate to the returned
3391         value. So the end result is that the value from defaultPlaybackRate is overwritten by
3392         the default value of 1 in MediaPlayer.
3393
3394         Rather than caching the requested rate in MediaPlayer, cache the value reported by
3395         MediaPlayer inside HTMLMediaElement. And instead of returning the reported playback
3396         rate from HTMLMediaElement.playbackRate, just return the last value set. The reported
3397         value is still used for estimating the current time during playback.
3398
3399         Add MediaPlayerPrivate interface method to return the current playback rate.
3400
3401         * html/HTMLMediaElement.cpp:
3402         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedPlaybackRate.
3403         (WebCore::HTMLMediaElement::effectivePlaybackRate): Return m_reportedPlaybackRate.
3404         (WebCore::HTMLMediaElement::requestedPlaybackRate): Return m_playbackRate.
3405         (WebCore::HTMLMediaElement::updatePlaybackRate): Use requestedPlaybackRate() instead
3406             of effectivePlaybackRate();
3407         (WebCore::HTMLMediaElement::ended): Ditto.
3408         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
3409         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
3410         (WebCore::HTMLMediaElement::updatePlayState): Ditto.
3411         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Set m_reportedPlaybackRate.
3412         (WebCore::HTMLMediaElement::mediaPlayerRequestedPlaybackRate): Return
3413             requestedPlaybackRate() if playing and 0 if not.
3414         * html/HTMLMediaElement.h:
3415         * platform/graphics/MediaPlayer.cpp:
3416         (WebCore::MediaPlayer::MediaPlayer): Removed m_rate.
3417         (WebCore::MediaPlayer::rate): Pass to MediaPlayerPrivate.
3418         (WebCore::MediaPlayer::setRate): Do not cache the rate.
3419         (WebCore::MediaPlayer::requestedRate): Added; ask HTMLMediaElement.
3420         * platform/graphics/MediaPlayer.h:
3421         (WebCore::MediaPlayerClient::mediaPlayerRequestedPlaybackRate): Added.
3422         * platform/graphics/MediaPlayerPrivate.h:
3423         (WebCore::MediaPlayerPrivateInterface::rate): Added.
3424         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3425         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
3426             Do not cache the requested rate.
3427         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Pass to MediaPlayer.
3428         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Deleted.
3429         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3430         (WebCore::MediaPlayerPrivateAVFoundation::requestedRate): Deleted.
3431         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3432         (WebCore::MediaPlayerPrivateAVFoundationCF::setRate): Renamed from updateRate.
3433         (WebCore::MediaPlayerPrivateAVFoundationCF::rate): Fetch the rate from the player.
3434         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3435         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3436         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3437         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Renamed from updateRate.
3438         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate): Fetch the rate from the player.
3439         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3440         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3441         (WebCore::MediaPlayerPrivateQTKit::rate): Fetch the rate from the QTMovie.
3442
3443 2015-01-11  Anders Carlsson  <andersca@apple.com>
3444
3445         Merge DatabaseBase into Database
3446         https://bugs.webkit.org/show_bug.cgi?id=140345
3447
3448